offapi/com/sun/star/style/PageProperties.idl      |   10 +-------
 sw/inc/cmdid.h                                    |    7 ++----
 sw/inc/pagedesc.hxx                               |   12 +++-------
 sw/inc/unoprnms.hxx                               |    9 +++----
 sw/source/core/doc/docdesc.cxx                    |   11 ++++-----
 sw/source/core/doc/docfmt.cxx                     |    4 +--
 sw/source/core/layout/frmtool.cxx                 |    2 -
 sw/source/core/layout/pagedesc.cxx                |   25 +++++-----------------
 sw/source/core/unocore/unomap.cxx                 |    4 +--
 sw/source/core/unocore/unoprnms.cxx               |    7 ++----
 sw/source/core/unocore/unostyle.cxx               |   22 +++++++------------
 sw/source/filter/ww8/ww8par.cxx                   |    4 +--
 sw/source/ui/utlui/uitool.cxx                     |   12 ++--------
 xmloff/inc/xmloff/XMLTextMasterPageExport.hxx     |    4 +--
 xmloff/source/text/XMLTextHeaderFooterContext.cxx |   10 --------
 xmloff/source/text/XMLTextMasterPageExport.cxx    |    7 ++----
 16 files changed, 51 insertions(+), 99 deletions(-)

New commits:
commit 84493425a1c5645221760756bec1c751ed24f522
Author: Miklos Vajna <vmik...@suse.cz>
Date:   Mon Jul 9 09:45:04 2012 +0200

    merge HeaderIsSharedFirst and FooterIsSharedFirst to FirstIsShared
    
    sw document model, xmloff and offapi supported these separately, but sw
    layout did not. It turns out it's not needed for Word interop, either,
    so better to just merge these, instead of implementing them
    independently without a good use-case.
    
    Change-Id: I5c3b334baa09cabec123745c7af3d65d830754fc

diff --git a/offapi/com/sun/star/style/PageProperties.idl 
b/offapi/com/sun/star/style/PageProperties.idl
index ebd7b49..86f399a 100644
--- a/offapi/com/sun/star/style/PageProperties.idl
+++ b/offapi/com/sun/star/style/PageProperties.idl
@@ -258,11 +258,11 @@ published service PageProperties
  */
 [property, maybevoid] boolean HeaderIsShared;
 //-----------------------------------------------------------------------------
-/** determines if the header content on the first page and remaining pages is 
the same.
+/** determines if the header/footer content on the first page and remaining 
pages is the same.
 
     @since LibreOffice 3.7
  */
-[optional, property, maybevoid] boolean HeaderIsSharedFirst;
+[optional, property, maybevoid] boolean FirstIsShared;
 //-----------------------------------------------------------------------------
 /** contains the height of the header.
  */
@@ -370,12 +370,6 @@ 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/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 31fd631..be1c84d 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -661,10 +661,9 @@ 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)
-#define FN_UNO_HEADER_FIRST                 (FN_EXTRA2 + 119)
-#define FN_UNO_FOOTER_FIRST                 (FN_EXTRA2 + 120)
+#define FN_UNO_FIRST_SHARE_CONTENT          (FN_EXTRA2 + 117)
+#define FN_UNO_HEADER_FIRST                 (FN_EXTRA2 + 118)
+#define FN_UNO_FOOTER_FIRST                 (FN_EXTRA2 + 119)
 
 /*------------------------------------------------ --------------------
     Area: Help
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index e529c12..c7a95cd 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -134,10 +134,8 @@ namespace nsUseOnPage
     const UseOnPage PD_FOOTERSHARE    = 0x0080;
     const UseOnPage PD_NOHEADERSHARE  = 0xFFBF; // For internal use only.
     const UseOnPage PD_NOFOOTERSHARE  = 0xFF7F; // For internal use only.
-    const UseOnPage PD_HEADERSHAREFIRST = 0x0100;
-    const UseOnPage PD_NOHEADERSHAREFIRST = 0xFEFF;
-    const UseOnPage PD_FOOTERSHAREFIRST = 0x0200;
-    const UseOnPage PD_NOFOOTERSHAREFIRST = 0xFDFF;
+    const UseOnPage PD_FIRSTSHARE = 0x0100;
+    const UseOnPage PD_NOFIRSTSHARE = 0xFEFF;
 }
 
 class SW_DLLPUBLIC SwPageDesc : public SwModify
@@ -189,10 +187,8 @@ 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 );
+    sal_Bool IsFirstShared() const;
+    void ChgFirstShare( sal_Bool bNew );
 
     inline void      SetUseOn( UseOnPage eNew );
     inline UseOnPage GetUseOn() const;
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 6bf1256..06e1c27 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -816,12 +816,11 @@ enum SwPropNameIds
 
 /* 0750 */  UNO_NAME_PARAGRAPH_STYLE_NAME,
 
-/* 0750 */  UNO_NAME_HEADER_IS_SHARED_FIRST,
-/* 0751 */  UNO_NAME_FOOTER_IS_SHARED_FIRST,
-/* 0752 */  UNO_NAME_HEADER_TEXT_FIRST,
-/* 0753 */  UNO_NAME_FOOTER_TEXT_FIRST,
+/* 0750 */  UNO_NAME_FIRST_IS_SHARED,
+/* 0751 */  UNO_NAME_HEADER_TEXT_FIRST,
+/* 0752 */  UNO_NAME_FOOTER_TEXT_FIRST,
 
-/* 0754 */  SW_PROPNAME_END
+/* 0753 */  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 7fefd9a..737f92b 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -178,7 +178,7 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt 
&rDest,
 void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, const SwFmtHeader 
&rHead, SwPageDesc *pDesc, bool bLeft)
 {
     SwFrmFmt& rDescFrmFmt = (bLeft ? pDesc->GetLeft() : pDesc->GetFirst());
-    if ( (bLeft ? rChged.IsHeaderShared() : rChged.IsHeaderSharedFirst() ) || 
!rHead.IsActive() )
+    if ( (bLeft ? rChged.IsHeaderShared() : rChged.IsFirstShared() ) || 
!rHead.IsActive() )
     {
         // Left or first shares the header with the Master.
         rDescFrmFmt.SetFmtAttr( pDesc->GetMaster().GetHeader() );
@@ -235,7 +235,7 @@ void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, 
const SwFmtHeader &rHead,
 void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, const SwFmtFooter 
&rFoot, SwPageDesc *pDesc, bool bLeft)
 {
     SwFrmFmt& rDescFrmFmt = (bLeft ? pDesc->GetLeft() : pDesc->GetFirst());
-    if ( (bLeft ? rChged.IsFooterShared() : rChged.IsFooterSharedFirst() ) || 
!rFoot.IsActive() )
+    if ( (bLeft ? rChged.IsFooterShared() : rChged.IsFirstShared() ) || 
!rFoot.IsActive() )
         // Left or first shares the Header with the Master.
         rDescFrmFmt.SetFmtAttr( pDesc->GetMaster().GetFooter() );
     else if ( rFoot.IsActive() )
@@ -333,6 +333,7 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc 
&rChged )
 
     // Take over orientation
     pDesc->SetLandscape( rChged.GetLandscape() );
+    pDesc->ChgFirstShare( rChged.IsFirstShared() );
 
     // #i46909# no undo if header or footer changed
     bool bHeaderFooterChanged = false;
@@ -347,13 +348,12 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc 
&rChged )
         bHeaderFooterChanged |=
             ( rHead.IsActive() != rOldHead.IsActive() ||
               rChged.IsHeaderShared() != pDesc->IsHeaderShared() ||
-              rChged.IsHeaderSharedFirst() != pDesc->IsHeaderSharedFirst() );
+              rChged.IsFirstShared() != pDesc->IsFirstShared() );
     }
     pDesc->GetMaster().SetFmtAttr( rHead );
     CopyMasterHeader(rChged, rHead, pDesc, true); // Copy left header
     CopyMasterHeader(rChged, rHead, pDesc, false); // Copy first header
     pDesc->ChgHeaderShare( rChged.IsHeaderShared() );
-    pDesc->ChgHeaderShareFirst( rChged.IsHeaderSharedFirst() );
 
     // Synch Footer.
     const SwFmtFooter &rFoot = rChged.GetMaster().GetFooter();
@@ -365,13 +365,12 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc 
&rChged )
         bHeaderFooterChanged |=
             ( rFoot.IsActive() != rOldFoot.IsActive() ||
               rChged.IsFooterShared() != pDesc->IsFooterShared() ||
-              rChged.IsFooterSharedFirst() != pDesc->IsFooterSharedFirst() );
+              rChged.IsFirstShared() != pDesc->IsFirstShared() );
     }
     pDesc->GetMaster().SetFmtAttr( rFoot );
     CopyMasterFooter(rChged, rFoot, pDesc, true); // Copy left footer
     CopyMasterFooter(rChged, rFoot, pDesc, false); // Copy first footer
     pDesc->ChgFooterShare( rChged.IsFooterShared() );
-    pDesc->ChgFooterShareFirst( rChged.IsFooterSharedFirst() );
 
     if ( pDesc->GetName() != rChged.GetName() )
         pDesc->SetName( rChged.GetName() );
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index bb8a40f..2dfc3df 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -2100,7 +2100,7 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, 
SwPageDesc& rDstDesc,
         CopyHeader( rSrcDesc.GetLeft(), rDstDesc.GetLeft() );
     else
         rDstDesc.GetLeft().SetFmtAttr( rDstDesc.GetMaster().GetHeader() );
-    if( !rDstDesc.IsHeaderSharedFirst() )
+    if( !rDstDesc.IsFirstShared() )
         CopyHeader( rSrcDesc.GetFirst(), rDstDesc.GetFirst() );
     else
         rDstDesc.GetFirst().SetFmtAttr( rDstDesc.GetMaster().GetHeader() );
@@ -2109,7 +2109,7 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, 
SwPageDesc& rDstDesc,
         CopyFooter( rSrcDesc.GetLeft(), rDstDesc.GetLeft() );
     else
         rDstDesc.GetLeft().SetFmtAttr( rDstDesc.GetMaster().GetFooter() );
-    if( !rDstDesc.IsFooterSharedFirst() )
+    if( !rDstDesc.IsFirstShared() )
         CopyFooter( rSrcDesc.GetFirst(), rDstDesc.GetFirst() );
     else
         rDstDesc.GetFirst().SetFmtAttr( rDstDesc.GetMaster().GetFooter() );
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index 7cb768e..2340510 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2703,7 +2703,7 @@ SwPageFrm * InsertNewPage( SwPageDesc &rDesc, SwFrm 
*pUpper,
     SwFrmFmt *pFmt = 0;
     // rDesc can't know if the first page will be 'left' or 'right', so if
     // first is shared, let's ignore first here.
-    if (bFirst && !rDesc.IsHeaderSharedFirst())
+    if (bFirst && !rDesc.IsFirstShared())
         pFmt = rDesc.GetFirstFmt();
     else
         pFmt = bOdd ? rDesc.GetRightFmt() : rDesc.GetLeftFmt();
diff --git a/sw/source/core/layout/pagedesc.cxx 
b/sw/source/core/layout/pagedesc.cxx
index 2c86b92..1fa5c31 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -63,7 +63,7 @@ SwPageDesc::SwPageDesc( const String& rName, SwFrmFmt *pFmt, 
SwDoc *pDc ) :
     pFollow( this ),
     nRegHeight( 0 ),
     nRegAscent( 0 ),
-    eUse( (UseOnPage)(nsUseOnPage::PD_ALL | nsUseOnPage::PD_HEADERSHARE | 
nsUseOnPage::PD_FOOTERSHARE | nsUseOnPage::PD_HEADERSHAREFIRST | 
nsUseOnPage::PD_FOOTERSHAREFIRST ) ),
+    eUse( (UseOnPage)(nsUseOnPage::PD_ALL | nsUseOnPage::PD_HEADERSHARE | 
nsUseOnPage::PD_FOOTERSHARE | nsUseOnPage::PD_FIRSTSHARE ) ),
     bLandscape( sal_False ),
     aFtnInfo()
 {
@@ -352,30 +352,17 @@ sal_Bool SwPageDesc::IsFollowNextPageOfNode( const 
SwNode& rNd ) const
     return bRet;
 }
 
-sal_Bool SwPageDesc::IsHeaderSharedFirst() const
+sal_Bool SwPageDesc::IsFirstShared() const
 {
-    return eUse & nsUseOnPage::PD_HEADERSHAREFIRST ? sal_True : sal_False;
+    return eUse & nsUseOnPage::PD_FIRSTSHARE ? sal_True : sal_False;
 }
 
-void SwPageDesc::ChgHeaderShareFirst( sal_Bool bNew )
+void SwPageDesc::ChgFirstShare( sal_Bool bNew )
 {
     if ( bNew )
-        eUse = (UseOnPage) (eUse | nsUseOnPage::PD_HEADERSHAREFIRST);
+        eUse = (UseOnPage) (eUse | nsUseOnPage::PD_FIRSTSHARE);
     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);
+        eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOFIRSTSHARE);
 }
 
 /*************************************************************************
diff --git a/sw/source/core/unocore/unomap.cxx 
b/sw/source/core/unocore/unomap.cxx
index 6ae3387..4d6fd06 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -787,11 +787,12 @@ 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         },
 
+                    { SW_PROP_NMID(UNO_NAME_FIRST_IS_SHARED), 
FN_UNO_FIRST_SHARE_CONTENT,CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0 },
+
                     { SW_PROP_NMID(UNO_NAME_FOOTER_BACK_COLOR), 
FN_UNO_FOOTER_BACKGROUND,   CPPU_E2T(CPPUTYPE_INT32),           PROPERTY_NONE 
,MID_BACK_COLOR        },
                 //  { SW_PROP_NMID(UNO_NAME_FOOTER_GRAPHIC), 
FN_UNO_FOOTER_BACKGROUND,      &,                              PROPERTY_NONE, 
MID_GRAPHIC
                     { SW_PROP_NMID(UNO_NAME_FOOTER_GRAPHIC_URL), 
FN_UNO_FOOTER_BACKGROUND,      CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE 
,MID_GRAPHIC_URL    },
@@ -813,7 +814,6 @@ 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 dec2b5d..11956d1 100644
--- a/sw/source/core/unocore/unoprnms.cxx
+++ b/sw/source/core/unocore/unoprnms.cxx
@@ -789,10 +789,9 @@ 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")},
-/* 0753 HEADER_TEXT_FIRST */            {MAP_CHAR_LEN("HeaderTextFirst")},
-/* 0754 FOOTER_TEXT_FIRST */            {MAP_CHAR_LEN("FooterTextFirst")},
+/* 0751 FIRST_IS_SHARED */             {MAP_CHAR_LEN("FirstIsShared")},
+/* 0752 HEADER_TEXT_FIRST */            {MAP_CHAR_LEN("HeaderTextFirst")},
+/* 0753 FOOTER_TEXT_FIRST */            {MAP_CHAR_LEN("FooterTextFirst")},
 
 // 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 021735c..26b9009 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -145,8 +145,7 @@ 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;
+        case FN_UNO_FIRST_SHARE_CONTENT:   nRes = SID_ATTR_PAGE_SHARED_FIRST;
         break;
         case FN_UNO_FOOTER_HEIGHT:
         case FN_UNO_HEADER_HEIGHT:          nRes = SID_ATTR_PAGE_SIZE;
@@ -3001,10 +3000,11 @@ 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:
 
+                case FN_UNO_FIRST_SHARE_CONTENT:
+
                 case FN_UNO_FOOTER_ON:
                 case FN_UNO_FOOTER_BACKGROUND:
                 case FN_UNO_FOOTER_BOX:
@@ -3013,7 +3013,6 @@ 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:
                 {
@@ -3054,9 +3053,7 @@ 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;
+                        case FN_UNO_FIRST_SHARE_CONTENT: nRes = 
SID_ATTR_PAGE_SHARED_FIRST;
                         break;
                         case FN_UNO_FOOTER_HEIGHT:              bFooter = 
sal_True;
                         // kein break;
@@ -3267,10 +3264,11 @@ 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:
 
+                case FN_UNO_FIRST_SHARE_CONTENT:
+
                 case FN_UNO_FOOTER_ON:
                 case FN_UNO_FOOTER_BACKGROUND:
                 case FN_UNO_FOOTER_BOX:
@@ -3279,7 +3277,6 @@ 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:
                 {
@@ -3332,9 +3329,7 @@ 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;
+                            case FN_UNO_FIRST_SHARE_CONTENT: nRes = 
SID_ATTR_PAGE_SHARED_FIRST;
                             break;
                             case FN_UNO_FOOTER_HEIGHT:          bFooter = 
sal_True;
                             // kein break;
@@ -3387,8 +3382,7 @@ MakeObject:
                     const SwFrmFmt* pFrmFmt = 0;
                     sal_Bool bShare = (bHeader && rDesc.IsHeaderShared())||
                                     (!bHeader && rDesc.IsFooterShared());
-                    bool bShareFirst = (bHeader && 
rDesc.IsHeaderSharedFirst())||
-                                    (!bHeader && rDesc.IsFooterSharedFirst());
+                    bool bShareFirst = rDesc.IsFirstShared();
                     // TextLeft returns the left content if there is one,
                     // Text and TextRight return the master content.
                     // TextRight does the same as Text and is for
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index eae86e3..d804eee 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3730,7 +3730,7 @@ void wwSectionManager::SetUseOn(wwSection &rSection)
     UseOnPage eUse = eUseBase;
     if (!bEven)
         eUse = (UseOnPage)(eUse | nsUseOnPage::PD_HEADERSHARE | 
nsUseOnPage::PD_FOOTERSHARE);
-    eUse = (UseOnPage)(eUse | nsUseOnPage::PD_HEADERSHAREFIRST | 
nsUseOnPage::PD_FOOTERSHAREFIRST);
+    eUse = (UseOnPage)(eUse | nsUseOnPage::PD_FIRSTSHARE);
 
     OSL_ENSURE(rSection.mpPage, "Makes no sense to call me with no pages to 
set");
     if (rSection.mpPage)
@@ -3738,7 +3738,7 @@ void wwSectionManager::SetUseOn(wwSection &rSection)
     if (rSection.mpTitlePage)
     {
         rSection.mpTitlePage->WriteUseOn(
-            (UseOnPage) (eUseBase | nsUseOnPage::PD_HEADERSHARE | 
nsUseOnPage::PD_FOOTERSHARE | nsUseOnPage::PD_HEADERSHAREFIRST | 
nsUseOnPage::PD_FOOTERSHAREFIRST));
+            (UseOnPage) (eUseBase | nsUseOnPage::PD_HEADERSHARE | 
nsUseOnPage::PD_FOOTERSHARE | nsUseOnPage::PD_FIRSTSHARE));
     }
 }
 
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index 3c760e3..d3d82ad 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -219,7 +219,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& 
rPageDesc )
 
             rPageDesc.ChgHeaderShare(((const SfxBoolItem&)
                         rHeaderSet.Get(SID_ATTR_PAGE_SHARED)).GetValue());
-            rPageDesc.ChgHeaderShareFirst(((const SfxBoolItem&)
+            rPageDesc.ChgFirstShare(((const SfxBoolItem&)
                         
rHeaderSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue());
         }
         else
@@ -229,7 +229,6 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& 
rPageDesc )
             {
                 rMaster.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False)));
                 rPageDesc.ChgHeaderShare(sal_False);
-                rPageDesc.ChgHeaderShareFirst(sal_False);
             }
         }
     }
@@ -258,8 +257,6 @@ 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
@@ -268,7 +265,6 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& 
rPageDesc )
             {
                 rMaster.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False)));
                 rPageDesc.ChgFooterShare(sal_False);
-                rPageDesc.ChgFooterShareFirst(sal_False);
             }
         }
     }
@@ -394,8 +390,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);
+        SfxBoolItem aFirstShared(SID_ATTR_PAGE_SHARED_FIRST, 
rPageDesc.IsFirstShared());
+        aHeaderSet.Put(aFirstShared);
 
         // Groesse
         SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, Size(rFrmSize.GetSize()));
@@ -443,8 +439,6 @@ 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()));
diff --git a/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx 
b/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx
index 02b2b6c..cad00c2 100644
--- a/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx
+++ b/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx
@@ -35,14 +35,14 @@ class XMLOFF_DLLPUBLIC XMLTextMasterPageExport : public 
XMLPageExport
     const ::rtl::OUString sHeaderText;
     const ::rtl::OUString sHeaderOn;
     const ::rtl::OUString sHeaderShareContent;
-    const ::rtl::OUString sHeaderShareContentFirst;
     const ::rtl::OUString sHeaderTextFirst;
     const ::rtl::OUString sHeaderTextLeft;
 
+    const ::rtl::OUString sFirstShareContent;
+
     const ::rtl::OUString sFooterText;
     const ::rtl::OUString sFooterOn;
     const ::rtl::OUString sFooterShareContent;
-    const ::rtl::OUString sFooterShareContentFirst;
     const ::rtl::OUString sFooterTextFirst;
     const ::rtl::OUString sFooterTextLeft;
 
diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx 
b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
index c69ff1e..70ede58 100644
--- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx
+++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
@@ -58,7 +58,7 @@ XMLTextHeaderFooterContext::XMLTextHeaderFooterContext( 
SvXMLImport& rImport, sa
     sOn( bFooter ? OUString(RTL_CONSTASCII_USTRINGPARAM( "FooterIsOn" )) : 
OUString(RTL_CONSTASCII_USTRINGPARAM( "HeaderIsOn" )) ),
     sShareContent( bFooter ? OUString(RTL_CONSTASCII_USTRINGPARAM( 
"FooterIsShared" ))
                                                       : 
OUString(RTL_CONSTASCII_USTRINGPARAM( "HeaderIsShared" )) ),
-    sShareContentFirst( bFooter ? OUString("FooterIsSharedFirst" ) : OUString( 
"HeaderIsSharedFirst" ) ),
+    sShareContentFirst( "FirstIsShared" ),
     sText( bFooter ? OUString(RTL_CONSTASCII_USTRINGPARAM( "FooterText" )) : 
OUString(RTL_CONSTASCII_USTRINGPARAM( "HeaderText" )) ),
     sTextFirst(bFooter ? OUString("FooterTextFirst") : 
OUString("HeaderTextFirst")),
     sTextLeft( bFooter ?  OUString(RTL_CONSTASCII_USTRINGPARAM( 
"FooterTextLeft" ))
@@ -161,14 +161,6 @@ SvXMLImportContext 
*XMLTextHeaderFooterContext::CreateChildContext(
                     aAny.setValue( &bShared, ::getBooleanCppuType() );
                     xPropSet->setPropertyValue( sShareContent, aAny );
                 }
-                aAny = xPropSet->getPropertyValue( sShareContentFirst );
-                sal_Bool bSharedFirst = *(sal_Bool *)aAny.getValue();
-                if( !bSharedFirst )
-                {
-                    bSharedFirst = sal_True;
-                    aAny.setValue( &bSharedFirst, ::getBooleanCppuType() );
-                    xPropSet->setPropertyValue( sShareContentFirst, aAny );
-                }
 
                 aAny = xPropSet->getPropertyValue( sText );
             }
diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx 
b/xmloff/source/text/XMLTextMasterPageExport.cxx
index 2e0a3fe..c9714c5 100644
--- a/xmloff/source/text/XMLTextMasterPageExport.cxx
+++ b/xmloff/source/text/XMLTextMasterPageExport.cxx
@@ -40,13 +40,12 @@ XMLTextMasterPageExport::XMLTextMasterPageExport( 
SvXMLExport& rExp ) :
     sHeaderText( RTL_CONSTASCII_USTRINGPARAM( "HeaderText" ) ),
     sHeaderOn( RTL_CONSTASCII_USTRINGPARAM( "HeaderIsOn" ) ),
     sHeaderShareContent( RTL_CONSTASCII_USTRINGPARAM( "HeaderIsShared" ) ),
-    sHeaderShareContentFirst( "HeaderIsSharedFirst" ),
     sHeaderTextFirst( "HeaderTextFirst" ),
     sHeaderTextLeft( RTL_CONSTASCII_USTRINGPARAM( "HeaderTextLeft" ) ),
+    sFirstShareContent( "FirstIsShared" ),
     sFooterText( RTL_CONSTASCII_USTRINGPARAM( "FooterText" ) ),
     sFooterOn( RTL_CONSTASCII_USTRINGPARAM( "FooterIsOn" ) ),
     sFooterShareContent( RTL_CONSTASCII_USTRINGPARAM( "FooterIsShared" ) ),
-    sFooterShareContentFirst( "FooterIsSharedFirst" ),
     sFooterTextFirst( "FooterTextFirst" ),
     sFooterTextLeft( RTL_CONSTASCII_USTRINGPARAM( "FooterTextLeft" ) )
 {
@@ -133,7 +132,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
         sal_Bool bHeaderFirst = sal_False;
         if( bHeader )
         {
-            aAny = rPropSet->getPropertyValue( sHeaderShareContentFirst );
+            aAny = rPropSet->getPropertyValue( sFirstShareContent );
             bHeaderFirst = !*(sal_Bool *)aAny.getValue();
         }
 
@@ -180,7 +179,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
         sal_Bool bFooterFirst = sal_False;
         if( bFooter )
         {
-            aAny = rPropSet->getPropertyValue( sFooterShareContentFirst );
+            aAny = rPropSet->getPropertyValue( sFirstShareContent );
             bFooterFirst = !*(sal_Bool *)aAny.getValue();
         }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to