Kaydet (Commit) b9f67808 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

refactor to limit scope: SID_SWREGISTER_COLLECTION

Change-Id: I67c259f4da968b9decc4ac95195864a28283d1b5
üst 8aa26b63
...@@ -1729,6 +1729,19 @@ void SwXStyle::SetPropertyValue<FN_UNO_CATEGORY>(const SfxItemPropertySimpleEntr ...@@ -1729,6 +1729,19 @@ void SwXStyle::SetPropertyValue<FN_UNO_CATEGORY>(const SfxItemPropertySimpleEntr
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();
o_rStyleBase.getNewBase()->SetMask( pUnoToCoreIt->second|SFXSTYLEBIT_USERDEF ); o_rStyleBase.getNewBase()->SetMask( pUnoToCoreIt->second|SFXSTYLEBIT_USERDEF );
} }
template<>
void SwXStyle::SetPropertyValue<SID_SWREGISTER_COLLECTION>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
OUString sName;
rValue >>= sName;
SwRegisterItem aReg(!sName.isEmpty());
aReg.SetWhich(SID_SWREGISTER_MODE);
o_rStyleBase.GetItemSet().Put(aReg);
OUString aString;
SwStyleNameMapper::FillUIName(sName, aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
o_rStyleBase.GetItemSet().Put(SfxStringItem(SID_SWREGISTER_COLLECTION, aString ) );
}
void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& rBase) throw(beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception) void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& rBase) throw(beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{ {
...@@ -1807,15 +1820,7 @@ void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const ...@@ -1807,15 +1820,7 @@ void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const
} }
case SID_SWREGISTER_COLLECTION: case SID_SWREGISTER_COLLECTION:
{ {
OUString sName; SetPropertyValue<SID_SWREGISTER_COLLECTION>(rEntry, rPropSet, rValue, rBase);
aValue >>= sName;
SwRegisterItem aReg( !sName.isEmpty() );
aReg.SetWhich(SID_SWREGISTER_MODE);
rBase.GetItemSet().Put(aReg);
OUString aString;
SwStyleNameMapper::FillUIName(sName, aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
rBase.GetItemSet().Put(SfxStringItem(SID_SWREGISTER_COLLECTION, aString ) );
bDone = true; bDone = true;
break; break;
} }
......
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