summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-08-31 16:19:13 +0200
committerTomaž Vajngerl <quikee@gmail.com>2023-09-04 19:51:06 +0200
commita70b613e6b5d95362f34f57df5cda22a74cb670e (patch)
tree66d3cc32e9d0db382e0a1ffc580abb3c83597f7d /svx
parent38192482e552195a5c76a6e40fc3586cc6f0355c (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> (cherry picked from commit 85aa230aebfe383eecdb4fc6704d093db8a18402) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156389 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx')
-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 9fcefd34d1c8..343448c8e788 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;