From 1e49e40c3694cd5750b65fc726b9684ae4185d4f Mon Sep 17 00:00:00 2001 From: Joren De Cuyper Date: Fri, 15 May 2015 13:27:47 +0200 Subject: [PATCH] tdf#91064: Revert "tdf#89790 DOCX: saving LO version number in app.xml" This reverts commit 480ca7434a330b2678f9ef287cffd6d9cf27bed5. Change-Id: I69a16425fc36979d49f409bbd7921495a22a35dc Reviewed-on: https://gerrit.libreoffice.org/15737 Tested-by: Jenkins Reviewed-by: Joren De Cuyper --- include/unotools/docinfohelper.hxx | 3 +- oox/source/core/xmlfilterbase.cxx | 5 +- sw/qa/extras/ooxmlexport/data/tdf89790.docx | Bin 4673 -> 0 bytes sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 7 --- unotools/source/config/docinfohelper.cxx | 52 +++++++------------- 5 files changed, 21 insertions(+), 46 deletions(-) delete mode 100644 sw/qa/extras/ooxmlexport/data/tdf89790.docx 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 #include #include -#include 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 deleted file mode 100644 index 180951e854e99bc7e87ffcbc540ce5e0ba714a16..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4673 zcmaKvXH=70(}w8*1Wbe=RirnSAiW7-1R@|E^i4eHD7wDS$y!*fJfo>e1a%!kzxj;V z-ogTR&IH?0qj!EhJAnLYT@WVN@^eeZwEIp~eFXg3ZS&iuxzLS8tCB9Q4r6StnZKf-E(;hDTbCbqf82iOx+r z!;$YB(EJ{@rEP2ua&~O9xid@Q;Tx>Vy}0xbe#8h30OdS-8@h-;em@Bj5#s*^#D@Qe zrxW_7$Ul^BI$66r+MwJncsV-!Lo5bP-2wrI?WA$_Oy=nUWAac?XW=a((bSq|Nvci( zZy!>Ok-%)r{GlICRK(o;;DKpBz%eTDoLW%k^_sVNAZLMRgS(Tte z>9o}RFtt9w45KFj$DRnJsSSTv`oH1;{fEQV#?1|hvUMeZP`TEv)v82OzX^`Pxt*qy z&*A|mr9HoXsR=&rmRr5Zi#=K&l$T`}g)zQ|@qAJcsudMrZG0H2W*X>kYjTXw(Q`Hk< zbQQ2k&Kz@BIvz1mlpZp6_Kq?>;V$1xVd6Zbre|NbE>}1+sfjV}d;awcQ@Y58Ky3!C z>28F*ePggk%Qi;doO?PDv8qCEHo^(-yuPbpu1Kp$0MVI^(&)k;lZp6mb#dxH5VxFA zZn~CM4mJc5)riYltq@@SCUv*xaupynD^HL271fqfH)+jUUir;Z?ozcyoXZ4MIhs^? z{uZvMucr@vG*h$)DO=a=+$)MEQ9H=a)Zv}lezWsX+nG!@cq=qPp1XT%8TB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ph>e>R(hoH^F==EqY7@bDjBV zrE+!9`W(fN!u+PL9$Cfjf1^KK->*26&O$A5A48heRtsvOg#g^Ai9fzZb=8Zcr9A~_ zAyYnDrtInP3U;DnZPUrW=_nGZb?a8{SZ8On^m_N3l-#THDY zYbvD(MM-C1t6hJ6)B72wBQv6XS_1R8L$!7ic;1?S^#KI6FusBxeeqt%T=$N%jjJi4 ziW}lzXyN^%%7JfN*ZEQR3?<4{KJrt%Ig}C?w;im?{X4{{I;X_?tiy|M z3jRZL37;{%JXOt7vlT2Dl6t!KeM9cFyq)Yu$)ZiaNb7<=+uW+_~J~D^kW*~5^)Rvu3^rjS-Q0;(~@uMY(wZx!>Gw0 zW)yUoy-uJ$Mn=$RViE?TUw-|#Q6>2G-{Y8j|1yMKir oAAe?B|0{ccrXR1X-*+!f_kZ4Cga$bUVTaWCk01Wsmi*xTKg@HnzW@LL 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 _$ - 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( ' ', '_' ) ); - } - } - 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( ' ' ); + 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( ' ' ); + } // second product: LibreOffice_project/ // 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: */