[Libreoffice-commits] core.git: 2 commits - cui/source svx/source

Caolán McNamara caolanm at redhat.com
Fri Jan 10 08:53:58 PST 2014


 cui/source/options/optinet2.cxx             |    1 
 svx/source/svdraw/svdotextdecomposition.cxx |   35 +++++++++++++++++++++++++++-
 2 files changed, 34 insertions(+), 2 deletions(-)

New commits:
commit 76a0b3170664b19c3eb66edc8fccb04dc5485387
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 10 16:49:19 2014 +0000

    Resolves: fdo#35779 set the bg color of the editeng from the text shape
    
    Change-Id: I75feaea2dbd6c703cb3093c119a69985ecd89419

diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 970ddf8..b01aab4 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -18,8 +18,10 @@
  */
 
 
-#include <svx/svdotext.hxx>
+#include <svx/svdetc.hxx>
 #include <svx/svdoutl.hxx>
+#include <svx/svdpage.hxx>
+#include <svx/svdotext.hxx>
 #include <basegfx/vector/b2dvector.hxx>
 #include <svx/sdr/primitive2d/sdrtextprimitive2d.hxx>
 #include <drawinglayer/primitive2d/textprimitive2d.hxx>
@@ -882,6 +884,36 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
     rOutliner.SetMinAutoPaperSize(aNullSize);
     rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000));
 
+    // Resolves: fdo#35779 set background color of this shape as the editeng background if there
+    // is one. Check the shape itself, then the host page, then that page's master page.
+    // That color needs to be restored on leaving this method
+    Color aOriginalBackColor(rOutliner.GetBackgroundColor());
+    const SfxItemSet* pBackgroundFillSet = &GetObjectItemSet();
+
+    if (XFILL_NONE == ((const XFillStyleItem&)pBackgroundFillSet->Get(XATTR_FILLSTYLE)).GetValue())
+    {
+        SdrPage *pOwnerPage = GetPage();
+        if (pOwnerPage)
+        {
+            pBackgroundFillSet = &pOwnerPage->getSdrPageProperties().GetItemSet();
+
+            if (XFILL_NONE == ((const XFillStyleItem&)pBackgroundFillSet->Get(XATTR_FILLSTYLE)).GetValue())
+            {
+                if (!pOwnerPage->IsMasterPage() && pOwnerPage->TRG_HasMasterPage())
+                {
+                    pBackgroundFillSet = &pOwnerPage->TRG_GetMasterPage().getSdrPageProperties().GetItemSet();
+                }
+            }
+        }
+    }
+
+    if (XFILL_NONE != ((const XFillStyleItem&)pBackgroundFillSet->Get(XATTR_FILLSTYLE)).GetValue())
+    {
+        Color aColor(rOutliner.GetBackgroundColor());
+        GetDraftFillColor(*pBackgroundFillSet, aColor);
+        rOutliner.SetBackgroundColor(aColor);
+    }
+
     // add one to rage sizes to get back to the old Rectangle and outliner measurements
     const sal_uInt32 nAnchorTextWidth(FRound(aAnchorTextRange.getWidth() + 1L));
     const sal_uInt32 nAnchorTextHeight(FRound(aAnchorTextRange.getHeight() + 1L));
@@ -1058,6 +1090,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
     aConverter.decomposeBlockTextPrimitive(aNewTransformA, aNewTransformB, aClipRange);
 
     // cleanup outliner
+    rOutliner.SetBackgroundColor(aOriginalBackColor);
     rOutliner.Clear();
     rOutliner.setVisualizedPage(0);
 
commit e068dfc6fb42a8017afdb9347692c9fdcd3fdf1a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 10 15:12:20 2014 +0000

    stray FOO
    
    Change-Id: I3185356d9c61f730c613b5a4b7e62d510bc0424e

diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 3064bca..f3486ac 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -591,7 +591,6 @@ SvxSecurityTabPage::SvxSecurityTabPage(Window* pParent, const SfxItemSet& rSet)
     Size aSize(m_pSavePasswordsCB->CalcMinimumSize(56*approximate_char_width()));
     if (aPrefSize.Width() > aSize.Width())
     {
-        fprintf(stderr, "FOO\n");
         m_pSavePasswordsCB->set_width_request(aSize.Width());
         m_pSavePasswordsCB->set_height_request(aSize.Height());
     }


More information about the Libreoffice-commits mailing list