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 /desktop | |
parent | SVG: text elements and graphic elements should not share style ids (diff) | |
download | core-8a0685d49f679d6f98de2f357f1ec74590573852.tar.gz core-8a0685d49f679d6f98de2f357f1ec74590573852.zip |
make ResId::toString a non-static member
Change-Id: I756c0a19bea7b1cc0e290d9f382a04d655819bfb
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_shared.hxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 30 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_dependencies.cxx | 18 |
3 files changed, 23 insertions, 27 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_shared.hxx b/desktop/source/deployment/gui/dp_gui_shared.hxx index bc2e08e57039..b8faa7fa7d54 100644 --- a/desktop/source/deployment/gui/dp_gui_shared.hxx +++ b/desktop/source/deployment/gui/dp_gui_shared.hxx @@ -50,6 +50,8 @@ public: DpGuiResId( sal_uInt16 nId ):ResId( nId, *DeploymentGuiResMgr::get() ) {} }; +#define DPGUI_RESSTR(i) DpGuiResId(i).toString() + } // namespace dp_gui #endif diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index f7dbbfb0e401..f7dbd0405560 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -530,18 +530,18 @@ UpdateDialog::UpdateDialog( m_help(this, DpGuiResId(RID_DLG_UPDATE_HELP)), m_ok(this, DpGuiResId(RID_DLG_UPDATE_OK)), m_close(this, DpGuiResId(RID_DLG_UPDATE_CLOSE)), - m_error(ResId::toString(DpGuiResId(RID_DLG_UPDATE_ERROR))), - m_none(ResId::toString(DpGuiResId(RID_DLG_UPDATE_NONE))), - m_noInstallable(ResId::toString(DpGuiResId(RID_DLG_UPDATE_NOINSTALLABLE))), - m_failure(ResId::toString(DpGuiResId(RID_DLG_UPDATE_FAILURE))), - m_unknownError(ResId::toString(DpGuiResId(RID_DLG_UPDATE_UNKNOWNERROR))), - m_noDescription(ResId::toString(DpGuiResId(RID_DLG_UPDATE_NODESCRIPTION))), - m_noInstall(ResId::toString(DpGuiResId(RID_DLG_UPDATE_NOINSTALL))), - m_noDependency(ResId::toString(DpGuiResId(RID_DLG_UPDATE_NODEPENDENCY))), - m_noDependencyCurVer(ResId::toString(DpGuiResId(RID_DLG_UPDATE_NODEPENDENCY_CUR_VER))), - m_browserbased(ResId::toString(DpGuiResId(RID_DLG_UPDATE_BROWSERBASED))), - m_version(ResId::toString(DpGuiResId(RID_DLG_UPDATE_VERSION))), - m_ignoredUpdate(ResId::toString(DpGuiResId(RID_DLG_UPDATE_IGNORED_UPDATE))), + m_error(DPGUI_RESSTR(RID_DLG_UPDATE_ERROR)), + m_none(DPGUI_RESSTR(RID_DLG_UPDATE_NONE)), + m_noInstallable(DPGUI_RESSTR(RID_DLG_UPDATE_NOINSTALLABLE)), + m_failure(DPGUI_RESSTR(RID_DLG_UPDATE_FAILURE)), + m_unknownError(DPGUI_RESSTR(RID_DLG_UPDATE_UNKNOWNERROR)), + m_noDescription(DPGUI_RESSTR(RID_DLG_UPDATE_NODESCRIPTION)), + m_noInstall(DPGUI_RESSTR(RID_DLG_UPDATE_NOINSTALL)), + m_noDependency(DPGUI_RESSTR(RID_DLG_UPDATE_NODEPENDENCY)), + m_noDependencyCurVer(DPGUI_RESSTR(RID_DLG_UPDATE_NODEPENDENCY_CUR_VER)), + m_browserbased(DPGUI_RESSTR(RID_DLG_UPDATE_BROWSERBASED)), + m_version(DPGUI_RESSTR(RID_DLG_UPDATE_VERSION)), + m_ignoredUpdate(DPGUI_RESSTR(RID_DLG_UPDATE_IGNORED_UPDATE)), m_updateData(*updateData), m_thread( new UpdateDialog::Thread( @@ -619,9 +619,9 @@ short UpdateDialog::Execute() { UpdateDialog::CheckListBox::CheckListBox( UpdateDialog & dialog, ResId const & resource, Image const & normalStaticImage ): SvxCheckListBox( &dialog, resource, normalStaticImage ), - m_ignoreUpdate( ResId::toString( DpGuiResId( RID_DLG_UPDATE_IGNORE ) ) ), - m_ignoreAllUpdates( ResId::toString( DpGuiResId( RID_DLG_UPDATE_IGNORE_ALL ) ) ), - m_enableUpdate( ResId::toString( DpGuiResId( RID_DLG_UPDATE_ENABLE ) ) ), + m_ignoreUpdate( DPGUI_RESSTR( RID_DLG_UPDATE_IGNORE ) ), + m_ignoreAllUpdates( DPGUI_RESSTR( RID_DLG_UPDATE_IGNORE_ALL ) ), + m_enableUpdate( DPGUI_RESSTR( RID_DLG_UPDATE_ENABLE ) ), m_dialog(dialog) {} diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx index e7de531dd995..2f2823742aa4 100644 --- a/desktop/source/deployment/misc/dp_dependencies.cxx +++ b/desktop/source/deployment/misc/dp_dependencies.cxx @@ -95,8 +95,7 @@ rtl::OUString produceErrorText( { return reason.replaceFirst("%VERSION", (version.isEmpty() - ? ResId::toString( - dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN)) + ? dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN).toString() : version)); } @@ -167,22 +166,19 @@ rtl::OUString getErrorText( if ( dependency->getNamespaceURI() == namespaceOpenOfficeOrg && dependency->getTagName() == minimalVersionOpenOfficeOrg ) { return produceErrorText( - ResId::toString( - dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN)), + dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN).toString(), dependency->getAttribute( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")))); } else if (dependency->getNamespaceURI() == namespaceOpenOfficeOrg && dependency->getTagName() == maximalVersionOpenOfficeOrg ) { return produceErrorText( - ResId::toString( - dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MAX)), + dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MAX).toString(), dependency->getAttribute( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")))); } else if (dependency->getNamespaceURI() == namespaceLibreOffice && dependency->getTagName() == minimalVersionLibreOffice ) { return produceErrorText( - ResId::toString( - dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_LO_MIN)), + dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_LO_MIN).toString(), dependency->getAttribute( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")))); } else if (dependency->hasAttributeNS( @@ -193,16 +189,14 @@ rtl::OUString getErrorText( minimalVersionOpenOfficeOrg)))) { return produceErrorText( - ResId::toString( - dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN)), + dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN).toString(), dependency->getAttributeNS( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(namespaceOpenOfficeOrg)), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(minimalVersionOpenOfficeOrg)))); } else { - return ResId::toString( - dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN)); + return dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN).toString(); } } |