diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-08-26 12:48:56 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-08-26 12:50:42 +0400 |
commit | e3e68199a47c694b60de754930dd2fe5d43533bb (patch) | |
tree | eb110c7ef11f0da3759b70b96851d348aefc189c /sw | |
parent | 38b0c652e043c5ffee90db8de580046dc4bfa985 (diff) |
String -> OUString
Change-Id: I5bdcad692678b9debb77db4ec08223d38e5c01c5
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/inc/pview.hxx | 4 | ||||
-rw-r--r-- | sw/source/ui/uiview/pview.cxx | 19 |
2 files changed, 11 insertions, 12 deletions
diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx index 0073a5e996bf..9cd0870a6746 100644 --- a/sw/source/ui/inc/pview.hxx +++ b/sw/source/ui/inc/pview.hxx @@ -129,7 +129,7 @@ public: int MovePage( int eMoveMode ); // erzeuge den String fuer die StatusLeiste - void GetStatusStr( String& rStr, sal_uInt16 nPageCount ) const; + OUString GetStatusStr( sal_uInt16 nPageCount ) const; void RepaintCoreRect( const SwRect& rRect ); @@ -186,7 +186,7 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell // to support keyboard the number of the page to go to can be set too sal_uInt16 nNewPage; // visible range - String sPageStr; + OUString sPageStr; Size aDocSz; Rectangle aVisArea; diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index b77ea42d0fa3..4b1e31aaebd6 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -415,7 +415,7 @@ void SwPagePreViewWin::SetWinSize( const Size& rNewSize ) maScale = GetMapMode().GetScaleX(); } -void SwPagePreViewWin::GetStatusStr( String& rStr, sal_uInt16 nPageCnt ) const +OUString SwPagePreViewWin::GetStatusStr( sal_uInt16 nPageCnt ) const { // show physical and virtual page number of // selected page, if it's visible. @@ -428,15 +428,16 @@ void SwPagePreViewWin::GetStatusStr( String& rStr, sal_uInt16 nPageCnt ) const { nPageNum = mnSttPage > 1 ? mnSttPage : 1; } + OUStringBuffer aStatusStr; sal_uInt16 nVirtPageNum = mpPgPrevwLayout->GetVirtPageNumByPageNum( nPageNum ); if( nVirtPageNum && nVirtPageNum != nPageNum ) { - rStr += String::CreateFromInt32( nVirtPageNum ); - rStr += ' '; + aStatusStr.append( static_cast<sal_Int32>(nVirtPageNum) ).append( ' ' ); } - rStr += String::CreateFromInt32( nPageNum ); - rStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM(" / ")); - rStr += String::CreateFromInt32( nPageCnt ); + aStatusStr.append( static_cast<sal_Int32>(nPageNum) ); + aStatusStr.append( " / " ); + aStatusStr.append( static_cast<sal_Int32>(nPageCnt) ); + return aStatusStr.makeStringAndClear(); } void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt ) @@ -1008,8 +1009,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) case FN_STAT_PAGE: { - String aStr( sPageStr ); - aViewWin.GetStatusStr( aStr, mnPageCount ); + OUString aStr = sPageStr + aViewWin.GetStatusStr( mnPageCount ); rSet.Put( SfxStringItem( nWhich, aStr) ); } break; @@ -1337,8 +1337,7 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar ) if( bChg ) { // Statusleiste updaten - String aStr( sPageStr ); - aViewWin.GetStatusStr( aStr, mnPageCount ); + OUString aStr = sPageStr + aViewWin.GetStatusStr( mnPageCount ); SfxBindings& rBindings = GetViewFrame()->GetBindings(); if( bUpdateScrollbar ) |