summaryrefslogtreecommitdiff
path: root/svx/source/items
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-02-25 15:07:38 +0000
committerKurt Zenker <kz@openoffice.org>2004-02-25 15:07:38 +0000
commitc04e60275f273dacf8796e957e1ebadc08b497a1 (patch)
tree4993ed938b28b436f911ad9a2b0ef0020956a621 /svx/source/items
parent61403682b2338abd70bb77cfbf98f4e746528ea6 (diff)
INTEGRATION: CWS layoutmanager (1.29.212); FILE MERGED
2004/02/19 14:45:34 cd 1.29.212.2: RESYNC: (1.29-1.30); FILE MERGED 2003/11/25 13:14:18 cd 1.29.212.1: #111899# Support QueryValue/PutValue
Diffstat (limited to 'svx/source/items')
-rw-r--r--svx/source/items/frmitems.cxx36
1 files changed, 32 insertions, 4 deletions
diff --git a/svx/source/items/frmitems.cxx b/svx/source/items/frmitems.cxx
index 8976bb71c52e..639c876dc93e 100644
--- a/svx/source/items/frmitems.cxx
+++ b/svx/source/items/frmitems.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: frmitems.cxx,v $
*
- * $Revision: 1.30 $
+ * $Revision: 1.31 $
*
- * last change: $Author: hr $ $Date: 2004-02-03 19:25:09 $
+ * last change: $Author: kz $ $Date: 2004-02-25 16:07:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -213,6 +213,9 @@
#ifndef _COM_SUN_STAR_TEXT_WRITINGMODE2_HPP_
#include <com/sun/star/text/WritingMode2.hpp>
#endif
+#ifndef _DRAFTS_COM_SUN_STAR_FRAME_STATUS_UPPERLOWERMARGINSCALE_HPP_
+#include <drafts/com/sun/star/frame/status/UpperLowerMarginScale.hpp>
+#endif
#include <comphelper/types.hxx>
@@ -948,8 +951,18 @@ sal_Bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
switch( nMemberId )
{
// jetzt alles signed
- case MID_UP_MARGIN: rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nUpper) : nUpper); break;
- case MID_LO_MARGIN: rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nLower) : nLower); break;
+ case 0:
+ {
+ drafts::com::sun::star::frame::status::UpperLowerMarginScale aUpperLowerMarginScale;
+ aUpperLowerMarginScale.Upper = (sal_Int32)(bConvert ? TWIP_TO_MM100(nUpper) : nUpper);
+ aUpperLowerMarginScale.Lower = (sal_Int32)(bConvert ? TWIP_TO_MM100(nLower) : nPropUpper);
+ aUpperLowerMarginScale.ScaleUpper = (sal_Int16)nPropUpper;
+ aUpperLowerMarginScale.ScaleLower = (sal_Int16)nPropLower;
+ rVal <<= aUpperLowerMarginScale;
+ break;
+ }
+ case MID_UP_MARGIN: rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nUpper) : nUpper); break;
+ case MID_LO_MARGIN: rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nLower) : nLower); break;
case MID_UP_REL_MARGIN: rVal <<= (sal_Int16) nPropUpper; break;
case MID_LO_REL_MARGIN: rVal <<= (sal_Int16) nPropLower; break;
}
@@ -964,6 +977,21 @@ sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
sal_Int32 nVal;
switch( nMemberId )
{
+ case 0:
+ {
+ drafts::com::sun::star::frame::status::UpperLowerMarginScale aUpperLowerMarginScale;
+ if ( !(rVal >>= aUpperLowerMarginScale ))
+ return sal_False;
+ {
+ SetUpper((sal_uInt16)(bConvert ? MM100_TO_TWIP( aUpperLowerMarginScale.Upper ) : aUpperLowerMarginScale.Upper));
+ SetLower((sal_uInt16)(bConvert ? MM100_TO_TWIP( aUpperLowerMarginScale.Lower ) : aUpperLowerMarginScale.Lower));
+ if( aUpperLowerMarginScale.ScaleUpper > 1 )
+ nPropUpper = aUpperLowerMarginScale.ScaleUpper;
+ if( aUpperLowerMarginScale.ScaleLower > 1 )
+ nPropUpper = aUpperLowerMarginScale.ScaleLower;
+ }
+ }
+
case MID_UP_MARGIN :
if(!(rVal >>= nVal) || nVal < 0)
return sal_False;