summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-06-30 17:34:07 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2018-06-30 19:05:27 +0200
commit01f712b6db1fab72abfe46ee6c3868f8b3cd035c (patch)
treed29b9aa5efd1dd623ad8f33d473971fa6352824d
parentac7141d750447335787829e26271c0490e55826c (diff)
Avoid assertion on user data
User can have unpaired ScreenUpdating in macros; so avoid calling ScDocument::UnlockAdjustHeight, which asserts proper lock/unlock order and number, when it is not locked. Change-Id: I1c316ff4a5b993cbe08a9e95f5807153ed0953c8 Reviewed-on: https://gerrit.libreoffice.org/56763 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 4a397826eaf7..4a67e290e7a1 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1398,7 +1398,10 @@ void SAL_CALL ScVbaApplication::setScreenUpdating(sal_Bool bUpdate)
if( bUpdate )
{
- rDoc.UnlockAdjustHeight();
+ // Since setting ScreenUpdating from user code might be unpaired, avoid calling function,
+ // that asserts correct lock/unlock order and number, when not locked.
+ if(rDoc.IsAdjustHeightLocked())
+ rDoc.UnlockAdjustHeight();
if( !rDoc.IsAdjustHeightLocked() )
pDocShell->UpdateAllRowHeights();
}