summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-11-19 11:27:53 +0100
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2024-11-21 08:47:45 +0100
commitae2009b9cc4a1097b1583b70a965d8f3ede5e713 (patch)
tree35befea23a445dbf2b63c76cf8f1fbadf4c38367
parent664ecbd8916478cdc28a9c793fbdb9359b3cac64 (diff)
tdf#163486: PVS: variable is assigned values twice successively
Since commit d0cacf09a1105d89bf3df84b18623d790e3aeb82 Author: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Date: Wed Apr 27 11:45:04 2022 +0200 tdf#99708 Save formula bar height to document V519 The 'pSettings[14].Name' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3806, 3816. Change-Id: I7afcee42d10d692c2c9a84b6a6f0a97ceb913081 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176761 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Tested-by: Jenkins
-rw-r--r--sc/inc/ViewSettingsSequenceDefines.hxx5
-rw-r--r--sc/source/ui/view/viewdata.cxx4
2 files changed, 4 insertions, 5 deletions
diff --git a/sc/inc/ViewSettingsSequenceDefines.hxx b/sc/inc/ViewSettingsSequenceDefines.hxx
index 1cb2b59eb9fc..42bdac0e2df2 100644
--- a/sc/inc/ViewSettingsSequenceDefines.hxx
+++ b/sc/inc/ViewSettingsSequenceDefines.hxx
@@ -57,7 +57,7 @@
// this are the defines for the position of the settings in the
// TableViewSettingsSequence
-#define SC_TABLE_VIEWSETTINGS_COUNT 16
+#define SC_TABLE_VIEWSETTINGS_COUNT 15
#define SC_CURSOR_X 0
#define SC_CURSOR_Y 1
@@ -73,8 +73,7 @@
#define SC_TABLE_ZOOM_TYPE 11
#define SC_TABLE_ZOOM_VALUE 12
#define SC_TABLE_PAGE_VIEW_ZOOM_VALUE 13
-#define SC_FORMULA_BAR_HEIGHT_VALUE 14
-#define SC_TABLE_SHOWGRID 15
+#define SC_TABLE_SHOWGRID 14
inline constexpr OUString SC_CURSORPOSITIONX = u"CursorPositionX"_ustr;
inline constexpr OUString SC_CURSORPOSITIONY = u"CursorPositionY"_ustr;
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 34ba5cee8197..0917ed676773 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -3813,8 +3813,8 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe
pSettings[SC_OUTLSYMB].Value <<= maOptions.GetOption(VOPT_OUTLINER);
pSettings[SC_VALUE_HIGHLIGHTING].Name = SC_UNO_VALUEHIGH;
pSettings[SC_VALUE_HIGHLIGHTING].Value <<= maOptions.GetOption(VOPT_SYNTAX);
- pSettings[SC_FORMULA_BAR_HEIGHT_VALUE].Name = SC_FORMULABARHEIGHT;
- pSettings[SC_FORMULA_BAR_HEIGHT_VALUE].Value <<= GetFormulaBarLines();;
+ pSettings[SC_FORMULA_BAR_HEIGHT].Name = SC_FORMULABARHEIGHT;
+ pSettings[SC_FORMULA_BAR_HEIGHT].Value <<= GetFormulaBarLines();;
const ScGridOptions& aGridOpt = maOptions.GetGridOptions();
pSettings[SC_SNAPTORASTER].Name = SC_UNO_SNAPTORASTER;