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 /sw/source/uibase/fldui/fldmgr.cxx | |
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 'sw/source/uibase/fldui/fldmgr.cxx')
-rw-r--r-- | sw/source/uibase/fldui/fldmgr.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 14870351d835..98657f7b69d6 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -388,12 +388,12 @@ OUString SwFieldMgr::GetTypeStr(sal_uInt16 nPos) // special treatment for date/time fields (without var/fix) if( TYP_DATEFLD == nFieldWh ) { - static OUString g_aDate( SW_RES( STR_DATEFLD ) ); + static OUString g_aDate( SwResId( STR_DATEFLD ) ); return g_aDate; } if( TYP_TIMEFLD == nFieldWh ) { - static OUString g_aTime( SW_RES( STR_TIMEFLD ) ); + static OUString g_aTime( SwResId( STR_TIMEFLD ) ); return g_aTime; } @@ -442,7 +442,7 @@ void SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) } case TYP_INPUTFLD: { - rToFill.push_back(SW_RES(aSwFields[nPos].nSubTypeStart)); + rToFill.push_back(SwResId(aSwFields[nPos].nSubTypeStart)); SAL_FALLTHROUGH; // move on at generic types } case TYP_DDEFLD: @@ -505,12 +505,12 @@ void SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) if (nTypeId == TYP_DOCINFOFLD) { if ( i == DI_CUSTOM ) - sNew = SW_RES( STR_CUSTOM ); + sNew = SwResId( STR_CUSTOM ); else sNew = SwViewShell::GetShellRes()->aDocInfoLst[i]; } else - sNew = SW_RES(aSwFields[nPos].nSubTypeStart + i); + sNew = SwResId(aSwFields[nPos].nSubTypeStart + i); rToFill.push_back(sNew); } @@ -587,14 +587,14 @@ OUString SwFieldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const nFormatId &= ~FF_FIXED; // mask out Fixed-Flag if((nStart + nFormatId) < aSwFields[nPos].nFormatEnd) - return SW_RES((sal_uInt16)(nStart + nFormatId)); + return SwResId((sal_uInt16)(nStart + nFormatId)); OUString aRet; if( FMT_NUM_BEGIN == nStart) { if(xNumberingInfo.is()) { - ResStringArray aNames( SVX_RES( RID_SVXSTRARY_NUMBERINGTYPE )); + ResStringArray aNames(ResId(RID_SVXSTRARY_NUMBERINGTYPE, *pSwResMgr)); Sequence<sal_Int16> aTypes = xNumberingInfo->getSupportedNumberingTypes(); const sal_Int16* pTypes = aTypes.getConstArray(); @@ -1610,7 +1610,7 @@ void SwFieldType::GetFieldName_() SwFieldType::s_pFieldNames->reserve(SAL_N_ELEMENTS(coFieldNms)); for(sal_uInt16 i : coFieldNms) { - const OUString aTmp(SW_RES( i )); + const OUString aTmp(SwResId( i )); SwFieldType::s_pFieldNames->push_back(MnemonicGenerator::EraseAllMnemonicChars( aTmp )); } } |