summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-05-18 14:05:04 +0000
committerKurt Zenker <kz@openoffice.org>2004-05-18 14:05:04 +0000
commitae9429cfdbb7a827c291359c16eed21ae48b8dd2 (patch)
tree69d0f4c9c6a5f8ec9e2a4099c2d960a62d48d1b2 /xmloff
parent062b82cd24ebdad91b98cc183ae778ba14b4aff2 (diff)
INTEGRATION: CWS swautowidth (1.21.86); FILE MERGED
2004/05/07 14:38:31 dvo 1.21.86.3: #i27203# save frame width/height='VARIABLE' as fo:min-width/fo:min-height="0" 2004/04/27 08:19:58 fme 1.21.86.2: RESYNC: (1.21-1.22); FILE MERGED 2004/04/07 16:40:16 dvo 1.21.86.1: #i27203# load/save fo:min-width
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/text/txtexppr.cxx52
1 files changed, 49 insertions, 3 deletions
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
index 7c3fdc6909e4..8fa1b34768aa 100644
--- a/xmloff/source/text/txtexppr.cxx
+++ b/xmloff/source/text/txtexppr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtexppr.cxx,v $
*
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
*
- * last change: $Author: rt $ $Date: 2004-03-30 14:31:38 $
+ * last change: $Author: kz $ $Date: 2004-05-18 15:05:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -435,6 +435,13 @@ void XMLTextExportPropertySetMapper::ContextFilter(
XMLPropertyState* pHeightRelState = NULL;
XMLPropertyState* pSizeTypeState = NULL;
+ // filter width properties
+ XMLPropertyState* pWidthMinAbsState = NULL;
+ XMLPropertyState* pWidthMinRelState = NULL;
+ XMLPropertyState* pWidthAbsState = NULL;
+ XMLPropertyState* pWidthRelState = NULL;
+ XMLPropertyState* pWidthTypeState = NULL;
+
// wrap
XMLPropertyState* pWrapState = NULL;
XMLPropertyState* pWrapContourState = NULL;
@@ -516,6 +523,12 @@ void XMLTextExportPropertySetMapper::ContextFilter(
case CTF_FRAMEHEIGHT_REL: pHeightRelState = propertie; break;
case CTF_SIZETYPE: pSizeTypeState = propertie; break;
+ case CTF_FRAMEWIDTH_MIN_ABS: pWidthMinAbsState = propertie; break;
+ case CTF_FRAMEWIDTH_MIN_REL: pWidthMinRelState = propertie; break;
+ case CTF_FRAMEWIDTH_ABS: pWidthAbsState = propertie; break;
+ case CTF_FRAMEWIDTH_REL: pWidthRelState = propertie; break;
+ case CTF_FRAMEWIDTH_TYPE: pWidthTypeState = propertie; break;
+
case CTF_WRAP: pWrapState = propertie; break;
case CTF_WRAP_CONTOUR: pWrapContourState = propertie; break;
case CTF_WRAP_CONTOUR_MODE: pWrapContourModeState = propertie; break;
@@ -807,12 +820,16 @@ void XMLTextExportPropertySetMapper::ContextFilter(
if( pHeightMinAbsState )
{
sal_Int16 nRel;
- if( (SizeType::MIN != nSizeType) ||
+ if( (SizeType::FIX == nSizeType) ||
( pHeightMinRelState &&
( !(pHeightMinRelState->maValue >>= nRel) || nRel > 0 ) ) )
{
pHeightMinAbsState->mnIndex = -1;
}
+
+ // export SizeType::VARIABLE als min-width="0"
+ if( SizeType::VARIABLE == nSizeType )
+ pHeightMinAbsState->maValue <<= static_cast<sal_Int32>( 0 );
}
if( pHeightMinRelState && SizeType::MIN != nSizeType)
pHeightMinRelState->mnIndex = -1;
@@ -822,6 +839,35 @@ void XMLTextExportPropertySetMapper::ContextFilter(
if( pHeightRelState && SizeType::FIX != nSizeType)
pHeightRelState->mnIndex = -1;
+ // frame width
+ nSizeType = SizeType::FIX;
+ if( pWidthTypeState )
+ {
+ pWidthTypeState->maValue >>= nSizeType;
+ pWidthTypeState->mnIndex = -1;
+ }
+ if( pWidthMinAbsState )
+ {
+ sal_Int16 nRel;
+ if( (SizeType::FIX == nSizeType) ||
+ ( pWidthMinRelState &&
+ ( !(pWidthMinRelState->maValue >>= nRel) || nRel > 0 ) ) )
+ {
+ pWidthMinAbsState->mnIndex = -1;
+ }
+
+ // export SizeType::VARIABLE als min-width="0"
+ if( SizeType::VARIABLE == nSizeType )
+ pWidthMinAbsState->maValue <<= static_cast<sal_Int32>( 0 );
+ }
+ if( pWidthMinRelState && SizeType::MIN != nSizeType)
+ pWidthMinRelState->mnIndex = -1;
+ if( pWidthAbsState && pWidthMinAbsState &&
+ -1 != pWidthMinAbsState->mnIndex )
+ pWidthAbsState->mnIndex = -1;
+ if( pWidthRelState && SizeType::FIX != nSizeType)
+ pWidthRelState->mnIndex = -1;
+
if( pWrapState )
{
WrapTextMode eVal;