[Libreoffice-commits] .: 3 commits - sw/inc sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 17 13:34:53 PST 2013


 sw/inc/pagedesc.hxx              |    1 +
 sw/source/core/layout/atrfrm.cxx |    7 +++++--
 sw/source/ui/utlui/uitool.cxx    |    2 --
 3 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 33a1b189d23a94e2a1c3329f51009f925b8bd8ee
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jan 17 22:29:58 2013 +0100

    ItemSetToPageDesc: remove mysterious SvxPageUsage flag mangling
    
    These 2 lines (from initial CVS import) appear unnecessary since the
    only valid SvxPageUsage value with 0x04 set is 0x07.
    
    Change-Id: I4fe92e100955ff00831e0ef7bdad21e7105193ed

diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index 1db6d38..2c4087e 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -198,8 +198,6 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
         const SvxPageItem& rPageItem = (const SvxPageItem&)rSet.Get(SID_ATTR_PAGE);
 
         sal_uInt16 nUse = (sal_uInt16)rPageItem.GetPageUsage();
-        if(nUse & 0x04)
-            nUse |= 0x03;
         if(nUse)
             rPageDesc.SetUseOn( lcl_convertUseFromSvx((UseOnPage) nUse) );
         rPageDesc.SetLandscape(rPageItem.IsLandscape());
commit 8d301533f0c7764c94f8ad72fced2ce9d9de7585
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jan 17 21:55:32 2013 +0100

    fdo#59428: SwPageDesc::GetUseOn(): mask PD_FIRSTSHARE.
    
    There is at least one call in SwDoc::ChgPageDesc() checks if the result
    equals PD_MIRROR.
    
    (regression from fa0f42bafbf24e9141ddee728b160b5ab47077f2)
    
    Change-Id: Id37ca46eec5885f7f5230337d8a8a594845f7842

diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index b6c40a8..dbf3144 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -292,6 +292,7 @@ inline UseOnPage SwPageDesc::GetUseOn() const
     UseOnPage eRet = eUse;
     eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOHEADERSHARE);
     eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOFOOTERSHARE);
+    eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOFIRSTSHARE);
     return eRet;
 }
 
commit 0ed73a0817ad0ff0107cb297208252c0afe3b4a9
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jan 17 21:45:09 2013 +0100

    fdo#59437: SwFmtAnchor::SetAnchor: Anchors may be on StartNodes
    
    Assertion added in 90a0116ccb48388d91b21128fcac2e4609838581 wasn't quite
    right.
    
    Change-Id: Icac6c4e3932837ffaf170d9b18664e5b4ff579ff

diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index f5d7798..180b145 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1514,8 +1514,11 @@ SwFmtAnchor::~SwFmtAnchor()
 
 void SwFmtAnchor::SetAnchor( const SwPosition *pPos )
 {
-    // anchor only to paragraphs
-    assert(!pPos || dynamic_cast<SwTxtNode*>(&pPos->nNode.GetNode()));
+    // anchor only to paragraphs, or start nodes in case of FLY_AT_FLY
+    assert(!pPos
+            || ((FLY_AT_FLY == nAnchorId) &&
+                    dynamic_cast<SwStartNode*>(&pPos->nNode.GetNode()))
+            || dynamic_cast<SwTxtNode*>(&pPos->nNode.GetNode()));
     m_pCntntAnchor .reset( (pPos) ? new SwPosition( *pPos ) : 0 );
     // Flys anchored AT paragraph should not point into the paragraph content
     if (m_pCntntAnchor &&


More information about the Libreoffice-commits mailing list