path: root/sc/source/ui/inc/viewdata.hxx
diff options
authorEike Rathke <>2018-05-17 14:07:16 +0200
committerCaolán McNamara <>2018-05-18 09:54:33 +0200
commit3de630074d69517d97c4dc874ad74203d7699e88 (patch)
treeb3c785513eee22c26fcb7cc1db677c24fa8ad304 /sc/source/ui/inc/viewdata.hxx
parent8ddb3ca84b66050c394140fa4f7290e3607d84f5 (diff)
Resolves: tdf#117093 sanitize the active grid window value
Don't know yet how that could had happened, but the sample document has a bad ActiveSplitRange value that doesn't match HorizontalSplitMode and VerticalSplitMode. * sanitize the value when reading view settings * prevent writing such value to help versions that don't sanitize Change-Id: I1b450c7b8102148a24d545ff7568f725d7492a6a (cherry picked from commit 646e9564007b13bd841d28e7c02c060d2f96fb39) Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
Diffstat (limited to 'sc/source/ui/inc/viewdata.hxx')
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 889df879a665..5292f06e8152 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -200,6 +200,18 @@ private:
void ReadUserDataSequence(
const css::uno::Sequence <css::beans::PropertyValue>& rSettings,
ScViewData& rViewData, SCTAB nTab, bool& rHasZoom);
+ /** Sanitize the active split range value to not point into a grid window
+ that would never be initialized due to non-matching split modes.
+ This is to be done when reading settings from file formats or
+ configurations that could have arbitrary values. The caller is
+ reponsible for actually assigning the new value to eWhichActive because
+ we want this function to be const to be able to call the check from
+ anywhere.
+ */
+ SAL_WARN_UNUSED_RESULT ScSplitPos SanitizeWhichActive() const;