diff options
author | Skyler Grey <skyler.grey@collabora.com> | 2023-10-23 16:17:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-10-30 20:08:56 +0100 |
commit | 15972993ff6e106a02954125269612179e1f33aa (patch) | |
tree | c9a0ccaf556f11fbe83c2f29011794ef9e82a9fa /sw/inc | |
parent | 6412a74b35a3e6089b65b4ad04549262e4bf93c8 (diff) |
Fix incorrect marginal STYLEREF content in docx
STYLEREF fields were previously not importing with the correct content
when loading a docx document. This is because they were not updating
when the document had finished loading- only partway through, and where
a STYLEREF field is in relation to everything else in the document can
change its content.
This commit fixes that issue by adding STYLEREF fields to be refreshed
whenever other fields that can change based on pages (e.g. page number)
fields are updated. I suspect this could lead to double updates in some
cases where both reference and page fields are being updated. I consider
this a relatively minor issue in comparison to incorrect field content
when specific documents are loaded, but a followup could be made
improving this.
This commit also fixes a minor typo in reffld.cxx where m_sText is
always the filtered text when updating fields, even if we are updating
m_sTextRLHidden instead.
Change-Id: Iecd3e83a6bd3f8c2c6adba5c7eba9ee55b773510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158450
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/reffld.hxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx index 293b913c406b..3c1e3c63b5e6 100644 --- a/sw/inc/reffld.hxx +++ b/sw/inc/reffld.hxx @@ -100,6 +100,7 @@ public: SwRootFrame const* pLayout = nullptr, SwTextNode* pSelf = nullptr, SwFrame* pFrame = nullptr); void UpdateGetReferences(); + void UpdateStyleReferences(); }; class SW_DLLPUBLIC SwGetRefField final : public SwField |