summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorBayram Çiçek <bayram.cicek@libreoffice.org>2023-06-02 08:24:25 +0300
committerAndreas Heinisch <andreas.heinisch@yahoo.de>2023-08-29 18:01:40 +0200
commita4633dadb4233ad5587bd238449671d610540c81 (patch)
tree9bd34b31bf70a9a8853e261f99dd3b49488ed3a1 /sw/source
parent62e201d2cf82f4ccaa6564bd2420ac6582594b8f (diff)
tdf#49895: Add search functionality to Options dialog
- Search field added. - Dialog names of all treeview nodes with their parent names were included in searching. - Strings of labels, check buttons, radio buttons, toggle buttons, link buttons and buttons were included in searching. Change-Id: Idf67c160519402ee390d94b1b3135b56324f3990 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152519 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx22
-rw-r--r--sw/source/ui/config/optcomp.cxx13
-rw-r--r--sw/source/ui/config/optload.cxx38
-rw-r--r--sw/source/ui/config/optpage.cxx163
-rw-r--r--sw/source/uibase/inc/mailconfigpage.hxx2
-rw-r--r--sw/source/uibase/inc/optcomp.hxx2
-rw-r--r--sw/source/uibase/inc/optload.hxx4
-rw-r--r--sw/source/uibase/inc/optpage.hxx16
8 files changed, 260 insertions, 0 deletions
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 4f2d996b6f56..3b8a5ec45568 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -130,6 +130,28 @@ std::unique_ptr<SfxTabPage> SwMailConfigPage::Create(weld::Container* pPage, wel
return std::make_unique<SwMailConfigPage>(pPage, pController, *rAttrSet);
}
+OUString SwMailConfigPage::GetAllStrings()
+{
+ OUString sAllStrings;
+ OUString labels[] = { "label1", "displayname_label", "address_label", "replyto_label",
+ "label2", "server_label", "port_label" };
+
+ for (const auto& label : labels)
+ sAllStrings += m_xBuilder->weld_label(label)->get_label() + " ";
+
+ OUString checkButton[] = { "replytocb", "secure" };
+
+ for (const auto& check : checkButton)
+ sAllStrings += m_xBuilder->weld_check_button(check)->get_label() + " ";
+
+ OUString buttons[] = { "serverauthentication", "test" };
+
+ for (const auto& btn : buttons)
+ sAllStrings += m_xBuilder->weld_button(btn)->get_label() + " ";
+
+ return sAllStrings.replaceAll("_", "");
+}
+
bool SwMailConfigPage::FillItemSet( SfxItemSet* /*rSet*/ )
{
if (m_xDisplayNameED->get_value_changed_from_saved())
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 576ae35bd817..7d6ecaf24e4d 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -356,6 +356,19 @@ std::unique_ptr<SfxTabPage> SwCompatibilityOptPage::Create(weld::Container* pPag
return std::make_unique<SwCompatibilityOptPage>(pPage, pController, *rAttrSet);
}
+OUString SwCompatibilityOptPage::GetAllStrings()
+{
+ OUString sAllStrings;
+ OUString labels[] = { "label2", "label11" };
+
+ for (const auto& label : labels)
+ sAllStrings += m_xBuilder->weld_label(label)->get_label() + " ";
+
+ sAllStrings += m_xDefaultPB->get_label() + " ";
+
+ return sAllStrings.replaceAll("_", "");
+}
+
bool SwCompatibilityOptPage::FillItemSet( SfxItemSet* )
{
bool bModified = false;
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 2c3ef5adbe4e..14fe9a73644d 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -147,6 +147,29 @@ IMPL_LINK_NOARG(SwLoadOptPage, StandardizedPageCountCheckHdl, weld::Toggleable&,
m_xStandardizedPageSizeNF->set_sensitive(m_xShowStandardizedPageCount->get_active());
}
+OUString SwLoadOptPage::GetAllStrings()
+{
+ OUString sAllStrings;
+ OUString labels[] = { "label2", "label1", "label3", "label5",
+ "tablabel", "label4", "label7", "labelstandardpages" };
+
+ for (const auto& label : labels)
+ sAllStrings += m_xBuilder->weld_label(label)->get_label() + " ";
+
+ OUString checkButton[]
+ = { "updatefields", "updatecharts", "usecharunit", "squaremode", "standardizedpageshow" };
+
+ for (const auto& check : checkButton)
+ sAllStrings += m_xBuilder->weld_check_button(check)->get_label() + " ";
+
+ OUString radioButton[] = { "always", "onrequest", "never" };
+
+ for (const auto& radio : radioButton)
+ sAllStrings += m_xBuilder->weld_radio_button(radio)->get_label() + " ";
+
+ return sAllStrings.replaceAll("_", "");
+}
+
bool SwLoadOptPage::FillItemSet( SfxItemSet* rSet )
{
bool bRet = false;
@@ -541,6 +564,21 @@ std::unique_ptr<SfxTabPage> SwCaptionOptPage::Create(weld::Container* pPage, wel
return std::make_unique<SwCaptionOptPage>(pPage, pController, *rAttrSet);
}
+OUString SwCaptionOptPage::GetAllStrings()
+{
+ OUString sAllStrings;
+ OUString labels[] = { "label1", "label13", "label2", "label7", "numberingft",
+ "numseparatorft", "separatorft", "label18", "label11", "label4",
+ "label6", "label10", "label3" };
+
+ for (const auto& label : labels)
+ sAllStrings += m_xBuilder->weld_label(label)->get_label() + " ";
+
+ sAllStrings += m_xBuilder->weld_check_button("applyborder")->get_label() + " ";
+
+ return sAllStrings.replaceAll("_", "");
+}
+
bool SwCaptionOptPage::FillItemSet( SfxItemSet* )
{
bool bRet = false;
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 329462ac8f73..d9b5f77bf29e 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -212,6 +212,38 @@ void SwContentOptPage::Reset(const SfxItemSet* rSet)
lcl_SelectMetricLB(*m_xVMetric, FN_VSCROLL_METRIC, *rSet);
}
+OUString SwContentOptPage::GetAllStrings()
+{
+ OUString sAllStrings;
+ OUString labels[]
+ = { "guideslabel", "displaylabel", "displayfl1", "changeslabel", "label3",
+ "hruler", "settingslabel", "measureunitlabel", "outlinelabel" };
+
+ for (const auto& label : labels)
+ sAllStrings += m_xBuilder->weld_label(label)->get_label() + " ";
+
+ OUString checkButton[] = { "helplines",
+ "graphics",
+ "tables",
+ "drawings",
+ "comments",
+ "resolvedcomments",
+ "hiddentextfield",
+ "hiddenparafield",
+ "changesinmargin",
+ "changestooltip",
+ "vruler",
+ "vrulerright",
+ "smoothscroll",
+ "outlinecontentvisibilitybutton",
+ "suboutlinelevelsascontent" };
+
+ for (const auto& check : checkButton)
+ sAllStrings += m_xBuilder->weld_check_button(check)->get_label() + " ";
+
+ return sAllStrings.replaceAll("_", "");
+}
+
bool SwContentOptPage::FillItemSet(SfxItemSet* rSet)
{
const SwElemItem* pOldAttr = GetOldItem(GetItemSet(), FN_PARAM_ELEM);
@@ -352,6 +384,29 @@ std::unique_ptr<SfxTabPage> SwAddPrinterTabPage::Create( weld::Container* pPage,
return std::make_unique<SwAddPrinterTabPage>(pPage, pController, *rAttrSet);
}
+OUString SwAddPrinterTabPage::GetAllStrings()
+{
+ OUString sAllStrings;
+ OUString labels[] = { "label2", "label10", "label1", "label5", "4" };
+
+ for (const auto& label : labels)
+ sAllStrings += m_xBuilder->weld_label(label)->get_label() + " ";
+
+ OUString checkButton[]
+ = { "graphics", "formcontrols", "background", "inblack", "hiddentext", "textplaceholder",
+ "leftpages", "rightpages", "brochure", "rtl", "blankpages", "papertray" };
+
+ for (const auto& check : checkButton)
+ sAllStrings += m_xBuilder->weld_check_button(check)->get_label() + " ";
+
+ OUString radioButton[] = { "none", "only", "end", "endpage", "inmargins" };
+
+ for (const auto& radio : radioButton)
+ sAllStrings += m_xBuilder->weld_radio_button(radio)->get_label() + " ";
+
+ return sAllStrings.replaceAll("_", "");
+}
+
bool SwAddPrinterTabPage::FillItemSet( SfxItemSet* rCoreSet )
{
if ( m_bAttrModified )
@@ -574,6 +629,20 @@ static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
pColl->SetFormatAttr(SvxFontHeightItem(nHeight, 100, nFontHeightWhich));
}
+OUString SwStdFontTabPage::GetAllStrings()
+{
+ OUString sAllStrings;
+ OUString labels[] = { "label1", "font_label", "size_label", "default_label",
+ "heading_label", "list_label", "caption_label", "index_label" };
+
+ for (const auto& label : labels)
+ sAllStrings += m_xBuilder->weld_label(label)->get_label() + " ";
+
+ sAllStrings += m_xStandardPB->get_label() + " ";
+
+ return sAllStrings.replaceAll("_", "");
+}
+
bool SwStdFontTabPage::FillItemSet( SfxItemSet* )
{
SW_MOD()->GetModuleConfig()->SetDefaultFontInCurrDocOnly(false);
@@ -1011,6 +1080,30 @@ std::unique_ptr<SfxTabPage> SwTableOptionsTabPage::Create( weld::Container* pPag
return std::make_unique<SwTableOptionsTabPage>(pPage, pController, *rAttrSet);
}
+OUString SwTableOptionsTabPage::GetAllStrings()
+{
+ OUString sAllStrings;
+ OUString labels[]
+ = { "label1", "label3", "label4", "label5", "label6", "label10", "label2",
+ "label14", "label15", "label16", "label11", "label12", "label13" };
+
+ for (const auto& label : labels)
+ sAllStrings += m_xBuilder->weld_label(label)->get_label() + " ";
+
+ OUString checkButton[] = { "header", "repeatheader", "dontsplit", "border",
+ "numformatting", "numfmtformatting", "numalignment" };
+
+ for (const auto& check : checkButton)
+ sAllStrings += m_xBuilder->weld_check_button(check)->get_label() + " ";
+
+ OUString radioButton[] = { "fix", "fixprop", "var" };
+
+ for (const auto& radio : radioButton)
+ sAllStrings += m_xBuilder->weld_radio_button(radio)->get_label() + " ";
+
+ return sAllStrings.replaceAll("_", "");
+}
+
bool SwTableOptionsTabPage::FillItemSet( SfxItemSet* )
{
bool bRet = false;
@@ -1242,6 +1335,25 @@ void SwShdwCursorOptionsTabPage::PageCreated( const SfxAllItemSet& aSet )
m_pWrtShell = pWrtSh->GetValue();
}
+OUString SwShdwCursorOptionsTabPage::GetAllStrings()
+{
+ OUString sAllStrings;
+ OUString labels[] = { "layoutopt", "displayfl", "cursoropt", "cursorlabel",
+ "fillmode", "lbImage", "lbDefaultAnchor" };
+
+ for (const auto& label : labels)
+ sAllStrings += m_xBuilder->weld_label(label)->get_label() + " ";
+
+ OUString checkButton[]
+ = { "mathbaseline", "paragraph", "hyphens", "spaces", "nonbreak", "tabs",
+ "break", "hiddentext", "bookmarks", "cursorinprot", "cursoronoff" };
+
+ for (const auto& check : checkButton)
+ sAllStrings += m_xBuilder->weld_check_button(check)->get_label() + " ";
+
+ return sAllStrings.replaceAll("_", "");
+}
+
bool SwShdwCursorOptionsTabPage::FillItemSet( SfxItemSet* rSet )
{
SwShadowCursorItem aOpt;
@@ -1606,6 +1718,20 @@ std::unique_ptr<SfxTabPage> SwRedlineOptionsTabPage::Create( weld::Container* pP
return std::make_unique<SwRedlineOptionsTabPage>(pPage, pController, *rSet);
}
+OUString SwRedlineOptionsTabPage::GetAllStrings()
+{
+ OUString sAllStrings;
+ OUString labels[] = { "label2", "insert_label", "insertcolor_label",
+ "label3", "deleted_label", "deletedcolor_label",
+ "label4", "changed_label", "changedcolor_label",
+ "label5", "markpos_label", "markcolor_label" };
+
+ for (const auto& label : labels)
+ sAllStrings += m_xBuilder->weld_label(label)->get_label() + " ";
+
+ return sAllStrings.replaceAll("_", "");
+}
+
bool SwRedlineOptionsTabPage::FillItemSet( SfxItemSet* )
{
CharAttr *pAttr;
@@ -1992,6 +2118,27 @@ std::unique_ptr<SfxTabPage> SwCompareOptionsTabPage::Create( weld::Container* pP
return std::make_unique<SwCompareOptionsTabPage>(pPage, pController, *rAttrSet);
}
+OUString SwCompareOptionsTabPage::GetAllStrings()
+{
+ OUString sAllStrings;
+ OUString labels[] = { "label1", "setting" };
+
+ for (const auto& label : labels)
+ sAllStrings += m_xBuilder->weld_label(label)->get_label() + " ";
+
+ OUString checkButton[] = { "useRSID", "ignore", "storeRSID" };
+
+ for (const auto& check : checkButton)
+ sAllStrings += m_xBuilder->weld_check_button(check)->get_label() + " ";
+
+ OUString radioButton[] = { "auto", "byword", "bycharacter" };
+
+ for (const auto& radio : radioButton)
+ sAllStrings += m_xBuilder->weld_radio_button(radio)->get_label() + " ";
+
+ return sAllStrings.replaceAll("_", "");
+}
+
bool SwCompareOptionsTabPage::FillItemSet( SfxItemSet* )
{
bool bRet = false;
@@ -2128,6 +2275,22 @@ std::unique_ptr<SfxTabPage> SwTestTabPage::Create( weld::Container* pPage, weld:
return std::make_unique<SwTestTabPage>(pPage, pController, *rAttrSet);
}
+OUString SwTestTabPage::GetAllStrings()
+{
+ OUString sAllStrings;
+ OUString checkButton[] = { "unused", "dynamic", "nocalm",
+ "wysiwygdbg", "noidle", "noscreenadj",
+ "winformat", "noscroll", "DrawingLayerNotLoading",
+ "AutoFormatByInput" };
+
+ for (const auto& check : checkButton)
+ sAllStrings += m_xBuilder->weld_check_button(check)->get_label() + " ";
+
+ sAllStrings += m_xBuilder->weld_label("label1")->get_label() + " ";
+
+ return sAllStrings.replaceAll("_", "");
+}
+
bool SwTestTabPage::FillItemSet( SfxItemSet* rCoreSet )
{
diff --git a/sw/source/uibase/inc/mailconfigpage.hxx b/sw/source/uibase/inc/mailconfigpage.hxx
index 734b39aa9e67..4f63527d9f4e 100644
--- a/sw/source/uibase/inc/mailconfigpage.hxx
+++ b/sw/source/uibase/inc/mailconfigpage.hxx
@@ -54,6 +54,8 @@ public:
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController,
const SfxItemSet* rAttrSet);
+ virtual OUString GetAllStrings() override;
+
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
};
diff --git a/sw/source/uibase/inc/optcomp.hxx b/sw/source/uibase/inc/optcomp.hxx
index 42ebc49d1c04..c98f17f0a3cd 100644
--- a/sw/source/uibase/inc/optcomp.hxx
+++ b/sw/source/uibase/inc/optcomp.hxx
@@ -67,6 +67,8 @@ public:
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
+ virtual OUString GetAllStrings() override;
+
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
};
diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx
index 79a3b6f463a7..2b582bf83e12 100644
--- a/sw/source/uibase/inc/optload.hxx
+++ b/sw/source/uibase/inc/optload.hxx
@@ -88,6 +88,8 @@ public:
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
const SfxItemSet* rAttrSet);
+ virtual OUString GetAllStrings() override;
+
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
};
@@ -188,6 +190,8 @@ public:
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController,
const SfxItemSet* rAttrSet);
+ virtual OUString GetAllStrings() override;
+
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
};
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx
index 44e93ebdb2d5..c4fa7012bb99 100644
--- a/sw/source/uibase/inc/optpage.hxx
+++ b/sw/source/uibase/inc/optpage.hxx
@@ -68,6 +68,8 @@ public:
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet);
+ virtual OUString GetAllStrings() override;
+
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
};
@@ -112,6 +114,8 @@ public:
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet);
+ virtual OUString GetAllStrings() override;
+
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
void SetFax(const std::vector<OUString>& );
@@ -170,6 +174,8 @@ public:
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet);
virtual ~SwStdFontTabPage() override;
+ virtual OUString GetAllStrings() override;
+
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
@@ -208,6 +214,8 @@ public:
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet);
+ virtual OUString GetAllStrings() override;
+
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
@@ -250,6 +258,8 @@ public:
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet);
+ virtual OUString GetAllStrings() override;
+
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -323,6 +333,8 @@ public:
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet);
+ virtual OUString GetAllStrings() override;
+
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
};
@@ -339,6 +351,8 @@ public:
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet);
+ virtual OUString GetAllStrings() override;
+
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -380,6 +394,8 @@ public:
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
+ virtual OUString GetAllStrings() override;
+
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
};