[Libreoffice-commits] core.git: cui/source cui/uiconfig solenv/sanitizers

2023-04-25 Thread Caolán McNamara (via logerrit)
 cui/source/inc/paragrph.hxx  |1 +
 cui/source/tabpages/paragrph.cxx |   24 +---
 cui/uiconfig/ui/paraindentspacing.ui |   22 ++
 solenv/sanitizers/ui/cui.suppr   |1 +
 4 files changed, 37 insertions(+), 11 deletions(-)

New commits:
commit bff4282e1c0c7c1f32b93cf5175a721c8226d5de
Author: Caolán McNamara 
AuthorDate: Mon Apr 24 15:10:32 2023 +0100
Commit: Caolán McNamara 
CommitDate: Tue Apr 25 10:05:51 2023 +0200

Resolves: tdf#154958 add an empty spin button to use for the unused case

instead of reusing the percentage one, which will set its min value
under gtk

Change-Id: I342f8f0588574c45c5752964b95232e419f752ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150943
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 688602f122dc..2b6f26fd25d8 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -69,6 +69,7 @@ private:
 std::unique_ptr m_xLineDist;
 std::unique_ptr m_xLineDistAtPercentBox;
 std::unique_ptr m_xLineDistAtMetricBox;
+std::unique_ptr m_xLineDistAtPlaceHolderBox;
 std::unique_ptr m_xLineDistAtLabel;
 std::unique_ptr m_xAbsDist;
 
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index a873f0f8a584..8a3b443cae42 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -899,6 +899,7 @@ 
SvxStdParagraphTabPage::SvxStdParagraphTabPage(weld::Container* pPage, weld::Dia
 , m_xLineDist(m_xBuilder->weld_combo_box("comboLB_LINEDIST"))
 , 
m_xLineDistAtPercentBox(m_xBuilder->weld_metric_spin_button("spinED_LINEDISTPERCENT",
 FieldUnit::PERCENT))
 , 
m_xLineDistAtMetricBox(m_xBuilder->weld_metric_spin_button("spinED_LINEDISTMETRIC",
 FieldUnit::CM))
+, 
m_xLineDistAtPlaceHolderBox(m_xBuilder->weld_metric_spin_button("spinED_BLANK", 
FieldUnit::CM))
 , m_xLineDistAtLabel(m_xBuilder->weld_label("labelFT_LINEDIST"))
 , m_xAbsDist(m_xBuilder->weld_label("labelST_LINEDIST_ABS"))
 , m_xRegisterCB(m_xBuilder->weld_check_button("checkCB_REGISTER"))
@@ -910,6 +911,8 @@ 
SvxStdParagraphTabPage::SvxStdParagraphTabPage(weld::Container* pPage, weld::Dia
 SetExchangeSupport();
 
 m_xLineDistAtMetricBox->hide();
+m_xLineDistAtPlaceHolderBox->hide();
+m_xLineDistAtPlaceHolderBox->set_text(OUString());
 
 Init_Impl();
 m_aFLineIndent.set_min(-, FieldUnit::NONE);// is set to 0 on 
default
@@ -1013,10 +1016,9 @@ IMPL_LINK(SvxStdParagraphTabPage, LineDistHdl_Impl, 
weld::ComboBox&, rBox, void)
 case LLINESPACE_15:
 case LLINESPACE_2:
 m_xLineDistAtLabel->set_sensitive(false);
-m_xLineDistAtPercentBox->set_sensitive(false);
-m_xLineDistAtPercentBox->set_text(OUString());
-m_xLineDistAtMetricBox->set_sensitive(false);
-m_xLineDistAtMetricBox->set_text(OUString());
+m_xLineDistAtPercentBox->hide();
+m_xLineDistAtMetricBox->hide();
+m_xLineDistAtPlaceHolderBox->show();
 break;
 
 case LLINESPACE_DURCH:
@@ -1024,32 +1026,32 @@ IMPL_LINK(SvxStdParagraphTabPage, LineDistHdl_Impl, 
weld::ComboBox&, rBox, void)
 // limit MS min(10, aPageSize)
 m_xLineDistAtMetricBox->set_min(0, FieldUnit::NONE);
 
-if (m_xLineDistAtMetricBox->get_text().isEmpty())
+if (m_xLineDistAtPlaceHolderBox->get_visible())
 
m_xLineDistAtMetricBox->set_value(m_xLineDistAtMetricBox->normalize(1), 
FieldUnit::NONE);
+m_xLineDistAtPlaceHolderBox->hide();
 m_xLineDistAtPercentBox->hide();
 m_xLineDistAtMetricBox->show();
-m_xLineDistAtMetricBox->set_sensitive(true);
 m_xLineDistAtLabel->set_sensitive(true);
 break;
 
 case LLINESPACE_MIN:
 m_xLineDistAtMetricBox->set_min(0, FieldUnit::NONE);
 
-if (m_xLineDistAtMetricBox->get_text().isEmpty())
+if (m_xLineDistAtPlaceHolderBox->get_visible())
 
m_xLineDistAtMetricBox->set_value(m_xLineDistAtMetricBox->normalize(10), 
FieldUnit::TWIP);
+m_xLineDistAtPlaceHolderBox->hide();
 m_xLineDistAtPercentBox->hide();
 m_xLineDistAtMetricBox->show();
-m_xLineDistAtMetricBox->set_sensitive(true);
 m_xLineDistAtLabel->set_sensitive(true);
 break;
 
 case LLINESPACE_PROP:
 
-if (m_xLineDistAtPercentBox->get_text().isEmpty())
+if (m_xLineDistAtPlaceHolderBox->get_visible())
 
m_xLineDistAtPercentBox->set_value(m_xLineDistAtPercentBox->normalize(100), 
FieldUnit::TWIP);
+m_xLineDistAtPlaceHolderBox->hide();
 m_xLineDistAtMetricBox->hide();
 m_xLineDistAtPercentBox->show();
-

[Libreoffice-commits] core.git: cui/source cui/uiconfig solenv/sanitizers

2019-09-30 Thread Caolán McNamara (via logerrit)
 cui/source/inc/autocdlg.hxx   |1 
 cui/source/options/optaboutconfig.cxx |  362 +-
 cui/source/options/optaboutconfig.hxx |   52 ++--
 cui/source/options/optjava.cxx|   14 -
 cui/source/options/optjava.hxx|2 
 cui/uiconfig/ui/aboutconfigdialog.ui  |  317 +++--
 solenv/sanitizers/ui/cui.suppr|5 
 7 files changed, 398 insertions(+), 355 deletions(-)

New commits:
commit c6bee0aad804c32a4367adc04878648427b06b5a
Author: Caolán McNamara 
AuthorDate: Sun Sep 29 17:29:28 2019 +0100
Commit: Caolán McNamara 
CommitDate: Mon Sep 30 20:32:06 2019 +0200

weld CuiAboutConfigTabPage

Change-Id: I7bc83277503b7981b05fd358b0fd68e19d8232ae
Reviewed-on: https://gerrit.libreoffice.org/79819
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 3def561b87d0..dbf437dfbe5a 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -177,6 +177,7 @@ private:
 std::unique_ptr m_xNewReplacePB;
 std::unique_ptr m_xReplacePB;
 std::unique_ptr m_xDeleteReplacePB;
+std::unique_ptr m_xButtonBox;
 
 DECL_LINK(SelectHdl, weld::TreeView&, void);
 DECL_LINK(NewDelButtonHdl, weld::Button&, void);
diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index 66f3f1cde343..03594de79947 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -132,99 +133,112 @@ IMPL_LINK(CuiAboutConfigValueDialog, KeyInputHdl, const 
KeyEvent&, rKeyEvent, bo
 return !bValid;
 }
 
-CuiAboutConfigTabPage::CuiAboutConfigTabPage( vcl::Window* pParent/*, const 
SfxItemSet& rItemSet*/ ) :
-ModalDialog( pParent, "AboutConfig", "cui/ui/aboutconfigdialog.ui"),
-m_pPrefCtrl( get("preferences") ),
-m_pResetBtn( get("reset") ),
-m_pEditBtn( get("edit") ),
-m_pSearchBtn( get("searchButton") ),
-m_pSearchEdit( get("searchEntry") ),
-m_vectorOfModified(),
-m_pPrefBox( VclPtr::Create(*m_pPrefCtrl, WB_SCROLL | 
WB_HSCROLL | WB_VSCROLL ) )
+CuiAboutConfigTabPage::CuiAboutConfigTabPage(weld::Window* pParent)
+: GenericDialogController(pParent, "cui/ui/aboutconfigdialog.ui", 
"AboutConfig")
+, m_xResetBtn(m_xBuilder->weld_button("reset"))
+, m_xEditBtn(m_xBuilder->weld_button("edit"))
+, m_xSearchBtn(m_xBuilder->weld_button("searchButton"))
+, m_xSearchEdit(m_xBuilder->weld_entry("searchEntry"))
+, m_xPrefBox(m_xBuilder->weld_tree_view("preferences"))
+, m_xScratchIter(m_xPrefBox->make_iterator())
+, m_vectorOfModified()
+, m_bSorted(false)
 {
-Size aControlSize(LogicToPixel(Size(385, 230), 
MapMode(MapUnit::MapAppFont)));
-m_pPrefCtrl->set_width_request(aControlSize.Width());
-m_pPrefCtrl->set_height_request(aControlSize.Height());
+m_xPrefBox->set_size_request(m_xPrefBox->get_approximate_digit_width() * 
100,
+ m_xPrefBox->get_height_rows(28));
+m_xPrefBox->connect_column_clicked(LINK(this, CuiAboutConfigTabPage, 
HeaderBarClick));
 
-m_pEditBtn->SetClickHdl( LINK( this, CuiAboutConfigTabPage, 
StandardHdl_Impl ) );
-m_pResetBtn->SetClickHdl( LINK( this, CuiAboutConfigTabPage, 
ResetBtnHdl_Impl ) );
-m_pPrefBox->SetDoubleClickHdl( LINK(this, CuiAboutConfigTabPage, 
DoubleClickHdl_Impl) );
-m_pPrefBox->SetExpandingHdl( LINK(this, CuiAboutConfigTabPage, 
ExpandingHdl_Impl) );
-m_pSearchBtn->SetClickHdl( LINK(this, CuiAboutConfigTabPage, 
SearchHdl_Impl) );
-
-m_pPrefBox->InsertHeaderEntry(get("preference")->GetText());
-m_pPrefBox->InsertHeaderEntry(get("property")->GetText());
-m_pPrefBox->InsertHeaderEntry(get("type")->GetText());
-m_pPrefBox->InsertHeaderEntry(get("value")->GetText());
-
-float fWidth = approximate_char_width();
-
-long aTabs[] = {0,0,0,0};
-aTabs[1] = fWidth * 65;
-aTabs[2] = aTabs[1] + fWidth * 20;
-aTabs[3] = aTabs[2] + fWidth * 8;
+m_xEditBtn->connect_clicked(LINK( this, CuiAboutConfigTabPage, 
StandardHdl_Impl));
+m_xResetBtn->connect_clicked(LINK( this, CuiAboutConfigTabPage, 
ResetBtnHdl_Impl));
+m_xPrefBox->connect_row_activated(LINK(this, CuiAboutConfigTabPage, 
DoubleClickHdl_Impl));
+m_xPrefBox->connect_expanding(LINK(this, CuiAboutConfigTabPage, 
ExpandingHdl_Impl));
+m_xSearchBtn->connect_clicked(LINK(this, CuiAboutConfigTabPage, 
SearchHdl_Impl));
 
 m_options.AlgorithmType2 = util::SearchAlgorithms2::ABSOLUTE;
 m_options.transliterateFlags |= TransliterationFlags::IGNORE_CASE;
 m_options.searchFlag |= (util::SearchFlags::REG_NOT_BEGINOFLINE |
 util::SearchFlags::REG_NOT_ENDOFLINE);
 
-m_pPrefBox->SetTabs(SAL_N_ELEMENTS(aTabs), aTabs, MapUnit::MapPixel);
-

[Libreoffice-commits] core.git: cui/source cui/uiconfig solenv/sanitizers

2018-11-13 Thread Libreoffice Gerrit user
 cui/source/dialogs/SignSignatureLineDialog.cxx |   87 ++---
 cui/source/dialogs/SignatureLineDialogBase.cxx |3 
 cui/source/inc/SignSignatureLineDialog.hxx |6 +
 cui/uiconfig/ui/signsignatureline.ui   |   73 
 solenv/sanitizers/ui/cui.suppr |1 
 5 files changed, 160 insertions(+), 10 deletions(-)

New commits:
commit ba4390968a6df9a3598d9d5b70b84dfc634ee31b
Author: Samuel Mehrbrodt 
AuthorDate: Mon Nov 12 14:56:38 2018 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Nov 13 12:06:45 2018 +0100

tdf#118568 Use custom image for signing signature line

Change-Id: Ib3c4d2301bf5e68b7c02590a8947ea3a502e7087
Reviewed-on: https://gerrit.libreoffice.org/63325
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/source/dialogs/SignSignatureLineDialog.cxx 
b/cui/source/dialogs/SignSignatureLineDialog.cxx
index d35c5db3f98b..d189aabde24e 100644
--- a/cui/source/dialogs/SignSignatureLineDialog.cxx
+++ b/cui/source/dialogs/SignSignatureLineDialog.cxx
@@ -9,22 +9,26 @@
 
 #include 
 
-#include 
 #include 
+#include 
 
 #include 
 #include 
 
+#include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
-#include 
-#include 
-#include 
 
 #include 
 #include 
@@ -40,6 +44,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 using namespace comphelper;
 using namespace css;
@@ -53,12 +60,15 @@ using namespace css::text;
 using namespace css::drawing;
 using namespace css::graphic;
 using namespace css::security;
+using namespace css::ui::dialogs;
 
 SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, 
Reference xModel)
 : SignatureLineDialogBase(pParent, std::move(xModel), 
"cui/ui/signsignatureline.ui",
   "SignSignatureLineDialog")
 , m_xEditName(m_xBuilder->weld_entry("edit_name"))
 , m_xEditComment(m_xBuilder->weld_text_view("edit_comment"))
+, m_xBtnLoadImage(m_xBuilder->weld_button("btn_load_image"))
+, m_xBtnClearImage(m_xBuilder->weld_button("btn_clear_image"))
 , 
m_xBtnChooseCertificate(m_xBuilder->weld_button("btn_select_certificate"))
 , m_xBtnSign(m_xBuilder->weld_button("ok"))
 , m_xLabelHint(m_xBuilder->weld_label("label_hint"))
@@ -78,6 +88,8 @@ 
SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, Referenc
 return;
 }
 
+m_xBtnLoadImage->connect_clicked(LINK(this, SignSignatureLineDialog, 
loadImage));
+m_xBtnClearImage->connect_clicked(LINK(this, SignSignatureLineDialog, 
clearImage));
 m_xBtnChooseCertificate->connect_clicked(
 LINK(this, SignSignatureLineDialog, chooseCertificate));
 m_xEditName->connect_changed(LINK(this, SignSignatureLineDialog, 
entryChanged));
@@ -120,6 +132,38 @@ 
SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, Referenc
 ValidateFields();
 }
 
+IMPL_LINK_NOARG(SignSignatureLineDialog, loadImage, weld::Button&, void)
+{
+Reference xContext = 
comphelper::getProcessComponentContext();
+Reference xFilePicker
+= FilePicker::createWithMode(xContext, 
TemplateDescription::FILEOPEN_PREVIEW);
+if (xFilePicker->execute())
+{
+Sequence aSelectedFiles = xFilePicker->getSelectedFiles();
+if (aSelectedFiles.getLength() < 1)
+return;
+
+Reference xProvider = 
GraphicProvider::create(xContext);
+Sequence aMediaProperties(1);
+aMediaProperties[0].Name = "URL";
+aMediaProperties[0].Value <<= aSelectedFiles[0];
+m_xSignatureImage = xProvider->queryGraphic(aMediaProperties);
+m_sOriginalImageBtnLabel = m_xBtnLoadImage->get_label();
+
+INetURLObject aObj(aSelectedFiles[0]);
+m_xBtnLoadImage->set_label(aObj.GetLastName());
+
+ValidateFields();
+}
+}
+
+IMPL_LINK_NOARG(SignSignatureLineDialog, clearImage, weld::Button&, void)
+{
+m_xSignatureImage.set(nullptr);
+m_xBtnLoadImage->set_label(m_sOriginalImageBtnLabel);
+ValidateFields();
+}
+
 IMPL_LINK_NOARG(SignSignatureLineDialog, chooseCertificate, weld::Button&, 
void)
 {
 // Document needs to be saved before selecting a certificate
@@ -150,8 +194,13 @@ IMPL_LINK_NOARG(SignSignatureLineDialog, entryChanged, 
weld::Entry&, void) { Val
 
 void SignSignatureLineDialog::ValidateFields()
 {
-bool bEnable = m_xSelectedCertifate.is() && 
!m_xEditName->get_text().isEmpty();
-m_xBtnSign->set_sensitive(bEnable);
+bool bEnableSignBtn = m_xSelectedCertifate.is()
+  && (!m_xEditName->get_text().isEmpty() || 
m_xSignatureImage.is());
+m_xBtnSign->set_sensitive(bEnableSignBtn);
+
+m_xEditName->set_sensitive(!m_xSignatureImage.is());
+m_xBtnLoadImage->set_sensitive(m_xEditName->get_text().isEmpty());
+m_xBtnClearImage->set_sensitive(m_xSignatureImage.is());
 }
 
 void 

[Libreoffice-commits] core.git: cui/source cui/uiconfig solenv/sanitizers

2018-11-08 Thread Libreoffice Gerrit user
 cui/source/dialogs/about.cxx   |   23 ++-
 cui/source/inc/about.hxx   |1 +
 cui/uiconfig/ui/aboutdialog.ui |   15 ++-
 solenv/sanitizers/ui/cui.suppr |1 +
 4 files changed, 30 insertions(+), 10 deletions(-)

New commits:
commit 396d29d9deccef6fa4ecf9ea8aa6a5d6f6065c53
Author: Caolán McNamara 
AuthorDate: Thu Nov 8 11:24:15 2018 +
Commit: Caolán McNamara 
CommitDate: Thu Nov 8 15:40:59 2018 +0100

Related: tdf#121238 show ui language as well as locale

Change-Id: I350c71f50fdb8f0602badd7a7ad13b3a7c2c85e0
Reviewed-on: https://gerrit.libreoffice.org/63083
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 5a564389f590..648073c75f4c 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -81,6 +81,7 @@ AboutDialog::AboutDialog(vcl::Window* pParent)
 m_aBasedTextStr = get("libreoffice")->GetText();
 m_aBasedDerivedTextStr = get("derived")->GetText();
 m_aLocaleStr = get("locale")->GetText();
+m_aUILocaleStr = get("uilocale")->GetText();
 m_buildIdLinkString = m_pBuildIdLink->GetText();
 
 m_pVersion->SetText(GetVersionString());
@@ -307,6 +308,7 @@ OUString AboutDialog::GetVersionString()
 OUString sBuildId = GetBuildId();
 
 OUString aLocaleStr = 
Application::GetSettings().GetLanguageTag().getBcp47() + " (" + 
GetLocaleString() + ")";
+OUString aUILocaleStr = 
Application::GetSettings().GetUILanguageTag().getBcp47();
 
 if (!sBuildId.trim().isEmpty())
 {
@@ -328,16 +330,19 @@ OUString AboutDialog::GetVersionString()
 sVersion += "\n" EXTRA_BUILDID;
 }
 
-if (!aLocaleStr.trim().isEmpty())
+if (m_aLocaleStr.indexOf("$LOCALE") == -1)
 {
-sVersion += "\n";
-if (m_aLocaleStr.indexOf("$LOCALE") == -1)
-{
-SAL_WARN( "cui.dialogs", "translated locale string in translations 
doesn't contain $LOCALE placeholder" );
-m_aLocaleStr += " $LOCALE";
-}
-sVersion += m_aLocaleStr.replaceAll("$LOCALE", aLocaleStr);
+SAL_WARN( "cui.dialogs", "translated locale string in translations 
doesn't contain $LOCALE placeholder" );
+m_aLocaleStr += " $LOCALE";
+}
+sVersion += "\n" + m_aLocaleStr.replaceAll("$LOCALE", aLocaleStr);
+
+if (m_aUILocaleStr.indexOf("$LOCALE") == -1)
+{
+SAL_WARN( "cui.dialogs", "translated uilocale string in translations 
doesn't contain $LOCALE placeholder" );
+m_aUILocaleStr += " $LOCALE";
 }
+sVersion += "; " + m_aUILocaleStr.replaceAll("$LOCALE", aUILocaleStr);
 
 OUString aCalcMode = "Calc: "; // Calc calculation mode
 
@@ -359,7 +364,7 @@ OUString AboutDialog::GetVersionString()
 aCalcMode += "threaded";
 }
 
-sVersion += "; " + aCalcMode;
+sVersion += "\n" + aCalcMode;
 
 return sVersion;
 }
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index 9ea511c4488b..9885cdec7d47 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -52,6 +52,7 @@ private:
 OUString m_aCreditsLinkStr;
 OUString m_sBuildStr;
 OUString m_aLocaleStr;
+OUString m_aUILocaleStr;
 OUString m_buildIdLinkString;
 
 void SetBuildIdLink();
diff --git a/cui/uiconfig/ui/aboutdialog.ui b/cui/uiconfig/ui/aboutdialog.ui
index 2d279b14379b..ac2746111731 100644
--- a/cui/uiconfig/ui/aboutdialog.ui
+++ b/cui/uiconfig/ui/aboutdialog.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -162,6 +162,19 @@
 0
   
 
+
+  
+False
+True
+True
+UI-Language: $LOCALE
+center
+  
+  
+0
+3
+  
+
   
   
 False
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index 827ff319ed1e..46597941bb8d 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -2,6 +2,7 @@ cui/uiconfig/ui/aboutdialog.ui://GtkImage[@id='logo'] 
no-labelled-by
 cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='logoreplacement'] orphan-label
 cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='buildid'] orphan-label
 cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='locale'] orphan-label
+cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='uilocale'] orphan-label
 cui/uiconfig/ui/aboutdialog.ui://GtkTextView[@id='version'] no-labelled-by
 cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='description'] orphan-label
 cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='copyright'] orphan-label
___
Libreoffice-commits mailing list

[Libreoffice-commits] core.git: cui/source cui/uiconfig solenv/sanitizers

2018-10-17 Thread Libreoffice Gerrit user
 cui/source/options/personalization.cxx |   24 
 cui/source/options/personalization.hxx |2 
 cui/uiconfig/ui/personalization_tab.ui |   91 +
 solenv/sanitizers/ui/cui.suppr |6 ++
 4 files changed, 99 insertions(+), 24 deletions(-)

New commits:
commit 7e3ee1673c3e59f5e98158c4edd14a57df95e1cd
Author: Muhammet Kara 
AuthorDate: Wed Oct 17 20:35:47 2018 +0300
Commit: Muhammet Kara 
CommitDate: Wed Oct 17 21:57:47 2018 +0200

Increase number of default personas to 6

Also:
 * Prepare the ui file for up to 9 default personas
 * And make the click handlers future-proof for different numbers

Change-Id: Iddf3b1c07feff12dc1fbba3e8a881ddf04923ced
Reviewed-on: https://gerrit.libreoffice.org/61891
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index e745b56976a3..fb4032fa76fd 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -439,14 +439,12 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( 
vcl::Window *pParent, cons
 get( m_pSelectPersona, "select_persona" );
 m_pSelectPersona->SetClickHdl( LINK( this, SvxPersonalizationTabPage, 
SelectPersona ) );
 
-get( m_vDefaultPersonaImages[0], "default1" );
-m_vDefaultPersonaImages[0]->SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
-
-get( m_vDefaultPersonaImages[1], "default2" );
-m_vDefaultPersonaImages[1]->SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
-
-get( m_vDefaultPersonaImages[2], "default3" );
-m_vDefaultPersonaImages[2]->SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+for (sal_uInt32 i = 0; i < MAX_DEFAULT_PERSONAS; ++i)
+{
+OUString sDefaultId("default" + OUString::number(i));
+get( m_vDefaultPersonaImages[i], OUStringToOString(sDefaultId, 
RTL_TEXTENCODING_UTF8) );
+m_vDefaultPersonaImages[i]->SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+}
 
 get( m_pPersonaList, "installed_personas" );
 m_pPersonaList->SetSelectHdl( LINK( this, SvxPersonalizationTabPage, 
SelectInstalledPersona ) );
@@ -601,12 +599,13 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
 while( aStream.IsOpen() && !aStream.eof() && nIndex < MAX_DEFAULT_PERSONAS 
)
 {
 OString aLine;
-OUString aPersonaSetting, aPreviewFile;
-sal_Int32 nPreviewIndex = 0;
+OUString aPersonaSetting, aPreviewFile, aName;
+sal_Int32 nParseIndex = 0;
 
 aStream.ReadLine( aLine );
 aPersonaSetting = OStringToOUString( aLine, RTL_TEXTENCODING_UTF8 );
-aPreviewFile = aPersonaSetting.getToken( 2, ';', nPreviewIndex );
+aName = aPersonaSetting.getToken( 1, ';', nParseIndex );
+aPreviewFile = aPersonaSetting.getToken( 0, ';', nParseIndex );
 
 if (aPreviewFile.isEmpty())
 break;
@@ -619,6 +618,7 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
 aFilter.ImportGraphic( aGraphic, aURLObj );
 BitmapEx aBmp = aGraphic.GetBitmapEx();
 m_vDefaultPersonaImages[nIndex]->SetModeImage( Image( aBmp ) );
+m_vDefaultPersonaImages[nIndex]->SetQuickHelpText(aName);
 m_vDefaultPersonaImages[nIndex++]->Show();
 foundOne = true;
 }
@@ -694,7 +694,7 @@ IMPL_LINK( SvxPersonalizationTabPage, ForceSelect, Button*, 
pButton, void )
 IMPL_LINK( SvxPersonalizationTabPage, DefaultPersona, Button*, pButton, void )
 {
 m_pDefaultPersona->Check();
-for( sal_Int32 nIndex = 0; nIndex < MAX_DEFAULT_PERSONAS; nIndex++ )
+for( sal_Int32 nIndex = 0; nIndex < MAX_DEFAULT_PERSONAS; ++nIndex )
 {
 if( pButton == m_vDefaultPersonaImages[nIndex] )
 m_aPersonaSettings = m_vDefaultPersonaSettings[nIndex];
diff --git a/cui/source/options/personalization.hxx 
b/cui/source/options/personalization.hxx
index cbdcec569fa8..e05a27842b7b 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -20,7 +20,7 @@
 
 #define CATEGORYCOUNT 6 // Number of persona categories
 #define MAX_RESULTS 9   // Maximum number of search results
-#define MAX_DEFAULT_PERSONAS 3  // Maximum number of default personas
+#define MAX_DEFAULT_PERSONAS 6  // Maximum number of default personas
 /*
  * The category which will be loaded initially.
Should be a non-negative integer lower than CATEGORYCOUNT
diff --git a/cui/uiconfig/ui/personalization_tab.ui 
b/cui/uiconfig/ui/personalization_tab.ui
index 588583ab4328..36f41a4ef423 100644
--- a/cui/uiconfig/ui/personalization_tab.ui
+++ b/cui/uiconfig/ui/personalization_tab.ui
@@ -61,7 +61,7 @@
   
 
 
-  
+  
 True
 False
 

[Libreoffice-commits] core.git: cui/source cui/uiconfig solenv/sanitizers

2018-09-28 Thread Libreoffice Gerrit user
 cui/source/options/personalization.cxx |9 --
 cui/uiconfig/ui/personalization_tab.ui |  118 +++--
 solenv/sanitizers/ui/cui.suppr |3 
 3 files changed, 28 insertions(+), 102 deletions(-)

New commits:
commit c494273adea0293bbcfc022adc0ea13d5c21e18d
Author: Muhammet Kara 
AuthorDate: Thu Sep 27 20:57:53 2018 +0200
Commit: Muhammet Kara 
CommitDate: Fri Sep 28 20:01:34 2018 +0200

Revert "Personas: add 6 themes to the selection dialog"

This reverts commit 9927a3ab9edec7ae9f41ecaa8025a2a920321997.

Change-Id: I7282bb5734c4cad2cf2d375d4a6bfc03a759ce19
Reviewed-on: https://gerrit.libreoffice.org/61055
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index a398b84592ca..6ac90e7fea3b 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -297,15 +297,6 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( 
vcl::Window *pParent, cons
 get( m_vDefaultPersonaImages[2], "default3" );
 m_vDefaultPersonaImages[2]->SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
 
-get( m_vDefaultPersonaImages[3], "default4" );
-m_vDefaultPersonaImages[3]->SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
-
-get( m_vDefaultPersonaImages[4], "default5" );
-m_vDefaultPersonaImages[4]->SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
-
-get( m_vDefaultPersonaImages[5], "default6" );
-m_vDefaultPersonaImages[5]->SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
-
 get( m_pPersonaList, "installed_personas" );
 m_pPersonaList->SetSelectHdl( LINK( this, SvxPersonalizationTabPage, 
SelectInstalledPersona ) );
 
diff --git a/cui/uiconfig/ui/personalization_tab.ui 
b/cui/uiconfig/ui/personalization_tab.ui
index 43ef274483b0..588583ab4328 100644
--- a/cui/uiconfig/ui/personalization_tab.ui
+++ b/cui/uiconfig/ui/personalization_tab.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -64,105 +64,43 @@
   
 True
 False
-vertical
 
-  
-True
-False
-
-  
-True
-True
-True
-True
-  
-  
-False
-True
-0
-  
-
-
-  
-True
-True
-True
-True
-  
-  
-False
-True
-1
-  
-
-
-  
-True
-True
-True
-True
-  
-  
-False
-True
-2
-  
-
+  
+True
+True
+True
+True
   
   
-True
+False
 True
 0
   
 
 
-  
-True
-False
-
-  
-True
-True
-True
-True
-  
-  
-False
-True
-0
-  
-
-
-  
-True
-True
-True
-True
-  
-  
-False
-True
-1
-  
-
-
-  
-True
-True
-True
-True

[Libreoffice-commits] core.git: cui/source cui/uiconfig solenv/sanitizers

2018-09-24 Thread Libreoffice Gerrit user
 cui/source/options/personalization.cxx |9 ++
 cui/uiconfig/ui/personalization_tab.ui |  118 +
 solenv/sanitizers/ui/cui.suppr |3 
 3 files changed, 102 insertions(+), 28 deletions(-)

New commits:
commit 9927a3ab9edec7ae9f41ecaa8025a2a920321997
Author: andreas kainz 
AuthorDate: Mon Sep 24 13:35:00 2018 +0200
Commit: andreas_kainz 
CommitDate: Mon Sep 24 23:52:09 2018 +0200

Personas: add 6 themes to the selection dialog

Change-Id: I1e8c28f477602c7578ca7e40bd7d14550dc1aaf8
Reviewed-on: https://gerrit.libreoffice.org/60930
Tested-by: Jenkins
Reviewed-by: andreas_kainz 

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 6ac90e7fea3b..a398b84592ca 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -297,6 +297,15 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( 
vcl::Window *pParent, cons
 get( m_vDefaultPersonaImages[2], "default3" );
 m_vDefaultPersonaImages[2]->SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
 
+get( m_vDefaultPersonaImages[3], "default4" );
+m_vDefaultPersonaImages[3]->SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+
+get( m_vDefaultPersonaImages[4], "default5" );
+m_vDefaultPersonaImages[4]->SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+
+get( m_vDefaultPersonaImages[5], "default6" );
+m_vDefaultPersonaImages[5]->SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+
 get( m_pPersonaList, "installed_personas" );
 m_pPersonaList->SetSelectHdl( LINK( this, SvxPersonalizationTabPage, 
SelectInstalledPersona ) );
 
diff --git a/cui/uiconfig/ui/personalization_tab.ui 
b/cui/uiconfig/ui/personalization_tab.ui
index a5990c1b1c8f..4edf02fcfe7c 100644
--- a/cui/uiconfig/ui/personalization_tab.ui
+++ b/cui/uiconfig/ui/personalization_tab.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -64,43 +64,105 @@
   
 True
 False
+vertical
 
-  
-True
-True
-True
-True
+  
+True
+False
+
+  
+True
+True
+True
+True
+  
+  
+False
+True
+0
+  
+
+
+  
+True
+True
+True
+True
+  
+  
+False
+True
+1
+  
+
+
+  
+True
+True
+True
+True
+  
+  
+False
+True
+2
+  
+
   
   
-False
+True
 True
 0
   
 
 
-  
-True
-True
-True
-True
-  
-  
-False
-True
-1
-  
-
-
-  
-True
-True
-True
-True
+  
+True
+False
+
+  
+True
+True
+True
+True
+  
+  
+False
+True
+0
+  
+
+
+  
+True
+True
+True
+