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  aOptArr[ VOPT_THEMEDCURSOR ] = false;
108 
109  aModeArr[VOBJ_TYPE_OLE ] = VOBJ_MODE_SHOW;
110  aModeArr[VOBJ_TYPE_CHART] = VOBJ_MODE_SHOW;
111  aModeArr[VOBJ_TYPE_DRAW ] = VOBJ_MODE_SHOW;
112 
113  aGridCol = SC_STD_GRIDCOLOR;
114 
115  aGridOpt.SetDefaults();
116 }
117 
118 Color const & ScViewOptions::GetGridColor( OUString* pStrName ) const
119 {
120  if ( pStrName )
121  *pStrName = aGridColName;
122 
123  return aGridCol;
124 }
125 
127 
128 bool ScViewOptions::operator==( const ScViewOptions& rOpt ) const
129 {
130  bool bEqual = true;
131  sal_uInt16 i;
132 
133  for ( i=0; i<MAX_OPT && bEqual; i++ ) bEqual = (aOptArr [i] == rOpt.aOptArr[i]);
134  for ( i=0; i<MAX_TYPE && bEqual; i++ ) bEqual = (aModeArr[i] == rOpt.aModeArr[i]);
135 
136  bEqual = bEqual && (aGridCol == rOpt.aGridCol);
137  bEqual = bEqual && (aGridColName == rOpt.aGridColName);
138  bEqual = bEqual && (aGridOpt == rOpt.aGridOpt);
139 
140  return bEqual;
141 }
142 
143 std::unique_ptr<SvxGridItem> ScViewOptions::CreateGridItem() const
144 {
145  std::unique_ptr<SvxGridItem> pItem(new SvxGridItem( SID_ATTR_GRID_OPTIONS ));
146 
147  pItem->SetFieldDrawX ( aGridOpt.GetFieldDrawX() );
148  pItem->SetFieldDivisionX ( aGridOpt.GetFieldDivisionX() );
149  pItem->SetFieldDrawY ( aGridOpt.GetFieldDrawY() );
150  pItem->SetFieldDivisionY ( aGridOpt.GetFieldDivisionY() );
151  pItem->SetFieldSnapX ( aGridOpt.GetFieldSnapX() );
152  pItem->SetFieldSnapY ( aGridOpt.GetFieldSnapY() );
153  pItem->SetUseGridSnap ( aGridOpt.GetUseGridSnap() );
154  pItem->SetSynchronize ( aGridOpt.GetSynchronize() );
155  pItem->SetGridVisible ( aGridOpt.GetGridVisible() );
156  pItem->SetEqualGrid ( aGridOpt.GetEqualGrid() );
157 
158  return pItem;
159 }
160 
161 // ScTpViewItem - data for the ViewOptions TabPage
162 
164  : SfxPoolItem ( SID_SCVIEWOPTIONS ),
165  theOptions ( rOpt )
166 {
167 }
168 
170 {
171 }
172 
173 bool ScTpViewItem::operator==( const SfxPoolItem& rItem ) const
174 {
175  assert(SfxPoolItem::operator==(rItem));
176 
177  const ScTpViewItem& rPItem = static_cast<const ScTpViewItem&>(rItem);
178 
179  return ( theOptions == rPItem.theOptions );
180 }
181 
183 {
184  return new ScTpViewItem( *this );
185 }
186 
187 // Config Item containing view options
188 
189 constexpr OUStringLiteral CFGPATH_LAYOUT = u"Office.Calc/Layout";
190 
191 #define SCLAYOUTOPT_GRIDLINES 0
192 #define SCLAYOUTOPT_GRIDCOLOR 1
193 #define SCLAYOUTOPT_PAGEBREAK 2
194 #define SCLAYOUTOPT_GUIDE 3
195 #define SCLAYOUTOPT_COLROWHDR 4
196 #define SCLAYOUTOPT_HORISCROLL 5
197 #define SCLAYOUTOPT_VERTSCROLL 6
198 #define SCLAYOUTOPT_SHEETTAB 7
199 #define SCLAYOUTOPT_OUTLINE 8
200 #define SCLAYOUTOPT_GRID_ONCOLOR 9
201 #define SCLAYOUTOPT_SUMMARY 10
202 #define SCLAYOUTOPT_THEMEDCURSOR 11
203 
204 constexpr OUStringLiteral CFGPATH_DISPLAY = u"Office.Calc/Content/Display";
205 
206 #define SCDISPLAYOPT_FORMULA 0
207 #define SCDISPLAYOPT_ZEROVALUE 1
208 #define SCDISPLAYOPT_NOTETAG 2
209 #define SCDISPLAYOPT_VALUEHI 3
210 #define SCDISPLAYOPT_ANCHOR 4
211 #define SCDISPLAYOPT_TEXTOVER 5
212 #define SCDISPLAYOPT_OBJECTGRA 6
213 #define SCDISPLAYOPT_CHART 7
214 #define SCDISPLAYOPT_DRAWING 8
215 
216 constexpr OUStringLiteral CFGPATH_GRID = u"Office.Calc/Grid";
217 
218 #define SCGRIDOPT_RESOLU_X 0
219 #define SCGRIDOPT_RESOLU_Y 1
220 #define SCGRIDOPT_SUBDIV_X 2
221 #define SCGRIDOPT_SUBDIV_Y 3
222 #define SCGRIDOPT_OPTION_X 4
223 #define SCGRIDOPT_OPTION_Y 5
224 #define SCGRIDOPT_SNAPTOGRID 6
225 #define SCGRIDOPT_SYNCHRON 7
226 #define SCGRIDOPT_VISIBLE 8
227 #define SCGRIDOPT_SIZETOGRID 9
228 
230 {
231  return {"Line/GridLine", // SCLAYOUTOPT_GRIDLINES
232  "Line/GridLineColor", // SCLAYOUTOPT_GRIDCOLOR
233  "Line/PageBreak", // SCLAYOUTOPT_PAGEBREAK
234  "Line/Guide", // SCLAYOUTOPT_GUIDE
235  "Window/ColumnRowHeader", // SCLAYOUTOPT_COLROWHDR
236  "Window/HorizontalScroll", // SCLAYOUTOPT_HORISCROLL
237  "Window/VerticalScroll", // SCLAYOUTOPT_VERTSCROLL
238  "Window/SheetTab", // SCLAYOUTOPT_SHEETTAB
239  "Window/OutlineSymbol", // SCLAYOUTOPT_OUTLINE
240  "Line/GridOnColoredCells", // SCLAYOUTOPT_GRID_ONCOLOR;
241  "Window/SearchSummary", // SCLAYOUTOPT_SUMMARY
242  "Window/ThemedCursor"}; // SCLAYOUTOPT_THEMEDCURSOR
243 }
244 
246 {
247  return {"Formula", // SCDISPLAYOPT_FORMULA
248  "ZeroValue", // SCDISPLAYOPT_ZEROVALUE
249  "NoteTag", // SCDISPLAYOPT_NOTETAG
250  "ValueHighlighting", // SCDISPLAYOPT_VALUEHI
251  "Anchor", // SCDISPLAYOPT_ANCHOR
252  "TextOverflow", // SCDISPLAYOPT_TEXTOVER
253  "ObjectGraphic", // SCDISPLAYOPT_OBJECTGRA
254  "Chart", // SCDISPLAYOPT_CHART
255  "DrawingObject"}; // SCDISPLAYOPT_DRAWING;
256 }
257 
259 {
260  const bool bIsMetric = ScOptionsUtil::IsMetricSystem();
261 
262  return {(bIsMetric ? OUString("Resolution/XAxis/Metric")
263  : OUString("Resolution/XAxis/NonMetric")), // SCGRIDOPT_RESOLU_X
264  (bIsMetric ? OUString("Resolution/YAxis/Metric")
265  : OUString("Resolution/YAxis/NonMetric")), // SCGRIDOPT_RESOLU_Y
266  "Subdivision/XAxis", // SCGRIDOPT_SUBDIV_X
267  "Subdivision/YAxis", // SCGRIDOPT_SUBDIV_Y
268  (bIsMetric ? OUString("Option/XAxis/Metric")
269  : OUString("Option/XAxis/NonMetric")), // SCGRIDOPT_OPTION_X
270  (bIsMetric ? OUString("Option/YAxis/Metric")
271  : OUString("Option/YAxis/NonMetric")), // SCGRIDOPT_OPTION_Y
272  "Option/SnapToGrid", // SCGRIDOPT_SNAPTOGRID
273  "Option/Synchronize", // SCGRIDOPT_SYNCHRON
274  "Option/VisibleGrid", // SCGRIDOPT_VISIBLE
275  "Option/SizeToGrid"}; // SCGRIDOPT_SIZETOGRID;
276 }
277 
282 {
283  sal_Int32 nIntVal = 0;
284 
286  Sequence<Any> aValues = aLayoutItem.GetProperties(aNames);
288  const Any* pValues = aValues.getConstArray();
289  OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
290  if(aValues.getLength() == aNames.getLength())
291  {
292  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
293  {
294  OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
295  if(pValues[nProp].hasValue())
296  {
297  switch(nProp)
298  {
300  {
301  Color aColor;
302  if ( pValues[nProp] >>= aColor )
303  SetGridColor( aColor, EMPTY_OUSTRING );
304  break;
305  }
308  break;
311  break;
314  break;
315  case SCLAYOUTOPT_GUIDE:
317  break;
320  break;
323  break;
326  break;
329  break;
330  case SCLAYOUTOPT_OUTLINE:
332  break;
333  case SCLAYOUTOPT_SUMMARY:
335  break;
338  break;
339  }
340  }
341  }
342  }
343  aLayoutItem.SetCommitLink( LINK( this, ScViewCfg, LayoutCommitHdl ) );
344 
345  aNames = GetDisplayPropertyNames();
346  aValues = aDisplayItem.GetProperties(aNames);
348  pValues = aValues.getConstArray();
349  OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
350  if(aValues.getLength() == aNames.getLength())
351  {
352  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
353  {
354  OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
355  if(pValues[nProp].hasValue())
356  {
357  switch(nProp)
358  {
361  break;
364  break;
367  break;
370  break;
371  case SCDISPLAYOPT_ANCHOR:
373  break;
376  break;
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_OLE, static_cast<ScVObjMode>(nIntVal));
384  }
385  break;
386  case SCDISPLAYOPT_CHART:
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_CHART, static_cast<ScVObjMode>(nIntVal));
393  }
394  break;
396  if ( pValues[nProp] >>= nIntVal )
397  {
398  //#i80528# adapt to new range eventually
399  if(sal_Int32(VOBJ_MODE_HIDE) < nIntVal) nIntVal = sal_Int32(VOBJ_MODE_SHOW);
400 
401  SetObjMode( VOBJ_TYPE_DRAW, static_cast<ScVObjMode>(nIntVal));
402  }
403  break;
404  }
405  }
406  }
407  }
408  aDisplayItem.SetCommitLink( LINK( this, ScViewCfg, DisplayCommitHdl ) );
409 
410  ScGridOptions aGrid = GetGridOptions(); //TODO: initialization necessary?
411  aNames = GetGridPropertyNames();
412  aValues = aGridItem.GetProperties(aNames);
414  pValues = aValues.getConstArray();
415  OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
416  if(aValues.getLength() == aNames.getLength())
417  {
418  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
419  {
420  OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
421  if(pValues[nProp].hasValue())
422  {
423  switch(nProp)
424  {
425  case SCGRIDOPT_RESOLU_X:
426  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDrawX( nIntVal );
427  break;
428  case SCGRIDOPT_RESOLU_Y:
429  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDrawY( nIntVal );
430  break;
431  case SCGRIDOPT_SUBDIV_X:
432  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDivisionX( nIntVal );
433  break;
434  case SCGRIDOPT_SUBDIV_Y:
435  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDivisionY( nIntVal );
436  break;
437  case SCGRIDOPT_OPTION_X:
438  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldSnapX( nIntVal );
439  break;
440  case SCGRIDOPT_OPTION_Y:
441  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldSnapY( nIntVal );
442  break;
444  aGrid.SetUseGridSnap( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
445  break;
446  case SCGRIDOPT_SYNCHRON:
447  aGrid.SetSynchronize( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
448  break;
449  case SCGRIDOPT_VISIBLE:
450  aGrid.SetGridVisible( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
451  break;
453  aGrid.SetEqualGrid( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
454  break;
455  }
456  }
457  }
458  }
459  SetGridOptions( aGrid );
460  aGridItem.SetCommitLink( LINK( this, ScViewCfg, GridCommitHdl ) );
461 }
462 
463 IMPL_LINK_NOARG(ScViewCfg, LayoutCommitHdl, ScLinkConfigItem&, void)
464 {
465  Sequence<OUString> aNames = GetLayoutPropertyNames();
466  Sequence<Any> aValues(aNames.getLength());
467  Any* pValues = aValues.getArray();
468 
469  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
470  {
471  switch(nProp)
472  {
474  pValues[nProp] <<= GetGridColor();
475  break;
477  pValues[nProp] <<= GetOption( VOPT_GRID );
478  break;
480  pValues[nProp] <<= GetOption( VOPT_GRID_ONTOP );
481  break;
483  pValues[nProp] <<= GetOption( VOPT_PAGEBREAKS );
484  break;
485  case SCLAYOUTOPT_GUIDE:
486  pValues[nProp] <<= GetOption( VOPT_HELPLINES );
487  break;
489  pValues[nProp] <<= GetOption( VOPT_HEADER );
490  break;
492  pValues[nProp] <<= GetOption( VOPT_HSCROLL );
493  break;
495  pValues[nProp] <<= GetOption( VOPT_VSCROLL );
496  break;
498  pValues[nProp] <<= GetOption( VOPT_TABCONTROLS );
499  break;
500  case SCLAYOUTOPT_OUTLINE:
501  pValues[nProp] <<= GetOption( VOPT_OUTLINER );
502  break;
503  case SCLAYOUTOPT_SUMMARY:
504  pValues[nProp] <<= GetOption( VOPT_SUMMARY );
505  break;
507  pValues[nProp] <<= GetOption( VOPT_THEMEDCURSOR );
508  break;
509  }
510  }
511  aLayoutItem.PutProperties(aNames, aValues);
512 }
513 
514 IMPL_LINK_NOARG(ScViewCfg, DisplayCommitHdl, ScLinkConfigItem&, void)
515 {
516  Sequence<OUString> aNames = GetDisplayPropertyNames();
517  Sequence<Any> aValues(aNames.getLength());
518  Any* pValues = aValues.getArray();
519 
520  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
521  {
522  switch(nProp)
523  {
525  pValues[nProp] <<= GetOption( VOPT_FORMULAS );
526  break;
528  pValues[nProp] <<= GetOption( VOPT_NULLVALS );
529  break;
531  pValues[nProp] <<= GetOption( VOPT_NOTES );
532  break;
534  pValues[nProp] <<= GetOption( VOPT_SYNTAX );
535  break;
536  case SCDISPLAYOPT_ANCHOR:
537  pValues[nProp] <<= GetOption( VOPT_ANCHOR );
538  break;
540  pValues[nProp] <<= GetOption( VOPT_CLIPMARKS );
541  break;
543  pValues[nProp] <<= static_cast<sal_Int32>(GetObjMode( VOBJ_TYPE_OLE ));
544  break;
545  case SCDISPLAYOPT_CHART:
546  pValues[nProp] <<= static_cast<sal_Int32>(GetObjMode( VOBJ_TYPE_CHART ));
547  break;
549  pValues[nProp] <<= static_cast<sal_Int32>(GetObjMode( VOBJ_TYPE_DRAW ));
550  break;
551  }
552  }
553  aDisplayItem.PutProperties(aNames, aValues);
554 }
555 
557 {
558  const ScGridOptions& rGrid = GetGridOptions();
559 
560  Sequence<OUString> aNames = GetGridPropertyNames();
561  Sequence<Any> aValues(aNames.getLength());
562  Any* pValues = aValues.getArray();
563 
564  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
565  {
566  switch(nProp)
567  {
568  case SCGRIDOPT_RESOLU_X:
569  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDrawX());
570  break;
571  case SCGRIDOPT_RESOLU_Y:
572  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDrawY());
573  break;
574  case SCGRIDOPT_SUBDIV_X:
575  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDivisionX());
576  break;
577  case SCGRIDOPT_SUBDIV_Y:
578  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDivisionY());
579  break;
580  case SCGRIDOPT_OPTION_X:
581  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldSnapX());
582  break;
583  case SCGRIDOPT_OPTION_Y:
584  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldSnapY());
585  break;
587  pValues[nProp] <<= rGrid.GetUseGridSnap();
588  break;
589  case SCGRIDOPT_SYNCHRON:
590  pValues[nProp] <<= rGrid.GetSynchronize();
591  break;
592  case SCGRIDOPT_VISIBLE:
593  pValues[nProp] <<= rGrid.GetGridVisible();
594  break;
596  pValues[nProp] <<= rGrid.GetEqualGrid();
597  break;
598  }
599  }
600  aGridItem.PutProperties(aNames, aValues);
601 }
602 
604 {
605  *static_cast<ScViewOptions*>(this) = rNew;
609 }
610 
611 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr OUStringLiteral CFGPATH_GRID
Definition: viewopti.cxx:216
#define SCGRIDOPT_OPTION_X
Definition: viewopti.cxx:222
void SetOption(ScViewOption eOpt, bool bNew)
Definition: viewopti.hxx:87
sal_uInt32 GetFieldDivisionY() const
ScTpViewItem(const ScViewOptions &rOpt)
Definition: viewopti.cxx:163
void SetFieldDrawX(sal_uInt32 nSet)
#define SCDISPLAYOPT_TEXTOVER
Definition: viewopti.cxx:211
#define EMPTY_OUSTRING
Definition: global.hxx:214
ScLinkConfigItem aDisplayItem
Definition: viewopti.hxx:139
#define SCLAYOUTOPT_THEMEDCURSOR
Definition: viewopti.cxx:202
bool GetEqualGrid() const
#define SCGRIDOPT_SUBDIV_Y
Definition: viewopti.cxx:221
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:227
ScViewOptions theOptions
Definition: viewopti.hxx:131
sal_uInt32 GetFieldDrawX() const
ScVObjMode aModeArr[MAX_TYPE]
Definition: viewopti.hxx:106
sal_uInt32 nFldDivisionX
void SetEqualGrid(bool bSet)
IMPL_LINK_NOARG(ScViewCfg, LayoutCommitHdl, ScLinkConfigItem &, void)
Definition: viewopti.cxx:463
#define SCDISPLAYOPT_CHART
Definition: viewopti.cxx:213
void SetFieldDivisionY(sal_uInt32 nSet)
#define SCDISPLAYOPT_FORMULA
Definition: viewopti.cxx:206
#define SCGRIDOPT_SYNCHRON
Definition: viewopti.cxx:225
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:226
#define SCDISPLAYOPT_NOTETAG
Definition: viewopti.cxx:208
void SetObjMode(ScVObjType eObj, ScVObjMode eMode)
Definition: viewopti.hxx:90
#define SCLAYOUTOPT_HORISCROLL
Definition: viewopti.cxx:196
#define SCLAYOUTOPT_SUMMARY
Definition: viewopti.cxx:201
static css::uno::Sequence< OUString > GetGridPropertyNames()
Definition: viewopti.cxx:258
static bool IsMetricSystem()
Definition: optutil.cxx:25
bool EnableNotification(const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
#define SCLAYOUTOPT_SHEETTAB
Definition: viewopti.cxx:198
ScViewOptions & operator=(const ScViewOptions &rCpy)
#define SCGRIDOPT_RESOLU_X
Definition: viewopti.cxx:218
#define SCLAYOUTOPT_COLROWHDR
Definition: viewopti.cxx:195
#define SC_STD_GRIDCOLOR
Definition: viewopti.hxx:61
#define SCDISPLAYOPT_ZEROVALUE
Definition: viewopti.cxx:207
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:191
void SetOptions(const ScViewOptions &rNew)
Definition: viewopti.cxx:603
virtual ScTpViewItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: viewopti.cxx:182
#define SCGRIDOPT_OPTION_Y
Definition: viewopti.cxx:223
sal_uInt32 GetFieldDivisionX() const
float u
sal_uInt32 nFldDrawX
void SetGridOptions(const ScGridOptions &rNew)
Definition: viewopti.hxx:97
void SetFieldDivisionX(sal_uInt32 nSet)
#define SCLAYOUTOPT_PAGEBREAK
Definition: viewopti.cxx:193
const ScGridOptions & GetGridOptions() const
Definition: viewopti.hxx:96
std::unique_ptr< SvxGridItem > CreateGridItem() const
Definition: viewopti.cxx:143
#define SCDISPLAYOPT_ANCHOR
Definition: viewopti.cxx:210
ScGridOptions aGridOpt
Definition: viewopti.hxx:109
bool operator==(const ScViewOptions &rOpt) const
Definition: viewopti.cxx:128
virtual bool operator==(const SfxPoolItem &) const override
Definition: viewopti.cxx:173
bool GetSynchronize() const
#define SCLAYOUTOPT_GRID_ONCOLOR
Definition: viewopti.cxx:200
ScLinkConfigItem aGridItem
Definition: viewopti.hxx:140
#define SCGRIDOPT_RESOLU_Y
Definition: viewopti.cxx:219
#define SCLAYOUTOPT_OUTLINE
Definition: viewopti.cxx:199
#define MAX_OPT
Definition: viewopti.hxx:58
static css::uno::Sequence< OUString > GetLayoutPropertyNames()
Definition: viewopti.cxx:229
#define SCLAYOUTOPT_VERTSCROLL
Definition: viewopti.cxx:197
void SetDefaults()
Definition: viewopti.cxx:89
const PropertyValue * pValues
constexpr OUStringLiteral CFGPATH_LAYOUT
Definition: viewopti.cxx:189
#define SCLAYOUTOPT_GRIDCOLOR
Definition: viewopti.cxx:192
void SetSynchronize(bool bSet)
virtual ~ScTpViewItem() override
Definition: viewopti.cxx:169
#define SCGRIDOPT_SUBDIV_X
Definition: viewopti.cxx:220
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:118
static css::uno::Sequence< OUString > GetDisplayPropertyNames()
Definition: viewopti.cxx:245
void SetFieldSnapX(sal_uInt32 nSet)
#define SCGRIDOPT_SNAPTOGRID
Definition: viewopti.cxx:224
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:194
css::uno::Sequence< css::uno::Any > GetProperties(const css::uno::Sequence< OUString > &rNames)
Definition: optutil.hxx:51
#define MAX_TYPE
Definition: viewopti.hxx:59
#define SCDISPLAYOPT_DRAWING
Definition: viewopti.cxx:214
#define SCDISPLAYOPT_VALUEHI
Definition: viewopti.cxx:209
constexpr OUStringLiteral CFGPATH_DISPLAY
Definition: viewopti.cxx:204
#define SCDISPLAYOPT_OBJECTGRA
Definition: viewopti.cxx:212
ScLinkConfigItem aLayoutItem
Definition: viewopti.hxx:138