diff options
-rw-r--r-- | include/unotools/docinfohelper.hxx | 3 | ||||
-rw-r--r-- | oox/source/core/xmlfilterbase.cxx | 5 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf89790.docx | bin | 4673 -> 0 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 7 | ||||
-rw-r--r-- | unotools/source/config/docinfohelper.cxx | 50 |
5 files changed, 20 insertions, 45 deletions
diff --git a/include/unotools/docinfohelper.hxx b/include/unotools/docinfohelper.hxx index 320b3b542d48..ddc28b05279b 100644 --- a/include/unotools/docinfohelper.hxx +++ b/include/unotools/docinfohelper.hxx @@ -29,8 +29,7 @@ class UNOTOOLS_DLLPUBLIC DocInfoHelper { public: static OUString GetGeneratorString(); - static OUString GetApplicationString(); - static OUString GetVersionString(); + }; } // namespace utl diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index cde386b59944..4ef16d0c6bce 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -58,7 +58,6 @@ #include <tools/datetime.hxx> #include <com/sun/star/util/Duration.hpp> #include <sax/tools/converter.hxx> -#include <unotools/configmgr.hxx> using ::com::sun::star::xml::dom::DocumentBuilder; using ::com::sun::star::xml::dom::XDocument; @@ -693,9 +692,9 @@ writeAppProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProp writeElement( pAppProps, XML_HyperlinksChanged, "hyperlinks changed" ); writeElement( pAppProps, XML_DigSig, "digital signature" ); #endif /* def OOXTODO */ - writeElement( pAppProps, XML_Application, utl::ConfigManager::getProductName() ); - writeElement( pAppProps, XML_AppVersion, utl::DocInfoHelper::GetVersionString() ); + writeElement( pAppProps, XML_Application, utl::DocInfoHelper::GetGeneratorString() ); #ifdef OOXTODO + writeElement( pAppProps, XML_AppVersion, "app version" ); writeElement( pAppProps, XML_DocSecurity, "doc security" ); #endif /* def OOXTODO */ diff --git a/sw/qa/extras/ooxmlexport/data/tdf89790.docx b/sw/qa/extras/ooxmlexport/data/tdf89790.docx Binary files differdeleted file mode 100644 index 180951e854e9..000000000000 --- a/sw/qa/extras/ooxmlexport/data/tdf89790.docx +++ /dev/null diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index 07ba2ae577c0..4cf50c9433e9 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -797,13 +797,6 @@ DECLARE_OOXMLEXPORT_TEST(testSectionHeader, "sectionprot.odt") } } -DECLARE_OOXMLEXPORT_TEST(testTdf89790, "tdf89790.docx") -{ - if (xmlDocPtr pXmlDoc = parseExport("docProps/app.xml")) - - assertXPath(pXmlDoc, "/extended-properties:Properties/extended-properties:AppVersion"); -} - CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotools/source/config/docinfohelper.cxx b/unotools/source/config/docinfohelper.cxx index 0ea143cf89ec..b5d0cf9aa7b4 100644 --- a/unotools/source/config/docinfohelper.cxx +++ b/unotools/source/config/docinfohelper.cxx @@ -41,44 +41,29 @@ OUString DocInfoHelper::GetGeneratorString() { aResult.append( aValue.replace( ' ', '_' ) ); aResult.append( '/' ); - } - - aValue = GetVersionString(); - if ( !aValue.isEmpty() ) - { - aResult.append( aValue ); - } - - return aResult.makeStringAndClear(); -} - - -OUString DocInfoHelper::GetVersionString() -{ - OUStringBuffer aResult; - // version is <product_versions>_<product_extension>$<platform> - OUString aValue( utl::ConfigManager::getProductVersion() ); - if ( !aValue.isEmpty() ) - { - aResult.append( aValue.replace( ' ', '_' ) ); - - aValue = utl::ConfigManager::getProductExtension(); + aValue = utl::ConfigManager::getProductVersion(); if ( !aValue.isEmpty() ) { aResult.append( aValue.replace( ' ', '_' ) ); + + aValue = utl::ConfigManager::getProductExtension(); + if ( !aValue.isEmpty() ) + { + aResult.append( aValue.replace( ' ', '_' ) ); + } } - } - OUString os( "$_OS" ); - OUString arch( "$_ARCH" ); - ::rtl::Bootstrap::expandMacros(os); - ::rtl::Bootstrap::expandMacros(arch); - aResult.append( '$' ); - aResult.append( os ); - aResult.append( '_' ); - aResult.append( arch ); - aResult.append( ' ' ); + OUString os( "$_OS" ); + OUString arch( "$_ARCH" ); + ::rtl::Bootstrap::expandMacros(os); + ::rtl::Bootstrap::expandMacros(arch); + aResult.append( '$' ); + aResult.append( os ); + aResult.append( '_' ); + aResult.append( arch ); + aResult.append( ' ' ); + } // second product: LibreOffice_project/<build_information> // build_information has '(' and '[' encoded as '$', ')' and ']' ignored @@ -112,7 +97,6 @@ OUString DocInfoHelper::GetVersionString() return aResult.makeStringAndClear(); } - } // end of namespace utl /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |