summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba/vbarange.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/vba/vbarange.cxx')
-rw-r--r--sc/source/ui/vba/vbarange.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 0c0e5f256e02..fb72699ea98b 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1477,6 +1477,11 @@ uno::Reference< XCollection >& ScVbaRange::getBorders()
void
ScVbaRange::visitArray( ArrayVisitor& visitor )
{
+ ScDocShell* pDocSh = nullptr;
+ if(ScCellRangeObj* range = dynamic_cast<ScCellRangeObj*>(mxRange.get()))
+ pDocSh = range->GetDocShell();
+ if ( pDocSh )
+ pDocSh->LockPaint();
table::CellRangeAddress aRangeAddr = lclGetRangeAddress( mxRange );
sal_Int32 nRowCount = aRangeAddr.EndRow - aRangeAddr.StartRow + 1;
sal_Int32 nColCount = aRangeAddr.EndColumn - aRangeAddr.StartColumn + 1;
@@ -1489,6 +1494,8 @@ ScVbaRange::visitArray( ArrayVisitor& visitor )
visitor.visitNode( i, j, xCell );
}
}
+ if ( pDocSh )
+ pDocSh->UnlockPaint();
}
uno::Any