[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Thu May 17 22:08:09 UTC 2018


 sc/source/ui/view/viewdata.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 8c07193cec5e09d50b20bc5b107da02a7d8f05a5
Author: Eike Rathke <erack at redhat.com>
Date:   Thu May 17 14:40:39 2018 +0200

    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 at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>

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


More information about the Libreoffice-commits mailing list