sw/source/ui/inc/pview.hxx | 4 ++-- sw/source/ui/uiview/pview.cxx | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-)
New commits: commit e3e68199a47c694b60de754930dd2fe5d43533bb Author: Ivan Timofeev <timofeev....@gmail.com> Date: Sun Aug 26 12:48:56 2012 +0400 String -> OUString Change-Id: I5bdcad692678b9debb77db4ec08223d38e5c01c5 diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx index 0073a5e..9cd0870 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 b77ea42..4b1e31a 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 ) commit 38b0c652e043c5ffee90db8de580046dc4bfa985 Author: Ivan Timofeev <timofeev....@gmail.com> Date: Sun Aug 26 11:30:07 2012 +0400 SwPagePreView: initialize sPageStr this adds "Page " to the page number info in the statusbar and to the scrollbar's tooltip in the page preview mode. Change-Id: Ia1dda0e98777465ef87364f12437449ca7787510 diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 631f12b..b77ea42 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1189,6 +1189,7 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): SfxViewShell( pViewFrame, SWVIEWFLAGS ), aViewWin( &pViewFrame->GetWindow(), *this ), nNewPage(USHRT_MAX), + sPageStr(SW_RES(STR_PAGE)), pHScrollbar(0), pVScrollbar(0), pPageUpBtn(0), _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits