Kaydet (Commit) 9e9e9e47 authored tarafından Miklos Vajna's avatar Miklos Vajna

SwXPageStyle: fix FirstIsShared handling

At least now beans::UnknownPropertyException is not thrown when it is
written.

Change-Id: I6d4f8dbb1ac7caffc4bfdfb9c4c1c84eb9179883
üst 8624eafd
...@@ -2862,7 +2862,7 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates( ...@@ -2862,7 +2862,7 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates(
const bool bHeader(SFX_STYLE_FAMILY_PAGE == eFamily && sPropName.startsWith("Header")); const bool bHeader(SFX_STYLE_FAMILY_PAGE == eFamily && sPropName.startsWith("Header"));
const bool bFooter(SFX_STYLE_FAMILY_PAGE == eFamily && sPropName.startsWith("Footer")); const bool bFooter(SFX_STYLE_FAMILY_PAGE == eFamily && sPropName.startsWith("Footer"));
if(bHeader || bFooter) if(bHeader || bFooter || sPropName == UNO_NAME_FIRST_IS_SHARED)
{ {
const SvxSetItem* pSetItem; const SvxSetItem* pSetItem;
...@@ -3415,7 +3415,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl( ...@@ -3415,7 +3415,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
const bool bHeader(rPropName.startsWith("Header")); const bool bHeader(rPropName.startsWith("Header"));
const bool bFooter(rPropName.startsWith("Footer")); const bool bFooter(rPropName.startsWith("Footer"));
if(bHeader || bFooter) if(bHeader || bFooter || rPropName == UNO_NAME_FIRST_IS_SHARED)
{ {
// it is a Header/Footer entry, access the SvxSetItem containing it's information // it is a Header/Footer entry, access the SvxSetItem containing it's information
const SvxSetItem* pSetItem = 0; const SvxSetItem* pSetItem = 0;
...@@ -3523,7 +3523,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl( ...@@ -3523,7 +3523,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
const bool bHeader(rPropName.startsWith("Header")); const bool bHeader(rPropName.startsWith("Header"));
const bool bFooter(rPropName.startsWith("Footer")); const bool bFooter(rPropName.startsWith("Footer"));
if(bHeader || bFooter) if(bHeader || bFooter || rPropName == UNO_NAME_FIRST_IS_SHARED)
{ {
const SvxSetItem* pSetItem = 0; const SvxSetItem* pSetItem = 0;
...@@ -3720,7 +3720,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl( ...@@ -3720,7 +3720,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
const bool bHeader(rPropName.startsWith("Header")); const bool bHeader(rPropName.startsWith("Header"));
const bool bFooter(rPropName.startsWith("Footer")); const bool bFooter(rPropName.startsWith("Footer"));
if(bHeader || bFooter) if(bHeader || bFooter || rPropName == UNO_NAME_FIRST_IS_SHARED)
{ {
// slot is a Header/Footer slot // slot is a Header/Footer slot
rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *(SwDocStyleSheet*)pBase ) ); rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *(SwDocStyleSheet*)pBase ) );
...@@ -3794,7 +3794,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl( ...@@ -3794,7 +3794,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
const bool bHeader(rPropName.startsWith("Header")); const bool bHeader(rPropName.startsWith("Header"));
const bool bFooter(rPropName.startsWith("Footer")); const bool bFooter(rPropName.startsWith("Footer"));
if(bHeader || bFooter) if(bHeader || bFooter || rPropName == UNO_NAME_FIRST_IS_SHARED)
{ {
rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *(SwDocStyleSheet*)pBase ) ); rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *(SwDocStyleSheet*)pBase ) );
const SfxItemSet& rSet = xStyle->GetItemSet(); const SfxItemSet& rSet = xStyle->GetItemSet();
......
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