From 0bc070587c3ef5dd30975885d8331c337ba9a2da Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 23 Jul 2015 11:26:08 +0200 Subject: simplify SdOptions::StoreConfig nobody calls it with anything other than the default value Change-Id: I9c3a975ed7f0e22c58aad7bf733a26f79244ca26 --- sd/source/ui/app/optsitem.cxx | 31 +++++++++---------------------- sd/source/ui/inc/optsitem.hxx | 14 +------------- 2 files changed, 10 insertions(+), 35 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index 4e8ef7296313..14a3fc018bb4 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -1425,28 +1425,15 @@ SdOptions::~SdOptions() { } -void SdOptions::StoreConfig( sal_uLong nOptionsRange ) -{ - if( nOptionsRange & SD_OPTIONS_LAYOUT ) - SdOptionsLayout::Store(); - - if( nOptionsRange & SD_OPTIONS_CONTENTS ) - SdOptionsContents::Store(); - - if( nOptionsRange & SD_OPTIONS_MISC ) - SdOptionsMisc::Store(); - - if( nOptionsRange & SD_OPTIONS_SNAP ) - SdOptionsSnap::Store(); - - if( nOptionsRange & SD_OPTIONS_ZOOM ) - SdOptionsZoom::Store(); - - if( nOptionsRange & SD_OPTIONS_GRID ) - SdOptionsGrid::Store(); - - if( nOptionsRange & SD_OPTIONS_PRINT ) - SdOptionsPrint::Store(); +void SdOptions::StoreConfig() +{ + SdOptionsLayout::Store(); + SdOptionsContents::Store(); + SdOptionsMisc::Store(); + SdOptionsSnap::Store(); + SdOptionsZoom::Store(); + SdOptionsGrid::Store(); + SdOptionsPrint::Store(); } sal_Int32 SdOptionsMisc::GetDisplay() const diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx index 47e1bae7f3cc..e0fe1a4330d4 100644 --- a/sd/source/ui/inc/optsitem.hxx +++ b/sd/source/ui/inc/optsitem.hxx @@ -28,18 +28,6 @@ #include #include "sddllapi.h" -// Option ranges - -#define SD_OPTIONS_ALL 0xffffffff - -#define SD_OPTIONS_LAYOUT 0x00000001 -#define SD_OPTIONS_CONTENTS 0x00000002 -#define SD_OPTIONS_MISC 0x00000004 -#define SD_OPTIONS_SNAP 0x00000008 -#define SD_OPTIONS_ZOOM 0x00000010 -#define SD_OPTIONS_GRID 0x00000020 -#define SD_OPTIONS_PRINT 0x00000040 - class SdOptions; namespace sd { @@ -598,7 +586,7 @@ public: SdOptions( sal_uInt16 nConfigId ); virtual ~SdOptions(); - void StoreConfig( sal_uLong nOptionRange = SD_OPTIONS_ALL ); + void StoreConfig(); }; #endif // INCLUDED_SD_SOURCE_UI_INC_OPTSITEM_HXX -- cgit