summaryrefslogtreecommitdiff
path: root/sfx2
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 /sfx2
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 'sfx2')
-rw-r--r--sfx2/source/dialog/printopt.cxx30
-rw-r--r--sfx2/source/dialog/tabdlg.cxx13
2 files changed, 43 insertions, 0 deletions
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index d804bdf8f202..bb8c67a7ae85 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -79,6 +79,36 @@ std::unique_ptr<SfxTabPage> SfxCommonPrintOptionsTabPage::Create(weld::Container
return std::make_unique<SfxCommonPrintOptionsTabPage>(pPage, pController, *rAttrSet);
}
+OUString SfxCommonPrintOptionsTabPage::GetAllStrings()
+{
+ OUString sAllStrings;
+ OUString labels[] = { "label4", "label6", "label2", "label3", "label1", "label5" };
+
+ for (const auto& label : labels)
+ sAllStrings += m_xBuilder->weld_label(label)->get_label() + " ";
+
+ OUString checkButton[] = { "converttogray", "reducebitmaptrans", "reducebitmap", "reducetrans",
+ "papersize", "paperorient", "trans", "reducegrad" };
+
+ for (const auto& check : checkButton)
+ sAllStrings += m_xBuilder->weld_check_button(check)->get_label() + " ";
+
+ OUString radioButton[] = { "printer",
+ "file",
+ "reducebitmapresol",
+ "reducebitmapnormal",
+ "reducebitmapoptimal",
+ "reducetransauto",
+ "reducetransnone",
+ "reducegradstripes",
+ "reducegradcolor" };
+
+ for (const auto& radio : radioButton)
+ sAllStrings += m_xBuilder->weld_radio_button(radio)->get_label() + " ";
+
+ return sAllStrings.replaceAll("_", "");
+}
+
bool SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet* /*rSet*/ )
{
std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 34589ca029aa..8f0f41426972 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -166,6 +166,19 @@ bool SfxTabPage::FillItemSet( SfxItemSet* )
return false;
}
+/*
+Returns the visible strings of a dialog.
+
+Supported items:
+- label
+- check button
+- radio button
+- toggle button
+- link button
+- button
+*/
+OUString SfxTabPage::GetAllStrings() { return OUString(); }
+
void SfxTabPage::Reset( const SfxItemSet* )
{
}