summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-18 21:14:00 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-05-19 15:40:40 +0200
commit2155e04d6343638ca9815d394cbc4f78c2b17c3a (patch)
tree0378142f6ce9edb63074291aed45527568e7b254 /writerperfect
parentcee02e81cd3b55fb46eacf5db5713e8bf4363bcd (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 'writerperfect')
-rw-r--r--writerperfect/inc/WPFTResMgr.hxx6
-rw-r--r--writerperfect/source/calc/MSWorksCalcImportFilter.cxx8
-rw-r--r--writerperfect/source/writer/MSWorksImportFilter.cxx8
3 files changed, 12 insertions, 10 deletions
diff --git a/writerperfect/inc/WPFTResMgr.hxx b/writerperfect/inc/WPFTResMgr.hxx
index d578685f275e..54de1e4f0e06 100644
--- a/writerperfect/inc/WPFTResMgr.hxx
+++ b/writerperfect/inc/WPFTResMgr.hxx
@@ -12,8 +12,10 @@ struct WRITERPERFECT_DLLPUBLIC WPFTResMgr
static ResMgr &GetResMgr();
};
-#define WPFT_RES(i) ResId((i), WPFTResMgr::GetResMgr())
-#define WPFT_RESSTR(i) WPFT_RES(i).toString()
+inline OUString WpResId(sal_uInt16 nId)
+{
+ return ResId(nId, WPFTResMgr::GetResMgr());
+}
#endif
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
index 11881202ad28..5233078da22b 100644
--- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
+++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
@@ -200,22 +200,22 @@ bool MSWorksCalcImportFilter::doImportDocument(librevenge::RVNGInputStream &rInp
OUString title, encoding;
if (creator == libwps::WPS_MSWORKS)
{
- title=WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_MSWORKS);
+ title=WpResId(STR_ENCODING_DIALOG_TITLE_MSWORKS);
encoding="CP850";
}
else if (creator == libwps::WPS_LOTUS)
{
- title=WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_LOTUS);
+ title=WpResId(STR_ENCODING_DIALOG_TITLE_LOTUS);
encoding="CP437";
}
else if (creator == libwps::WPS_SYMPHONY)
{
- title=WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_SYMPHONY);
+ title=WpResId(STR_ENCODING_DIALOG_TITLE_SYMPHONY);
encoding="CP437";
}
else
{
- title=WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_QUATTROPRO);
+ title=WpResId(STR_ENCODING_DIALOG_TITLE_QUATTROPRO);
encoding="CP437";
}
try
diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx
index 631dc5f9ed04..7f713857f018 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.cxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.cxx
@@ -48,19 +48,19 @@ bool MSWorksImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput,
switch (creator)
{
case libwps::WPS_MSWORKS:
- title = WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_MSWORKS);
+ title = WpResId(STR_ENCODING_DIALOG_TITLE_MSWORKS);
encoding = "CP850";
break;
case libwps::WPS_RESERVED_0: // MS Write
- title = WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_MSWRITE);
+ title = WpResId(STR_ENCODING_DIALOG_TITLE_MSWRITE);
encoding = "CP1252";
break;
case libwps::WPS_RESERVED_1: // DosWord
- title = WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_DOSWORD);
+ title = WpResId(STR_ENCODING_DIALOG_TITLE_DOSWORD);
encoding = "CP850";
break;
default:
- title = WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE);
+ title = WpResId(STR_ENCODING_DIALOG_TITLE);
encoding = "CP850";
break;
}