diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-09-25 20:08:53 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-09-26 08:18:22 +0200 |
commit | d5a43da338e4afe3630a072351516e39865a1f2f (patch) | |
tree | ef46f25f1d839abcc40f0ff24210533f4178aac0 /cui/source | |
parent | 3575abbab1994aa1e0ccd8774a7d7fafb22d79e0 (diff) |
tdf#148959 cui: fix hiding semi-transparent UI for chart axis font
Regression from commit b4554b8eddd048532269df610e89ae739c46fab7 (cui:
add UI for semi-transparent shape text, 2019-11-22), the trouble was
that even if semi-transparent text UI is meant to be opt in, we enabled
it by accident also for charts.
This happens because I assumed that we always get a SID_FLAG_TYPE, and
then we can hide the not wanted UI in case SVX_ENABLE_CHAR_TRANSPARENCY
is not in the flags, but even SID_FLAG_TYPE can be missing.
Fix the problem by assuming that in case SID_FLAG_TYPE is not provided,
that means no flags.
An alternative would be to actually add support for semi-transparent
text in chart2/, which is doable, but
chart::wrapper::ItemConverter::ApplyItemSet() assumes that each pool
item can be mapped to exactly one UNO property, which is not the case
for SvxColorItem (it would have to map to CharColor and
CharTransparence), so don't do that yet.
Change-Id: I825ca56b2e03d48c8acff93e1deadf8f86b0dcb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157258
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 3245f516338c..56eb92e9b172 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -2389,10 +2389,7 @@ void SvxCharEffectsPage::PageCreated(const SfxAllItemSet& aSet) if (pDisableCtlItem) DisableControls(pDisableCtlItem->GetValue()); - if (!pFlagItem) - return; - - sal_uInt32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags = pFlagItem ? pFlagItem->GetValue() : 0; if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) // the writer uses SID_ATTR_BRUSH as font background m_bPreviewBackgroundToCharacter = true; |