LibreOffice Module sc (master)  1
viewopti.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <osl/diagnose.h>
21 
22 #include <com/sun/star/uno/Any.hxx>
23 #include <com/sun/star/uno/Sequence.hxx>
24 
25 #include <global.hxx>
26 #include <viewopti.hxx>
27 #include <sc.hrc>
28 #include <miscuno.hxx>
29 
30 using namespace utl;
31 using namespace com::sun::star::uno;
32 
33 
34 
36 {
37  *this = ScGridOptions();
38 
39  // grid defaults differ now between the apps
40  // therefore, enter here in its own right (all in 1/100mm)
41 
43  {
44  nFldDrawX = 1000; // 1cm
45  nFldDrawY = 1000;
46  nFldSnapX = 1000;
47  nFldSnapY = 1000;
48  }
49  else
50  {
51  nFldDrawX = 1270; // 0,5"
52  nFldDrawY = 1270;
53  nFldSnapX = 1270;
54  nFldSnapY = 1270;
55  }
56  nFldDivisionX = 1;
57  nFldDivisionY = 1;
58 }
59 
60 bool ScGridOptions::operator==( const ScGridOptions& rCpy ) const
61 {
62  return ( nFldDrawX == rCpy.nFldDrawX
63  && nFldDivisionX == rCpy.nFldDivisionX
64  && nFldDrawY == rCpy.nFldDrawY
65  && nFldDivisionY == rCpy.nFldDivisionY
66  && nFldSnapX == rCpy.nFldSnapX
67  && nFldSnapY == rCpy.nFldSnapY
68  && bUseGridsnap == rCpy.bUseGridsnap
69  && bSynchronize == rCpy.bSynchronize
70  && bGridVisible == rCpy.bGridVisible
71  && bEqualGrid == rCpy.bEqualGrid );
72 }
73 
74 
76 {
77  SetDefaults();
78 }
79 
81 {
82  *this = rCpy;
83 }
84 
86 {
87 }
88 
90 {
91  aOptArr[ VOPT_FORMULAS ] = false;
92  aOptArr[ VOPT_SYNTAX ] = false;
93  aOptArr[ VOPT_HELPLINES ] = false;
94  aOptArr[ VOPT_GRID_ONTOP ] = false;
95  aOptArr[ VOPT_NOTES ] = true;
96  aOptArr[ VOPT_NULLVALS ] = true;
97  aOptArr[ VOPT_VSCROLL ] = true;
98  aOptArr[ VOPT_HSCROLL ] = true;
99  aOptArr[ VOPT_TABCONTROLS ] = true;
100  aOptArr[ VOPT_OUTLINER ] = true;
101  aOptArr[ VOPT_HEADER ] = true;
102  aOptArr[ VOPT_GRID ] = true;
103  aOptArr[ VOPT_ANCHOR ] = true;
104  aOptArr[ VOPT_PAGEBREAKS ] = true;
105  aOptArr[ VOPT_CLIPMARKS ] = true;
106  aOptArr[ VOPT_SUMMARY ] = true;
107 
108  aModeArr[VOBJ_TYPE_OLE ] = VOBJ_MODE_SHOW;
109  aModeArr[VOBJ_TYPE_CHART] = VOBJ_MODE_SHOW;
110  aModeArr[VOBJ_TYPE_DRAW ] = VOBJ_MODE_SHOW;
111 
112  aGridCol = SC_STD_GRIDCOLOR;
113 
114  aGridOpt.SetDefaults();
115 }
116 
117 Color const & ScViewOptions::GetGridColor( OUString* pStrName ) const
118 {
119  if ( pStrName )
120  *pStrName = aGridColName;
121 
122  return aGridCol;
123 }
124 
126 
127 bool ScViewOptions::operator==( const ScViewOptions& rOpt ) const
128 {
129  bool bEqual = true;
130  sal_uInt16 i;
131 
132  for ( i=0; i<MAX_OPT && bEqual; i++ ) bEqual = (aOptArr [i] == rOpt.aOptArr[i]);
133  for ( i=0; i<MAX_TYPE && bEqual; i++ ) bEqual = (aModeArr[i] == rOpt.aModeArr[i]);
134 
135  bEqual = bEqual && (aGridCol == rOpt.aGridCol);
136  bEqual = bEqual && (aGridColName == rOpt.aGridColName);
137  bEqual = bEqual && (aGridOpt == rOpt.aGridOpt);
138 
139  return bEqual;
140 }
141 
142 std::unique_ptr<SvxGridItem> ScViewOptions::CreateGridItem() const
143 {
144  std::unique_ptr<SvxGridItem> pItem(new SvxGridItem( SID_ATTR_GRID_OPTIONS ));
145 
146  pItem->SetFieldDrawX ( aGridOpt.GetFieldDrawX() );
147  pItem->SetFieldDivisionX ( aGridOpt.GetFieldDivisionX() );
148  pItem->SetFieldDrawY ( aGridOpt.GetFieldDrawY() );
149  pItem->SetFieldDivisionY ( aGridOpt.GetFieldDivisionY() );
150  pItem->SetFieldSnapX ( aGridOpt.GetFieldSnapX() );
151  pItem->SetFieldSnapY ( aGridOpt.GetFieldSnapY() );
152  pItem->SetUseGridSnap ( aGridOpt.GetUseGridSnap() );
153  pItem->SetSynchronize ( aGridOpt.GetSynchronize() );
154  pItem->SetGridVisible ( aGridOpt.GetGridVisible() );
155  pItem->SetEqualGrid ( aGridOpt.GetEqualGrid() );
156 
157  return pItem;
158 }
159 
160 // ScTpViewItem - data for the ViewOptions TabPage
161 
163  : SfxPoolItem ( SID_SCVIEWOPTIONS ),
164  theOptions ( rOpt )
165 {
166 }
167 
169 {
170 }
171 
172 bool ScTpViewItem::operator==( const SfxPoolItem& rItem ) const
173 {
174  assert(SfxPoolItem::operator==(rItem));
175 
176  const ScTpViewItem& rPItem = static_cast<const ScTpViewItem&>(rItem);
177 
178  return ( theOptions == rPItem.theOptions );
179 }
180 
182 {
183  return new ScTpViewItem( *this );
184 }
185 
186 // Config Item containing view options
187 
188 #define CFGPATH_LAYOUT "Office.Calc/Layout"
189 
190 #define SCLAYOUTOPT_GRIDLINES 0
191 #define SCLAYOUTOPT_GRIDCOLOR 1
192 #define SCLAYOUTOPT_PAGEBREAK 2
193 #define SCLAYOUTOPT_GUIDE 3
194 #define SCLAYOUTOPT_COLROWHDR 4
195 #define SCLAYOUTOPT_HORISCROLL 5
196 #define SCLAYOUTOPT_VERTSCROLL 6
197 #define SCLAYOUTOPT_SHEETTAB 7
198 #define SCLAYOUTOPT_OUTLINE 8
199 #define SCLAYOUTOPT_GRID_ONCOLOR 9
200 #define SCLAYOUTOPT_SUMMARY 10
201 
202 #define CFGPATH_DISPLAY "Office.Calc/Content/Display"
203 
204 #define SCDISPLAYOPT_FORMULA 0
205 #define SCDISPLAYOPT_ZEROVALUE 1
206 #define SCDISPLAYOPT_NOTETAG 2
207 #define SCDISPLAYOPT_VALUEHI 3
208 #define SCDISPLAYOPT_ANCHOR 4
209 #define SCDISPLAYOPT_TEXTOVER 5
210 #define SCDISPLAYOPT_OBJECTGRA 6
211 #define SCDISPLAYOPT_CHART 7
212 #define SCDISPLAYOPT_DRAWING 8
213 
214 #define CFGPATH_GRID "Office.Calc/Grid"
215 
216 #define SCGRIDOPT_RESOLU_X 0
217 #define SCGRIDOPT_RESOLU_Y 1
218 #define SCGRIDOPT_SUBDIV_X 2
219 #define SCGRIDOPT_SUBDIV_Y 3
220 #define SCGRIDOPT_OPTION_X 4
221 #define SCGRIDOPT_OPTION_Y 5
222 #define SCGRIDOPT_SNAPTOGRID 6
223 #define SCGRIDOPT_SYNCHRON 7
224 #define SCGRIDOPT_VISIBLE 8
225 #define SCGRIDOPT_SIZETOGRID 9
226 
228 {
229  return {"Line/GridLine", // SCLAYOUTOPT_GRIDLINES
230  "Line/GridLineColor", // SCLAYOUTOPT_GRIDCOLOR
231  "Line/PageBreak", // SCLAYOUTOPT_PAGEBREAK
232  "Line/Guide", // SCLAYOUTOPT_GUIDE
233  "Window/ColumnRowHeader", // SCLAYOUTOPT_COLROWHDR
234  "Window/HorizontalScroll", // SCLAYOUTOPT_HORISCROLL
235  "Window/VerticalScroll", // SCLAYOUTOPT_VERTSCROLL
236  "Window/SheetTab", // SCLAYOUTOPT_SHEETTAB
237  "Window/OutlineSymbol", // SCLAYOUTOPT_OUTLINE
238  "Line/GridOnColoredCells", // SCLAYOUTOPT_GRID_ONCOLOR;
239  "Window/SearchSummary"}; // SCLAYOUTOPT_SUMMARY
240 }
241 
243 {
244  return {"Formula", // SCDISPLAYOPT_FORMULA
245  "ZeroValue", // SCDISPLAYOPT_ZEROVALUE
246  "NoteTag", // SCDISPLAYOPT_NOTETAG
247  "ValueHighlighting", // SCDISPLAYOPT_VALUEHI
248  "Anchor", // SCDISPLAYOPT_ANCHOR
249  "TextOverflow", // SCDISPLAYOPT_TEXTOVER
250  "ObjectGraphic", // SCDISPLAYOPT_OBJECTGRA
251  "Chart", // SCDISPLAYOPT_CHART
252  "DrawingObject"}; // SCDISPLAYOPT_DRAWING;
253 }
254 
256 {
257  const bool bIsMetric = ScOptionsUtil::IsMetricSystem();
258 
259  return {(bIsMetric ? OUString("Resolution/XAxis/Metric")
260  : OUString("Resolution/XAxis/NonMetric")), // SCGRIDOPT_RESOLU_X
261  (bIsMetric ? OUString("Resolution/YAxis/Metric")
262  : OUString("Resolution/YAxis/NonMetric")), // SCGRIDOPT_RESOLU_Y
263  "Subdivision/XAxis", // SCGRIDOPT_SUBDIV_X
264  "Subdivision/YAxis", // SCGRIDOPT_SUBDIV_Y
265  (bIsMetric ? OUString("Option/XAxis/Metric")
266  : OUString("Option/XAxis/NonMetric")), // SCGRIDOPT_OPTION_X
267  (bIsMetric ? OUString("Option/YAxis/Metric")
268  : OUString("Option/YAxis/NonMetric")), // SCGRIDOPT_OPTION_Y
269  "Option/SnapToGrid", // SCGRIDOPT_SNAPTOGRID
270  "Option/Synchronize", // SCGRIDOPT_SYNCHRON
271  "Option/VisibleGrid", // SCGRIDOPT_VISIBLE
272  "Option/SizeToGrid"}; // SCGRIDOPT_SIZETOGRID;
273 }
274 
279 {
280  sal_Int32 nIntVal = 0;
281 
283  Sequence<Any> aValues = aLayoutItem.GetProperties(aNames);
285  const Any* pValues = aValues.getConstArray();
286  OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
287  if(aValues.getLength() == aNames.getLength())
288  {
289  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
290  {
291  OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
292  if(pValues[nProp].hasValue())
293  {
294  switch(nProp)
295  {
297  if ( pValues[nProp] >>= nIntVal )
298  SetGridColor( Color(nIntVal), EMPTY_OUSTRING );
299  break;
302  break;
305  break;
308  break;
309  case SCLAYOUTOPT_GUIDE:
311  break;
314  break;
317  break;
320  break;
323  break;
324  case SCLAYOUTOPT_OUTLINE:
326  break;
327  case SCLAYOUTOPT_SUMMARY:
329  break;
330  }
331  }
332  }
333  }
334  aLayoutItem.SetCommitLink( LINK( this, ScViewCfg, LayoutCommitHdl ) );
335 
336  aNames = GetDisplayPropertyNames();
337  aValues = aDisplayItem.GetProperties(aNames);
339  pValues = aValues.getConstArray();
340  OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
341  if(aValues.getLength() == aNames.getLength())
342  {
343  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
344  {
345  OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
346  if(pValues[nProp].hasValue())
347  {
348  switch(nProp)
349  {
352  break;
355  break;
358  break;
361  break;
362  case SCDISPLAYOPT_ANCHOR:
364  break;
367  break;
369  if ( pValues[nProp] >>= nIntVal )
370  {
371  //#i80528# adapt to new range eventually
372  if(sal_Int32(VOBJ_MODE_HIDE) < nIntVal) nIntVal = sal_Int32(VOBJ_MODE_SHOW);
373 
374  SetObjMode( VOBJ_TYPE_OLE, static_cast<ScVObjMode>(nIntVal));
375  }
376  break;
377  case SCDISPLAYOPT_CHART:
378  if ( pValues[nProp] >>= nIntVal )
379  {
380  //#i80528# adapt to new range eventually
381  if(sal_Int32(VOBJ_MODE_HIDE) < nIntVal) nIntVal = sal_Int32(VOBJ_MODE_SHOW);
382 
383  SetObjMode( VOBJ_TYPE_CHART, static_cast<ScVObjMode>(nIntVal));
384  }
385  break;
387  if ( pValues[nProp] >>= nIntVal )
388  {
389  //#i80528# adapt to new range eventually
390  if(sal_Int32(VOBJ_MODE_HIDE) < nIntVal) nIntVal = sal_Int32(VOBJ_MODE_SHOW);
391 
392  SetObjMode( VOBJ_TYPE_DRAW, static_cast<ScVObjMode>(nIntVal));
393  }
394  break;
395  }
396  }
397  }
398  }
399  aDisplayItem.SetCommitLink( LINK( this, ScViewCfg, DisplayCommitHdl ) );
400 
401  ScGridOptions aGrid = GetGridOptions(); //TODO: initialization necessary?
402  aNames = GetGridPropertyNames();
403  aValues = aGridItem.GetProperties(aNames);
405  pValues = aValues.getConstArray();
406  OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
407  if(aValues.getLength() == aNames.getLength())
408  {
409  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
410  {
411  OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
412  if(pValues[nProp].hasValue())
413  {
414  switch(nProp)
415  {
416  case SCGRIDOPT_RESOLU_X:
417  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDrawX( nIntVal );
418  break;
419  case SCGRIDOPT_RESOLU_Y:
420  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDrawY( nIntVal );
421  break;
422  case SCGRIDOPT_SUBDIV_X:
423  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDivisionX( nIntVal );
424  break;
425  case SCGRIDOPT_SUBDIV_Y:
426  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDivisionY( nIntVal );
427  break;
428  case SCGRIDOPT_OPTION_X:
429  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldSnapX( nIntVal );
430  break;
431  case SCGRIDOPT_OPTION_Y:
432  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldSnapY( nIntVal );
433  break;
435  aGrid.SetUseGridSnap( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
436  break;
437  case SCGRIDOPT_SYNCHRON:
438  aGrid.SetSynchronize( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
439  break;
440  case SCGRIDOPT_VISIBLE:
441  aGrid.SetGridVisible( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
442  break;
444  aGrid.SetEqualGrid( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
445  break;
446  }
447  }
448  }
449  }
450  SetGridOptions( aGrid );
451  aGridItem.SetCommitLink( LINK( this, ScViewCfg, GridCommitHdl ) );
452 }
453 
454 IMPL_LINK_NOARG(ScViewCfg, LayoutCommitHdl, ScLinkConfigItem&, void)
455 {
456  Sequence<OUString> aNames = GetLayoutPropertyNames();
457  Sequence<Any> aValues(aNames.getLength());
458  Any* pValues = aValues.getArray();
459 
460  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
461  {
462  switch(nProp)
463  {
465  pValues[nProp] <<= GetGridColor();
466  break;
468  pValues[nProp] <<= GetOption( VOPT_GRID );
469  break;
471  pValues[nProp] <<= GetOption( VOPT_GRID_ONTOP );
472  break;
474  pValues[nProp] <<= GetOption( VOPT_PAGEBREAKS );
475  break;
476  case SCLAYOUTOPT_GUIDE:
477  pValues[nProp] <<= GetOption( VOPT_HELPLINES );
478  break;
480  pValues[nProp] <<= GetOption( VOPT_HEADER );
481  break;
483  pValues[nProp] <<= GetOption( VOPT_HSCROLL );
484  break;
486  pValues[nProp] <<= GetOption( VOPT_VSCROLL );
487  break;
489  pValues[nProp] <<= GetOption( VOPT_TABCONTROLS );
490  break;
491  case SCLAYOUTOPT_OUTLINE:
492  pValues[nProp] <<= GetOption( VOPT_OUTLINER );
493  break;
494  case SCLAYOUTOPT_SUMMARY:
495  pValues[nProp] <<= GetOption( VOPT_SUMMARY );
496  break;
497  }
498  }
499  aLayoutItem.PutProperties(aNames, aValues);
500 }
501 
502 IMPL_LINK_NOARG(ScViewCfg, DisplayCommitHdl, ScLinkConfigItem&, void)
503 {
504  Sequence<OUString> aNames = GetDisplayPropertyNames();
505  Sequence<Any> aValues(aNames.getLength());
506  Any* pValues = aValues.getArray();
507 
508  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
509  {
510  switch(nProp)
511  {
513  pValues[nProp] <<= GetOption( VOPT_FORMULAS );
514  break;
516  pValues[nProp] <<= GetOption( VOPT_NULLVALS );
517  break;
519  pValues[nProp] <<= GetOption( VOPT_NOTES );
520  break;
522  pValues[nProp] <<= GetOption( VOPT_SYNTAX );
523  break;
524  case SCDISPLAYOPT_ANCHOR:
525  pValues[nProp] <<= GetOption( VOPT_ANCHOR );
526  break;
528  pValues[nProp] <<= GetOption( VOPT_CLIPMARKS );
529  break;
531  pValues[nProp] <<= static_cast<sal_Int32>(GetObjMode( VOBJ_TYPE_OLE ));
532  break;
533  case SCDISPLAYOPT_CHART:
534  pValues[nProp] <<= static_cast<sal_Int32>(GetObjMode( VOBJ_TYPE_CHART ));
535  break;
537  pValues[nProp] <<= static_cast<sal_Int32>(GetObjMode( VOBJ_TYPE_DRAW ));
538  break;
539  }
540  }
541  aDisplayItem.PutProperties(aNames, aValues);
542 }
543 
545 {
546  const ScGridOptions& rGrid = GetGridOptions();
547 
548  Sequence<OUString> aNames = GetGridPropertyNames();
549  Sequence<Any> aValues(aNames.getLength());
550  Any* pValues = aValues.getArray();
551 
552  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
553  {
554  switch(nProp)
555  {
556  case SCGRIDOPT_RESOLU_X:
557  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDrawX());
558  break;
559  case SCGRIDOPT_RESOLU_Y:
560  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDrawY());
561  break;
562  case SCGRIDOPT_SUBDIV_X:
563  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDivisionX());
564  break;
565  case SCGRIDOPT_SUBDIV_Y:
566  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDivisionY());
567  break;
568  case SCGRIDOPT_OPTION_X:
569  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldSnapX());
570  break;
571  case SCGRIDOPT_OPTION_Y:
572  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldSnapY());
573  break;
575  pValues[nProp] <<= rGrid.GetUseGridSnap();
576  break;
577  case SCGRIDOPT_SYNCHRON:
578  pValues[nProp] <<= rGrid.GetSynchronize();
579  break;
580  case SCGRIDOPT_VISIBLE:
581  pValues[nProp] <<= rGrid.GetGridVisible();
582  break;
584  pValues[nProp] <<= rGrid.GetEqualGrid();
585  break;
586  }
587  }
588  aGridItem.PutProperties(aNames, aValues);
589 }
590 
592 {
593  *static_cast<ScViewOptions*>(this) = rNew;
597 }
598 
599 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SCGRIDOPT_OPTION_X
Definition: viewopti.cxx:220
void SetOption(ScViewOption eOpt, bool bNew)
Definition: viewopti.hxx:87
sal_uInt32 GetFieldDivisionY() const
ScTpViewItem(const ScViewOptions &rOpt)
Definition: viewopti.cxx:162
void SetFieldDrawX(sal_uInt32 nSet)
#define SCDISPLAYOPT_TEXTOVER
Definition: viewopti.cxx:209
#define EMPTY_OUSTRING
Definition: global.hxx:216
ScLinkConfigItem aDisplayItem
Definition: viewopti.hxx:139
bool GetEqualGrid() const
#define SCGRIDOPT_SUBDIV_Y
Definition: viewopti.cxx:219
void SetFieldSnapY(sal_uInt32 nSet)
void SetFieldDrawY(sal_uInt32 nSet)
sal_uInt32 nFldDivisionY
bool operator==(const ScGridOptions &rOpt) const
Definition: viewopti.cxx:60
#define SCGRIDOPT_SIZETOGRID
Definition: viewopti.cxx:225
ScViewOptions theOptions
Definition: viewopti.hxx:131
sal_uInt32 GetFieldDrawX() const
ScVObjMode aModeArr[MAX_TYPE]
Definition: viewopti.hxx:106
#define CFGPATH_GRID
Definition: viewopti.cxx:214
sal_uInt32 nFldDivisionX
void SetEqualGrid(bool bSet)
IMPL_LINK_NOARG(ScViewCfg, LayoutCommitHdl, ScLinkConfigItem &, void)
Definition: viewopti.cxx:454
#define SCDISPLAYOPT_CHART
Definition: viewopti.cxx:211
void SetFieldDivisionY(sal_uInt32 nSet)
#define SCDISPLAYOPT_FORMULA
Definition: viewopti.cxx:204
#define SCGRIDOPT_SYNCHRON
Definition: viewopti.cxx:223
void SetCommitLink(const Link< ScLinkConfigItem &, void > &rLink)
Definition: optutil.cxx:47
void SetDefaults()
Definition: viewopti.cxx:35
sal_uInt32 GetFieldSnapX() const
#define SCGRIDOPT_VISIBLE
Definition: viewopti.cxx:224
#define SCDISPLAYOPT_NOTETAG
Definition: viewopti.cxx:206
void SetObjMode(ScVObjType eObj, ScVObjMode eMode)
Definition: viewopti.hxx:90
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
#define SCLAYOUTOPT_HORISCROLL
Definition: viewopti.cxx:195
#define SCLAYOUTOPT_SUMMARY
Definition: viewopti.cxx:200
static css::uno::Sequence< OUString > GetGridPropertyNames()
Definition: viewopti.cxx:255
static bool IsMetricSystem()
Definition: optutil.cxx:25
bool EnableNotification(const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
#define SCLAYOUTOPT_SHEETTAB
Definition: viewopti.cxx:197
ScViewOptions & operator=(const ScViewOptions &rCpy)
#define SCGRIDOPT_RESOLU_X
Definition: viewopti.cxx:216
#define SCLAYOUTOPT_COLROWHDR
Definition: viewopti.cxx:194
#define SC_STD_GRIDCOLOR
Definition: viewopti.hxx:61
#define SCDISPLAYOPT_ZEROVALUE
Definition: viewopti.cxx:205
sal_uInt32 GetFieldSnapY() const
sal_uInt32 nFldSnapY
void SetGridVisible(bool bSet)
Color aGridCol
Definition: viewopti.hxx:107
bool GetUseGridSnap() const
int i
#define SCLAYOUTOPT_GRIDLINES
Definition: viewopti.cxx:190
void SetOptions(const ScViewOptions &rNew)
Definition: viewopti.cxx:591
virtual ScTpViewItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: viewopti.cxx:181
#define SCGRIDOPT_OPTION_Y
Definition: viewopti.cxx:221
sal_uInt32 GetFieldDivisionX() const
sal_uInt32 nFldDrawX
void SetGridOptions(const ScGridOptions &rNew)
Definition: viewopti.hxx:97
void SetFieldDivisionX(sal_uInt32 nSet)
#define SCLAYOUTOPT_PAGEBREAK
Definition: viewopti.cxx:192
const ScGridOptions & GetGridOptions() const
Definition: viewopti.hxx:96
std::unique_ptr< SvxGridItem > CreateGridItem() const
Definition: viewopti.cxx:142
#define SCDISPLAYOPT_ANCHOR
Definition: viewopti.cxx:208
ScGridOptions aGridOpt
Definition: viewopti.hxx:109
bool operator==(const ScViewOptions &rOpt) const
Definition: viewopti.cxx:127
virtual bool operator==(const SfxPoolItem &) const override
Definition: viewopti.cxx:172
bool GetSynchronize() const
#define SCLAYOUTOPT_GRID_ONCOLOR
Definition: viewopti.cxx:199
ScLinkConfigItem aGridItem
Definition: viewopti.hxx:140
#define SCGRIDOPT_RESOLU_Y
Definition: viewopti.cxx:217
#define SCLAYOUTOPT_OUTLINE
Definition: viewopti.cxx:198
#define MAX_OPT
Definition: viewopti.hxx:58
static css::uno::Sequence< OUString > GetLayoutPropertyNames()
Definition: viewopti.cxx:227
#define SCLAYOUTOPT_VERTSCROLL
Definition: viewopti.cxx:196
void SetDefaults()
Definition: viewopti.cxx:89
#define CFGPATH_DISPLAY
Definition: viewopti.cxx:202
const PropertyValue * pValues
#define SCLAYOUTOPT_GRIDCOLOR
Definition: viewopti.cxx:191
void SetSynchronize(bool bSet)
virtual ~ScTpViewItem() override
Definition: viewopti.cxx:168
#define SCGRIDOPT_SUBDIV_X
Definition: viewopti.cxx:218
bool aOptArr[MAX_OPT]
Definition: viewopti.hxx:105
void SetUseGridSnap(bool bSet)
sal_uInt32 nFldSnapX
OUString aGridColName
Definition: viewopti.hxx:108
sal_uInt32 nFldDrawY
sal_uInt32 GetFieldDrawY() const
Color const & GetGridColor(OUString *pStrName=nullptr) const
Definition: viewopti.cxx:117
static css::uno::Sequence< OUString > GetDisplayPropertyNames()
Definition: viewopti.cxx:242
#define CFGPATH_LAYOUT
Definition: viewopti.cxx:188
void SetFieldSnapX(sal_uInt32 nSet)
#define SCGRIDOPT_SNAPTOGRID
Definition: viewopti.cxx:222
void SetGridColor(const Color &rCol, const OUString &rName)
Definition: viewopti.hxx:93
static bool GetBoolFromAny(const css::uno::Any &aAny)
Definition: miscuno.cxx:138
bool GetGridVisible() const
#define SCLAYOUTOPT_GUIDE
Definition: viewopti.cxx:193
css::uno::Sequence< css::uno::Any > GetProperties(const css::uno::Sequence< OUString > &rNames)
Definition: optutil.hxx:52
#define MAX_TYPE
Definition: viewopti.hxx:59
#define SCDISPLAYOPT_DRAWING
Definition: viewopti.cxx:212
#define SCDISPLAYOPT_VALUEHI
Definition: viewopti.cxx:207
#define SCDISPLAYOPT_OBJECTGRA
Definition: viewopti.cxx:210
ScLinkConfigItem aLayoutItem
Definition: viewopti.hxx:138