summaryrefslogtreecommitdiff
path: root/xmloff/source/draw
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-05-08 15:01:22 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-05-08 19:53:25 +0200
commitb09889a158cbc839ebc8a6061b0b261fa74930e6 (patch)
treebad7d2516c34a4e834dc44113b13016614c38438 /xmloff/source/draw
parent745cf84060184ae707c047db17ef458aa7e384a1 (diff)
OFFICE-3776 xmloff: adapt ODF import to renamed text:sender-initials
ODF TC decided to rename the element to meta:creator-initials, so adapt the import so it can read this in addition to the 2 element names produced by current and past LO versions. Also add a test. Unfortunately it turned out that the ODF validator had a bug in checking character data in foreign elements, which is triggered by the test document, see https://issues.apache.org/jira/browse/ODFTOOLKIT-475 ... so update the validator jar as well. Change-Id: I1de1e8772b41f8937f043d9a0d150e169f25ffd4 Reviewed-on: https://gerrit.libreoffice.org/53979 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx1
-rw-r--r--xmloff/source/draw/ximppage.cxx6
2 files changed, 5 insertions, 2 deletions
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 1a2a3434fee7..36c8ca93f117 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2623,6 +2623,7 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage )
OUString aInitials( xAnnotation->getInitials() );
if( !aInitials.isEmpty() )
{
+ // TODO: see OFFICE-3776 export meta:creator-initials for ODF 1.3
SvXMLElementExport aInitialsElem( *this, XML_NAMESPACE_LO_EXT,
XML_SENDER_INITIALS, true, false );
Characters(aInitials);
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 0b670fb0e083..2bfb61072352 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -143,8 +143,10 @@ SvXMLImportContextRef DrawAnnotationContext::CreateChildContext( sal_uInt16 nPre
else if( IsXMLToken( rLocalName, XML_DATE ) )
xContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, maDateBuffer);
}
- else if( (XML_NAMESPACE_TEXT == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix) &&
- IsXMLToken(rLocalName, XML_SENDER_INITIALS) )
+ else if (((XML_NAMESPACE_TEXT == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix)
+ && IsXMLToken(rLocalName, XML_SENDER_INITIALS))
+ || (XML_NAMESPACE_META == nPrefix
+ && IsXMLToken(rLocalName, XML_CREATOR_INITIALS)))
{
xContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, maInitialsBuffer);
}