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