summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-08-31 16:19:13 +0200
committerRegina Henschel <rb.henschel@t-online.de>2023-09-01 14:24:45 +0200
commit85aa230aebfe383eecdb4fc6704d093db8a18402 (patch)
treeee0f6866b89586db2cac0a1a9a483807c90aaa1a /svx/source/tbxctrls
parent151a43f3d00f6523079c53d6c2d064f80b9a55d6 (diff)
tdf#157034: FILESAVE loext:theme-type is off by one
nItemId begins with 1 but list of themes begin with 0 so decrement nItemId part of bt here: https://bugs.documentfoundation.org/show_bug.cgi?id=157034#c1 + adapt QA tests Change-Id: I7913ea0f71abb9ff98039a9c45a49fdb8f709ae0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156350 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r--svx/source/tbxctrls/PaletteManager.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index 9b8f144f66b0..234002006a5e 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -161,7 +161,11 @@ bool PaletteManager::IsThemePaletteSelected() const
bool PaletteManager::GetThemeAndEffectIndex(sal_uInt16 nItemId, sal_uInt16& rThemeIndex, sal_uInt16& rEffectIndex)
{
- // Each column is the same color with different effects.
+ // tdf#157034, nItemId begins with 1 but list of themes begin with 0
+ // so decrement nItemId
+ --nItemId;
+
+ // Each column is the same color with different effects.
rThemeIndex = nItemId % 12;
rEffectIndex = nItemId / 12;