From 227113bbf16f2feda4d3e41bb9aff7dc100ede17 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Sat, 14 Apr 2012 21:46:14 +0200 Subject: Slidesorter: Kill more useless cruft. --- .../ui/slidesorter/controller/SlsClipboard.cxx | 11 +++++------ .../slidesorter/inc/view/SlsPageObjectPainter.hxx | 1 - sd/source/ui/slidesorter/inc/view/SlsTheme.hxx | 14 -------------- sd/source/ui/slidesorter/view/SlsButtonBar.cxx | 9 +++++---- .../ui/slidesorter/view/SlsPageObjectPainter.cxx | 1 - sd/source/ui/slidesorter/view/SlsTheme.cxx | 22 ---------------------- 6 files changed, 10 insertions(+), 48 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index afdf1339107e..ec3ea1d2e435 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -35,6 +35,7 @@ #include "model/SlsPageDescriptor.hxx" #include "model/SlsPageEnumerationProvider.hxx" #include "view/SlideSorterView.hxx" +#include "view/SlsResource.hrc" #include "view/SlsTheme.hxx" #include "controller/SlideSorterController.hxx" #include "controller/SlsInsertionIndicatorHandler.hxx" @@ -120,17 +121,16 @@ class Clipboard::UndoContext public: UndoContext ( SdDrawDocument* pDocument, - const ::boost::shared_ptr& rpMainViewShell, - const ::boost::shared_ptr& rpTheme) + const ::boost::shared_ptr& rpMainViewShell) : mpDocument(pDocument), mpMainViewShell(rpMainViewShell) { if (mpDocument!=NULL && mpDocument->IsUndoEnabled()) { if (mpMainViewShell && mpMainViewShell->GetShellType() == ViewShell::ST_DRAW) - mpDocument->BegUndo(rpTheme->GetString(view::Theme::String_DragAndDropPages)); + mpDocument->BegUndo(String(SdResId(STRING_DRAG_AND_DROP_PAGES))); else - mpDocument->BegUndo(rpTheme->GetString(view::Theme::String_DragAndDropSlides)); + mpDocument->BegUndo(String(SdResId(STRING_DRAG_AND_DROP_SLIDES))); } } @@ -714,8 +714,7 @@ sal_Int8 Clipboard::ExecuteDrop ( // Handle a general drop operation. mpUndoContext.reset(new UndoContext ( mrSlideSorter.GetModel().GetDocument(), - mrSlideSorter.GetViewShell()->GetViewShellBase().GetMainViewShell(), - mrSlideSorter.GetTheme())); + mrSlideSorter.GetViewShell()->GetViewShellBase().GetMainViewShell())); mpSelectionObserverContext.reset(new SelectionObserver::Context(mrSlideSorter)); HandlePageDrop(*pDragTransferable); diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx index 51c7157538c4..ca45f8bb6594 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx @@ -96,7 +96,6 @@ private: Bitmap maMouseOverBackground; Bitmap maMouseOverFocusedBackground; Bitmap maMouseOverSelectedAndFocusedBackground; - ::rtl::OUString msUnhideString; ButtonBar& mrButtonBar; Size maSize; diff --git a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx index 7e00ef33228a..2d60385c4582 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx @@ -164,19 +164,6 @@ public: }; const BitmapEx& GetIcon (const IconType eType); - enum StringType - { - String_Unhide, - String_DragAndDropPages, - String_DragAndDropSlides, - String_Command1, - String_Command2, - String_Command2B, - String_Command3, - _StringType_Size_ - }; - ::rtl::OUString GetString (const StringType eType) const; - private: bool mbIsHighContrastMode; class GradientDescriptor @@ -202,7 +189,6 @@ private: ::std::vector maGradients; ::std::vector maIcons; ::std::vector maColor; - ::std::vector maStrings; GradientDescriptor& GetGradient (const GradientColorType eType); /** Guarded initialization of the specified icon in the maIcons diff --git a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx index afe64c994770..28c5a26a3c11 100644 --- a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx +++ b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx @@ -30,6 +30,7 @@ #include "view/SlsButtonBar.hxx" #include "SlideSorter.hxx" +#include "SlsResource.hxx" #include "model/SlsPageDescriptor.hxx" #include "model/SlideSorterModel.hxx" #include "view/SlsTheme.hxx" @@ -1070,7 +1071,7 @@ UnhideButton::UnhideButton (SlideSorter& rSlideSorter) rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BMediumHover), rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BSmall), rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BSmallHover), - rSlideSorter.GetTheme()->GetString(Theme::String_Command2B)) + String(SdResId(STRING_COMMAND2_B))) { } @@ -1102,7 +1103,7 @@ StartShowButton::StartShowButton (SlideSorter& rSlideSorter) rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1MediumHover), rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1Small), rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1SmallHover), - rSlideSorter.GetTheme()->GetString(Theme::String_Command1)) + String(SdResId(STRING_COMMAND1))) { } @@ -1168,7 +1169,7 @@ HideButton::HideButton (SlideSorter& rSlideSorter) rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2MediumHover), rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2Small), rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2SmallHover), - rSlideSorter.GetTheme()->GetString(Theme::String_Command2)) + String(SdResId(STRING_COMMAND2_A))) { } @@ -1200,7 +1201,7 @@ DuplicateButton::DuplicateButton (SlideSorter& rSlideSorter) rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3MediumHover), rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3Small), rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3SmallHover), - rSlideSorter.GetTheme()->GetString(Theme::String_Command3)) + String(SdResId(STRING_COMMAND3))) { } diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx index 430cbaca37ff..2cd8f70df508 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx @@ -67,7 +67,6 @@ PageObjectPainter::PageObjectPainter ( maFocusedSelectionBackground(), maMouseOverBackground(), maMouseOverFocusedBackground(), - msUnhideString(mpTheme->GetString(Theme::String_Unhide)), mrButtonBar(rSlideSorter.GetView().GetButtonBar()), maSize() { diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx index efd93a535e8d..c6b2bc5c9b11 100644 --- a/sd/source/ui/slidesorter/view/SlsTheme.cxx +++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx @@ -83,14 +83,6 @@ Theme::Theme (const ::boost::shared_ptr& rpProperties) { LocalResource aResource (RID_SLIDESORTER_ICONS); - maStrings.resize(_StringType_Size_); - maStrings[String_DragAndDropPages] = String(SdResId(STRING_DRAG_AND_DROP_PAGES)); - maStrings[String_DragAndDropSlides] = String(SdResId(STRING_DRAG_AND_DROP_SLIDES)); - maStrings[String_Command1] = String(SdResId(STRING_COMMAND1)); - maStrings[String_Command2] = String(SdResId(STRING_COMMAND2_A)); - maStrings[String_Command2B] = String(SdResId(STRING_COMMAND2_B)); - maStrings[String_Command3] = String(SdResId(STRING_COMMAND3)); - maColor.resize(_ColorType_Size_); maColor[Color_Background] = maBackgroundColor; maColor[Color_PageNumberDefault] = 0x0808080; @@ -352,20 +344,6 @@ const BitmapEx& Theme::GetIcon (const IconType eType) -::rtl::OUString Theme::GetString (const StringType eType) const -{ - if (eType>=0 && size_t(eType)=0 && size_t(eType)=0 && size_t(eType)