diff options
Diffstat (limited to 'sc/source/core/data/drwlayer.cxx')
-rw-r--r-- | sc/source/core/data/drwlayer.cxx | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index c3f8edbbc265..80cac5616f33 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -283,6 +283,10 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const String& rName ) : if ( pHitOutlinerPool ) pHitOutlinerPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT )); // 12Pt + // initial undo mode as in Calc document + if( pDoc ) + EnableUndo( pDoc->IsUndoEnabled() ); + // URL-Buttons haben keinen Handler mehr, machen alles selber if( !nInst++ ) @@ -1119,6 +1123,15 @@ void ScDrawLayer::HeightChanged( SCTAB nTab, SCROW nRow, long nDifTwips ) if (!bAdjustEnabled) return; + SdrPage* pPage = GetPage(static_cast<sal_uInt16>(nTab)); + DBG_ASSERT(pPage,"Page not found"); + if (!pPage) + return; + + // for an empty page, there's no need to calculate the row heights + if (!pPage->GetObjCount()) + return; + Rectangle aRect; Point aTopLeft; @@ -1148,6 +1161,15 @@ sal_Bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndR if ( !pDoc ) return sal_False; + SdrPage* pPage = GetPage(static_cast<sal_uInt16>(nTab)); + DBG_ASSERT(pPage,"Page not found"); + if (!pPage) + return sal_False; + + // for an empty page, there's no need to calculate the row heights + if (!pPage->GetObjCount()) + return sal_False; + Rectangle aTestRect; aTestRect.Top() += pDoc->GetRowHeight( 0, nStartRow-1, nTab); @@ -1170,11 +1192,6 @@ sal_Bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndR if ( bNegativePage ) MirrorRectRTL( aTestRect ); - SdrPage* pPage = GetPage(static_cast<sal_uInt16>(nTab)); - DBG_ASSERT(pPage,"Page nicht gefunden"); - if (!pPage) - return sal_False; - sal_Bool bFound = sal_False; Rectangle aObjRect; |