summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-09-05 15:01:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-20 19:20:54 +0200
commite1972743d692c8d8611912c31aae2cb08ae7636d (patch)
tree65817acedf6f17ab8af8df33b2f7abe80fe363d7
parenteb830ad284f245165b6ab5e8647d48834622f2d5 (diff)
be more disciplined with SetUpdateLayout on editengine
save/restore in more places, and check in more places before doing layout, so we dont waste time on expensive layout Change-Id: I311f1f7f97a508da296078e936cb3704938dfdc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--editeng/source/editeng/editeng.cxx20
-rw-r--r--editeng/source/editeng/editundo.cxx6
-rw-r--r--editeng/source/editeng/editview.cxx24
-rw-r--r--editeng/source/editeng/impedit2.cxx10
-rw-r--r--editeng/source/editeng/impedit4.cxx8
-rw-r--r--editeng/source/editeng/impedit5.cxx9
-rw-r--r--editeng/source/outliner/outlvw.cxx8
-rw-r--r--sc/source/core/data/column2.cxx4
-rw-r--r--sc/source/ui/app/inputwin.cxx4
-rw-r--r--sc/source/ui/view/output2.cxx4
-rw-r--r--sd/source/ui/view/Outliner.cxx2
-rw-r--r--sd/source/ui/view/outlview.cxx4
-rw-r--r--svx/source/svdraw/svdedxv.cxx4
13 files changed, 64 insertions, 43 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index e9f19cbd3194..d22c74ade973 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1637,7 +1637,8 @@ void EditEngine::RemoveParagraph( sal_Int32 nPara )
pImpEditEngine->ImpRemoveParagraph( nPara );
pImpEditEngine->InvalidateFromParagraph( nPara );
pImpEditEngine->UpdateSelections();
- pImpEditEngine->FormatAndLayout();
+ if (pImpEditEngine->IsUpdateLayout())
+ pImpEditEngine->FormatAndLayout();
}
}
@@ -1712,7 +1713,8 @@ void EditEngine::InsertParagraph( sal_Int32 nPara, const EditTextObject& rTxtObj
pImpEditEngine->UndoActionEnd();
- pImpEditEngine->FormatAndLayout();
+ if (pImpEditEngine->IsUpdateLayout())
+ pImpEditEngine->FormatAndLayout();
}
void EditEngine::InsertParagraph(sal_Int32 nPara, const OUString& rTxt)
@@ -1730,7 +1732,8 @@ void EditEngine::InsertParagraph(sal_Int32 nPara, const OUString& rTxt)
pImpEditEngine->RemoveCharAttribs( nPara );
pImpEditEngine->UndoActionEnd();
pImpEditEngine->ImpInsertText( EditSelection( aPaM, aPaM ), rTxt );
- pImpEditEngine->FormatAndLayout();
+ if (pImpEditEngine->IsUpdateLayout())
+ pImpEditEngine->FormatAndLayout();
}
void EditEngine::SetText(sal_Int32 nPara, const OUString& rTxt)
@@ -1741,7 +1744,8 @@ void EditEngine::SetText(sal_Int32 nPara, const OUString& rTxt)
pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
pImpEditEngine->ImpInsertText( *pSel, rTxt );
pImpEditEngine->UndoActionEnd();
- pImpEditEngine->FormatAndLayout();
+ if (pImpEditEngine->IsUpdateLayout())
+ pImpEditEngine->FormatAndLayout();
}
}
@@ -1773,7 +1777,8 @@ void EditEngine::SetCharAttribs(sal_Int32 nPara, const SfxItemSet& rSet)
// This is called by sd::View::OnBeginPasteOrDrop(), updating the cursor position on undo is not
// wanted.
pImpEditEngine->SetAttribs(aSel, rSet, /*nSpecial=*/SetAttribsMode::NONE, /*bSetSelection=*/false);
- pImpEditEngine->FormatAndLayout();
+ if (pImpEditEngine->IsUpdateLayout())
+ pImpEditEngine->FormatAndLayout();
}
void EditEngine::GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) const
@@ -1803,7 +1808,8 @@ void EditEngine::RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAt
EditSelection aSel( pImpEditEngine->ConvertSelection( rSelection.nStartPara, rSelection.nStartPos, rSelection.nEndPara, rSelection.nEndPos ) );
pImpEditEngine->RemoveCharAttribs( aSel, eMode, nWhich );
pImpEditEngine->UndoActionEnd();
- pImpEditEngine->FormatAndLayout();
+ if (pImpEditEngine->IsUpdateLayout())
+ pImpEditEngine->FormatAndLayout();
}
vcl::Font EditEngine::GetStandardFont( sal_Int32 nPara )
@@ -2327,7 +2333,7 @@ EFieldInfo EditEngine::GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const
bool EditEngine::UpdateFields()
{
bool bChanges = pImpEditEngine->UpdateFields();
- if ( bChanges )
+ if ( bChanges && pImpEditEngine->IsUpdateLayout())
pImpEditEngine->FormatAndLayout();
return bChanges;
}
diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx
index 8df80a629a1d..dc9c3a104b6c 100644
--- a/editeng/source/editeng/editundo.cxx
+++ b/editeng/source/editeng/editundo.cxx
@@ -75,7 +75,8 @@ bool EditUndoManager::Undo()
aNewSel.Min() = aNewSel.Max();
mpEditEngine->GetActiveView()->GetImpEditView()->SetEditSelection( aNewSel );
- mpEditEngine->FormatAndLayout( mpEditEngine->GetActiveView(), true );
+ if (mpEditEngine->IsUpdateLayout())
+ mpEditEngine->FormatAndLayout( mpEditEngine->GetActiveView(), true );
return bDone;
}
@@ -110,7 +111,8 @@ bool EditUndoManager::Redo()
aNewSel.Min() = aNewSel.Max();
mpEditEngine->GetActiveView()->GetImpEditView()->SetEditSelection( aNewSel );
- mpEditEngine->FormatAndLayout( mpEditEngine->GetActiveView() );
+ if (mpEditEngine->IsUpdateLayout())
+ mpEditEngine->FormatAndLayout( mpEditEngine->GetActiveView() );
return bDone;
}
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 59969fca90cb..8fc2b83523c4 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -555,7 +555,8 @@ void EditView::SetAttribs( const SfxItemSet& rSet )
pImpEditView->DrawSelectionXOR();
pImpEditView->pEditEngine->SetAttribs( pImpEditView->GetEditSelection(), rSet, SetAttribsMode::WholeWord );
- pImpEditView->pEditEngine->FormatAndLayout( this );
+ if (pImpEditView->pEditEngine->IsUpdateLayout())
+ pImpEditView->pEditEngine->FormatAndLayout( this );
}
void EditView::RemoveAttribsKeepLanguages( bool bRemoveParaAttribs )
@@ -575,7 +576,8 @@ void EditView::RemoveAttribsKeepLanguages( bool bRemoveParaAttribs )
}
pImpEditView->pEditEngine->UndoActionEnd();
- pImpEditView->pEditEngine->FormatAndLayout( this );
+ if (pImpEditView->pEditEngine->IsUpdateLayout())
+ pImpEditView->pEditEngine->FormatAndLayout( this );
}
void EditView::RemoveAttribs( bool bRemoveParaAttribs, sal_uInt16 nWhich )
@@ -590,7 +592,8 @@ void EditView::RemoveAttribs( EERemoveParaAttribsMode eMode, sal_uInt16 nWhich )
pImpEditView->pEditEngine->UndoActionStart( EDITUNDO_RESETATTRIBS );
pImpEditView->pEditEngine->RemoveCharAttribs( pImpEditView->GetEditSelection(), eMode, nWhich );
pImpEditView->pEditEngine->UndoActionEnd();
- pImpEditView->pEditEngine->FormatAndLayout( this );
+ if (pImpEditView->pEditEngine->IsUpdateLayout())
+ pImpEditView->pEditEngine->FormatAndLayout( this );
}
void EditView::RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich )
@@ -598,7 +601,8 @@ void EditView::RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich )
pImpEditView->pEditEngine->UndoActionStart( EDITUNDO_RESETATTRIBS );
pImpEditView->pEditEngine->RemoveCharAttribs( nPara, nWhich );
pImpEditView->pEditEngine->UndoActionEnd();
- pImpEditView->pEditEngine->FormatAndLayout( this );
+ if (pImpEditView->pEditEngine->IsUpdateLayout())
+ pImpEditView->pEditEngine->FormatAndLayout( this );
}
SfxItemSet EditView::GetAttribs()
@@ -749,7 +753,8 @@ void EditView::InsertText( const EditTextObject& rTextObject )
aTextSel.Min() = aTextSel.Max(); // Selection not retained.
pImpEditView->SetEditSelection( aTextSel );
- pImpEditView->pEditEngine->FormatAndLayout( this );
+ if (pImpEditView->pEditEngine->IsUpdateLayout())
+ pImpEditView->pEditEngine->FormatAndLayout( this );
}
void EditView::InsertText( css::uno::Reference< css::datatransfer::XTransferable > const & xDataObj, const OUString& rBaseURL, bool bUseSpecial )
@@ -762,7 +767,8 @@ void EditView::InsertText( css::uno::Reference< css::datatransfer::XTransferable
aTextSel.Min() = aTextSel.Max(); // Selection not retained.
pImpEditView->SetEditSelection( aTextSel );
- pImpEditView->pEditEngine->FormatAndLayout( this );
+ if (pImpEditView->pEditEngine->IsUpdateLayout())
+ pImpEditView->pEditEngine->FormatAndLayout( this );
}
bool EditView::SetEditEngineUpdateLayout( bool bUpdate )
@@ -1285,7 +1291,8 @@ void EditView::InsertParaBreak()
EditPaM aPaM(pImpEditView->pEditEngine->InsertParaBreak(pImpEditView->GetEditSelection()));
pImpEditView->pEditEngine->UndoActionEnd();
pImpEditView->SetEditSelection(EditSelection(aPaM, aPaM));
- pImpEditView->pEditEngine->FormatAndLayout(this);
+ if (pImpEditView->pEditEngine->IsUpdateLayout())
+ pImpEditView->pEditEngine->FormatAndLayout(this);
}
void EditView::InsertField( const SvxFieldItem& rFld )
@@ -1297,7 +1304,8 @@ void EditView::InsertField( const SvxFieldItem& rFld )
pEE->UndoActionEnd();
pImpEditView->SetEditSelection( EditSelection( aPaM, aPaM ) );
pEE->UpdateFields();
- pEE->FormatAndLayout( this );
+ if (pImpEditView->pEditEngine->IsUpdateLayout())
+ pEE->FormatAndLayout( this );
}
const SvxFieldItem* EditView::GetFieldUnderMousePointer() const
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 6d27b50dfd68..41985b874a85 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3066,7 +3066,7 @@ tools::Rectangle ImpEditEngine::GetEditCursor(const ParaPortion* pPortion, const
tools::Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, GetCursorFlags nFlags )
{
- OSL_ENSURE( IsUpdateLayout(), "Must not be reached when Update=FALSE: PaMtoEditCursor" );
+ assert( IsUpdateLayout() && "Must not be reached when Update=FALSE: PaMtoEditCursor" );
tools::Rectangle aEditCursor;
const sal_Int32 nIndex = aPaM.GetIndex();
@@ -3235,7 +3235,7 @@ ImpEditEngine::GetPortionAndLine(Point aDocPos)
EditPaM ImpEditEngine::GetPaM( Point aDocPos, bool bSmart )
{
- OSL_ENSURE( IsUpdateLayout(), "Must not be reached when Update=FALSE: GetPaM" );
+ assert( IsUpdateLayout() && "Must not be reached when Update=FALSE: GetPaM" );
if (const auto& [pPortion, pLine, nLineStartX] = GetPortionAndLine(aDocPos); pPortion)
{
@@ -3268,7 +3268,7 @@ bool ImpEditEngine::IsTextPos(const Point& rDocPos, sal_uInt16 nBorder)
sal_uInt32 ImpEditEngine::GetTextHeight() const
{
- OSL_ENSURE( IsUpdateLayout(), "Should not be used for Update=FALSE: GetTextHeight" );
+ assert( IsUpdateLayout() && "Should not be used for Update=FALSE: GetTextHeight" );
OSL_ENSURE( IsFormatted() || IsFormatting(), "GetTextHeight: Not formatted" );
return nCurTextHeight;
}
@@ -3402,7 +3402,7 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine,
sal_uInt32 ImpEditEngine::GetTextHeightNTP() const
{
- DBG_ASSERT( IsUpdateLayout(), "Should not be used for Update=FALSE: GetTextHeight" );
+ assert( IsUpdateLayout() && "Should not be used for Update=FALSE: GetTextHeight" );
DBG_ASSERT( IsFormatted() || IsFormatting(), "GetTextHeight: Not formatted" );
return nCurTextHeightNTP;
}
@@ -3432,7 +3432,7 @@ tools::Long ImpEditEngine::Calc1ColumnTextHeight(tools::Long* pHeightNTP)
tools::Long ImpEditEngine::CalcTextHeight(tools::Long* pHeightNTP)
{
- OSL_ENSURE( IsUpdateLayout(), "Should not be used when Update=FALSE: CalcTextHeight" );
+ assert( IsUpdateLayout() && "Should not be used when Update=FALSE: CalcTextHeight" );
if (mnColumns <= 1)
return Calc1ColumnTextHeight(pHeightNTP); // All text fits into a single column - done!
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 2336155b2dd7..879274a2a667 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -276,7 +276,7 @@ void ImpEditEngine::WriteXML(SvStream& rOutput, const EditSelection& rSel)
ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
{
- DBG_ASSERT( IsUpdateLayout(), "WriteRTF for UpdateMode = sal_False!" );
+ assert( IsUpdateLayout() && "WriteRTF for UpdateMode = sal_False!" );
CheckIdleFormatter();
if ( !IsFormatted() )
FormatDoc();
@@ -2168,7 +2168,8 @@ void ImpEditEngine::ApplyChangedSentence(EditView const & rEditView,
}
rEditView.pImpEditView->SetEditSelection( aNext );
- FormatAndLayout();
+ if (IsUpdateLayout())
+ FormatAndLayout();
aEditDoc.SetModified(true);
}
@@ -2954,7 +2955,8 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
SetModifyFlag( true );
if ( bLenChanged )
UpdateSelections();
- FormatAndLayout();
+ if (IsUpdateLayout())
+ FormatAndLayout();
}
return aNewSel;
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index 69eeae09f515..6a5842d61886 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -88,7 +88,8 @@ void ImpEditEngine::SetStyleSheet( sal_Int32 nPara, SfxStyleSheet* pStyle )
StartListening(*pStyle, DuplicateHandling::Prevent);
ParaAttribsChanged( pNode );
}
- FormatAndLayout();
+ if (IsUpdateLayout())
+ FormatAndLayout();
}
void ImpEditEngine::UpdateParagraphsWithStyleSheet( SfxStyleSheet* pStyle )
@@ -114,7 +115,8 @@ void ImpEditEngine::UpdateParagraphsWithStyleSheet( SfxStyleSheet* pStyle )
if ( bUsed )
{
GetEditEnginePtr()->StyleSheetChanged( pStyle );
- FormatAndLayout();
+ if (IsUpdateLayout())
+ FormatAndLayout();
}
}
@@ -129,7 +131,8 @@ void ImpEditEngine::RemoveStyleFromParagraphs( SfxStyleSheet const * pStyle )
ParaAttribsChanged( pNode );
}
}
- FormatAndLayout();
+ if (IsUpdateLayout())
+ FormatAndLayout();
}
void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 3e910db125aa..e607698d5efe 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -644,13 +644,13 @@ void OutlinerView::InsertText( const OutlinerParaObject& rParaObj )
pOwner->UndoActionStart( OLUNDO_INSERT );
- pOwner->pEditEngine->SetUpdateLayout( false );
+ const bool bPrevUpdateLayout = pOwner->pEditEngine->SetUpdateLayout( false );
sal_Int32 nStart, nParaCount;
nParaCount = pOwner->pEditEngine->GetParagraphCount();
sal_uInt16 nSize = ImpInitPaste( nStart );
pEditView->InsertText( rParaObj.GetTextObject() );
ImpPasted( nStart, nParaCount, nSize);
- pEditView->SetEditEngineUpdateLayout( true );
+ pEditView->SetEditEngineUpdateLayout( bPrevUpdateLayout );
pOwner->UndoActionEnd();
@@ -679,7 +679,7 @@ void OutlinerView::Paste( bool bUseSpecial )
pOwner->UndoActionStart( OLUNDO_INSERT );
- pOwner->pEditEngine->SetUpdateLayout( false );
+ const bool bPrevUpdateLayout = pOwner->pEditEngine->SetUpdateLayout( false );
pOwner->bPasting = true;
if ( bUseSpecial )
@@ -695,7 +695,7 @@ void OutlinerView::Paste( bool bUseSpecial )
pOwner->ImplSetLevelDependentStyleSheet( nPara );
}
- pEditView->SetEditEngineUpdateLayout( true );
+ pEditView->SetEditEngineUpdateLayout( bPrevUpdateLayout );
pOwner->UndoActionEnd();
pEditView->ShowCursor();
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 658a37b983d4..86460ac576cc 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -376,7 +376,7 @@ tools::Long ScColumn::GetNeededSize(
// save in document ?
std::unique_ptr<ScFieldEditEngine> pEngine = rDocument.CreateFieldEditEngine();
- pEngine->SetUpdateLayout( false );
+ const bool bPrevUpdateLayout = pEngine->SetUpdateLayout( false );
bool bTextWysiwyg = ( pDev->GetOutDevType() == OUTDEV_PRINTER );
EEControlBits nCtrl = pEngine->GetControlWord();
if ( bTextWysiwyg )
@@ -474,7 +474,7 @@ tools::Long ScColumn::GetNeededSize(
bool bEngineVertical = pEngine->IsEffectivelyVertical();
pEngine->SetVertical( bAsianVertical );
- pEngine->SetUpdateLayout( true );
+ pEngine->SetUpdateLayout( bPrevUpdateLayout );
bool bEdWidth = bWidth;
if ( eOrient != SvxCellOrientation::Standard && eOrient != SvxCellOrientation::Stacked )
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index e7c61fa0dfdc..7296eb15a5cd 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2041,7 +2041,7 @@ void ScTextWnd::MakeDialogEditView()
pNew->SetExecuteURL( false );
m_xEditEngine = std::move(pNew);
- m_xEditEngine->SetUpdateLayout( false );
+ const bool bPrevUpdateLayout = m_xEditEngine->SetUpdateLayout( false );
m_xEditEngine->SetWordDelimiters( m_xEditEngine->GetWordDelimiters() + "=" );
m_xEditEngine->SetPaperSize( Size( bIsRTL ? USHRT_MAX : THESIZE, 300 ) );
@@ -2051,7 +2051,7 @@ void ScTextWnd::MakeDialogEditView()
if ( bIsRTL )
lcl_ModifyRTLDefaults( *pSet );
static_cast<ScEditEngineDefaulter*>(m_xEditEngine.get())->SetDefaults( std::move(pSet) );
- m_xEditEngine->SetUpdateLayout( true );
+ m_xEditEngine->SetUpdateLayout( bPrevUpdateLayout );
m_xEditView = std::make_unique<EditView>(m_xEditEngine.get(), nullptr);
m_xEditView->setEditViewCallbacks(this);
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index c1ac4fa31242..f33098bbb353 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2716,9 +2716,9 @@ bool ScOutputData::DrawEditParam::adjustHorAlignment(ScFieldEditEngine* pEngine)
SvxAdjust eEditAdjust = (meHorJustResult == SvxCellHorJustify::Center) ?
SvxAdjust::Center : SvxAdjust::Right;
- pEngine->SetUpdateLayout(false);
+ const bool bPrevUpdateLayout = pEngine->SetUpdateLayout(false);
pEngine->SetDefaultItem( SvxAdjustItem(eEditAdjust, EE_PARA_JUST) );
- pEngine->SetUpdateLayout(true);
+ pEngine->SetUpdateLayout(bPrevUpdateLayout);
return true;
}
return false;
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index de86a8695605..0ebe41c8e630 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1639,10 +1639,10 @@ void SdOutliner::EnterEditMode (bool bGrabFocus)
mpSearchSpellTextObj->setActiveText(mnText);
// Turn on the edit mode for the text object.
+ SetUpdateLayout(true);
mpView->SdrBeginTextEdit(mpSearchSpellTextObj, pPV, mpWindow, true, this,
pOutlinerView, true, true, bGrabFocus);
- SetUpdateLayout(true);
mbFoundObject = true;
}
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 13501f4f6553..4a4bb45f1f1b 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -1003,7 +1003,7 @@ void OutlineView::FillOutliner()
mrOutliner.GetUndoManager().Clear();
mrOutliner.EnableUndo(false);
ResetLinks();
- mrOutliner.SetUpdateLayout(false);
+ const bool bPrevUpdateLayout = mrOutliner.SetUpdateLayout(false);
Paragraph* pTitleToSelect = nullptr;
sal_uInt16 nPageCount = mrDoc.GetSdPageCount(PageKind::Standard);
@@ -1098,7 +1098,7 @@ void OutlineView::FillOutliner()
mrOutliner.EnableUndo(true);
- mrOutliner.SetUpdateLayout(true);
+ mrOutliner.SetUpdateLayout(bPrevUpdateLayout);
}
/**
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 45ac84a3c49b..d71c48027232 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -290,7 +290,7 @@ void SdrObjEditView::ModelHasChanged()
{
aTextEditArea = aEditArea1;
aMinTextEditArea = aMinArea1;
- pTextEditOutliner->SetUpdateLayout(false);
+ const bool bPrevUpdateLayout = pTextEditOutliner->SetUpdateLayout(false);
pTextEditOutliner->SetMinAutoPaperSize(aPaperMin1);
pTextEditOutliner->SetMaxAutoPaperSize(aPaperMax1);
pTextEditOutliner->SetPaperSize(Size(0, 0)); // re-format Outliner
@@ -323,7 +323,7 @@ void SdrObjEditView::ModelHasChanged()
if (nStat != nStat0)
pOLV->SetControlWord(nStat);
}
- pTextEditOutliner->SetUpdateLayout(true);
+ pTextEditOutliner->SetUpdateLayout(bPrevUpdateLayout);
bAreaChg = true;
}
}