summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-09-01 18:26:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-02 19:08:49 +0200
commitc1c679deca078209bc3008ccd9ccc0a8715929a1 (patch)
tree6f5a1a1207636b4b7f1b0575f36cbf579f7c85af /svx/source/svdraw
parent58da51715425d781b5b8b9b9e412c98daf80b601 (diff)
rename UpdateMode -> UpdateLayout in editeng class
... because "update" is such a generic term I keep forgetting what we are turning on and off Also return the previous value from SetUpdateLayout to make the save/restore code more compact. Change-Id: Iae1764c837a92e58c9b17521f130e8fc80311d22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121479 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdedxv.cxx10
-rw-r--r--svx/source/svdraw/svdmodel.cxx2
-rw-r--r--svx/source/svdraw/svdoashp.cxx6
-rw-r--r--svx/source/svdraw/svdomeas.cxx2
-rw-r--r--svx/source/svdraw/svdotext.cxx12
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx14
-rw-r--r--svx/source/svdraw/svdotextpathdecomposition.cxx2
-rw-r--r--svx/source/svdraw/svdotxat.cxx2
-rw-r--r--svx/source/svdraw/svdotxed.cxx5
-rw-r--r--svx/source/svdraw/svdoutl.cxx2
-rw-r--r--svx/source/svdraw/textchainflow.cxx6
11 files changed, 31 insertions, 32 deletions
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index f31dd910aa78..eda65d12ba19 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->SetUpdateMode(false);
+ 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->SetUpdateMode(true);
+ pTextEditOutliner->SetUpdateLayout(true);
bAreaChg = true;
}
}
@@ -759,7 +759,7 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const tools::
if (!comphelper::LibreOfficeKit::isActive() || !rRect.IsEmpty())
aBlankRect.Intersection(rRect);
- rOutlView.GetOutliner()->SetUpdateMode(true); // Bugfix #22596#
+ rOutlView.GetOutliner()->SetUpdateLayout(true); // Bugfix #22596#
rOutlView.Paint(aBlankRect, &rTargetDevice);
if (!bModified)
@@ -858,7 +858,7 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(vcl::Window* pWin, OutlinerVie
bool bContourFrame = pText != nullptr && pText->IsContourTextFrame();
// create OutlinerView
OutlinerView* pOutlView = pGivenView;
- pTextEditOutliner->SetUpdateMode(false);
+ pTextEditOutliner->SetUpdateLayout(false);
if (pOutlView == nullptr)
{
@@ -898,7 +898,7 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(vcl::Window* pWin, OutlinerVie
pText->GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT).GetValue());
}
// do update before setting output area so that aTextEditArea can be recalculated
- pTextEditOutliner->SetUpdateMode(true);
+ pTextEditOutliner->SetUpdateLayout(true);
pOutlView->SetOutputArea(aTextEditArea);
ImpInvalidateOutlinerView(*pOutlView);
return pOutlView;
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index a6f4aeed9ec0..5cd3e37dec4c 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -671,7 +671,7 @@ void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* pOutliner, bool bInit )
if( bInit )
{
pOutliner->EraseVirtualDevice();
- pOutliner->SetUpdateMode(false);
+ pOutliner->SetUpdateLayout(false);
pOutliner->SetEditTextObjectPool(m_pItemPool.get());
pOutliner->SetDefTab(m_nDefaultTabulator);
}
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index eac980c82981..5cdd00a77e39 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -2315,7 +2315,7 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool
{
Outliner& rOutliner=ImpGetDrawOutliner();
rOutliner.SetPaperSize(aSiz);
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
// TODO: add the optimization with bPortionInfoChecked again.
OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
if( pOutlinerParaObject != nullptr )
@@ -2680,7 +2680,7 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle&
if( bHitTest )
rOutliner.SetTextObj( this );
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
rOutliner.SetText(*pPara);
}
}
@@ -2689,7 +2689,7 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle&
rOutliner.SetTextObj( nullptr );
}
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
rOutliner.SetControlWord(nStat0);
SdrText* pText = getActiveText();
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index b8e411f7c43e..6c2c4b1860b8 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -602,7 +602,7 @@ void SdrMeasureObj::UndirtyText() const
rOutliner.SetText(*pOutlinerParaObject);
}
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
rOutliner.UpdateFields();
Size aSiz(rOutliner.CalcTextSize());
rOutliner.Clear();
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 32541331fca0..3ad373cad189 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -222,7 +222,7 @@ void SdrTextObj::FitFrameToTextSize()
SdrOutliner& rOutliner=ImpGetDrawOutliner();
rOutliner.SetPaperSize(Size(maRect.Right()-maRect.Left(),maRect.Bottom()-maRect.Top()));
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
rOutliner.SetText(*pText->GetOutlinerParaObject());
Size aNewSize(rOutliner.CalcTextSize());
rOutliner.Clear();
@@ -262,7 +262,7 @@ void SdrTextObj::NbcSetText(SvStream& rInput, const OUString& rBaseURL, EETextFo
rOutliner.SetStyleSheet( 0, GetStyleSheet());
rOutliner.Read(rInput,rBaseURL,eFormat);
std::optional<OutlinerParaObject> pNewText=rOutliner.CreateParaObject();
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
Size aSize(rOutliner.CalcTextSize());
rOutliner.Clear();
NbcSetOutlinerParaObject(std::move(pNewText));
@@ -289,7 +289,7 @@ const Size& SdrTextObj::GetTextSize() const
{
SdrOutliner& rOutliner=ImpGetDrawOutliner();
rOutliner.SetText(*pText->GetOutlinerParaObject());
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
aSiz=rOutliner.CalcTextSize();
rOutliner.Clear();
}
@@ -789,7 +789,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRe
rOutliner.SetFixedCellHeight(GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT).GetValue());
}
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
rOutliner.SetText(*pPara);
}
}
@@ -798,7 +798,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRe
rOutliner.SetTextObj( nullptr );
}
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
rOutliner.SetControlWord(nStat0);
if( pText )
@@ -1144,7 +1144,7 @@ Point SdrTextObj::GetSnapPoint(sal_uInt32 i) const
// Extracted from ImpGetDrawOutliner()
void SdrTextObj::ImpInitDrawOutliner( SdrOutliner& rOutl ) const
{
- rOutl.SetUpdateMode(false);
+ rOutl.SetUpdateLayout(false);
OutlinerMode nOutlinerMode = OutlinerMode::OutlineObject;
if ( !IsOutlText() )
nOutlinerMode = OutlinerMode::TextObject;
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index a1e885c0e009..5d8312beeefe 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -692,7 +692,7 @@ void SdrTextObj::impDecomposeContourTextPrimitive(
const Size aNullSize;
rOutliner.SetPaperSize(aNullSize);
rOutliner.SetPolygon(aPolyPolygon);
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
rOutliner.SetText(rSdrContourTextPrimitive.getOutlinerParaObject());
// set visualizing page at Outliner; needed e.g. for PageNumberField decomposition
@@ -780,7 +780,7 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
}
rOutliner.SetPaperSize(aNullSize);
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
rOutliner.SetText(*pOutlinerParaObject);
ImpAutoFitText(rOutliner,aAnchorTextSize,bVerticalWriting);
@@ -972,7 +972,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
}
rOutliner.SetPaperSize(aAnchorTextSize);
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject());
}
else
@@ -1029,7 +1029,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
}
rOutliner.SetPaperSize(aNullSize);
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject());
}
@@ -1179,7 +1179,7 @@ void SdrTextObj::impDecomposeStretchTextPrimitive(
rOutliner.SetMinAutoPaperSize(aNullSize);
rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000));
rOutliner.SetPaperSize(aNullSize);
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
rOutliner.SetText(rSdrStretchTextPrimitive.getOutlinerParaObject());
// set visualizing page at Outliner; needed e.g. for PageNumberField decomposition
@@ -1512,7 +1512,7 @@ void SdrTextObj::impHandleChainingEventsDuringDecomposition(SdrOutliner &rOutlin
// Initialize Chaining Outliner
SdrOutliner &rChainingOutl(getSdrModelFromSdrObject().GetChainingOutliner(this));
ImpInitDrawOutliner( rChainingOutl );
- rChainingOutl.SetUpdateMode(true);
+ rChainingOutl.SetUpdateLayout(true);
// We must pass the chaining outliner otherwise we would mess up decomposition
aTxtChainFlow.ExecuteOverflow(&rOutliner, &rChainingOutl);
}
@@ -1579,7 +1579,7 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
}
rOutliner.SetPaperSize(aNullSize);
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
// Sets original text
rOutliner.SetText(*pOutlinerParaObject);
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index d97d9129124b..83b5c6525419 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -657,7 +657,7 @@ void SdrTextObj::impDecomposePathTextPrimitive(
// prepare outliner
SdrOutliner& rOutliner = ImpGetDrawOutliner();
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
rOutliner.Clear();
rOutliner.SetPaperSize(Size(LONG_MAX,LONG_MAX));
rOutliner.SetText(rSdrPathTextPrimitive.getOutlinerParaObject());
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index ef4184448507..2dc96ce1e0b2 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -143,7 +143,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
{
Outliner& rOutliner = ImpGetDrawOutliner();
rOutliner.SetPaperSize(aNewSize);
- rOutliner.SetUpdateMode(true);
+ rOutliner.SetUpdateLayout(true);
// TODO: add the optimization with bPortionInfoChecked etc. here
OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
if (pOutlinerParaObject)
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 8642332a49a2..bbcdc2a7add9 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -339,8 +339,7 @@ void SdrTextObj::ImpSetTextEditParams() const
if (mpEditingOutliner==nullptr)
return;
- bool bUpdBuf=mpEditingOutliner->GetUpdateMode();
- if (bUpdBuf) mpEditingOutliner->SetUpdateMode(false);
+ bool bUpdBuf=mpEditingOutliner->SetUpdateLayout(false);
Size aPaperMin;
Size aPaperMax;
tools::Rectangle aEditArea;
@@ -355,7 +354,7 @@ void SdrTextObj::ImpSetTextEditParams() const
TakeTextAnchorRect(aAnchorRect);
ImpSetContourPolygon(*mpEditingOutliner,aAnchorRect, true);
}
- if (bUpdBuf) mpEditingOutliner->SetUpdateMode(true);
+ if (bUpdBuf) mpEditingOutliner->SetUpdateLayout(true);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx
index 738309182fd7..f13129a6d798 100644
--- a/svx/source/svdraw/svdoutl.cxx
+++ b/svx/source/svdraw/svdoutl.cxx
@@ -41,7 +41,7 @@ void SdrOutliner::SetTextObj( const SdrTextObj* pObj )
{
if( pObj && pObj != mpTextObj.get() )
{
- SetUpdateMode(false);
+ SetUpdateLayout(false);
OutlinerMode nOutlinerMode2 = OutlinerMode::OutlineObject;
if ( !pObj->IsOutlText() )
nOutlinerMode2 = OutlinerMode::TextObject;
diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index 2c4a7c84f2b2..9763ea5015cb 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -65,13 +65,13 @@ void TextChainFlow::impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *)
*/
void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner *pParamOutl)
{
- bool bOldUpdateMode = pFlowOutl->GetUpdateMode();
+ bool bOldUpdateMode = pFlowOutl->IsUpdateLayout();
// XXX: This could be reorganized moving most of this stuff inside EditingTextChainFlow
if (pParamOutl != nullptr)
{
// We need this since it's required to check overflow
- pFlowOutl->SetUpdateMode(true);
+ pFlowOutl->SetUpdateLayout(true);
// XXX: does this work if you do it before setting the text? Seems so.
impSetFlowOutlinerParams(pFlowOutl, pParamOutl);
@@ -103,7 +103,7 @@ void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner *p
// Reset update mode // Reset it here because we use WriteRTF (needing updatemode = true) in the two constructors above
if (!bOldUpdateMode) // Reset only if the old value was false
- pFlowOutl->SetUpdateMode(bOldUpdateMode);
+ pFlowOutl->SetUpdateLayout(bOldUpdateMode);
// NOTE: Must be called after mp*ChText abd b*flow have been set but before mbOFisUFinduced is reset
impUpdateCursorInfo();