diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/strings.hrc | 1 | ||||
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index d5aaf979b66f..18d9b02081cb 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -415,6 +415,7 @@ #define STR_HIDDEN_CHANGES_DETAIL NC_("STR_HIDDEN_CHANGES_DETAIL", "Document contains tracked changes and recording is enabled.") #define STR_HIDDEN_CHANGES_DETAIL2 NC_("STR_HIDDEN_CHANGES_DETAIL2", "Recording of changes is enabled.") #define STR_HIDDEN_CHANGES_DETAIL3 NC_("STR_HIDDEN_CHANGES_DETAIL3", "Document contains tracked changes.") +#define STR_HEADER_FOOTER NC_("STR_HEADER_FOOTER", "Header/Footer") // Undo #define STR_CANT_UNDO NC_("STR_CANT_UNDO", "not possible") diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 517b0a658814..90ef955e00d6 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -807,7 +807,13 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) if (SwTextField* pTextField = pFormatField->GetTextField()) { const SwField* pField = pFormatField->GetField(); - OUString sExpandField(pField->ExpandField(true, m_pWrtShell->GetLayout())); + OUString sExpandField; + // tdf#146490 page number field type in Header/Footer + if (pField->GetTypeId() == SwFieldTypesEnum::PageNumber && + m_pWrtShell->GetDoc()->IsInHeaderFooter(pTextField->GetTextNode())) + sExpandField = SwResId(STR_HEADER_FOOTER); + else + sExpandField = pField->ExpandField(true, m_pWrtShell->GetLayout()); if (!sExpandField.isEmpty()) sExpandField = u" - " + sExpandField; OUString sText = pField->GetDescription() + u" - " + pField->GetFieldName() |