vcl/inc/jsdialog/enabled.hxx  |    4 ++-
 vcl/jsdialog/enabled.cxx      |   49 ++++++++++++++++++++++++++++++++++++++++++
 vcl/source/window/builder.cxx |    9 +++++++
 3 files changed, 61 insertions(+), 1 deletion(-)

New commits:
commit 525a9a868ab1046968cf48a94c27bd8849593f6f
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Jan 19 08:49:29 2026 +0000
Commit:     Miklos Vajna <[email protected]>
CommitDate: Thu Jan 22 08:37:09 2026 +0100

    bootstrap initial 'common' dialog coverage reporting
    
    Change-Id: I23ea6a937722cf5cb5b4849b4c9cfef3187cfa36
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197549
    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 857585a9c58d..3b7b33ba9ade 100644
--- a/vcl/inc/jsdialog/enabled.hxx
+++ b/vcl/inc/jsdialog/enabled.hxx
@@ -26,8 +26,10 @@ bool isBuilderEnabledForNavigator(std::u16string_view 
rUIFile);
 bool isBuilderEnabledForQuickFind(std::u16string_view rUIFile);
 bool isInterimBuilderEnabledForNotebookbar(std::u16string_view rUIFile);
 
-// returns vector of .ui files not seen that should be seen to have complete 
coverage
+// returns vector of writer .ui files not seen that should be seen to have 
complete coverage
 std::vector<OUString> completeWriterDialogList(const 
o3tl::sorted_vector<OUString>& entries);
+// returns vector of common/shared .ui files not seen that should be seen to 
have complete coverage
+std::vector<OUString> completeCommonDialogList(const 
o3tl::sorted_vector<OUString>& entries);
 }
 
 /* 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 b4d8997e564d..6fb2fe43852f 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -662,6 +662,55 @@ std::vector<OUString> completeWriterDialogList(const 
o3tl::sorted_vector<OUStrin
     return missing;
 }
 
+std::vector<OUString> completeCommonDialogList(const 
o3tl::sorted_vector<OUString>& entries)
+{
+    std::vector<OUString> missing;
+    auto processCategory = [&](const auto& category) {
+        for (const auto& entry : category)
+        {
+            // Skip this one, I don't think it can appear in practice
+            if (entry == u"sfx/ui/cmisinfopage.ui")
+                continue;
+            // Skip this one, I don't think it can appear in practice
+            else if (entry == u"cui/ui/colorpickerdialog.ui")
+                continue;
+            // Skip this one, is the query dialog about enabling overwrite
+            // mode which is disabled in the default config
+            else if (entry == u"cui/ui/querysetinsmodedialog.ui")
+                continue;
+            // Skip this one, its actually a sd-only one (with code in sd), but
+            // somehow the .ui is in cui
+            else if (entry == u"cui/ui/bulletandposition.ui")
+                continue;
+            // Skip this one for now, it requires smartart to already exist in 
a .docx
+            else if (entry == u"cui/ui/diagramdialog.ui")
+                continue;
+            // Skip this one, it cannot appear in writer
+            else if (entry == u"cui/ui/possizetabpage.ui")
+                continue;
+            // Skip this one, it cannot appear in writer, only calc in practice
+            else if (entry == u"cui/ui/cellalignment.ui")
+                continue;
+            // Skip this one, it cannot appear in writer, only impress/draw in
+            // practice
+            else if (entry == u"cui/ui/formatcellsdialog.ui")
+                continue;
+            // Skip this one, it cannot appear in writer (until autotext 
dialogs
+            // are enabled, in which case that is likely disabled. Maybe 
possible
+            // from calc.
+            else if (entry == u"cui/ui/eventassigndialog.ui")
+                continue;
+            OUString sEntry(entry);
+            if (!entries.contains(sEntry))
+                missing.push_back(sEntry);
+        }
+    };
+    processCategory(SfxDialogList);
+    processCategory(CuiDialogList);
+    return missing;
+}
+
+
 } // end of jsdialog
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 944c1ab69b7d..c35dda95b626 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -212,6 +212,15 @@ void Application::UICoverageReport(tools::JsonWriter& 
rJson)
         for (const auto& entry : missingWriterDialogUIs)
             rJson.putSimpleValue(entry);
     }
+
+    std::vector<OUString> missingCommonDialogUIs = 
jsdialog::completeCommonDialogList(entries);
+    rJson.put("CompleteCommonDialogCoverage", missingCommonDialogUIs.empty());
+    if (!missingCommonDialogUIs.empty())
+    {
+        auto childrenNode = rJson.startArray("MissingCommonDialogCoverage");
+        for (const auto& entry : missingCommonDialogUIs)
+            rJson.putSimpleValue(entry);
+    }
 }
 
 std::unique_ptr<weld::Builder> Application::CreateBuilder(weld::Widget* 
pParent, const OUString &rUIFile, bool bMobile, sal_uInt64 nLOKWindowId)

Reply via email to