#86865# +WordLineMode property

This commit is contained in:
Frank Schönheit
2001-05-11 17:04:43 +00:00
parent 8cf6a24022
commit c304bec469
3 changed files with 31 additions and 7 deletions

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: Grid.cxx,v $ * $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 * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -446,13 +446,14 @@ void OGridControlModel::fillProperties(
DECL_PROP1(FONT_WEIGHT, float, MAYBEDEFAULT); DECL_PROP1(FONT_WEIGHT, float, MAYBEDEFAULT);
DECL_PROP1(FONT_SLANT, sal_Int16, MAYBEDEFAULT); DECL_PROP1(FONT_SLANT, sal_Int16, MAYBEDEFAULT);
DECL_PROP1(FONT_UNDERLINE, sal_Int16, MAYBEDEFAULT); DECL_PROP1(FONT_UNDERLINE, sal_Int16, MAYBEDEFAULT);
DECL_BOOL_PROP1(FONT_WORDLINEMODE, MAYBEDEFAULT);
DECL_PROP1(FONT_STRIKEOUT, sal_Int16, MAYBEDEFAULT); DECL_PROP1(FONT_STRIKEOUT, sal_Int16, MAYBEDEFAULT);
DECL_PROP2(RECORDMARKER, sal_Bool, BOUND, MAYBEDEFAULT ); DECL_PROP2(RECORDMARKER, sal_Bool, BOUND, MAYBEDEFAULT );
DECL_PROP2(PRINTABLE, sal_Bool, BOUND, MAYBEDEFAULT ); DECL_PROP2(PRINTABLE, sal_Bool, BOUND, MAYBEDEFAULT );
DECL_PROP4(CURSORCOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID , TRANSIENT); DECL_PROP4(CURSORCOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID , TRANSIENT);
DECL_PROP3(ALWAYSSHOWCURSOR, sal_Bool, BOUND, MAYBEDEFAULT, TRANSIENT); DECL_PROP3(ALWAYSSHOWCURSOR, sal_Bool, BOUND, MAYBEDEFAULT, TRANSIENT);
DECL_PROP3(DISPLAYSYNCHRON, 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(); END_AGGREGATION_PROPERTY_HELPER();
} }
@@ -536,6 +537,9 @@ void OGridControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle ) co
case PROPERTY_ID_FONT_STRIKEOUT: case PROPERTY_ID_FONT_STRIKEOUT:
rValue <<= (sal_Int16)m_aFont.Strikeout; rValue <<= (sal_Int16)m_aFont.Strikeout;
break; break;
case PROPERTY_ID_FONT_WORDLINEMODE:
rValue = ::cppu::bool2any(m_aFont.WordLineMode);
break;
default: default:
OControlModel::getFastPropertyValue(rValue, nHandle); OControlModel::getFastPropertyValue(rValue, nHandle);
} }
@@ -634,6 +638,9 @@ sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any&
case PROPERTY_ID_FONT_STRIKEOUT: case PROPERTY_ID_FONT_STRIKEOUT:
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, (sal_Int16)m_aFont.Strikeout); bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, (sal_Int16)m_aFont.Strikeout);
break; break;
case PROPERTY_ID_FONT_WORDLINEMODE:
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, (sal_Bool)m_aFont.WordLineMode);
break;
default: default:
bModified = OControlModel::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue); bModified = OControlModel::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue);
} }
@@ -717,6 +724,9 @@ void OGridControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, con
case PROPERTY_ID_FONT_STRIKEOUT: case PROPERTY_ID_FONT_STRIKEOUT:
m_aFont.Strikeout = getINT16(rValue); m_aFont.Strikeout = getINT16(rValue);
break; break;
case PROPERTY_ID_FONT_WORDLINEMODE:
m_aFont.WordLineMode = getBOOL(rValue);
break;
case PROPERTY_ID_ROWHEIGHT: case PROPERTY_ID_ROWHEIGHT:
m_aRowHeight = rValue; m_aRowHeight = rValue;
break; break;
@@ -742,6 +752,7 @@ void OGridControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, con
case PROPERTY_ID_FONT_SLANT: case PROPERTY_ID_FONT_SLANT:
case PROPERTY_ID_FONT_UNDERLINE: case PROPERTY_ID_FONT_UNDERLINE:
case PROPERTY_ID_FONT_STRIKEOUT: case PROPERTY_ID_FONT_STRIKEOUT:
case PROPERTY_ID_FONT_WORDLINEMODE:
if (m_nFontEvent) if (m_nFontEvent)
Application::RemoveUserEvent(m_nFontEvent); Application::RemoveUserEvent(m_nFontEvent);
m_nFontEvent = Application::PostUserEvent( LINK(this, OGridControlModel, OnFontChanged) ); m_nFontEvent = Application::PostUserEvent( LINK(this, OGridControlModel, OnFontChanged) );
@@ -848,6 +859,10 @@ PropertyState OGridControlModel::getPropertyStateByHandle(sal_Int32 nHandle)
if (!m_aFont.Strikeout) if (!m_aFont.Strikeout)
eState = PropertyState_DEFAULT_VALUE; eState = PropertyState_DEFAULT_VALUE;
break; break;
case PROPERTY_ID_FONT_WORDLINEMODE:
if (!m_aFont.WordLineMode)
eState = PropertyState_DEFAULT_VALUE;
break;
case PROPERTY_ID_ROWHEIGHT: case PROPERTY_ID_ROWHEIGHT:
if (!m_aRowHeight.hasValue()) if (!m_aRowHeight.hasValue())
eState = PropertyState_DEFAULT_VALUE; eState = PropertyState_DEFAULT_VALUE;
@@ -901,6 +916,9 @@ void OGridControlModel::setPropertyToDefaultByHandle(sal_Int32 nHandle)
case PROPERTY_ID_FONT_WEIGHT: case PROPERTY_ID_FONT_WEIGHT:
setFastPropertyValue(nHandle, makeAny((float)0)); setFastPropertyValue(nHandle, makeAny((float)0));
break; break;
case PROPERTY_ID_FONT_WORDLINEMODE:
setFastPropertyValue(nHandle, ::cppu::bool2any(sal_False));
break;
default: default:
OControlModel::setPropertyToDefaultByHandle(nHandle); OControlModel::setPropertyToDefaultByHandle(nHandle);
} }
@@ -933,6 +951,8 @@ Any OGridControlModel::getPropertyDefaultByHandle( sal_Int32 nHandle )
return makeAny((float)0); return makeAny((float)0);
case PROPERTY_ID_FONT_WEIGHT: case PROPERTY_ID_FONT_WEIGHT:
return makeAny((float)0); return makeAny((float)0);
case PROPERTY_ID_FONT_WORDLINEMODE:
return ::cppu::bool2any(sal_False);
default: default:
return OControlModel::getPropertyDefaultByHandle(nHandle); return OControlModel::getPropertyDefaultByHandle(nHandle);
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: property.hrc,v $ * $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 * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -245,6 +245,7 @@ namespace frm
#define PROPERTY_ID_COLUMNSERVICENAME (PROPERTY_ID_START +205) #define PROPERTY_ID_COLUMNSERVICENAME (PROPERTY_ID_START +205)
#define PROPERTY_ID_CONTROLSOURCEPROPERTY (PROPERTY_ID_START +206) #define PROPERTY_ID_CONTROLSOURCEPROPERTY (PROPERTY_ID_START +206)
#define PROPERTY_ID_REALNAME (PROPERTY_ID_START +207) #define PROPERTY_ID_REALNAME (PROPERTY_ID_START +207)
#define PROPERTY_ID_FONT_WORDLINEMODE (PROPERTY_ID_START +208)
// start ID fuer aggregierte Properties // 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_WEIGHT);
DECLARE_CONSTASCII_USTRING(PROPERTY_FONT_SLANT); DECLARE_CONSTASCII_USTRING(PROPERTY_FONT_SLANT);
DECLARE_CONSTASCII_USTRING(PROPERTY_FONT_UNDERLINE); DECLARE_CONSTASCII_USTRING(PROPERTY_FONT_UNDERLINE);
DECLARE_CONSTASCII_USTRING(PROPERTY_FONT_WORDLINEMODE);
DECLARE_CONSTASCII_USTRING(PROPERTY_FONT_STRIKEOUT); DECLARE_CONSTASCII_USTRING(PROPERTY_FONT_STRIKEOUT);
DECLARE_CONSTASCII_USTRING(PROPERTY_HELPURL); DECLARE_CONSTASCII_USTRING(PROPERTY_HELPURL);
DECLARE_CONSTASCII_USTRING(PROPERTY_RECORDMARKER); DECLARE_CONSTASCII_USTRING(PROPERTY_RECORDMARKER);

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: property.cxx,v $ * $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 * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -234,6 +234,7 @@ void PropertyInfoService::initialize()
ADD_PROP_ASSIGNMENT(FONT_WEIGHT); ADD_PROP_ASSIGNMENT(FONT_WEIGHT);
ADD_PROP_ASSIGNMENT(FONT_SLANT); ADD_PROP_ASSIGNMENT(FONT_SLANT);
ADD_PROP_ASSIGNMENT(FONT_UNDERLINE); ADD_PROP_ASSIGNMENT(FONT_UNDERLINE);
ADD_PROP_ASSIGNMENT(FONT_WORDLINEMODE);
ADD_PROP_ASSIGNMENT(FONT_STRIKEOUT); ADD_PROP_ASSIGNMENT(FONT_STRIKEOUT);
ADD_PROP_ASSIGNMENT(HELPURL); ADD_PROP_ASSIGNMENT(HELPURL);
ADD_PROP_ASSIGNMENT(RECORDMARKER); 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_WEIGHT, "FontWeight");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONT_SLANT, "FontSlant"); IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONT_SLANT, "FontSlant");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONT_UNDERLINE, "FontUnderline"); 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_FONT_STRIKEOUT, "FontStrikeout");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_HELPURL, "HelpURL"); IMPLEMENT_CONSTASCII_USTRING(PROPERTY_HELPURL, "HelpURL");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_RECORDMARKER, "HasRecordMarker"); IMPLEMENT_CONSTASCII_USTRING(PROPERTY_RECORDMARKER, "HasRecordMarker");