summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Brauer <mib@openoffice.org>2001-10-16 09:56:37 +0000
committerMichael Brauer <mib@openoffice.org>2001-10-16 09:56:37 +0000
commite3c066bd35ba26897229f910f959fe2437f466c7 (patch)
tree4fee8c41ce01ab313b7ac306327d3694bc4a3910 /xmloff
parent6bc825fa295ae85d475ccd34a91ae00e75e333b2 (diff)
#92717#: set x and y position only if required
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx33
-rw-r--r--xmloff/source/text/XMLTextFrameContext.hxx6
2 files changed, 31 insertions, 8 deletions
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index fdef017eb40f..0cbe10da07fd 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextFrameContext.cxx,v $
*
- * $Revision: 1.49 $
+ * $Revision: 1.50 $
*
- * last change: $Author: mib $ $Date: 2001-10-10 17:06:40 $
+ * last change: $Author: mib $ $Date: 2001-10-16 10:56:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -93,6 +93,12 @@
#ifndef _COM_SUN_STAR_IO_XOUTPUTSTREAM_HPP_
#include <com/sun/star/io/XOutputStream.hpp>
#endif
+#ifndef _COM_SUN_STAR_TEXT_HORIORIENTATION_HPP_
+#include <com/sun/star/text/HoriOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_VERTORIENTATION_HPP_
+#include <com/sun/star/text/VertOrientation.hpp>
+#endif
#ifndef _XMLOFF_XMLIMP_HXX
#include "xmlimp.hxx"
#endif
@@ -531,10 +537,23 @@ void XMLTextFrameContext::Create( sal_Bool bHRefOrBase64 )
// x and y
- aAny <<= nX;
- xPropSet->setPropertyValue( sHoriOrientPosition, aAny );
- aAny <<= nY;
- xPropSet->setPropertyValue( sVertOrientPosition, aAny );
+ sal_Int16 nHoriOrient = HoriOrientation::NONE;
+ aAny = xPropSet->getPropertyValue( sHoriOrient );
+ aAny >>= nHoriOrient;
+ if( HoriOrientation::NONE == nHoriOrient )
+ {
+ aAny <<= nX;
+ xPropSet->setPropertyValue( sHoriOrientPosition, aAny );
+ }
+
+ sal_Int16 nVertOrient = VertOrientation::NONE;
+ aAny = xPropSet->getPropertyValue( sVertOrient );
+ aAny >>= nVertOrient;
+ if( VertOrientation::NONE == nVertOrient )
+ {
+ aAny <<= nY;
+ xPropSet->setPropertyValue( sVertOrientPosition, aAny );
+ }
// width
if( nWidth > 0 )
@@ -667,7 +686,9 @@ XMLTextFrameContext::XMLTextFrameContext(
sSizeType(RTL_CONSTASCII_USTRINGPARAM("SizeType")),
sIsSyncWidthToHeight(RTL_CONSTASCII_USTRINGPARAM("IsSyncWidthToHeight")),
sIsSyncHeightToWidth(RTL_CONSTASCII_USTRINGPARAM("IsSyncHeightToWidth")),
+ sHoriOrient(RTL_CONSTASCII_USTRINGPARAM("HoriOrient")),
sHoriOrientPosition(RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition")),
+ sVertOrient(RTL_CONSTASCII_USTRINGPARAM("VertOrient")),
sVertOrientPosition(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")),
sChainNextName(RTL_CONSTASCII_USTRINGPARAM("ChainNextName")),
sAnchorType(RTL_CONSTASCII_USTRINGPARAM("AnchorType")),
diff --git a/xmloff/source/text/XMLTextFrameContext.hxx b/xmloff/source/text/XMLTextFrameContext.hxx
index a8b528dd58d2..9b32984b21bb 100644
--- a/xmloff/source/text/XMLTextFrameContext.hxx
+++ b/xmloff/source/text/XMLTextFrameContext.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextFrameContext.hxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: dvo $ $Date: 2001-07-25 13:29:47 $
+ * last change: $Author: mib $ $Date: 2001-10-16 10:56:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -125,7 +125,9 @@ class XMLTextFrameContext : public SvXMLImportContext
const ::rtl::OUString sSizeType;
const ::rtl::OUString sIsSyncWidthToHeight;
const ::rtl::OUString sIsSyncHeightToWidth;
+ const ::rtl::OUString sHoriOrient;
const ::rtl::OUString sHoriOrientPosition;
+ const ::rtl::OUString sVertOrient;
const ::rtl::OUString sVertOrientPosition;
const ::rtl::OUString sChainNextName;
const ::rtl::OUString sAnchorType;