From f20422ce9edfd5d49df97b80a9e615d59d0fcba2 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 16 Nov 2016 14:31:04 +0200 Subject: loplugin:datamembershadow in StyleSheetUndoAction Change-Id: Ic4de30f7e9582078562b661545ac23fe9927f83d Reviewed-on: https://gerrit.libreoffice.org/30903 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sd/source/ui/dlg/unchss.cxx | 9 ++------- sd/source/ui/inc/unchss.hxx | 3 --- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'sd/source') diff --git a/sd/source/ui/dlg/unchss.cxx b/sd/source/ui/dlg/unchss.cxx index f568d9513b8e..a0cd44131be1 100644 --- a/sd/source/ui/dlg/unchss.cxx +++ b/sd/source/ui/dlg/unchss.cxx @@ -51,7 +51,7 @@ StyleSheetUndoAction::StyleSheetUndoAction(SdDrawDocument* pTheDoc, mpOldSet = o3tl::make_unique(static_cast(SdrObject::GetGlobalDrawObjectItemPool()), mpStyleSheet->GetItemSet().GetRanges()); SdrModel::MigrateItemSet( &mpStyleSheet->GetItemSet(), mpOldSet.get(), pTheDoc ); - maComment = SD_RESSTR(STR_UNDO_CHANGE_PRES_OBJECT); + OUString aComment(SD_RESSTR(STR_UNDO_CHANGE_PRES_OBJECT)); OUString aName(mpStyleSheet->GetName()); // delete layout name and separator @@ -91,7 +91,7 @@ StyleSheetUndoAction::StyleSheetUndoAction(SdDrawDocument* pTheDoc, } // replace placeholder with template name - maComment = maComment.replaceFirst("$", aName); + SetComment(aComment.replaceFirst("$", aName)); } void StyleSheetUndoAction::Undo() @@ -118,9 +118,4 @@ void StyleSheetUndoAction::Redo() mpStyleSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED)); } -OUString StyleSheetUndoAction::GetComment() const -{ - return maComment; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/unchss.hxx b/sd/source/ui/inc/unchss.hxx index 170534acfcc3..f77d5cb78312 100644 --- a/sd/source/ui/inc/unchss.hxx +++ b/sd/source/ui/inc/unchss.hxx @@ -34,7 +34,6 @@ class StyleSheetUndoAction : public SdUndoAction std::unique_ptr mpNewSet; std::unique_ptr mpOldSet; - OUString maComment; public: StyleSheetUndoAction(SdDrawDocument* pTheDoc, @@ -43,8 +42,6 @@ public: virtual void Undo() override; virtual void Redo() override; - - virtual OUString GetComment() const override; }; #endif // INCLUDED_SD_SOURCE_UI_INC_UNCHSS_HXX -- cgit