[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source

Katarina Behrens (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 26 01:45:55 UTC 2021


 svx/source/tbxctrls/fillctrl.cxx |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 36baacbf86f81de457af40a4a91b294136bf8ddc
Author:     Katarina Behrens <bubli at bubli.org>
AuthorDate: Wed Aug 18 22:21:41 2021 +0200
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Thu Aug 26 03:45:19 2021 +0200

    tdf#143567: Distinguish bitmap vs. pattern fill style
    
    By the time fill style state change (SID_ATTR_FILL_STYLE) happens,
    the actual bitmap fill may or may not be known. If it is not known,
    it is impossible to tell whether it is a regular bitmap or
    a pattern. That's why this toolbar sometimes incorrectly reports
    bitmap fill instead of pattern one
    
    To solve the problem, we adjust fill style listbox selection only
    later, by the time we know for sure the fill IS a pattern
    
    Change-Id: I0aa95c49601d77dca29ab54ad4c056a76a90e049
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120687
    Tested-by: Jenkins
    Reviewed-by: Katarina Behrens <bubli at bubli.org>
    (cherry picked from commit 1b06e7e9e8c467de3450077fe8b90be6b7f73e4b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120991
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index ed86f9f3bda1..948a89f6d3d2 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -142,13 +142,6 @@ void SvxFillToolBoxControl::StateChanged(
                     mpLbFillType->set_sensitive(true);
                     drawing::FillStyle eXFS = mpStyleItem->GetValue();
                     mnLastXFS = sal::static_int_cast< sal_Int32 >(eXFS);
-
-                    if (eXFS == drawing::FillStyle_BITMAP &&
-                        mpBitmapItem && mpBitmapItem->isPattern() )
-                    {
-                        mnLastXFS = sal::static_int_cast<sal_Int32>(PATTERN);
-                    }
-
                     mpLbFillType->set_active(mnLastXFS);
 
                     if(drawing::FillStyle_NONE == eXFS)
@@ -555,6 +548,9 @@ void SvxFillToolBoxControl::Update()
                 }
                 else if (mpBitmapItem && mpBitmapItem->isPattern() && pSh->GetItem(SID_PATTERN_LIST))
                 {
+                    mnLastXFS = sal::static_int_cast<sal_Int32>(PATTERN);
+                    mpLbFillType->set_active(mnLastXFS);
+
                     SvxFillAttrBox::Fill(*mpLbFillAttr, pSh->GetItem(SID_PATTERN_LIST)->GetPatternList());
                     const OUString aString(mpBitmapItem->GetName());
 


More information about the Libreoffice-commits mailing list