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 <vcl/svapp.hxx>
21 #include <osl/diagnose.h>
22 
23 #include <com/sun/star/uno/Any.hxx>
24 #include <com/sun/star/uno/Sequence.hxx>
25 
26 #include <global.hxx>
27 #include <globstr.hrc>
28 #include <scresid.hxx>
29 #include <viewopti.hxx>
30 #include <rechead.hxx>
31 #include <sc.hrc>
32 #include <miscuno.hxx>
33 
34 using namespace utl;
35 using namespace com::sun::star::uno;
36 
37 
38 
40 {
41  *this = ScGridOptions();
42 
43  // grid defaults differ now between the apps
44  // therefore, enter here in its own right (all in 1/100mm)
45 
47  {
48  nFldDrawX = 1000; // 1cm
49  nFldDrawY = 1000;
50  nFldSnapX = 1000;
51  nFldSnapY = 1000;
52  }
53  else
54  {
55  nFldDrawX = 1270; // 0,5"
56  nFldDrawY = 1270;
57  nFldSnapX = 1270;
58  nFldSnapY = 1270;
59  }
60  nFldDivisionX = 1;
61  nFldDivisionY = 1;
62 }
63 
64 bool ScGridOptions::operator==( const ScGridOptions& rCpy ) const
65 {
66  return ( nFldDrawX == rCpy.nFldDrawX
67  && nFldDivisionX == rCpy.nFldDivisionX
68  && nFldDrawY == rCpy.nFldDrawY
69  && nFldDivisionY == rCpy.nFldDivisionY
70  && nFldSnapX == rCpy.nFldSnapX
71  && nFldSnapY == rCpy.nFldSnapY
72  && bUseGridsnap == rCpy.bUseGridsnap
73  && bSynchronize == rCpy.bSynchronize
74  && bGridVisible == rCpy.bGridVisible
75  && bEqualGrid == rCpy.bEqualGrid );
76 }
77 
78 
80 {
81  SetDefaults();
82 }
83 
85 {
86  *this = rCpy;
87 }
88 
90 {
91 }
92 
94 {
95  aOptArr[ VOPT_FORMULAS ] = false;
96  aOptArr[ VOPT_SYNTAX ] = false;
97  aOptArr[ VOPT_HELPLINES ] = false;
98  aOptArr[ VOPT_GRID_ONTOP ] = false;
99  aOptArr[ VOPT_NOTES ] = true;
100  aOptArr[ VOPT_NULLVALS ] = true;
101  aOptArr[ VOPT_VSCROLL ] = true;
102  aOptArr[ VOPT_HSCROLL ] = true;
103  aOptArr[ VOPT_TABCONTROLS ] = true;
104  aOptArr[ VOPT_OUTLINER ] = true;
105  aOptArr[ VOPT_HEADER ] = true;
106  aOptArr[ VOPT_GRID ] = true;
107  aOptArr[ VOPT_ANCHOR ] = true;
108  aOptArr[ VOPT_PAGEBREAKS ] = true;
109  aOptArr[ VOPT_CLIPMARKS ] = true;
110  aOptArr[ VOPT_SUMMARY ] = true;
111 
112  aModeArr[VOBJ_TYPE_OLE ] = VOBJ_MODE_SHOW;
113  aModeArr[VOBJ_TYPE_CHART] = VOBJ_MODE_SHOW;
114  aModeArr[VOBJ_TYPE_DRAW ] = VOBJ_MODE_SHOW;
115 
116  aGridCol = SC_STD_GRIDCOLOR;
117 
118  aGridOpt.SetDefaults();
119 }
120 
121 Color const & ScViewOptions::GetGridColor( OUString* pStrName ) const
122 {
123  if ( pStrName )
124  *pStrName = aGridColName;
125 
126  return aGridCol;
127 }
128 
130 
131 bool ScViewOptions::operator==( const ScViewOptions& rOpt ) const
132 {
133  bool bEqual = true;
134  sal_uInt16 i;
135 
136  for ( i=0; i<MAX_OPT && bEqual; i++ ) bEqual = (aOptArr [i] == rOpt.aOptArr[i]);
137  for ( i=0; i<MAX_TYPE && bEqual; i++ ) bEqual = (aModeArr[i] == rOpt.aModeArr[i]);
138 
139  bEqual = bEqual && (aGridCol == rOpt.aGridCol);
140  bEqual = bEqual && (aGridColName == rOpt.aGridColName);
141  bEqual = bEqual && (aGridOpt == rOpt.aGridOpt);
142 
143  return bEqual;
144 }
145 
146 std::unique_ptr<SvxGridItem> ScViewOptions::CreateGridItem() const
147 {
148  std::unique_ptr<SvxGridItem> pItem(new SvxGridItem( SID_ATTR_GRID_OPTIONS ));
149 
150  pItem->SetFieldDrawX ( aGridOpt.GetFieldDrawX() );
151  pItem->SetFieldDivisionX ( aGridOpt.GetFieldDivisionX() );
152  pItem->SetFieldDrawY ( aGridOpt.GetFieldDrawY() );
153  pItem->SetFieldDivisionY ( aGridOpt.GetFieldDivisionY() );
154  pItem->SetFieldSnapX ( aGridOpt.GetFieldSnapX() );
155  pItem->SetFieldSnapY ( aGridOpt.GetFieldSnapY() );
156  pItem->SetUseGridSnap ( aGridOpt.GetUseGridSnap() );
157  pItem->SetSynchronize ( aGridOpt.GetSynchronize() );
158  pItem->SetGridVisible ( aGridOpt.GetGridVisible() );
159  pItem->SetEqualGrid ( aGridOpt.GetEqualGrid() );
160 
161  return pItem;
162 }
163 
164 // ScTpViewItem - data for the ViewOptions TabPage
165 
167  : SfxPoolItem ( SID_SCVIEWOPTIONS ),
168  theOptions ( rOpt )
169 {
170 }
171 
173 {
174 }
175 
176 bool ScTpViewItem::operator==( const SfxPoolItem& rItem ) const
177 {
178  assert(SfxPoolItem::operator==(rItem));
179 
180  const ScTpViewItem& rPItem = static_cast<const ScTpViewItem&>(rItem);
181 
182  return ( theOptions == rPItem.theOptions );
183 }
184 
186 {
187  return new ScTpViewItem( *this );
188 }
189 
190 // Config Item containing view options
191 
192 #define CFGPATH_LAYOUT "Office.Calc/Layout"
193 
194 #define SCLAYOUTOPT_GRIDLINES 0
195 #define SCLAYOUTOPT_GRIDCOLOR 1
196 #define SCLAYOUTOPT_PAGEBREAK 2
197 #define SCLAYOUTOPT_GUIDE 3
198 #define SCLAYOUTOPT_COLROWHDR 4
199 #define SCLAYOUTOPT_HORISCROLL 5
200 #define SCLAYOUTOPT_VERTSCROLL 6
201 #define SCLAYOUTOPT_SHEETTAB 7
202 #define SCLAYOUTOPT_OUTLINE 8
203 #define SCLAYOUTOPT_GRID_ONCOLOR 9
204 #define SCLAYOUTOPT_SUMMARY 10
205 
206 #define CFGPATH_DISPLAY "Office.Calc/Content/Display"
207 
208 #define SCDISPLAYOPT_FORMULA 0
209 #define SCDISPLAYOPT_ZEROVALUE 1
210 #define SCDISPLAYOPT_NOTETAG 2
211 #define SCDISPLAYOPT_VALUEHI 3
212 #define SCDISPLAYOPT_ANCHOR 4
213 #define SCDISPLAYOPT_TEXTOVER 5
214 #define SCDISPLAYOPT_OBJECTGRA 6
215 #define SCDISPLAYOPT_CHART 7
216 #define SCDISPLAYOPT_DRAWING 8
217 
218 #define CFGPATH_GRID "Office.Calc/Grid"
219 
220 #define SCGRIDOPT_RESOLU_X 0
221 #define SCGRIDOPT_RESOLU_Y 1
222 #define SCGRIDOPT_SUBDIV_X 2
223 #define SCGRIDOPT_SUBDIV_Y 3
224 #define SCGRIDOPT_OPTION_X 4
225 #define SCGRIDOPT_OPTION_Y 5
226 #define SCGRIDOPT_SNAPTOGRID 6
227 #define SCGRIDOPT_SYNCHRON 7
228 #define SCGRIDOPT_VISIBLE 8
229 #define SCGRIDOPT_SIZETOGRID 9
230 
232 {
233  return {"Line/GridLine", // SCLAYOUTOPT_GRIDLINES
234  "Line/GridLineColor", // SCLAYOUTOPT_GRIDCOLOR
235  "Line/PageBreak", // SCLAYOUTOPT_PAGEBREAK
236  "Line/Guide", // SCLAYOUTOPT_GUIDE
237  "Window/ColumnRowHeader", // SCLAYOUTOPT_COLROWHDR
238  "Window/HorizontalScroll", // SCLAYOUTOPT_HORISCROLL
239  "Window/VerticalScroll", // SCLAYOUTOPT_VERTSCROLL
240  "Window/SheetTab", // SCLAYOUTOPT_SHEETTAB
241  "Window/OutlineSymbol", // SCLAYOUTOPT_OUTLINE
242  "Line/GridOnColoredCells", // SCLAYOUTOPT_GRID_ONCOLOR;
243  "Window/SearchSummary"}; // SCLAYOUTOPT_SUMMARY
244 }
245 
247 {
248  return {"Formula", // SCDISPLAYOPT_FORMULA
249  "ZeroValue", // SCDISPLAYOPT_ZEROVALUE
250  "NoteTag", // SCDISPLAYOPT_NOTETAG
251  "ValueHighlighting", // SCDISPLAYOPT_VALUEHI
252  "Anchor", // SCDISPLAYOPT_ANCHOR
253  "TextOverflow", // SCDISPLAYOPT_TEXTOVER
254  "ObjectGraphic", // SCDISPLAYOPT_OBJECTGRA
255  "Chart", // SCDISPLAYOPT_CHART
256  "DrawingObject"}; // SCDISPLAYOPT_DRAWING;
257 }
258 
260 {
261  const bool bIsMetric = ScOptionsUtil::IsMetricSystem();
262 
263  return {(bIsMetric ? OUString("Resolution/XAxis/Metric")
264  : OUString("Resolution/XAxis/NonMetric")), // SCGRIDOPT_RESOLU_X
265  (bIsMetric ? OUString("Resolution/YAxis/Metric")
266  : OUString("Resolution/YAxis/NonMetric")), // SCGRIDOPT_RESOLU_Y
267  "Subdivision/XAxis", // SCGRIDOPT_SUBDIV_X
268  "Subdivision/YAxis", // SCGRIDOPT_SUBDIV_Y
269  (bIsMetric ? OUString("Option/XAxis/Metric")
270  : OUString("Option/XAxis/NonMetric")), // SCGRIDOPT_OPTION_X
271  (bIsMetric ? OUString("Option/YAxis/Metric")
272  : OUString("Option/YAxis/NonMetric")), // SCGRIDOPT_OPTION_Y
273  "Option/SnapToGrid", // SCGRIDOPT_SNAPTOGRID
274  "Option/Synchronize", // SCGRIDOPT_SYNCHRON
275  "Option/VisibleGrid", // SCGRIDOPT_VISIBLE
276  "Option/SizeToGrid"}; // SCGRIDOPT_SIZETOGRID;
277 }
278 
283 {
284  sal_Int32 nIntVal = 0;
285 
287  Sequence<Any> aValues = aLayoutItem.GetProperties(aNames);
289  const Any* pValues = aValues.getConstArray();
290  OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
291  if(aValues.getLength() == aNames.getLength())
292  {
293  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
294  {
295  OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
296  if(pValues[nProp].hasValue())
297  {
298  switch(nProp)
299  {
301  if ( pValues[nProp] >>= nIntVal )
302  SetGridColor( Color(nIntVal), EMPTY_OUSTRING );
303  break;
306  break;
309  break;
312  break;
313  case SCLAYOUTOPT_GUIDE:
315  break;
318  break;
321  break;
324  break;
327  break;
328  case SCLAYOUTOPT_OUTLINE:
330  break;
331  case SCLAYOUTOPT_SUMMARY:
333  break;
334  }
335  }
336  }
337  }
338  aLayoutItem.SetCommitLink( LINK( this, ScViewCfg, LayoutCommitHdl ) );
339 
340  aNames = GetDisplayPropertyNames();
341  aValues = aDisplayItem.GetProperties(aNames);
343  pValues = aValues.getConstArray();
344  OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
345  if(aValues.getLength() == aNames.getLength())
346  {
347  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
348  {
349  OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
350  if(pValues[nProp].hasValue())
351  {
352  switch(nProp)
353  {
356  break;
359  break;
362  break;
365  break;
366  case SCDISPLAYOPT_ANCHOR:
368  break;
371  break;
373  if ( pValues[nProp] >>= nIntVal )
374  {
375  //#i80528# adapt to new range eventually
376  if(sal_Int32(VOBJ_MODE_HIDE) < nIntVal) nIntVal = sal_Int32(VOBJ_MODE_SHOW);
377 
378  SetObjMode( VOBJ_TYPE_OLE, static_cast<ScVObjMode>(nIntVal));
379  }
380  break;
381  case SCDISPLAYOPT_CHART:
382  if ( pValues[nProp] >>= nIntVal )
383  {
384  //#i80528# adapt to new range eventually
385  if(sal_Int32(VOBJ_MODE_HIDE) < nIntVal) nIntVal = sal_Int32(VOBJ_MODE_SHOW);
386 
387  SetObjMode( VOBJ_TYPE_CHART, static_cast<ScVObjMode>(nIntVal));
388  }
389  break;
391  if ( pValues[nProp] >>= nIntVal )
392  {
393  //#i80528# adapt to new range eventually
394  if(sal_Int32(VOBJ_MODE_HIDE) < nIntVal) nIntVal = sal_Int32(VOBJ_MODE_SHOW);
395 
396  SetObjMode( VOBJ_TYPE_DRAW, static_cast<ScVObjMode>(nIntVal));
397  }
398  break;
399  }
400  }
401  }
402  }
403  aDisplayItem.SetCommitLink( LINK( this, ScViewCfg, DisplayCommitHdl ) );
404 
405  ScGridOptions aGrid = GetGridOptions(); //TODO: initialization necessary?
406  aNames = GetGridPropertyNames();
407  aValues = aGridItem.GetProperties(aNames);
409  pValues = aValues.getConstArray();
410  OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
411  if(aValues.getLength() == aNames.getLength())
412  {
413  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
414  {
415  OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
416  if(pValues[nProp].hasValue())
417  {
418  switch(nProp)
419  {
420  case SCGRIDOPT_RESOLU_X:
421  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDrawX( nIntVal );
422  break;
423  case SCGRIDOPT_RESOLU_Y:
424  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDrawY( nIntVal );
425  break;
426  case SCGRIDOPT_SUBDIV_X:
427  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDivisionX( nIntVal );
428  break;
429  case SCGRIDOPT_SUBDIV_Y:
430  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldDivisionY( nIntVal );
431  break;
432  case SCGRIDOPT_OPTION_X:
433  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldSnapX( nIntVal );
434  break;
435  case SCGRIDOPT_OPTION_Y:
436  if (pValues[nProp] >>= nIntVal) aGrid.SetFieldSnapY( nIntVal );
437  break;
439  aGrid.SetUseGridSnap( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
440  break;
441  case SCGRIDOPT_SYNCHRON:
442  aGrid.SetSynchronize( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
443  break;
444  case SCGRIDOPT_VISIBLE:
445  aGrid.SetGridVisible( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
446  break;
448  aGrid.SetEqualGrid( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
449  break;
450  }
451  }
452  }
453  }
454  SetGridOptions( aGrid );
455  aGridItem.SetCommitLink( LINK( this, ScViewCfg, GridCommitHdl ) );
456 }
457 
458 IMPL_LINK_NOARG(ScViewCfg, LayoutCommitHdl, ScLinkConfigItem&, void)
459 {
460  Sequence<OUString> aNames = GetLayoutPropertyNames();
461  Sequence<Any> aValues(aNames.getLength());
462  Any* pValues = aValues.getArray();
463 
464  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
465  {
466  switch(nProp)
467  {
469  pValues[nProp] <<= GetGridColor();
470  break;
472  pValues[nProp] <<= GetOption( VOPT_GRID );
473  break;
475  pValues[nProp] <<= GetOption( VOPT_GRID_ONTOP );
476  break;
478  pValues[nProp] <<= GetOption( VOPT_PAGEBREAKS );
479  break;
480  case SCLAYOUTOPT_GUIDE:
481  pValues[nProp] <<= GetOption( VOPT_HELPLINES );
482  break;
484  pValues[nProp] <<= GetOption( VOPT_HEADER );
485  break;
487  pValues[nProp] <<= GetOption( VOPT_HSCROLL );
488  break;
490  pValues[nProp] <<= GetOption( VOPT_VSCROLL );
491  break;
493  pValues[nProp] <<= GetOption( VOPT_TABCONTROLS );
494  break;
495  case SCLAYOUTOPT_OUTLINE:
496  pValues[nProp] <<= GetOption( VOPT_OUTLINER );
497  break;
498  case SCLAYOUTOPT_SUMMARY:
499  pValues[nProp] <<= GetOption( VOPT_SUMMARY );
500  break;
501  }
502  }
503  aLayoutItem.PutProperties(aNames, aValues);
504 }
505 
506 IMPL_LINK_NOARG(ScViewCfg, DisplayCommitHdl, ScLinkConfigItem&, void)
507 {
508  Sequence<OUString> aNames = GetDisplayPropertyNames();
509  Sequence<Any> aValues(aNames.getLength());
510  Any* pValues = aValues.getArray();
511 
512  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
513  {
514  switch(nProp)
515  {
517  pValues[nProp] <<= GetOption( VOPT_FORMULAS );
518  break;
520  pValues[nProp] <<= GetOption( VOPT_NULLVALS );
521  break;
523  pValues[nProp] <<= GetOption( VOPT_NOTES );
524  break;
526  pValues[nProp] <<= GetOption( VOPT_SYNTAX );
527  break;
528  case SCDISPLAYOPT_ANCHOR:
529  pValues[nProp] <<= GetOption( VOPT_ANCHOR );
530  break;
532  pValues[nProp] <<= GetOption( VOPT_CLIPMARKS );
533  break;
535  pValues[nProp] <<= static_cast<sal_Int32>(GetObjMode( VOBJ_TYPE_OLE ));
536  break;
537  case SCDISPLAYOPT_CHART:
538  pValues[nProp] <<= static_cast<sal_Int32>(GetObjMode( VOBJ_TYPE_CHART ));
539  break;
541  pValues[nProp] <<= static_cast<sal_Int32>(GetObjMode( VOBJ_TYPE_DRAW ));
542  break;
543  }
544  }
545  aDisplayItem.PutProperties(aNames, aValues);
546 }
547 
549 {
550  const ScGridOptions& rGrid = GetGridOptions();
551 
552  Sequence<OUString> aNames = GetGridPropertyNames();
553  Sequence<Any> aValues(aNames.getLength());
554  Any* pValues = aValues.getArray();
555 
556  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
557  {
558  switch(nProp)
559  {
560  case SCGRIDOPT_RESOLU_X:
561  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDrawX());
562  break;
563  case SCGRIDOPT_RESOLU_Y:
564  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDrawY());
565  break;
566  case SCGRIDOPT_SUBDIV_X:
567  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDivisionX());
568  break;
569  case SCGRIDOPT_SUBDIV_Y:
570  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldDivisionY());
571  break;
572  case SCGRIDOPT_OPTION_X:
573  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldSnapX());
574  break;
575  case SCGRIDOPT_OPTION_Y:
576  pValues[nProp] <<= static_cast<sal_Int32>(rGrid.GetFieldSnapY());
577  break;
579  pValues[nProp] <<= rGrid.GetUseGridSnap();
580  break;
581  case SCGRIDOPT_SYNCHRON:
582  pValues[nProp] <<= rGrid.GetSynchronize();
583  break;
584  case SCGRIDOPT_VISIBLE:
585  pValues[nProp] <<= rGrid.GetGridVisible();
586  break;
588  pValues[nProp] <<= rGrid.GetEqualGrid();
589  break;
590  }
591  }
592  aGridItem.PutProperties(aNames, aValues);
593 }
594 
596 {
597  *static_cast<ScViewOptions*>(this) = rNew;
601 }
602 
603 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SCGRIDOPT_OPTION_X
Definition: viewopti.cxx:224
void SetOption(ScViewOption eOpt, bool bNew)
Definition: viewopti.hxx:87
sal_uInt32 GetFieldDivisionY() const
ScTpViewItem(const ScViewOptions &rOpt)
Definition: viewopti.cxx:166
void SetFieldDrawX(sal_uInt32 nSet)
#define SCDISPLAYOPT_TEXTOVER
Definition: viewopti.cxx:213
#define EMPTY_OUSTRING
Definition: global.hxx:215
ScLinkConfigItem aDisplayItem
Definition: viewopti.hxx:139
bool GetEqualGrid() const
#define SCGRIDOPT_SUBDIV_Y
Definition: viewopti.cxx:223
void SetFieldSnapY(sal_uInt32 nSet)
void SetFieldDrawY(sal_uInt32 nSet)
sal_uInt32 nFldDivisionY
bool operator==(const ScGridOptions &rOpt) const
Definition: viewopti.cxx:64
#define SCGRIDOPT_SIZETOGRID
Definition: viewopti.cxx:229
ScViewOptions theOptions
Definition: viewopti.hxx:131
sal_uInt32 GetFieldDrawX() const
ScVObjMode aModeArr[MAX_TYPE]
Definition: viewopti.hxx:106
#define CFGPATH_GRID
Definition: viewopti.cxx:218
sal_uInt32 nFldDivisionX
void SetEqualGrid(bool bSet)
IMPL_LINK_NOARG(ScViewCfg, LayoutCommitHdl, ScLinkConfigItem &, void)
Definition: viewopti.cxx:458
#define SCDISPLAYOPT_CHART
Definition: viewopti.cxx:215
void SetFieldDivisionY(sal_uInt32 nSet)
#define SCDISPLAYOPT_FORMULA
Definition: viewopti.cxx:208
#define SCGRIDOPT_SYNCHRON
Definition: viewopti.cxx:227
void SetCommitLink(const Link< ScLinkConfigItem &, void > &rLink)
Definition: optutil.cxx:49
void SetDefaults()
Definition: viewopti.cxx:39
sal_uInt32 GetFieldSnapX() const
#define SCGRIDOPT_VISIBLE
Definition: viewopti.cxx:228
#define SCDISPLAYOPT_NOTETAG
Definition: viewopti.cxx:210
void SetObjMode(ScVObjType eObj, ScVObjMode eMode)
Definition: viewopti.hxx:90
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
#define SCLAYOUTOPT_HORISCROLL
Definition: viewopti.cxx:199
#define SCLAYOUTOPT_SUMMARY
Definition: viewopti.cxx:204
static css::uno::Sequence< OUString > GetGridPropertyNames()
Definition: viewopti.cxx:259
static bool IsMetricSystem()
Definition: optutil.cxx:27
bool EnableNotification(const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
#define SCLAYOUTOPT_SHEETTAB
Definition: viewopti.cxx:201
ScViewOptions & operator=(const ScViewOptions &rCpy)
#define SCGRIDOPT_RESOLU_X
Definition: viewopti.cxx:220
#define SCLAYOUTOPT_COLROWHDR
Definition: viewopti.cxx:198
#define SC_STD_GRIDCOLOR
Definition: viewopti.hxx:61
#define SCDISPLAYOPT_ZEROVALUE
Definition: viewopti.cxx:209
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:194
void SetOptions(const ScViewOptions &rNew)
Definition: viewopti.cxx:595
virtual ScTpViewItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: viewopti.cxx:185
#define SCGRIDOPT_OPTION_Y
Definition: viewopti.cxx:225
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:196
const ScGridOptions & GetGridOptions() const
Definition: viewopti.hxx:96
std::unique_ptr< SvxGridItem > CreateGridItem() const
Definition: viewopti.cxx:146
#define SCDISPLAYOPT_ANCHOR
Definition: viewopti.cxx:212
ScGridOptions aGridOpt
Definition: viewopti.hxx:109
bool operator==(const ScViewOptions &rOpt) const
Definition: viewopti.cxx:131
virtual bool operator==(const SfxPoolItem &) const override
Definition: viewopti.cxx:176
bool GetSynchronize() const
#define SCLAYOUTOPT_GRID_ONCOLOR
Definition: viewopti.cxx:203
ScLinkConfigItem aGridItem
Definition: viewopti.hxx:140
#define SCGRIDOPT_RESOLU_Y
Definition: viewopti.cxx:221
#define SCLAYOUTOPT_OUTLINE
Definition: viewopti.cxx:202
#define MAX_OPT
Definition: viewopti.hxx:58
static css::uno::Sequence< OUString > GetLayoutPropertyNames()
Definition: viewopti.cxx:231
#define SCLAYOUTOPT_VERTSCROLL
Definition: viewopti.cxx:200
void SetDefaults()
Definition: viewopti.cxx:93
#define CFGPATH_DISPLAY
Definition: viewopti.cxx:206
const PropertyValue * pValues
#define SCLAYOUTOPT_GRIDCOLOR
Definition: viewopti.cxx:195
void SetSynchronize(bool bSet)
virtual ~ScTpViewItem() override
Definition: viewopti.cxx:172
#define SCGRIDOPT_SUBDIV_X
Definition: viewopti.cxx:222
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:121
static css::uno::Sequence< OUString > GetDisplayPropertyNames()
Definition: viewopti.cxx:246
#define CFGPATH_LAYOUT
Definition: viewopti.cxx:192
void SetFieldSnapX(sal_uInt32 nSet)
#define SCGRIDOPT_SNAPTOGRID
Definition: viewopti.cxx:226
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:197
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:216
#define SCDISPLAYOPT_VALUEHI
Definition: viewopti.cxx:211
#define SCDISPLAYOPT_OBJECTGRA
Definition: viewopti.cxx:214
ScLinkConfigItem aLayoutItem
Definition: viewopti.hxx:138