[Libreoffice-commits] core.git: sc/source
Caolán McNamara
caolanm at redhat.com
Fri Apr 10 13:06:18 PDT 2015
sc/source/ui/view/viewdata.cxx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit df0ea8662539563a15338f5840b936e475f7e531
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Apr 10 21:04:43 2015 +0100
fix crash on exporting ooo23919-1.sxw to odt
Change-Id: I3a249d1ee4a49dfc66d7d6052803b0896ae42d39
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index fb375a5..f2239a0 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1513,7 +1513,8 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
}
sal_uInt16 nTSize;
- bool bIsTiledRendering = GetDocument()->GetDrawLayer()->isTiledRendering();
+ ScDrawLayer* pModel = GetDocument()->GetDrawLayer();
+ bool bIsTiledRendering = pModel && pModel->isTiledRendering();
SCCOL nPosX = GetPosX(eWhichX);
SCCOL nX;
@@ -1866,7 +1867,9 @@ void ScViewData::GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich,
void ScViewData::SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX )
{
// in the tiled rendering case, nPosX [the leftmost visible column] must be 0
- if (nNewPosX != 0 && !GetDocument()->GetDrawLayer()->isTiledRendering())
+ ScDrawLayer* pModel = GetDocument()->GetDrawLayer();
+ bool bIsTiledRendering = pModel && pModel->isTiledRendering();
+ if (nNewPosX != 0 && !bIsTiledRendering)
{
SCCOL nOldPosX = pThisTab->nPosX[eWhich];
long nTPosX = pThisTab->nTPosX[eWhich];
@@ -1904,7 +1907,9 @@ void ScViewData::SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX )
void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
{
// in the tiled rendering case, nPosY [the topmost visible row] must be 0
- if (nNewPosY != 0 && !GetDocument()->GetDrawLayer()->isTiledRendering())
+ ScDrawLayer* pModel = GetDocument()->GetDrawLayer();
+ bool bIsTiledRendering = pModel && pModel->isTiledRendering();
+ if (nNewPosY != 0 && !bIsTiledRendering)
{
SCROW nOldPosY = pThisTab->nPosY[eWhich];
long nTPosY = pThisTab->nTPosY[eWhich];
More information about the Libreoffice-commits
mailing list