diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-04-29 23:36:57 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-04-30 11:22:09 +0100 |
commit | 8a0685d49f679d6f98de2f357f1ec74590573852 (patch) | |
tree | 97eb05105a45186049c1c3dad20233c29747ed9c /vcl | |
parent | b18cfdc7cd3755c147970f86d23973f337be01a7 (diff) |
make ResId::toString a non-static member
Change-Id: I756c0a19bea7b1cc0e290d9f382a04d655819bfb
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/stdtext.hxx | 2 | ||||
-rw-r--r-- | vcl/source/app/stdtext.cxx | 7 | ||||
-rw-r--r-- | vcl/source/app/svdata.cxx | 32 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 3 | ||||
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/brdwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/msgbox.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/splitwin.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/resourceprovider.cxx | 6 |
12 files changed, 39 insertions, 39 deletions
diff --git a/vcl/inc/vcl/stdtext.hxx b/vcl/inc/vcl/stdtext.hxx index 693a2692b010..cd9b87f9c535 100644 --- a/vcl/inc/vcl/stdtext.hxx +++ b/vcl/inc/vcl/stdtext.hxx @@ -43,7 +43,7 @@ class Window; #define STANDARD_TEXT_SERVICE_NOT_AVAILABLE ((sal_uInt16)0) #define STANDARD_TEXT_LAST STANDARD_TEXT_SERVICE_NOT_AVAILABLE -XubString VCL_DLLPUBLIC GetStandardText( sal_uInt16 nStdText ); +rtl::OUString VCL_DLLPUBLIC GetStandardText( sal_uInt16 nStdText ); // ------------------------------------- // - Hilfsmethoden fuer Standard-Texte - diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx index a0c4fcf6ee0a..d7d5e85ed120 100644 --- a/vcl/source/app/stdtext.cxx +++ b/vcl/source/app/stdtext.cxx @@ -36,13 +36,12 @@ // ======================================================================= -XubString GetStandardText( sal_uInt16 nStdText ) +rtl::OUString GetStandardText( sal_uInt16 nStdText ) { ResMgr* pResMgr = ImplGetResMgr(); - XubString aText; if( pResMgr ) - aText = XubString( ResId( nStdText-STANDARD_TEXT_FIRST+SV_STDTEXT_FIRST, *pResMgr ) ); - return aText; + return ResId(nStdText-STANDARD_TEXT_FIRST+SV_STDTEXT_FIRST, *pResMgr); + return rtl::OUString(); } // ======================================================================= diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index e2809d995d80..d2eb8bf68d19 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -400,11 +400,11 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) ResMgr *pResMgr = ImplGetResMgr(); if( bErrorMessage && bAllowCancel && pResMgr ) { - String aTitle(ResId(SV_ACCESSERROR_JAVA_NOT_CONFIGURED, *pResMgr)); - String aMessage(ResId(SV_ACCESSERROR_JAVA_MSG, *pResMgr)); + String aTitle(ResId(SV_ACCESSERROR_JAVA_NOT_CONFIGURED, *pResMgr).toString()); + String aMessage((ResId(SV_ACCESSERROR_JAVA_MSG, *pResMgr)).toString()); aMessage += String(" ", 1, RTL_TEXTENCODING_ASCII_US); - aMessage += String(ResId(SV_ACCESSERROR_OK_CANCEL_MSG, *pResMgr)); + aMessage += ResId(SV_ACCESSERROR_OK_CANCEL_MSG, *pResMgr).toString(); int ret = ImplGetSalSystem()->ShowNativeMessageBox( aTitle, @@ -424,11 +424,11 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) ResMgr *pResMgr = ImplGetResMgr(); if( bErrorMessage && bAllowCancel && pResMgr ) { - String aTitle(ResId(SV_ACCESSERROR_FAULTY_JAVA, *pResMgr)); - String aMessage(ResId(SV_ACCESSERROR_JAVA_MSG, *pResMgr)); + String aTitle(ResId(SV_ACCESSERROR_FAULTY_JAVA, *pResMgr).toString()); + String aMessage(ResId(SV_ACCESSERROR_JAVA_MSG, *pResMgr).toString()); aMessage += String(" ", 1, RTL_TEXTENCODING_ASCII_US); - aMessage += String(ResId(SV_ACCESSERROR_OK_CANCEL_MSG, *pResMgr)); + aMessage += ResId(SV_ACCESSERROR_OK_CANCEL_MSG, *pResMgr).toString(); int ret = ImplGetSalSystem()->ShowNativeMessageBox( aTitle, @@ -448,11 +448,11 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) ResMgr *pResMgr = ImplGetResMgr(); if( bErrorMessage && bAllowCancel && pResMgr ) { - String aTitle(ResId(SV_ACCESSERROR_MISSING_JAVA, *pResMgr)); - String aMessage(ResId(SV_ACCESSERROR_JAVA_MSG, *pResMgr)); + String aTitle(ResId(SV_ACCESSERROR_MISSING_JAVA, *pResMgr).toString()); + String aMessage(ResId(SV_ACCESSERROR_JAVA_MSG, *pResMgr).toString()); aMessage += String(" ", 1, RTL_TEXTENCODING_ASCII_US); - aMessage += String(ResId(SV_ACCESSERROR_OK_CANCEL_MSG, *pResMgr)); + aMessage += ResId(SV_ACCESSERROR_OK_CANCEL_MSG, *pResMgr).toString(); int ret = ImplGetSalSystem()->ShowNativeMessageBox( aTitle, @@ -472,11 +472,11 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) ResMgr *pResMgr = ImplGetResMgr(); if( bErrorMessage && bAllowCancel && pResMgr ) { - String aTitle(ResId(SV_ACCESSERROR_JAVA_DISABLED, *pResMgr)); - String aMessage(ResId(SV_ACCESSERROR_JAVA_MSG, *pResMgr)); + String aTitle(ResId(SV_ACCESSERROR_JAVA_DISABLED, *pResMgr).toString()); + String aMessage(ResId(SV_ACCESSERROR_JAVA_MSG, *pResMgr).toString()); aMessage += String(" ", 1, RTL_TEXTENCODING_ASCII_US); - aMessage += String(ResId(SV_ACCESSERROR_OK_CANCEL_MSG, *pResMgr)); + aMessage += ResId(SV_ACCESSERROR_OK_CANCEL_MSG, *pResMgr).toString(); int ret = ImplGetSalSystem()->ShowNativeMessageBox( aTitle, @@ -497,15 +497,15 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) if( bErrorMessage && pResMgr ) { String aTitle; - String aMessage(ResId(SV_ACCESSERROR_BRIDGE_MSG, *pResMgr)); + String aMessage(ResId(SV_ACCESSERROR_BRIDGE_MSG, *pResMgr).toString()); if( 0 == e.Message.compareTo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ClassNotFound")), 13) ) { - aTitle = String(ResId(SV_ACCESSERROR_MISSING_BRIDGE, *pResMgr)); + aTitle = ResId(SV_ACCESSERROR_MISSING_BRIDGE, *pResMgr).toString(); } else if( 0 == e.Message.compareTo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NoSuchMethod")), 12) ) { - aTitle = String(ResId(SV_ACCESSERROR_WRONG_VERSION, *pResMgr)); + aTitle = ResId(SV_ACCESSERROR_WRONG_VERSION, *pResMgr).toString(); } if( aTitle.Len() != 0 ) @@ -516,7 +516,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) // startup. Since the office will be probably unusable for a disabled user, we offer // to terminate directly. aMessage += String(" ", 1, RTL_TEXTENCODING_ASCII_US); - aMessage += String(ResId(SV_ACCESSERROR_OK_CANCEL_MSG, *pResMgr)); + aMessage += ResId(SV_ACCESSERROR_OK_CANCEL_MSG, *pResMgr).toString(); int ret = ImplGetSalSystem()->ShowNativeMessageBox( aTitle, diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index fd8d002bdccc..3e09946ed16f 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -150,8 +150,7 @@ XubString Button::GetStandardText( StandardButtonType eButton ) if( pResMgr ) { sal_uInt32 nResId = aResIdAry[(sal_uInt16)eButton].nResId; - ResId aResId( nResId, *pResMgr ); - aText = String( aResId ); + aText = ResId(nResId, *pResMgr).toString(); // Windows (apparently) has some magic auto-accelerator evil around // ok / cancel so add this only for Unix diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index ad45bd1244b7..012562f5a465 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -2931,7 +2931,7 @@ void OutputDevice::ImplInitFontList() const ResMgr* pMgr = ImplGetResMgr(); if( pMgr ) { - String aResStr( ResId( SV_ACCESSERROR_NO_FONTS, *pMgr ) ); + String aResStr(ResId(SV_ACCESSERROR_NO_FONTS, *pMgr).toString()); if( aResStr.Len() ) aError = aResStr; } diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 1a4b9405c390..0df6e9d4a8d8 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -260,7 +260,7 @@ static rtl::OUString queryFile( Printer* pPrinter ) xFilterMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.PRN" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ) ); #endif // add arbitrary files - xFilterMgr->appendFilter( String( VclResId( SV_STDTEXT_ALLFILETYPES ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.*" ) ) ); + xFilterMgr->appendFilter(VclResId(SV_STDTEXT_ALLFILETYPES), "*.*"); } catch (const lang::IllegalArgumentException&) { diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 712c3b398578..22dff3573389 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -998,7 +998,7 @@ String ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData, } if( nHelpId && ImplGetResMgr() ) - aHelpStr = String( ResId( nHelpId, *ImplGetResMgr() ) ); + aHelpStr = ResId(nHelpId, *ImplGetResMgr()).toString(); return aHelpStr; } diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index eaca00dc0c9c..39536d7dfd15 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -3675,7 +3675,7 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong ResMgr* pResMgr = ImplGetResMgr(); if( pResMgr ) { - String aTmpEntryText( ResId( SV_RESID_STRING_NOSELECTIONPOSSIBLE, *pResMgr ) ); + rtl::OUString aTmpEntryText( ResId( SV_RESID_STRING_NOSELECTIONPOSSIBLE, *pResMgr ) ); MenuItemData* pData = pItemList->Insert( 0xFFFF, MENUITEM_STRING, 0, aTmpEntryText, Image(), NULL, 0xFFFF ); pData->bIsTemporary = sal_True; @@ -5163,15 +5163,15 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) : aCloser.InsertItem( IID_DOCUMENTCLOSE, aCloser.maImage, 0 ); aCloser.SetSelectHdl( LINK( this, MenuBarWindow, CloserHdl ) ); aCloser.AddEventListener( LINK( this, MenuBarWindow, ToolboxEventHdl ) ); - aCloser.SetQuickHelpText( IID_DOCUMENTCLOSE, XubString( ResId( SV_HELPTEXT_CLOSEDOCUMENT, *pResMgr ) ) ); + aCloser.SetQuickHelpText( IID_DOCUMENTCLOSE, ResId(SV_HELPTEXT_CLOSEDOCUMENT, *pResMgr).toString() ); aFloatBtn.SetClickHdl( LINK( this, MenuBarWindow, FloatHdl ) ); aFloatBtn.SetSymbol( SYMBOL_FLOAT ); - aFloatBtn.SetQuickHelpText( XubString( ResId( SV_HELPTEXT_RESTORE, *pResMgr ) ) ); + aFloatBtn.SetQuickHelpText( ResId(SV_HELPTEXT_RESTORE, *pResMgr).toString() ); aHideBtn.SetClickHdl( LINK( this, MenuBarWindow, HideHdl ) ); aHideBtn.SetSymbol( SYMBOL_HIDE ); - aHideBtn.SetQuickHelpText( XubString( ResId( SV_HELPTEXT_MINIMIZE, *pResMgr ) ) ); + aHideBtn.SetQuickHelpText( ResId(SV_HELPTEXT_MINIMIZE, *pResMgr).toString() ); } ImplInitStyleSettings(); diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 4e5e796657f9..6863d2e81507 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -520,7 +520,7 @@ void WarningBox::SetDefaultCheckBoxText() { ResMgr* pResMgr = ImplGetResMgr(); if( pResMgr ) - maCheckBoxText = XubString( ResId( SV_STDTEXT_DONTWARNAGAIN, *pResMgr ) ); + maCheckBoxText = ResId(SV_STDTEXT_DONTWARNAGAIN, *pResMgr).toString(); } // ----------------------------------------------------------------------- @@ -611,7 +611,7 @@ void QueryBox::SetDefaultCheckBoxText() { ResMgr* pResMgr = ImplGetResMgr(); if( pResMgr ) - maCheckBoxText = XubString( ResId( SV_STDTEXT_DONTASKAGAIN, *pResMgr ) ); + maCheckBoxText = ResId(SV_STDTEXT_DONTASKAGAIN, *pResMgr).toString(); } // ----------------------------------------------------------------------- diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index ddbbc76d3a3b..f3386100d5ef 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -65,7 +65,7 @@ PrintDialog::PrintPreviewWindow::PrintPreviewWindow( Window* i_pParent, const Re : Window( i_pParent, i_rId ) , maOrigSize( 10, 10 ) , maPageVDev( *this ) - , maToolTipString( String( VclResId( SV_PRINT_PRINTPREVIEW_TXT ) ) ) + , maToolTipString(VclResId( SV_PRINT_PRINTPREVIEW_TXT).toString()) , mbGreyscale( false ) , maHorzDim( this, WB_HORZ | WB_CENTER ) , maVertDim( this, WB_VERT | WB_VCENTER ) @@ -732,11 +732,11 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont , maCancelButton( this, VclResId( SV_PRINT_CANCEL ) ) , maHelpButton( this, VclResId( SV_PRINT_HELP ) ) , maPController( i_rController ) - , maNoPageStr( String( VclResId( SV_PRINT_NOPAGES ) ) ) + , maNoPageStr( VclResId( SV_PRINT_NOPAGES ).toString() ) , mnCurPage( 0 ) , mnCachedPages( 0 ) - , maPrintToFileText( String( VclResId( SV_PRINT_TOFILE_TXT ) ) ) - , maDefPrtText( String( VclResId( SV_PRINT_DEFPRT_TXT ) ) ) + , maPrintToFileText( VclResId( SV_PRINT_TOFILE_TXT ).toString() ) + , maDefPrtText( VclResId( SV_PRINT_DEFPRT_TXT ).toString() ) , mbShowLayoutPage( sal_True ) { FreeResource(); diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 64bec907b4f3..2d5d88113a09 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -2708,7 +2708,7 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt ) XubString aStr; ResMgr* pResMgr = ImplGetResMgr(); if( pResMgr ) - aStr = XubString( ResId( nHelpResId, *pResMgr ) ); + aStr = ResId( nHelpResId, *pResMgr ).toString(); if ( rHEvt.GetMode() & HELPMODE_BALLOON ) Help::ShowBalloon( this, aHelpRect.Center(), aHelpRect, aStr ); else diff --git a/vcl/unx/gtk/fpicker/resourceprovider.cxx b/vcl/unx/gtk/fpicker/resourceprovider.cxx index b12d4e1f99da..19796be9d326 100644 --- a/vcl/unx/gtk/fpicker/resourceprovider.cxx +++ b/vcl/unx/gtk/fpicker/resourceprovider.cxx @@ -85,9 +85,11 @@ rtl::OUString SalGtkPicker::getResString( sal_Int32 aId ) // translate the control id to a resource id sal_Int16 aResId = CtrlIdToResId( aId ); if ( aResId > -1 ) - aResString = String( ResId( aResId, *ImplGetResMgr() ) ); + aResString = ResId(aResId, *ImplGetResMgr()).toString(); + } + catch(...) + { } - catch(...) { } return aResString.replace('~', '_'); } |