sw/source/uibase/utlui/content.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 5b021965837252f48184d8441f5e19a944e3b287 Author: Tor Lillqvist <t...@iki.fi> AuthorDate: Thu Dec 10 18:58:11 2020 +0200 Commit: Tor Lillqvist <t...@iki.fi> CommitDate: Thu Dec 10 18:59:32 2020 +0200 Add comments wondering what some magic numbers might mean Change-Id: Iece65c9d96561abc0a97726cd4eb642317dc0f9c diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 57ed667d3f98..54b84ee935d9 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1177,6 +1177,9 @@ static bool lcl_InsertExpandCollapseAllItem(const weld::TreeView& rContentTree, static void lcl_SetOutlineContentEntriesSensitivities(SwContentTree* pThis, const weld::TreeView& rContentTree, const weld::TreeIter& rEntry, weld::Menu& rPop) { + // If anybody knows what these magic numbers mean, please either + // add a comment here, or replace them with some suitable symbolic + // names that are defined somewhere else. rPop.set_sensitive(OString::number(1512), false); rPop.set_sensitive(OString::number(1513), false); rPop.set_sensitive(OString::number(1514), false); @@ -1306,6 +1309,8 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) std::unique_ptr<weld::Menu> xSubPopOutlineTracking = xBuilder->weld_menu("outlinetracking"); std::unique_ptr<weld::Menu> xSubPopOutlineContent = xBuilder->weld_menu("outlinecontent"); + + // More magic numbers, huh. xSubPopOutlineContent->append(OUString::number(1512), SwResId(STR_OUTLINE_CONTENT_VISIBILITY_TOGGLE)); xSubPopOutlineContent->append(OUString::number(1513), SwResId(STR_OUTLINE_CONTENT_VISIBILITY_HIDE_ALL)); xSubPopOutlineContent->append(OUString::number(1514), SwResId(STR_OUTLINE_CONTENT_VISIBILITY_SHOW_ALL)); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits