20#include <osl/diagnose.h>
22#include <com/sun/star/uno/Any.hxx>
23#include <com/sun/star/uno/Sequence.hxx>
147 std::unique_ptr<SvxGridItem> pItem(
new SvxGridItem( SID_ATTR_GRID_OPTIONS ));
177 assert(SfxPoolItem::operator==(rItem));
193#define SCLAYOUTOPT_GRIDLINES 0
194#define SCLAYOUTOPT_GRIDCOLOR 1
195#define SCLAYOUTOPT_PAGEBREAK 2
196#define SCLAYOUTOPT_GUIDE 3
197#define SCLAYOUTOPT_COLROWHDR 4
198#define SCLAYOUTOPT_HORISCROLL 5
199#define SCLAYOUTOPT_VERTSCROLL 6
200#define SCLAYOUTOPT_SHEETTAB 7
201#define SCLAYOUTOPT_OUTLINE 8
202#define SCLAYOUTOPT_GRID_ONCOLOR 9
203#define SCLAYOUTOPT_SUMMARY 10
204#define SCLAYOUTOPT_THEMEDCURSOR 11
208#define SCDISPLAYOPT_FORMULA 0
209#define SCDISPLAYOPT_ZEROVALUE 1
210#define SCDISPLAYOPT_NOTETAG 2
211#define SCDISPLAYOPT_FORMULAMARK 3
212#define SCDISPLAYOPT_VALUEHI 4
213#define SCDISPLAYOPT_ANCHOR 5
214#define SCDISPLAYOPT_OBJECTGRA 6
215#define SCDISPLAYOPT_CHART 7
216#define SCDISPLAYOPT_DRAWING 8
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
233 return {
"Line/GridLine",
234 "Line/GridLineColor",
237 "Window/ColumnRowHeader",
238 "Window/HorizontalScroll",
239 "Window/VerticalScroll",
241 "Window/OutlineSymbol",
242 "Line/GridOnColoredCells",
243 "Window/SearchSummary",
244 "Window/ThemedCursor"};
264 return {(bIsMetric ? OUString(
"Resolution/XAxis/Metric")
265 : OUString(
"Resolution/XAxis/NonMetric")),
266 (bIsMetric ? OUString(
"Resolution/YAxis/Metric")
267 : OUString(
"Resolution/YAxis/NonMetric")),
270 (bIsMetric ? OUString(
"Option/XAxis/Metric")
271 : OUString(
"Option/XAxis/NonMetric")),
272 (bIsMetric ? OUString(
"Option/YAxis/Metric")
273 : OUString(
"Option/YAxis/NonMetric")),
275 "Option/Synchronize",
276 "Option/VisibleGrid",
277 "Option/SizeToGrid"};
285 sal_Int32 nIntVal = 0;
291 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
292 if(aValues.getLength() == aNames.getLength())
294 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
296 OSL_ENSURE(
pValues[nProp].hasValue(),
"property value missing");
304 if (
pValues[nProp] >>= aColor )
350 pValues = aValues.getConstArray();
351 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
352 if(aValues.getLength() == aNames.getLength())
354 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
356 OSL_ENSURE(
pValues[nProp].hasValue(),
"property value missing");
380 if (
pValues[nProp] >>= nIntVal )
389 if (
pValues[nProp] >>= nIntVal )
398 if (
pValues[nProp] >>= nIntVal )
416 pValues = aValues.getConstArray();
417 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
418 if(aValues.getLength() == aNames.getLength())
420 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
422 OSL_ENSURE(
pValues[nProp].hasValue(),
"property value missing");
471 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
476 pValues[nProp] <<= GetGridColor();
513 aLayoutItem.PutProperties(aNames, aValues);
522 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
555 aDisplayItem.PutProperties(aNames, aValues);
566 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
602 aGridItem.PutProperties(aNames, aValues);
const PropertyValue * pValues
bool operator==(const ScGridOptions &rOpt) const
void SetCommitLink(const Link< ScLinkConfigItem &, void > &rLink)
css::uno::Sequence< css::uno::Any > GetProperties(const css::uno::Sequence< OUString > &rNames)
static bool IsMetricSystem()
virtual ScTpViewItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool operator==(const SfxPoolItem &) const override
virtual ~ScTpViewItem() override
ScTpViewItem(const ScViewOptions &rOpt)
static bool GetBoolFromAny(const css::uno::Any &aAny)
static css::uno::Sequence< OUString > GetLayoutPropertyNames()
ScLinkConfigItem aDisplayItem
static css::uno::Sequence< OUString > GetDisplayPropertyNames()
void SetOptions(const ScViewOptions &rNew)
ScLinkConfigItem aLayoutItem
static css::uno::Sequence< OUString > GetGridPropertyNames()
ScLinkConfigItem aGridItem
void SetGridColor(const Color &rCol, const OUString &rName)
void SetOption(ScViewOption eOpt, bool bNew)
std::unique_ptr< SvxGridItem > CreateGridItem() const
ScViewOptions & operator=(const ScViewOptions &rCpy)
void SetObjMode(ScVObjType eObj, ScVObjMode eMode)
const ScGridOptions & GetGridOptions() const
Color const & GetGridColor(OUString *pStrName=nullptr) const
bool operator==(const ScViewOptions &rOpt) const
ScVObjMode aModeArr[MAX_TYPE]
void SetGridOptions(const ScGridOptions &rNew)
bool GetGridVisible() const
bool GetUseGridSnap() const
sal_uInt32 GetFieldSnapY() const
void SetFieldSnapY(sal_uInt32 nSet)
void SetFieldDrawX(sal_uInt32 nSet)
void SetUseGridSnap(bool bSet)
void SetFieldDrawY(sal_uInt32 nSet)
sal_uInt32 GetFieldDivisionY() const
bool GetSynchronize() const
void SetSynchronize(bool bSet)
void SetEqualGrid(bool bSet)
sal_uInt32 GetFieldDrawY() const
void SetGridVisible(bool bSet)
void SetFieldSnapX(sal_uInt32 nSet)
void SetFieldDivisionY(sal_uInt32 nSet)
sal_uInt32 GetFieldSnapX() const
bool GetEqualGrid() const
void SetFieldDivisionX(sal_uInt32 nSet)
sal_uInt32 GetFieldDrawX() const
sal_uInt32 GetFieldDivisionX() const
bool EnableNotification(const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
#define LINK(Instance, Class, Member)
#define SCLAYOUTOPT_HORISCROLL
#define SCDISPLAYOPT_OBJECTGRA
#define SCGRIDOPT_OPTION_Y
constexpr OUStringLiteral CFGPATH_DISPLAY
#define SCLAYOUTOPT_COLROWHDR
#define SCLAYOUTOPT_GUIDE
#define SCGRIDOPT_SUBDIV_X
#define SCDISPLAYOPT_FORMULA
#define SCLAYOUTOPT_THEMEDCURSOR
#define SCDISPLAYOPT_DRAWING
#define SCGRIDOPT_OPTION_X
#define SCLAYOUTOPT_GRID_ONCOLOR
#define SCGRIDOPT_SNAPTOGRID
#define SCGRIDOPT_SIZETOGRID
#define SCLAYOUTOPT_OUTLINE
#define SCLAYOUTOPT_SUMMARY
#define SCLAYOUTOPT_PAGEBREAK
#define SCLAYOUTOPT_SHEETTAB
#define SCDISPLAYOPT_ZEROVALUE
#define SCDISPLAYOPT_CHART
constexpr OUStringLiteral CFGPATH_LAYOUT
#define SCLAYOUTOPT_GRIDCOLOR
#define SCGRIDOPT_VISIBLE
#define SCDISPLAYOPT_FORMULAMARK
#define SCGRIDOPT_RESOLU_Y
#define SCDISPLAYOPT_VALUEHI
#define SCLAYOUTOPT_VERTSCROLL
#define SCGRIDOPT_SYNCHRON
constexpr OUStringLiteral CFGPATH_GRID
#define SCGRIDOPT_SUBDIV_Y
#define SCLAYOUTOPT_GRIDLINES
#define SCGRIDOPT_RESOLU_X
IMPL_LINK_NOARG(ScViewCfg, LayoutCommitHdl, ScLinkConfigItem &, void)
#define SCDISPLAYOPT_NOTETAG
#define SCDISPLAYOPT_ANCHOR