diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-02 09:14:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-02 12:26:24 +0100 |
commit | 5962dbf15d99b54d33f7e6589a23b8bca4359168 (patch) | |
tree | 44129e9452ab5004def9257aecfbc4c41e1c566e /sw/source/core/txtnode | |
parent | 4e9aa386556f49358a1cef5c5f6b9b26d2e9e1b8 (diff) |
speedup sw build a little
from 11m46 to 11m21
Used ClangBuildAnalyzer to find headers that took a long time
to parse (in total, across all modules).
(*) moved the boost stuff out of sw/inc/docary into a new header.
(*) make sw/inc/ndtxt no longer include doc.hxx
Change-Id: Ia1d4ebddb4ddd4ec4ffbc011f4a5e24a42b46d3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89808
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 12 |
2 files changed, 7 insertions, 6 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index dccc699ed67b..d59a106f47b8 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -79,6 +79,7 @@ #include <memory> #include <unoparagraph.hxx> #include <wrtsh.hxx> +#include <frameformats.hxx> #include <svx/sdr/attribute/sdrallfillattributeshelper.hxx> #include <svl/itemiter.hxx> diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index e58d0e7e6892..2dcb0dd9d457 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1184,7 +1184,7 @@ void SwTextNode::DestroyAttr( SwTextAttr* pAttr ) // certain fields must update the SwDoc's calculation flags // Certain fields (like HiddenParaField) must trigger recalculation of visible flag - if (FieldCanHideParaWeight(pFieldType->Which())) + if (GetDoc()->FieldCanHideParaWeight(pFieldType->Which())) SetCalcHiddenParaField(); switch( pFieldType->Which() ) @@ -1494,7 +1494,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode ) case RES_TXTATR_FIELD: { // trigger notification for relevant fields, like HiddenParaFields - if (FieldCanHideParaWeight( + if (GetDoc()->FieldCanHideParaWeight( pAttr->GetFormatField().GetField()->GetTyp()->Which())) { bHiddenPara = true; @@ -2628,18 +2628,18 @@ bool SwpHints::CalcHiddenParaField() const { // see also SwTextFrame::IsHiddenNow() const SwFormatField& rField = pTextHt->GetFormatField(); - int nCurWeight = m_rParent.FieldCanHideParaWeight(rField.GetField()->GetTyp()->Which()); + int nCurWeight = m_rParent.GetDoc()->FieldCanHideParaWeight(rField.GetField()->GetTyp()->Which()); if (nCurWeight > nNewResultWeight) { nNewResultWeight = nCurWeight; - bNewHiddenByParaField = m_rParent.FieldHidesPara(*rField.GetField()); + bNewHiddenByParaField = m_rParent.GetDoc()->FieldHidesPara(*rField.GetField()); } else if (nCurWeight == nNewResultWeight && bNewHiddenByParaField) { // Currently, for both supported hiding types (HiddenPara, Database), "Don't hide" // takes precedence - i.e., if there's a "Don't hide" field of that weight, we only // care about fields of higher weight. - bNewHiddenByParaField = m_rParent.FieldHidesPara(*rField.GetField()); + bNewHiddenByParaField = m_rParent.GetDoc()->FieldHidesPara(*rField.GetField()); } } } @@ -3336,7 +3336,7 @@ void SwpHints::DeleteAtPos( const size_t nPos ) pTextField->ChgTextNode(nullptr); } else if (m_bHiddenByParaField - && m_rParent.FieldCanHideParaWeight(pFieldTyp->Which())) + && m_rParent.GetDoc()->FieldCanHideParaWeight(pFieldTyp->Which())) { m_bCalcHiddenParaField = true; } |