You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2013/12/19 14:03:05 UTC
svn commit: r1552307 - in /openoffice/trunk: ./ main/sw/source/filter/xml/
main/xmloff/inc/xmloff/ main/xmloff/source/core/ main/xmloff/source/text/
Author: orw
Date: Thu Dec 19 13:03:05 2013
New Revision: 1552307
URL: http://svn.apache.org/r1552307
Log:
123771: ODF export: export annotation's author initials in own namespace only in ODF 1.2 (extended) file format
annotation's author initials is currently not standardized in ODF 1.2
a corresponding proposal is available at the OASIS ODF TC - see JIRA isssue OFFICE-3776 at OASIS
cherry-picked from branch ooxml-osba
Modified:
openoffice/trunk/ (props changed)
openoffice/trunk/main/sw/source/filter/xml/xmliteme.cxx
openoffice/trunk/main/xmloff/inc/xmloff/xmlnmspe.hxx
openoffice/trunk/main/xmloff/inc/xmloff/xmltoken.hxx
openoffice/trunk/main/xmloff/source/core/xmlimp.cxx
openoffice/trunk/main/xmloff/source/core/xmltoken.cxx
openoffice/trunk/main/xmloff/source/text/txtflde.cxx
openoffice/trunk/main/xmloff/source/text/txtfldi.cxx
Propchange: openoffice/trunk/
------------------------------------------------------------------------------
Merged /openoffice/branches/ooxml-osba:r1546934,1551958
Modified: openoffice/trunk/main/sw/source/filter/xml/xmliteme.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/xml/xmliteme.cxx?rev=1552307&r1=1552306&r2=1552307&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/xml/xmliteme.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/xml/xmliteme.cxx Thu Dec 19 13:03:05 2013
@@ -32,6 +32,7 @@
#include <xmloff/xmluconv.hxx>
#include "xmlexpit.hxx"
#include <xmloff/nmspmap.hxx>
+#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmltabe.hxx>
#include "xmlbrshe.hxx"
#include <editeng/tstpitem.hxx>
@@ -236,6 +237,14 @@ void SwXMLExport::_InitItemExport()
xTableCellItemMap = new SvXMLItemMapEntries( aXMLTableCellItemMap );
pTableItemMapper = new SwXMLTableItemMapper_Impl( xTableItemMap, *this );
+
+ if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
+ {
+ _GetNamespaceMap().Add(
+ GetXMLToken(XML_NP_TEXT_EXT),
+ GetXMLToken(XML_N_TEXT_EXT),
+ XML_NAMESPACE_TEXT_EXT);
+ }
}
void SwXMLExport::_FinitItemExport()
Modified: openoffice/trunk/main/xmloff/inc/xmloff/xmlnmspe.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/inc/xmloff/xmlnmspe.hxx?rev=1552307&r1=1552306&r2=1552307&view=diff
==============================================================================
--- openoffice/trunk/main/xmloff/inc/xmloff/xmlnmspe.hxx (original)
+++ openoffice/trunk/main/xmloff/inc/xmloff/xmlnmspe.hxx Thu Dec 19 13:03:05 2013
@@ -85,8 +85,9 @@ XML_NAMESPACE_EXT( OFFICE, 37U )
XML_NAMESPACE_EXT( TABLE, 38U )
XML_NAMESPACE_EXT( CHART, 39U )
XML_NAMESPACE_EXT( DRAW, 40U )
+XML_NAMESPACE_EXT( TEXT, 41U )
-#define _XML_OLD_NAMESPACE_BASE 41U
+#define _XML_OLD_NAMESPACE_BASE 42U
// namespaces used in the technical preview (SO 5.2)
XML_OLD_NAMESPACE( FO, 0U )
Modified: openoffice/trunk/main/xmloff/inc/xmloff/xmltoken.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/inc/xmloff/xmltoken.hxx?rev=1552307&r1=1552306&r2=1552307&view=diff
==============================================================================
--- openoffice/trunk/main/xmloff/inc/xmloff/xmltoken.hxx (original)
+++ openoffice/trunk/main/xmloff/inc/xmloff/xmltoken.hxx Thu Dec 19 13:03:05 2013
@@ -147,6 +147,9 @@ namespace xmloff { namespace token {
XML_NP_DRAW_EXT,
XML_N_DRAW_EXT,
+ XML_NP_TEXT_EXT,
+ XML_N_TEXT_EXT,
+
// units
XML_UNIT_MM,
XML_UNIT_M,
Modified: openoffice/trunk/main/xmloff/source/core/xmlimp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/source/core/xmlimp.cxx?rev=1552307&r1=1552306&r2=1552307&view=diff
==============================================================================
--- openoffice/trunk/main/xmloff/source/core/xmlimp.cxx (original)
+++ openoffice/trunk/main/xmloff/source/core/xmlimp.cxx Thu Dec 19 13:03:05 2013
@@ -92,6 +92,7 @@ sal_Char __READONLY_DATA sXML_np__oooc[]
sal_Char __READONLY_DATA sXML_np__of[] = "_of";
sal_Char __READONLY_DATA sXML_np__style[] = "_style";
sal_Char __READONLY_DATA sXML_np__text[] = "_text";
+sal_Char __READONLY_DATA sXML_np__text_ext[] = "_text_ooo";
sal_Char __READONLY_DATA sXML_np__table[] = "_table";
sal_Char __READONLY_DATA sXML_np__table_ext[] = "_table_ooo";
sal_Char __READONLY_DATA sXML_np__draw[] = "_draw";
@@ -308,8 +309,7 @@ void SvXMLImport::_InitCtor()
if( mnImportFlags != 0 )
{
// implicit "xml" namespace prefix
- mpNamespaceMap->Add( GetXMLToken(XML_XML), GetXMLToken(XML_N_XML),
- XML_NAMESPACE_XML );
+ mpNamespaceMap->Add( GetXMLToken(XML_XML), GetXMLToken(XML_N_XML), XML_NAMESPACE_XML );
mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__office ) ),
GetXMLToken(XML_N_OFFICE),
XML_NAMESPACE_OFFICE );
@@ -323,6 +323,9 @@ void SvXMLImport::_InitCtor()
mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__text) ),
GetXMLToken(XML_N_TEXT),
XML_NAMESPACE_TEXT );
+ mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__text_ext ) ),
+ GetXMLToken(XML_N_TEXT_EXT),
+ XML_NAMESPACE_TEXT_EXT );
mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__table ) ),
GetXMLToken(XML_N_TABLE),
XML_NAMESPACE_TABLE );
Modified: openoffice/trunk/main/xmloff/source/core/xmltoken.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/source/core/xmltoken.cxx?rev=1552307&r1=1552306&r2=1552307&view=diff
==============================================================================
--- openoffice/trunk/main/xmloff/source/core/xmltoken.cxx (original)
+++ openoffice/trunk/main/xmloff/source/core/xmltoken.cxx Thu Dec 19 13:03:05 2013
@@ -155,6 +155,9 @@ namespace xmloff { namespace token {
TOKEN( "drawooo", XML_NP_DRAW_EXT ),
TOKEN( "http://openoffice.org/2010/draw", XML_N_DRAW_EXT ),
+ TOKEN( "textooo", XML_NP_TEXT_EXT ),
+ TOKEN( "http://openoffice.org/2013/office", XML_N_TEXT_EXT ),
+
// units
TOKEN( "mm", XML_UNIT_MM ),
TOKEN( "m", XML_UNIT_M ),
Modified: openoffice/trunk/main/xmloff/source/text/txtflde.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/source/text/txtflde.cxx?rev=1552307&r1=1552306&r2=1552307&view=diff
==============================================================================
--- openoffice/trunk/main/xmloff/source/text/txtflde.cxx (original)
+++ openoffice/trunk/main/xmloff/source/text/txtflde.cxx Thu Dec 19 13:03:05 2013
@@ -1764,13 +1764,14 @@ void XMLTextFieldExport::ExportFieldHelp
}
// initials
+ if ( GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
{
OUString aInitials( GetStringProperty(sPropertyInitials, rPropSet) );
if ( aInitials.getLength() > 0 )
{
SvXMLElementExport aCreatorElem(
GetExport(),
- XML_NAMESPACE_TEXT,
+ XML_NAMESPACE_TEXT_EXT,
XML_SENDER_INITIALS,
sal_True,
sal_False );
Modified: openoffice/trunk/main/xmloff/source/text/txtfldi.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/source/text/txtfldi.cxx?rev=1552307&r1=1552306&r2=1552307&view=diff
==============================================================================
--- openoffice/trunk/main/xmloff/source/text/txtfldi.cxx (original)
+++ openoffice/trunk/main/xmloff/source/text/txtfldi.cxx Thu Dec 19 13:03:05 2013
@@ -3682,7 +3682,8 @@ SvXMLImportContext* XMLAnnotationImportC
new XMLStringBufferImportContext( GetImport(), nPrefix, rLocalName, aDateBuffer);
}
}
- else if ( XML_NAMESPACE_TEXT == nPrefix )
+ else if ( XML_NAMESPACE_TEXT == nPrefix
+ || XML_NAMESPACE_TEXT_EXT == nPrefix )
{
if( IsXMLToken( rLocalName, XML_SENDER_INITIALS ) )
{