diff options
author | Noel Grandin <noel@peralex.com> | 2013-07-30 09:58:22 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-07-31 13:36:51 +0200 |
commit | 4a2a2831d131cc09dc9e4b7a40697b8f21c6e380 (patch) | |
tree | 452b5757b396c291b74b7348989817575366beb0 /vcl | |
parent | 55528ca8c2775695543da744d9537436d618607c (diff) |
convert vcl/sttus.hxx from XubString to OUString
Change-Id: I173179068d59e0fbdae66186df1e2e010ecb6112
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/status.cxx | 80 |
1 files changed, 36 insertions, 44 deletions
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 2336cc336ae1..b5bf08bfe8ae 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -73,14 +73,14 @@ struct ImplStatusItem long mnOffset; long mnExtraWidth; long mnX; - XubString maText; - XubString maHelpText; - XubString maQuickHelpText; - OString maHelpId; + OUString maText; + OUString maHelpText; + OUString maQuickHelpText; + OString maHelpId; void* mpUserData; - sal_Bool mbVisible; - XubString maAccessibleName; - XubString maCommand; + sal_Bool mbVisible; + OUString maAccessibleName; + OUString maCommand; }; // ======================================================================= @@ -1259,7 +1259,7 @@ long StatusBar::GetItemOffset( sal_uInt16 nItemId ) const // ----------------------------------------------------------------------- -void StatusBar::SetItemText( sal_uInt16 nItemId, const XubString& rText ) +void StatusBar::SetItemText( sal_uInt16 nItemId, const OUString& rText ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1296,14 +1296,13 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const XubString& rText ) // ----------------------------------------------------------------------- -const XubString& StatusBar::GetItemText( sal_uInt16 nItemId ) const +const OUString& StatusBar::GetItemText( sal_uInt16 nItemId ) const { sal_uInt16 nPos = GetItemPos( nItemId ); - if ( nPos != STATUSBAR_ITEM_NOTFOUND ) - return (*mpItemList)[ nPos ]->maText; + assert( nPos != STATUSBAR_ITEM_NOTFOUND ); - return ImplGetSVEmptyStr(); + return (*mpItemList)[ nPos ]->maText; } // ----------------------------------------------------------------------- @@ -1386,7 +1385,7 @@ void StatusBar::RedrawItem( sal_uInt16 nItemId ) // ----------------------------------------------------------------------- -void StatusBar::SetHelpText( sal_uInt16 nItemId, const XubString& rText ) +void StatusBar::SetHelpText( sal_uInt16 nItemId, const OUString& rText ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1396,34 +1395,31 @@ void StatusBar::SetHelpText( sal_uInt16 nItemId, const XubString& rText ) // ----------------------------------------------------------------------- -const XubString& StatusBar::GetHelpText( sal_uInt16 nItemId ) const +const OUString& StatusBar::GetHelpText( sal_uInt16 nItemId ) const { sal_uInt16 nPos = GetItemPos( nItemId ); - if ( nPos != STATUSBAR_ITEM_NOTFOUND ) + assert ( nPos != STATUSBAR_ITEM_NOTFOUND ); + + ImplStatusItem* pItem = (*mpItemList)[ nPos ]; + if ( pItem->maHelpText.isEmpty() && ( !pItem->maHelpId.isEmpty() || !pItem->maCommand.isEmpty() )) { - ImplStatusItem* pItem = (*mpItemList)[ nPos ]; - if ( !pItem->maHelpText.Len() && ( !pItem->maHelpId.isEmpty() || pItem->maCommand.Len() )) + Help* pHelp = Application::GetHelp(); + if ( pHelp ) { - Help* pHelp = Application::GetHelp(); - if ( pHelp ) - { - if ( pItem->maCommand.Len() ) - pItem->maHelpText = pHelp->GetHelpText( pItem->maCommand, this ); - if ( !pItem->maHelpText.Len() && !pItem->maHelpId.isEmpty() ) - pItem->maHelpText = pHelp->GetHelpText( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this ); - } + if ( !pItem->maCommand.isEmpty() ) + pItem->maHelpText = pHelp->GetHelpText( pItem->maCommand, this ); + if ( pItem->maHelpText.isEmpty() && !pItem->maHelpId.isEmpty() ) + pItem->maHelpText = pHelp->GetHelpText( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this ); } - - return pItem->maHelpText; } - else - return ImplGetSVEmptyStr(); + + return pItem->maHelpText; } // ----------------------------------------------------------------------- -void StatusBar::SetQuickHelpText( sal_uInt16 nItemId, const XubString& rText ) +void StatusBar::SetQuickHelpText( sal_uInt16 nItemId, const OUString& rText ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1433,17 +1429,14 @@ void StatusBar::SetQuickHelpText( sal_uInt16 nItemId, const XubString& rText ) // ----------------------------------------------------------------------- -const XubString& StatusBar::GetQuickHelpText( sal_uInt16 nItemId ) const +const OUString& StatusBar::GetQuickHelpText( sal_uInt16 nItemId ) const { sal_uInt16 nPos = GetItemPos( nItemId ); - if ( nPos != STATUSBAR_ITEM_NOTFOUND ) - { - ImplStatusItem* pItem = (*mpItemList)[ nPos ]; - return pItem->maQuickHelpText; - } + assert ( nPos != STATUSBAR_ITEM_NOTFOUND ); - return ImplGetSVEmptyStr(); + ImplStatusItem* pItem = (*mpItemList)[ nPos ]; + return pItem->maQuickHelpText; } // ----------------------------------------------------------------------- @@ -1475,7 +1468,7 @@ OString StatusBar::GetHelpId( sal_uInt16 nItemId ) const return aRet; } -void StatusBar::StartProgressMode( const XubString& rText ) +void StatusBar::StartProgressMode( const OUString& rText ) { DBG_ASSERT( !mbProgressMode, "StatusBar::StartProgressMode(): progress mode is active" ); @@ -1527,7 +1520,7 @@ void StatusBar::EndProgressMode() DBG_ASSERT( mbProgressMode, "StatusBar::EndProgressMode(): no progress mode" ); mbProgressMode = sal_False; - maPrgsTxt.Erase(); + maPrgsTxt = ""; // Paint neu ausloesen um StatusBar wieder herzustellen SetFillColor( GetSettings().GetStyleSettings().GetFaceColor() ); @@ -1633,7 +1626,7 @@ Size StatusBar::CalcWindowSizePixel() const // ----------------------------------------------------------------------- -void StatusBar::SetAccessibleName( sal_uInt16 nItemId, const XubString& rName ) +void StatusBar::SetAccessibleName( sal_uInt16 nItemId, const OUString& rName ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1651,14 +1644,13 @@ void StatusBar::SetAccessibleName( sal_uInt16 nItemId, const XubString& rName ) // ----------------------------------------------------------------------- -const XubString& StatusBar::GetAccessibleName( sal_uInt16 nItemId ) const +const OUString& StatusBar::GetAccessibleName( sal_uInt16 nItemId ) const { sal_uInt16 nPos = GetItemPos( nItemId ); - if ( nPos != STATUSBAR_ITEM_NOTFOUND ) - return (*mpItemList)[ nPos ]->maAccessibleName; + assert ( nPos != STATUSBAR_ITEM_NOTFOUND ); - return ImplGetSVEmptyStr(); + return (*mpItemList)[ nPos ]->maAccessibleName; } // ----------------------------------------------------------------------- |