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  {
298  Color aColor;
299  if ( pValues[nProp] >>= aColor )
300  SetGridColor( aColor, EMPTY_OUSTRING );
301  break;
302  }
305  break;
308  break;
311  break;
312  case SCLAYOUTOPT_GUIDE:
314  break;
317  break;
320  break;
323  break;
326  break;
327  case SCLAYOUTOPT_OUTLINE:
329  break;
330  case SCLAYOUTOPT_SUMMARY:
332  break;
333  }
334  }
335  }
336  }
337  aLayoutItem.SetCommitLink( LINK( this, ScViewCfg, LayoutCommitHdl ) );
338 
339  aNames = GetDisplayPropertyNames();
340  aValues = aDisplayItem.GetProperties(aNames);
342  pValues = aValues.getConstArray();
343  OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
344  if(aValues.getLength() == aNames.getLength())
345  {
346  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
347  {
348  OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
349  if(pValues[nProp].hasValue())
350  {
351  switch(nProp)
352  {
355  break;
358  break;
361  break;
364  break;
365  case SCDISPLAYOPT_ANCHOR:
367  break;
370  break;
372  if ( pValues[nProp] >>= nIntVal )
373  {
374  //#i80528# adapt to new range eventually
375  if(sal_Int32(VOBJ_MODE_HIDE) < nIntVal) nIntVal = sal_Int32(VOBJ_MODE_SHOW);
376 
377  SetObjMode( VOBJ_TYPE_OLE, static_cast<ScVObjMode>(nIntVal));
378  }
379  break;
380  case SCDISPLAYOPT_CHART:
381  if ( pValues[nProp] >>= nIntVal )
382  {
383  //#i80528# adapt to new range eventually
384  if(sal_Int32(VOBJ_MODE_HIDE) < nIntVal) nIntVal = sal_Int32(VOBJ_MODE_SHOW);
385 
386  SetObjMode( VOBJ_TYPE_CHART, static_cast<ScVObjMode>(nIntVal));
387  }
388  break;
390  if ( pValues[nProp] >>= nIntVal )
391  {
392  //#i80528# adapt to new range eventually
393  if(sal_Int32(VOBJ_MODE_HIDE) < nIntVal) nIntVal = sal_Int32(VOBJ_MODE_SHOW);
394 
395  SetObjMode( VOBJ_TYPE_DRAW, static_cast<ScVObjMode>(nIntVal));
396  }
397  break;
398  }
399  }
400  }
401  }
402  aDisplayItem.SetCommitLink( LINK( this, ScViewCfg, DisplayCommitHdl ) );
403 
404  ScGridOptions aGrid = GetGridOptions(); //TODO: initialization necessary?
405  aNames = GetGridPropertyNames();
406  aValues = aGridItem.GetProperties(aNames);
408  pValues = aValues.getConstArray();
409  OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
410  if(aValues.getLength() == aNames.getLength())
411  {
412  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
413  {
414  OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
415  if(pValues[nProp].hasValue())
416  {
417  switch(nProp)
418  {
419  case SCGRIDOPT_RESOLU_X:
420  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDrawX( nIntVal );
421  break;
422  case SCGRIDOPT_RESOLU_Y:
423  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDrawY( nIntVal );
424  break;
425  case SCGRIDOPT_SUBDIV_X:
426  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDivisionX( nIntVal );
427  break;
428  case SCGRIDOPT_SUBDIV_Y:
429  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDivisionY( nIntVal );
430  break;
431  case SCGRIDOPT_OPTION_X:
432  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldSnapX( nIntVal );
433  break;
434  case SCGRIDOPT_OPTION_Y:
435  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldSnapY( nIntVal );
436  break;
438  aGrid.SetUseGridSnap( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
439  break;
440  case SCGRIDOPT_SYNCHRON:
441  aGrid.SetSynchronize( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
442  break;
443  case SCGRIDOPT_VISIBLE:
444  aGrid.SetGridVisible( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
445  break;
447  aGrid.SetEqualGrid( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
448  break;
449  }
450  }
451  }
452  }
453  SetGridOptions( aGrid );
454  aGridItem.SetCommitLink( LINK( this, ScViewCfg, GridCommitHdl ) );
455 }
456 
457 IMPL_LINK_NOARG(ScViewCfg, LayoutCommitHdl, ScLinkConfigItem&, void)
458 {
459  Sequence<OUString> aNames = GetLayoutPropertyNames();
460  Sequence<Any> aValues(aNames.getLength());
461  Any* pValues = aValues.getArray();
462 
463  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
464  {
465  switch(nProp)
466  {
468  pValues[nProp] <<= GetGridColor();
469  break;
471  pValues[nProp] <<= GetOption( VOPT_GRID );
472  break;
474  pValues[nProp] <<= GetOption( VOPT_GRID_ONTOP );
475  break;
477  pValues[nProp] <<= GetOption( VOPT_PAGEBREAKS );
478  break;
479  case SCLAYOUTOPT_GUIDE:
480  pValues[nProp] <<= GetOption( VOPT_HELPLINES );
481  break;
483  pValues[nProp] <<= GetOption( VOPT_HEADER );
484  break;
486  pValues[nProp] <<= GetOption( VOPT_HSCROLL );
487  break;
489  pValues[nProp] <<= GetOption( VOPT_VSCROLL );
490  break;
492  pValues[nProp] <<= GetOption( VOPT_TABCONTROLS );
493  break;
494  case SCLAYOUTOPT_OUTLINE:
495  pValues[nProp] <<= GetOption( VOPT_OUTLINER );
496  break;
497  case SCLAYOUTOPT_SUMMARY:
498  pValues[nProp] <<= GetOption( VOPT_SUMMARY );
499  break;
500  }
501  }
502  aLayoutItem.PutProperties(aNames, aValues);
503 }
504 
505 IMPL_LINK_NOARG(ScViewCfg, DisplayCommitHdl, ScLinkConfigItem&, void)
506 {
507  Sequence<OUString> aNames = GetDisplayPropertyNames();
508  Sequence<Any> aValues(aNames.getLength());
509  Any* pValues = aValues.getArray();
510 
511  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
512  {
513  switch(nProp)
514  {
516  pValues[nProp] <<= GetOption( VOPT_FORMULAS );
517  break;
519  pValues[nProp] <<= GetOption( VOPT_NULLVALS );
520  break;
522  pValues[nProp] <<= GetOption( VOPT_NOTES );
523  break;
525  pValues[nProp] <<= GetOption( VOPT_SYNTAX );
526  break;
527  case SCDISPLAYOPT_ANCHOR:
528  pValues[nProp] <<= GetOption( VOPT_ANCHOR );
529  break;
531  pValues[nProp] <<= GetOption( VOPT_CLIPMARKS );
532  break;
534  pValues[nProp] <<= static_cast<sal_Int32>(GetObjMode( VOBJ_TYPE_OLE ));
535  break;
536  case SCDISPLAYOPT_CHART:
537  pValues[nProp] <<= static_cast<sal_Int32>(GetObjMode( VOBJ_TYPE_CHART ));
538  break;
540  pValues[nProp] <<= static_cast<sal_Int32>(GetObjMode( VOBJ_TYPE_DRAW ));
541  break;
542  }
543  }
544  aDisplayItem.PutProperties(aNames, aValues);
545 }
546 
548 {
549  const ScGridOptions& rGrid = GetGridOptions();
550 
551  Sequence<OUString> aNames = GetGridPropertyNames();
552  Sequence<Any> aValues(aNames.getLength());
553  Any* pValues = aValues.getArray();
554 
555  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
556  {
557  switch(nProp)
558  {
559  case SCGRIDOPT_RESOLU_X:
560  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDrawX());
561  break;
562  case SCGRIDOPT_RESOLU_Y:
563  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDrawY());
564  break;
565  case SCGRIDOPT_SUBDIV_X:
566  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDivisionX());
567  break;
568  case SCGRIDOPT_SUBDIV_Y:
569  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDivisionY());
570  break;
571  case SCGRIDOPT_OPTION_X:
572  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldSnapX());
573  break;
574  case SCGRIDOPT_OPTION_Y:
575  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldSnapY());
576  break;
578  pValues[nProp] <<= rGrid.GetUseGridSnap();
579  break;
580  case SCGRIDOPT_SYNCHRON:
581  pValues[nProp] <<= rGrid.GetSynchronize();
582  break;
583  case SCGRIDOPT_VISIBLE:
584  pValues[nProp] <<= rGrid.GetGridVisible();
585  break;
587  pValues[nProp] <<= rGrid.GetEqualGrid();
588  break;
589  }
590  }
591  aGridItem.PutProperties(aNames, aValues);
592 }
593 
595 {
596  *static_cast<ScViewOptions*>(this) = rNew;
600 }
601 
602 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SCGRIDOPT_OPTION_X
Definition: viewopti.cxx:220
void SetOption(ScViewOption eOpt, bool bNew)
Definition: viewopti.hxx:86
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:213
ScLinkConfigItem aDisplayItem
Definition: viewopti.hxx:138
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:130
sal_uInt32 GetFieldDrawX() const
ScVObjMode aModeArr[MAX_TYPE]
Definition: viewopti.hxx:105
#define CFGPATH_GRID
Definition: viewopti.cxx:214
sal_uInt32 nFldDivisionX
void SetEqualGrid(bool bSet)
IMPL_LINK_NOARG(ScViewCfg, LayoutCommitHdl, ScLinkConfigItem &, void)
Definition: viewopti.cxx:457
#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:89
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:60
#define SCDISPLAYOPT_ZEROVALUE
Definition: viewopti.cxx:205
sal_uInt32 GetFieldSnapY() const
sal_uInt32 nFldSnapY
void SetGridVisible(bool bSet)
Color aGridCol
Definition: viewopti.hxx:106
bool GetUseGridSnap() const
int i
#define SCLAYOUTOPT_GRIDLINES
Definition: viewopti.cxx:190
void SetOptions(const ScViewOptions &rNew)
Definition: viewopti.cxx:594
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:96
void SetFieldDivisionX(sal_uInt32 nSet)
#define SCLAYOUTOPT_PAGEBREAK
Definition: viewopti.cxx:192
const ScGridOptions & GetGridOptions() const
Definition: viewopti.hxx:95
std::unique_ptr< SvxGridItem > CreateGridItem() const
Definition: viewopti.cxx:142
#define SCDISPLAYOPT_ANCHOR
Definition: viewopti.cxx:208
ScGridOptions aGridOpt
Definition: viewopti.hxx:108
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:139
#define SCGRIDOPT_RESOLU_Y
Definition: viewopti.cxx:217
#define SCLAYOUTOPT_OUTLINE
Definition: viewopti.cxx:198
#define MAX_OPT
Definition: viewopti.hxx:57
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:104
void SetUseGridSnap(bool bSet)
sal_uInt32 nFldSnapX
OUString aGridColName
Definition: viewopti.hxx:107
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:92
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:51
#define MAX_TYPE
Definition: viewopti.hxx:58
#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:137