vcl/inc/jsdialog/enabled.hxx | 3 +- vcl/jsdialog/enabled.cxx | 61 +++++++++++++++++++++++++++++------------- vcl/source/window/builder.cxx | 3 +- 3 files changed, 47 insertions(+), 20 deletions(-)
New commits: commit b3c77279fc1bf8ff84584bf62ccbb8ace58ed757 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Mar 2 14:45:07 2026 +0000 Commit: Miklos Vajna <[email protected]> CommitDate: Tue Mar 3 08:51:18 2026 +0100 adapt sidebar coverage report for calc Change-Id: Idf43604da494481667688a4a7670cc11f1bbe689 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200835 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/vcl/inc/jsdialog/enabled.hxx b/vcl/inc/jsdialog/enabled.hxx index 7122c4215945..b095881e1d5b 100644 --- a/vcl/inc/jsdialog/enabled.hxx +++ b/vcl/inc/jsdialog/enabled.hxx @@ -39,7 +39,8 @@ std::vector<OUString> completeCommonDialogList(const o3tl::sorted_vector<OUStrin /*LibreOfficeKitDocumentType*/ int docType, bool linguisticDataAvailable); // returns vector of common/shared sidebar .ui files not seen that should be seen to have complete coverage -std::vector<OUString> completeCommonSidebarList(const o3tl::sorted_vector<OUString>& entries); +std::vector<OUString> completeCommonSidebarList(const o3tl::sorted_vector<OUString>& entries, + /*LibreOfficeKitDocumentType*/ int docType); } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 59c78593e484..d185c938719f 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -722,6 +722,10 @@ std::vector<OUString> completeCalcSidebarList(const o3tl::sorted_vector<OUString std::vector<OUString> missing; for (const auto& entry : SidebarList) { + // Skip this one for now, it can only be seen in certain xlsx documents + if (entry == u"modules/scalc/ui/sidebardatabase.ui") + continue; + OUString sEntry(entry); if (sEntry.startsWith("modules/scalc/") && !entries.contains(sEntry)) missing.push_back(sEntry); @@ -729,7 +733,8 @@ std::vector<OUString> completeCalcSidebarList(const o3tl::sorted_vector<OUString return missing; } -std::vector<OUString> completeCommonSidebarList(const o3tl::sorted_vector<OUString>& entries) +std::vector<OUString> completeCommonSidebarList(const o3tl::sorted_vector<OUString>& entries, + /*LibreOfficeKitDocumentType*/ int docType) { std::vector<OUString> missing; for (const auto& entry : SidebarList) @@ -754,26 +759,46 @@ std::vector<OUString> completeCommonSidebarList(const o3tl::sorted_vector<OUStri // Skip this one, theme related, disabled at the moment else if (entry == u"modules/schart/ui/sidebartheme.ui") continue; - // Skip this one, in practice it appears in draw/impress - // TODO: it should probably be made to appear in writer too - else if (entry == u"svx/ui/mediaplayback.ui") - continue; // Skip this one, I don't think it can appear in practice else if (entry == u"svx/ui/sidebargallery.ui") continue; - // Skip this one, its context means it cannot appear in writer - else if (entry == u"svx/ui/sidebarshadow.ui") - continue; - // Skip this one, its context means it cannot appear in writer - else if (entry == u"svx/ui/sidebartexteffect.ui") - continue; - // Skip this one, its context means it cannot appear in writer - else if (entry == u"svx/ui/sidebarlists.ui") - continue; - // Skip this one, its context means it can only appear in draw/impress - else if (entry == u"svx/ui/defaultshapespanel.ui") - continue; - else if (!entries.contains(sEntry)) + + if (docType != LOK_DOCTYPE_TEXT) + { + // These only appear in writer + if (entry == u"svx/ui/accessibilitycheckentry.ui" || + entry == u"svx/ui/accessibilitychecklevel.ui" || + entry == u"svx/ui/inspectortextpanel.ui") + { + continue; + } + } + + if (docType == LOK_DOCTYPE_TEXT) + { + // Skip this one, its context means it cannot appear in writer + if (entry == u"svx/ui/sidebarshadow.ui") + continue; + // Skip this one, its context means it cannot appear in writer + else if (entry == u"svx/ui/sidebartexteffect.ui") + continue; + } + + if (docType != LOK_DOCTYPE_PRESENTATION && docType != LOK_DOCTYPE_DRAWING) + { + // Skip this one, in practice it appears in draw/impress + // TODO: it should probably be made to appear in writer/calc too + if (entry == u"svx/ui/mediaplayback.ui") + continue; + // Skip this one, its context means it can only appear in draw/impress + else if (entry == u"svx/ui/defaultshapespanel.ui") + continue; + // Skip this one, its context means it can only appear in draw/impress + else if (entry == u"svx/ui/sidebarlists.ui") + continue; + } + + if (!entries.contains(sEntry)) missing.push_back(sEntry); } return missing; diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 360ffba07231..56837f303266 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -255,7 +255,8 @@ void Application::UICoverageReport(tools::JsonWriter& rJson, rJson.putSimpleValue(entry); } - std::vector<OUString> missingCommonSidebarUIs = jsdialog::completeCommonSidebarList(entries); + std::vector<OUString> missingCommonSidebarUIs = jsdialog::completeCommonSidebarList(entries, + docType); rJson.put("CompleteCommonSidebarCoverage", missingCommonSidebarUIs.empty()); if (!missingCommonSidebarUIs.empty()) {
