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
commit2efcf2da2055ad1cb3b00031b19145f8b104b122 (patch)
tree3da09abcea30ffcc4b3160bcbe8fde8f97d3696b /xmloff
parente0185db43409456a5ccf47bd1f879888a5b04783 (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.hxx8
-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, 25 insertions, 1 deletions
diff --git a/xmloff/inc/xmlnmspe.hxx b/xmloff/inc/xmlnmspe.hxx
index 7b7b7e131ec7..ae194cfbf770 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 1c0b88f5d691..a2606ea12b96 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -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,
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index b1ba8520c1db..3cdea25344fe 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 c791fe4077d4..97ecaac68fa7 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 7538003a86fb..ab35644777b3 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 ),