20#include <osl/diagnose.h>
22#include <com/sun/star/uno/Any.hxx>
23#include <com/sun/star/uno/Sequence.hxx>
145 std::unique_ptr<SvxGridItem> pItem(
new SvxGridItem( SID_ATTR_GRID_OPTIONS ));
175 assert(SfxPoolItem::operator==(rItem));
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
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
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
231 return {
"Line/GridLine",
232 "Line/GridLineColor",
235 "Window/ColumnRowHeader",
236 "Window/HorizontalScroll",
237 "Window/VerticalScroll",
239 "Window/OutlineSymbol",
240 "Line/GridOnColoredCells",
241 "Window/SearchSummary",
242 "Window/ThemedCursor"};
262 return {(bIsMetric ? OUString(
"Resolution/XAxis/Metric")
263 : OUString(
"Resolution/XAxis/NonMetric")),
264 (bIsMetric ? OUString(
"Resolution/YAxis/Metric")
265 : OUString(
"Resolution/YAxis/NonMetric")),
268 (bIsMetric ? OUString(
"Option/XAxis/Metric")
269 : OUString(
"Option/XAxis/NonMetric")),
270 (bIsMetric ? OUString(
"Option/YAxis/Metric")
271 : OUString(
"Option/YAxis/NonMetric")),
273 "Option/Synchronize",
274 "Option/VisibleGrid",
275 "Option/SizeToGrid"};
283 sal_Int32 nIntVal = 0;
289 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
290 if(aValues.getLength() == aNames.getLength())
292 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
294 OSL_ENSURE(
pValues[nProp].hasValue(),
"property value missing");
302 if (
pValues[nProp] >>= aColor )
348 pValues = aValues.getConstArray();
349 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
350 if(aValues.getLength() == aNames.getLength())
352 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
354 OSL_ENSURE(
pValues[nProp].hasValue(),
"property value missing");
378 if (
pValues[nProp] >>= nIntVal )
387 if (
pValues[nProp] >>= nIntVal )
396 if (
pValues[nProp] >>= nIntVal )
414 pValues = aValues.getConstArray();
415 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
416 if(aValues.getLength() == aNames.getLength())
418 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
420 OSL_ENSURE(
pValues[nProp].hasValue(),
"property value missing");
469 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
474 pValues[nProp] <<= GetGridColor();
511 aLayoutItem.PutProperties(aNames, aValues);
520 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
553 aDisplayItem.PutProperties(aNames, aValues);
564 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
600 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 SCDISPLAYOPT_TEXTOVER
#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 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