diff options
Diffstat (limited to 'writerperfect/source')
-rw-r--r-- | writerperfect/source/calc/MSWorksCalcImportFilter.cxx | 10 | ||||
-rw-r--r-- | writerperfect/source/common/WPFTResMgr.cxx | 15 | ||||
-rw-r--r-- | writerperfect/source/common/strings.src | 47 | ||||
-rw-r--r-- | writerperfect/source/writer/MSWorksImportFilter.cxx | 10 |
4 files changed, 74 insertions, 8 deletions
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx index 1d88c05622cf..56d5eda54de3 100644 --- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx +++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx @@ -15,7 +15,9 @@ #include <libwps/libwps.h> #include "WPFTEncodingDialog.hxx" +#include "WPFTResMgr.hxx" #include "MSWorksCalcImportFilter.hxx" +#include "strings.hrc" using com::sun::star::uno::Sequence; using com::sun::star::uno::Reference; @@ -38,22 +40,22 @@ bool MSWorksCalcImportFilter::doImportDocument(librevenge::RVNGInputStream &rInp OUString title, encoding; if (creator == libwps::WPS_MSWORKS) { - title="Import MsWorks files(libwps)"; + title=WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_MSWORKS); encoding="CP850"; } else if (creator == libwps::WPS_LOTUS) { - title="Import Lotus files(libwps)"; + title=WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_LOTUS); encoding="CP437"; } else if (creator == libwps::WPS_SYMPHONY) { - title="Import Symphony files(libwps)"; + title=WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_SYMPHONY); encoding="CP437"; } else { - title="Import Quattro Pro files(libwps)"; + title=WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_QUATTROPRO); encoding="CP437"; } try diff --git a/writerperfect/source/common/WPFTResMgr.cxx b/writerperfect/source/common/WPFTResMgr.cxx new file mode 100644 index 000000000000..fff256e7a6bf --- /dev/null +++ b/writerperfect/source/common/WPFTResMgr.cxx @@ -0,0 +1,15 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +#include "WPFTResMgr.hxx" + +#include <tools/resmgr.hxx> + +#include <vcl/svapp.hxx> + +ResMgr &WPFTResMgr::GetResMgr() +{ + static ResMgr *const pResMgr(ResMgr::CreateResMgr("writerperfect", Application::GetSettings().GetUILanguageTag())); + return *pResMgr; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerperfect/source/common/strings.src b/writerperfect/source/common/strings.src new file mode 100644 index 000000000000..fb9b0bad0e35 --- /dev/null +++ b/writerperfect/source/common/strings.src @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "strings.hrc" + +String STR_ENCODING_DIALOG_TITLE +{ + Text[en-US] = "Import file"; +}; + +String STR_ENCODING_DIALOG_TITLE_MSWORKS +{ + Text[en-US] = "Import MS Works file"; +}; + +String STR_ENCODING_DIALOG_TITLE_MSWRITE +{ + Text[en-US] = "Import MS Write file"; +}; + +String STR_ENCODING_DIALOG_TITLE_DOSWORD +{ + Text[en-US] = "Import MS Word for DOS file"; +}; + +String STR_ENCODING_DIALOG_TITLE_LOTUS +{ + Text[en-US] = "Import Lotus file"; +}; + +String STR_ENCODING_DIALOG_TITLE_SYMPHONY +{ + Text[en-US] = "Import Symphony file"; +}; + +String STR_ENCODING_DIALOG_TITLE_QUATTROPRO +{ + Text[en-US] = "Import Quattro Pro file"; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx index f8a03c8ecd15..de8f0a67c409 100644 --- a/writerperfect/source/writer/MSWorksImportFilter.cxx +++ b/writerperfect/source/writer/MSWorksImportFilter.cxx @@ -15,7 +15,9 @@ #include <libwps/libwps.h> #include "WPFTEncodingDialog.hxx" +#include "WPFTResMgr.hxx" #include "MSWorksImportFilter.hxx" +#include "strings.hrc" using com::sun::star::uno::Sequence; using com::sun::star::uno::Reference; @@ -49,19 +51,19 @@ bool MSWorksImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, switch (creator) { case libwps::WPS_MSWORKS: - title = "Import MsWorks files(libwps)"; + title = WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_MSWORKS); encoding = "CP850"; break; case libwps::WPS_RESERVED_0: // MS Write - title = "Import MsWrite files(libwps)"; + title = WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_MSWRITE); encoding = "CP1251"; break; case libwps::WPS_RESERVED_1: // DosWord - title = "Import DosWord files(libwps)"; + title = WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_DOSWORD); encoding = "CP850"; break; default: - title = "Import files(libwps)"; + title = WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE); encoding = "CP850"; break; } |