Kaydet (Commit) 599643ec authored tarafından Miklos Vajna's avatar Miklos Vajna

SwXShape: add ChainNext/PrevName UNO property

At the moment it's only possible to set this property, and it only sets
the same property of the underlying textbox, if there is any.

Change-Id: I9f168f69a8e92a1b26f21e653a05c97e2e32297c
üst ae0bd94d
...@@ -351,6 +351,17 @@ void SwTextBoxHelper::syncProperty(SwFrmFmt* pShape, sal_uInt16 nWID, sal_uInt8 ...@@ -351,6 +351,17 @@ void SwTextBoxHelper::syncProperty(SwFrmFmt* pShape, sal_uInt16 nWID, sal_uInt8
} }
} }
break; break;
case RES_CHAIN:
switch (nMemberId)
{
case MID_CHAIN_PREVNAME:
aPropertyName = UNO_NAME_CHAIN_PREV_NAME;
break;
case MID_CHAIN_NEXTNAME:
aPropertyName = UNO_NAME_CHAIN_NEXT_NAME;
break;
}
break;
} }
if (!aPropertyName.isEmpty()) if (!aPropertyName.isEmpty())
......
...@@ -1201,6 +1201,11 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a ...@@ -1201,6 +1201,11 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
SwTextBoxHelper::destroy(pFmt); SwTextBoxHelper::destroy(pFmt);
} }
else if (pEntry->nWID == RES_CHAIN)
{
if (pEntry->nMemberId == MID_CHAIN_NEXTNAME || pEntry->nMemberId == MID_CHAIN_PREVNAME)
SwTextBoxHelper::syncProperty(pFmt, pEntry->nWID, pEntry->nMemberId, aValue);
}
// #i28749# // #i28749#
else if ( FN_SHAPE_POSITION_LAYOUT_DIR == pEntry->nWID ) else if ( FN_SHAPE_POSITION_LAYOUT_DIR == pEntry->nWID )
{ {
......
...@@ -1396,6 +1396,8 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s ...@@ -1396,6 +1396,8 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ OUString(UNO_NAME_RELATIVE_WIDTH), RES_FRM_SIZE, cppu::UnoType<sal_Int16>::get() , PROPERTY_NONE, MID_FRMSIZE_REL_WIDTH }, { OUString(UNO_NAME_RELATIVE_WIDTH), RES_FRM_SIZE, cppu::UnoType<sal_Int16>::get() , PROPERTY_NONE, MID_FRMSIZE_REL_WIDTH },
{ OUString(UNO_NAME_RELATIVE_WIDTH_RELATION), RES_FRM_SIZE, cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, MID_FRMSIZE_REL_WIDTH_RELATION }, { OUString(UNO_NAME_RELATIVE_WIDTH_RELATION), RES_FRM_SIZE, cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, MID_FRMSIZE_REL_WIDTH_RELATION },
{ OUString(UNO_NAME_TEXT_BOX), FN_TEXT_BOX, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, { OUString(UNO_NAME_TEXT_BOX), FN_TEXT_BOX, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0},
{ OUString(UNO_NAME_CHAIN_NEXT_NAME), RES_CHAIN, cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID ,MID_CHAIN_NEXTNAME},
{ OUString(UNO_NAME_CHAIN_PREV_NAME), RES_CHAIN, cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID ,MID_CHAIN_PREVNAME},
{ OUString(), 0, css::uno::Type(), 0, 0 } { OUString(), 0, css::uno::Type(), 0, 0 }
}; };
aMapEntriesArr[nPropertyId] = aShapeMap_Impl; aMapEntriesArr[nPropertyId] = aShapeMap_Impl;
......
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