#84808# IsHidden-property added to HiddenTxt/ParaField
This commit is contained in:
parent
f6fe7c6842
commit
5716125054
3 changed files with 32 additions and 6 deletions
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: unoprnms.hxx,v $
|
||||
*
|
||||
* $Revision: 1.44 $
|
||||
* $Revision: 1.45 $
|
||||
*
|
||||
* last change: $Author: os $ $Date: 2001-03-12 12:26:07 $
|
||||
* last change: $Author: os $ $Date: 2001-03-13 10:38:58 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -679,6 +679,9 @@ extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_ROTATION;
|
|||
extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_ROTATION_IS_FIT_TO_LINE;
|
||||
extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_SCALE_WIDTH;
|
||||
extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_WIDTH_RELATIVE;
|
||||
extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_RELIEF;
|
||||
extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_HIDDEN;
|
||||
extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_CONDITION_TRUE;
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: docufld.cxx,v $
|
||||
*
|
||||
* $Revision: 1.13 $
|
||||
* $Revision: 1.14 $
|
||||
*
|
||||
* last change: $Author: os $ $Date: 2001-02-23 12:45:19 $
|
||||
* last change: $Author: os $ $Date: 2001-03-13 10:40:48 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -1588,6 +1588,12 @@ BOOL SwHiddenTxtField::QueryValue( uno::Any& rAny, const String& rProperty ) con
|
|||
{
|
||||
rAny <<= OUString(aFALSETxt);
|
||||
}
|
||||
else if(rProperty.EqualsAscii(UNO_NAME_IS_HIDDEN)||
|
||||
rProperty.EqualsAscii(UNO_NAME_IS_CONDITION_TRUE))
|
||||
{
|
||||
sal_Bool bHidden = bIsHidden;
|
||||
rAny.setValue(&bHidden, ::getBooleanCppuType());
|
||||
}
|
||||
#ifdef DBG_UTIL
|
||||
else
|
||||
DBG_ERROR("Welches Property?")
|
||||
|
@ -1609,6 +1615,11 @@ BOOL SwHiddenTxtField::PutValue( const uno::Any& rAny, const String& rProperty )
|
|||
aTRUETxt = sVal;
|
||||
else if(rProperty.EqualsAscii(UNO_NAME_FALSE_CONTENT))
|
||||
aFALSETxt = sVal;
|
||||
else if(rProperty.EqualsAscii(UNO_NAME_IS_HIDDEN)||
|
||||
rProperty.EqualsAscii(UNO_NAME_IS_CONDITION_TRUE))
|
||||
{
|
||||
bIsHidden = *(sal_Bool*)rAny.getValue();
|
||||
}
|
||||
#ifdef DBG_UTIL
|
||||
else
|
||||
DBG_ERROR("Welches Property?")
|
||||
|
@ -1698,6 +1709,11 @@ BOOL SwHiddenParaField::QueryValue( uno::Any& rAny, const String& rProperty ) co
|
|||
{
|
||||
if(rProperty.EqualsAscii(UNO_NAME_CONDITION))
|
||||
rAny <<= OUString(aCond);
|
||||
else if(rProperty.EqualsAscii(UNO_NAME_IS_HIDDEN))
|
||||
{
|
||||
sal_Bool bHidden = bIsHidden;
|
||||
rAny.setValue(&bHidden, ::getBooleanCppuType());
|
||||
}
|
||||
#ifdef DBG_UTIL
|
||||
else
|
||||
DBG_ERROR("Welches Property?")
|
||||
|
@ -1715,6 +1731,8 @@ BOOL SwHiddenParaField::PutValue( const uno::Any& rAny, const String& rProperty
|
|||
rAny >>= uTmp;
|
||||
aCond = String(uTmp);
|
||||
}
|
||||
else if(rProperty.EqualsAscii(UNO_NAME_IS_HIDDEN))
|
||||
bIsHidden = *(sal_Bool*)rAny.getValue();
|
||||
#ifdef DBG_UTIL
|
||||
else
|
||||
DBG_ERROR("Welches Property?")
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: unofield.cxx,v $
|
||||
*
|
||||
* $Revision: 1.22 $
|
||||
* $Revision: 1.23 $
|
||||
*
|
||||
* last change: $Author: dvo $ $Date: 2001-03-08 14:14:56 $
|
||||
* last change: $Author: os $ $Date: 2001-03-13 10:43:01 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -419,6 +419,7 @@ const SfxItemPropertyMap* SwFieldPropMapProvider::GetPropertyMap(USHORT nService
|
|||
{
|
||||
{SW_PROP_NAME(UNO_NAME_CONDITION), FIELD_PROP_PAR1, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0},
|
||||
{SW_PROP_NAME(UNO_NAME_FALSE_CONTENT), FIELD_PROP_PAR3, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0},
|
||||
{SW_PROP_NAME(UNO_NAME_IS_CONDITION_TRUE) , FIELD_PROP_BOOL1, &::getBooleanCppuType(), PROPERTY_NONE, 0},
|
||||
{SW_PROP_NAME(UNO_NAME_TRUE_CONTENT) , FIELD_PROP_PAR2, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0},
|
||||
{0,0,0,0}
|
||||
};
|
||||
|
@ -431,6 +432,7 @@ const SfxItemPropertyMap* SwFieldPropMapProvider::GetPropertyMap(USHORT nService
|
|||
{
|
||||
{SW_PROP_NAME(UNO_NAME_CONDITION), FIELD_PROP_PAR1, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0},
|
||||
{SW_PROP_NAME(UNO_NAME_CONTENT) , FIELD_PROP_PAR2, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0},
|
||||
{SW_PROP_NAME(UNO_NAME_IS_HIDDEN) , FIELD_PROP_BOOL1, &::getBooleanCppuType(), PROPERTY_NONE, 0},
|
||||
{0,0,0,0}
|
||||
};
|
||||
pRet = aHiddenTxtFieldPropMap;
|
||||
|
@ -482,6 +484,7 @@ const SfxItemPropertyMap* SwFieldPropMapProvider::GetPropertyMap(USHORT nService
|
|||
static SfxItemPropertyMap aHiddenParaFieldPropMap [] =
|
||||
{
|
||||
{SW_PROP_NAME(UNO_NAME_CONDITION),FIELD_PROP_PAR1, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0},
|
||||
{SW_PROP_NAME(UNO_NAME_IS_HIDDEN) , FIELD_PROP_BOOL1, &::getBooleanCppuType(), PROPERTY_NONE, 0},
|
||||
{0,0,0,0}
|
||||
};
|
||||
pRet = aHiddenParaFieldPropMap;
|
||||
|
@ -1940,6 +1943,7 @@ void SwXTextField::attachToRange(
|
|||
SW_SERVICE_FIELDTYPE_HIDDEN_TEXT == m_nServiceId ?
|
||||
TYP_HIDDENTXTFLD :
|
||||
TYP_CONDTXTFLD);
|
||||
((SwHiddenTxtField*)pFld)->SetValue(m_pProps->bBool1);
|
||||
}
|
||||
break;
|
||||
case SW_SERVICE_FIELDTYPE_HIDDEN_PARA:
|
||||
|
@ -1947,6 +1951,7 @@ void SwXTextField::attachToRange(
|
|||
SwFieldType* pFldType = pDoc->GetSysFldType(RES_HIDDENPARAFLD);
|
||||
pFld = new SwHiddenParaField((SwHiddenParaFieldType*)pFldType,
|
||||
m_pProps->sPar1);
|
||||
((SwHiddenParaField*)pFld)->SetHidden(m_pProps->bBool1);
|
||||
}
|
||||
break;
|
||||
case SW_SERVICE_FIELDTYPE_GET_REFERENCE:
|
||||
|
|
Loading…
Reference in a new issue