summaryrefslogtreecommitdiff
path: root/xmloff/source/style
diff options
context:
space:
mode:
authorMichael Brauer <mib@openoffice.org>2001-03-21 09:01:02 +0000
committerMichael Brauer <mib@openoffice.org>2001-03-21 09:01:02 +0000
commit8af76adf860c3a93906cd8db499b96027c46464f (patch)
tree526ea22109aaef27687ec0de2cf8f3677070901a /xmloff/source/style
parentdbb5c4302ed94ee357a4b337a2d375560de02254 (diff)
additional floating frame properties
Diffstat (limited to 'xmloff/source/style')
-rw-r--r--xmloff/source/style/prhdlfac.cxx7
-rw-r--r--xmloff/source/style/xmlbahdl.cxx42
-rw-r--r--xmloff/source/style/xmlbahdl.hxx18
3 files changed, 61 insertions, 6 deletions
diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx
index 37ba09fffe3c..049f9eb51af5 100644
--- a/xmloff/source/style/prhdlfac.cxx
+++ b/xmloff/source/style/prhdlfac.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: prhdlfac.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: dvo $ $Date: 2001-02-21 19:28:48 $
+ * last change: $Author: mib $ $Date: 2001-03-21 09:57:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -244,6 +244,9 @@ const XMLPropertyHandler* XMLPropertyHandlerFactory::GetBasicHandler( sal_Int32
case XML_TYPE_PERCENT16 :
pPropHdl = new XMLPercentPropHdl( 2 );
break;
+ case XML_TYPE_MEASURE_PX :
+ pPropHdl = new XMLMeasurePxPropHdl( 4 );
+ break;
case XML_TYPE_STRING :
pPropHdl = new XMLStringPropHdl;
break;
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx
index a5dea41f7d88..2da1bcc1ccea 100644
--- a/xmloff/source/style/xmlbahdl.cxx
+++ b/xmloff/source/style/xmlbahdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlbahdl.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: aw $ $Date: 2001-02-26 10:28:52 $
+ * last change: $Author: mib $ $Date: 2001-03-21 09:57:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -390,6 +390,44 @@ sal_Bool XMLPercentPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue
///////////////////////////////////////////////////////////////////////////////
//
+// class XMLMeasurePxPropHdl
+//
+
+XMLMeasurePxPropHdl::~XMLMeasurePxPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLMeasurePxPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+
+ sal_Int32 nValue;
+ bRet = rUnitConverter.convertMeasurePx( nValue, rStrImpValue );
+ lcl_xmloff_setAny( rValue, nValue, nBytes );
+
+ return bRet;
+}
+
+sal_Bool XMLMeasurePxPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Int32 nValue;
+ OUStringBuffer aOut;
+
+ if( lcl_xmloff_getAny( rValue, nValue, nBytes ) )
+ {
+ rUnitConverter.convertMeasurePx( aOut, nValue );
+ rStrExpValue = aOut.makeStringAndClear();
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
// class XMLColorPropHdl
//
diff --git a/xmloff/source/style/xmlbahdl.hxx b/xmloff/source/style/xmlbahdl.hxx
index 0c5ffca6343c..0683a5796cb4 100644
--- a/xmloff/source/style/xmlbahdl.hxx
+++ b/xmloff/source/style/xmlbahdl.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlbahdl.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mib $ $Date: 2000-11-23 11:51:54 $
+ * last change: $Author: mib $ $Date: 2001-03-21 09:57:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -130,6 +130,20 @@ public:
};
/**
+ PropertyHandler for the XML-data-type: XML_TYPE_PERCENT
+*/
+class XMLMeasurePxPropHdl : public XMLPropertyHandler
+{
+ sal_Int8 nBytes;
+public:
+ XMLMeasurePxPropHdl( sal_Int8 nB=4 ) : nBytes( nB ) {}
+ virtual ~XMLMeasurePxPropHdl();
+
+ 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;
+};
+
+/**
PropertyHandler for the XML-data-type: XML_TYPE_BOOL
*/
class XMLBoolPropHdl : public XMLPropertyHandler