diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-18 21:14:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-19 15:40:40 +0200 |
commit | 2155e04d6343638ca9815d394cbc4f78c2b17c3a (patch) | |
tree | 0378142f6ce9edb63074291aed45527568e7b254 /svtools/source/dialogs | |
parent | cee02e81cd3b55fb46eacf5db5713e8bf4363bcd (diff) |
make string translation loading more uniform
change various ResId classes that use conversion operator to OUString to
functions that return a OUString
drop various defines
drop unnecessary toString calls
Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92
Reviewed-on: https://gerrit.libreoffice.org/37817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools/source/dialogs')
-rw-r--r-- | svtools/source/dialogs/PlaceEditDialog.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/addresstemplate.cxx | 66 | ||||
-rw-r--r-- | svtools/source/dialogs/insdlg.cxx | 6 | ||||
-rw-r--r-- | svtools/source/dialogs/prnsetup.cxx | 4 | ||||
-rw-r--r-- | svtools/source/dialogs/roadmapwizard.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/wizardmachine.cxx | 6 |
6 files changed, 43 insertions, 43 deletions
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index 5c887e742b6a..c60df5fd7ed5 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -175,7 +175,7 @@ void PlaceEditDialog::InitDetails( ) unsigned int nPos = 0; for ( sal_Int32 i = 0; i < aTypesUrlsList.getLength( ) && aTypesNamesList.getLength( ); ++i ) { - OUString sUrl = aTypesUrlsList[i].replaceFirst("<host", "<" + SVT_RESSTR(STR_SVT_HOST)).replaceFirst("port>", SVT_RESSTR(STR_SVT_PORT) + ">"); + OUString sUrl = aTypesUrlsList[i].replaceFirst("<host", "<" + SvtResId(STR_SVT_HOST)).replaceFirst("port>", SvtResId(STR_SVT_PORT) + ">"); if ((sUrl == GDRIVE_BASE_URL && bSkipGDrive) || (sUrl.startsWith( ALFRESCO_CLOUD_BASE_URL) && bSkipAlfresco) || diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 414f3f434715..c79e3ab01978 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -485,7 +485,7 @@ void AssignmentPersistentData::ImplCommit() AddressBookSourceDialog::AddressBookSourceDialog(vcl::Window* _pParent, const Reference< XComponentContext >& _rxORB ) : ModalDialog(_pParent, "AddressTemplateDialog", "svt/ui/addresstemplatedialog.ui") - , m_sNoFieldSelection(SVT_RESSTR(STR_NO_FIELD_SELECTION)) + , m_sNoFieldSelection(SvtResId(STR_NO_FIELD_SELECTION)) , m_xORB(_rxORB) , m_pImpl( new AddressBookSourceDialogData ) { @@ -497,7 +497,7 @@ void AssignmentPersistentData::ImplCommit() const Reference< XDataSource >& _rxTransientDS, const OUString& _rDataSourceName, const OUString& _rTable, const Sequence< AliasProgrammaticPair >& _rMapping ) : ModalDialog(_pParent, "AddressTemplateDialog", "svt/ui/addresstemplatedialog.ui") - , m_sNoFieldSelection(SVT_RESSTR(STR_NO_FIELD_SELECTION)) + , m_sNoFieldSelection(SvtResId(STR_NO_FIELD_SELECTION)) , m_xORB(_rxORB) , m_pImpl( new AddressBookSourceDialogData( _rxTransientDS, _rDataSourceName, _rTable, _rMapping ) ) { @@ -537,37 +537,37 @@ void AssignmentPersistentData::ImplCommit() // should be adjustable with a rather small effort.) // initialize the strings for the field labels - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_FIRSTNAME )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_LASTNAME )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_COMPANY)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_DEPARTMENT )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_STREET )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_ZIPCODE )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_CITY )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_STATE)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_COUNTRY )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_HOMETEL )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_WORKTEL )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_OFFICETEL)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_MOBILE)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_TELOTHER)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_PAGER)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_FAX )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_EMAIL )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_URL )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_TITLE )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_POSITION )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_INITIALS )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_ADDRFORM )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_SALUTATION )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_ID)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_CALENDAR)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_INVITE)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_NOTE)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_USER1)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_USER2)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_USER3)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_USER4)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_FIRSTNAME )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_LASTNAME )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_COMPANY)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_DEPARTMENT )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_STREET )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_ZIPCODE )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_CITY )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_STATE)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_COUNTRY )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_HOMETEL )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_WORKTEL )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_OFFICETEL)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_MOBILE)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_TELOTHER)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_PAGER)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_FAX )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_EMAIL )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_URL )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_TITLE )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_POSITION )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_INITIALS )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_ADDRFORM )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_SALUTATION )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_ID)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_CALENDAR)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_INVITE)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_NOTE)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_USER1)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_USER2)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_USER3)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_USER4)); long nLabelWidth = 0; long nListBoxWidth = m_pImpl->pFields[0]->approximate_char_width() * 20; diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index 312a2cfb725e..50e81b579da3 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -174,7 +174,7 @@ void SvObjectServerList::FillInsertObjects() #ifdef _WIN32 SvGlobalName aOleFact( SO3_OUT_CLASSID ); - OUString aOleObj( SVT_RESSTR( STR_FURTHER_OBJECT ) ); + OUString aOleObj( SvtResId( STR_FURTHER_OBJECT ) ); aObjectServerList.push_back( SvObjectServer( aOleFact, aOleObj ) ); #endif @@ -277,7 +277,7 @@ OUString SvPasteObjectHelper::GetSotFormatUIName( SotClipboardFormatId nId ) } if( nResId ) - aUIName = SVT_RESSTR( nResId ); + aUIName = SvtResId( nResId ); else aUIName = SotExchange::GetFormatName( nId ); @@ -334,7 +334,7 @@ bool SvPasteObjectHelper::GetEmbeddedName(const TransferableDataHelper& rData, O _rSource += pSrcOfCopy; } else - _rSource = SVT_RESSTR(STR_UNKNOWN_SOURCE); + _rSource = SvtResId(STR_UNKNOWN_SOURCE); } bRet = true; } diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index 84d3283dc520..aa805f9e886c 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -129,7 +129,7 @@ static OUString ImplPrnDlgAddString(const OUString& rStr, const OUString& rAddSt static OUString ImplPrnDlgAddResString(const OUString& rStr, sal_uInt16 nResId) { - return ImplPrnDlgAddString(rStr, SVT_RESSTR(nResId)); + return ImplPrnDlgAddString(rStr, SvtResId(nResId)); } @@ -199,7 +199,7 @@ OUString ImplPrnDlgGetStatusText( const QueueInfo& rInfo ) sal_uLong nJobs = rInfo.GetJobs(); if ( nJobs && (nJobs != QUEUE_JOBS_DONTKNOW) ) { - OUString aJobStr( SVT_RESSTR( STR_SVT_PRNDLG_JOBCOUNT ) ); + OUString aJobStr( SvtResId( STR_SVT_PRNDLG_JOBCOUNT ) ); OUString aJobs( OUString::number( nJobs ) ); aStr = ImplPrnDlgAddString(aStr, aJobStr.replaceAll("%d", aJobs)); } diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index 356988b4bc6f..5ccc4cdf60a1 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -129,7 +129,7 @@ namespace svt SetEmptyViewMargin(); m_pImpl->pRoadmap.disposeAndReset( VclPtr<ORoadmap>::Create( this, WB_TABSTOP ) ); - m_pImpl->pRoadmap->SetText( SVT_RESSTR( STR_WIZDLG_ROADMAP_TITLE ) ); + m_pImpl->pRoadmap->SetText( SvtResId( STR_WIZDLG_ROADMAP_TITLE ) ); m_pImpl->pRoadmap->SetPosPixel( Point( 0, 0 ) ); m_pImpl->pRoadmap->SetItemSelectHdl( LINK( this, RoadmapWizard, OnRoadmapItemSelected ) ); diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index 6edc96012d01..3a4f5a750531 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -136,7 +136,7 @@ namespace svt m_pPrevPage = VclPtr<PushButton>::Create(this, WB_TABSTOP); m_pPrevPage->SetHelpId( HID_WIZARD_PREVIOUS ); m_pPrevPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) ); - m_pPrevPage->SetText(SVT_RESSTR(STR_WIZDLG_PREVIOUS)); + m_pPrevPage->SetText(SvtResId(STR_WIZDLG_PREVIOUS)); m_pPrevPage->Show(); m_pPrevPage->set_id("previous"); @@ -154,7 +154,7 @@ namespace svt m_pNextPage = VclPtr<PushButton>::Create(this, WB_TABSTOP); m_pNextPage->SetHelpId( HID_WIZARD_NEXT ); m_pNextPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) ); - m_pNextPage->SetText(OUString(SVT_RESSTR(STR_WIZDLG_NEXT))); + m_pNextPage->SetText(OUString(SvtResId(STR_WIZDLG_NEXT))); m_pNextPage->Show(); m_pNextPage->set_id("next"); @@ -168,7 +168,7 @@ namespace svt { m_pFinish = VclPtr<OKButton>::Create(this, WB_TABSTOP); m_pFinish->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) ); - m_pFinish->SetText(SVT_RESSTR(STR_WIZDLG_FINISH)); + m_pFinish->SetText(SvtResId(STR_WIZDLG_FINISH)); m_pFinish->Show(); m_pFinish->set_id("finish"); |