summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorBjörn Milcke <bm@openoffice.org>2001-10-30 13:53:54 +0000
committerBjörn Milcke <bm@openoffice.org>2001-10-30 13:53:54 +0000
commitbd8f85159e572cca58831bf5cc0a39e504b8a5a3 (patch)
tree0cb215c057d02ff7b62b219d5013e7b1922fe9d9 /xmloff
parent54ced4ab83b4ffe8e75acdd5fa9bd390e14ca5ad (diff)
#93797# support property fo:direction (ttb|ltr) for titles and axes
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/dtd/chart.mod13
-rw-r--r--xmloff/source/chart/PropertyMap.hxx6
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx12
-rw-r--r--xmloff/source/chart/XMLTextOrientationHdl.cxx116
-rw-r--r--xmloff/source/chart/XMLTextOrientationHdl.hxx82
-rw-r--r--xmloff/source/chart/makefile.mk7
6 files changed, 224 insertions, 12 deletions
diff --git a/xmloff/dtd/chart.mod b/xmloff/dtd/chart.mod
index 74cd0c51c77f..a1862c6d5b32 100644
--- a/xmloff/dtd/chart.mod
+++ b/xmloff/dtd/chart.mod
@@ -1,5 +1,5 @@
<!--
- $Id: chart.mod,v 1.24 2001-07-24 11:23:13 cl Exp $
+ $Id: chart.mod,v 1.25 2001-10-30 14:53:54 bm Exp $
The Contents of this file are made available subject to the terms of
either of the following licenses
@@ -91,7 +91,9 @@
chart:symbol %integer; "-1"
chart:vertical %boolean; "false"
chart:lines-used %nonNegativeInteger; "0"
- chart:connect-bars %boolean; "false">
+ chart:connect-bars %boolean; "false"
+ chart:spline-order %nonNegativeInteger; "2"
+ chart:spline-resolution %nonNegativeInteger; "20">
<!-- Main/Sub Title -->
<!-- the cell-address attribute is currently not supported for titles -->
@@ -186,7 +188,8 @@
chart:overlap %integer; #IMPLIED
text:line-break %boolean; "true"
chart:display-label %boolean; "true"
- chart:label-arrangement (side-by-side|stagger-even|stagger-odd) "side-by-side"
+ chart:label-arrangement (side-by-side|stagger-even|stagger-odd) "side-by-side"
+ chart:text-overlap %boolean; "false"
chart:visible %boolean; "true"
chart:link-data-style-to-source %boolean; "true" >
@@ -246,7 +249,9 @@
<!-- general text properties -->
-<!ATTLIST style:properties text:rotation-angle %integer; "0" >
+<!ATTLIST style:properties
+ text:rotation-angle %integer; "0"
+ fo:direction (ltr|ttb) #IMPLIED >
<!-- symbol properties -->
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index 9bc28094eb30..0dc7c2df41c5 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PropertyMap.hxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: bm $ $Date: 2001-08-28 12:17:21 $
+ * last change: $Author: bm $ $Date: 2001-10-30 14:53:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -107,6 +107,7 @@
#define XML_SCH_TYPE_ERROR_INDICATOR_UPPER ( XML_SCH_TYPES_START + 4 )
#define XML_SCH_TYPE_ERROR_INDICATOR_LOWER ( XML_SCH_TYPES_START + 5 )
#define XML_SCH_TYPE_DATAROWSOURCE ( XML_SCH_TYPES_START + 6 )
+#define XML_SCH_TYPE_TEXT_ORIENTATION ( XML_SCH_TYPES_START + 7 )
// context ids
#define XML_SCH_CONTEXT_USER_SYMBOL ( XML_SCH_CTF_START + 0 )
@@ -213,6 +214,7 @@ const XMLPropertyMapEntry aXMLChartPropMap[] =
// text properties for titles
MAP_SPECIAL( "TextRotation", TEXT, XML_ROTATION_ANGLE, XML_TYPE_NUMBER, TEXT_ROTATION ), // convert 1/100th degrees to degrees
+ MAP_ENTRY( "StackedText", FO, XML_DIRECTION, XML_SCH_TYPE_TEXT_ORIENTATION ),
// for compatability to pre 6.0beta documents
MAP_SPECIAL( "SymbolBitmapURL", CHART, XML_SYMBOL_IMAGE_NAME, XML_TYPE_STRING, SYMBOL_IMAGE_NAME ),
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 711e01ad88b7..55be2eb86511 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PropertyMaps.cxx,v $
*
- * $Revision: 1.33 $
+ * $Revision: 1.34 $
*
- * last change: $Author: dvo $ $Date: 2001-10-25 20:57:02 $
+ * last change: $Author: bm $ $Date: 2001-10-30 14:53:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -100,6 +100,9 @@
#ifndef _XMLERRORINDICATORPROPERTYHDL_HXX_
#include "XMLErrorIndicatorPropertyHdl.hxx"
#endif
+#ifndef _XMLTEXTORIENTATIONHDL_HXX_
+#include "XMLTextOrientationHdl.hxx"
+#endif
#ifndef _COM_SUN_STAR_CHART_CHARTAXISMARKS_HPP_
#include <com/sun/star/chart/ChartAxisMarks.hpp>
@@ -189,7 +192,10 @@ const XMLPropertyHandler* XMLChartPropHdlFactory::GetPropertyHandler( sal_Int32
pHdl = new XMLEnumPropertyHdl( aXMLChartDataRowSourceTypeEnumMap,
::getCppuType((const chart::ChartDataRowSource*)0) );
break;
- }
+ case XML_SCH_TYPE_TEXT_ORIENTATION:
+ pHdl = new XMLTextOrientationHdl();
+ break;
+ }
if( pHdl )
PutHdlCache( nType, pHdl );
}
diff --git a/xmloff/source/chart/XMLTextOrientationHdl.cxx b/xmloff/source/chart/XMLTextOrientationHdl.cxx
new file mode 100644
index 000000000000..2efe356d2163
--- /dev/null
+++ b/xmloff/source/chart/XMLTextOrientationHdl.cxx
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextOrientationHdl.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: bm $ $Date: 2001-10-30 14:53:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include "XMLTextOrientationHdl.hxx"
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::xmloff::token;
+
+XMLTextOrientationHdl::~XMLTextOrientationHdl()
+{
+}
+
+sal_Bool XMLTextOrientationHdl::importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRetval( sal_False );
+
+ if( IsXMLToken( rStrImpValue, XML_LTR ))
+ {
+ rValue <<= static_cast< sal_Bool >( sal_False );
+ bRetval = sal_True;
+ }
+ else if( IsXMLToken( rStrImpValue, XML_TTB ))
+ {
+ rValue <<= static_cast< sal_Bool >( sal_True );
+ bRetval = sal_True;
+ }
+
+ return bRetval;
+}
+
+sal_Bool XMLTextOrientationHdl::exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bVal;
+ sal_Bool bRetval( sal_False );
+
+ if( rValue >>= bVal )
+ {
+ if( bVal )
+ rStrExpValue = GetXMLToken( XML_TTB );
+ else
+ rStrExpValue = GetXMLToken( XML_LTR );
+ bRetval = sal_True;
+ }
+
+ return bRetval;
+}
diff --git a/xmloff/source/chart/XMLTextOrientationHdl.hxx b/xmloff/source/chart/XMLTextOrientationHdl.hxx
new file mode 100644
index 000000000000..38fa97b654a1
--- /dev/null
+++ b/xmloff/source/chart/XMLTextOrientationHdl.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextOrientationHdl.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: bm $ $Date: 2001-10-30 14:53:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _XMLTEXTORIENTATIONHDL_HXX_
+#define _XMLTEXTORIENTATIONHDL_HXX_
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include "xmlprhdl.hxx"
+#endif
+
+class XMLTextOrientationHdl : public XMLPropertyHandler
+{
+private:
+public:
+ virtual ~XMLTextOrientationHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLTEXTORIENTATIONHDL_HXX_
diff --git a/xmloff/source/chart/makefile.mk b/xmloff/source/chart/makefile.mk
index b67abd073a07..a1d0d8d080e0 100644
--- a/xmloff/source/chart/makefile.mk
+++ b/xmloff/source/chart/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.6 $
+# $Revision: 1.7 $
#
-# last change: $Author: bm $ $Date: 2001-08-14 11:57:23 $
+# last change: $Author: bm $ $Date: 2001-10-30 14:53:54 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -86,7 +86,8 @@ SLOFILES = $(SLO)$/SchXMLExport.obj \
$(SLO)$/XMLErrorIndicatorPropertyHdl.obj \
$(SLO)$/SchXMLAutoStylePoolP.obj \
$(SLO)$/XMLChartPropertyContext.obj \
- $(SLO)$/XMLSymbolImageContext.obj
+ $(SLO)$/XMLSymbolImageContext.obj \
+ $(SLO)$/XMLTextOrientationHdl.obj
# --- Targets --------------------------------------------------------------