Kaydet (Commit) e3e68199 authored tarafından Ivan Timofeev's avatar Ivan Timofeev

String -> OUString

Change-Id: I5bdcad692678b9debb77db4ec08223d38e5c01c5
üst 38b0c652
...@@ -129,7 +129,7 @@ public: ...@@ -129,7 +129,7 @@ public:
int MovePage( int eMoveMode ); int MovePage( int eMoveMode );
// erzeuge den String fuer die StatusLeiste // 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 ); void RepaintCoreRect( const SwRect& rRect );
...@@ -186,7 +186,7 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell ...@@ -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 // to support keyboard the number of the page to go to can be set too
sal_uInt16 nNewPage; sal_uInt16 nNewPage;
// visible range // visible range
String sPageStr; OUString sPageStr;
Size aDocSz; Size aDocSz;
Rectangle aVisArea; Rectangle aVisArea;
......
...@@ -415,7 +415,7 @@ void SwPagePreViewWin::SetWinSize( const Size& rNewSize ) ...@@ -415,7 +415,7 @@ void SwPagePreViewWin::SetWinSize( const Size& rNewSize )
maScale = GetMapMode().GetScaleX(); 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 // show physical and virtual page number of
// selected page, if it's visible. // selected page, if it's visible.
...@@ -428,15 +428,16 @@ void SwPagePreViewWin::GetStatusStr( String& rStr, sal_uInt16 nPageCnt ) const ...@@ -428,15 +428,16 @@ void SwPagePreViewWin::GetStatusStr( String& rStr, sal_uInt16 nPageCnt ) const
{ {
nPageNum = mnSttPage > 1 ? mnSttPage : 1; nPageNum = mnSttPage > 1 ? mnSttPage : 1;
} }
OUStringBuffer aStatusStr;
sal_uInt16 nVirtPageNum = mpPgPrevwLayout->GetVirtPageNumByPageNum( nPageNum ); sal_uInt16 nVirtPageNum = mpPgPrevwLayout->GetVirtPageNumByPageNum( nPageNum );
if( nVirtPageNum && nVirtPageNum != nPageNum ) if( nVirtPageNum && nVirtPageNum != nPageNum )
{ {
rStr += String::CreateFromInt32( nVirtPageNum ); aStatusStr.append( static_cast<sal_Int32>(nVirtPageNum) ).append( ' ' );
rStr += ' ';
} }
rStr += String::CreateFromInt32( nPageNum ); aStatusStr.append( static_cast<sal_Int32>(nPageNum) );
rStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM(" / ")); aStatusStr.append( " / " );
rStr += String::CreateFromInt32( nPageCnt ); aStatusStr.append( static_cast<sal_Int32>(nPageCnt) );
return aStatusStr.makeStringAndClear();
} }
void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt ) void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
...@@ -1008,8 +1009,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) ...@@ -1008,8 +1009,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
case FN_STAT_PAGE: case FN_STAT_PAGE:
{ {
String aStr( sPageStr ); OUString aStr = sPageStr + aViewWin.GetStatusStr( mnPageCount );
aViewWin.GetStatusStr( aStr, mnPageCount );
rSet.Put( SfxStringItem( nWhich, aStr) ); rSet.Put( SfxStringItem( nWhich, aStr) );
} }
break; break;
...@@ -1337,8 +1337,7 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar ) ...@@ -1337,8 +1337,7 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
if( bChg ) if( bChg )
{ {
// Statusleiste updaten // Statusleiste updaten
String aStr( sPageStr ); OUString aStr = sPageStr + aViewWin.GetStatusStr( mnPageCount );
aViewWin.GetStatusStr( aStr, mnPageCount );
SfxBindings& rBindings = GetViewFrame()->GetBindings(); SfxBindings& rBindings = GetViewFrame()->GetBindings();
if( bUpdateScrollbar ) if( bUpdateScrollbar )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment