summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-05-17 14:40:39 +0200
committerEike Rathke <erack@redhat.com>2018-05-18 00:07:42 +0200
commit8c07193cec5e09d50b20bc5b107da02a7d8f05a5 (patch)
tree052c47028070b60faa7efe7f48166a4da4a117fc
parent646e9564007b13bd841d28e7c02c060d2f96fb39 (diff)
Related: tdf#117093 place assert on SanitizeWhichActive() results
Trying to chase the culprit. Change-Id: Iec5e6b3b38b4c0e7cd224cc861d4303a1eb04c4c Reviewed-on: https://gerrit.libreoffice.org/54491 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r--sc/source/ui/view/viewdata.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 5810514c2b69..69fce5476d8f 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -495,6 +495,9 @@ void ScViewDataTable::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>
// don't apply SanitizeWhichActive() when reading the settings.
// See tdf#117093
const ScSplitPos eActiveSplitRange = SanitizeWhichActive();
+ // And point out to give us a chance to inspect weird things (if anyone
+ // remembers what s/he did).
+ assert(eWhichActive == eActiveSplitRange);
pSettings[SC_ACTIVE_SPLIT_RANGE].Name = SC_ACTIVESPLITRANGE;
pSettings[SC_ACTIVE_SPLIT_RANGE].Value <<= sal_Int16(eActiveSplitRange);
pSettings[SC_POSITION_LEFT].Name = SC_POSITIONLEFT;
@@ -2086,6 +2089,12 @@ ScPositionHelper* ScViewData::GetLOKHeightHelper(SCTAB nTabIndex)
void ScViewData::SetActivePart( ScSplitPos eNewActive )
{
pThisTab->eWhichActive = eNewActive;
+
+ // Let's hope we find the culprit for tdf#117093
+ // Don't sanitize the real value (yet?) because this function might be
+ // called before setting the then corresponding split modes. For which in
+ // fact then the order should be changed.
+ assert(eNewActive == pThisTab->SanitizeWhichActive());
}
Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScHSplitPos eWhich ) const