diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-10-09 18:10:50 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-10-16 10:11:38 +0200 |
commit | b12b1663d135f94eb56f3c1f852ef008e87c4e5f (patch) | |
tree | 4518978b35ad56c4f1c2884c2c298de6830bb760 /svx/source | |
parent | a559ddd37b09a35f26a291f1a0f94608309a7d99 (diff) |
try to prefetch also graphics for background fill bitmap
Change-Id: Ib6be487500e45ab984b7ca63d85352696d9d4051
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104132
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 499585c7f5f5..1650ffa71fab 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -30,6 +30,7 @@ #include <svx/sdtaiitm.hxx> #include <svx/sdtaaitm.hxx> #include <svx/xfillit0.hxx> +#include <svx/xbtmpit.hxx> #include <basegfx/vector/b2dvector.hxx> #include <sdr/primitive2d/sdrtextprimitive2d.hxx> #include <drawinglayer/primitive2d/textprimitive2d.hxx> @@ -861,6 +862,17 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive( // is one. Check the shape itself, then the host page, then that page's master page. void SdrObject::setSuitableOutlinerBg(::Outliner& rOutliner) const { + const SfxItemSet* pBackgroundFillSet = getBackgroundFillSet(); + if (drawing::FillStyle_NONE != pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue()) + { + Color aColor(rOutliner.GetBackgroundColor()); + GetDraftFillColor(*pBackgroundFillSet, aColor); + rOutliner.SetBackgroundColor(aColor); + } +} + +const SfxItemSet* SdrObject::getBackgroundFillSet() const +{ const SfxItemSet* pBackgroundFillSet = &GetObjectItemSet(); if (drawing::FillStyle_NONE == pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue()) @@ -879,13 +891,17 @@ void SdrObject::setSuitableOutlinerBg(::Outliner& rOutliner) const } } } + return pBackgroundFillSet; +} - if (drawing::FillStyle_NONE != pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue()) - { - Color aColor(rOutliner.GetBackgroundColor()); - GetDraftFillColor(*pBackgroundFillSet, aColor); - rOutliner.SetBackgroundColor(aColor); - } +const Graphic* SdrObject::getFillGraphic() const +{ + if(IsGroupObject()) // Doesn't make sense, and GetObjectItemSet() asserts. + return nullptr; + const SfxItemSet* pBackgroundFillSet = getBackgroundFillSet(); + if (drawing::FillStyle_BITMAP != pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue()) + return nullptr; + return &pBackgroundFillSet->Get(XATTR_FILLBITMAP).GetGraphicObject().GetGraphic(); } void SdrTextObj::impDecomposeBlockTextPrimitive( |