summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-10-05 11:24:49 -0400
committerKohei Yoshida <kyoshida@novell.com>2010-10-05 11:24:49 -0400
commit59766998c4be373b8a8feb84d55157e94755c1c2 (patch)
treef13931dac4eb83698ae95cdd268b88bf4bc194cc /xmloff
parent5039415ee76af364e260492cfc8cde4b66ef35cf (diff)
Ported calc-distributed-cell-text-*.diff from ooo-build.
This feature enables horizontal 'distributed' alignment and vertical 'justified' and 'distributed' alignments for cell contents in Calc. Note that this feature relies on ODF 1.2 extended in order for the relevant cell attributes to be saved in ODS.
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/xmlnmspe.hxx2
-rw-r--r--xmloff/inc/xmloff/xmltoken.hxx16
-rw-r--r--xmloff/source/core/xmlexp.cxx6
-rw-r--r--xmloff/source/core/xmlimp.cxx4
-rw-r--r--xmloff/source/core/xmltoken.cxx6
5 files changed, 29 insertions, 5 deletions
diff --git a/xmloff/inc/xmlnmspe.hxx b/xmloff/inc/xmlnmspe.hxx
index 1451cdeb57..3378c56226 100644
--- a/xmloff/inc/xmlnmspe.hxx
+++ b/xmloff/inc/xmlnmspe.hxx
@@ -104,6 +104,6 @@ XML_OLD_NAMESPACE( META, 6U )
// experimental namespaces
XML_NAMESPACE( FIELD, 100U )
-
+XML_NAMESPACE( CSS3TEXT, 103U ) // CSS Text Level 3
#endif // _XMLOFF_XMLNMSPE_HXX
diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
index 3ea86c28b2..f459edb9f8 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -148,9 +148,14 @@ namespace xmloff { namespace token {
XML_NP_TABLE_EXT,
XML_N_TABLE_EXT,
+
XML_NP_DRAW_EXT,
XML_N_DRAW_EXT,
+ // css text level 3
+ XML_NP_CSS3TEXT,
+ XML_N_CSS3TEXT,
+
// units
XML_UNIT_MM,
XML_UNIT_M,
@@ -606,6 +611,7 @@ namespace xmloff { namespace token {
XML_DISTANCE,
XML_DISTANCE_AFTER_SEP,
XML_DISTANCE_BEFORE_SEP,
+ XML_DISTRIBUTE,
XML_DISTRIBUTE_LETTER,
XML_DISTRIBUTE_SPACE,
XML_DIVIDE,
@@ -1776,6 +1782,7 @@ namespace xmloff { namespace token {
XML_TEXT_GLOBAL,
XML_TEXT_INDENT,
XML_TEXT_INPUT,
+ XML_TEXT_JUSTIFY,
XML_TEXT_OUTLINE,
XML_TEXT_POSITION,
XML_TEXT_ROTATION_ANGLE,
@@ -1909,6 +1916,7 @@ namespace xmloff { namespace token {
XML_VERSION_LIST,
XML_VERTICAL,
XML_VERTICAL_ALIGN,
+ XML_VERTICAL_JUSTIFY,
XML_VERTICAL_LINES,
XML_VERTICAL_POS,
XML_VERTICAL_REL,
@@ -3096,9 +3104,9 @@ namespace xmloff { namespace token {
XML_SURFACE,
// MathML only
- XML_MATHVARIANT,
- XML_MATHSIZE,
- XML_MATHWEIGHT,
+ XML_MATHVARIANT,
+ XML_MATHSIZE,
+ XML_MATHWEIGHT,
XML_MATHCOLOR,
XML_CONTAINS,
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 9b1ddcb088..57aa68caf7 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -422,6 +422,12 @@ void SvXMLExport::_InitCtor()
mpNamespaceMap->Add( GetXMLToken(XML_NP_GRDDL),
GetXMLToken(XML_N_GRDDL), XML_NAMESPACE_GRDDL );
}
+ // CSS Text Level 3 for distributed text justification.
+ if ( (getExportFlags() & (EXPORT_STYLES|EXPORT_AUTOSTYLES|EXPORT_MASTERSTYLES)) != 0 )
+ {
+ mpNamespaceMap->Add(
+ GetXMLToken(XML_NP_CSS3TEXT), GetXMLToken(XML_N_CSS3TEXT), XML_NAMESPACE_CSS3TEXT );
+ }
mxAttrList = (xml::sax::XAttributeList*)mpAttrList;
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index ba559a00e7..87c29594ca 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -119,6 +119,7 @@ sal_Char __READONLY_DATA sXML_np__xsd[] = "_xsd";
sal_Char __READONLY_DATA sXML_np__xsi[] = "_xsi";
sal_Char __READONLY_DATA sXML_np__field[] = "_field";
sal_Char __READONLY_DATA sXML_np__xhtml[] = "_xhtml";
+sal_Char __READONLY_DATA sXML_np__css3text[] = "_css3text";
sal_Char __READONLY_DATA sXML_np__fo_old[] = "__fo";
sal_Char __READONLY_DATA sXML_np__xlink_old[] = "__xlink";
@@ -323,6 +324,9 @@ void SvXMLImport::_InitCtor()
mpNamespaceMap->Add(
OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__xhtml ) ),
GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML );
+ mpNamespaceMap->Add(
+ OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_np__css3text ) ),
+ GetXMLToken(XML_N_CSS3TEXT), XML_NAMESPACE_CSS3TEXT );
}
msPackageProtocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) );
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index ba3840e5d9..53628bf4e2 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -159,6 +159,9 @@ namespace xmloff { namespace token {
TOKEN( "drawooo", XML_NP_DRAW_EXT ),
TOKEN( "http://openoffice.org/2010/draw", XML_N_DRAW_EXT ),
+ TOKEN( "css3t", XML_NP_CSS3TEXT ),
+ TOKEN( "http://www.w3.org/TR/css3-text/", XML_N_CSS3TEXT ),
+
// units
TOKEN( "mm", XML_UNIT_MM ),
TOKEN( "m", XML_UNIT_M ),
@@ -614,6 +617,7 @@ namespace xmloff { namespace token {
TOKEN( "distance", XML_DISTANCE ),
TOKEN( "distance-after-sep", XML_DISTANCE_AFTER_SEP ),
TOKEN( "distance-before-sep", XML_DISTANCE_BEFORE_SEP ),
+ TOKEN( "distribute", XML_DISTRIBUTE ),
TOKEN( "distribute-letter", XML_DISTRIBUTE_LETTER ),
TOKEN( "distribute-space", XML_DISTRIBUTE_SPACE ),
TOKEN( "divide", XML_DIVIDE ),
@@ -1784,6 +1788,7 @@ namespace xmloff { namespace token {
TOKEN( "text-global", XML_TEXT_GLOBAL ),
TOKEN( "text-indent", XML_TEXT_INDENT ),
TOKEN( "text-input", XML_TEXT_INPUT ),
+ TOKEN( "text-justify", XML_TEXT_JUSTIFY ),
TOKEN( "text-outline", XML_TEXT_OUTLINE ),
TOKEN( "text-position", XML_TEXT_POSITION ),
TOKEN( "text-rotation-angle", XML_TEXT_ROTATION_ANGLE ),
@@ -1917,6 +1922,7 @@ namespace xmloff { namespace token {
TOKEN( "version-list", XML_VERSION_LIST ),
TOKEN( "vertical", XML_VERTICAL ),
TOKEN( "vertical-align", XML_VERTICAL_ALIGN ),
+ TOKEN( "vertical-justify", XML_VERTICAL_JUSTIFY ),
TOKEN( "vertical-lines", XML_VERTICAL_LINES ),
TOKEN( "vertical-pos", XML_VERTICAL_POS ),
TOKEN( "vertical-rel", XML_VERTICAL_REL ),