[Libreoffice-commits] core.git: sc/source
Mike Kaganski
mike.kaganski at collabora.com
Sat Jun 30 17:05:48 UTC 2018
sc/source/ui/vba/vbaapplication.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 01f712b6db1fab72abfe46ee6c3868f8b3cd035c
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date: Sat Jun 30 17:34:07 2018 +0200
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 at collabora.com>
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();
}
More information about the Libreoffice-commits
mailing list