diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:29:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:29:03 +0000 |
commit | 5a7157d319477830426797532e02ac39d3b859f4 (patch) | |
tree | 3773f5ce209bee14a5643e98672e0f3828c71434 /sw/source/core/doc/docfmt.cxx | |
parent | Releasing progress-linux version 4:24.2.0-3~progress7.99u1. (diff) | |
download | libreoffice-5a7157d319477830426797532e02ac39d3b859f4.tar.xz libreoffice-5a7157d319477830426797532e02ac39d3b859f4.zip |
Merging upstream version 4:24.2.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/source/core/doc/docfmt.cxx')
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 57c42c529e..d6c943dbcd 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -25,10 +25,10 @@ #include <editeng/lrspitem.hxx> #include <editeng/formatbreakitem.hxx> #include <editeng/rsiditem.hxx> -#include <editeng/colritem.hxx> #include <officecfg/Office/Common.hxx> #include <osl/diagnose.h> #include <svl/zforlist.hxx> +#include <svx/DocumentColorHelper.hxx> #include <comphelper/processfactory.hxx> #include <unotools/configmgr.hxx> #include <sal/log.hxx> @@ -2036,17 +2036,11 @@ std::set<Color> SwDoc::GetDocColors() { std::set<Color> aDocColors; SwAttrPool& rPool = GetAttrPool(); - const sal_uInt16 pAttribs[] = {RES_CHRATR_COLOR, RES_CHRATR_HIGHLIGHT, RES_BACKGROUND}; - for (sal_uInt16 nAttrib : pAttribs) - { - for (const SfxPoolItem* pItem : rPool.GetItemSurrogates(nAttrib)) - { - auto pColorItem = static_cast<const SvxColorItem*>(pItem); - Color aColor( pColorItem->GetValue() ); - if (COL_AUTO != aColor) - aDocColors.insert(aColor); - } - } + + svx::DocumentColorHelper::queryColors<SvxColorItem>(RES_CHRATR_COLOR, &rPool, aDocColors); + svx::DocumentColorHelper::queryColors<SvxBrushItem>(RES_CHRATR_HIGHLIGHT, &rPool, aDocColors); + svx::DocumentColorHelper::queryColors<SvxBrushItem>(RES_CHRATR_BACKGROUND, &rPool, aDocColors); + return aDocColors; } |