20#include <osl/diagnose.h>
22#include <com/sun/star/uno/Any.hxx>
23#include <com/sun/star/uno/Sequence.hxx>
151 std::unique_ptr<SvxGridItem> pItem(
new SvxGridItem( SID_ATTR_GRID_OPTIONS ));
181 assert(SfxPoolItem::operator==(rItem));
197#define SCLAYOUTOPT_GRIDLINES 0
198#define SCLAYOUTOPT_GRIDCOLOR 1
199#define SCLAYOUTOPT_PAGEBREAK 2
200#define SCLAYOUTOPT_GUIDE 3
201#define SCLAYOUTOPT_COLROWHDR 4
202#define SCLAYOUTOPT_HORISCROLL 5
203#define SCLAYOUTOPT_VERTSCROLL 6
204#define SCLAYOUTOPT_SHEETTAB 7
205#define SCLAYOUTOPT_OUTLINE 8
206#define SCLAYOUTOPT_GRID_ONCOLOR 9
207#define SCLAYOUTOPT_SUMMARY 10
208#define SCLAYOUTOPT_THEMEDCURSOR 11
212#define SCDISPLAYOPT_FORMULA 0
213#define SCDISPLAYOPT_ZEROVALUE 1
214#define SCDISPLAYOPT_NOTETAG 2
215#define SCDISPLAYOPT_FORMULAMARK 3
216#define SCDISPLAYOPT_VALUEHI 4
217#define SCDISPLAYOPT_ANCHOR 5
218#define SCDISPLAYOPT_OBJECTGRA 6
219#define SCDISPLAYOPT_CHART 7
220#define SCDISPLAYOPT_DRAWING 8
224#define SCGRIDOPT_RESOLU_X 0
225#define SCGRIDOPT_RESOLU_Y 1
226#define SCGRIDOPT_SUBDIV_X 2
227#define SCGRIDOPT_SUBDIV_Y 3
228#define SCGRIDOPT_OPTION_X 4
229#define SCGRIDOPT_OPTION_Y 5
230#define SCGRIDOPT_SNAPTOGRID 6
231#define SCGRIDOPT_SYNCHRON 7
232#define SCGRIDOPT_VISIBLE 8
233#define SCGRIDOPT_SIZETOGRID 9
237 return {
"Line/GridLine",
238 "Line/GridLineColor",
241 "Window/ColumnRowHeader",
242 "Window/HorizontalScroll",
243 "Window/VerticalScroll",
245 "Window/OutlineSymbol",
246 "Line/GridOnColoredCells",
247 "Window/SearchSummary",
248 "Window/ThemedCursor"};
268 return {(bIsMetric ? OUString(
"Resolution/XAxis/Metric")
269 : OUString(
"Resolution/XAxis/NonMetric")),
270 (bIsMetric ? OUString(
"Resolution/YAxis/Metric")
271 : OUString(
"Resolution/YAxis/NonMetric")),
274 (bIsMetric ? OUString(
"Option/XAxis/Metric")
275 : OUString(
"Option/XAxis/NonMetric")),
276 (bIsMetric ? OUString(
"Option/YAxis/Metric")
277 : OUString(
"Option/YAxis/NonMetric")),
279 "Option/Synchronize",
280 "Option/VisibleGrid",
281 "Option/SizeToGrid"};
289 sal_Int32 nIntVal = 0;
295 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
296 if(aValues.getLength() == aNames.getLength())
298 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
300 OSL_ENSURE(
pValues[nProp].hasValue(),
"property value missing");
308 if (
pValues[nProp] >>= aColor )
354 pValues = aValues.getConstArray();
355 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
356 if(aValues.getLength() == aNames.getLength())
358 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
360 OSL_ENSURE(
pValues[nProp].hasValue(),
"property value missing");
384 if (
pValues[nProp] >>= nIntVal )
393 if (
pValues[nProp] >>= nIntVal )
402 if (
pValues[nProp] >>= nIntVal )
420 pValues = aValues.getConstArray();
421 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
422 if(aValues.getLength() == aNames.getLength())
424 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
426 OSL_ENSURE(
pValues[nProp].hasValue(),
"property value missing");
475 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
480 pValues[nProp] <<= GetGridColor();
517 aLayoutItem.PutProperties(aNames, aValues);
526 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
559 aDisplayItem.PutProperties(aNames, aValues);
570 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
606 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