diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-30 17:01:32 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-02 13:18:57 +0200 |
commit | 34f7e618ddd3399d9e7f3998e25545256255d02d (patch) | |
tree | fd946f8f2ab8386db89f531d49fae1718a21e943 /filter | |
parent | c881756fcfdc1fa63ff534bf4538d551b2139515 (diff) |
untranslated strings are just strings
removes starmaths InsertCommand in favour of InsertCommandText
Change-Id: I5659adcaa28e5b5861d1a1cc5d2afa84009490f6
Reviewed-on: https://gerrit.libreoffice.org/37113
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 'filter')
-rw-r--r-- | filter/inc/strings.hxx | 25 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltercommon.hxx | 2 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfilterdialogstrings.hrc | 10 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfilterdialogstrings.src | 45 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 34 |
5 files changed, 39 insertions, 77 deletions
diff --git a/filter/inc/strings.hxx b/filter/inc/strings.hxx new file mode 100644 index 000000000000..3a25ef921b31 --- /dev/null +++ b/filter/inc/strings.hxx @@ -0,0 +1,25 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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/. + */ + +#ifndef INCLUDED_FILTER_INC_STRINGS_HRC +#define INCLUDED_FILTER_INC_STRINGS_HRC + +#define STR_APPL_NAME_WRITER "%PRODUCTNAME Writer (.sxw)" +#define STR_APPL_NAME_CALC "%PRODUCTNAME Calc (.sxc)" +#define STR_APPL_NAME_IMPRESS "%PRODUCTNAME Impress (.sxi)" +#define STR_APPL_NAME_DRAW "%PRODUCTNAME Draw (.sxd)" +#define STR_APPL_NAME_OASIS_WRITER "%PRODUCTNAME Writer (.odt)" +#define STR_APPL_NAME_OASIS_CALC "%PRODUCTNAME Calc (.ods)" +#define STR_APPL_NAME_OASIS_IMPRESS "%PRODUCTNAME Impress (.odp)" +#define STR_APPL_NAME_OASIS_DRAW "%PRODUCTNAME Draw (.odg)" +#define STR_DEFAULT_EXTENSION "xml" + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/filter/source/xsltdialog/xmlfiltercommon.hxx b/filter/source/xsltdialog/xmlfiltercommon.hxx index 2f65dde7fc5f..f29111a4912c 100644 --- a/filter/source/xsltdialog/xmlfiltercommon.hxx +++ b/filter/source/xsltdialog/xmlfiltercommon.hxx @@ -76,7 +76,7 @@ struct application_info_impl OUString maXMLImporter; OUString maXMLExporter; - application_info_impl( const sal_Char * pDocumentService, ResId& rUINameRes, const sal_Char * mpXMLImporter, const sal_Char * mpXMLExporter ); + application_info_impl(const sal_Char * pDocumentService, const OUString& rUINameRes, const sal_Char * mpXMLImporter, const sal_Char * mpXMLExporter); }; diff --git a/filter/source/xsltdialog/xmlfilterdialogstrings.hrc b/filter/source/xsltdialog/xmlfilterdialogstrings.hrc index 66b6b3e3cf12..8db23c2ad6bc 100644 --- a/filter/source/xsltdialog/xmlfilterdialogstrings.hrc +++ b/filter/source/xsltdialog/xmlfilterdialogstrings.hrc @@ -32,7 +32,6 @@ #define STR_WARN_DELETE (RID_XSLT_DIALOG_START + 10) #define STR_DEFAULT_FILTER_NAME (RID_XSLT_DIALOG_START + 13) -#define STR_DEFAULT_EXTENSION (RID_XSLT_DIALOG_START + 14) #define STR_ERROR_FILTER_NAME_EXISTS (RID_XSLT_DIALOG_START + 15) #define STR_ERROR_TYPE_NAME_EXISTS (RID_XSLT_DIALOG_START + 16) @@ -49,15 +48,6 @@ #define STR_FILTERS_INSTALLED (RID_XSLT_DIALOG_START + 27) #define STR_NO_FILTERS_FOUND (RID_XSLT_DIALOG_START + 28) -#define STR_APPL_NAME_WRITER (RID_XSLT_DIALOG_START + 30) -#define STR_APPL_NAME_CALC (RID_XSLT_DIALOG_START + 31) -#define STR_APPL_NAME_IMPRESS (RID_XSLT_DIALOG_START + 32) -#define STR_APPL_NAME_DRAW (RID_XSLT_DIALOG_START + 33) -#define STR_APPL_NAME_OASIS_WRITER (RID_XSLT_DIALOG_START + 34) -#define STR_APPL_NAME_OASIS_CALC (RID_XSLT_DIALOG_START + 35) -#define STR_APPL_NAME_OASIS_IMPRESS (RID_XSLT_DIALOG_START + 36) -#define STR_APPL_NAME_OASIS_DRAW (RID_XSLT_DIALOG_START + 37) - #define STR_XML_FILTER_LISTBOX (RID_XSLT_DIALOG_START + 38) #endif diff --git a/filter/source/xsltdialog/xmlfilterdialogstrings.src b/filter/source/xsltdialog/xmlfilterdialogstrings.src index 8e6501cd8a85..ea7a693a2257 100644 --- a/filter/source/xsltdialog/xmlfilterdialogstrings.src +++ b/filter/source/xsltdialog/xmlfilterdialogstrings.src @@ -49,46 +49,6 @@ String STR_EXPORT_ONLY Text [ en-US ] = "export filter"; }; -String STR_APPL_NAME_WRITER -{ - Text = "%PRODUCTNAME Writer (.sxw)"; -}; - -String STR_APPL_NAME_CALC -{ - Text = "%PRODUCTNAME Calc (.sxc)"; -}; - -String STR_APPL_NAME_IMPRESS -{ - Text = "%PRODUCTNAME Impress (.sxi)"; -}; - -String STR_APPL_NAME_DRAW -{ - Text = "%PRODUCTNAME Draw (.sxd)"; -}; - -String STR_APPL_NAME_OASIS_WRITER -{ - Text = "%PRODUCTNAME Writer (.odt)"; -}; - -String STR_APPL_NAME_OASIS_CALC -{ - Text = "%PRODUCTNAME Calc (.ods)"; -}; - -String STR_APPL_NAME_OASIS_IMPRESS -{ - Text = "%PRODUCTNAME Impress (.odp)"; -}; - -String STR_APPL_NAME_OASIS_DRAW -{ - Text = "%PRODUCTNAME Draw (.odg)"; -}; - String STR_WARN_DELETE { Text [ en-US ] = "Do you really want to delete the XML Filter '%s'? This action cannot be undone."; @@ -129,11 +89,6 @@ String STR_DEFAULT_UI_NAME Text [ en-US ] = "Untitled"; }; -String STR_DEFAULT_EXTENSION -{ - Text = "xml"; -}; - String STR_UNDEFINED_FILTER { Text [ en-US ] = "undefined filter"; diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 05bf27ca3bda..972877b74a70 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -47,6 +47,7 @@ #include "xmlfiltertabdialog.hxx" #include "xmlfiltertestdialog.hxx" #include "xmlfilterjar.hxx" +#include "strings.hxx" using namespace osl; using namespace com::sun::star::lang; @@ -236,8 +237,7 @@ void XMLFilterSettingsDialog::onNew() aTempInfo.maFilterName = createUniqueFilterName(RESIDSTR(STR_DEFAULT_FILTER_NAME)); // init default extension - OUString aDefaultExtension(RESIDSTR(STR_DEFAULT_EXTENSION)); - aTempInfo.maExtension = aDefaultExtension; + aTempInfo.maExtension = STR_DEFAULT_EXTENSION; // set default ui name aTempInfo.maInterfaceName = createUniqueInterfaceName(RESIDSTR(STR_DEFAULT_UI_NAME)); @@ -1201,9 +1201,9 @@ void XMLFilterSettingsDialog::initFilterList() m_pFilterListBox->Select( pEntry ); } -application_info_impl::application_info_impl( const sal_Char * pDocumentService, ResId& rUINameRes, const sal_Char * mpXMLImporter, const sal_Char * mpXMLExporter ) +application_info_impl::application_info_impl( const sal_Char * pDocumentService, const OUString& rUINameRes, const sal_Char * mpXMLImporter, const sal_Char * mpXMLExporter ) : maDocumentService( pDocumentService, strlen( pDocumentService ), RTL_TEXTENCODING_ASCII_US ), - maDocumentUIName( OUString( rUINameRes ) ), + maDocumentUIName(ResMgr::ExpandVariables(rUINameRes)), maXMLImporter( mpXMLImporter, strlen( mpXMLImporter ), RTL_TEXTENCODING_ASCII_US ), maXMLExporter( mpXMLExporter, strlen( mpXMLExporter ), RTL_TEXTENCODING_ASCII_US ) { @@ -1216,63 +1216,55 @@ std::vector< application_info_impl* >& getApplicationInfos() if( aInfos.empty() ) { auto resmgr = getXSLTDialogResMgr(); - ResId aResId1( STR_APPL_NAME_WRITER, *resmgr.get() ); aInfos.push_back( new application_info_impl( "com.sun.star.text.TextDocument", - aResId1, + STR_APPL_NAME_WRITER, "com.sun.star.comp.Writer.XMLImporter", "com.sun.star.comp.Writer.XMLExporter" ) ); - ResId aResId2( STR_APPL_NAME_CALC, *resmgr.get() ); aInfos.push_back( new application_info_impl( "com.sun.star.sheet.SpreadsheetDocument", - aResId2, + STR_APPL_NAME_CALC, "com.sun.star.comp.Calc.XMLImporter", "com.sun.star.comp.Calc.XMLExporter" ) ); - ResId aResId3( STR_APPL_NAME_IMPRESS, *resmgr.get() ); aInfos.push_back( new application_info_impl( "com.sun.star.presentation.PresentationDocument", - aResId3, + STR_APPL_NAME_IMPRESS, "com.sun.star.comp.Impress.XMLImporter", "com.sun.star.comp.Impress.XMLExporter" ) ); - ResId aResId4( STR_APPL_NAME_DRAW, *resmgr.get() ); aInfos.push_back( new application_info_impl( "com.sun.star.drawing.DrawingDocument", - aResId4, + STR_APPL_NAME_DRAW, "com.sun.star.comp.Draw.XMLImporter", "com.sun.star.comp.Draw.XMLExporter" ) ); // --- oasis file formats... - ResId aResId5( STR_APPL_NAME_OASIS_WRITER, *resmgr.get() ); aInfos.push_back( new application_info_impl( "com.sun.star.text.TextDocument", - aResId5, + STR_APPL_NAME_OASIS_WRITER, "com.sun.star.comp.Writer.XMLOasisImporter", "com.sun.star.comp.Writer.XMLOasisExporter" ) ); - ResId aResId6( STR_APPL_NAME_OASIS_CALC, *resmgr.get() ); aInfos.push_back( new application_info_impl( "com.sun.star.sheet.SpreadsheetDocument", - aResId6, + STR_APPL_NAME_OASIS_CALC, "com.sun.star.comp.Calc.XMLOasisImporter", "com.sun.star.comp.Calc.XMLOasisExporter" ) ); - ResId aResId7( STR_APPL_NAME_OASIS_IMPRESS, *resmgr.get() ); aInfos.push_back( new application_info_impl( "com.sun.star.presentation.PresentationDocument", - aResId7, + STR_APPL_NAME_OASIS_IMPRESS, "com.sun.star.comp.Impress.XMLOasisImporter", "com.sun.star.comp.Impress.XMLOasisExporter" ) ); - ResId aResId8( STR_APPL_NAME_OASIS_DRAW, *resmgr.get() ); aInfos.push_back( new application_info_impl( "com.sun.star.drawing.DrawingDocument", - aResId8, + STR_APPL_NAME_OASIS_DRAW, "com.sun.star.comp.Draw.XMLOasisImporter", "com.sun.star.comp.Draw.XMLOasisExporter" ) ); -} + } return aInfos; } |