Kaydet (Commit) c04e6027 authored tarafından Kurt Zenker's avatar Kurt Zenker

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
üst 61403682
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: frmitems.cxx,v $ * $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 * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -213,6 +213,9 @@ ...@@ -213,6 +213,9 @@
#ifndef _COM_SUN_STAR_TEXT_WRITINGMODE2_HPP_ #ifndef _COM_SUN_STAR_TEXT_WRITINGMODE2_HPP_
#include <com/sun/star/text/WritingMode2.hpp> #include <com/sun/star/text/WritingMode2.hpp>
#endif #endif
#ifndef _DRAFTS_COM_SUN_STAR_FRAME_STATUS_UPPERLOWERMARGINSCALE_HPP_
#include <drafts/com/sun/star/frame/status/UpperLowerMarginScale.hpp>
#endif
#include <comphelper/types.hxx> #include <comphelper/types.hxx>
...@@ -948,8 +951,18 @@ sal_Bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const ...@@ -948,8 +951,18 @@ sal_Bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
switch( nMemberId ) switch( nMemberId )
{ {
// jetzt alles signed // jetzt alles signed
case MID_UP_MARGIN: rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nUpper) : nUpper); break; case 0:
case MID_LO_MARGIN: rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nLower) : nLower); break; {
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_UP_REL_MARGIN: rVal <<= (sal_Int16) nPropUpper; break;
case MID_LO_REL_MARGIN: rVal <<= (sal_Int16) nPropLower; 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 ) ...@@ -964,6 +977,21 @@ sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
sal_Int32 nVal; sal_Int32 nVal;
switch( nMemberId ) 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 : case MID_UP_MARGIN :
if(!(rVal >>= nVal) || nVal < 0) if(!(rVal >>= nVal) || nVal < 0)
return sal_False; return sal_False;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment