24#include <svx/svxids.hrc>
29#include <osl/diagnose.h>
41 bool bOk = (rAny >>=
value);
43 DBG_ASSERT( bOk,
"SdOptionsItem, wrong type from configuration!" );
50 ConfigItem ( rSubTree ),
70 return ConfigItem::GetProperties( rNames );
75 return ConfigItem::PutProperties( rNames, rValues );
81 , mbInit(rSubTree.isEmpty())
82 , mbEnableModify(false)
113 assert(
mpCfgItem &&
"mpCfgItem is set by now");
116 const Sequence< Any > aValues =
mpCfgItem->GetProperties( aNames );
118 if( aNames.hasElements() && ( aValues.getLength() == aNames.getLength() ) )
137 Sequence< Any > aValues( aNames.getLength() );
139 if( aNames.hasElements() )
145 OSL_FAIL(
"PutProperties failed" );
153 const char** ppPropNames;
157 Sequence< OUString > aNames(
nCount );
158 OUString* pNames = aNames.getArray();
161 pNames[
i ] = OUString::createFromAscii( ppPropNames[
i ] );
177 return ( eSys == MeasurementSystem::Metric );
189 OUString(
"Office.Impress/Layout" ) :
190 OUString(
"Office.Draw/Layout" ) ) :
193 bMoveOutline( true ),
194 bDragStripes( false ),
195 bHandlesBezier( false ),
218 static const char* aPropNamesMetric[] =
225 "Other/MeasureUnit/Metric",
226 "Other/TabStop/Metric"
228 ppNames = aPropNamesMetric;
233 static const char* aPropNamesNonMetric[] =
240 "Other/MeasureUnit/NonMetric",
241 "Other/TabStop/NonMetric"
243 ppNames = aPropNamesNonMetric;
282, maOptionsLayout ( false, false )
288, maOptionsLayout ( false, false )
321 assert(SfxPoolItem::operator==(rAttr));
347 OUString(
"Office.Impress/Content" ) :
348 OUString(
"Office.Draw/Content" ) )
362 "Display/PicturePlaceholder",
363 "Display/ContourMode",
364 "Display/LineContour",
365 "Display/TextPlaceholder"
396 OUString(
"Office.Impress/Misc" ) :
397 OUString(
"Office.Draw/Misc" ) ) :
399 nDefaultObjectSizeWidth(8000),
400 nDefaultObjectSizeHeight(5000),
401 bStartWithTemplate( false ),
402 bMarkedHitMovesAlways( true ),
403 bMoveOnlyDragging( false ),
404 bCrookNoContortion( false ),
405 bQuickEdit( IsImpress() ),
406 bMasterPageCache( true ),
407 bDragWithCopy( false ),
408 bPickThrough( true ),
409 bDoubleClickTextEdit( true ),
410 bClickChangeRotation( false ),
411 bEnableSdremote( false ),
412 bEnablePresenterScreen( true ),
413 bPresenterScreenFullScreen( true ),
414 bSolidDragging( true ),
415 bSummationOfParagraphs( false ),
416 bTabBarVisible( true ),
417 bShowUndoDeleteWarning( true ),
418 bSlideshowRespectZOrder( true ),
419 bShowComments( true ),
420 bPreviewNewEffects( true ),
421 bPreviewChangedEffects( false ),
422 bPreviewTransitions( true ),
424 mnPenColor( 0xff0000 ),
429 mnPrinterIndependentLayout (1),
430 mnDragThresholdPixels(6)
476 "TextObject/QuickEditing",
479 "TextObject/Selectable",
483 "ModifyWithAttributes",
484 "DefaultObjectSize/Width",
485 "DefaultObjectSize/Height",
487 "Compatibility/PrinterIndependentLayout",
490 "DragThresholdPixels",
494 "Compatibility/AddBetween",
495 "ShowUndoDeleteWarning",
496 "SlideshowRespectZOrder",
499 "PreviewChangedEffects",
500 "PreviewTransitions",
506 "Start/EnableSdremote",
507 "Start/EnablePresenterScreen",
508 "Start/PresenterScreenFullScreen",
637, maOptionsMisc ( false, false )
643, maOptionsMisc ( false, false )
709 assert(SfxPoolItem::operator==(rAttr));
762 OUString(
"Office.Impress/Snap" ) :
763 OUString(
"Office.Draw/Snap" ) ) :
765 bSnapHelplines( true ),
768 bSnapPoints( false ),
800 "Object/ObjectFrame",
801 "Object/ObjectPoint",
802 "Position/CreatingMoving",
803 "Position/ExtendEdges",
806 "Position/RotatingValue",
807 "Position/PointReduction"
854, maOptionsSnap ( false, false )
860, maOptionsSnap ( false, false )
897 assert(SfxPoolItem::operator==(rAttr));
927 OUString(
"Office.Draw/Zoom") ),
949 sal_Int32
x = 1,
y = 1;
951 if(
pValues[0].hasValue() )
x = *o3tl::doAccess<sal_Int32>(
pValues[ 0 ]);
952 if(
pValues[1].hasValue() )
y = *o3tl::doAccess<sal_Int32>(
pValues[ 1 ]);
980 OUString(
"Office.Impress/Grid" ) :
981 OUString(
"Office.Draw/Grid" )
995 const sal_uInt32 nVal = 1000;
1013 static const char* aPropNamesMetric[] =
1015 "Resolution/XAxis/Metric",
1016 "Resolution/YAxis/Metric",
1017 "Subdivision/XAxis",
1018 "Subdivision/YAxis",
1019 "SnapGrid/XAxis/Metric",
1020 "SnapGrid/YAxis/Metric",
1021 "Option/SnapToGrid",
1022 "Option/Synchronize",
1023 "Option/VisibleGrid",
1026 ppNames = aPropNamesMetric;
1031 static const char* aPropNamesNonMetric[] =
1033 "Resolution/XAxis/NonMetric",
1034 "Resolution/YAxis/NonMetric",
1035 "Subdivision/XAxis",
1036 "Subdivision/YAxis",
1037 "SnapGrid/XAxis/NonMetric",
1038 "SnapGrid/YAxis/NonMetric",
1039 "Option/SnapToGrid",
1040 "Option/Synchronize",
1041 "Option/VisibleGrid",
1044 ppNames = aPropNamesNonMetric;
1056 const sal_uInt32 nDivX =
FRound( *o3tl::doAccess<double>(
pValues[ 2 ]) );
1062 const sal_uInt32 nDivY =
FRound( *o3tl::doAccess<double>(
pValues[ 3 ]) );
1137 OUString(
"Office.Impress/Print" ) :
1138 OUString(
"Office.Draw/Print" ) ) :
1147 bHiddenPages( true ),
1150 bWarningPrinter( true ),
1151 bWarningSize( false ),
1152 bWarningOrientation( false ),
1158 mbHandoutHorizontal( true ),
1159 mnHandoutPages( 6 ),
1194 static const char* aImpressPropNames[] =
1206 "Page/BookletFront",
1209 "Other/FromPrinterSetup",
1211 "Content/Presentation",
1215 "Other/HandoutHorizontal",
1216 "Other/PagesPerHandout"
1219 ppNames = aImpressPropNames;
1223 static const char* aDrawPropNames[] =
1235 "Page/BookletFront",
1238 "Other/FromPrinterSetup",
1243 ppNames = aDrawPropNames;
1311, maOptionsPrint ( false, false )
1317, maOptionsPrint ( false, false )
1350 assert(SfxPoolItem::operator==(rAttr));
const PropertyValue * pValues
BaseContainerNodeSharedPtr & mrParent
MeasurementSystem getMeasurementSystemEnum() const
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
bool operator==(const SdOptionsContents &rOpt) const
SdOptionsContents(bool bImpress)
virtual bool WriteData(css::uno::Any *pValues) const override
virtual bool ReadData(const css::uno::Any *pValues) override
friend class SdOptionsItem
virtual bool WriteData(css::uno::Any *pValues) const =0
std::unique_ptr< SdOptionsItem > mpCfgItem
SdOptionsGeneric(bool bImpress, const OUString &rSubTree)
SAL_DLLPRIVATE css::uno::Sequence< OUString > GetPropertyNames() const
static bool isMetricSystem()
virtual bool ReadData(const css::uno::Any *pValues)=0
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const =0
SAL_DLLPRIVATE void Commit(SdOptionsItem &rCfgItem) const
void EnableModify(bool bModify)
SdOptionsGeneric & operator=(SdOptionsGeneric const &)
virtual ~SdOptionsGeneric()
void SetOptions(SdOptions *pOpts) const
SdOptionsGridItem(SdOptions const *pOpts)
sal_uInt32 GetFieldDrawX() const
sal_uInt32 GetFieldDivisionX() const
sal_uInt32 GetFieldSnapY() const
void SetFieldDrawY(sal_uInt32 nSet)
void SetFieldDrawX(sal_uInt32 nSet)
virtual ~SdOptionsGrid() override
void SetFieldSnapY(sal_uInt32 nSet)
virtual bool ReadData(const css::uno::Any *pValues) override
sal_uInt32 GetFieldSnapX() const
void SetFieldDivisionX(sal_uInt32 nSet)
bool IsGridVisible() const
bool IsUseGridSnap() const
virtual bool WriteData(css::uno::Any *pValues) const override
sal_uInt32 GetFieldDivisionY() const
void SetFieldDivisionY(sal_uInt32 nSet)
void SetEqualGrid(bool bSet)
SdOptionsGrid(bool bImpress)
void SetUseGridSnap(bool bSet)
sal_uInt32 GetFieldDrawY() const
bool IsSynchronize() const
void SetSynchronize(bool bSet)
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
void SetGridVisible(bool bSet)
void SetFieldSnapX(sal_uInt32 nSet)
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
css::uno::Sequence< css::uno::Any > GetProperties(const css::uno::Sequence< OUString > &rNames)
const SdOptionsGeneric & mrParent
virtual void ImplCommit() override
bool PutProperties(const css::uno::Sequence< OUString > &rNames, const css::uno::Sequence< css::uno::Any > &rValues)
virtual ~SdOptionsItem() override
SdOptionsItem(const SdOptionsGeneric &rParent, const OUString &rSubTree)
virtual SdOptionsLayoutItem * Clone(SfxItemPool *pPool=nullptr) const override
SdOptionsLayout maOptionsLayout
virtual bool operator==(const SfxPoolItem &) const override
void SetOptions(SdOptions *pOpts) const
void SetMetric(sal_uInt16 nInMetric)
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
virtual bool ReadData(const css::uno::Any *pValues) override
bool IsMoveOutline() const
bool IsRulerVisible() const
void SetHandlesBezier(bool bOn)
virtual bool WriteData(css::uno::Any *pValues) const override
sal_uInt16 GetDefTab() const
SdOptionsLayout(bool bImpress, bool bUseConfig)
bool IsDragStripes() const
void SetDragStripes(bool bOn)
sal_uInt16 GetMetric() const
bool IsHandlesBezier() const
void SetMoveOutline(bool bOn)
void SetRulerVisible(bool bOn)
bool operator==(const SdOptionsLayout &rOpt) const
void SetHelplines(bool bOn)
void SetDefTab(sal_uInt16 nTab)
SdOptionsMisc maOptionsMisc
virtual SdOptionsMiscItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool operator==(const SfxPoolItem &) const override
void SetOptions(SdOptions *pOpts) const
bool IsPreviewChangedEffects() const
bool IsMasterPagePaintCaching() const
bool IsCrookNoContortion() const
void SetDragThreshold(sal_Int32 nDragThresholdPixels)
bool operator==(const SdOptionsMisc &rOpt) const
void SetShowUndoDeleteWarning(bool bOn)
void SetSummationOfParagraphs(bool bOn)
void SetDefaultObjectSizeHeight(sal_Int32 nHeight)
void SetPresentationPenColor(sal_Int32 nPenColor)
bool IsShowUndoDeleteWarning() const
void SetSlideshowRespectZOrder(bool bOn)
bool IsShowComments() const
bool IsEnableSdremote() const
bool IsSlideshowRespectZOrder() const
bool IsDragWithCopy() const
void SetPreviewChangedEffects(bool bOn)
bool IsDoubleClickTextEdit() const
bool IsPresenterScreenFullScreen() const
void SetPrinterIndependentLayout(sal_uInt16 nOn)
Set the printer independent layout mode.
bool IsEnablePresenterScreen() const
void SetPresenterScreenFullScreen(bool bOn)
bool IsMarkedHitMovesAlways() const
double GetPresentationPenWidth() const
virtual bool ReadData(const css::uno::Any *pValues) override
bool IsStartWithTemplate() const
void SetDisplay(sal_Int32 nDisplay)
bool IsPreviewNewEffects() const
void SetMarkedHitMovesAlways(bool bOn)
void SetShowComments(bool bShow)
sal_Int32 mnDragThresholdPixels
Minimum mouse move distance for it to register as a drag action.
sal_Int32 GetDisplay() const
void SetDoubleClickTextEdit(bool bOn)
bool IsSummationOfParagraphs() const
void SetStartWithTemplate(bool bOn)
sal_Int32 GetDefaultObjectSizeWidth() const
void SetDefaultObjectSizeWidth(sal_Int32 nWidth)
bool IsTabBarVisible() const
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
void SetSolidDragging(bool bOn)
void SetCrookNoContortion(bool bOn)
bool IsPreviewTransitions() const
sal_Int32 GetDefaultObjectSizeHeight() const
void SetQuickEdit(bool bOn)
SdOptionsMisc(bool bImpress, bool bUseConfig)
void SetPresentationPenWidth(double nPenWidth)
void SetMasterPagePaintCaching(bool bOn)
void SetEnablePresenterScreen(bool bOn)
void SetEnableSdremote(bool bOn)
virtual bool WriteData(css::uno::Any *pValues) const override
bool IsMoveOnlyDragging() const
void SetPreviewTransitions(bool bOn)
void SetDragWithCopy(bool bOn)
void SetTabBarVisible(bool bOn)
void SetPickThrough(bool bOn)
void SetMoveOnlyDragging(bool bOn)
void SetClickChangeRotation(bool bOn)
void SetPreviewNewEffects(bool bOn)
sal_uInt16 GetPrinterIndependentLayout() const
Return the currently selected printer independent layout mode.
sal_Int32 GetPresentationPenColor() const
bool IsPickThrough() const
bool IsClickChangeRotation() const
bool IsSolidDragging() const
sal_Int32 GetDragThresholdPixels() const
virtual SdOptionsPrintItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool operator==(const SfxPoolItem &) const override
void SetOptions(SdOptions *pOpts) const
SdOptionsPrint maOptionsPrint
sal_uInt16 GetHandoutPages() const
void SetWarningPrinter(bool bOn)
void SetPaperbin(bool bOn)
void SetHandoutHorizontal(bool bHandoutHorizontal)
void SetFrontPage(bool bOn)
void SetCutPage(bool bOn)
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
bool operator==(const SdOptionsPrint &rOpt) const
void SetBackPage(bool bOn)
void SetBooklet(bool bOn)
void SetPagesize(bool bOn)
void SetWarningSize(bool bOn)
void SetHiddenPages(bool bOn)
virtual bool WriteData(css::uno::Any *pValues) const override
bool IsWarningSize() const
void SetPagename(bool bOn)
void SetWarningOrientation(bool bOn)
void SetOutline(bool bOn)
bool IsWarningOrientation() const
void SetOutputQuality(sal_uInt16 nInQuality)
bool IsHandoutHorizontal() const
bool IsWarningPrinter() const
SdOptionsPrint(bool bImpress, bool bUseConfig)
void SetPagetile(bool bOn)
void SetHandoutPages(sal_uInt16 nHandoutPages)
bool IsHiddenPages() const
void SetHandout(bool bOn)
sal_uInt16 GetOutputQuality() const
virtual bool ReadData(const css::uno::Any *pValues) override
void SetOptions(SdOptions *pOpts) const
SdOptionsSnap maOptionsSnap
virtual bool operator==(const SfxPoolItem &) const override
virtual SdOptionsSnapItem * Clone(SfxItemPool *pPool=nullptr) const override
void SetAngle(Degree100 nIn)
void SetSnapFrame(bool bOn)
void SetSnapArea(sal_Int16 nIn)
void SetSnapPoints(bool bOn)
SdOptionsSnap(bool bImpress, bool bUseConfig)
bool IsSnapHelplines() const
void SetSnapHelplines(bool bOn)
void SetEliminatePolyPointLimitAngle(Degree100 nIn)
bool IsSnapPoints() const
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
Degree100 GetAngle() const
void SetSnapBorder(bool bOn)
bool IsSnapBorder() const
virtual bool WriteData(css::uno::Any *pValues) const override
virtual bool ReadData(const css::uno::Any *pValues) override
Degree100 GetEliminatePolyPointLimitAngle() const
void SetBigOrtho(bool bOn)
sal_Int16 GetSnapArea() const
bool operator==(const SdOptionsSnap &rOpt) const
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
void GetScale(sal_Int32 &rX, sal_Int32 &rY) const
virtual bool WriteData(css::uno::Any *pValues) const override
void SetScale(sal_Int32 nInX, sal_Int32 nInY)
SdOptionsZoom(bool bImpress)
virtual bool ReadData(const css::uno::Any *pValues) override
virtual ~SdOptions() override
sal_Int32 GetDragThresholdPixels() const
bool IsSolidDragging() const
bool IsDragWithCopy() const
bool IsNoDragXorPolys() const
bool IsDragStripes() const
bool IsMarkedHitMovesAlways() const
bool IsPlusHandlesAlwaysVisible() const
bool IsPickThroughTransparentTextFrames() const
bool IsHlplVisible() const
SdrModel & GetModel() const
bool IsCrookNoContortion() const
Degree100 GetEliminatePolyPointLimitAngle() const
bool IsAngleSnapEnabled() const
Degree100 GetSnapAngle() const
bool IsMoveOnlyDragging() const
sal_uInt16 GetSnapMagneticPixel() const
bool IsMasterPagePaintCaching() const
const LocaleDataWrapper & GetLocaleData() const
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 IsClickChangeRotation() const
bool IsDoubleClickTextEdit() const
#define DBG_ASSERT(sCon, aError)
tools::Long FRound(double fVal)
#define SAL_N_ELEMENTS(arr)
static T getSafeValue(const Any &rAny)
const PropertyStruct aPropNames[]
UNDERLYING_TYPE get() const