diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-08 17:43:16 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-15 15:10:07 +0100 |
commit | f8cab2f422895ebad8be9b8b3bb76600e6eaf1d0 (patch) | |
tree | 249822021bef752aaef710e1fa7574234221cd20 /sw/source/core/doc/doc.cxx | |
parent | ad292b0ab5ec6f21d5ec710e6ef503b25b578169 (diff) |
sw_redlinehide_3: add layout parameter to SwField::ExpandField()
If the bCached=true, it shouldn't matter what the layout is, because the
field won't be expanded properly anyway.
Except for the SwInputField which disables caching, but that one often
has a different code path anyway.
For most fields it doesn't matter anyway, e.g. database fields.
Change-Id: I628195f43c5d26feba94af0a832386791c072ba1
Diffstat (limited to 'sw/source/core/doc/doc.cxx')
-rw-r--r-- | sw/source/core/doc/doc.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index cfb91b7f401c..23b5b7e58808 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1383,7 +1383,7 @@ bool SwDoc::FieldHidesPara(const SwField& rField) const return static_cast<const SwHiddenParaField&>(rField).IsHidden(); case SwFieldIds::Database: return FieldCanHideParaWeight(SwFieldIds::Database) - && rField.ExpandField(true).isEmpty(); + && rField.ExpandField(true, nullptr).isEmpty(); default: return false; } @@ -1584,7 +1584,7 @@ bool SwDoc::RestoreInvisibleContent() return false; } -bool SwDoc::ConvertFieldsToText() +bool SwDoc::ConvertFieldsToText(SwRootFrame const& rLayout) { bool bRet = false; getIDocumentFieldsAccess().LockExpFields(); @@ -1631,7 +1631,7 @@ bool SwDoc::ConvertFieldsToText() nWhich != SwFieldIds::RefPageGet&& nWhich != SwFieldIds::RefPageSet)) { - OUString sText = pField->ExpandField(true); + OUString sText = pField->ExpandField(true, &rLayout); // database fields should not convert their command into text if( SwFieldIds::Database == pCurType->Which() && !static_cast<const SwDBField*>(pField)->IsInitialized()) |