desktop/source/app/app.cxx | 10 +++--- desktop/source/app/dispatchwatcher.hxx | 10 ------ desktop/source/deployment/gui/dp_gui_dialog2.cxx | 3 -- desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx | 16 +++++------ framework/source/uielement/headermenucontroller.cxx | 2 - framework/source/uielement/langselectionmenucontroller.cxx | 6 ++-- framework/source/uielement/toolbarsmenucontroller.cxx | 2 - include/formula/FormulaCompiler.hxx | 12 +------- svtools/source/uno/genericunodialog.cxx | 2 - unotools/source/config/cmdoptions.cxx | 13 +------- unotools/source/config/extendedsecurityoptions.cxx | 10 ------ unotools/source/config/optionsdlg.cxx | 10 ------ unotools/source/config/pathoptions.cxx | 12 +------- vcl/inc/svids.hrc | 1 vcl/source/src/btntext.src | 5 +++ vcl/source/window/builder.cxx | 2 + 16 files changed, 37 insertions(+), 79 deletions(-)
New commits: commit 0cd21c2bedb2eacc3d0898046d43047bcc3ac1a9 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Sep 17 09:32:56 2013 +0100 drop intermediate Strings Change-Id: I7f730d4f5329525eda9f78514dcaa3788149d077 diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index e4320e6..70036d7 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -363,7 +363,7 @@ OUString GetMsgString( { ResMgr* resMgr = Desktop::GetDesktopResManager(); if ( resMgr ) - return OUString( ResId( nId, *resMgr ) ); + return ResId(nId, *resMgr).toString(); } return aFallbackMsg; } @@ -391,7 +391,7 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg ) ResMgr* pResMgr = Desktop::GetDesktopResManager(); if ( pResMgr ) - aDiagnosticMessage.append( OUString( ResId(STR_BOOTSTRAP_ERR_CFG_DATAACCESS, *pResMgr ) ) ); + aDiagnosticMessage.append( ResId(STR_BOOTSTRAP_ERR_CFG_DATAACCESS, *pResMgr).toString() ); else aDiagnosticMessage.appendAscii( "The program cannot be started." ); @@ -399,7 +399,7 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg ) { aDiagnosticMessage.appendAscii( "\n\n" ); if ( pResMgr ) - aDiagnosticMessage.append( OUString( ResId(STR_INTERNAL_ERRMSG, *pResMgr ) ) ); + aDiagnosticMessage.append( ResId(STR_INTERNAL_ERRMSG, *pResMgr).toString() ); else aDiagnosticMessage.appendAscii( "The following internal error has occurred:\n\n" ); aDiagnosticMessage.append( aInternalErrMsg ); @@ -1169,7 +1169,7 @@ void restartOnMac(bool passArguments) { #if HAVE_FEATURE_MACOSX_SANDBOX (void) passArguments; // avoid warnings ResMgr *resMgr = Desktop::GetDesktopResManager(); - OUString aMessage = OUString( ResId( STR_LO_MUST_BE_RESTARTED, *resMgr ) ); + OUString aMessage = ResId(STR_LO_MUST_BE_RESTARTED, *resMgr).toString(); ErrorBox aRestartBox( NULL, WB_OK, aMessage ); aRestartBox.Execute(); @@ -1494,7 +1494,7 @@ int Desktop::Main() // create title string LanguageTag aLocale( LANGUAGE_SYSTEM); ResMgr* pLabelResMgr = ResMgr::SearchCreateResMgr( "ofa", aLocale ); - OUString aTitle = pLabelResMgr ? OUString( ResId( RID_APPTITLE, *pLabelResMgr ) ) : OUString(); + OUString aTitle = pLabelResMgr ? ResId(RID_APPTITLE, *pLabelResMgr).toString() : OUString(); delete pLabelResMgr; #ifdef DBG_UTIL diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index a653d1b..6a90a98 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -96,8 +96,7 @@ struct StrAllFiles : public rtl::StaticWithInit< OUString, StrAllFiles > const SolarMutexGuard guard; ::std::auto_ptr< ResMgr > const resmgr( ResMgr::CreateResMgr( "fps_office" ) ); OSL_ASSERT( resmgr.get() != 0 ); - OUString ret( ResId( STR_FILTERNAME_ALL, *resmgr.get() ) ); - return ret; + return ResId(STR_FILTERNAME_ALL, *resmgr.get()).toString(); } }; diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index fa5db69..3c15ca3 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -217,14 +217,14 @@ UpdateInstallDialog::UpdateInstallDialog( m_bError(false), m_bNoEntry(true), m_bActivated(false), - m_sInstalling(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_INSTALLING))), - m_sFinished(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_FINISHED))), - m_sNoErrors(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_NO_ERRORS))), - m_sErrorDownload(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD))), - m_sErrorInstallation(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION))), - m_sErrorLicenseDeclined(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED))), - m_sNoInstall(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL))), - m_sThisErrorOccurred(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED))), + m_sInstalling(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_INSTALLING)), + m_sFinished(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_FINISHED)), + m_sNoErrors(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_NO_ERRORS)), + m_sErrorDownload(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD)), + m_sErrorInstallation(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION)), + m_sErrorLicenseDeclined(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED)), + m_sNoInstall(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL)), + m_sThisErrorOccurred(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED)), m_ft_action(this, DpGuiResId(RID_DLG_UPDATE_INSTALL_DOWNLOADING)), m_statusbar(this,DpGuiResId(RID_DLG_UPDATE_INSTALL_STATUSBAR)), m_ft_extension_name(this, DpGuiResId(RID_DLG_UPDATE_INSTALL_EXTENSION_NAME)), diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx index 08485e3..1eb3552 100644 --- a/framework/source/uielement/headermenucontroller.cxx +++ b/framework/source/uielement/headermenucontroller.cxx @@ -162,7 +162,7 @@ void HeaderMenuController::fillPopupMenu( const Reference< ::com::sun::star::fra if ( bAllOneState && ( nCount > 1 )) { // Insert special item for all command - pVCLPopupMenu->InsertItem( ALL_MENUITEM_ID, OUString( FwlResId( STR_MENU_HEADFOOTALL )), 0, OString(), 0 ); + pVCLPopupMenu->InsertItem( ALL_MENUITEM_ID, FwlResId(STR_MENU_HEADFOOTALL).toString(), 0, OString(), 0 ); OUStringBuffer aStrBuf( aCmd ); aStrBuf.appendAscii( "?On:bool=" ); diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 5fd07ce..3c38e19 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -261,19 +261,19 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup // entry for LANGUAGE_NONE ++nItemId; - pPopupMenu->InsertItem( nItemId, OUString(FwlResId( STR_LANGSTATUS_NONE )) ); + pPopupMenu->InsertItem( nItemId, FwlResId(STR_LANGSTATUS_NONE).toString() ); aCmd = aCmd_Language + "LANGUAGE_NONE"; pPopupMenu->SetItemCommand( nItemId, aCmd ); // entry for 'Reset to default language' ++nItemId; - pPopupMenu->InsertItem( nItemId, OUString(FwlResId( STR_RESET_TO_DEFAULT_LANGUAGE )) ); + pPopupMenu->InsertItem( nItemId, FwlResId(STR_RESET_TO_DEFAULT_LANGUAGE).toString() ); aCmd = aCmd_Language + "RESET_LANGUAGES"; pPopupMenu->SetItemCommand( nItemId, aCmd ); // entry for opening the Format/Character dialog ++nItemId; - pPopupMenu->InsertItem( nItemId, OUString(FwlResId( STR_LANGSTATUS_MORE ))); + pPopupMenu->InsertItem( nItemId, FwlResId(STR_LANGSTATUS_MORE).toString()); pPopupMenu->SetItemCommand( nItemId, aCmd_Dialog ); } diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 423028d..358d948 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -519,7 +519,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r } } - OUString aLabelStr( FwkResId( STR_RESTORE_TOOLBARS )); + OUString aLabelStr(FWK_RESSTR(STR_RESTORE_TOOLBARS)); OUString aRestoreCmd( CMD_RESTOREVISIBILITY ); addCommand( m_xPopupMenu, aRestoreCmd, aLabelStr ); } diff --git a/svtools/source/uno/genericunodialog.cxx b/svtools/source/uno/genericunodialog.cxx index 5a222ee..22d4d52 100644 --- a/svtools/source/uno/genericunodialog.cxx +++ b/svtools/source/uno/genericunodialog.cxx @@ -121,7 +121,7 @@ void OGenericUnoDialog::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, con m_bTitleAmbiguous = sal_False; if (m_pDialog) - m_pDialog->SetText(OUString(m_sTitle)); + m_pDialog->SetText(m_sTitle); } } commit f2be92b68d936c6e9d5e8a96deb1580bcbf8c17f Author: Caolán McNamara <caol...@redhat.com> Date: Tue Sep 17 09:19:08 2013 +0100 remove OUStringHashCode in favor of OUStringHash (and as always if you find one, you can be sure there are 6 others in there when you grep for them) Change-Id: I9296ddbdda266c7b6d8a0ac0bc13ec5b6340cee7 diff --git a/desktop/source/app/dispatchwatcher.hxx b/desktop/source/app/dispatchwatcher.hxx index 2a0c869..8a0468e 100644 --- a/desktop/source/app/dispatchwatcher.hxx +++ b/desktop/source/app/dispatchwatcher.hxx @@ -39,15 +39,7 @@ namespace desktop running office without UI. */ -struct OUStringHashCode -{ - size_t operator()( const OUString& sString ) const - { - return sString.hashCode(); - } -}; - -class DispatchWatcherHashMap : public ::boost::unordered_map< OUString, sal_Int32, OUStringHashCode, ::std::equal_to< OUString > > +class DispatchWatcherHashMap : public ::boost::unordered_map< OUString, sal_Int32, OUStringHash, ::std::equal_to< OUString > > { public: inline void free() diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx index 0d0373e..c1e94da 100644 --- a/include/formula/FormulaCompiler.hxx +++ b/include/formula/FormulaCompiler.hxx @@ -60,16 +60,8 @@ struct FormulaArrayStack }; -struct FORMULA_DLLPUBLIC OUStringHashCode -{ - size_t operator()( const OUString& rStr ) const - { - return rtl_ustr_hashCode_WithLength( rStr.getStr(), rStr.getLength() ); - } -}; - -typedef ::boost::unordered_map< OUString, OpCode, OUStringHashCode, ::std::equal_to< OUString > > OpCodeHashMap; -typedef ::boost::unordered_map< OUString, OUString, OUStringHashCode, ::std::equal_to< OUString > > ExternalHashMap; +typedef ::boost::unordered_map< OUString, OpCode, OUStringHash, ::std::equal_to< OUString > > OpCodeHashMap; +typedef ::boost::unordered_map< OUString, OUString, OUStringHash, ::std::equal_to< OUString > > ExternalHashMap; class FORMULA_DLLPUBLIC FormulaCompiler { diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx index 116b5d8..1887cb7 100644 --- a/unotools/source/config/cmdoptions.cxx +++ b/unotools/source/config/cmdoptions.cxx @@ -46,15 +46,6 @@ using namespace ::com::sun::star::beans ; #define PROPERTYNAME_CMD OUString("Command") -// Method to retrieve a hash code from a string. May be we have to change it to decrease collisions in the hash map -struct OUStringHashCode -{ - size_t operator()( const OUString& sString ) const - { - return sString.hashCode(); - } -}; - /*-**************************************************************************************************************** @descr support simple command option structures and operations on it ****************************************************************************************************************-*/ @@ -106,9 +97,9 @@ class SvtCmdOptions } private: - class CommandHashMap : public ::boost::unordered_map< OUString , + class CommandHashMap : public ::boost::unordered_map< OUString , sal_Int32 , - OUStringHashCode , + OUStringHash , ::std::equal_to< OUString > > { public: diff --git a/unotools/source/config/extendedsecurityoptions.cxx b/unotools/source/config/extendedsecurityoptions.cxx index 8b1d3a1..ec6f5cc 100644 --- a/unotools/source/config/extendedsecurityoptions.cxx +++ b/unotools/source/config/extendedsecurityoptions.cxx @@ -47,17 +47,9 @@ using namespace ::com::sun::star::uno ; #define PROPERTYCOUNT 1 -struct OUStringHashCode -{ - size_t operator()( const OUString& sString ) const - { - return sString.hashCode(); - } -}; - class ExtensionHashMap : public ::boost::unordered_map< OUString, sal_Int32, - OUStringHashCode, + OUStringHash, ::std::equal_to< OUString > > { public: diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx index f204d20..a109eca 100644 --- a/unotools/source/config/optionsdlg.cxx +++ b/unotools/source/config/optionsdlg.cxx @@ -46,15 +46,7 @@ static sal_Int32 nRefCount = 0; class SvtOptionsDlgOptions_Impl : public utl::ConfigItem { private: - struct OUStringHashCode - { - size_t operator()( const OUString& sString ) const - { - return sString.hashCode(); - } - }; - - typedef boost::unordered_map< OUString, sal_Bool, OUStringHashCode, ::std::equal_to< OUString > > OptionNodeList; + typedef boost::unordered_map< OUString, sal_Bool, OUStringHash, ::std::equal_to< OUString > > OptionNodeList; OUString m_sPathDelimiter; OptionNodeList m_aOptionNodeList; diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx index 9435505..c1899a5 100644 --- a/unotools/source/config/pathoptions.cxx +++ b/unotools/source/config/pathoptions.cxx @@ -67,21 +67,13 @@ using namespace com::sun::star::lang; #define STRPOS_NOTFOUND -1 -struct OUStringHashCode -{ - size_t operator()( const OUString& sString ) const - { - return sString.hashCode(); - } -}; - enum VarNameProperty { VAR_NEEDS_SYSTEM_PATH, VAR_NEEDS_FILEURL }; -class NameToHandleMap : public ::boost::unordered_map< OUString, sal_Int32, OUStringHashCode, ::std::equal_to< OUString > > +class NameToHandleMap : public ::boost::unordered_map< OUString, sal_Int32, OUStringHash, ::std::equal_to< OUString > > { public: inline void free() { NameToHandleMap().swap( *this ); } @@ -93,7 +85,7 @@ class EnumToHandleMap : public ::boost::unordered_map< sal_Int32, sal_Int32, boo inline void free() { EnumToHandleMap().swap( *this ); } }; -class VarNameToEnumMap : public ::boost::unordered_map< OUString, VarNameProperty, OUStringHashCode, ::std::equal_to< OUString > > +class VarNameToEnumMap : public ::boost::unordered_map< OUString, VarNameProperty, OUStringHash, ::std::equal_to< OUString > > { public: inline void free() { VarNameToEnumMap().swap( *this ); } commit dbf2273e45c8b134b1470ee6173ca260e2545fed Author: Caolán McNamara <caol...@redhat.com> Date: Tue Sep 17 09:04:41 2013 +0100 support gtk-stop generic label Change-Id: I1f17459dc57a1377c5c48412fcc81989cc69fccd diff --git a/vcl/inc/svids.hrc b/vcl/inc/svids.hrc index b9c2d74..a788f4a 100644 --- a/vcl/inc/svids.hrc +++ b/vcl/inc/svids.hrc @@ -167,6 +167,7 @@ #define SV_BUTTONTEXT_OPEN 10127 #define SV_BUTTONTEXT_PLAY 10128 #define SV_BUTTONTEXT_FIND 10129 +#define SV_BUTTONTEXT_STOP 10130 #define SV_STDTEXT_FIRST SV_STDTEXT_SERVICENOTAVAILABLE #define SV_STDTEXT_SERVICENOTAVAILABLE 10210 diff --git a/vcl/source/src/btntext.src b/vcl/source/src/btntext.src index d348de1..43abeb9 100644 --- a/vcl/source/src/btntext.src +++ b/vcl/source/src/btntext.src @@ -176,4 +176,9 @@ String SV_BUTTONTEXT_FIND Text [ en-US ] = "~Find" ; }; +String SV_BUTTONTEXT_STOP +{ + Text [ en-US ] = "~Stop" ; +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 77762b5..4f049fb 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -641,6 +641,8 @@ namespace return (VclResId(SV_BUTTONTEXT_PLAY).toString()); else if (rType == "gtk-find") return (VclResId(SV_BUTTONTEXT_FIND).toString()); + else if (rType == "gtk-stop") + return (VclResId(SV_BUTTONTEXT_STOP).toString()); SAL_WARN("vcl.layout", "unknown stock type: " << rType.getStr()); return OUString(); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits