[Libreoffice-commits] .: offapi/com svx/inc sw/inc sw/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Fri Jun 29 06:59:06 PDT 2012


 offapi/com/sun/star/style/PageProperties.idl |   12 ++++++++++
 svx/inc/svx/svxids.hrc                       |    1 
 sw/inc/cmdid.h                               |    2 +
 sw/inc/pagedesc.hxx                          |   11 +++++++++
 sw/inc/unoprnms.hxx                          |    5 +++-
 sw/source/core/doc/docdesc.cxx               |    2 +
 sw/source/core/layout/pagedesc.cxx           |   31 ++++++++++++++++++++++++++-
 sw/source/core/unocore/unomap.cxx            |    2 +
 sw/source/core/unocore/unoprnms.cxx          |    2 +
 sw/source/core/unocore/unostyle.cxx          |   17 ++++++++++++++
 sw/source/ui/utlui/uitool.cxx                |   12 ++++++++++
 11 files changed, 95 insertions(+), 2 deletions(-)

New commits:
commit 5b021a1f0d281aed40ae83dffe4af7600b858bd5
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Fri Jun 29 11:26:13 2012 +0200

    sw: initial HeaderIsSharedFirst / FooterIsSharedFirst
    
    It's just like HeaderIsShared / FooterIsShared, enabled by default when
    header / footer is on. It does nothing yet, but it's read-writable.
    
    Motivation: https://wiki.oasis-open.org/office/HeaderFooterFirst
    
    Change-Id: I1ccfd0aedd1ac71e9f39b7fd43754264afafc1ef

diff --git a/offapi/com/sun/star/style/PageProperties.idl b/offapi/com/sun/star/style/PageProperties.idl
index b0da251..ebd7b49 100644
--- a/offapi/com/sun/star/style/PageProperties.idl
+++ b/offapi/com/sun/star/style/PageProperties.idl
@@ -258,6 +258,12 @@ published service PageProperties
  */
 [property, maybevoid] boolean HeaderIsShared;
 //-----------------------------------------------------------------------------
+/** determines if the header content on the first page and remaining pages is the same.
+
+    @since LibreOffice 3.7
+ */
+[optional, property, maybevoid] boolean HeaderIsSharedFirst;
+//-----------------------------------------------------------------------------
 /** contains the height of the header.
  */
 [property, maybevoid] long HeaderHeight;
@@ -364,6 +370,12 @@ published service PageProperties
  */
 [property, maybevoid] boolean FooterIsShared;
 //-----------------------------------------------------------------------------
+/** determines if the footer content on the first page and remaining pages is the same.
+
+    @since LibreOffice 3.7
+ */
+[optional, property, maybevoid] boolean FooterIsSharedFirst;
+//-----------------------------------------------------------------------------
 /** determines the height of the footer.
  */
 [property, maybevoid] long FooterHeight;
diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc
index 918d44d..db8753e 100644
--- a/svx/inc/svx/svxids.hrc
+++ b/svx/inc/svx/svxids.hrc
@@ -956,6 +956,7 @@
 #define SID_INSERT_FORM_VSCROLL                         (SID_SVX_START+1111)
 #define SID_INSERT_FORM_HSCROLL                         (SID_SVX_START+1112)
 #define SID_EXTERNAL_EDIT                               (SID_SVX_START+1113)
+#define SID_ATTR_PAGE_SHARED_FIRST                      (SID_SVX_START+1114)
 
 // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
 #define SID_SVX_FIRSTFREE                               (SID_EXTERNAL_EDIT + 1)
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 2262521..97ebfc5 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -863,6 +863,8 @@ included in c-context files, so c++ style stuff will cause problems.
 #define FN_MATH_BASELINE_ALIGNMENT          (FN_EXTRA2 + 115)
 
 #define FN_EMBEDDED_OBJECT                  (FN_EXTRA2 + 116)
+#define FN_UNO_HEADER_SHARE_FIRST_CONTENT   (FN_EXTRA2 + 117)
+#define FN_UNO_FOOTER_SHARE_FIRST_CONTENT   (FN_EXTRA2 + 118)
 
 /*------------------------------------------------ --------------------
     Area: Help
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 44367f5..08e55c0 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -133,6 +133,10 @@ namespace nsUseOnPage
     const UseOnPage PD_FOOTERSHARE    = 0x0080;
     const UseOnPage PD_NOHEADERSHARE  = 0x00BF; // For internal use only.
     const UseOnPage PD_NOFOOTERSHARE  = 0x007F; // For internal use only.
+    const UseOnPage PD_HEADERSHAREFIRST = 0x0100;
+    const UseOnPage PD_NOHEADERSHAREFIRST = 0xFEFF;
+    const UseOnPage PD_FOOTERSHAREFIRST = 0x0200;
+    const UseOnPage PD_NOFOOTERSHAREFIRST = 0xFDFF;
 }
 
 class SW_DLLPUBLIC SwPageDesc : public SwModify
@@ -144,6 +148,7 @@ class SW_DLLPUBLIC SwPageDesc : public SwModify
     SvxNumberType   aNumType;
     SwFrmFmt    aMaster;
     SwFrmFmt    aLeft;
+    SwFrmFmt    aFirst;
     SwDepend    aDepend;    // Because of grid alignment (Registerhaltigkeit).
     SwPageDesc *pFollow;
     sal_uInt16  nRegHeight; // Sentence spacing and fontascent of style.
@@ -183,6 +188,10 @@ public:
     inline sal_Bool IsFooterShared() const;
     inline void ChgHeaderShare( sal_Bool bNew );
     inline void ChgFooterShare( sal_Bool bNew );
+    sal_Bool IsHeaderSharedFirst() const;
+    void ChgHeaderShareFirst( sal_Bool bNew );
+    sal_Bool IsFooterSharedFirst() const;
+    void ChgFooterShareFirst( sal_Bool bNew );
 
     inline void      SetUseOn( UseOnPage eNew );
     inline UseOnPage GetUseOn() const;
@@ -192,8 +201,10 @@ public:
 
           SwFrmFmt &GetMaster() { return aMaster; }
           SwFrmFmt &GetLeft()   { return aLeft; }
+          SwFrmFmt &GetFirst()   { return aFirst; }
     const SwFrmFmt &GetMaster() const { return aMaster; }
     const SwFrmFmt &GetLeft()   const { return aLeft; }
+    const SwFrmFmt &GetFirst()   const { return aFirst; }
 
     // Reset all attrs of the format but keep the ones a pagedesc
     // cannot live without.
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index a27dc3a..43ed2bb 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -816,7 +816,10 @@ enum SwPropNameIds
 
 /* 0750 */  UNO_NAME_PARAGRAPH_STYLE_NAME,
 
-/* 0751 */  SW_PROPNAME_END
+/* 0750 */  UNO_NAME_HEADER_IS_SHARED_FIRST,
+/* 0751 */  UNO_NAME_FOOTER_IS_SHARED_FIRST,
+
+/* 0752 */  SW_PROPNAME_END
 
 // new items in this array must match SwPropNameTab aPropNameTab
 };
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 5f97836..2aa2b20 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -294,6 +294,7 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
         }
     }
     pDesc->ChgHeaderShare( rChged.IsHeaderShared() );
+    pDesc->ChgHeaderShareFirst( rChged.IsHeaderSharedFirst() );
 
     // Synch Footer.
     const SwFmtFooter &rFoot = rChged.GetMaster().GetFooter();
@@ -354,6 +355,7 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
         }
     }
     pDesc->ChgFooterShare( rChged.IsFooterShared() );
+    pDesc->ChgFooterShareFirst( rChged.IsFooterSharedFirst() );
 
     if ( pDesc->GetName() != rChged.GetName() )
         pDesc->SetName( rChged.GetName() );
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index 45ac7b5..5bbee57 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -55,11 +55,12 @@ SwPageDesc::SwPageDesc( const String& rName, SwFrmFmt *pFmt, SwDoc *pDc ) :
     aDescName( rName ),
     aMaster( pDc->GetAttrPool(), rName, pFmt ),
     aLeft( pDc->GetAttrPool(), rName, pFmt ),
+    aFirst( pDc->GetAttrPool(), rName, pFmt ),
     aDepend( this, 0 ),
     pFollow( this ),
     nRegHeight( 0 ),
     nRegAscent( 0 ),
-    eUse( (UseOnPage)(nsUseOnPage::PD_ALL | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE) ),
+    eUse( (UseOnPage)(nsUseOnPage::PD_ALL | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE | nsUseOnPage::PD_HEADERSHAREFIRST | nsUseOnPage::PD_FOOTERSHAREFIRST ) ),
     bLandscape( sal_False ),
     aFtnInfo()
 {
@@ -71,6 +72,7 @@ SwPageDesc::SwPageDesc( const SwPageDesc &rCpy ) :
     aNumType( rCpy.GetNumType() ),
     aMaster( rCpy.GetMaster() ),
     aLeft( rCpy.GetLeft() ),
+    aFirst( rCpy.GetFirst() ),
     aDepend( this, (SwModify*)rCpy.aDepend.GetRegisteredIn() ),
     pFollow( rCpy.pFollow ),
     nRegHeight( rCpy.GetRegHeight() ),
@@ -87,6 +89,7 @@ SwPageDesc & SwPageDesc::operator = (const SwPageDesc & rSrc)
     aNumType = rSrc.aNumType;
     aMaster = rSrc.aMaster;
     aLeft = rSrc.aLeft;
+    aFirst = rSrc.aFirst;
 
     if (rSrc.pFollow == &rSrc)
         pFollow = this;
@@ -338,6 +341,32 @@ sal_Bool SwPageDesc::IsFollowNextPageOfNode( const SwNode& rNd ) const
     return bRet;
 }
 
+sal_Bool SwPageDesc::IsHeaderSharedFirst() const
+{
+    return eUse & nsUseOnPage::PD_HEADERSHAREFIRST ? sal_True : sal_False;
+}
+
+void SwPageDesc::ChgHeaderShareFirst( sal_Bool bNew )
+{
+    if ( bNew )
+        eUse = (UseOnPage) (eUse | nsUseOnPage::PD_HEADERSHAREFIRST);
+    else
+        eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOHEADERSHAREFIRST);
+}
+
+sal_Bool SwPageDesc::IsFooterSharedFirst() const
+{
+    return eUse & nsUseOnPage::PD_FOOTERSHAREFIRST ? sal_True : sal_False;
+}
+
+void SwPageDesc::ChgFooterShareFirst( sal_Bool bNew )
+{
+    if ( bNew )
+        eUse = (UseOnPage) (eUse | nsUseOnPage::PD_FOOTERSHAREFIRST);
+    else
+        eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOFOOTERSHAREFIRST);
+}
+
 /*************************************************************************
 |*
 |*  SwPageFtnInfo::SwPageFtnInfo()
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 9eba818..365d9ce 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -787,6 +787,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
                     { SW_PROP_NMID(UNO_NAME_HEADER_BODY_DISTANCE), FN_UNO_HEADER_BODY_DISTANCE,CPPU_E2T(CPPUTYPE_INT32),            PROPERTY_NONE ,MID_LO_MARGIN|CONVERT_TWIPS       },
                     { SW_PROP_NMID(UNO_NAME_HEADER_IS_DYNAMIC_HEIGHT), FN_UNO_HEADER_IS_DYNAMIC_DISTANCE,CPPU_E2T(CPPUTYPE_BOOLEAN),            PROPERTY_NONE ,0         },
                     { SW_PROP_NMID(UNO_NAME_HEADER_IS_SHARED), FN_UNO_HEADER_SHARE_CONTENT,CPPU_E2T(CPPUTYPE_BOOLEAN),          PROPERTY_NONE ,0         },
+                    { SW_PROP_NMID(UNO_NAME_HEADER_IS_SHARED_FIRST), FN_UNO_HEADER_SHARE_FIRST_CONTENT,CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0 },
                     { SW_PROP_NMID(UNO_NAME_HEADER_HEIGHT), FN_UNO_HEADER_HEIGHT,       CPPU_E2T(CPPUTYPE_INT32),           PROPERTY_NONE ,MID_SIZE_HEIGHT|CONVERT_TWIPS         },
                     { SW_PROP_NMID(UNO_NAME_HEADER_IS_ON), FN_UNO_HEADER_ON,            CPPU_E2T(CPPUTYPE_BOOLEAN),         PROPERTY_NONE ,0         },
                     { SW_PROP_NMID(UNO_NAME_HEADER_DYNAMIC_SPACING), FN_UNO_HEADER_EAT_SPACING,            CPPU_E2T(CPPUTYPE_BOOLEAN),         PropertyAttribute::MAYBEVOID ,0         },
@@ -812,6 +813,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
                     { SW_PROP_NMID(UNO_NAME_FOOTER_BODY_DISTANCE), FN_UNO_FOOTER_BODY_DISTANCE,CPPU_E2T(CPPUTYPE_INT32),            PROPERTY_NONE ,MID_UP_MARGIN|CONVERT_TWIPS       },
                     { SW_PROP_NMID(UNO_NAME_FOOTER_IS_DYNAMIC_HEIGHT), FN_UNO_FOOTER_IS_DYNAMIC_DISTANCE,CPPU_E2T(CPPUTYPE_BOOLEAN),            PROPERTY_NONE ,0         },
                     { SW_PROP_NMID(UNO_NAME_FOOTER_IS_SHARED), FN_UNO_FOOTER_SHARE_CONTENT,CPPU_E2T(CPPUTYPE_BOOLEAN),          PROPERTY_NONE ,0         },
+                    { SW_PROP_NMID(UNO_NAME_FOOTER_IS_SHARED_FIRST), FN_UNO_FOOTER_SHARE_FIRST_CONTENT,CPPU_E2T(CPPUTYPE_BOOLEAN),          PROPERTY_NONE ,0         },
                     { SW_PROP_NMID(UNO_NAME_FOOTER_HEIGHT), FN_UNO_FOOTER_HEIGHT,       CPPU_E2T(CPPUTYPE_INT32),           PROPERTY_NONE ,MID_SIZE_HEIGHT|CONVERT_TWIPS         },
                     { SW_PROP_NMID(UNO_NAME_FOOTER_IS_ON), FN_UNO_FOOTER_ON,            CPPU_E2T(CPPUTYPE_BOOLEAN),         PROPERTY_NONE ,0         },
                     { SW_PROP_NMID(UNO_NAME_FOOTER_DYNAMIC_SPACING), FN_UNO_FOOTER_EAT_SPACING,            CPPU_E2T(CPPUTYPE_BOOLEAN),         PropertyAttribute::MAYBEVOID ,0         },
diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx
index 6cecce3..50497c9 100644
--- a/sw/source/core/unocore/unoprnms.cxx
+++ b/sw/source/core/unocore/unoprnms.cxx
@@ -789,6 +789,8 @@ const SwPropNameTab aPropNameTab = {
 
 /* 0749 PARA_CONTEXT_MARGIN */           {MAP_CHAR_LEN("ParaContextMargin")},
 /* 0750 PARAGRAPH_STYLE_NAME */           {MAP_CHAR_LEN("ParagraphStyleName")},
+/* 0751 HEADER_IS_SHARED_FIRST */             {MAP_CHAR_LEN("HeaderIsSharedFirst")},
+/* 0752 FOOTER_IS_SHARED_FIRST */             {MAP_CHAR_LEN("FooterIsSharedFirst")},
 
 // new items in this array must match enum SwPropNameIds
 };
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index f7055be..d43d6fc 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -145,6 +145,9 @@ sal_uInt16 lcl_ConvertFNToRES(sal_uInt16 nFNId)
         case FN_UNO_FOOTER_SHARE_CONTENT:
         case FN_UNO_HEADER_SHARE_CONTENT:   nRes = SID_ATTR_PAGE_SHARED;
         break;
+        case FN_UNO_FOOTER_SHARE_FIRST_CONTENT:
+        case FN_UNO_HEADER_SHARE_FIRST_CONTENT:   nRes = SID_ATTR_PAGE_SHARED_FIRST;
+        break;
         case FN_UNO_FOOTER_HEIGHT:
         case FN_UNO_HEADER_HEIGHT:          nRes = SID_ATTR_PAGE_SIZE;
         break;
@@ -2999,6 +3002,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
                 case FN_UNO_HEADER_BODY_DISTANCE:
                 case FN_UNO_HEADER_IS_DYNAMIC_DISTANCE:
                 case FN_UNO_HEADER_SHARE_CONTENT:
+                case FN_UNO_HEADER_SHARE_FIRST_CONTENT:
                 case FN_UNO_HEADER_HEIGHT:
                 case FN_UNO_HEADER_EAT_SPACING:
 
@@ -3010,6 +3014,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
                 case FN_UNO_FOOTER_BODY_DISTANCE:
                 case FN_UNO_FOOTER_IS_DYNAMIC_DISTANCE:
                 case FN_UNO_FOOTER_SHARE_CONTENT:
+                case FN_UNO_FOOTER_SHARE_FIRST_CONTENT:
                 case FN_UNO_FOOTER_HEIGHT:
                 case FN_UNO_FOOTER_EAT_SPACING:
                 {
@@ -3050,6 +3055,10 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
                         // kein break;
                         case FN_UNO_HEADER_SHARE_CONTENT:       nRes = SID_ATTR_PAGE_SHARED;
                         break;
+                        case FN_UNO_FOOTER_SHARE_FIRST_CONTENT: bFooter = sal_True;
+                        // no break;
+                        case FN_UNO_HEADER_SHARE_FIRST_CONTENT: nRes = SID_ATTR_PAGE_SHARED_FIRST;
+                        break;
                         case FN_UNO_FOOTER_HEIGHT:              bFooter = sal_True;
                         // kein break;
                         case FN_UNO_HEADER_HEIGHT:              nRes = SID_ATTR_PAGE_SIZE;nItemType = TYPE_SIZE;
@@ -3106,12 +3115,14 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
                                 SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
                                 SID_ATTR_PAGE_DYNAMIC, SID_ATTR_PAGE_DYNAMIC,
                                 SID_ATTR_PAGE_SHARED, SID_ATTR_PAGE_SHARED,
+                                SID_ATTR_PAGE_SHARED_FIRST, SID_ATTR_PAGE_SHARED_FIRST,
                                 0 );
                             aTempSet.Put(SfxBoolItem(nRes, sal_True));
                             aTempSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(MM50, MM50)));
                             aTempSet.Put(SvxLRSpaceItem(RES_LR_SPACE));
                             aTempSet.Put(SvxULSpaceItem(RES_UL_SPACE));
                             aTempSet.Put(SfxBoolItem(SID_ATTR_PAGE_SHARED, sal_True));
+                            aTempSet.Put(SfxBoolItem(SID_ATTR_PAGE_SHARED_FIRST, sal_True));
                             aTempSet.Put(SfxBoolItem(SID_ATTR_PAGE_DYNAMIC, sal_True));
 
                             SvxSetItem aNewSetItem( bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET,
@@ -3254,6 +3265,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
                 case FN_UNO_HEADER_BODY_DISTANCE:
                 case FN_UNO_HEADER_IS_DYNAMIC_DISTANCE:
                 case FN_UNO_HEADER_SHARE_CONTENT:
+                case FN_UNO_HEADER_SHARE_FIRST_CONTENT:
                 case FN_UNO_HEADER_HEIGHT:
                 case FN_UNO_HEADER_EAT_SPACING:
 
@@ -3265,6 +3277,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
                 case FN_UNO_FOOTER_BODY_DISTANCE:
                 case FN_UNO_FOOTER_IS_DYNAMIC_DISTANCE:
                 case FN_UNO_FOOTER_SHARE_CONTENT:
+                case FN_UNO_FOOTER_SHARE_FIRST_CONTENT:
                 case FN_UNO_FOOTER_HEIGHT:
                 case FN_UNO_FOOTER_EAT_SPACING:
                 {
@@ -3317,6 +3330,10 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
                             // kein break;
                             case FN_UNO_HEADER_SHARE_CONTENT:   nRes = SID_ATTR_PAGE_SHARED;
                             break;
+                            case FN_UNO_FOOTER_SHARE_FIRST_CONTENT: bFooter = sal_True;
+                            // no break;
+                            case FN_UNO_HEADER_SHARE_FIRST_CONTENT: nRes = SID_ATTR_PAGE_SHARED_FIRST;
+                            break;
                             case FN_UNO_FOOTER_HEIGHT:          bFooter = sal_True;
                             // kein break;
                             case FN_UNO_HEADER_HEIGHT:          nRes = SID_ATTR_PAGE_SIZE;
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index aea4c6c..3c760e3 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -219,6 +219,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
 
             rPageDesc.ChgHeaderShare(((const SfxBoolItem&)
                         rHeaderSet.Get(SID_ATTR_PAGE_SHARED)).GetValue());
+            rPageDesc.ChgHeaderShareFirst(((const SfxBoolItem&)
+                        rHeaderSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue());
         }
         else
         {   // Header ausschalten
@@ -227,6 +229,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
             {
                 rMaster.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False)));
                 rPageDesc.ChgHeaderShare(sal_False);
+                rPageDesc.ChgHeaderShareFirst(sal_False);
             }
         }
     }
@@ -255,6 +258,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
 
             rPageDesc.ChgFooterShare(((const SfxBoolItem&)
                         rFooterSet.Get(SID_ATTR_PAGE_SHARED)).GetValue());
+            rPageDesc.ChgFooterShareFirst(((const SfxBoolItem&)
+                        rFooterSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue());
         }
         else
         {   // Footer ausschalten
@@ -263,6 +268,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
             {
                 rMaster.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False)));
                 rPageDesc.ChgFooterShare(sal_False);
+                rPageDesc.ChgFooterShareFirst(sal_False);
             }
         }
     }
@@ -368,6 +374,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
         //
         SfxItemSet aHeaderSet( *rSet.GetPool(),
                     SID_ATTR_PAGE_ON,       SID_ATTR_PAGE_SHARED,
+                    SID_ATTR_PAGE_SHARED_FIRST, SID_ATTR_PAGE_SHARED_FIRST,
                     SID_ATTR_PAGE_SIZE,     SID_ATTR_PAGE_SIZE,
                     SID_ATTR_BORDER_INNER,  SID_ATTR_BORDER_INNER,
                     RES_FRMATR_BEGIN,       RES_FRMATR_END-1,
@@ -387,6 +394,8 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
         //
         SfxBoolItem aShared(SID_ATTR_PAGE_SHARED, rPageDesc.IsHeaderShared());
         aHeaderSet.Put(aShared);
+        SfxBoolItem aSharedFirst(SID_ATTR_PAGE_SHARED_FIRST, rPageDesc.IsHeaderSharedFirst());
+        aHeaderSet.Put(aSharedFirst);
 
         // Groesse
         SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, Size(rFrmSize.GetSize()));
@@ -414,6 +423,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
         //
         SfxItemSet aFooterSet( *rSet.GetPool(),
                     SID_ATTR_PAGE_ON,       SID_ATTR_PAGE_SHARED,
+                    SID_ATTR_PAGE_SHARED_FIRST, SID_ATTR_PAGE_SHARED_FIRST,
                     SID_ATTR_PAGE_SIZE,     SID_ATTR_PAGE_SIZE,
                     SID_ATTR_BORDER_INNER,  SID_ATTR_BORDER_INNER,
                     RES_FRMATR_BEGIN,       RES_FRMATR_END-1,
@@ -433,6 +443,8 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
         //
         SfxBoolItem aShared(SID_ATTR_PAGE_SHARED, rPageDesc.IsFooterShared());
         aFooterSet.Put(aShared);
+        SfxBoolItem aSharedFirst(SID_ATTR_PAGE_SHARED_FIRST, rPageDesc.IsFooterSharedFirst());
+        aFooterSet.Put(aSharedFirst);
 
         // Groesse
         SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, Size(rFrmSize.GetSize()));


More information about the Libreoffice-commits mailing list