From bb145132b87be8690d4b3b23f15bba11a2a0d94c Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Mon, 19 Aug 2013 01:57:24 +0200 Subject: String to OUString Change-Id: I87b26b5eb3314cd2129f9e23870a59ccff53a02a Reviewed-on: https://gerrit.libreoffice.org/5556 Reviewed-by: Michael Stahl Tested-by: Michael Stahl --- sw/inc/PostItMgr.hxx | 13 +++++-------- sw/inc/postithelper.hxx | 1 - sw/source/ui/docvw/PostItMgr.cxx | 8 +++----- 3 files changed, 8 insertions(+), 14 deletions(-) (limited to 'sw') diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 6a605a3aacf1..888a5ac772c2 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -17,13 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef _POSTITMGR_HXX -#define _POSTITMGR_HXX +#ifndef POSTITMGR_HXX +#define POSTITMGR_HXX #include #include #include -#include +#include #include #include #include @@ -215,10 +215,10 @@ class SwPostItMgr: public SfxListener void CorrectPositions(); void SetLayout() { mbLayout = true; }; - void Delete(String aAuthor); + void Delete(OUString aAuthor); void Delete(); - void Hide( const String& rAuthor ); + void Hide( const OUString& rAuthor ); void Hide(); void Show(); @@ -283,7 +283,4 @@ class SwPostItMgr: public SfxListener #endif - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index 2a304d502788..7648015fe5d8 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -29,7 +29,6 @@ class SwTxtFld; class SwRootFrm; -class String; class SwPostItMgr; class SwEditWin; namespace sw { namespace sidebarwindows { diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index d45e5bdf36e6..ef6ad1fe2b4b 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -1152,7 +1152,7 @@ void SwPostItMgr::RemoveSidebarWin() // copy to new vector, otherwise RemoveItem would operate and delete stuff on mvPostItFlds as well // RemoveItem will clean up the core field and visible postit if necessary // we cannot just delete everything as before, as postits could move into change tracking -void SwPostItMgr::Delete(String aAuthor) +void SwPostItMgr::Delete(OUString aAuthor) { mpWrtShell->StartAllAction(); if ( HasActiveSidebarWin() && (GetActiveSidebarWin()->GetAuthor()==aAuthor) ) @@ -1160,9 +1160,7 @@ void SwPostItMgr::Delete(String aAuthor) SetActiveSidebarWin(0); } SwRewriter aRewriter; - String aUndoString = SW_RES(STR_DELETE_AUTHOR_NOTES); - aUndoString += aAuthor; - aRewriter.AddRule(UndoArg1, aUndoString); + aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_DELETE_AUTHOR_NOTES) + aAuthor); mpWrtShell->StartUndo( UNDO_DELETE, &aRewriter ); std::vector aTmp; @@ -1213,7 +1211,7 @@ void SwPostItMgr::Delete() CalcRects(); LayoutPostIts(); } -void SwPostItMgr::Hide( const String& rAuthor ) +void SwPostItMgr::Hide( const OUString& rAuthor ) { for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) { -- cgit