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 <ci@libreoffice.org> Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
This commit is contained in:
parent
33414c8bf7
commit
1e49e40c36
@ -29,8 +29,7 @@ class UNOTOOLS_DLLPUBLIC DocInfoHelper
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static OUString GetGeneratorString();
|
static OUString GetGeneratorString();
|
||||||
static OUString GetApplicationString();
|
|
||||||
static OUString GetVersionString();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace utl
|
} // namespace utl
|
||||||
|
@ -58,7 +58,6 @@
|
|||||||
#include <tools/datetime.hxx>
|
#include <tools/datetime.hxx>
|
||||||
#include <com/sun/star/util/Duration.hpp>
|
#include <com/sun/star/util/Duration.hpp>
|
||||||
#include <sax/tools/converter.hxx>
|
#include <sax/tools/converter.hxx>
|
||||||
#include <unotools/configmgr.hxx>
|
|
||||||
|
|
||||||
using ::com::sun::star::xml::dom::DocumentBuilder;
|
using ::com::sun::star::xml::dom::DocumentBuilder;
|
||||||
using ::com::sun::star::xml::dom::XDocument;
|
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_HyperlinksChanged, "hyperlinks changed" );
|
||||||
writeElement( pAppProps, XML_DigSig, "digital signature" );
|
writeElement( pAppProps, XML_DigSig, "digital signature" );
|
||||||
#endif /* def OOXTODO */
|
#endif /* def OOXTODO */
|
||||||
writeElement( pAppProps, XML_Application, utl::ConfigManager::getProductName() );
|
writeElement( pAppProps, XML_Application, utl::DocInfoHelper::GetGeneratorString() );
|
||||||
writeElement( pAppProps, XML_AppVersion, utl::DocInfoHelper::GetVersionString() );
|
|
||||||
#ifdef OOXTODO
|
#ifdef OOXTODO
|
||||||
|
writeElement( pAppProps, XML_AppVersion, "app version" );
|
||||||
writeElement( pAppProps, XML_DocSecurity, "doc security" );
|
writeElement( pAppProps, XML_DocSecurity, "doc security" );
|
||||||
#endif /* def OOXTODO */
|
#endif /* def OOXTODO */
|
||||||
|
|
||||||
|
Binary file not shown.
@ -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();
|
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@ -41,44 +41,29 @@ OUString DocInfoHelper::GetGeneratorString()
|
|||||||
{
|
{
|
||||||
aResult.append( aValue.replace( ' ', '_' ) );
|
aResult.append( aValue.replace( ' ', '_' ) );
|
||||||
aResult.append( '/' );
|
aResult.append( '/' );
|
||||||
}
|
|
||||||
|
|
||||||
aValue = GetVersionString();
|
aValue = utl::ConfigManager::getProductVersion();
|
||||||
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();
|
|
||||||
if ( !aValue.isEmpty() )
|
if ( !aValue.isEmpty() )
|
||||||
{
|
{
|
||||||
aResult.append( aValue.replace( ' ', '_' ) );
|
aResult.append( aValue.replace( ' ', '_' ) );
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
OUString os( "$_OS" );
|
aValue = utl::ConfigManager::getProductExtension();
|
||||||
OUString arch( "$_ARCH" );
|
if ( !aValue.isEmpty() )
|
||||||
::rtl::Bootstrap::expandMacros(os);
|
{
|
||||||
::rtl::Bootstrap::expandMacros(arch);
|
aResult.append( aValue.replace( ' ', '_' ) );
|
||||||
aResult.append( '$' );
|
}
|
||||||
aResult.append( os );
|
}
|
||||||
aResult.append( '_' );
|
|
||||||
aResult.append( arch );
|
OUString os( "$_OS" );
|
||||||
aResult.append( ' ' );
|
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>
|
// second product: LibreOffice_project/<build_information>
|
||||||
// build_information has '(' and '[' encoded as '$', ')' and ']' ignored
|
// build_information has '(' and '[' encoded as '$', ')' and ']' ignored
|
||||||
@ -112,7 +97,6 @@ OUString DocInfoHelper::GetVersionString()
|
|||||||
return aResult.makeStringAndClear();
|
return aResult.makeStringAndClear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // end of namespace utl
|
} // end of namespace utl
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user