diff options
-rw-r--r-- | forms/source/component/Grid.cxx | 26 | ||||
-rw-r--r-- | forms/source/inc/property.hrc | 6 | ||||
-rw-r--r-- | forms/source/misc/property.cxx | 6 |
3 files changed, 31 insertions, 7 deletions
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index 3062f68ce7df..16cbdf21d3c7 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -2,9 +2,9 @@ * * $RCSfile: Grid.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: th $ $Date: 2001-05-11 09:33:55 $ + * last change: $Author: fs $ $Date: 2001-05-11 18:04:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -446,13 +446,14 @@ void OGridControlModel::fillProperties( DECL_PROP1(FONT_WEIGHT, float, MAYBEDEFAULT); DECL_PROP1(FONT_SLANT, sal_Int16, MAYBEDEFAULT); DECL_PROP1(FONT_UNDERLINE, sal_Int16, MAYBEDEFAULT); + DECL_BOOL_PROP1(FONT_WORDLINEMODE, MAYBEDEFAULT); DECL_PROP1(FONT_STRIKEOUT, sal_Int16, MAYBEDEFAULT); DECL_PROP2(RECORDMARKER, sal_Bool, BOUND, MAYBEDEFAULT ); DECL_PROP2(PRINTABLE, sal_Bool, BOUND, MAYBEDEFAULT ); DECL_PROP4(CURSORCOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID , TRANSIENT); DECL_PROP3(ALWAYSSHOWCURSOR, sal_Bool, BOUND, MAYBEDEFAULT, TRANSIENT); DECL_PROP3(DISPLAYSYNCHRON, sal_Bool, BOUND, MAYBEDEFAULT, TRANSIENT); - DECL_PROP2(HELPURL, ::rtl::OUString, BOUND, MAYBEDEFAULT); + DECL_PROP2(HELPURL, ::rtl::OUString, BOUND, MAYBEDEFAULT); END_AGGREGATION_PROPERTY_HELPER(); } @@ -536,6 +537,9 @@ void OGridControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle ) co case PROPERTY_ID_FONT_STRIKEOUT: rValue <<= (sal_Int16)m_aFont.Strikeout; break; + case PROPERTY_ID_FONT_WORDLINEMODE: + rValue = ::cppu::bool2any(m_aFont.WordLineMode); + break; default: OControlModel::getFastPropertyValue(rValue, nHandle); } @@ -634,6 +638,9 @@ sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any& case PROPERTY_ID_FONT_STRIKEOUT: bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, (sal_Int16)m_aFont.Strikeout); break; + case PROPERTY_ID_FONT_WORDLINEMODE: + bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, (sal_Bool)m_aFont.WordLineMode); + break; default: bModified = OControlModel::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue); } @@ -717,6 +724,9 @@ void OGridControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, con case PROPERTY_ID_FONT_STRIKEOUT: m_aFont.Strikeout = getINT16(rValue); break; + case PROPERTY_ID_FONT_WORDLINEMODE: + m_aFont.WordLineMode = getBOOL(rValue); + break; case PROPERTY_ID_ROWHEIGHT: m_aRowHeight = rValue; break; @@ -742,6 +752,7 @@ void OGridControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, con case PROPERTY_ID_FONT_SLANT: case PROPERTY_ID_FONT_UNDERLINE: case PROPERTY_ID_FONT_STRIKEOUT: + case PROPERTY_ID_FONT_WORDLINEMODE: if (m_nFontEvent) Application::RemoveUserEvent(m_nFontEvent); m_nFontEvent = Application::PostUserEvent( LINK(this, OGridControlModel, OnFontChanged) ); @@ -848,6 +859,10 @@ PropertyState OGridControlModel::getPropertyStateByHandle(sal_Int32 nHandle) if (!m_aFont.Strikeout) eState = PropertyState_DEFAULT_VALUE; break; + case PROPERTY_ID_FONT_WORDLINEMODE: + if (!m_aFont.WordLineMode) + eState = PropertyState_DEFAULT_VALUE; + break; case PROPERTY_ID_ROWHEIGHT: if (!m_aRowHeight.hasValue()) eState = PropertyState_DEFAULT_VALUE; @@ -901,6 +916,9 @@ void OGridControlModel::setPropertyToDefaultByHandle(sal_Int32 nHandle) case PROPERTY_ID_FONT_WEIGHT: setFastPropertyValue(nHandle, makeAny((float)0)); break; + case PROPERTY_ID_FONT_WORDLINEMODE: + setFastPropertyValue(nHandle, ::cppu::bool2any(sal_False)); + break; default: OControlModel::setPropertyToDefaultByHandle(nHandle); } @@ -933,6 +951,8 @@ Any OGridControlModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) return makeAny((float)0); case PROPERTY_ID_FONT_WEIGHT: return makeAny((float)0); + case PROPERTY_ID_FONT_WORDLINEMODE: + return ::cppu::bool2any(sal_False); default: return OControlModel::getPropertyDefaultByHandle(nHandle); } diff --git a/forms/source/inc/property.hrc b/forms/source/inc/property.hrc index b0eb1f7d0ea7..e4e0baccfb46 100644 --- a/forms/source/inc/property.hrc +++ b/forms/source/inc/property.hrc @@ -2,9 +2,9 @@ * * $RCSfile: property.hrc,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:29:06 $ + * last change: $Author: fs $ $Date: 2001-05-11 17:57:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -245,6 +245,7 @@ namespace frm #define PROPERTY_ID_COLUMNSERVICENAME (PROPERTY_ID_START +205) #define PROPERTY_ID_CONTROLSOURCEPROPERTY (PROPERTY_ID_START +206) #define PROPERTY_ID_REALNAME (PROPERTY_ID_START +207) +#define PROPERTY_ID_FONT_WORDLINEMODE (PROPERTY_ID_START +208) // start ID fuer aggregierte Properties @@ -363,6 +364,7 @@ DECLARE_CONSTASCII_USTRING(PROPERTY_FONT_HEIGHT); DECLARE_CONSTASCII_USTRING(PROPERTY_FONT_WEIGHT); DECLARE_CONSTASCII_USTRING(PROPERTY_FONT_SLANT); DECLARE_CONSTASCII_USTRING(PROPERTY_FONT_UNDERLINE); +DECLARE_CONSTASCII_USTRING(PROPERTY_FONT_WORDLINEMODE); DECLARE_CONSTASCII_USTRING(PROPERTY_FONT_STRIKEOUT); DECLARE_CONSTASCII_USTRING(PROPERTY_HELPURL); DECLARE_CONSTASCII_USTRING(PROPERTY_RECORDMARKER); diff --git a/forms/source/misc/property.cxx b/forms/source/misc/property.cxx index 01f2fdccbedd..6376470ec750 100644 --- a/forms/source/misc/property.cxx +++ b/forms/source/misc/property.cxx @@ -2,9 +2,9 @@ * * $RCSfile: property.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:29:06 $ + * last change: $Author: fs $ $Date: 2001-05-11 18:00:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -234,6 +234,7 @@ void PropertyInfoService::initialize() ADD_PROP_ASSIGNMENT(FONT_WEIGHT); ADD_PROP_ASSIGNMENT(FONT_SLANT); ADD_PROP_ASSIGNMENT(FONT_UNDERLINE); + ADD_PROP_ASSIGNMENT(FONT_WORDLINEMODE); ADD_PROP_ASSIGNMENT(FONT_STRIKEOUT); ADD_PROP_ASSIGNMENT(HELPURL); ADD_PROP_ASSIGNMENT(RECORDMARKER); @@ -409,6 +410,7 @@ IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONT_HEIGHT, "FontHeight"); IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONT_WEIGHT, "FontWeight"); IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONT_SLANT, "FontSlant"); IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONT_UNDERLINE, "FontUnderline"); +IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONT_WORDLINEMODE, "FontWordLineMode"); IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONT_STRIKEOUT, "FontStrikeout"); IMPLEMENT_CONSTASCII_USTRING(PROPERTY_HELPURL, "HelpURL"); IMPLEMENT_CONSTASCII_USTRING(PROPERTY_RECORDMARKER, "HasRecordMarker"); |