Kaydet (Commit) df0ea866 authored tarafından Caolán McNamara's avatar Caolán McNamara

fix crash on exporting ooo23919-1.sxw to odt

Change-Id: I3a249d1ee4a49dfc66d7d6052803b0896ae42d39
üst ea407fd6
...@@ -1513,7 +1513,8 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, ...@@ -1513,7 +1513,8 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
} }
sal_uInt16 nTSize; sal_uInt16 nTSize;
bool bIsTiledRendering = GetDocument()->GetDrawLayer()->isTiledRendering(); ScDrawLayer* pModel = GetDocument()->GetDrawLayer();
bool bIsTiledRendering = pModel && pModel->isTiledRendering();
SCCOL nPosX = GetPosX(eWhichX); SCCOL nPosX = GetPosX(eWhichX);
SCCOL nX; SCCOL nX;
...@@ -1866,7 +1867,9 @@ void ScViewData::GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich, ...@@ -1866,7 +1867,9 @@ void ScViewData::GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich,
void ScViewData::SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX ) void ScViewData::SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX )
{ {
// in the tiled rendering case, nPosX [the leftmost visible column] must be 0 // 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]; SCCOL nOldPosX = pThisTab->nPosX[eWhich];
long nTPosX = pThisTab->nTPosX[eWhich]; long nTPosX = pThisTab->nTPosX[eWhich];
...@@ -1904,7 +1907,9 @@ void ScViewData::SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX ) ...@@ -1904,7 +1907,9 @@ void ScViewData::SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX )
void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY ) void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
{ {
// in the tiled rendering case, nPosY [the topmost visible row] must be 0 // 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]; SCROW nOldPosY = pThisTab->nPosY[eWhich];
long nTPosY = pThisTab->nTPosY[eWhich]; long nTPosY = pThisTab->nTPosY[eWhich];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment