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

2023-11-25 Thread Julien Nabet (via logerrit)
 cui/source/dialogs/hlinettp.cxx  |   27 
 cui/source/inc/hlinettp.hxx  |1 
 cui/uiconfig/ui/hyperlinkinternetpage.ui |   52 ---
 3 files changed, 2 insertions(+), 78 deletions(-)

New commits:
commit 8b50a615cbf6c09ed9cf6af6336e388cd32db28e
Author: Julien Nabet 
AuthorDate: Sat Nov 25 09:58:49 2023 +0100
Commit: Julien Nabet 
CommitDate: Sat Nov 25 12:08:24 2023 +0100

tdf#158357: UI simplify Hyperlink dialog by removing Hyperlink type 
radiobutton

+ rename "Hyperlink Type" into "Hyperlink Settings"
+ remove "Protocol" since ther's only 1 now

Change-Id: I9435606c6ac6eca87afc4c259fb1121f65638c0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159947
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 21cf34b3c7b6..c74d6ae10699 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -36,7 +36,6 @@ 
SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent,
 : SvxHyperlinkTabPageBase(pParent, pDlg, 
"cui/ui/hyperlinkinternetpage.ui", "HyperlinkInternetPage",
   pItemSet)
 , m_bMarkWndOpen(false)
-, m_xRbtLinktypInternet(xBuilder->weld_radio_button("linktyp_internet"))
 , m_xCbbTarget(new SvxHyperURLBox(xBuilder->weld_combo_box("target")))
 , m_xFtTarget(xBuilder->weld_label("target_label"))
 {
@@ -56,12 +55,7 @@ 
SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent,
 
 SetExchangeSupport ();
 
-// set defaults
-m_xRbtLinktypInternet->set_active(true);
-
 // set handlers
-Link aLink( LINK ( this, SvxHyperlinkInternetTp, 
Click_SmartProtocol_Impl ) );
-m_xRbtLinktypInternet->connect_toggled( aLink );
 m_xCbbTarget->connect_focus_out( LINK ( this, SvxHyperlinkInternetTp, 
LostFocusTargetHdl_Impl ) );
 m_xCbbTarget->connect_changed( LINK ( this, SvxHyperlinkInternetTp, 
ModifiedTargetHdl_Impl ) );
 maTimer.SetInvokeHandler ( LINK ( this, SvxHyperlinkInternetTp, 
TimeoutHdl_Impl ) );
@@ -167,12 +161,6 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, TimeoutHdl_Impl, 
Timer *, void)
 
 void SvxHyperlinkInternetTp::SetScheme(std::u16string_view rScheme)
 {
-//if rScheme is empty or unknown the default behaviour is like it where 
HTTP
-bool bInternet = true;
-
-//update protocol button selection:
-m_xRbtLinktypInternet->set_active(bInternet);
-
 //update target:
 RemoveImproperProtocol(rScheme);
 m_xCbbTarget->SetSmartProtocol( GetSmartProtocolFromButtons() );
@@ -221,19 +209,6 @@ INetProtocol 
SvxHyperlinkInternetTp::GetSmartProtocolFromButtons()
 return INetProtocol::Http;
 }
 
-/*
-|*
-|* Click on Radiobutton : WWW or ...
-|*
-|/
-IMPL_LINK(SvxHyperlinkInternetTp, Click_SmartProtocol_Impl, weld::Toggleable&, 
rButton, void)
-{
-if (!rButton.get_active())
-return;
-OUString aScheme = GetSchemeFromButtons();
-SetScheme(aScheme);
-}
-
 /*
 |*
 |* Combobox Target lost the focus
@@ -246,7 +221,7 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, 
LostFocusTargetHdl_Impl, weld::Widget&,
 
 void SvxHyperlinkInternetTp::RefreshMarkWindow()
 {
-if (m_xRbtLinktypInternet->get_active() && IsMarkWndVisible())
+if (IsMarkWndVisible())
 {
 weld::WaitObject aWait(mpDialog->getDialog());
 OUString aStrURL( CreateAbsoluteURL() );
diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx
index bb86dff9ca5e..ad308a401f45 100644
--- a/cui/source/inc/hlinettp.hxx
+++ b/cui/source/inc/hlinettp.hxx
@@ -36,7 +36,6 @@ class SvxHyperlinkInternetTp : public SvxHyperlinkTabPageBase
 private:
 boolm_bMarkWndOpen;
 
-std::unique_ptr m_xRbtLinktypInternet;
 std::unique_ptr m_xCbbTarget;
 std::unique_ptr m_xFtTarget;
 
diff --git a/cui/uiconfig/ui/hyperlinkinternetpage.ui 
b/cui/uiconfig/ui/hyperlinkinternetpage.ui
index 6a6a191a6b91..0031207e8f51 100644
--- a/cui/uiconfig/ui/hyperlinkinternetpage.ui
+++ b/cui/uiconfig/ui/hyperlinkinternetpage.ui
@@ -25,40 +25,6 @@
 12
 12
 6
-
-  
-  
-True
-False
-True
-6
-12
-
-  
-_Web
-True
-True
-False
-True
-True
-True
-
-  
-Creates an 
"http://"; hyperlink.
-  
-
-  
-  
-   

[Libreoffice-commits] core.git: cui/source cui/uiconfig cui/UIConfig_cui.mk include/cui

2023-11-19 Thread Samuel Mehrbrodt (via logerrit)
 cui/UIConfig_cui.mk   |1 
 cui/source/dialogs/dlgname.cxx|  109 
 cui/source/options/optaboutconfig.cxx |   37 +++--
 cui/uiconfig/ui/listdialog.ui |  231 ++
 include/cui/dlgname.hxx   |   26 +++
 5 files changed, 389 insertions(+), 15 deletions(-)

New commits:
commit 847db3fa1244c2707e1966d3e6579258bb6d8924
Author: Samuel Mehrbrodt 
AuthorDate: Thu Nov 16 21:33:25 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Nov 20 08:24:51 2023 +0100

tdf#157438 Make string lists editable in expert config

Change-Id: Ia8b8553d547e760c18624c5c599951523b74ac82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159523
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 97a4a56f3ecc..10acd83c8c39 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -113,6 +113,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/linetabpage \
cui/uiconfig/ui/lineendstabpage \
cui/uiconfig/ui/linestyletabpage \
+   cui/uiconfig/ui/listdialog \
cui/uiconfig/ui/macroassigndialog \
cui/uiconfig/ui/macroassignpage \
cui/uiconfig/ui/macroselectordialog \
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index a96b59290bbd..a06833bb6ce6 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -19,6 +19,8 @@
 
 #include 
 
+#include 
+
 /*
 |*
 |* Dialog for editing a name
@@ -144,4 +146,111 @@ IMPL_LINK_NOARG(SvxObjectTitleDescDialog, DecorativeHdl, 
weld::Toggleable&, void
 m_xDescriptionFT->set_sensitive(bEnable);
 }
 
+SvxListDialog::SvxListDialog(weld::Window* pParent)
+: GenericDialogController(pParent, "cui/ui/listdialog.ui", "ListDialog")
+, m_xList(m_xBuilder->weld_tree_view("assignlist"))
+, m_xAddBtn(m_xBuilder->weld_button("addbtn"))
+, m_xRemoveBtn(m_xBuilder->weld_button("removebtn"))
+, m_xEditBtn(m_xBuilder->weld_button("editbtn"))
+{
+m_xList->set_size_request(m_xList->get_approximate_digit_width() * 54,
+  m_xList->get_height_rows(6));
+m_xAddBtn->connect_clicked(LINK(this, SvxListDialog, AddHdl_Impl));
+m_xRemoveBtn->connect_clicked(LINK(this, SvxListDialog, RemoveHdl_Impl));
+m_xEditBtn->connect_clicked(LINK(this, SvxListDialog, EditHdl_Impl));
+m_xList->connect_changed(LINK(this, SvxListDialog, SelectHdl_Impl));
+m_xList->connect_row_activated(LINK(this, SvxListDialog, 
DblClickHdl_Impl));
+
+SelectionChanged();
+}
+
+SvxListDialog::~SvxListDialog() {}
+
+IMPL_LINK_NOARG(SvxListDialog, AddHdl_Impl, weld::Button&, void)
+{
+SvxNameDialog aNameDlg(m_xDialog.get(), "", "blabla");
+
+if (!aNameDlg.run())
+return;
+OUString sNewText = comphelper::string::strip(aNameDlg.GetName(), ' ');
+if (!sNewText.isEmpty())
+{
+m_xList->insert_text(-1, sNewText);
+m_xList->select(-1);
+}
+}
+
+IMPL_LINK_NOARG(SvxListDialog, EditHdl_Impl, weld::Button&, void) { 
EditEntry(); }
+
+IMPL_LINK_NOARG(SvxListDialog, SelectHdl_Impl, weld::TreeView&, void) { 
SelectionChanged(); }
+
+IMPL_LINK_NOARG(SvxListDialog, DblClickHdl_Impl, weld::TreeView&, bool)
+{
+EditEntry();
+return true;
+}
+
+IMPL_LINK_NOARG(SvxListDialog, RemoveHdl_Impl, weld::Button&, void)
+{
+int nPos = m_xList->get_selected_index();
+if (nPos == -1)
+return;
+m_xList->remove(nPos);
+int nCount = m_xList->n_children();
+if (nCount)
+{
+if (nPos >= nCount)
+nPos = nCount - 1;
+m_xList->select(nPos);
+}
+SelectionChanged();
+}
+
+void SvxListDialog::SelectionChanged()
+{
+bool bEnable = m_xList->get_selected_index() != -1;
+m_xRemoveBtn->set_sensitive(bEnable);
+m_xEditBtn->set_sensitive(bEnable);
+}
+
+std::vector SvxListDialog::GetEntries() const
+{
+int nCount = m_xList->n_children();
+std::vector aList;
+aList.reserve(nCount);
+for (int i = 0; i < nCount; ++i)
+aList.push_back(m_xList->get_text(i));
+return aList;
+}
+
+void SvxListDialog::SetEntries(std::vector const& rEntries)
+{
+m_xList->clear();
+for (auto const& sEntry : rEntries)
+{
+m_xList->append_text(sEntry);
+}
+SelectionChanged();
+}
+
+void SvxListDialog::EditEntry()
+{
+int nPos = m_xList->get_selected_index();
+if (nPos == -1)
+return;
+
+OUString sOldText(m_xList->get_selected_text());
+SvxNameDialog aNameDlg(m_xDialog.get(), sOldText, "blabla");
+
+if (!aNameDlg.run())
+return;
+OUString sNewText = comphelper::string::strip(aNameDlg.GetName(), ' ');
+if (!sNewText.isEmpty() && sNewText != sOldText)
+{
+m_xList->remove(nPos);
+m_xList->insert_text(nPos, sNewText);
+m_xList->select(nPos);
+

[Libreoffice-commits] core.git: cui/source cui/uiconfig cui/UIConfig_cui.mk include/cui static/CustomTarget_emscripten_fs_image.mk

2023-11-15 Thread Samuel Mehrbrodt (via logerrit)
 cui/UIConfig_cui.mk|1 
 cui/source/dialogs/dlgname.cxx |   22 
 cui/source/options/optaboutconfig.cxx  |  144 ++---
 cui/uiconfig/ui/numberdialog.ui|  128 +
 include/cui/dlgname.hxx|   28 +
 static/CustomTarget_emscripten_fs_image.mk |1 
 6 files changed, 273 insertions(+), 51 deletions(-)

New commits:
commit 1f874d384228867ee450d3e1d53c821519b51722
Author: Samuel Mehrbrodt 
AuthorDate: Thu Nov 9 16:18:35 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 16 08:03:32 2023 +0100

expert config: Proper editing support for numbers

Change-Id: Ib97e027cedfdf2c5bb3c956aeee75af25198e498
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159355
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index e36cfc7f11b6..97a4a56f3ecc 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -124,6 +124,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/newlibdialog \
cui/uiconfig/ui/newtabledialog \
cui/uiconfig/ui/newtoolbardialog \
+   cui/uiconfig/ui/numberdialog \
cui/uiconfig/ui/numberingformatpage \
cui/uiconfig/ui/numberingoptionspage \
cui/uiconfig/ui/numberingpositionpage \
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index a1f6283d92b5..a96b59290bbd 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -60,6 +60,28 @@ IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl, weld::Entry&, void)
 m_xEdtName->set_tooltip_text(rTip);
 }
 
+SvxNumberDialog::SvxNumberDialog(weld::Window* pParent, const OUString& rDesc, 
sal_Int64 nValue,
+ sal_Int64 nMin, sal_Int64 nMax)
+: GenericDialogController(pParent, "cui/ui/numberdialog.ui", 
"NumberDialog")
+, m_xEdtNumber(m_xBuilder->weld_spin_button("number_spinbtn"))
+, m_xFtDescription(m_xBuilder->weld_label("description_label"))
+{
+m_xFtDescription->set_label(rDesc);
+m_xEdtNumber->set_min(nMin);
+m_xEdtNumber->set_max(nMax);
+m_xEdtNumber->set_value(nValue);
+}
+
+SvxDecimalNumberDialog::SvxDecimalNumberDialog(weld::Window* pParent, const 
OUString& rDesc,
+   double fValue)
+: GenericDialogController(pParent, "cui/ui/numberdialog.ui", 
"NumberDialog")
+, m_xEdtNumber(m_xBuilder->weld_formatted_spin_button("number_spinbtn"))
+, m_xFtDescription(m_xBuilder->weld_label("description_label"))
+{
+m_xFtDescription->set_label(rDesc);
+m_xEdtNumber->GetFormatter().SetValue(fValue);
+}
+
 // #i68101#
 // Dialog for editing Object Name
 // plus uniqueness-callback-linkHandler
diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index bdc51afdea51..11806faa8477 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -654,96 +654,138 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, 
StandardHdl_Impl, weld::Button&, void )
 {
 if( bOpenDialog )
 {
-SvxNameDialog aNameDialog(m_pParent, sDialogValue, sPropertyName);
-aNameDialog.SetCheckNameHdl( LINK( this, CuiAboutConfigTabPage, 
ValidNameHdl ) );
-if (aNameDialog.run() == RET_OK )
+if (sPropertyType == "short" || sPropertyType == "int" || 
sPropertyType == "long")
 {
-OUString sNewValue = aNameDialog.GetName();
-bSaveChanges = true;
-if ( sPropertyType == "short")
+sal_Int64 nMin = sPropertyType == "short"
+ ? SAL_MIN_INT16
+ : sPropertyType == "int" ? SAL_MIN_INT32 
: SAL_MIN_INT64;
+sal_Int64 nMax = sPropertyType == "short"
+ ? SAL_MAX_INT16
+ : sPropertyType == "int" ? SAL_MAX_INT32 
: SAL_MAX_INT64;
+SvxNumberDialog aNumberDialog(m_pParent, sPropertyName, 
sDialogValue.toInt64(),
+  nMin, nMax);
+if (aNumberDialog.run() == RET_OK)
 {
-sal_Int16 nShort;
-sal_Int32 nNumb = sNewValue.toInt32();
-
-//if the value is 0 and length is not 1, there is 
something wrong
-if( ( nNumb==0 && sNewValue.getLength()!=1 ) || nNumb > 
SAL_MAX_INT16 || nNumb < SAL_MIN_INT16)
-throw uno::Exception("out of range short", nullptr);
-nShort = static_cast(nNumb);
-pProperty->Value <<= nShort;
-}
-else if( sPropertyType == "int" )
-{
-sal_Int32 nLong = sNewValue.toInt32();
-if( nLong==0 && sNe

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

2023-11-09 Thread Michael Stahl (via logerrit)
 cui/source/options/optinet2.cxx |   62 --
 cui/source/options/optinet2.hxx |7 ---
 cui/uiconfig/ui/optproxypage.ui |   93 
 3 files changed, 2 insertions(+), 160 deletions(-)

New commits:
commit 7e5630b7b09f605aaba6ea8f54ff4c3761fe63db
Author: Michael Stahl 
AuthorDate: Tue Nov 7 12:46:37 2023 +0100
Commit: Michael Stahl 
CommitDate: Thu Nov 9 16:53:15 2023 +0100

tdf#146386 cui: remove FTP UI, SvxProxyTabPage

Change-Id: I0831b1d99052c1fa8f0be38bee08eb712a168445
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159072
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 979d920bc38f..083c3e40f784 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -98,8 +98,6 @@ constexpr OUString g_aHttpProxyPN = 
u"ooInetHTTPProxyName"_ustr;
 constexpr OUString g_aHttpPortPN = u"ooInetHTTPProxyPort"_ustr;
 constexpr OUString g_aHttpsProxyPN = u"ooInetHTTPSProxyName"_ustr;
 constexpr OUString g_aHttpsPortPN = u"ooInetHTTPSProxyPort"_ustr;
-constexpr OUString g_aFtpProxyPN = u"ooInetFTPProxyName"_ustr;
-constexpr OUString g_aFtpPortPN = u"ooInetFTPProxyPort"_ustr;
 constexpr OUString g_aNoProxyDescPN = u"ooInetNoProxy"_ustr;
 
 IMPL_STATIC_LINK(SvxProxyTabPage, NumberOnlyTextFilterHdl, OUString&, rTest, 
bool)
@@ -142,12 +140,6 @@ SvxProxyTabPage::SvxProxyTabPage(weld::Container* pPage, 
weld::DialogController*
 , m_xHttpsPortFT(m_xBuilder->weld_label("httpsportft"))
 , m_xHttpsPortED(m_xBuilder->weld_entry("httpsport"))
 , m_xHttpsPortImg(m_xBuilder->weld_widget("lockhttpsport"))
-, m_xFtpProxyFT(m_xBuilder->weld_label("ftpft"))
-, m_xFtpProxyED(m_xBuilder->weld_entry("ftp"))
-, m_xFtpProxyImg(m_xBuilder->weld_widget("lockftp"))
-, m_xFtpPortFT(m_xBuilder->weld_label("ftpportft"))
-, m_xFtpPortED(m_xBuilder->weld_entry("ftpport"))
-, m_xFtpPortImg(m_xBuilder->weld_widget("lockftpport"))
 , m_xNoProxyForFT(m_xBuilder->weld_label("noproxyft"))
 , m_xNoProxyForED(m_xBuilder->weld_entry("noproxy"))
 , m_xNoProxyForImg(m_xBuilder->weld_widget("locknoproxy"))
@@ -159,14 +151,10 @@ SvxProxyTabPage::SvxProxyTabPage(weld::Container* pPage, 
weld::DialogController*
 m_xHttpsProxyED->connect_insert_text(LINK(this, SvxProxyTabPage, 
NoSpaceTextFilterHdl));
 m_xHttpsPortED->connect_insert_text(LINK(this, SvxProxyTabPage, 
NumberOnlyTextFilterHdl));
 m_xHttpsPortED->connect_changed(LINK(this, SvxProxyTabPage, 
PortChangedHdl));
-m_xFtpProxyED->connect_insert_text(LINK(this, SvxProxyTabPage, 
NoSpaceTextFilterHdl));
-m_xFtpPortED->connect_insert_text(LINK(this, SvxProxyTabPage, 
NumberOnlyTextFilterHdl));
-m_xFtpPortED->connect_changed(LINK(this, SvxProxyTabPage, PortChangedHdl));
 
 Link aLink = LINK( this, SvxProxyTabPage, 
LoseFocusHdl_Impl );
 m_xHttpPortED->connect_focus_out( aLink );
 m_xHttpsPortED->connect_focus_out( aLink );
-m_xFtpPortED->connect_focus_out( aLink );
 
 m_xProxyModeLB->connect_changed(LINK( this, SvxProxyTabPage, ProxyHdl_Impl 
));
 
@@ -226,16 +214,6 @@ void SvxProxyTabPage::ReadConfigData_Impl()
 else
 m_xHttpsPortED->set_text( "" );
 
-m_xFtpProxyED->set_text( 
officecfg::Inet::Settings::ooInetFTPProxyName::get() );
-x = officecfg::Inet::Settings::ooInetFTPProxyPort::get();
-if (x)
-{
-nIntValue = *x;
-m_xFtpPortED->set_text( OUString::number( nIntValue ));
-}
-else
-m_xFtpPortED->set_text( "" );
-
 m_xNoProxyForED->set_text( officecfg::Inet::Settings::ooInetNoProxy::get() 
);
 }
 
@@ -268,16 +246,6 @@ void SvxProxyTabPage::ReadConfigDefaults_Impl()
 m_xHttpsPortED->set_text( OUString::number( nIntValue ));
 }
 
-if( xPropertyState->getPropertyDefault(g_aFtpProxyPN) >>= aStringValue 
)
-{
-m_xFtpProxyED->set_text( aStringValue );
-}
-
-if( xPropertyState->getPropertyDefault(g_aFtpPortPN) >>= nIntValue )
-{
-m_xFtpPortED->set_text( OUString::number( nIntValue ));
-}
-
 if( xPropertyState->getPropertyDefault(g_aNoProxyDescPN) >>= 
aStringValue )
 {
 m_xNoProxyForED->set_text( aStringValue );
@@ -308,8 +276,6 @@ void SvxProxyTabPage::RestoreConfigDefaults_Impl()
 xPropertyState->setPropertyToDefault(g_aHttpPortPN);
 xPropertyState->setPropertyToDefault(g_aHttpsProxyPN);
 xPropertyState->setPropertyToDefault(g_aHttpsPortPN);
-xPropertyState->setPropertyToDefault(g_aFtpProxyPN);
-xPropertyState->setPropertyToDefault(g_aFtpPortPN);
 xPropertyState->setPropertyToDefault(g_aNoProxyDescPN);
 
 Reference< util::XChangesBatch > 
xChangesBatch(m_xConfigurationUpdateAccess, UNO_QUERY_THROW);
@@ -338,8 +304,6 @@ void SvxProxyTabPage::Reset(const SfxItemSet*)
 m_xHttpPortED->sa

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

2023-11-09 Thread Michael Stahl (via logerrit)
 cui/source/dialogs/hlinettp.cxx  |  117 +--
 cui/source/inc/hlinettp.hxx  |   20 +
 cui/uiconfig/ui/hyperlinkinternetpage.ui |  109 
 3 files changed, 10 insertions(+), 236 deletions(-)

New commits:
commit 46673b5c3215d05877043a81470b2a059c2eef75
Author: Michael Stahl 
AuthorDate: Tue Nov 7 12:24:10 2023 +0100
Commit: Michael Stahl 
CommitDate: Thu Nov 9 16:51:56 2023 +0100

tdf#146386 cui: remove FTP UI, SvxHyperlinkInternetTp

Change-Id: Ib55d6609e0bea4033533e3211c04888e52b86bb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159071
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 8ffdb2053f5b..21cf34b3c7b6 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -24,7 +24,6 @@
 #include 
 #include 
 
-constexpr OUString sAnonymous = u"anonymous"_ustr;
 
 /*
 |*
@@ -38,14 +37,8 @@ 
SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent,
   pItemSet)
 , m_bMarkWndOpen(false)
 , m_xRbtLinktypInternet(xBuilder->weld_radio_button("linktyp_internet"))
-, m_xRbtLinktypFTP(xBuilder->weld_radio_button("linktyp_ftp"))
 , m_xCbbTarget(new SvxHyperURLBox(xBuilder->weld_combo_box("target")))
 , m_xFtTarget(xBuilder->weld_label("target_label"))
-, m_xFtLogin(xBuilder->weld_label("login_label"))
-, m_xEdLogin(xBuilder->weld_entry("login"))
-, m_xFtPassword(xBuilder->weld_label("password_label"))
-, m_xEdPassword(xBuilder->weld_entry("password"))
-, m_xCbAnonymous(xBuilder->weld_check_button("anonymous"))
 {
 // gtk_size_group_set_ignore_hidden, "Measuring the size of hidden widgets
 // ...  they will report a size of 0 nowadays, and thus, their size will
@@ -69,9 +62,6 @@ 
SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent,
 // set handlers
 Link aLink( LINK ( this, SvxHyperlinkInternetTp, 
Click_SmartProtocol_Impl ) );
 m_xRbtLinktypInternet->connect_toggled( aLink );
-m_xRbtLinktypFTP->connect_toggled( aLink );
-m_xCbAnonymous->connect_toggled( LINK ( this, SvxHyperlinkInternetTp, 
ClickAnonymousHdl_Impl ) );
-m_xEdLogin->connect_changed( LINK ( this, SvxHyperlinkInternetTp, 
ModifiedLoginHdl_Impl ) );
 m_xCbbTarget->connect_focus_out( LINK ( this, SvxHyperlinkInternetTp, 
LostFocusTargetHdl_Impl ) );
 m_xCbbTarget->connect_changed( LINK ( this, SvxHyperlinkInternetTp, 
ModifiedTargetHdl_Impl ) );
 maTimer.SetInvokeHandler ( LINK ( this, SvxHyperlinkInternetTp, 
TimeoutHdl_Impl ) );
@@ -91,19 +81,6 @@ void SvxHyperlinkInternetTp::FillDlgFields(const OUString& 
rStrURL)
 INetURLObject aURL(rStrURL);
 OUString aStrScheme(GetSchemeFromURL(rStrURL));
 
-// set additional controls for FTP: Username / Password
-if (aStrScheme.startsWith(INET_FTP_SCHEME))
-{
-if ( aURL.GetUser().toAsciiLowerCase().startsWith( sAnonymous ) )
-setAnonymousFTPUser();
-else
-setFTPUser(aURL.GetUser(), aURL.GetPass());
-
-//do not show password and user in url
-if(!aURL.GetUser().isEmpty() || !aURL.GetPass().isEmpty() )
-aURL.SetUserAndPass(u"", u"");
-}
-
 // set URL-field
 // Show the scheme, #72740
 if ( aURL.GetProtocol() != INetProtocol::NotValid )
@@ -114,31 +91,6 @@ void SvxHyperlinkInternetTp::FillDlgFields(const OUString& 
rStrURL)
 SetScheme(aStrScheme);
 }
 
-void SvxHyperlinkInternetTp::setAnonymousFTPUser()
-{
-m_xEdLogin->set_text(sAnonymous);
-SvAddressParser aAddress(SvtUserOptions().GetEmail());
-m_xEdPassword->set_text(aAddress.Count() ? aAddress.GetEmailAddress(0) : 
OUString());
-
-m_xFtLogin->set_sensitive(false);
-m_xFtPassword->set_sensitive(false);
-m_xEdLogin->set_sensitive(false);
-m_xEdPassword->set_sensitive(false);
-m_xCbAnonymous->set_active(true);
-}
-
-void SvxHyperlinkInternetTp::setFTPUser(const OUString& rUser, const OUString& 
rPassword)
-{
-m_xEdLogin->set_text(rUser);
-m_xEdPassword->set_text(rPassword);
-
-m_xFtLogin->set_sensitive(true);
-m_xFtPassword->set_sensitive(true);
-m_xEdLogin->set_sensitive(true);
-m_xEdPassword->set_sensitive(true);
-m_xCbAnonymous->set_active(false);
-}
-
 /*
 |*
 |* retrieve and prepare data from dialog-fields
@@ -160,10 +112,6 @@ OUString SvxHyperlinkInternetTp::CreateAbsoluteURL() const
 
 INetURLObject aURL(aStrURL, GetSmartProtocolFromButtons());
 
-// username and password for ftp-url
-if( aURL.GetProtocol() == INetProtocol::Ftp && 
!m_xEdLogin->get_text().isEmpty() )
-aURL.SetUserAndPass ( m_xEdLogin->get_text(), 
m_xEdPassword->get_text() );
-
 if ( aURL.GetProtoco

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

2023-11-07 Thread Balazs Varga (via logerrit)
 cui/source/options/connpooloptions.cxx |   30 +++-
 cui/source/options/connpooloptions.hxx |6 
 cui/uiconfig/ui/connpooloptions.ui |  244 +
 3 files changed, 191 insertions(+), 89 deletions(-)

New commits:
commit ebb51d094d9d58568ad6adf5730b04b5f24c7f25
Author: Balazs Varga 
AuthorDate: Mon Nov 6 11:25:44 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 7 21:40:50 2023 +0100

tdf#158004 - UI: Part 20 - Unify lockdown behavior of Options dialog

for Connections Page.

Change-Id: I76510a893bb35e03e6401aeeb03971969cc42ad2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158989
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/connpooloptions.cxx 
b/cui/source/options/connpooloptions.cxx
index 00101bed4fb6..f6321f2252b1 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -25,6 +25,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 namespace offapp
 {
@@ -49,13 +51,16 @@ namespace offapp
 , m_sYes(CuiResId(RID_CUISTR_YES))
 , m_sNo(CuiResId(RID_CUISTR_NO))
 , m_xEnablePooling(m_xBuilder->weld_check_button("connectionpooling"))
+, m_xEnablePoolingImg(m_xBuilder->weld_widget("lockconnectionpooling"))
 , m_xDriversLabel(m_xBuilder->weld_label("driverslabel"))
 , m_xDriverList(m_xBuilder->weld_tree_view("driverlist"))
 , m_xDriverLabel(m_xBuilder->weld_label("driverlabel"))
 , m_xDriver(m_xBuilder->weld_label("driver"))
 , 
m_xDriverPoolingEnabled(m_xBuilder->weld_check_button("enablepooling"))
+, 
m_xDriverPoolingEnabledImg(m_xBuilder->weld_widget("lockenablepooling"))
 , m_xTimeoutLabel(m_xBuilder->weld_label("timeoutlabel"))
 , m_xTimeout(m_xBuilder->weld_spin_button("timeout"))
+, m_xTimeoutImg(m_xBuilder->weld_widget("locktimeout"))
 {
 
m_xDriverList->set_size_request(m_xDriverList->get_approximate_digit_width() * 
60,
 m_xDriverList->get_height_rows(15));
@@ -68,6 +73,9 @@ namespace offapp
 };
 m_xDriverList->set_column_fixed_widths(aWidths);
 
+css::uno::Reference < css::uno::XComponentContext > 
xContext(::comphelper::getProcessComponentContext());
+m_xReadWriteAccess = 
css::configuration::ReadWriteAccess::create(xContext, "*");
+
 m_xEnablePooling->connect_toggled( LINK(this, 
ConnectionPoolOptionsPage, OnEnabledDisabled) );
 m_xDriverPoolingEnabled->connect_toggled( LINK(this, 
ConnectionPoolOptionsPage, OnEnabledDisabled) );
 
@@ -136,6 +144,8 @@ namespace offapp
 const SfxBoolItem* pEnabled = 
_rSet.GetItem(SID_SB_POOLING_ENABLED);
 OSL_ENSURE(pEnabled, "ConnectionPoolOptionsPage::implInitControls: 
missing the Enabled item!");
 m_xEnablePooling->set_active(pEnabled == nullptr || 
pEnabled->GetValue());
+
m_xEnablePooling->set_sensitive(!officecfg::Office::DataAccess::ConnectionPool::EnablePooling::isReadOnly());
+
m_xEnablePoolingImg->set_visible(officecfg::Office::DataAccess::ConnectionPool::EnablePooling::isReadOnly());
 
 m_xEnablePooling->save_state();
 
@@ -233,6 +243,20 @@ namespace offapp
 m_xDriverPoolingEnabled->set_active(currentSetting.bEnabled);
 m_xTimeout->set_value(currentSetting.nTimeoutSeconds);
 
+OUString aConfigPath = 
officecfg::Office::DataAccess::ConnectionPool::DriverSettings::path() + "/" + 
currentSetting.sName;
+css::beans::Property aProperty = 
m_xReadWriteAccess->getPropertyByHierarchicalName(aConfigPath + "/Enable");
+bool bReadOnly = (aProperty.Attributes & 
css::beans::PropertyAttribute::READONLY) != 0;
+
+m_xDriverPoolingEnabled->set_sensitive(!bReadOnly);
+m_xDriverPoolingEnabledImg->set_visible(bReadOnly);
+
+aProperty = 
m_xReadWriteAccess->getPropertyByHierarchicalName(aConfigPath + "/Timeout");
+bReadOnly = (aProperty.Attributes & 
css::beans::PropertyAttribute::READONLY) != 0;
+
+m_xTimeout->set_sensitive(!bReadOnly);
+m_xTimeoutLabel->set_sensitive(!bReadOnly);
+m_xTimeoutImg->set_visible(bReadOnly);
+
 OnEnabledDisabled(*m_xDriverPoolingEnabled);
 }
 }
@@ -259,13 +283,13 @@ namespace offapp
 m_xDriverList->select(-1);
 m_xDriverLabel->set_sensitive(bGloballyEnabled);
 m_xDriver->set_sensitive(bGloballyEnabled);
-m_xDriverPoolingEnabled->set_sensitive(bGloballyEnabled);
+m_xDriverPoolingEnabled->set_sensitive(bGloballyEnabled && 
!m_xDriverPoolingEnabledImg->get_visible());
 }
 else
 OSL_ENSURE(bLocalDriverChanged, 
"ConnectionPoolOptionsPage::OnEnabledDisabled: where did this come from?");
 
-m_xTimeoutLabel->set_sensitive(bGloballyEnabled && 
m_xDriverPoolingEnabled->get_ac

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

2023-11-06 Thread Balazs Varga (via logerrit)
 cui/source/options/optlanguagetool.cxx |   24 ++
 cui/source/options/optlanguagetool.hxx |6 +
 cui/uiconfig/ui/langtoolconfigpage.ui  |  130 -
 3 files changed, 143 insertions(+), 17 deletions(-)

New commits:
commit 16737129e072a766ba58afddae4a992ad61cec6f
Author: Balazs Varga 
AuthorDate: Sat Nov 4 12:05:15 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Nov 6 10:17:28 2023 +0100

tdf#158002 - UI: Part 19 - Unify lockdown behavior of Options dialog

for LanguageTool Page.

Change-Id: Ib1255dd7a67eae7e9c1f2cf6da984ba614f3453a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158931
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optlanguagetool.cxx 
b/cui/source/options/optlanguagetool.cxx
index fab94987a32d..8c56a40e728f 100644
--- a/cui/source/options/optlanguagetool.cxx
+++ b/cui/source/options/optlanguagetool.cxx
@@ -31,11 +31,17 @@ 
OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage,
const SfxItemSet& rSet)
 : SfxTabPage(pPage, pController, "cui/ui/langtoolconfigpage.ui", 
"OptLangToolPage", &rSet)
 , m_xBaseURLED(m_xBuilder->weld_entry("baseurl"))
+, m_xBaseURLImg(m_xBuilder->weld_widget("lockbaseurl"))
 , m_xUsernameED(m_xBuilder->weld_entry("username"))
+, m_xUsernameImg(m_xBuilder->weld_widget("lockusername"))
 , m_xApiKeyED(m_xBuilder->weld_entry("apikey"))
+, m_xApiKeyImg(m_xBuilder->weld_widget("lockapikey"))
 , m_xRestProtocol(m_xBuilder->weld_entry("restprotocol"))
+, m_xRestProtocolImg(m_xBuilder->weld_widget("lockrestprotocol"))
 , m_xActivateBox(m_xBuilder->weld_check_button("activate"))
+, m_xActivateBoxImg(m_xBuilder->weld_widget("lockactivate"))
 , m_xSSLDisableVerificationBox(m_xBuilder->weld_check_button("verifyssl"))
+, m_xSSLDisableVerificationBoxImg(m_xBuilder->weld_widget("lockverifyssl"))
 , m_xApiSettingsFrame(m_xBuilder->weld_frame("apisettings"))
 {
 m_xActivateBox->connect_toggled(LINK(this, OptLanguageToolTabPage, 
CheckHdl));
@@ -60,7 +66,11 @@ void OptLanguageToolTabPage::EnableControls(bool bEnable)
 }
 m_xApiSettingsFrame->set_visible(bEnable);
 m_xActivateBox->set_active(bEnable);
+m_xActivateBox->set_sensitive(!LanguageToolCfg::IsEnabled::isReadOnly());
+m_xActivateBoxImg->set_visible(LanguageToolCfg::IsEnabled::isReadOnly());
 
m_xSSLDisableVerificationBox->set_active(!LanguageToolCfg::SSLCertVerify::get());
+
m_xSSLDisableVerificationBox->set_sensitive(!LanguageToolCfg::SSLCertVerify::isReadOnly());
+
m_xSSLDisableVerificationBoxImg->set_visible(LanguageToolCfg::SSLCertVerify::isReadOnly());
 }
 
 IMPL_LINK_NOARG(OptLanguageToolTabPage, CheckHdl, weld::Toggleable&, void)
@@ -77,10 +87,24 @@ void OptLanguageToolTabPage::Reset(const SfxItemSet*)
 else
 m_xBaseURLED->set_text(aBaseURL);
 
+m_xBaseURLED->set_sensitive(!LanguageToolCfg::BaseURL::isReadOnly());
+m_xBaseURLImg->set_visible(LanguageToolCfg::BaseURL::isReadOnly());
+
 m_xUsernameED->set_text(LanguageToolCfg::Username::get().value_or(""));
+m_xUsernameED->set_sensitive(!LanguageToolCfg::Username::isReadOnly());
+m_xUsernameImg->set_visible(LanguageToolCfg::Username::isReadOnly());
+
 m_xApiKeyED->set_text(LanguageToolCfg::ApiKey::get().value_or(""));
+m_xApiKeyED->set_sensitive(!LanguageToolCfg::ApiKey::isReadOnly());
+m_xApiKeyImg->set_visible(LanguageToolCfg::ApiKey::isReadOnly());
+
 
m_xRestProtocol->set_text(LanguageToolCfg::RestProtocol::get().value_or(""));
+
m_xRestProtocol->set_sensitive(!LanguageToolCfg::RestProtocol::isReadOnly());
+
m_xRestProtocolImg->set_visible(LanguageToolCfg::RestProtocol::isReadOnly());
+
 
m_xSSLDisableVerificationBox->set_active(!LanguageToolCfg::SSLCertVerify::get());
+
m_xSSLDisableVerificationBox->set_sensitive(!LanguageToolCfg::SSLCertVerify::isReadOnly());
+
m_xSSLDisableVerificationBoxImg->set_visible(LanguageToolCfg::SSLCertVerify::isReadOnly());
 }
 
 OUString OptLanguageToolTabPage::GetAllStrings()
diff --git a/cui/source/options/optlanguagetool.hxx 
b/cui/source/options/optlanguagetool.hxx
index 25781c612913..3e3c3e8da0c7 100644
--- a/cui/source/options/optlanguagetool.hxx
+++ b/cui/source/options/optlanguagetool.hxx
@@ -36,11 +36,17 @@ public:
 
 private:
 std::unique_ptr m_xBaseURLED;
+std::unique_ptr m_xBaseURLImg;
 std::unique_ptr m_xUsernameED;
+std::unique_ptr m_xUsernameImg;
 std::unique_ptr m_xApiKeyED;
+std::unique_ptr m_xApiKeyImg;
 std::unique_ptr m_xRestProtocol;
+std::unique_ptr m_xRestProtocolImg;
 std::unique_ptr m_xActivateBox;
+std::unique_ptr m_xActivateBoxImg;
 std::unique_ptr m_xSSLDisableVerificationBox;
+std::unique_ptr m_xSSLDisableVerificationBoxImg;
 std::unique_ptr m_xApiSettingsFrame;
 
 void EnableControls(bool bEnable);
diff --git a/cui/uiconf

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/unotools unotools/source

2023-11-04 Thread Balazs Varga (via logerrit)
 cui/source/options/optgdlg.cxx  |   22 
 cui/source/options/optgdlg.hxx  |   10 +
 cui/uiconfig/ui/optlanguagespage.ui |  141 
 include/unotools/syslocaleoptions.hxx   |4 
 unotools/source/config/syslocaleoptions.cxx |   10 +
 5 files changed, 169 insertions(+), 18 deletions(-)

New commits:
commit 07590ff83e03077cf0d755f698b5b6bb36bb54d2
Author: Balazs Varga 
AuthorDate: Fri Nov 3 14:20:15 2023 +0100
Commit: Balazs Varga 
CommitDate: Sat Nov 4 10:58:42 2023 +0100

tdf#158001 - UI: Part 18 - Unify lockdown behavior of Options dialog

for Languages Page.

Change-Id: I3f4cf27980dd6d06da13f554feaca192ebd0b671
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158882
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index ee727e074e51..9e32e2fc9ea6 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1170,19 +1170,28 @@ 
OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon
 , m_xUserInterfaceLB(m_xBuilder->weld_combo_box("userinterface"))
 , m_xLocaleSettingFT(m_xBuilder->weld_label("localesettingFT"))
 , m_xLocaleSettingLB(new 
SvxLanguageBox(m_xBuilder->weld_combo_box("localesetting")))
+, m_xLocaleSettingImg(m_xBuilder->weld_widget("locklocalesetting"))
+, m_xDecimalSeparatorFT(m_xBuilder->weld_label("label6"))
 , m_xDecimalSeparatorCB(m_xBuilder->weld_check_button("decimalseparator"))
+, m_xDecimalSeparatorImg(m_xBuilder->weld_widget("lockdecimalseparator"))
 , m_xCurrencyFT(m_xBuilder->weld_label("defaultcurrency"))
 , m_xCurrencyLB(m_xBuilder->weld_combo_box("currencylb"))
+, m_xCurrencyImg(m_xBuilder->weld_widget("lockcurrencylb"))
 , m_xDatePatternsFT(m_xBuilder->weld_label("dataaccpatterns"))
 , m_xDatePatternsED(m_xBuilder->weld_entry("datepatterns"))
+, m_xDatePatternsImg(m_xBuilder->weld_widget("lockdatepatterns"))
 , m_xWesternLanguageLB(new 
SvxLanguageBox(m_xBuilder->weld_combo_box("westernlanguage")))
 , m_xWesternLanguageFT(m_xBuilder->weld_label("western"))
+, m_xWesternLanguageImg(m_xBuilder->weld_widget("lockwesternlanguage"))
 , m_xAsianLanguageLB(new 
SvxLanguageBox(m_xBuilder->weld_combo_box("asianlanguage")))
 , m_xComplexLanguageLB(new 
SvxLanguageBox(m_xBuilder->weld_combo_box("complexlanguage")))
 , m_xCurrentDocCB(m_xBuilder->weld_check_button("currentdoc"))
 , m_xAsianSupportCB(m_xBuilder->weld_check_button("asiansupport"))
+, m_xAsianSupportImg(m_xBuilder->weld_widget("lockasiansupport"))
 , m_xCTLSupportCB(m_xBuilder->weld_check_button("ctlsupport"))
+, m_xCTLSupportImg(m_xBuilder->weld_widget("lockctlsupport"))
 , 
m_xIgnoreLanguageChangeCB(m_xBuilder->weld_check_button("ignorelanguagechange"))
+, 
m_xIgnoreLanguageChangeImg(m_xBuilder->weld_widget("lockignorelanguagechange"))
 {
 // tdf#125483 save original default label
 m_sDecimalSeparatorLabel = m_xDecimalSeparatorCB->get_label();
@@ -1321,6 +1330,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* 
pPage, weld::DialogCon
 m_xAsianSupportCB->save_state();
 bool bReadonly = SvtCJKOptions::IsAnyReadOnly();
 m_xAsianSupportCB->set_sensitive(!bReadonly);
+m_xAsianSupportImg->set_visible(bReadonly);
 SupportHdl(*m_xAsianSupportCB);
 
 m_bOldCtl = SvtCTLOptions::IsCTLFontEnabled();
@@ -1328,6 +1338,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* 
pPage, weld::DialogCon
 m_xCTLSupportCB->save_state();
 bReadonly = 
pLangConfig->aCTLLanguageOptions.IsReadOnly(SvtCTLOptions::E_CTLFONT);
 m_xCTLSupportCB->set_sensitive(!bReadonly);
+m_xCTLSupportImg->set_visible(bReadonly);
 SupportHdl(*m_xCTLSupportCB);
 
 m_xIgnoreLanguageChangeCB->set_active( 
pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange() );
@@ -1633,12 +1644,20 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet 
)
 bool bReadonly = 
pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::Locale);
 m_xLocaleSettingLB->set_sensitive(!bReadonly);
 m_xLocaleSettingFT->set_sensitive(!bReadonly);
+m_xLocaleSettingImg->set_visible(bReadonly);
 
 
 m_xDecimalSeparatorCB->set_active( 
pLangConfig->aSysLocaleOptions.IsDecimalSeparatorAsLocale());
+bReadonly = 
pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::DecimalSeparator);
+m_xDecimalSeparatorCB->set_sensitive(!bReadonly);
+m_xDecimalSeparatorFT->set_sensitive(!bReadonly);
+m_xDecimalSeparatorImg->set_visible(bReadonly);
 m_xDecimalSeparatorCB->save_state();
 
 m_xIgnoreLanguageChangeCB->set_active( 
pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange());
+bReadonly = 
pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::IgnoreLanguageChange);
+m_xIgnoreLanguageChangeCB->set_sensitive(!

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

2023-11-03 Thread Balazs Varga (via logerrit)
 cui/source/options/opthtml.cxx |   94 -
 cui/source/options/opthtml.hxx |   14 ++
 cui/uiconfig/ui/opthtmlpage.ui |  226 +
 3 files changed, 311 insertions(+), 23 deletions(-)

New commits:
commit d7d89a47e9e50254469d957b86f0e16bec22fe62
Author: Balazs Varga 
AuthorDate: Thu Nov 2 18:49:41 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 3 10:51:09 2023 +0100

tdf#157862 - UI: Part 16 - Unify lockdown behavior of Options dialog

for Load/Save - HTML Page.

Change-Id: I8e9599c25eba62f7b82d8e3f56de031a1c6366fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158849
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index 7cd8788dd1d2..6880ec4b2e33 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -26,19 +26,33 @@
 OfaHtmlTabPage::OfaHtmlTabPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rSet)
 : SfxTabPage(pPage, pController, "cui/ui/opthtmlpage.ui", "OptHtmlPage", 
&rSet)
 , m_xSize1NF(m_xBuilder->weld_spin_button("size1"))
+, m_xSize1Img(m_xBuilder->weld_widget("locksize1"))
 , m_xSize2NF(m_xBuilder->weld_spin_button("size2"))
+, m_xSize2Img(m_xBuilder->weld_widget("locksize2"))
 , m_xSize3NF(m_xBuilder->weld_spin_button("size3"))
+, m_xSize3Img(m_xBuilder->weld_widget("locksize3"))
 , m_xSize4NF(m_xBuilder->weld_spin_button("size4"))
+, m_xSize4Img(m_xBuilder->weld_widget("locksize4"))
 , m_xSize5NF(m_xBuilder->weld_spin_button("size5"))
+, m_xSize5Img(m_xBuilder->weld_widget("locksize5"))
 , m_xSize6NF(m_xBuilder->weld_spin_button("size6"))
+, m_xSize6Img(m_xBuilder->weld_widget("locksize6"))
 , m_xSize7NF(m_xBuilder->weld_spin_button("size7"))
+, m_xSize7Img(m_xBuilder->weld_widget("locksize7"))
 , m_xNumbersEnglishUSCB(m_xBuilder->weld_check_button("numbersenglishus"))
+, m_xNumbersEnglishUSImg(m_xBuilder->weld_widget("locknumbersenglishus"))
 , m_xUnknownTagCB(m_xBuilder->weld_check_button("unknowntag"))
+, m_xUnknownTagImg(m_xBuilder->weld_widget("lockunknowntag"))
 , m_xIgnoreFontNamesCB(m_xBuilder->weld_check_button("ignorefontnames"))
+, m_xIgnoreFontNamesImg(m_xBuilder->weld_widget("lockignorefontnames"))
 , m_xStarBasicCB(m_xBuilder->weld_check_button("starbasic"))
+, m_xStarBasicImg(m_xBuilder->weld_widget("lockstarbasic"))
 , m_xStarBasicWarningCB(m_xBuilder->weld_check_button("starbasicwarning"))
+, m_xStarBasicWarningImg(m_xBuilder->weld_widget("lockstarbasicwarning"))
 , m_xPrintExtensionCB(m_xBuilder->weld_check_button("printextension"))
+, m_xPrintExtensionImg(m_xBuilder->weld_widget("lockprintextension"))
 , m_xSaveGrfLocalCB(m_xBuilder->weld_check_button("savegrflocal"))
+, m_xSaveGrfLocalImg(m_xBuilder->weld_widget("locksavegrflocal"))
 {
 // replace placeholder with UI string from language list
 OUString aText(m_xNumbersEnglishUSCB->get_label());
@@ -151,21 +165,99 @@ bool OfaHtmlTabPage::FillItemSet( SfxItemSet* )
 void OfaHtmlTabPage::Reset( const SfxItemSet* )
 {
 
m_xSize1NF->set_value(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_1::get());
+if 
(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_1::isReadOnly())
+{
+m_xSize1NF->set_sensitive(false);
+m_xSize1Img->set_visible(true);
+}
+
 
m_xSize2NF->set_value(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_2::get());
+if 
(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_2::isReadOnly())
+{
+m_xSize2NF->set_sensitive(false);
+m_xSize2Img->set_visible(true);
+}
+
 
m_xSize3NF->set_value(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_3::get());
+if 
(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_3::isReadOnly())
+{
+m_xSize3NF->set_sensitive(false);
+m_xSize3Img->set_visible(true);
+}
+
 
m_xSize4NF->set_value(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_4::get());
+if 
(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_4::isReadOnly())
+{
+m_xSize4NF->set_sensitive(false);
+m_xSize4Img->set_visible(true);
+}
+
 
m_xSize5NF->set_value(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_5::get());
+if 
(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_5::isReadOnly())
+{
+m_xSize5NF->set_sensitive(false);
+m_xSize5Img->set_visible(true);
+}
+
 
m_xSize6NF->set_value(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_6::get());
+if 
(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_6::isReadOnly())
+{
+m_xSize6NF->set_sensitive(false);
+m_xSize6Img->set_visible(true);
+}
+
 
m_xSize7NF->set_v

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

2023-11-03 Thread Balazs Varga (via logerrit)
 cui/source/options/optfltr.cxx  |   50 +++
 cui/source/options/optfltr.hxx  |3 
 cui/uiconfig/ui/optfltrembedpage.ui |  154 +++-
 3 files changed, 154 insertions(+), 53 deletions(-)

New commits:
commit 6f12739b6201948b8ccf8f162c999e42714539ba
Author: Balazs Varga 
AuthorDate: Thu Nov 2 16:28:29 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 3 10:50:28 2023 +0100

tdf#157861 - UI: Part 15 - Unify lockdown behavior of Options dialog

for Load/Save - MS Office Page.

Change-Id: Ifd576e5030e49bef3c73f55f4d3f23eea34a45f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158837
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 7c04c20b27d0..b582b065bc65 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -185,9 +185,12 @@ OfaMSFilterTabPage2::OfaMSFilterTabPage2(weld::Container* 
pPage, weld::DialogCon
 , sChgToFromVisio(CuiResId(RID_CUISTR_CHG_VISIO))
 , sChgToFromPDF(CuiResId(RID_CUISTR_CHG_PDF))
 , m_xCheckLB(m_xBuilder->weld_tree_view("checklbcontainer"))
+, m_xHighlightingFT(m_xBuilder->weld_label("label5"))
 , m_xHighlightingRB(m_xBuilder->weld_radio_button("highlighting"))
 , m_xShadingRB(m_xBuilder->weld_radio_button("shading"))
+, m_xShadingImg(m_xBuilder->weld_widget("lockbuttonbox1"))
 , m_xMSOLockFileCB(m_xBuilder->weld_check_button("mso_lockfile"))
+, m_xMSOLockFileImg(m_xBuilder->weld_widget("lockmso_lockfile"))
 {
 std::vector aWidths
 {
@@ -351,6 +354,7 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet* )
 };
 
 bool bFirstCol = true;
+bool bReadOnly = false;
 for( const ChkCBoxEntries & rArr : aChkArr )
 {
 // we loop through the list, alternating reading the first/second 
column,
@@ -365,13 +369,50 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet* )
 if (rArr.eType != MSFltrPg2_CheckBoxEntries::PDF)
 {
 bCheck = (rOpt.*rArr.FnIs)();
+switch (rArr.eType)
+{
+case MSFltrPg2_CheckBoxEntries::Math:
+if (nCol == 0)
+bReadOnly = 
officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::isReadOnly();
+else
+bReadOnly = 
officecfg::Office::Common::Filter::Microsoft::Export::MathToMathType::isReadOnly();
+break;
+case MSFltrPg2_CheckBoxEntries::Writer:
+if (nCol == 0)
+bReadOnly = 
officecfg::Office::Common::Filter::Microsoft::Import::WinWordToWriter::isReadOnly();
+else
+bReadOnly = 
officecfg::Office::Common::Filter::Microsoft::Export::WriterToWinWord::isReadOnly();
+break;
+case MSFltrPg2_CheckBoxEntries::Calc:
+if (nCol == 0)
+bReadOnly = 
officecfg::Office::Common::Filter::Microsoft::Import::ExcelToCalc::isReadOnly();
+else
+bReadOnly = 
officecfg::Office::Common::Filter::Microsoft::Export::CalcToExcel::isReadOnly();
+break;
+case MSFltrPg2_CheckBoxEntries::Impress:
+if (nCol == 0)
+bReadOnly = 
officecfg::Office::Common::Filter::Microsoft::Import::PowerPointToImpress::isReadOnly();
+else
+bReadOnly = 
officecfg::Office::Common::Filter::Microsoft::Export::ImpressToPowerPoint::isReadOnly();
+break;
+case MSFltrPg2_CheckBoxEntries::SmartArt:
+bReadOnly = 
officecfg::Office::Common::Filter::Microsoft::Import::SmartArtToShapes::isReadOnly();
+break;
+case MSFltrPg2_CheckBoxEntries::Visio:
+bReadOnly = 
officecfg::Office::Common::Filter::Microsoft::Import::VisioToDraw::isReadOnly();
+break;
+default:
+break;
+}
 }
 else
 {
 bCheck = 
officecfg::Office::Common::Filter::Adobe::Import::PDFToDraw::get();
+bReadOnly = 
officecfg::Office::Common::Filter::Adobe::Import::PDFToDraw::isReadOnly();
 nCol = 0;
 }
 m_xCheckLB->set_toggle(nEntry, bCheck ? TRISTATE_TRUE : 
TRISTATE_FALSE, nCol);
+m_xCheckLB->set_sensitive(nEntry, !bReadOnly, nCol);
 }
 if (rArr.eType == MSFltrPg2_CheckBoxEntries::SmartArt)
 {
@@ -385,11 +426,20 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet* )
 else
 m_xShadingRB->set_active(true);
 
+if 
(officecfg::Office::Common::Filter::Microsoft::Export::CharBackgroundToHighlighting::isReadOnly())
+{
+m

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

2023-11-02 Thread Balazs Varga (via logerrit)
 cui/source/options/optfltr.cxx |   33 ++-
 cui/source/options/optfltr.hxx |8 ++
 cui/uiconfig/ui/optfltrpage.ui |  120 ++---
 3 files changed, 151 insertions(+), 10 deletions(-)

New commits:
commit 30877bdc01d3a9cda1878f66ca7a84760f5f8c67
Author: Balazs Varga 
AuthorDate: Wed Nov 1 23:03:19 2023 +0100
Commit: Balazs Varga 
CommitDate: Thu Nov 2 13:50:51 2023 +0100

tdf#157860 - UI: Part 14 - Unify lockdown behavior of Options dialog

for Load/Save VBA Properties Page.

Change-Id: I9526c2a5aa25fbdea1edbc0051d9b6a29c643d8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158781
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 0f1df6ef6755..7c04c20b27d0 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -20,6 +20,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 #include "optfltr.hxx"
 #include 
 #include 
@@ -39,13 +42,21 @@ enum class MSFltrPg2_CheckBoxEntries {
 OfaMSFilterTabPage::OfaMSFilterTabPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rSet)
 : SfxTabPage(pPage, pController, "cui/ui/optfltrpage.ui", "OptFltrPage", 
&rSet)
 , m_xWBasicCodeCB(m_xBuilder->weld_check_button("wo_basic"))
+, m_xWBasicCodeImg(m_xBuilder->weld_widget("lockwo_basic"))
 , m_xWBasicWbctblCB(m_xBuilder->weld_check_button("wo_exec"))
+, m_xWBasicWbctblImg(m_xBuilder->weld_widget("lockwo_exec"))
 , m_xWBasicStgCB(m_xBuilder->weld_check_button("wo_saveorig"))
+, m_xWBasicStgImg(m_xBuilder->weld_widget("lockwo_saveorig"))
 , m_xEBasicCodeCB(m_xBuilder->weld_check_button("ex_basic"))
+, m_xEBasicCodeImg(m_xBuilder->weld_widget("lockex_basic"))
 , m_xEBasicExectblCB(m_xBuilder->weld_check_button("ex_exec"))
+, m_xEBasicExectblImg(m_xBuilder->weld_widget("lockex_exec"))
 , m_xEBasicStgCB(m_xBuilder->weld_check_button("ex_saveorig"))
+, m_xEBasicStgImg(m_xBuilder->weld_widget("lockex_saveorig"))
 , m_xPBasicCodeCB(m_xBuilder->weld_check_button("pp_basic"))
+, m_xPBasicCodeImg(m_xBuilder->weld_widget("lockpp_basic"))
 , m_xPBasicStgCB(m_xBuilder->weld_check_button("pp_saveorig"))
+, m_xPBasicStgImg(m_xBuilder->weld_widget("lockpp_saveorig"))
 {
 m_xWBasicCodeCB->connect_toggled( LINK( this, OfaMSFilterTabPage, 
LoadWordBasicCheckHdl_Impl ) );
 m_xEBasicCodeCB->connect_toggled( LINK( this, OfaMSFilterTabPage, 
LoadExcelBasicCheckHdl_Impl ) );
@@ -57,12 +68,14 @@ OfaMSFilterTabPage::~OfaMSFilterTabPage()
 
 IMPL_LINK_NOARG(OfaMSFilterTabPage, LoadWordBasicCheckHdl_Impl, 
weld::Toggleable&, void)
 {
-m_xWBasicWbctblCB->set_sensitive(m_xWBasicCodeCB->get_active());
+m_xWBasicWbctblCB->set_sensitive(m_xWBasicCodeCB->get_active() && 
!officecfg::Office::Writer::Filter::Import::VBA::Executable::isReadOnly());
+
m_xWBasicWbctblImg->set_visible(officecfg::Office::Writer::Filter::Import::VBA::Executable::isReadOnly());
 }
 
 IMPL_LINK_NOARG(OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl, 
weld::Toggleable&, void)
 {
-m_xEBasicExectblCB->set_sensitive(m_xEBasicCodeCB->get_active());
+m_xEBasicExectblCB->set_sensitive(m_xEBasicCodeCB->get_active() && 
!officecfg::Office::Calc::Filter::Import::VBA::Executable::isReadOnly());
+
m_xEBasicExectblImg->set_visible(officecfg::Office::Calc::Filter::Import::VBA::Executable::isReadOnly());
 }
 
 std::unique_ptr OfaMSFilterTabPage::Create( weld::Container* 
pPage, weld::DialogController* pController,
@@ -125,24 +138,40 @@ void OfaMSFilterTabPage::Reset( const SfxItemSet* )
 const SvtFilterOptions& rOpt = SvtFilterOptions::Get();
 
 m_xWBasicCodeCB->set_active( rOpt.IsLoadWordBasicCode() );
+
m_xWBasicCodeCB->set_sensitive(!officecfg::Office::Writer::Filter::Import::VBA::Load::isReadOnly());
+
m_xWBasicCodeImg->set_visible(officecfg::Office::Writer::Filter::Import::VBA::Load::isReadOnly());
 m_xWBasicCodeCB->save_state();
 m_xWBasicWbctblCB->set_active( rOpt.IsLoadWordBasicExecutable() );
+
m_xWBasicWbctblCB->set_sensitive(!officecfg::Office::Writer::Filter::Import::VBA::Executable::isReadOnly());
+
m_xWBasicWbctblImg->set_visible(officecfg::Office::Writer::Filter::Import::VBA::Executable::isReadOnly());
 m_xWBasicWbctblCB->save_state();
 m_xWBasicStgCB->set_active( rOpt.IsLoadWordBasicStorage() );
+
m_xWBasicStgCB->set_sensitive(!officecfg::Office::Writer::Filter::Import::VBA::Save::isReadOnly());
+
m_xWBasicStgImg->set_visible(officecfg::Office::Writer::Filter::Import::VBA::Save::isReadOnly());
 m_xWBasicStgCB->save_state();
 LoadWordBasicCheckHdl_Impl( *m_xWBasicCodeCB );
 
 m_xEBasicCodeCB->set_active( rOpt.IsLoadExcelBasicCode() );
+
m_xEBasicCodeCB->set_sensitive(!officecfg::Office::Calc::Filter::Import::VBA::Load::isReadOnly());
+
m_xEBasicCodeImg->set_visible(officecfg::Offi

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

2023-10-30 Thread Balazs Varga (via logerrit)
 cui/source/options/optsave.cxx |   40 +++
 cui/source/options/optsave.hxx |   15 +
 cui/uiconfig/ui/optsavepage.ui |  469 +++--
 3 files changed, 369 insertions(+), 155 deletions(-)

New commits:
commit c26cbb68c1f0d22c67899821c955ee2df78c7ca7
Author: Balazs Varga 
AuthorDate: Fri Oct 27 13:56:01 2023 +0200
Commit: Balazs Varga 
CommitDate: Mon Oct 30 09:00:22 2023 +0100

tdf#157859 - UI: Part 13 - Unify lockdown behavior of Options dialog

for Load/Save General Page.

Change-Id: I8e02b1b1188f42903ee164ee9f7ddd9113c602bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158565
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index c3c5ead06fe0..434a9823cffd 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -81,22 +81,37 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, 
weld::DialogController* p
 : SfxTabPage( pPage, pController, "cui/ui/optsavepage.ui", "OptSavePage", 
&rCoreSet )
 , pImpl(new SvxSaveTabPage_Impl)
 , m_xLoadViewPosAnyUserCB(m_xBuilder->weld_check_button("load_anyuser"))
+, m_xLoadViewPosAnyUserImg(m_xBuilder->weld_widget("lockload_anyuser"))
 , m_xLoadUserSettingsCB(m_xBuilder->weld_check_button("load_settings"))
+, m_xLoadUserSettingsImg(m_xBuilder->weld_widget("lockload_settings"))
 , m_xLoadDocPrinterCB(m_xBuilder->weld_check_button("load_docprinter"))
+, m_xLoadDocPrinterImg(m_xBuilder->weld_widget("lockload_docprinter"))
 , m_xDocInfoCB(m_xBuilder->weld_check_button("docinfo"))
+, m_xDocInfoImg(m_xBuilder->weld_widget("lockdocinfo"))
 , m_xBackupCB(m_xBuilder->weld_check_button("backup"))
+, m_xBackupImg(m_xBuilder->weld_widget("lockbackup"))
 , 
m_xBackupIntoDocumentFolderCB(m_xBuilder->weld_check_button("backupintodocumentfolder"))
+, 
m_xBackupIntoDocumentFolderImg(m_xBuilder->weld_widget("lockbackupintodoc"))
 , m_xAutoSaveCB(m_xBuilder->weld_check_button("autosave"))
+, m_xAutoSaveImg(m_xBuilder->weld_widget("lockautosave"))
 , m_xAutoSaveEdit(m_xBuilder->weld_spin_button("autosave_spin"))
 , m_xMinuteFT(m_xBuilder->weld_label("autosave_mins"))
 , m_xUserAutoSaveCB(m_xBuilder->weld_check_button("userautosave"))
+, m_xUserAutoSaveImg(m_xBuilder->weld_widget("lockuserautosave"))
 , m_xRelativeFsysCB(m_xBuilder->weld_check_button("relative_fsys"))
+, m_xRelativeFsysImg(m_xBuilder->weld_widget("lockrelative_fsys"))
 , m_xRelativeInetCB(m_xBuilder->weld_check_button("relative_inet"))
+, m_xRelativeInetImg(m_xBuilder->weld_widget("lockrelative_inet"))
 , m_xODFVersionLB(m_xBuilder->weld_combo_box("odfversion"))
+, m_xODFVersionFT(m_xBuilder->weld_label("label5"))
+, m_xODFVersionImg(m_xBuilder->weld_widget("lockodfversion"))
 , m_xWarnAlienFormatCB(m_xBuilder->weld_check_button("warnalienformat"))
+, m_xWarnAlienFormatImg(m_xBuilder->weld_widget("lockwarnalienformat"))
 , m_xDocTypeLB(m_xBuilder->weld_combo_box("doctype"))
+, m_xDocTypeImg(m_xBuilder->weld_widget("lockdoctype"))
 , m_xSaveAsFT(m_xBuilder->weld_label("saveas_label"))
 , m_xSaveAsLB(m_xBuilder->weld_combo_box("saveas"))
+, m_xSaveAsImg(m_xBuilder->weld_widget("locksaveas"))
 , m_xODFWarningFI(m_xBuilder->weld_widget("odfwarning_image"))
 , m_xODFWarningFT(m_xBuilder->weld_label("odfwarning_label"))
 {
@@ -418,12 +433,17 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 
m_xLoadViewPosAnyUserCB->set_active(officecfg::Office::Common::Load::ViewPositionForAnyUser::get());
 m_xLoadViewPosAnyUserCB->save_state();
 
m_xLoadViewPosAnyUserCB->set_sensitive(!officecfg::Office::Common::Load::ViewPositionForAnyUser::isReadOnly());
+
m_xLoadViewPosAnyUserImg->set_visible(officecfg::Office::Common::Load::ViewPositionForAnyUser::isReadOnly());
+
 
m_xLoadUserSettingsCB->set_active(officecfg::Office::Common::Load::UserDefinedSettings::get());
 m_xLoadUserSettingsCB->save_state();
 
m_xLoadUserSettingsCB->set_sensitive(!officecfg::Office::Common::Load::UserDefinedSettings::isReadOnly());
+
m_xLoadUserSettingsImg->set_visible(officecfg::Office::Common::Load::UserDefinedSettings::isReadOnly());
+
 m_xLoadDocPrinterCB->set_active( 
officecfg::Office::Common::Save::Document::LoadPrinter::get() );
 m_xLoadDocPrinterCB->save_state();
 
m_xLoadDocPrinterCB->set_sensitive(!officecfg::Office::Common::Save::Document::LoadPrinter::isReadOnly());
+
m_xLoadDocPrinterImg->set_visible(officecfg::Office::Common::Save::Document::LoadPrinter::isReadOnly());
 
 if ( !pImpl->bInitialized )
 {
@@ -502,24 +522,31 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 
 
m_xDocInfoCB->set_active(officecfg::Office::Common::Save::Document::EditProperty::get());
 
m_xDocInfoCB->set_sensitive(!officecfg::Office::Common::Save::Document::EditProperty::isReadOnly());
+

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

2023-10-26 Thread Balazs Varga (via logerrit)
 cui/source/options/optinet2.cxx |   39 -
 cui/source/options/optinet2.hxx |9 +
 cui/uiconfig/ui/optproxypage.ui |  298 +++-
 3 files changed, 244 insertions(+), 102 deletions(-)

New commits:
commit 5946ffe7139189eff2c1e90ddb3edb146eb60e17
Author: Balazs Varga 
AuthorDate: Thu Oct 26 13:17:51 2023 +0200
Commit: Balazs Varga 
CommitDate: Fri Oct 27 08:52:21 2023 +0200

tdf#157854 - UI: Part 12 - Unify lockdown behavior of Options dialog

for Internet Proxy Page.

Change-Id: I2332d272905e12a235d7729c0565922ad98960f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158499
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 90801955edaa..979d920bc38f 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -127,21 +127,30 @@ IMPL_STATIC_LINK(SvxProxyTabPage, NoSpaceTextFilterHdl, 
OUString&, rTest, bool)
 //
 SvxProxyTabPage::SvxProxyTabPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rSet)
 : SfxTabPage(pPage, pController, "cui/ui/optproxypage.ui", "OptProxyPage", 
&rSet)
+, m_xProxyModeFT(m_xBuilder->weld_label("label2"))
 , m_xProxyModeLB(m_xBuilder->weld_combo_box("proxymode"))
+, m_xProxyModeImg(m_xBuilder->weld_widget("lockproxymode"))
 , m_xHttpProxyFT(m_xBuilder->weld_label("httpft"))
 , m_xHttpProxyED(m_xBuilder->weld_entry("http"))
+, m_xHttpProxyImg(m_xBuilder->weld_widget("lockhttp"))
 , m_xHttpPortFT(m_xBuilder->weld_label("httpportft"))
 , m_xHttpPortED(m_xBuilder->weld_entry("httpport"))
+, m_xHttpPortImg(m_xBuilder->weld_widget("lockhttpport"))
 , m_xHttpsProxyFT(m_xBuilder->weld_label("httpsft"))
 , m_xHttpsProxyED(m_xBuilder->weld_entry("https"))
+, m_xHttpsProxyImg(m_xBuilder->weld_widget("lockhttps"))
 , m_xHttpsPortFT(m_xBuilder->weld_label("httpsportft"))
 , m_xHttpsPortED(m_xBuilder->weld_entry("httpsport"))
+, m_xHttpsPortImg(m_xBuilder->weld_widget("lockhttpsport"))
 , m_xFtpProxyFT(m_xBuilder->weld_label("ftpft"))
 , m_xFtpProxyED(m_xBuilder->weld_entry("ftp"))
+, m_xFtpProxyImg(m_xBuilder->weld_widget("lockftp"))
 , m_xFtpPortFT(m_xBuilder->weld_label("ftpportft"))
 , m_xFtpPortED(m_xBuilder->weld_entry("ftpport"))
+, m_xFtpPortImg(m_xBuilder->weld_widget("lockftpport"))
 , m_xNoProxyForFT(m_xBuilder->weld_label("noproxyft"))
 , m_xNoProxyForED(m_xBuilder->weld_entry("noproxy"))
+, m_xNoProxyForImg(m_xBuilder->weld_widget("locknoproxy"))
 , m_xNoProxyDescFT(m_xBuilder->weld_label("noproxydesc"))
 {
 m_xHttpProxyED->connect_insert_text(LINK(this, SvxProxyTabPage, 
NoSpaceTextFilterHdl));
@@ -437,34 +446,48 @@ bool SvxProxyTabPage::FillItemSet(SfxItemSet* )
 
 void SvxProxyTabPage::EnableControls_Impl()
 {
-
m_xProxyModeLB->set_sensitive(!officecfg::Inet::Settings::ooInetNoProxy::isReadOnly());
+bool bEnable = !officecfg::Inet::Settings::ooInetNoProxy::isReadOnly();
+m_xProxyModeFT->set_sensitive(bEnable);
+m_xProxyModeLB->set_sensitive(bEnable);
+m_xProxyModeImg->set_visible(!bEnable);
 
 const bool bManualConfig = m_xProxyModeLB->get_active() == 2;
 
-const bool bHTTPProxyNameEnabled = bManualConfig && 
!officecfg::Inet::Settings::ooInetHTTPProxyName::isReadOnly();
-const bool bHTTPProxyPortEnabled = bManualConfig && 
!officecfg::Inet::Settings::ooInetHTTPProxyPort::isReadOnly();
+bEnable = !officecfg::Inet::Settings::ooInetHTTPProxyName::isReadOnly();
+const bool bHTTPProxyNameEnabled = bManualConfig && bEnable;
+const bool bHTTPProxyPortEnabled = bManualConfig && bEnable;
 m_xHttpProxyFT->set_sensitive(bHTTPProxyNameEnabled);
 m_xHttpProxyED->set_sensitive(bHTTPProxyNameEnabled);
+m_xHttpProxyImg->set_visible(!bEnable);
 m_xHttpPortFT->set_sensitive(bHTTPProxyPortEnabled);
 m_xHttpPortED->set_sensitive(bHTTPProxyPortEnabled);
+m_xHttpPortImg->set_visible(!bEnable);
 
-const bool bHTTPSProxyNameEnabled = bManualConfig && 
!officecfg::Inet::Settings::ooInetHTTPSProxyName::isReadOnly();
-const bool bHTTPSProxyPortEnabled = bManualConfig && 
!officecfg::Inet::Settings::ooInetHTTPSProxyPort::isReadOnly();
+bEnable = !officecfg::Inet::Settings::ooInetHTTPSProxyName::isReadOnly();
+const bool bHTTPSProxyNameEnabled = bManualConfig && bEnable;
+const bool bHTTPSProxyPortEnabled = bManualConfig && bEnable;
 m_xHttpsProxyFT->set_sensitive(bHTTPSProxyNameEnabled);
 m_xHttpsProxyED->set_sensitive(bHTTPSProxyNameEnabled);
+m_xHttpsProxyImg->set_visible(!bEnable);
 m_xHttpsPortFT->set_sensitive(bHTTPSProxyPortEnabled);
 m_xHttpsPortED->set_sensitive(bHTTPSProxyPortEnabled);
+m_xHttpsPortImg->set_visible(!bEnable);
 
-const bool bFTPProxyNameEnabled = bManualConfig && 
!officecfg:

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

2023-10-26 Thread Balazs Varga (via logerrit)
 cui/source/options/optaccessibility.cxx |   38 +-
 cui/source/options/optaccessibility.hxx |7 +
 cui/uiconfig/ui/optaccessibilitypage.ui |  180 
 3 files changed, 174 insertions(+), 51 deletions(-)

New commits:
commit 916ea4b0aadc61c2fdb89ac18e3e8327406bcd37
Author: Balazs Varga 
AuthorDate: Wed Oct 25 16:03:14 2023 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 26 09:23:06 2023 +0200

tdf#157846 - UI: Part 9 - Unify lockdown behavior of Options dialog

for Accessibility Page.

Change-Id: I4705904200715c1e41849a47a3dd684ddfa219c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158425
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optaccessibility.cxx 
b/cui/source/options/optaccessibility.cxx
index f81c893673ca..008a4a273502 100644
--- a/cui/source/options/optaccessibility.cxx
+++ b/cui/source/options/optaccessibility.cxx
@@ -27,11 +27,18 @@ 
SvxAccessibilityOptionsTabPage::SvxAccessibilityOptionsTabPage(weld::Container*
 : SfxTabPage(pPage, pController, "cui/ui/optaccessibilitypage.ui", 
"OptAccessibilityPage", &rSet)
 , m_xAccessibilityTool(m_xBuilder->weld_check_button("acctool"))
 , 
m_xTextSelectionInReadonly(m_xBuilder->weld_check_button("textselinreadonly"))
+, 
m_xTextSelectionInReadonlyImg(m_xBuilder->weld_widget("locktextselinreadonly"))
 , m_xAnimatedGraphics(m_xBuilder->weld_check_button("animatedgraphics"))
+, m_xAnimatedGraphicsImg(m_xBuilder->weld_widget("lockanimatedgraphics"))
 , m_xAnimatedTexts(m_xBuilder->weld_check_button("animatedtext"))
+, m_xAnimatedTextsImg(m_xBuilder->weld_widget("lockanimatedtext"))
 , m_xHighContrast(m_xBuilder->weld_combo_box("highcontrast"))
+, m_xHighContrastImg(m_xBuilder->weld_widget("lockhighcontrast"))
+, m_xHighContrastLabel(m_xBuilder->weld_label("label13"))
 , m_xAutomaticFontColor(m_xBuilder->weld_check_button("autofontcolor"))
+, m_xAutomaticFontColorImg(m_xBuilder->weld_widget("lockautofontcolor"))
 , m_xPagePreviews(m_xBuilder->weld_check_button("systempagepreviewcolor"))
+, m_xPagePreviewsImg(m_xBuilder->weld_widget("locksystempagepreviewcolor"))
 {
 #ifdef UNX
 // UNIX: read the gconf2 setting instead to use the checkbox
@@ -103,28 +110,47 @@ bool SvxAccessibilityOptionsTabPage::FillItemSet( 
SfxItemSet* )
 void SvxAccessibilityOptionsTabPage::Reset( const SfxItemSet* )
 {
 m_xPagePreviews->set_active( 
officecfg::Office::Common::Accessibility::IsForPagePreviews::get() );
-if( 
officecfg::Office::Common::Accessibility::IsForPagePreviews::isReadOnly() )
+if 
(officecfg::Office::Common::Accessibility::IsForPagePreviews::isReadOnly())
+{
 m_xPagePreviews->set_sensitive(false);
+m_xPagePreviewsImg->set_visible(true);
+}
 
 m_xAnimatedGraphics->set_active( 
officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::get() );
-if( 
officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::isReadOnly() 
)
+if 
(officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::isReadOnly())
+{
 m_xAnimatedGraphics->set_sensitive(false);
+m_xAnimatedGraphicsImg->set_visible(true);
+}
 
 m_xAnimatedTexts->set_active( 
officecfg::Office::Common::Accessibility::IsAllowAnimatedText::get() );
-if( 
officecfg::Office::Common::Accessibility::IsAllowAnimatedText::isReadOnly() )
+if 
(officecfg::Office::Common::Accessibility::IsAllowAnimatedText::isReadOnly())
+{
 m_xAnimatedTexts->set_sensitive(false);
+m_xAnimatedTextsImg->set_visible(true);
+}
 
 m_xAutomaticFontColor->set_active( 
officecfg::Office::Common::Accessibility::IsAutomaticFontColor::get() );
-if( 
officecfg::Office::Common::Accessibility::IsAutomaticFontColor::isReadOnly() )
+if 
(officecfg::Office::Common::Accessibility::IsAutomaticFontColor::isReadOnly())
+{
 m_xAutomaticFontColor->set_sensitive(false);
+m_xAutomaticFontColorImg->set_visible(true);
+}
 
 m_xTextSelectionInReadonly->set_active( 
officecfg::Office::Common::Accessibility::IsSelectionInReadonly::get() );
-if( 
officecfg::Office::Common::Accessibility::IsSelectionInReadonly::isReadOnly() )
+if 
(officecfg::Office::Common::Accessibility::IsSelectionInReadonly::isReadOnly())
+{
 m_xTextSelectionInReadonly->set_sensitive(false);
+m_xTextSelectionInReadonlyImg->set_visible(true);
+}
 
 m_xHighContrast->set_active( 
officecfg::Office::Common::Accessibility::HighContrast::get() );
-if( officecfg::Office::Common::Accessibility::HighContrast::isReadOnly() )
+if (officecfg::Office::Common::Accessibility::HighContrast::isReadOnly())
+{
 m_xHighContrast->set_sensitive(false);
+m_xHighContrastLabel->set_sensitive(false);
+m_xHighContrastImg->set_visible(true);
+}
 
 AllSettings aAllSettings = Application::GetSettings();
 c

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

2023-10-26 Thread Balazs Varga (via logerrit)
 cui/source/options/optinet2.cxx|   37 
 cui/source/options/optinet2.hxx|8 
 cui/uiconfig/ui/optsecuritypage.ui |  299 ++---
 3 files changed, 262 insertions(+), 82 deletions(-)

New commits:
commit 6a8cae6995d22666c0a6fd2b42c171ef27ae30ac
Author: Balazs Varga 
AuthorDate: Tue Oct 24 18:30:31 2023 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 26 09:21:27 2023 +0200

tdf#157840 - UI: Part 6 - Unify lockdown behavior of Options dialog

for Security Page.

Change-Id: I9b5282326ea8edeb00d45d9d034a18041f89a281
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158393
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 29fe7d758d8d..90801955edaa 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -497,19 +497,27 @@ SvxSecurityTabPage::SvxSecurityTabPage(weld::Container* 
pPage, weld::DialogContr
 : SfxTabPage(pPage, pController, "cui/ui/optsecuritypage.ui", 
"OptSecurityPage", &rSet)
 , m_xSecurityOptionsPB(m_xBuilder->weld_button("options"))
 , m_xSavePasswordsCB(m_xBuilder->weld_check_button("savepassword"))
+, m_xSavePasswordsImg(m_xBuilder->weld_widget("locksavepassword"))
 , m_xShowConnectionsPB(m_xBuilder->weld_button("connections"))
 , m_xMasterPasswordCB(m_xBuilder->weld_check_button("usemasterpassword"))
+, m_xMasterPasswordImg(m_xBuilder->weld_widget("lockusemasterpassword"))
 , m_xMasterPasswordFT(m_xBuilder->weld_label("masterpasswordtext"))
 , m_xMasterPasswordPB(m_xBuilder->weld_button("masterpassword"))
 , m_xMacroSecFrame(m_xBuilder->weld_container("macrosecurity"))
 , m_xMacroSecPB(m_xBuilder->weld_button("macro"))
 , m_xCertFrame(m_xBuilder->weld_container("certificatepath"))
 , m_xCertPathPB(m_xBuilder->weld_button("cert"))
+, m_xCertPathImg(m_xBuilder->weld_widget("lockcertipath"))
+, m_xCertPathLabel(m_xBuilder->weld_label("label7"))
 , m_xTSAURLsFrame(m_xBuilder->weld_container("tsaurls"))
 , m_xTSAURLsPB(m_xBuilder->weld_button("tsas"))
+, m_xTSAURLsImg(m_xBuilder->weld_widget("locktsas"))
+, m_xTSAURLsLabel(m_xBuilder->weld_label("label9"))
 , m_xNoPasswordSaveFT(m_xBuilder->weld_label("nopasswordsave"))
 , m_xCertMgrPathLB(m_xBuilder->weld_button("browse"))
 , m_xParameterEdit(m_xBuilder->weld_entry("parameterfield"))
+, m_xCertMgrPathImg(m_xBuilder->weld_widget("lockcertimanager"))
+, m_xCertMgrPathLabel(m_xBuilder->weld_label("label11"))
 {
 //fdo#65595, we need height-for-width support here, but for now we can
 //bodge it
@@ -798,6 +806,16 @@ void SvxSecurityTabPage::InitControls()
 m_xMasterPasswordFT->set_sensitive(true);
 }
 }
+
+if (officecfg::Office::Common::Passwords::UseStorage::isReadOnly())
+{
+m_xSavePasswordsCB->set_sensitive(false);
+m_xShowConnectionsPB->set_sensitive(false);
+m_xSavePasswordsImg->set_visible(true);
+m_xMasterPasswordCB->set_sensitive(false);
+m_xMasterPasswordPB->set_sensitive(false);
+m_xMasterPasswordImg->set_visible(true);
+}
 }
 catch (const Exception&)
 {
@@ -810,6 +828,25 @@ void SvxSecurityTabPage::InitControls()
 
 if (!sCurCertMgr.isEmpty())
 m_xParameterEdit->set_text(sCurCertMgr);
+
+bool bEnable = 
!officecfg::Office::Common::Security::Scripting::CertMgrPath::isReadOnly();
+m_xCertMgrPathLB->set_sensitive(bEnable);
+m_xParameterEdit->set_sensitive(bEnable);
+m_xCertMgrPathLabel->set_sensitive(bEnable);
+m_xCertMgrPathImg->set_visible(!bEnable);
+
+bEnable = 
!officecfg::Office::Common::Security::Scripting::TSAURLs::isReadOnly();
+m_xTSAURLsPB->set_sensitive(bEnable);
+m_xTSAURLsLabel->set_sensitive(bEnable);
+m_xTSAURLsImg->set_visible(!bEnable);
+
+#ifndef UNX
+bEnable = 
!officecfg::Office::Common::Security::Scripting::CertDir::isReadOnly() ||
+
!officecfg::Office::Common::Security::Scripting::ManualCertDir::isReadOnly();
+m_xCertPathPB->set_sensitive(bEnable);
+m_xCertPathLabel->set_sensitive(bEnable);
+m_xCertPathImg->set_visible(!bEnable);
+#endif
 }
 catch (const uno::Exception&)
 {
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index f99c30b0b12b..1ad30723f758 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -90,9 +90,11 @@ private:
 std::unique_ptr m_xSecurityOptionsPB;
 
 std::unique_ptr m_xSavePasswordsCB;
+std::unique_ptr m_xSavePasswordsImg;
 std::unique_ptr m_xShowConnectionsPB;
 
 std::unique_ptr m_xMasterPasswordCB;
+std::unique_ptr m_xMasterPasswordImg;
 std::unique_ptr m_xMasterPasswordFT;
 std::unique_ptr m_xMasterPasswordPB;
 
@@ -101

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

2023-10-26 Thread Balazs Varga (via logerrit)
 cui/source/options/fontsubs.cxx |   24 +++
 cui/source/options/fontsubs.hxx |6 
 cui/uiconfig/ui/optfontspage.ui |  284 
 3 files changed, 202 insertions(+), 112 deletions(-)

New commits:
commit 9e8c90d92a6658ecc732554cb220d14eaee4692b
Author: Balazs Varga 
AuthorDate: Tue Oct 24 12:47:52 2023 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 26 09:20:49 2023 +0200

tdf#157839 - UI: Part 5 - Unify lockdown behavior of Options dialog

for Font Page.

Change-Id: Idd7bdf5d79269dcb5b6e3276b91f17221c3b02e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158384
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index eaf00e2364dd..4d61a873e264 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -35,14 +35,20 @@
 SvxFontSubstTabPage::SvxFontSubstTabPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rSet)
 : SfxTabPage(pPage, pController, "cui/ui/optfontspage.ui", "OptFontsPage", 
&rSet)
 , m_xUseTableCB(m_xBuilder->weld_check_button("usetable"))
+, m_xUseTableImg(m_xBuilder->weld_widget("lockusetable"))
 , m_xFont1CB(m_xBuilder->weld_combo_box("font1"))
 , m_xFont2CB(m_xBuilder->weld_combo_box("font2"))
 , m_xApply(m_xBuilder->weld_button("apply"))
 , m_xDelete(m_xBuilder->weld_button("delete"))
 , m_xCheckLB(m_xBuilder->weld_tree_view("checklb"))
 , m_xFontNameLB(m_xBuilder->weld_combo_box("fontname"))
+, m_xFontNameLabel(m_xBuilder->weld_label("label8"))
+, m_xFontNameImg(m_xBuilder->weld_widget("lockfontname"))
 , m_xNonPropFontsOnlyCB(m_xBuilder->weld_check_button("nonpropfontonly"))
+, m_xNonPropFontsOnlyImg(m_xBuilder->weld_widget("locknonpropfontonly"))
 , m_xFontHeightLB(m_xBuilder->weld_combo_box("fontheight"))
+, m_xFontHeightLabel(m_xBuilder->weld_label("label9"))
+, m_xFontHeightImg(m_xBuilder->weld_widget("lockfontheight"))
 {
 m_xFont1CB->make_sorted();
 m_xFont1CB->set_size_request(1, -1);
@@ -222,7 +228,10 @@ void  SvxFontSubstTabPage::Reset( const SfxItemSet* )
 m_xFont2CB->thaw();
 m_xFont1CB->thaw();
 
+bool bEnable = 
!officecfg::Office::Common::Font::Substitution::Replacement::isReadOnly();
 m_xUseTableCB->set_active(svtools::IsFontSubstitutionsEnabled());
+m_xUseTableCB->set_sensitive(bEnable);
+m_xUseTableImg->set_visible(!bEnable);
 
 std::vector aFontSubs = 
svtools::GetFontSubstitutions();
 std::unique_ptr xIter(m_xCheckLB->make_iterator());
@@ -259,6 +268,19 @@ void  SvxFontSubstTabPage::Reset( const SfxItemSet* )
 OUString::number(
 officecfg::Office::Common::Font::SourceViewFont::FontHeight::
 get()));
+
+bEnable = 
!officecfg::Office::Common::Font::SourceViewFont::FontName::isReadOnly();
+m_xFontNameLB->set_sensitive(bEnable);
+m_xFontNameLabel->set_sensitive(bEnable);
+m_xFontNameImg->set_visible(!bEnable);
+
+m_xNonPropFontsOnlyCB->set_sensitive(bEnable);
+m_xNonPropFontsOnlyImg->set_visible(!bEnable);
+
+m_xFontHeightLB->set_sensitive(bEnable);
+m_xFontHeightLabel->set_sensitive(bEnable);
+m_xFontHeightImg->set_visible(!bEnable);
+
 m_xNonPropFontsOnlyCB->save_state();
 m_xFontHeightLB->save_value();
 }
@@ -395,7 +417,7 @@ IMPL_LINK(SvxFontSubstTabPage, NonPropFontsHdl, 
weld::Toggleable&, rBox, void)
 
 void SvxFontSubstTabPage::CheckEnable()
 {
-bool bEnableAll = m_xUseTableCB->get_active();
+bool bEnableAll = m_xUseTableCB->get_active() && 
!officecfg::Office::Common::Font::SourceViewFont::FontName::isReadOnly();
 m_xCheckLB->set_sensitive(bEnableAll);
 m_xFont1CB->set_sensitive(bEnableAll);
 m_xFont2CB->set_sensitive(bEnableAll);
diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx
index d86ed04f73cc..e91a9818e56c 100644
--- a/cui/source/options/fontsubs.hxx
+++ b/cui/source/options/fontsubs.hxx
@@ -28,14 +28,20 @@ class SvxFontSubstTabPage : public SfxTabPage
 OUStringm_sAutomatic;
 
 std::unique_ptr m_xUseTableCB;
+std::unique_ptr m_xUseTableImg;
 std::unique_ptr m_xFont1CB;
 std::unique_ptr m_xFont2CB;
 std::unique_ptr m_xApply;
 std::unique_ptr m_xDelete;
 std::unique_ptr m_xCheckLB;
 std::unique_ptr m_xFontNameLB;
+std::unique_ptr m_xFontNameLabel;
+std::unique_ptr m_xFontNameImg;
 std::unique_ptr m_xNonPropFontsOnlyCB;
+std::unique_ptr m_xNonPropFontsOnlyImg;
 std::unique_ptr m_xFontHeightLB;
+std::unique_ptr m_xFontHeightLabel;
+std::unique_ptr m_xFontHeightImg;
 
 DECL_LINK(SelectComboBoxHdl, weld::ComboBox&, void);
 DECL_LINK(ToggleHdl, weld::Toggleable&, void);
diff --git a/cui/uiconfig/ui/optfontspage.ui b/cui/uiconfig/ui/optfontspage.ui
index 30bb49d92d4e..878377a2af36 100644
--- a/cui/uiconfig/ui/optfontspage.ui
+++ b/cui/ui

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

2023-10-23 Thread Balazs Varga (via logerrit)
 cui/source/options/optgdlg.cxx |   70 +++-
 cui/source/options/optgdlg.hxx |   19 +++
 cui/uiconfig/ui/optviewpage.ui |  236 +++--
 3 files changed, 294 insertions(+), 31 deletions(-)

New commits:
commit bf7b0febbf3081a3693bf09bc4e779f7c6c30dc0
Author: Balazs Varga 
AuthorDate: Fri Oct 20 13:37:07 2023 +0200
Commit: Balazs Varga 
CommitDate: Tue Oct 24 08:38:27 2023 +0200

tdf#157837 - UI: Part 3 - Unify lockdown behavior of Options dialog

for View Page.

Change-Id: Iac27aa516e4e4a4c1469b0ff465477c44c3a5660
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158250
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index f0e2cf26e2e2..ee727e074e51 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -586,24 +586,43 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , nNotebookbarSizeLB_InitialSelection(0)
 , nStyleLB_InitialSelection(0)
 , pCanvasSettings(new CanvasSettings)
+, m_xIconSizeLabel(m_xBuilder->weld_label("label14"))
 , m_xIconSizeLB(m_xBuilder->weld_combo_box("iconsize"))
+, m_xIconSizeImg(m_xBuilder->weld_widget("lockiconsize"))
+, m_xSidebarIconSizeLabel(m_xBuilder->weld_label("label9"))
 , m_xSidebarIconSizeLB(m_xBuilder->weld_combo_box("sidebariconsize"))
+, m_xSidebarIconSizeImg(m_xBuilder->weld_widget("locksidebariconsize"))
+, m_xNotebookbarIconSizeLabel(m_xBuilder->weld_label("label8"))
 , 
m_xNotebookbarIconSizeLB(m_xBuilder->weld_combo_box("notebookbariconsize"))
+, 
m_xNotebookbarIconSizeImg(m_xBuilder->weld_widget("locknotebookbariconsize"))
 , m_xDarkModeFrame(m_xBuilder->weld_widget("darkmode"))
+, m_xAppearanceStyleLabel(m_xBuilder->weld_label("label7"))
 , m_xAppearanceStyleLB(m_xBuilder->weld_combo_box("appearance"))
+, m_xAppearanceStyleImg(m_xBuilder->weld_widget("lockappearance"))
+, m_xIconStyleLabel(m_xBuilder->weld_label("label6"))
 , m_xIconStyleLB(m_xBuilder->weld_combo_box("iconstyle"))
+, m_xIconStyleImg(m_xBuilder->weld_widget("lockiconstyle"))
 , m_xFontAntiAliasing(m_xBuilder->weld_check_button("aafont"))
+, m_xFontAntiAliasingImg(m_xBuilder->weld_widget("lockaafont"))
 , m_xAAPointLimitLabel(m_xBuilder->weld_label("aafrom"))
+, m_xAAPointLimitLabelImg(m_xBuilder->weld_widget("lockaafrom"))
 , m_xAAPointLimit(m_xBuilder->weld_metric_spin_button("aanf", 
FieldUnit::PIXEL))
 , m_xFontShowCB(m_xBuilder->weld_check_button("showfontpreview"))
+, m_xFontShowImg(m_xBuilder->weld_widget("lockshowfontpreview"))
 , m_xUseHardwareAccell(m_xBuilder->weld_check_button("useaccel"))
+, m_xUseHardwareAccellImg(m_xBuilder->weld_widget("lockuseaccel"))
 , m_xUseAntiAliase(m_xBuilder->weld_check_button("useaa"))
+, m_xUseAntiAliaseImg(m_xBuilder->weld_widget("lockuseaa"))
 , m_xUseSkia(m_xBuilder->weld_check_button("useskia"))
+, m_xUseSkiaImg(m_xBuilder->weld_widget("lockuseskia"))
 , m_xForceSkiaRaster(m_xBuilder->weld_check_button("forceskiaraster"))
+, m_xForceSkiaRasterImg(m_xBuilder->weld_widget("lockforceskiaraster"))
 , m_xSkiaStatusEnabled(m_xBuilder->weld_label("skiaenabled"))
 , m_xSkiaStatusDisabled(m_xBuilder->weld_label("skiadisabled"))
 , m_xSkiaLog(m_xBuilder->weld_button("btnSkialog"))
+, m_xMouseMiddleLabel(m_xBuilder->weld_label("label12"))
 , m_xMouseMiddleLB(m_xBuilder->weld_combo_box("mousemiddle"))
+, m_xMouseMiddleImg(m_xBuilder->weld_widget("lockmousemiddle"))
 , m_xMoreIcons(m_xBuilder->weld_button("btnMoreIcons"))
 , m_xRunGPTests(m_xBuilder->weld_button("btn_rungptest"))
 , m_sAutoStr(m_xIconStyleLB->get_text(0))
@@ -667,7 +686,7 @@ IMPL_STATIC_LINK_NOARG(OfaViewTabPage, OnMoreIconsClick, 
weld::Button&, void)
 
 IMPL_LINK_NOARG( OfaViewTabPage, OnAntialiasingToggled, weld::Toggleable&, 
void )
 {
-bool bAAEnabled = m_xFontAntiAliasing->get_active();
+bool bAAEnabled = m_xFontAntiAliasing->get_active() && 
!officecfg::Office::Common::View::FontAntiAliasing::MinPixelHeight::isReadOnly();
 
 m_xAAPointLimitLabel->set_sensitive(bAAEnabled);
 m_xAAPointLimit->set_sensitive(bAAEnabled);
@@ -725,9 +744,10 @@ void OfaViewTabPage::UpdateSkiaStatus()
 m_xSkiaStatusEnabled->set_visible(bEnabled);
 m_xSkiaStatusDisabled->set_visible(!bEnabled);
 
-// FIXME: should really add code to show a 'lock' icon here.
 
m_xUseSkia->set_sensitive(!officecfg::Office::Common::VCL::UseSkia::isReadOnly());
+
m_xUseSkiaImg->set_visible(officecfg::Office::Common::VCL::UseSkia::isReadOnly());
 m_xForceSkiaRaster->set_sensitive(m_xUseSkia->get_active() && 
!officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly());
+
m_xForceSkiaRasterImg->set_visible(officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly());
 m_xSkiaLog->set_sensitive(b

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

2023-10-23 Thread Balazs Varga (via logerrit)
 cui/source/options/optgdlg.cxx|   52 +--
 cui/source/options/optgdlg.hxx|9 +
 cui/uiconfig/ui/optgeneralpage.ui |  172 --
 3 files changed, 199 insertions(+), 34 deletions(-)

New commits:
commit d8b96939806bbeacc91bb2c42d44bb6de21010d0
Author: Balazs Varga 
AuthorDate: Thu Oct 19 18:08:38 2023 +0200
Commit: Balazs Varga 
CommitDate: Tue Oct 24 08:37:42 2023 +0200

tdf#157702 - UI: Part 2 - Unify lockdown behavior of Options dialog

for General Page.

Change-Id: Ide7c387d1b9f8ebba7f7801cdd69b1e1a93f90e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158196
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index c8a569a9845e..f0e2cf26e2e2 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -160,35 +160,36 @@ bool lcl_HasSystemFilePicker()
 OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rSet)
 : SfxTabPage(pPage, pController, "cui/ui/optgeneralpage.ui", 
"OptGeneralPage", &rSet)
 , m_xExtHelpCB(m_xBuilder->weld_check_button("exthelp"))
+, m_xExtHelpImg(m_xBuilder->weld_widget("lockexthelp"))
 , m_xPopUpNoHelpCB(m_xBuilder->weld_check_button("popupnohelp"))
+, m_xPopUpNoHelpImg(m_xBuilder->weld_widget("lockpopupnohelp"))
 , m_xShowTipOfTheDay(m_xBuilder->weld_check_button("cbShowTipOfTheDay"))
+, m_xShowTipOfTheDayImg(m_xBuilder->weld_widget("lockcbShowTipOfTheDay"))
 , m_xFileDlgFrame(m_xBuilder->weld_widget("filedlgframe"))
 , m_xFileDlgROImage(m_xBuilder->weld_widget("lockimage"))
 , m_xFileDlgCB(m_xBuilder->weld_check_button("filedlg"))
 , m_xDocStatusCB(m_xBuilder->weld_check_button("docstatus"))
+, m_xDocStatusImg(m_xBuilder->weld_widget("lockdocstatus"))
 , m_xYearFrame(m_xBuilder->weld_widget("yearframe"))
+, m_xYearLabel(m_xBuilder->weld_label("yearslabel"))
 , m_xYearValueField(m_xBuilder->weld_spin_button("year"))
 , m_xToYearFT(m_xBuilder->weld_label("toyear"))
+, m_xYearFrameImg(m_xBuilder->weld_widget("lockyears"))
 #if HAVE_FEATURE_BREAKPAD
 , m_xPrivacyFrame(m_xBuilder->weld_widget("privacyframe"))
 , m_xCrashReport(m_xBuilder->weld_check_button("crashreport"))
+, m_xCrashReportImg(m_xBuilder->weld_widget("lockcrashreport"))
 #endif
 #if defined(_WIN32)
 , m_xQuickStarterFrame(m_xBuilder->weld_widget("quickstarter"))
 , m_xQuickLaunchCB(m_xBuilder->weld_check_button("quicklaunch"))
+, m_xQuickLaunchImg(m_xBuilder->weld_widget("lockquicklaunch"))
 , m_xFileAssocFrame(m_xBuilder->weld_widget("fileassoc"))
 , m_xFileAssocBtn(m_xBuilder->weld_button("assocfiles"))
 , 
m_xPerformFileExtCheck(m_xBuilder->weld_check_button("cbPerformFileExtCheck"))
+, 
m_xPerformFileExtImg(m_xBuilder->weld_widget("lockcbPerformFileExtCheck"))
 #endif
 {
-if (!lcl_HasSystemFilePicker())
-m_xFileDlgFrame->hide();
-else if 
(officecfg::Office::Common::Misc::UseSystemFileDialog::isReadOnly())
-{
-m_xFileDlgROImage->show();
-m_xFileDlgCB->set_sensitive(false);
-}
-
 #if HAVE_FEATURE_BREAKPAD
 m_xPrivacyFrame->show();
 #endif
@@ -221,7 +222,7 @@ std::unique_ptr OfaMiscTabPage::Create( 
weld::Container* pPage, weld
 OUString OfaMiscTabPage::GetAllStrings()
 {
 OUString sAllStrings;
-OUString labels[] = { "label1", "label2", "label4", "label5", "label6",
+OUString labels[] = { "label1", "label2", "label4", "label5", "yearslabel",
   "toyear", "label7", "label8", "label9" };
 
 for (const auto& label : labels)
@@ -313,19 +314,48 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
 
 void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
 {
+bool bEnable = !officecfg::Office::Common::Help::ExtendedTip::isReadOnly();
 m_xExtHelpCB->set_active( officecfg::Office::Common::Help::Tip::get() &&
 officecfg::Office::Common::Help::ExtendedTip::get() );
+m_xExtHelpCB->set_sensitive(bEnable);
+m_xExtHelpImg->set_visible(!bEnable);
 m_xExtHelpCB->save_state();
+
+bEnable = 
!officecfg::Office::Common::Help::BuiltInHelpNotInstalledPopUp::isReadOnly();
 m_xPopUpNoHelpCB->set_active( 
officecfg::Office::Common::Help::BuiltInHelpNotInstalledPopUp::get() );
+m_xPopUpNoHelpCB->set_sensitive(bEnable);
+m_xPopUpNoHelpImg->set_visible(!bEnable);
 m_xPopUpNoHelpCB->save_state();
+
+bEnable = !officecfg::Office::Common::Misc::ShowTipOfTheDay::isReadOnly();
 m_xShowTipOfTheDay->set_active( 
officecfg::Office::Common::Misc::ShowTipOfTheDay::get() );
+m_xShowTipOfTheDay->set_sensitive(bEnable);
+m_xShowTipOfTheDayImg->set_visible(!bEnable);
 m_xShowTipOfTheDay->save_state();
-m_xFileDlgCB->set_active( 
!officecfg::Office::Common::Misc::UseSystemFileDialog::get() );
+
+if (!lcl_HasSystemFilePicker())
+m_xFile

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

2023-10-23 Thread Balazs Varga (via logerrit)
 cui/source/inc/cuioptgenrl.hxx  |6 
 cui/source/options/optgenrl.cxx |   61 ++--
 cui/uiconfig/ui/optuserpage.ui  |  274 +++-
 3 files changed, 293 insertions(+), 48 deletions(-)

New commits:
commit 89fb894825b894080049abc500315f8b985c32c2
Author: Balazs Varga 
AuthorDate: Wed Oct 18 18:41:38 2023 +0200
Commit: Balazs Varga 
CommitDate: Tue Oct 24 08:32:56 2023 +0200

tdf#157700 - UI: Part 1 - Unify lockdown behavior of Options dialog

for page User Data.

Change-Id: I912fe2786ad5e7fc110137dfbcff73ee25fb0fbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158126
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/inc/cuioptgenrl.hxx b/cui/source/inc/cuioptgenrl.hxx
index ac903a389df4..0ee8cacb6c50 100644
--- a/cui/source/inc/cuioptgenrl.hxx
+++ b/cui/source/inc/cuioptgenrl.hxx
@@ -32,10 +32,16 @@ class SvxGeneralTabPage : public SfxTabPage
 private:
 // the "Use data for document properties" checkbox
 std::unique_ptr m_xUseDataCB;
+std::unique_ptr m_xUseDataImg;
 std::unique_ptr m_xCryptoFrame;
 std::unique_ptr m_xSigningKeyLB;
+std::unique_ptr m_xSigningKeyFT;
+std::unique_ptr m_xSigningKeyImg;
 std::unique_ptr m_xEncryptionKeyLB;
+std::unique_ptr m_xEncryptionKeyFT;
+std::unique_ptr m_xEncryptionKeyImg;
 std::unique_ptr m_xEncryptToSelfCB;
+std::unique_ptr m_xEncryptToSelfImg;
 // rows
 struct Row;
 std::vector > vRows;
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index f22eb6467f11..d2cf40244d85 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -79,6 +79,8 @@ namespace Lang
 
 struct
 {
+// id of the lockimage
+OUString pLockId;
 // id of the text
 OUString pTextId;
 // language flags (see Lang above):
@@ -87,18 +89,18 @@ struct
 }
 const vRowInfo[] =
 {
-{ "companyft",   Lang::All },
-{ "nameft",  Lang::All & ~Lang::Russian & ~Lang::Eastern },
-{ "rusnameft",   Lang::Russian },
-{ "eastnameft",  Lang::Eastern },
-{ "streetft",Lang::All & ~Lang::Russian },
-{ "russtreetft", Lang::Russian },
-{ "icityft", Lang::All & ~Lang::US },
-{ "cityft",  Lang::US },
-{ "countryft",   Lang::All },
-{ "titleft", Lang::All },
-{ "phoneft", Lang::All },
-{ "faxft",   Lang::All },
+{ "lockcompanyft",  "companyft",   Lang::All },
+{ "locknameft", "nameft",  Lang::All & ~Lang::Russian & 
~Lang::Eastern },
+{ "lockrusnameft",  "rusnameft",   Lang::Russian },
+{ "lockeastnameft", "eastnameft",  Lang::Eastern },
+{ "lockstreetft",   "streetft",Lang::All & ~Lang::Russian },
+{ "lockrusstreetft","russtreetft", Lang::Russian },
+{ "lockicityft","icityft", Lang::All & ~Lang::US },
+{ "lockcityft", "cityft",  Lang::US },
+{ "lockcountryft",  "countryft",   Lang::All },
+{ "locktitleft","titleft", Lang::All },
+{ "lockphoneft","phoneft", Lang::All },
+{ "lockfaxft",  "faxft",   Lang::All },
 };
 
 
@@ -166,14 +168,17 @@ const vFieldInfo[] =
 
 struct SvxGeneralTabPage::Row
 {
+// row lockdown icon
+std::unique_ptr xLockImg;
 // row label
 std::unique_ptr xLabel;
 // first and last field in the row (last is exclusive)
 unsigned nFirstField, nLastField;
 
 public:
-explicit Row (std::unique_ptr xLabel_)
-: xLabel(std::move(xLabel_))
+explicit Row (std::unique_ptr xLockImg_, 
std::unique_ptr xLabel_)
+: xLockImg(std::move(xLockImg_))
+, xLabel(std::move(xLabel_))
 , nFirstField(0)
 , nLastField(0)
 {
@@ -210,10 +215,16 @@ public:
 SvxGeneralTabPage::SvxGeneralTabPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rCoreSet)
 : SfxTabPage(pPage, pController, "cui/ui/optuserpage.ui", "OptUserPage", 
&rCoreSet)
 , m_xUseDataCB(m_xBuilder->weld_check_button("usefordocprop"))
+, m_xUseDataImg(m_xBuilder->weld_widget("lockusefordocprop"))
 , m_xCryptoFrame(m_xBuilder->weld_widget( "cryptography"))
 , m_xSigningKeyLB(m_xBuilder->weld_combo_box("signingkey"))
+, m_xSigningKeyFT(m_xBuilder->weld_label("signingkeylabel"))
+, m_xSigningKeyImg(m_xBuilder->weld_widget("locksigningkey"))
 , m_xEncryptionKeyLB(m_xBuilder->weld_combo_box("encryptionkey"))
+, m_xEncryptionKeyFT(m_xBuilder->weld_label("encryptionkeylabel"))
+, m_xEncryptionKeyImg(m_xBuilder->weld_widget("lockencryptionkey"))
 , m_xEncryptToSelfCB(m_xBuilder->weld_check_button("encrypttoself"))
+, m_xEncryptToSelfImg(m_xBuilder->weld_widget("lockencrypttoself"))
 {
 InitControls();
 #if HAVE_FEATURE_GPGME
@@ -258,7 +269,7 @@ void SvxGeneralTabPage::InitControls ()
 if (!(vRowInfo[iRow].nLangFlags & LangBit))
 continue;
 // creating row
-vRows.push_back(std::make_sha

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/unotools officecfg/registry sfx2/source sw/source unotools/source xmloff/source

2023-10-19 Thread Balazs Varga (via logerrit)
 cui/source/options/optinet2.cxx|4 
 cui/source/options/securityoptions.cxx |   39 +
 cui/source/options/securityoptions.hxx |   20 
 cui/uiconfig/ui/securityoptionsdialog.ui   |  406 -
 include/unotools/securityoptions.hxx   |4 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   36 +
 sfx2/source/doc/objcont.cxx|3 
 sfx2/source/doc/objserv.cxx|   10 
 sfx2/source/doc/objstor.cxx|3 
 sw/source/filter/ww8/docxattributeoutput.cxx   |   12 
 sw/source/filter/ww8/docxtableexport.cxx   |6 
 unotools/source/config/securityoptions.cxx |   36 +
 xmloff/source/draw/sdxmlexp.cxx|3 
 xmloff/source/text/XMLRedlineExport.cxx|6 
 xmloff/source/text/txtflde.cxx |3 
 15 files changed, 435 insertions(+), 156 deletions(-)

New commits:
commit 9f9e195dbabe07244622924bf609ab4676f16993
Author: Balazs Varga 
AuthorDate: Wed Oct 18 11:05:50 2023 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 19 14:15:52 2023 +0200

tdf#157484 UI: Add UI controls for personal information to be kept

or removed upon save.

With the new options button we can keep the security infos upon save
such as (even if we set the remove personal infos):

- RedLine Info
- Document User Info
- Author and date of notes
- Document version infos

Also on the infobar, if we have a warning, clicking on the infobar button
the security option dialog will open where we can set/modify these options.

follow-up of: 1f440348eb0892fd2c9597806d87b5fe9d60d49a
(tdf#157482 UI: Turn Security Warnings popup windows into infobars)

Change-Id: I8d5d944d76dbdd31653401246113de097ca6d57b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158112
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 22cd480eb6a2..8ca6a5488a78 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -897,6 +897,10 @@ bool SvxSecurityTabPage::FillItemSet( SfxItemSet* )
 CheckAndSave( SvtSecurityOptions::EOption::DocWarnPrint, 
m_xSecOptDlg->IsPrintDocsChecked(), bModified );
 CheckAndSave( SvtSecurityOptions::EOption::DocWarnCreatePdf, 
m_xSecOptDlg->IsCreatePdfChecked(), bModified );
 CheckAndSave( SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo, 
m_xSecOptDlg->IsRemovePersInfoChecked(), bModified );
+CheckAndSave( SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo, 
m_xSecOptDlg->IsRemoveRedlineInfoChecked(), bModified );
+CheckAndSave( SvtSecurityOptions::EOption::DocWarnKeepDocUserInfo, 
m_xSecOptDlg->IsRemoveDocUserInfoChecked(), bModified );
+CheckAndSave( 
SvtSecurityOptions::EOption::DocWarnKeepNoteAuthorDateInfo, 
m_xSecOptDlg->IsRemoveNoteAuthorInfoChecked(), bModified );
+CheckAndSave( SvtSecurityOptions::EOption::DocWarnKeepDocVersionInfo, 
m_xSecOptDlg->IsRemoveDocVersionInfoChecked(), bModified );
 CheckAndSave( SvtSecurityOptions::EOption::DocWarnRecommendPassword, 
m_xSecOptDlg->IsRecommPasswdChecked(), bModified );
 CheckAndSave( SvtSecurityOptions::EOption::CtrlClickHyperlink, 
m_xSecOptDlg->IsCtrlHyperlinkChecked(), bModified );
 CheckAndSave( SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, 
m_xSecOptDlg->IsBlockUntrustedRefererLinksChecked(), bModified );
diff --git a/cui/source/options/securityoptions.cxx 
b/cui/source/options/securityoptions.cxx
index 4b00176ab490..d583f626183e 100644
--- a/cui/source/options/securityoptions.cxx
+++ b/cui/source/options/securityoptions.cxx
@@ -54,6 +54,25 @@ SecurityOptionsDialog::SecurityOptionsDialog(weld::Window* 
pParent)
 , m_xCtrlHyperlinkImg(m_xBuilder->weld_widget("lockctrlclick"))
 , 
m_xBlockUntrustedRefererLinksCB(m_xBuilder->weld_check_button("blockuntrusted"))
 , 
m_xBlockUntrustedRefererLinksImg(m_xBuilder->weld_widget("lockblockuntrusted"))
+, m_xRedlineinfoCB(m_xBuilder->weld_check_button("redlineinfo"))
+, m_xRedlineinfoImg(m_xBuilder->weld_widget("lockredlineinfo"))
+, m_xDocPropertiesCB(m_xBuilder->weld_check_button("docproperties"))
+, m_xDocPropertiesImg(m_xBuilder->weld_widget("lockdocproperties"))
+, m_xNoteAuthorCB(m_xBuilder->weld_check_button("noteauthor"))
+, m_xNoteAuthorImg(m_xBuilder->weld_widget("locknoteauthor"))
+, m_xDocumentVersionCB(m_xBuilder->weld_check_button("documentversion"))
+, m_xDocumentVersionImg(m_xBuilder->weld_widget("lockdocumentversion"))
+{
+m_xRemovePersInfoCB->connect_toggled(LINK(this, SecurityOptionsDialog, 
ShowPersonalInfosToggle));
+init();
+}

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

2023-09-12 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |   72 +++--
 cui/source/inc/SpellDialog.hxx |9 
 cui/uiconfig/ui/spellingdialog.ui  |3 +
 3 files changed, 79 insertions(+), 5 deletions(-)

New commits:
commit 43677cb0d95de06bea0f08e87ccfa3230dc8bd6b
Author: Caolán McNamara 
AuthorDate: Tue Sep 12 13:22:04 2023 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 12 15:23:36 2023 +0200

Resolves: tdf#157148 spelling dialog sentence box has no scrollbars

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

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 692c8e4512d1..1e52d4e2aed3 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -173,7 +173,7 @@ SpellDialog::SpellDialog(SpellDialogChildWindow* 
pChildWindow,
 , m_xExplainFT(m_xBuilder->weld_label("explain"))
 , m_xExplainLink(m_xBuilder->weld_link_button("explainlink"))
 , m_xNotInDictFT(m_xBuilder->weld_label("notindictft"))
-, m_xSentenceED(new SentenceEditWindow_Impl)
+, m_xSentenceED(new 
SentenceEditWindow_Impl(m_xBuilder->weld_scrolled_window("scrolledwindow", 
true)))
 , m_xSuggestionFT(m_xBuilder->weld_label("suggestionsft"))
 , m_xSuggestionLB(m_xBuilder->weld_tree_view("suggestionslb"))
 , m_xIgnorePB(m_xBuilder->weld_button("ignore"))
@@ -1129,13 +1129,15 @@ bool 
SpellDialog::ApplyChangeAllList_Impl(SpellPortions& rSentence, bool &bHasRe
 return bRet;
 }
 
-SentenceEditWindow_Impl::SentenceEditWindow_Impl()
-: m_pSpellDialog(nullptr)
+SentenceEditWindow_Impl::SentenceEditWindow_Impl(std::unique_ptr
 xScrolledWindow)
+: m_xScrolledWindow(std::move(xScrolledWindow))
+, m_pSpellDialog(nullptr)
 , m_pToolbar(nullptr)
 , m_nErrorStart(0)
 , m_nErrorEnd(0)
 , m_bIsUndoEditMode(false)
 {
+m_xScrolledWindow->connect_vadjustment_changed(LINK(this, 
SentenceEditWindow_Impl, ScrollHdl));
 }
 
 void SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
@@ -1147,6 +1149,8 @@ void 
SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
 // tdf#132288 don't merge equal adjacent attributes
 m_xEditEngine->DisableAttributeExpanding();
 
+m_xEditEngine->SetStatusEventHdl(LINK(this, SentenceEditWindow_Impl, 
EditStatusHdl));
+
 // tdf#142631 use document background color in this widget
 Color aBgColor = 
svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
 OutputDevice& rDevice = pDrawingArea->get_ref_device();
@@ -1155,6 +1159,68 @@ void 
SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
 m_xEditEngine->SetBackgroundColor(aBgColor);
 }
 
+IMPL_LINK_NOARG(SentenceEditWindow_Impl, EditStatusHdl, EditStatus&, void)
+{
+SetScrollBarRange();
+DoScroll();
+}
+
+IMPL_LINK_NOARG(SentenceEditWindow_Impl, ScrollHdl, weld::ScrolledWindow&, 
void)
+{
+DoScroll();
+}
+
+void SentenceEditWindow_Impl::DoScroll()
+{
+if (m_xEditView)
+{
+auto currentDocPos = m_xEditView->GetVisArea().Top();
+auto nDiff = currentDocPos - 
m_xScrolledWindow->vadjustment_get_value();
+// we expect SetScrollBarRange callback to be triggered by Scroll
+// to set where we ended up
+m_xEditView->Scroll(0, nDiff);
+}
+}
+
+void SentenceEditWindow_Impl::EditViewScrollStateChange()
+{
+// editengine height has changed or editview scroll pos has changed
+SetScrollBarRange();
+}
+
+void SentenceEditWindow_Impl::SetScrollBarRange()
+{
+EditEngine *pEditEngine = GetEditEngine();
+if (!pEditEngine)
+return;
+if (!m_xScrolledWindow)
+return;
+EditView* pEditView = GetEditView();
+if (!pEditView)
+return;
+
+int nVUpper = pEditEngine->GetTextHeight();
+int nVCurrentDocPos = pEditView->GetVisArea().Top();
+const Size aOut(pEditView->GetOutputArea().GetSize());
+int nVStepIncrement = aOut.Height() * 2 / 10;
+int nVPageIncrement = aOut.Height() * 8 / 10;
+int nVPageSize = aOut.Height();
+
+/* limit the page size to below nUpper because gtk's 
gtk_scrolled_window_start_deceleration has
+   effectively...
+
+   lower = gtk_adjustment_get_lower
+   upper = gtk_adjustment_get_upper - gtk_adjustment_get_page_size
+
+   and requires that upper > lower or the deceleration animation never ends
+*/
+nVPageSize = std::min(nVPageSize, nVUpper);
+
+m_xScrolledWindow->vadjustment_configure(nVCurrentDocPos, 0, nVUpper,
+ nVStepIncrement, nVPageIncrement, 
nVPageSize);
+m_xScrolledWindow->set_vpolicy(nVUpper > nVPageSize ? 
VclPolicyType::ALWAYS : VclPolicyType::NEVER);
+}
+
 SentenceEditWindow_Impl::~SentenceEditWindow_Impl()
 {
 }
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/in

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

2023-08-24 Thread Andrea Rosetti (via logerrit)
 cui/source/inc/grfpage.hxx  |3 ++
 cui/source/tabpages/grfpage.cxx |   28 +++
 cui/uiconfig/ui/croppage.ui |   48 
 3 files changed, 56 insertions(+), 23 deletions(-)

New commits:
commit 826300d55b8f18593c4b56fb448d09fac52820bd
Author: Andrea Rosetti 
AuthorDate: Wed Aug 2 11:40:25 2023 +0200
Commit: Heiko Tietze 
CommitDate: Fri Aug 25 07:37:33 2023 +0200

tdf#86628 Add reset crop function to dialog

Added a function that uncrops the image, keeping the modified size
(which can be restored using the already existing Original Size button)

Change-Id: I8e98de2b586c68d52f819955ce5a74f20cbe6698
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155219
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index adfaebc33595..673062b7593a 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -80,6 +80,8 @@ class SvxGrfCropPage : public SfxTabPage
 std::unique_ptr m_xOrigSizeFT;
 std::unique_ptr m_xOrigSizePB;
 
+std::unique_ptr m_xUncropPB;
+
 // Example
 std::unique_ptr m_xExampleWN;
 
@@ -87,6 +89,7 @@ class SvxGrfCropPage : public SfxTabPage
 DECL_LINK(SizeHdl, weld::MetricSpinButton&, void);
 DECL_LINK(CropModifyHdl, weld::MetricSpinButton&, void);
 DECL_LINK(OrigSizeHdl, weld::Button&, void);
+DECL_LINK(UncropHdl, weld::Button&, void);
 
 voidCalcZoom();
 voidCalcMinMaxBorder();
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index aa49c2a7267c..fac0bfb6ab05 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -75,6 +75,7 @@ SvxGrfCropPage::SvxGrfCropPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xOrigSizeGrid(m_xBuilder->weld_widget("origsizegrid"))
 , m_xOrigSizeFT(m_xBuilder->weld_label("origsizeft"))
 , m_xOrigSizePB(m_xBuilder->weld_button("origsize"))
+, m_xUncropPB(m_xBuilder->weld_button("uncrop"))
 , m_xExampleWN(new weld::CustomWeld(*m_xBuilder, "preview", m_aExampleWN))
 {
 SetExchangeSupport();
@@ -104,6 +105,7 @@ SvxGrfCropPage::SvxGrfCropPage(weld::Container* pPage, 
weld::DialogController* p
 m_xBottomMF->connect_value_changed( aLk );
 
 m_xOrigSizePB->connect_clicked(LINK(this, SvxGrfCropPage, OrigSizeHdl));
+m_xUncropPB->connect_clicked(LINK(this, SvxGrfCropPage, UncropHdl));
 }
 
 SvxGrfCropPage::~SvxGrfCropPage()
@@ -524,6 +526,32 @@ IMPL_LINK_NOARG(SvxGrfCropPage, OrigSizeHdl, 
weld::Button&, void)
 m_xHeightZoomMF->set_value(100, FieldUnit::NONE);
 m_bSetOrigSize = true;
 }
+
+/*
+description: reset crop
+ */
+
+IMPL_LINK_NOARG(SvxGrfCropPage, UncropHdl, weld::Button&, void)
+{
+SfxItemPool* pPool = GetItemSet().GetPool();
+DBG_ASSERT( pPool, "Where is the pool?" );
+
+m_xLeftMF->set_value(0, FieldUnit::NONE);
+m_xRightMF->set_value(0, FieldUnit::NONE);
+m_xTopMF->set_value(0, FieldUnit::NONE);
+m_xBottomMF->set_value(0, FieldUnit::NONE);
+
+m_aExampleWN.SetLeft(0);
+m_aExampleWN.SetRight(0);
+m_aExampleWN.SetTop(0);
+m_aExampleWN.SetBottom(0);
+
+m_aExampleWN.Invalidate();
+CalcMinMaxBorder();
+
+}
+
+
 /*
 description: compute scale
  */
diff --git a/cui/uiconfig/ui/croppage.ui b/cui/uiconfig/ui/croppage.ui
index b7fe3d8224a6..93f3eafe504a 100644
--- a/cui/uiconfig/ui/croppage.ui
+++ b/cui/uiconfig/ui/croppage.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -51,7 +51,6 @@
 1
 10
   
-  
   
 True
 False
@@ -68,15 +67,14 @@
 0
 none
 
-  
   
 True
 False
+12
+6
 True
 6
 18
-12
-6
 
   
 Keep _scale
@@ -108,7 +106,6 @@
   
 
 
-  
   
 True
 False
@@ -133,8 +130,8 @@
 True
 True
 True
+True
 adjustment1
-True
 2
   
   
@@ -161,8 +158,8 @@
 True
 True
 True
+True
 adjustment7
-True
 2
   
   
@@ -177,7 +174,6 @@
   
 
 
-  
   
 True
 False
@@ -216,8 +212,8 @@

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

2023-08-18 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/inc/paragrph.hxx  |8 +++
 cui/source/tabpages/paragrph.cxx |   40 +++
 cui/uiconfig/ui/textflowpage.ui  |   16 +--
 3 files changed, 34 insertions(+), 30 deletions(-)

New commits:
commit 47edf86a62784aa275de7cc89df01a4fcd4e90c8
Author: Samuel Mehrbrodt 
AuthorDate: Thu Aug 17 14:56:11 2023 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Fri Aug 18 15:23:41 2023 +0200

tdf#156795, tdf#156109 Avoid typesetter language: orphan, widow control

Instead use descriptive language to make it obvious what these options are 
for.
Also invert the logic of the "Do not split paragraph" option as suggested 
in tdf#156109.

Change-Id: I619c0558597aff26b8b7fafea3548d8bf1f24a36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155769
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 2b6f26fd25d8..9e78c8311015 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -219,7 +219,7 @@ private:
 weld::TriStateEnabled aPageBreakState;
 weld::TriStateEnabled aApplyCollState;
 weld::TriStateEnabled aPageNumState;
-weld::TriStateEnabled aKeepTogetherState;
+weld::TriStateEnabled aAllowSplitState;
 weld::TriStateEnabled aKeepParaState;
 weld::TriStateEnabled aOrphanState;
 weld::TriStateEnabled aWidowState;
@@ -255,7 +255,7 @@ private:
 std::unique_ptr m_xPagenumEdit;
 
 // paragraph division
-std::unique_ptr m_xKeepTogetherBox;
+std::unique_ptr m_xAllowSplitBox;
 std::unique_ptr m_xKeepParaBox;
 
 // orphan/widow
@@ -271,12 +271,12 @@ private:
 void PageNumBoxClickHdl();
 void ApplyCollClickHdl();
 void PageBreakHdl();
-void KeepTogetherHdl();
+void AllowSplitHdl();
 void OrphanHdl();
 void WidowHdl();
 
 DECL_LINK(PageBreakHdl_Impl, weld::Toggleable&, void);
-DECL_LINK(KeepTogetherHdl_Impl, weld::Toggleable&, void);
+DECL_LINK(AllowSplitHdl_Impl, weld::Toggleable&, void);
 DECL_LINK(WidowHdl_Impl, weld::Toggleable&, void);
 DECL_LINK(OrphanHdl_Impl, weld::Toggleable&, void);
 DECL_LINK(HyphenClickHdl_Impl, weld::Toggleable&, void);
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index ff06ee623c8e..957431e565a9 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1753,9 +1753,9 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
 
 // paragraph split
 _nWhich = GetWhich( SID_ATTR_PARA_SPLIT );
-eState = m_xKeepTogetherBox->get_state();
+eState = m_xAllowSplitBox->get_state();
 
-if (m_xKeepTogetherBox->get_state_changed_from_saved())
+if (m_xAllowSplitBox->get_state_changed_from_saved())
 {
 pOld = GetOldItem( *rOutSet, SID_ATTR_PARA_SPLIT );
 
@@ -2056,13 +2056,13 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* 
rSet )
 {
 const SvxFormatSplitItem& rSplit =
 static_cast(rSet->Get( _nWhich ));
-aKeepTogetherState.bTriStateEnabled = false;
+aAllowSplitState.bTriStateEnabled = false;
 
 if ( !rSplit.GetValue() )
-m_xKeepTogetherBox->set_state(TRISTATE_TRUE);
+m_xAllowSplitBox->set_state(TRISTATE_FALSE);
 else
 {
-m_xKeepTogetherBox->set_state(TRISTATE_FALSE);
+m_xAllowSplitBox->set_state(TRISTATE_TRUE);
 // default widows and orphans to enabled
 m_xWidowBox->set_sensitive(true);
 m_xOrphanBox->set_sensitive(true);
@@ -2113,12 +2113,12 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* 
rSet )
 aOrphanState.eState = m_xOrphanBox->get_state();
 }
 else if ( SfxItemState::DONTCARE == eItemState )
-m_xKeepTogetherBox->set_state(TRISTATE_INDET);
+m_xAllowSplitBox->set_state(TRISTATE_INDET);
 else
-m_xKeepTogetherBox->set_sensitive(false);
+m_xAllowSplitBox->set_sensitive(false);
 
 // so that everything is enabled correctly
-KeepTogetherHdl();
+AllowSplitHdl();
 WidowHdl();
 OrphanHdl();
 ChangesApplied();
@@ -2144,7 +2144,7 @@ void SvxExtParagraphTabPage::ChangesApplied()
 m_xApplyCollBox->save_value();
 m_xPageNumBox->save_state();
 m_xPagenumEdit->save_value();
-m_xKeepTogetherBox->save_state();
+m_xAllowSplitBox->save_state();
 m_xKeepParaBox->save_state();
 m_xWidowBox->save_state();
 m_xOrphanBox->save_state();
@@ -2202,7 +2202,7 @@ 
SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia
 , m_xPageNumBox(m_xBuilder->weld_check_button("labelPageNum"))
 , m_xPagenumEdit(m_xBuilder->weld_spin_button("spinPageNumber"))
 // Options
-, m_xKeepTogetherBox(m_xBuilder->weld_check_button("checkSplitPara"))
+, m_xAllowSplitBox(m_xBuilder->weld_check_button("checkSplitPara"))
 , m_xKeepParaBox

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/sfx2 officecfg/registry sfx2/source

2023-07-18 Thread Justin Luth (via logerrit)
 cui/source/options/optsave.cxx |   23 +++
 cui/source/options/optsave.hxx |2 +
 cui/uiconfig/ui/optsavepage.ui |   26 +++--
 include/sfx2/docfile.hxx   |2 -
 include/sfx2/sfxsids.hrc   |3 +
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |9 
 sfx2/source/appl/appcfg.cxx|7 +++
 sfx2/source/doc/docfile.cxx|   17 +++-
 sfx2/source/doc/objstor.cxx|2 -
 9 files changed, 83 insertions(+), 8 deletions(-)

New commits:
commit 09d3e887b41a36bd0852ac004c6744f447361ac6
Author: Justin Luth 
AuthorDate: Sat Jul 15 15:42:18 2023 -0400
Commit: Mike Kaganski 
CommitDate: Tue Jul 18 19:23:42 2023 +0200

tdf#68565 autosave: add option to store backup in document's folder

Creating a backup copy became the default in LO 7.6.

Allow the user to choose whether to store this previous version
of the file beside the original file (in the same folder).
The historical (and still the default) action
is to store it in a special backup folder instead.

The problem with the backup folder is that it overwrites files
that happen to have the same name (because the originals
reside in different directories), which is not uncommon.
Adding this option allows the user to overcome that limitation.

However, I do not want this new option to become the default,
because it effectively doubles the number of documents
stored in the document folder.
I think that is very messy, and previous versioning is best
left to dedicated backup tools - which would not appreciate
doubling the number of documents they preserve.
Plus I've worked with enough novice users to know that people are easily
confused when multiple documents have (essentially) the same name.

Change-Id: I503f656af91807019587e3d7b0d82b661f1eb437
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154489
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 743c6015b1d5..b60fe8da2594 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -84,6 +84,7 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xLoadDocPrinterCB(m_xBuilder->weld_check_button("load_docprinter"))
 , m_xDocInfoCB(m_xBuilder->weld_check_button("docinfo"))
 , m_xBackupCB(m_xBuilder->weld_check_button("backup"))
+, 
m_xBackupIntoDocumentFolderCB(m_xBuilder->weld_check_button("backupintodocumentfolder"))
 , m_xAutoSaveCB(m_xBuilder->weld_check_button("autosave"))
 , m_xAutoSaveEdit(m_xBuilder->weld_spin_button("autosave_spin"))
 , m_xMinuteFT(m_xBuilder->weld_label("autosave_mins"))
@@ -123,6 +124,7 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, 
weld::DialogController* p
 m_xDocTypeLB->append(OUString::number(APP_MATH), 
aFilterClassesNode.getNodeValue("com.sun.star.formula.FormulaProperties/DisplayName").get());
 
 m_xAutoSaveCB->connect_toggled( LINK( this, SvxSaveTabPage, 
AutoClickHdl_Impl ) );
+m_xBackupCB->connect_toggled(LINK(this, SvxSaveTabPage, 
BackupClickHdl_Impl));
 
 SvtModuleOptions aModuleOpt;
 if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::MATH ) )
@@ -215,6 +217,7 @@ void SvxSaveTabPage::DetectHiddenControls()
 {
 // hide controls of "Backup"
 m_xBackupCB->hide();
+m_xBackupIntoDocumentFolderCB->hide();
 }
 
 if ( aOptionsDlgOpt.IsOptionHidden( u"AutoSave", CFG_PAGE_AND_GROUP ) )
@@ -266,6 +269,14 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 bModified = true;
 }
 
+if (m_xBackupIntoDocumentFolderCB->get_sensitive()
+&& m_xBackupIntoDocumentFolderCB->get_state_changed_from_saved())
+{
+rSet->Put(
+SfxBoolItem(SID_ATTR_BACKUP_BESIDE_ORIGINAL, 
m_xBackupIntoDocumentFolderCB->get_active()));
+bModified = true;
+}
+
 if ( m_xAutoSaveCB->get_state_changed_from_saved() )
 {
 rSet->Put( SfxBoolItem( SID_ATTR_AUTOSAVE,
@@ -475,6 +486,12 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 
m_xBackupCB->set_active(officecfg::Office::Common::Save::Document::CreateBackup::get());
 
m_xBackupCB->set_sensitive(!officecfg::Office::Common::Save::Document::CreateBackup::isReadOnly());
 
+m_xBackupIntoDocumentFolderCB->set_active(
+
officecfg::Office::Common::Save::Document::BackupIntoDocumentFolder::get());
+m_xBackupIntoDocumentFolderCB->set_sensitive(
+
!officecfg::Office::Common::Save::Document::BackupIntoDocumentFolder::isReadOnly()
+&& m_xBackupCB->get_active());
+
 
m_xAutoSaveCB->set_active(officecfg::Office::Recovery::AutoSav

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

2023-07-13 Thread Justin Luth (via logerrit)
 cui/source/options/optsave.cxx |2 +-
 cui/uiconfig/ui/optsavepage.ui |1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 5eae366cbdfb4c2e9f7a9b88257d12c400831456
Author: Justin Luth 
AuthorDate: Thu Jul 13 07:57:29 2023 -0400
Commit: Justin Luth 
CommitDate: Thu Jul 13 16:45:48 2023 +0200

tdf#65509 - re-make visible userautosave config option

This reverts LO 5.0 commit 4653c91a89cfe802754377bcdafc291526254a03

It was hidden because the feature didn't work well.
Many of the "stumbling blocks" have been removed since version 5,
and many people - especially in this age of web apps - expect
a program to automatically take care of saving their documents.
So make the option visible again.

Change-Id: I09e73b0c96df697b4dfb8b7705ca28191ce6f8b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154389
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index c35da388ebf9..2772c6d60944 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -290,7 +290,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 {
 rSet->Put( SfxBoolItem( SID_ATTR_USERAUTOSAVE,
m_xUserAutoSaveCB->get_active() ) );
-bModified = true;
+bModified = bRequestRestart = true;
 }
 // save relatively
 if ( m_xRelativeFsysCB->get_state_changed_from_saved() )
diff --git a/cui/uiconfig/ui/optsavepage.ui b/cui/uiconfig/ui/optsavepage.ui
index 82c9910dcf72..5e93c38a5856 100644
--- a/cui/uiconfig/ui/optsavepage.ui
+++ b/cui/uiconfig/ui/optsavepage.ui
@@ -182,6 +182,7 @@
 
   
 Automatically save the document 
too
+True
 True
 False
 12


[Libreoffice-commits] core.git: cui/source cui/uiconfig officecfg/registry xmlsecurity/inc xmlsecurity/Module_xmlsecurity.mk xmlsecurity/source

2023-07-11 Thread TokieSan (via logerrit)
 cui/source/options/optinet2.cxx|   58 +
 cui/source/options/optinet2.hxx|4 
 cui/uiconfig/ui/optsecuritypage.ui |  391 +++--
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |6 
 xmlsecurity/Module_xmlsecurity.mk  |4 
 xmlsecurity/inc/digitalsignaturesdialog.hxx|2 
 xmlsecurity/inc/strings.hrc|1 
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |  160 ++---
 8 files changed, 401 insertions(+), 225 deletions(-)

New commits:
commit 92b6ffcd9f687cc54a0fc3801ca85c7e4d77512f
Author: TokieSan 
AuthorDate: Fri Jun 30 11:22:01 2023 +0300
Commit: Thorsten Behrens 
CommitDate: Tue Jul 11 16:30:59 2023 +0200

Allow selecting a custom certificate manager

Added a new option in Tools>Options>Security that allows choosing the
path of a different certificate manager.

Made Certificate Manager Button be disabled instead of hidden in case no
certificate manager is detected. Added a box notifying that the
certificate manager is opened (or not working in case it failed for some
reason).

Change-Id: I64a901766d4fb05c59c0f85fdf94c08a3ca4bdab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153798
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 95d0ec18346b..cf879d056824 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -493,6 +493,8 @@ SvxSecurityTabPage::SvxSecurityTabPage(weld::Container* 
pPage, weld::DialogContr
 , m_xTSAURLsFrame(m_xBuilder->weld_container("tsaurls"))
 , m_xTSAURLsPB(m_xBuilder->weld_button("tsas"))
 , m_xNoPasswordSaveFT(m_xBuilder->weld_label("nopasswordsave"))
+, m_xCertMgrPathLB(m_xBuilder->weld_button("browse"))
+, m_xParameterEdit(m_xBuilder->weld_entry("parameterfield"))
 {
 //fdo#65595, we need height-for-width support here, but for now we can
 //bodge it
@@ -516,10 +518,46 @@ SvxSecurityTabPage::SvxSecurityTabPage(weld::Container* 
pPage, weld::DialogContr
 m_xMacroSecPB->connect_clicked( LINK( this, SvxSecurityTabPage, 
MacroSecPBHdl ) );
 m_xCertPathPB->connect_clicked( LINK( this, SvxSecurityTabPage, 
CertPathPBHdl ) );
 m_xTSAURLsPB->connect_clicked( LINK( this, SvxSecurityTabPage, 
TSAURLsPBHdl ) );
+m_xCertMgrPathLB->connect_clicked( LINK( this, SvxSecurityTabPage, 
CertMgrPBHdl ) );
 
 ActivatePage( rSet );
 }
 
+IMPL_LINK_NOARG(SvxSecurityTabPage, CertMgrPBHdl, weld::Button&, void)
+{
+try
+{
+FileDialogHelper 
aHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, nullptr);
+OUString sPath = m_xParameterEdit->get_text();
+if (sPath.isEmpty())
+sPath = "/usr/bin";
+
+OUString sUrl;
+osl::FileBase::getFileURLFromSystemPath(sPath, sUrl);
+aHelper.SetDisplayDirectory(sUrl);
+
+if (ERRCODE_NONE == aHelper.Execute())
+{
+sUrl = aHelper.GetPath();
+if (osl::FileBase::getSystemPathFromFileURL(sUrl, sPath) != 
osl::FileBase::E_None)
+{
+sPath.clear();
+}
+m_xParameterEdit->set_text(sPath);
+}
+std::shared_ptr pBatch(
+comphelper::ConfigurationChanges::create());
+OUString sCurCertMgr = m_xParameterEdit->get_text();
+
officecfg::Office::Common::Security::Scripting::CertMgrPath::set(sCurCertMgr, 
pBatch);
+pBatch->commit();
+}
+catch (const uno::Exception&)
+{
+TOOLS_WARN_EXCEPTION("cui.options", "CertMgrPBHdl");
+}
+}
+
 SvxSecurityTabPage::~SvxSecurityTabPage()
 {
 }
@@ -750,6 +788,17 @@ void SvxSecurityTabPage::InitControls()
 {
 m_xSavePasswordsCB->set_sensitive( false );
 }
+
+try
+{
+OUString sCurCertMgr = 
officecfg::Office::Common::Security::Scripting::CertMgrPath::get();
+
+if (!sCurCertMgr.isEmpty())
+m_xParameterEdit->set_text(sCurCertMgr);
+}
+catch (const uno::Exception&)
+{
+}
 }
 
 std::unique_ptr SvxSecurityTabPage::Create(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet* rAttrSet )
@@ -803,6 +852,15 @@ bool SvxSecurityTabPage::FillItemSet( SfxItemSet* )
 CheckAndSave( SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, 
m_xSecOptDlg->IsBlockUntrustedRefererLinksChecked(), bModified );
 }
 
+std::shared_ptr pBatch(
+comphelper::ConfigurationChanges::create());
+if (m_xParameterEdit->get_value_changed_from_saved())
+{
+OUString sCurCertMgr = m_xParameterEdit->get_text();
+
officecfg::Office::Common::Security::Scripting::CertMgrPath::set(sCurCertMgr, 
pBatch);
+pBatch->commit();
+}
+
 retu

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

2023-07-11 Thread Mike Kaganski (via logerrit)
 cui/source/inc/numpages.hxx |2 +
 cui/source/tabpages/numpages.cxx|   27 ++
 cui/uiconfig/ui/numberingoptionspage.ui |   47 ++--
 3 files changed, 62 insertions(+), 14 deletions(-)

New commits:
commit b13a7112d89b402b41640a19f55ad9edb6433592
Author: Mike Kaganski 
AuthorDate: Mon Jul 10 22:41:46 2023 +0300
Commit: Miklos Vajna 
CommitDate: Tue Jul 11 14:03:50 2023 +0200

tdf#150408: Implement UI for "Legal" numbering

Change-Id: I16849a2d823539040ecb91416b5214d25851950a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154287
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index dd1dfbaf31c6..d693b9e0324f 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -235,6 +235,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
 std::unique_ptr m_xBulRelSizeMF;
 std::unique_ptr m_xAllLevelFT;
 std::unique_ptr m_xAllLevelNF;
+std::unique_ptr m_xIsLegalCB;
 std::unique_ptr m_xStartFT;
 std::unique_ptr m_xStartED;
 std::unique_ptr m_xBulletFT;
@@ -273,6 +274,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
 DECL_LINK(EditModifyHdl_Impl, weld::Entry&, void);
 DECL_LINK(SpinModifyHdl_Impl, weld::SpinButton&, void);
 DECL_LINK(AllLevelHdl_Impl, weld::SpinButton&, void);
+DECL_LINK(IsLegalHdl_Impl, weld::Toggleable&, void);
 DECL_LINK(OrientHdl_Impl, weld::ComboBox&, void);
 DECL_LINK(SameLevelHdl_Impl, weld::Toggleable&, void);
 DECL_LINK(BulColorHdl_Impl, ColorListBox&, void);
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 2179ad2cf107..45ee580f1667 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1037,6 +1037,7 @@ 
SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogC
 , m_xBulRelSizeMF(m_xBuilder->weld_metric_spin_button("relsize", 
FieldUnit::PERCENT))
 , m_xAllLevelFT(m_xBuilder->weld_label("sublevelsft"))
 , m_xAllLevelNF(m_xBuilder->weld_spin_button("sublevels"))
+, m_xIsLegalCB(m_xBuilder->weld_check_button("islegal"))
 , m_xStartFT(m_xBuilder->weld_label("startatft"))
 , m_xStartED(m_xBuilder->weld_spin_button("startat"))
 , m_xBulletFT(m_xBuilder->weld_label("bulletft"))
@@ -1074,6 +1075,7 @@ 
SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogC
 m_xPrefixED->connect_changed(LINK(this, SvxNumOptionsTabPage, 
EditModifyHdl_Impl));
 m_xSuffixED->connect_changed(LINK(this, SvxNumOptionsTabPage, 
EditModifyHdl_Impl));
 m_xAllLevelNF->connect_value_changed(LINK(this,SvxNumOptionsTabPage, 
AllLevelHdl_Impl));
+m_xIsLegalCB->connect_toggled(LINK(this, SvxNumOptionsTabPage, 
IsLegalHdl_Impl));
 m_xOrientLB->connect_changed(LINK(this, SvxNumOptionsTabPage, 
OrientHdl_Impl));
 m_xSameLevelCB->connect_toggled(LINK(this, SvxNumOptionsTabPage, 
SameLevelHdl_Impl));
 m_xBulRelSizeMF->connect_value_changed(LINK(this,SvxNumOptionsTabPage, 
BulRelSizeHdl_Impl));
@@ -1271,6 +1273,7 @@ voidSvxNumOptionsTabPage::Reset( const SfxItemSet* 
rSet )
 bool bAllLevel = bContinuous && !bHTMLMode;
 m_xAllLevelFT->set_visible(bAllLevel);
 m_xAllLevelNF->set_visible(bAllLevel);
+m_xIsLegalCB->set_visible(bAllLevel);
 
 m_xAllLevelsFrame->set_visible(bContinuous);
 
@@ -1334,6 +1337,8 @@ void SvxNumOptionsTabPage::InitControls()
 bool bSameBulColor  = true;
 bool bSameBulRelSize= true;
 
+TriState isLegal = TRISTATE_INDET;
+
 const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM];
 OUString sFirstCharFmt;
 sal_Int16 eFirstOrient = text::VertOrientation::NONE;
@@ -1358,6 +1363,7 @@ void SvxNumOptionsTabPage::InitControls()
 eFirstOrient = aNumFmtArr[i]->GetVertOrient();
 if(bShowBitmap)
 aFirstSize = aNumFmtArr[i]->GetGraphicSize();
+isLegal = aNumFmtArr[i]->GetIsLegal() ? TRISTATE_TRUE : 
TRISTATE_FALSE;
 }
 if( i > nLvl)
 {
@@ -1367,6 +1373,8 @@ void SvxNumOptionsTabPage::InitControls()
 bSamePrefix = aNumFmtArr[i]->GetPrefix() == 
aNumFmtArr[nLvl]->GetPrefix();
 bSameSuffix = aNumFmtArr[i]->GetSuffix() == 
aNumFmtArr[nLvl]->GetSuffix();
 bAllLevel &= aNumFmtArr[i]->GetIncludeUpperLevels() == 
aNumFmtArr[nLvl]->GetIncludeUpperLevels();
+if (aNumFmtArr[i]->GetIsLegal() != 
aNumFmtArr[nLvl]->GetIsLegal())
+isLegal = TRISTATE_INDET;
 bSameCharFmt&= sFirstCharFmt == 
aNumFmtArr[i]->GetCharFormatName();
 bSameVOrient&= eFirstOrient == 
aNumFmtArr[i]->GetVertOrient();
 if(bShowBitmap && bSameSize)
@@ -1439,6 +1447,9 @@ void SvxNumOptionsTabPage::InitControls()
 m_xAllLevelNF->set_text("");
 }
 
+m_xIsLegalCB->s

[Libreoffice-commits] core.git: cui/source cui/uiconfig editeng/source include/editeng officecfg/registry

2023-07-04 Thread Baole Fang (via logerrit)
 cui/source/tabpages/autocdlg.cxx   |9 -
 cui/uiconfig/ui/wordcompletionpage.ui  |2 +-
 editeng/source/misc/acorrcfg.cxx   |4 ++--
 include/editeng/swafopt.hxx|3 ++-
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 254161f9dd2b7b3e416c54dfeb8e8c6e81cd7dcd
Author: Baole Fang 
AuthorDate: Sun Jun 25 22:08:37 2023 -0400
Commit: Caolán McNamara 
CommitDate: Tue Jul 4 11:17:10 2023 +0200

tdf#92311: increase word completion limit

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

diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 378fb68c4143..a23fc2015ebf 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1981,7 +1981,6 @@ bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet* )
 bool bModified = false, bCheck;
 SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
 SvxSwAutoFormatFlags *pOpt = &pAutoCorrect->GetSwFlags();
-sal_uInt16 nVal;
 
 bCheck = m_xCBActiv->get_active();
 bModified |= pOpt->bAutoCompleteWords != bCheck;
@@ -1999,13 +1998,13 @@ bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet* )
 bModified |= pOpt->bAutoCmpltShowAsTip != bCheck;
 pOpt->bAutoCmpltShowAsTip = bCheck;
 
-nVal = static_cast(m_xNFMinWordlen->get_value());
+sal_uInt16 nVal = static_cast(m_xNFMinWordlen->get_value());
 bModified |= nVal != pOpt->nAutoCmpltWordLen;
 pOpt->nAutoCmpltWordLen = nVal;
 
-nVal = static_cast(m_xNFMaxEntries->get_value());
-bModified |= nVal != pOpt->nAutoCmpltListLen;
-pOpt->nAutoCmpltListLen = nVal;
+sal_uInt32 nList = static_cast(m_xNFMaxEntries->get_value());
+bModified |= nList != pOpt->nAutoCmpltListLen;
+pOpt->nAutoCmpltListLen = nList;
 
 const int nPos = m_xDCBExpandKey->get_active();
 if (nPos != -1)
diff --git a/cui/uiconfig/ui/wordcompletionpage.ui 
b/cui/uiconfig/ui/wordcompletionpage.ui
index d77e2c4f81d3..1b7004ee2d49 100644
--- a/cui/uiconfig/ui/wordcompletionpage.ui
+++ b/cui/uiconfig/ui/wordcompletionpage.ui
@@ -4,7 +4,7 @@
   
   
 50
-65535
+4294967295
 500
 25
 100
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index 8603b4347da1..4ff15f1bfc2d 100644
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -524,9 +524,9 @@ void SvxSwAutoCorrCfg::Load(bool bInit)
 break; // "Completion/MinWordLen",
 case  35:
 {
-sal_Int32 nVal = 0; pValues[nProp] >>= nVal;
+sal_Int64 nVal = 0; pValues[nProp] >>= nVal;
 rSwFlags.nAutoCmpltListLen =
-sal::static_int_cast< sal_uInt16 >(nVal);
+sal::static_int_cast< sal_uInt32 >(nVal);
 }
 break; // "Completion/MaxListLen",
 case  36: rSwFlags.bAutoCmpltCollectWords = 
*o3tl::doAccess(pValues[nProp]); break; // "Completion/CollectWords",
diff --git a/include/editeng/swafopt.hxx b/include/editeng/swafopt.hxx
index 71919383da96..8a4ca5aeaa62 100644
--- a/include/editeng/swafopt.hxx
+++ b/include/editeng/swafopt.hxx
@@ -86,7 +86,8 @@ struct EDITENG_DLLPUBLIC SvxSwAutoFormatFlags
 sal_UCS4 cBullet;
 sal_UCS4 cByInputBullet;
 
-sal_uInt16 nAutoCmpltWordLen, nAutoCmpltListLen;
+sal_uInt32 nAutoCmpltListLen;
+sal_uInt16 nAutoCmpltWordLen;
 sal_uInt16 nAutoCmpltExpandKey;
 
 sal_uInt8 nRightMargin;
diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 0f684bb2eea9..dd880f51cfa4 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -4464,7 +4464,7 @@
   
   8
 
-
+
   
   
 Sets the maximum number of words to be recalled.


[Libreoffice-commits] core.git: cui/source cui/uiconfig officecfg/registry

2023-05-27 Thread Baole Fang (via logerrit)
 cui/source/inc/treeopt.hxx   |2 
 cui/source/options/optsave.cxx   |   40 +++
 cui/source/options/treeopt.cxx   |4 +
 cui/uiconfig/ui/optsavepage.ui   |9 
 officecfg/registry/data/org/openoffice/Office/UI.xcu |   16 +++
 5 files changed, 45 insertions(+), 26 deletions(-)

New commits:
commit 9e92437cbb2180d51fdabc0d5efff24b530ba27a
Author: Baole Fang 
AuthorDate: Sat May 6 22:35:17 2023 -0400
Commit: Mike Kaganski 
CommitDate: Sat May 27 09:00:08 2023 +0200

tdf#148756: Fix document type in option dialog

Change-Id: I16ef2adbb5c77960c18426ef6b2211d230adf410
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151455
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index 69278a1b5349..74ca73944b66 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -142,6 +142,7 @@ private:
 
 css::uno::Reference < css::awt::XContainerWindowProvider >
 m_xContainerWinProvider;
+css::uno::Reference m_xFrame;
 
 static LastPageSaver*   pLastPageSaver;
 
@@ -193,6 +194,7 @@ public:
 
 // helper functions to call the language settings TabPage from the 
SpellDialog
 static void ApplyLanguageOptions(const SfxItemSet& rSet);
+static OUString getCurrentFactory_Impl( const css::uno::Reference< 
css::frame::XFrame >& _xFrame );
 
 voidSetNeedsRestart( svtools::RestartReason eReason );
 };
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 9b2aee019476..7799da84c8b6 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -106,13 +107,20 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, 
weld::DialogController* p
 m_xODFVersionLB->set_id(4, OUString::number(SvtSaveOptions::ODFVER_013)); 
// 1.3
 m_xODFVersionLB->set_id(5, 
OUString::number(SvtSaveOptions::ODFVER_LATEST)); // 1.3 Extended (recommended)
 
-m_xDocTypeLB->set_id(0, OUString::number(APP_WRITER)   );
-m_xDocTypeLB->set_id(1, OUString::number(APP_WRITER_WEB)   );
-m_xDocTypeLB->set_id(2, OUString::number(APP_WRITER_GLOBAL));
-m_xDocTypeLB->set_id(3, OUString::number(APP_CALC) );
-m_xDocTypeLB->set_id(4, OUString::number(APP_IMPRESS)  );
-m_xDocTypeLB->set_id(5, OUString::number(APP_DRAW) );
-m_xDocTypeLB->set_id(6, OUString::number(APP_MATH) );
+auto aFilterClassesNode = 
utl::OConfigurationTreeRoot::createWithComponentContext(
+comphelper::getProcessComponentContext(),
+
"org.openoffice.Office.UI/FilterClassification/GlobalFilters/Classes",
+-1,
+utl::OConfigurationTreeRoot::CM_READONLY
+);
+
+m_xDocTypeLB->append(OUString::number(APP_WRITER), 
aFilterClassesNode.getNodeValue("com.sun.star.text.TextDocument/DisplayName").get());
+m_xDocTypeLB->append(OUString::number(APP_WRITER_WEB), 
aFilterClassesNode.getNodeValue("com.sun.star.text.WebDocument/DisplayName").get());
+m_xDocTypeLB->append(OUString::number(APP_WRITER_GLOBAL), 
aFilterClassesNode.getNodeValue("com.sun.star.text.GlobalDocument/DisplayName").get());
+m_xDocTypeLB->append(OUString::number(APP_CALC), 
aFilterClassesNode.getNodeValue("com.sun.star.sheet.SpreadsheetDocument/DisplayName").get());
+m_xDocTypeLB->append(OUString::number(APP_IMPRESS), 
aFilterClassesNode.getNodeValue("com.sun.star.presentation.PresentationDocument/DisplayName").get());
+m_xDocTypeLB->append(OUString::number(APP_DRAW), 
aFilterClassesNode.getNodeValue("com.sun.star.drawing.DrawingDocument/DisplayName").get());
+m_xDocTypeLB->append(OUString::number(APP_MATH), 
aFilterClassesNode.getNodeValue("com.sun.star.formula.FormulaProperties/DisplayName").get());
 
 m_xAutoSaveCB->connect_toggled( LINK( this, SvxSaveTabPage, 
AutoClickHdl_Impl ) );
 
@@ -434,7 +442,23 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 pImpl->aODFArr[nData] = lODFList;
 }
 }
-m_xDocTypeLB->set_active(0);
+OUString sModule = 
OfaTreeOptionsDialog::getCurrentFactory_Impl(GetFrame());
+sal_Int32 docId = 0;
+if (sModule == "com.sun.star.text.TextDocument")
+docId = APP_WRITER;
+else if (sModule == "com.sun.star.text.WebDocument")
+docId = APP_WRITER_WEB;
+else if (sModule == "com.sun.star.text.GlobalDocument")
+docId = APP_WRITER_GLOBAL;
+else if (sModule == "com.sun.star.sheet.SpreadsheetDocument")
+docId = APP_CALC;
+else if (sModule == 
"com.sun.star.presentation.PresentationDocument")
+docId = APP_IMPRESS;
+else if (sM

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

2023-05-16 Thread Heiko Tietze (via logerrit)
 cui/source/options/optgdlg.cxx |1 +
 cui/uiconfig/ui/optviewpage.ui |4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 90a8073fa5a6a724de498130476895dfaf4429b5
Author: Heiko Tietze 
AuthorDate: Mon May 15 13:46:58 2023 +0200
Commit: Heiko Tietze 
CommitDate: Tue May 16 09:20:49 2023 +0200

Related tdf#155070 - Tooltips moved from container to controls

* Save log button disabled if Skia is off to prevent error message

Change-Id: Iccd757fb15b347cf9d048115d4b048543814bd99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151764
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 369e48ae265a..249d7b0318b6 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -667,6 +667,7 @@ void OfaViewTabPage::UpdateSkiaStatus()
 // FIXME: should really add code to show a 'lock' icon here.
 
m_xUseSkia->set_sensitive(!officecfg::Office::Common::VCL::UseSkia::isReadOnly());
 m_xForceSkiaRaster->set_sensitive(m_xUseSkia->get_active() && 
!officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly());
+m_xSkiaLog->set_sensitive(bEnabled);
 
 // Technically the 'use hardware acceleration' option could be used to 
mean !forceSkiaRaster, but the implementation
 // of the option is so tied to the implementation of the canvas module 
that it's simpler to ignore it.
diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index d24f7ef7285a..5a9a7579e85b 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -416,7 +416,6 @@
   
 True
 False
-Requires restart
 12
 6
 3
@@ -426,6 +425,7 @@
 True
 True
 False
+Requires restart
 start
 True
 True
@@ -446,6 +446,7 @@
 True
 True
 False
+Requires restart
 start
 True
 True
@@ -466,6 +467,7 @@
 True
 True
 False
+Requires restart
 True
 True
   


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

2023-05-04 Thread Aron Budea (via logerrit)
 cui/source/inc/optlingu.hxx |1 +
 cui/source/options/optlingu.cxx |   17 ++---
 cui/uiconfig/ui/optlingupage.ui |4 ++--
 3 files changed, 17 insertions(+), 5 deletions(-)

New commits:
commit 5e7327e9313e2d9fe2f0defb30d3e7dc28c0b2ce
Author: Aron Budea 
AuthorDate: Sun Apr 30 01:40:55 2023 +0200
Commit: Aron Budea 
CommitDate: Fri May 5 05:51:20 2023 +0200

cui, lok: Hide options irrelevant for online in Spelling Options dialog

User-defined Dictionaries part and
Get more dictionaries URL + icon.

Change-Id: I73825a481e1981145abbf36b44485fb1628fbe13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151212
Tested-by: Jenkins
Reviewed-by: Aron Budea 

diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index 29adee861417..d0933e4ac831 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -120,6 +120,7 @@ private:
 std::unique_ptr m_xLinguDicsDelPB;
 std::unique_ptr m_xLinguOptionsCLB;
 std::unique_ptr m_xLinguOptionsEditPB;
+std::unique_ptr m_xMoreDictsBox;
 std::unique_ptr m_xMoreDictsLink;
 
 voidAddDicBoxEntry( const css::uno::Reference< 
css::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx );
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index b80343657f22..3530d20f8750 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -853,6 +854,7 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, 
weld::DialogController*
 , m_xLinguDicsDelPB(m_xBuilder->weld_button("lingudictsdelete"))
 , m_xLinguOptionsCLB(m_xBuilder->weld_tree_view("linguoptions"))
 , m_xLinguOptionsEditPB(m_xBuilder->weld_button("linguoptionsedit"))
+, m_xMoreDictsBox(m_xBuilder->weld_box("moredictsbox"))
 , m_xMoreDictsLink(m_xBuilder->weld_link_button("moredictslink"))
 {
 m_xLinguModulesCLB->enable_toggle_buttons(weld::ColumnToggleType::Check);
@@ -878,7 +880,15 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, 
weld::DialogController*
 
 m_xMoreDictsLink->connect_activate_link(LINK(this, SvxLinguTabPage, 
OnLinkClick));
 if (officecfg::Office::Security::Hyperlinks::Open::get() == 
SvtExtendedSecurityOptions::OPEN_NEVER)
-m_xMoreDictsLink->hide();
+m_xMoreDictsBox->hide();
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+// hide User-defined Dictionaries part
+m_xBuilder->weld_frame("dictsframe")->hide();
+// hide Get more dictionaries URL + icon
+m_xMoreDictsBox->hide();
+}
 
 xProp = LinguMgr::GetLinguPropertySet();
 xDicList.set( LinguMgr::GetDictionaryList() );
@@ -1550,9 +1560,10 @@ void SvxLinguTabPage::HideGroups( sal_uInt16 nGrp )
 m_xLinguModulesCLB->hide();
 m_xLinguModulesEditPB->hide();
 
-if (officecfg::Office::Security::Hyperlinks::Open::get() != 
SvtExtendedSecurityOptions::OPEN_NEVER)
+if (officecfg::Office::Security::Hyperlinks::Open::get() != 
SvtExtendedSecurityOptions::OPEN_NEVER &&
+!comphelper::LibreOfficeKit::isActive())
 {
-m_xMoreDictsLink->show();
+m_xMoreDictsBox->show();
 }
 }
 }
diff --git a/cui/uiconfig/ui/optlingupage.ui b/cui/uiconfig/ui/optlingupage.ui
index 5ae94f81c0b6..13d9b3d059f9 100644
--- a/cui/uiconfig/ui/optlingupage.ui
+++ b/cui/uiconfig/ui/optlingupage.ui
@@ -231,7 +231,7 @@
   
 
 
-  
+  
 True
 False
 0
@@ -516,7 +516,7 @@
   
 
 
-  
+  
 True
 False
 


[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svtools officecfg/registry sc/source svtools/source

2023-04-25 Thread Heiko Tietze (via logerrit)
 cui/source/options/optcolor.cxx|1 
 cui/uiconfig/ui/colorconfigwin.ui  |   71 -
 include/svtools/colorcfg.hxx   |1 
 officecfg/registry/data/org/openoffice/Office/UI.xcu   |5 +
 officecfg/registry/schema/org/openoffice/Office/UI.xcs |   10 ++
 sc/source/ui/view/output.cxx   |   23 ++---
 svtools/source/config/colorcfg.cxx |2 
 7 files changed, 84 insertions(+), 29 deletions(-)

New commits:
commit 07f87f20c8af71faeda500b6b1d7775743bbf646
Author: Heiko Tietze 
AuthorDate: Tue Apr 25 14:52:02 2023 +0200
Commit: Heiko Tietze 
CommitDate: Tue Apr 25 18:13:57 2023 +0200

Resolves tdf#154080 - Allow customization of comment indicator color

* New application color added
* Border color depending on cell/sheet background
* Comments color set to light magenta to align with similar tools

Change-Id: I782e8359632c5a319e61f5d5ac3deb4614bd7e79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150970
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 29d5c5b6d8c6..6daa39b37f1f 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -131,6 +131,7 @@ const vEntryInfo[] =
 { Group_Calc,IDS(brkauto) },
 { Group_Calc,IDS_CB(hiddencolrow) },
 { Group_Calc,IDS_CB(textoverflow) },
+{ Group_Calc,IDS(comments) },
 { Group_Calc,IDS(det) },
 { Group_Calc,IDS(deterror) },
 { Group_Calc,IDS(ref) },
diff --git a/cui/uiconfig/ui/colorconfigwin.ui 
b/cui/uiconfig/ui/colorconfigwin.ui
index 8b778c236f3c..7b8521b92e30 100644
--- a/cui/uiconfig/ui/colorconfigwin.ui
+++ b/cui/uiconfig/ui/colorconfigwin.ui
@@ -827,7 +827,7 @@
 0
 none
 
-  
+  
   
 True
 False
@@ -976,7 +976,7 @@
   
   
 0
-6
+7
   
 
 
@@ -993,7 +993,7 @@
   
   
 1
-6
+7
   
 
 
@@ -1010,7 +1010,7 @@
   
   
 1
-7
+8
   
 
 
@@ -1025,7 +1025,7 @@
   
   
 0
-7
+8
   
 
 
@@ -1042,7 +1042,7 @@
   
   
 1
-8
+9
   
 
 
@@ -1057,7 +1057,7 @@
   
   
 0
-8
+9
   
 
 
@@ -1074,7 +1074,7 @@
   
   
 1
-9
+10
   
 
 
@@ -1089,7 +1089,7 @@
   
   
 0
-9
+10
   
 
 
@@ -1106,7 +1106,7 @@
   
   
 1
-10
+11
   
 
 
@@ -1121,7 +1121,7 @@
   
   
 0
-10
+11
   
 
 
@@ -1138,7 +1138,7 @@
   
   
 1
-11
+12
   
 
 
@@ -1153,7 +1153,7 @@
   
   
 0
-11
+12
   
 
 
@@ -1170,7 +1170,7 @@
   
   
 1
-12
+13
   
 
 
@@ -1185,7 +1185,7 @@
   
   
 0
-12
+13
   
 
 
@@ -1202,7 +1202,7 @@
   
   
 1
-13
+14
   
 
 
@@ -1217,7 +1217,7 @@
   
   
 0
-13
+14
   
 
 
@@ -1306,6 +1306,43 @@
 5
   
 
+
+  
+True
+True
+False
+end
+0
+True
+
+  
+
+
+  
+Comments 
color
+  
+
+  
+  
+1
+6
+  
+
+
+   

[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();
-m_xLineDistAtPer

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svtools officecfg/registry sc/inc sc/source sc/uiconfig svtools/source

2023-04-14 Thread Heiko Tietze (via logerrit)
 cui/source/options/optcolor.cxx  |1 
 cui/uiconfig/ui/colorconfigwin.ui|  130 ++-
 include/svtools/colorcfg.hxx |1 
 officecfg/registry/data/org/openoffice/Office/UI.xcu |8 
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |8 
 officecfg/registry/schema/org/openoffice/Office/UI.xcs   |   16 +
 sc/inc/viewopti.hxx  |3 
 sc/source/core/tool/viewopti.cxx |   15 -
 sc/source/ui/inc/tpview.hxx  |1 
 sc/source/ui/optdlg/tpview.cxx   |6 
 sc/source/ui/view/gridwin4.cxx   |2 
 sc/source/ui/view/output.cxx |   17 -
 sc/source/ui/view/tabview3.cxx   |2 
 sc/uiconfig/scalc/ui/tpviewpage.ui   |   23 --
 svtools/source/config/colorcfg.cxx   |2 
 15 files changed, 104 insertions(+), 131 deletions(-)

New commits:
commit 11bb9c14da13507adeeea8dce863fb4b96a92870
Author: Heiko Tietze 
AuthorDate: Thu Apr 13 12:15:46 2023 +0200
Commit: Heiko Tietze 
CommitDate: Fri Apr 14 11:39:06 2023 +0200

[API CHANGE] Related tdf#154080 - Allow customization of comment indicator 
color

* Calc > View option replaced by a new application color
* Border not only in highcontrast mode but always shown
* Border color depending on cell/sheet background

The previous option TextOverflow in Calc.xcs was replaced by
CalcTextOverflow in UI.xcs in order to combine color and on/off
with the accepted drawback of incompatibility.
The alternative, keeping the color separate from the toggle, would
separate the options and was rejected therefore.

Change-Id: Ie3e469163485d8eb1cffc7022e1518ad20e8e54e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150340
Tested-by: Heiko Tietze 
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 335c517622b5..29d5c5b6d8c6 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -130,6 +130,7 @@ const vEntryInfo[] =
 { Group_Calc,IDS(brkmanual) },
 { Group_Calc,IDS(brkauto) },
 { Group_Calc,IDS_CB(hiddencolrow) },
+{ Group_Calc,IDS_CB(textoverflow) },
 { Group_Calc,IDS(det) },
 { Group_Calc,IDS(deterror) },
 { Group_Calc,IDS(ref) },
diff --git a/cui/uiconfig/ui/colorconfigwin.ui 
b/cui/uiconfig/ui/colorconfigwin.ui
index 3094a66d0c59..8b778c236f3c 100644
--- a/cui/uiconfig/ui/colorconfigwin.ui
+++ b/cui/uiconfig/ui/colorconfigwin.ui
@@ -50,7 +50,6 @@
 True
 0
 True
-
 
   
 
@@ -86,7 +85,6 @@
 end
 0
 True
-
 
   
 
@@ -127,7 +125,6 @@
 end
 0
 True
-
 
   
 
@@ -163,7 +160,6 @@
 end
 0
 True
-
 
   
 
@@ -207,7 +203,6 @@
 end
 0
 True
-
 
   
 
@@ -248,7 +243,6 @@
 end
 0
 True
-
 
   
 
@@ -284,7 +278,6 @@
 end
 0
 True
-
 
   
 
@@ -328,7 +321,6 @@
 end
 0
 True
-
 
   
 
@@ -369,7 +361,6 @@
 end
 0
 True
-
 
   
 
@@ -402,7 +393,6 @@
 end
 0
 True
-
 
   
 
@@ -438,7 +428,6 @@
 end
 0
 True
-
 
   
 
@@ -514,7 +503,6 @@
 True
 0
 True
-
 
   
 
@@ -550,7 +538,6 @@
 end
 0
 True
-
 
   
 
@@ -594,7 +581,6 @@
 end
 0
 True
-
 
   
 
@@ -635,7 +621,6 @@
 end
 0

[Libreoffice-commits] core.git: cui/source cui/uiconfig officecfg/registry sw/source

2023-04-11 Thread Michael Stahl (via logerrit)
 cui/source/options/optsave.cxx |9 ++
 cui/source/options/optsave.hxx |1 
 cui/uiconfig/ui/optsavepage.ui |   19 +
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |8 +
 sw/source/uibase/uiview/view.cxx   |4 ++
 5 files changed, 41 insertions(+)

New commits:
commit d57abff54db6860c3e263c8874c6b606e1ba1088
Author: Michael Stahl 
AuthorDate: Thu Apr 6 20:56:00 2023 +0200
Commit: Michael Stahl 
CommitDate: Tue Apr 11 20:16:28 2023 +0200

officecfg,cui,sw: add Common::Load::ViewPositionForAnyUser

Add setting Office::Common::Load::ViewPositionForAnyUser which if
enabled skips the user name matching against meta.xml that sw does
before restoring a view position stored as ViewTop/ViewLeft/etc. in
settings.xml in an ODF file.

This is particularly useful if the user disables the "ApplyUserData"
in Document->Properties->General, which made restoring view position
impossible.

Change-Id: Ie3ced3c4ad20a35eb8453ad1521c787b0b0c8458
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150113
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 0abadfd03e92..3fbeebf4543d 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -78,6 +79,7 @@ SvxSaveTabPage_Impl::SvxSaveTabPage_Impl() : bInitialized( 
false )
 SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rCoreSet)
 : SfxTabPage( pPage, pController, "cui/ui/optsavepage.ui", "OptSavePage", 
&rCoreSet )
 , pImpl(new SvxSaveTabPage_Impl)
+, m_xLoadViewPosAnyUserCB(m_xBuilder->weld_check_button("load_anyuser"))
 , m_xLoadUserSettingsCB(m_xBuilder->weld_check_button("load_settings"))
 , m_xLoadDocPrinterCB(m_xBuilder->weld_check_button("load_docprinter"))
 , m_xDocInfoCB(m_xBuilder->weld_check_button("docinfo"))
@@ -228,6 +230,10 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 {
 auto xChanges = comphelper::ConfigurationChanges::create();
 bool bModified = false, bRequestRestart = false;
+if (m_xLoadViewPosAnyUserCB->get_state_changed_from_saved())
+{
+
officecfg::Office::Common::Load::ViewPositionForAnyUser::set(m_xLoadViewPosAnyUserCB->get_active(),
 xChanges);
+}
 if(m_xLoadUserSettingsCB->get_state_changed_from_saved())
 
officecfg::Office::Common::Load::UserDefinedSettings::set(m_xLoadUserSettingsCB->get_active(),
 xChanges);
 
@@ -371,6 +377,9 @@ static bool isODFFormat( std::u16string_view sFilter )
 
 void SvxSaveTabPage::Reset( const SfxItemSet* )
 {
+
m_xLoadViewPosAnyUserCB->set_active(officecfg::Office::Common::Load::ViewPositionForAnyUser::get());
+m_xLoadViewPosAnyUserCB->save_state();
+
m_xLoadViewPosAnyUserCB->set_sensitive(!officecfg::Office::Common::Load::ViewPositionForAnyUser::isReadOnly());
 
m_xLoadUserSettingsCB->set_active(officecfg::Office::Common::Load::UserDefinedSettings::get());
 m_xLoadUserSettingsCB->save_state();
 
m_xLoadUserSettingsCB->set_sensitive(!officecfg::Office::Common::Load::UserDefinedSettings::isReadOnly());
diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx
index 4ec3b1ddada5..1bc047985330 100644
--- a/cui/source/options/optsave.hxx
+++ b/cui/source/options/optsave.hxx
@@ -41,6 +41,7 @@ class SvxSaveTabPage : public SfxTabPage
 private:
 std::unique_ptrpImpl;
 
+std::unique_ptr m_xLoadViewPosAnyUserCB;
 std::unique_ptr m_xLoadUserSettingsCB;
 std::unique_ptr m_xLoadDocPrinterCB;
 std::unique_ptr m_xDocInfoCB;
diff --git a/cui/uiconfig/ui/optsavepage.ui b/cui/uiconfig/ui/optsavepage.ui
index d9c1ce1235a2..be612ec3b775 100644
--- a/cui/uiconfig/ui/optsavepage.ui
+++ b/cui/uiconfig/ui/optsavepage.ui
@@ -67,6 +67,25 @@
 0
   
 
+
+  
+Load view position with the document even if 
it was saved by a different user
+True
+True
+False
+True
+True
+
+  
+Loads the view position settings 
saved in a document with the document even if it was saved by a different 
user.
+  
+
+  
+  
+0
+2
+  
+
   
 
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 6702c8499315..9beda4a62c81 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openo

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

2023-03-20 Thread Caolán McNamara (via logerrit)
 cui/source/options/optgdlg.cxx |   20 +---
 cui/source/options/optgdlg.hxx |1 -
 cui/uiconfig/ui/optviewpage.ui |   41 ++---
 3 files changed, 3 insertions(+), 59 deletions(-)

New commits:
commit cc18f6cfed5281e1a47636d9d9df02613a51ff60
Author: Caolán McNamara 
AuthorDate: Mon Mar 20 09:58:56 2023 +
Commit: Caolán McNamara 
CommitDate: Mon Mar 20 19:43:32 2023 +

tdf#147469 remove mouse "Positioning" from options page

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 8a30f35535a9..b0bca101bdaa 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -537,7 +537,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xForceSkiaRaster(m_xBuilder->weld_check_button("forceskiaraster"))
 , m_xSkiaStatusEnabled(m_xBuilder->weld_label("skiaenabled"))
 , m_xSkiaStatusDisabled(m_xBuilder->weld_label("skiadisabled"))
-, m_xMousePosLB(m_xBuilder->weld_combo_box("mousepos"))
 , m_xMouseMiddleLB(m_xBuilder->weld_combo_box("mousemiddle"))
 , m_xMoreIcons(m_xBuilder->weld_button("btnMoreIcons"))
 , m_xRunGPTests(m_xBuilder->weld_button("btn_rungptest"))
@@ -731,18 +730,6 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 bool bAppearanceChanged = false;
 std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
 
-// Mouse Snap Mode
-SnapType eOldSnap = 
static_cast(officecfg::Office::Common::View::Dialog::MousePositioning::get());
-SnapType eNewSnap = static_cast(m_xMousePosLB->get_active());
-if(eNewSnap > SnapType::NONE)
-eNewSnap = SnapType::NONE;
-
-if ( eNewSnap != eOldSnap )
-{
-
officecfg::Office::Common::View::Dialog::MousePositioning::set(static_cast(eNewSnap),
 batch);
-bAppearanceChanged = true;
-}
-
 // Middle Mouse Button
 MouseMiddleButtonAction eOldMiddleMouse = 
static_cast(officecfg::Office::Common::View::Dialog::MiddleMouseButton::get());
 short eNewMiddleMouse = m_xMouseMiddleLB->get_active();
@@ -914,12 +901,7 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
 
m_xAppearanceStyleLB->set_active(officecfg::Office::Common::Misc::Appearance::get());
 m_xAppearanceStyleLB->save_value();
 
-// Mouse Snap
-sal_Int16 nMouseSnap = 
officecfg::Office::Common::View::Dialog::MousePositioning::get();
-m_xMousePosLB->set_active(static_cast(nMouseSnap));
-m_xMousePosLB->save_value();
-
-// Mouse Snap
+// Middle Mouse Button
 sal_Int16 nMiddleMouseButton = 
officecfg::Office::Common::View::Dialog::MiddleMouseButton::get();
 m_xMouseMiddleLB->set_active(static_cast(nMiddleMouseButton));
 m_xMouseMiddleLB->save_value();
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 620c6ed8659c..9b22c0b9bb9d 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -105,7 +105,6 @@ private:
 std::unique_ptr m_xSkiaStatusEnabled;
 std::unique_ptr m_xSkiaStatusDisabled;
 
-std::unique_ptr m_xMousePosLB;
 std::unique_ptr m_xMouseMiddleLB;
 std::unique_ptr m_xMoreIcons;
 std::unique_ptr m_xRunGPTests;
diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index 93160caa6ad5..3865fe17b0c1 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -37,7 +37,7 @@
 0
 none
 
-  
+  
   
 True
 False
@@ -46,20 +46,6 @@
 True
 3
 6
-
-  
-True
-False
-_Positioning:
-True
-mousepos
-0
-  
-  
-0
-0
-  
-
 
   
 True
@@ -71,27 +57,6 @@
   
   
 0
-1
-  
-
-
-  
-True
-False
-True
-
-  Default button
-  Dialog center
-  No automatic positioning
-
-
-  
-Specifies if and how the 
mouse pointer will be positioned in newly opened dialogs.
-  
-
-  
-  
-1
 0
   
 
@@ -1

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2023-03-10 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/cuicharmap.cxx|2 ++
 cui/uiconfig/ui/specialcharacters.ui |4 +++-
 include/svx/searchcharmap.hxx|1 +
 svx/source/dialog/searchcharmap.cxx  |   11 ---
 4 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit e6230bbfc9526af65e6618390593c3a3c90743d0
Author: Caolán McNamara 
AuthorDate: Fri Mar 10 11:13:17 2023 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 10 15:18:34 2023 +

Resolves: tdf#154087 update scrollbar range when search criteria change

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 457b5238ccdd..c6994000e36d 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -885,6 +885,8 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchUpdateHdl, 
weld::Entry&, void)
 if(!sName.isEmpty() && 
sName.toAsciiLowerCase().indexOf(aKeyword.toAsciiLowerCase()) >= 0)
 m_xSearchSet->AppendCharToList(sChar);
 }
+
+m_xSearchSet->UpdateScrollRange();
 }
 else
 {
diff --git a/cui/uiconfig/ui/specialcharacters.ui 
b/cui/uiconfig/ui/specialcharacters.ui
index b8a7261f20af..a397c2e5762d 100644
--- a/cui/uiconfig/ui/specialcharacters.ui
+++ b/cui/uiconfig/ui/specialcharacters.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -855,6 +855,8 @@
 True
 True
 True
+never
+always
 in
 
   
diff --git a/include/svx/searchcharmap.hxx b/include/svx/searchcharmap.hxx
index 7ebc8ce5ab2c..d05f3ea82728 100644
--- a/include/svx/searchcharmap.hxx
+++ b/include/svx/searchcharmap.hxx
@@ -50,6 +50,7 @@ public:
 virtual voidSelectIndex( int index, bool bFocus = 
false ) override;
 voidAppendCharToList(sal_UCS4 cChar);
 voidClearPreviousData();
+voidUpdateScrollRange();
 
 virtual sal_Int32   getMaxCharCount() const override;
 
diff --git a/svx/source/dialog/searchcharmap.cxx 
b/svx/source/dialog/searchcharmap.cxx
index e15ec15da2c7..c5ae90dbf052 100644
--- a/svx/source/dialog/searchcharmap.cxx
+++ b/svx/source/dialog/searchcharmap.cxx
@@ -329,9 +329,7 @@ void SvxSearchCharSet::RecalculateFont(vcl::RenderContext& 
rRenderContext)
 nX = aSize.Width() / COLUMN_COUNT;
 nY = aSize.Height() / ROW_COUNT;
 
-//scrollbar settings -- error
-int nLastRow = (getMaxCharCount() - 1 + COLUMN_COUNT) / COLUMN_COUNT;
-mxScrollArea->vadjustment_configure(mxScrollArea->vadjustment_get_value(), 
0, nLastRow, 1, ROW_COUNT - 1, ROW_COUNT);
+UpdateScrollRange();
 
 // rearrange CharSet element in sync with nX- and nY-multiples
 Size aDrawSize(nX * COLUMN_COUNT, nY * ROW_COUNT);
@@ -341,6 +339,13 @@ void SvxSearchCharSet::RecalculateFont(vcl::RenderContext& 
rRenderContext)
 mbRecalculateFont = false;
 }
 
+void SvxSearchCharSet::UpdateScrollRange()
+{
+//scrollbar settings
+int nLastRow = (getMaxCharCount() - 1 + COLUMN_COUNT) / COLUMN_COUNT;
+mxScrollArea->vadjustment_configure(mxScrollArea->vadjustment_get_value(), 
0, nLastRow, 1, ROW_COUNT - 1, ROW_COUNT);
+}
+
 void SvxSearchCharSet::SelectIndex(int nNewIndex, bool bFocus)
 {
 if (!mxFontCharMap.is())


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

2023-02-10 Thread Caolán McNamara (via logerrit)
 cui/source/options/optgdlg.cxx |1 -
 cui/uiconfig/ui/optviewpage.ui |   10 +++---
 2 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit c217359b7b3583ae4156e4c2322fe7d867eb3306
Author: Caolán McNamara 
AuthorDate: Fri Feb 10 19:43:55 2023 +
Commit: Caolán McNamara 
CommitDate: Sat Feb 11 07:44:36 2023 +

set the image in the .ui instead of the .cxx

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 3b1f652adbcf..02801e9537c3 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -566,7 +566,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 
 m_xIconStyleLB->set_active(0);
 
-m_xMoreIcons->set_from_icon_name("cmd/sc_additionsdialog.png");
 m_xMoreIcons->connect_clicked(LINK(this, OfaViewTabPage, 
OnMoreIconsClick));
 m_xRunGPTests->connect_clicked( LINK( this, OfaViewTabPage, 
OnRunGPTestClick));
 }
diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index a371f83e584a..5f0286a27531 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -9,6 +9,11 @@
 1
 10
   
+  
+True
+False
+cmd/sc_additionsdialog.png
+  
   
   
 True
@@ -450,9 +455,8 @@
 True
 True
 Add more icon themes via extension
-
-  
-
+image1
+True
   
   
 2


[Libreoffice-commits] core.git: cui/source cui/uiconfig include/vcl officecfg/registry vcl/inc vcl/osx vcl/source vcl/unx vcl/win

2023-02-08 Thread Caolán McNamara (via logerrit)
 cui/source/options/optgdlg.cxx |   33 +++-
 cui/source/options/optgdlg.hxx |2 
 cui/uiconfig/ui/optviewpage.ui |  106 ++---
 include/vcl/settings.hxx   |3 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   25 +++
 vcl/inc/osx/salframe.h |1 
 vcl/inc/salframe.hxx   |2 
 vcl/inc/unx/gtk/gtkframe.hxx   |1 
 vcl/inc/win/salframe.h |1 
 vcl/osx/salframe.cxx   |   20 ++
 vcl/source/app/settings.cxx|   20 ++
 vcl/unx/gtk3/gtkframe.cxx  |   48 -
 vcl/win/gdi/salnativewidgets-luna.cxx  |   49 +++---
 vcl/win/window/salframe.cxx|   47 -
 14 files changed, 300 insertions(+), 58 deletions(-)

New commits:
commit f7c03364e24da285ea95cea0cc688a7a120fc163
Author: Caolán McNamara 
AuthorDate: Mon Feb 6 20:53:55 2023 +
Commit: Caolán McNamara 
CommitDate: Wed Feb 8 16:11:25 2023 +

tdf#153229 add a switch to override honoring system dark mode

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 4405fdb3e76b..5663d3912488 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -528,6 +528,8 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xIconSizeLB(m_xBuilder->weld_combo_box("iconsize"))
 , m_xSidebarIconSizeLB(m_xBuilder->weld_combo_box("sidebariconsize"))
 , 
m_xNotebookbarIconSizeLB(m_xBuilder->weld_combo_box("notebookbariconsize"))
+, m_xDarkModeFrame(m_xBuilder->weld_widget("darkmode"))
+, m_xAppearanceStyleLB(m_xBuilder->weld_combo_box("appearance"))
 , m_xIconStyleLB(m_xBuilder->weld_combo_box("iconstyle"))
 , m_xFontAntiAliasing(m_xBuilder->weld_check_button("aafont"))
 , m_xAAPointLimitLabel(m_xBuilder->weld_label("aafrom"))
@@ -547,9 +549,14 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xMoreIcons(m_xBuilder->weld_button("btnMoreIcons"))
 , m_xRunGPTests(m_xBuilder->weld_button("btn_rungptest"))
 {
-if (Application::GetToolkitName().startsWith("gtk"))
+OUString sToolKitName(Application::GetToolkitName());
+if (sToolKitName.startsWith("gtk"))
 m_xMenuIconBox->hide();
 
+const bool bHasDarkMode = sToolKitName.startsWith("gtk") || sToolKitName 
== "osx" || sToolKitName == "win";
+if (!bHasDarkMode)
+m_xDarkModeFrame->hide();
+
 m_xFontAntiAliasing->connect_toggled( LINK( this, OfaViewTabPage, 
OnAntialiasingToggled ) );
 
 m_xUseSkia->connect_toggled(LINK(this, OfaViewTabPage, OnUseSkiaToggled));
@@ -668,6 +675,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 {
 bool bModified = false;
 bool bMenuOptModified = false;
+bool bDarkModeOptModified = false;
 bool bRepaintWindows(false);
 std::shared_ptr 
xChanges(comphelper::ConfigurationChanges::create());
 
@@ -781,6 +789,12 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 bAppearanceChanged = true;
 }
 
+if (m_xAppearanceStyleLB->get_value_changed_from_saved())
+{
+bDarkModeOptModified = true;
+bModified = true;
+}
+
 if (m_xContextMenuShortcutsLB->get_value_changed_from_saved())
 {
 officecfg::Office::Common::View::Menu::ShortcutsInContextMenus::set(
@@ -824,12 +838,20 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 
 xChanges->commit();
 
-if( bMenuOptModified )
+if (bMenuOptModified || bDarkModeOptModified)
 {
 // Set changed settings to the application instance
 AllSettings aAllSettings = Application::GetSettings();
-StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
-aAllSettings.SetStyleSettings(aStyleSettings);
+
+if (bMenuOptModified)
+{
+StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
+aAllSettings.SetStyleSettings(aStyleSettings);
+}
+
+if (bDarkModeOptModified)
+MiscSettings::SetDarkMode(m_xAppearanceStyleLB->get_active());
+
 Application::MergeSystemSettings( aAllSettings );
 Application::SetSettings(aAllSettings);
 }
@@ -912,6 +934,9 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
 m_xIconStyleLB->set_active(nStyleLB_InitialSelection);
 m_xIconStyleLB->save_value();
 
+
m_xAppearanceStyleLB->set_active(officecfg::Office::Common::Misc::Appearance::get());
+m_xAppearanceStyleLB->save_value();
+
 // Mouse Snap
   

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

2023-01-30 Thread Henry Castro (via logerrit)
 cui/source/options/optlanguagetool.cxx |3 ++
 cui/source/options/optlanguagetool.hxx |3 +-
 cui/uiconfig/ui/langtoolconfigpage.ui  |   38 -
 3 files changed, 42 insertions(+), 2 deletions(-)

New commits:
commit 326dec315c29028ad1c163020d518e1236f37b6b
Author: Henry Castro 
AuthorDate: Mon Nov 21 21:30:02 2022 -0400
Commit: Henry Castro 
CommitDate: Mon Jan 30 23:23:15 2023 +

cui: add entry "RestProtocol" to language tool dialog

Signed-off-by: Henry Castro 
Change-Id: I6511fc2b353c47b1ff537c42d3484b3a42c1b121
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143106
Reviewed-by: Ashod Nakashian 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145596
Tested-by: Jenkins

diff --git a/cui/source/options/optlanguagetool.cxx 
b/cui/source/options/optlanguagetool.cxx
index f0006d1dd0e0..7a087b09e8c0 100644
--- a/cui/source/options/optlanguagetool.cxx
+++ b/cui/source/options/optlanguagetool.cxx
@@ -30,6 +30,7 @@ 
OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage,
 , m_xBaseURLED(m_xBuilder->weld_entry("baseurl"))
 , m_xUsernameED(m_xBuilder->weld_entry("username"))
 , m_xApiKeyED(m_xBuilder->weld_entry("apikey"))
+, m_xRestProtocol(m_xBuilder->weld_entry("restprotocol"))
 , m_xActivateBox(m_xBuilder->weld_check_button("activate"))
 , m_xSSLDisableVerificationBox(m_xBuilder->weld_check_button("verifyssl"))
 , m_xApiSettingsFrame(m_xBuilder->weld_frame("apisettings"))
@@ -73,6 +74,7 @@ void OptLanguageToolTabPage::Reset(const SfxItemSet*)
 
 m_xUsernameED->set_text(rLanguageOpts.getUsername());
 m_xApiKeyED->set_text(rLanguageOpts.getApiKey());
+m_xRestProtocol->set_text(rLanguageOpts.getRestProtocol());
 
m_xSSLDisableVerificationBox->set_active(rLanguageOpts.getSSLVerification() != 
true);
 }
 
@@ -89,6 +91,7 @@ bool OptLanguageToolTabPage::FillItemSet(SfxItemSet*)
 
 rLanguageOpts.setUsername(m_xUsernameED->get_text());
 rLanguageOpts.setApiKey(m_xApiKeyED->get_text());
+rLanguageOpts.setRestProtocol(m_xRestProtocol->get_text());
 
rLanguageOpts.setSSLVerification(m_xSSLDisableVerificationBox->get_active() != 
true);
 return false;
 }
diff --git a/cui/source/options/optlanguagetool.hxx 
b/cui/source/options/optlanguagetool.hxx
index 666512804c62..141d88f63bb4 100644
--- a/cui/source/options/optlanguagetool.hxx
+++ b/cui/source/options/optlanguagetool.hxx
@@ -38,6 +38,7 @@ private:
 std::unique_ptr m_xBaseURLED;
 std::unique_ptr m_xUsernameED;
 std::unique_ptr m_xApiKeyED;
+std::unique_ptr m_xRestProtocol;
 std::unique_ptr m_xActivateBox;
 std::unique_ptr m_xSSLDisableVerificationBox;
 std::unique_ptr m_xApiSettingsFrame;
@@ -45,4 +46,4 @@ private:
 void EnableControls(bool bEnable);
 
 DECL_LINK(CheckHdl, weld::Toggleable&, void);
-};
\ No newline at end of file
+};
diff --git a/cui/uiconfig/ui/langtoolconfigpage.ui 
b/cui/uiconfig/ui/langtoolconfigpage.ui
index 237040fa76b7..1d7452161998 100644
--- a/cui/uiconfig/ui/langtoolconfigpage.ui
+++ b/cui/uiconfig/ui/langtoolconfigpage.ui
@@ -80,7 +80,7 @@
   
 True
 False
-5
+6
 12
 
   
@@ -191,6 +191,42 @@
 5
   
 
+
+  
+True
+False
+start
+REST protocol:
+True
+restprotocol
+  
+  
+0
+6
+  
+
+
+  
+True
+True
+  
+  
+1
+6
+  
+
+
+  
+True
+False
+start
+Your LanguageTool REST API protocol for 
usage.
+  
+  
+1
+7
+  
+
 
   
 


[Libreoffice-commits] core.git: cui/source cui/uiconfig desktop/source include/sal include/svtools lingucomponent/source officecfg/registry svtools/source

2023-01-30 Thread Mert Tumer (via logerrit)
 cui/source/options/optlanguagetool.cxx|4 
 cui/source/options/optlanguagetool.hxx|1 
 cui/uiconfig/ui/langtoolconfigpage.ui |  239 
+-
 desktop/source/lib/init.cxx   |3 
 include/sal/log-areas.dox |4 
 include/svtools/languagetoolcfg.hxx   |3 
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx |   19 
 officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs|7 
 svtools/source/config/languagetoolcfg.cxx |   24 -
 9 files changed, 183 insertions(+), 121 deletions(-)

New commits:
commit 1fb964276c184b0fb052503fe7dbc05bf0331211
Author: Mert Tumer 
AuthorDate: Mon Jul 4 19:52:49 2022 +0300
Commit: Henry Castro 
CommitDate: Mon Jan 30 22:12:03 2023 +

Added option to disable ssl verification for languagetool

This will allow to use self-signed certificates with local run
languagetool APIs

Signed-off-by: Mert Tumer 
Change-Id: I2bda575fa6174dfc0f6c24da45267ee732643db6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136811
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145594
Tested-by: Jenkins
Reviewed-by: Henry Castro 

diff --git a/cui/source/options/optlanguagetool.cxx 
b/cui/source/options/optlanguagetool.cxx
index 309ff2a09b52..f0006d1dd0e0 100644
--- a/cui/source/options/optlanguagetool.cxx
+++ b/cui/source/options/optlanguagetool.cxx
@@ -31,6 +31,7 @@ 
OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage,
 , m_xUsernameED(m_xBuilder->weld_entry("username"))
 , m_xApiKeyED(m_xBuilder->weld_entry("apikey"))
 , m_xActivateBox(m_xBuilder->weld_check_button("activate"))
+, m_xSSLDisableVerificationBox(m_xBuilder->weld_check_button("verifyssl"))
 , m_xApiSettingsFrame(m_xBuilder->weld_frame("apisettings"))
 {
 m_xActivateBox->connect_toggled(LINK(this, OptLanguageToolTabPage, 
CheckHdl));
@@ -51,6 +52,7 @@ void OptLanguageToolTabPage::EnableControls(bool bEnable)
 rLanguageOpts.setEnabled(bEnable);
 m_xApiSettingsFrame->set_visible(bEnable);
 m_xActivateBox->set_active(bEnable);
+
m_xSSLDisableVerificationBox->set_active(rLanguageOpts.getSSLVerification() != 
true);
 }
 
 IMPL_LINK_NOARG(OptLanguageToolTabPage, CheckHdl, weld::Toggleable&, void)
@@ -71,6 +73,7 @@ void OptLanguageToolTabPage::Reset(const SfxItemSet*)
 
 m_xUsernameED->set_text(rLanguageOpts.getUsername());
 m_xApiKeyED->set_text(rLanguageOpts.getApiKey());
+
m_xSSLDisableVerificationBox->set_active(rLanguageOpts.getSSLVerification() != 
true);
 }
 
 bool OptLanguageToolTabPage::FillItemSet(SfxItemSet*)
@@ -86,6 +89,7 @@ bool OptLanguageToolTabPage::FillItemSet(SfxItemSet*)
 
 rLanguageOpts.setUsername(m_xUsernameED->get_text());
 rLanguageOpts.setApiKey(m_xApiKeyED->get_text());
+
rLanguageOpts.setSSLVerification(m_xSSLDisableVerificationBox->get_active() != 
true);
 return false;
 }
 
diff --git a/cui/source/options/optlanguagetool.hxx 
b/cui/source/options/optlanguagetool.hxx
index 8ee83ed4e367..666512804c62 100644
--- a/cui/source/options/optlanguagetool.hxx
+++ b/cui/source/options/optlanguagetool.hxx
@@ -39,6 +39,7 @@ private:
 std::unique_ptr m_xUsernameED;
 std::unique_ptr m_xApiKeyED;
 std::unique_ptr m_xActivateBox;
+std::unique_ptr m_xSSLDisableVerificationBox;
 std::unique_ptr m_xApiSettingsFrame;
 
 void EnableControls(bool bEnable);
diff --git a/cui/uiconfig/ui/langtoolconfigpage.ui 
b/cui/uiconfig/ui/langtoolconfigpage.ui
index 38aa184c2469..237040fa76b7 100644
--- a/cui/uiconfig/ui/langtoolconfigpage.ui
+++ b/cui/uiconfig/ui/langtoolconfigpage.ui
@@ -76,16 +76,130 @@
   
 True
 False
-5
-12
 
-  
+  
 True
 False
-start
-Base URL:
-True
-baseurl
+5
+12
+
+  
+True
+False
+start
+Base URL:
+True
+baseurl
+  
+  
+0
+0
+  
+
+
+  
+True
+True
+True
+  
+  

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

2022-12-09 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/QrCodeGenDialog.cxx |6 +-
 cui/uiconfig/ui/qrcodegen.ui   |4 
 2 files changed, 1 insertion(+), 9 deletions(-)

New commits:
commit 6683010b1a856c3894cc0a7172ac14fda0b76aa8
Author: Caolán McNamara 
AuthorDate: Fri Dec 9 12:45:11 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Dec 9 14:47:49 2022 +

Related: tdf#146395 drop default text

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

diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
index e028d4d10e94..f8cbac1d758d 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -171,18 +171,14 @@ QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, 
Reference xModel
   m_xEdittext->get_height_rows(6));
 if (!bEditExisting)
 {
-OUString sSelection;
 // TODO: This only works in Writer doc. Should also work in shapes
 Reference xSelections(m_xModel->getCurrentSelection(), 
UNO_QUERY);
 if (xSelections.is())
 {
 Reference xSelection(xSelections->getByIndex(0), 
UNO_QUERY);
 if (xSelection.is())
-sSelection = xSelection->getString();
+m_xEdittext->set_text(xSelection->getString());
 }
-if (!sSelection.isEmpty())
-m_xEdittext->set_text(sSelection);
-m_xEdittext->select_region(0, -1);
 return;
 }
 
diff --git a/cui/uiconfig/ui/qrcodegen.ui b/cui/uiconfig/ui/qrcodegen.ui
index 7078e3aa44a5..2a55eaa01901 100644
--- a/cui/uiconfig/ui/qrcodegen.ui
+++ b/cui/uiconfig/ui/qrcodegen.ui
@@ -8,9 +8,6 @@
 1
 10
   
-  
-www.libreoffice.org
-  
   
 False
 6
@@ -347,7 +344,6 @@
 True
 True
 True
-textbuffer1
 
   
 The text from which to generate the code.


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

2022-12-04 Thread Khaled Hosny (via logerrit)
 cui/source/dialogs/FontFeaturesDialog.cxx |   53 ++-
 cui/source/inc/FontFeaturesDialog.hxx |5 +
 cui/uiconfig/ui/fontfeaturesdialog.ui |  133 --
 3 files changed, 176 insertions(+), 15 deletions(-)

New commits:
commit df57f192c03b38b834a8283b80fc9cd9610b1583
Author: Khaled Hosny 
AuthorDate: Sat Dec 3 15:33:08 2022 +0200
Commit: خالد حسني 
CommitDate: Sun Dec 4 08:19:58 2022 +

Seperate Stylistic Sets and Character Variants in Font Features Dialog

Makes clear what these features are when we use feature names provided
by the font.

Change-Id: I98a7294d3e1e7fef5293d0444c0fbbfcc131ed44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143611
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
index a23c0083c1b3..e4154e640ab5 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -23,7 +23,12 @@ FontFeaturesDialog::FontFeaturesDialog(weld::Window* 
pParent, OUString aFontName
 : GenericDialogController(pParent, "cui/ui/fontfeaturesdialog.ui", 
"FontFeaturesDialog")
 , m_sFontName(std::move(aFontName))
 , m_xContentWindow(m_xBuilder->weld_scrolled_window("contentWindow"))
+, m_xContentBox(m_xBuilder->weld_container("contentBox"))
 , m_xContentGrid(m_xBuilder->weld_container("contentGrid"))
+, m_xStylisticSetsBox(m_xBuilder->weld_container("stylisticSetsBox"))
+, m_xStylisticSetsGrid(m_xBuilder->weld_container("stylisticSetsGrid"))
+, 
m_xCharacterVariantsBox(m_xBuilder->weld_container("characterVariantsBox"))
+, 
m_xCharacterVariantsGrid(m_xBuilder->weld_container("characterVariantsGrid"))
 , m_xPreviewWindow(new weld::CustomWeld(*m_xBuilder, "preview", 
m_aPreviewWindow))
 {
 initialize();
@@ -66,9 +71,11 @@ void FontFeaturesDialog::initialize()
 
 int nRowHeight = fillGrid(rFilteredFontFeatures);
 
+auto nFeaturesHeight = m_xContentBox->get_preferred_size().Height()
+   + m_xStylisticSetsBox->get_preferred_size().Height()
+   + 
m_xCharacterVariantsBox->get_preferred_size().Height();
 m_xContentWindow->set_size_request(
--1, std::min(std::max(m_xContentWindow->get_preferred_size().Height(),
-  m_xContentGrid->get_preferred_size().Height()),
+-1, std::min(std::max(m_xContentWindow->get_preferred_size().Height(), 
nFeaturesHeight),
  static_cast(300L)));
 
 if (nRowHeight)
@@ -80,6 +87,21 @@ void FontFeaturesDialog::initialize()
 updateFontPreview();
 }
 
+namespace
+{
+bool isCharacterVariantCode(sal_uInt32 nFeatureCode)
+{
+return ((sal_uInt32(nFeatureCode) >> 24) & 0xFF) == 'c'
+   && ((sal_uInt32(nFeatureCode) >> 16) & 0xFF) == 'v';
+}
+
+bool isStylisticSetCode(sal_uInt32 nFeatureCode)
+{
+return ((sal_uInt32(nFeatureCode) >> 24) & 0xFF) == 's'
+   && ((sal_uInt32(nFeatureCode) >> 16) & 0xFF) == 's';
+}
+}
+
 int FontFeaturesDialog::fillGrid(std::vector const& 
rFontFeatures)
 {
 int nRowHeight(0);
@@ -87,7 +109,7 @@ int 
FontFeaturesDialog::fillGrid(std::vector const& rFontFea
 vcl::font::FeatureParser aParser(m_sFontName);
 auto aExistingFeatures = aParser.getFeaturesMap();
 
-sal_Int32 i = 0;
+sal_Int32 i = 0, j = 0, k = 0, n = 0;
 for (vcl::font::Feature const& rFontFeature : rFontFeatures)
 {
 sal_uInt32 nFontFeatureCode = rFontFeature.m_nCode;
@@ -98,7 +120,24 @@ int 
FontFeaturesDialog::fillGrid(std::vector const& rFontFea
 if (!aDefinition)
 aDefinition = { nFontFeatureCode, "" };
 
-m_aFeatureItems.emplace_back(m_xContentGrid.get());
+if (isStylisticSetCode(nFontFeatureCode))
+{
+n = j++;
+m_xStylisticSetsBox->set_visible(true);
+m_aFeatureItems.emplace_back(m_xStylisticSetsGrid.get());
+}
+else if (isCharacterVariantCode(nFontFeatureCode))
+{
+n = k++;
+m_xCharacterVariantsBox->set_visible(true);
+m_aFeatureItems.emplace_back(m_xCharacterVariantsGrid.get());
+}
+else
+{
+n = i++;
+m_xContentBox->set_visible(true);
+m_aFeatureItems.emplace_back(m_xContentGrid.get());
+}
 
 int32_t nValue = 0;
 if (aExistingFeatures.find(nFontFeatureCode) != 
aExistingFeatures.end())
@@ -110,8 +149,8 @@ int 
FontFeaturesDialog::fillGrid(std::vector const& rFontFea
 aCurrentItem.m_aFeatureCode = nFontFeatureCode;
 aCurrentItem.m_nDefault = aDefinition.getDefault();
 
-sal_Int32 nGridPositionX = (i % 2) * 2;
-sal_Int32 nGridPositionY = i / 2;
+sal_Int32 nGridPositionX = (n % 2) * 2;
+sal_Int32 nGridPositionY = n / 2;
 aCurrentItem.m_xContainer->set_grid_left_attach(nGri

[Libreoffice-commits] core.git: cui/source cui/uiconfig cui/UIConfig_cui.mk sw/source

2022-11-28 Thread Aron Budea (via logerrit)
 cui/UIConfig_cui.mk |2 +-
 cui/source/options/optdeepl.cxx |2 +-
 cui/uiconfig/ui/optdeeplpage.ui |9 -
 sw/source/uibase/shells/textsh1.cxx |   10 ++
 4 files changed, 16 insertions(+), 7 deletions(-)

New commits:
commit bfdaa3f59bcf87f341138202c047dd4b28acb28a
Author: Aron Budea 
AuthorDate: Sun Nov 27 22:48:51 2022 +0100
Commit: Miklos Vajna 
CommitDate: Mon Nov 28 14:31:35 2022 +0100

DeepL: Only enable Translate menu if it's set up

Both the API URL and Authentication key have to be set.

Plus:
- align widgets in DeepL settings dialog,
- rename .ui file to conform to other dialog names in Options.

Change-Id: I8cfeaa64b05747b0113a6075b6fd241ca9ab3a70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143359
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 4c0f9a7f2a75..6985163f6922 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -137,6 +137,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/optbasicidepage \
cui/uiconfig/ui/optctlpage \
cui/uiconfig/ui/optchartcolorspage \
+   cui/uiconfig/ui/optdeeplpage \
cui/uiconfig/ui/optemailpage \
cui/uiconfig/ui/optfltrpage \
cui/uiconfig/ui/optfltrembedpage \
@@ -144,7 +145,6 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/optgeneralpage \
cui/uiconfig/ui/opthtmlpage \
cui/uiconfig/ui/langtoolconfigpage \
-   cui/uiconfig/ui/deepltabpage \
cui/uiconfig/ui/optionsdialog \
cui/uiconfig/ui/optjsearchpage \
cui/uiconfig/ui/optlanguagespage \
diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx
index b219845f07c7..5343f72a59c9 100644
--- a/cui/source/options/optdeepl.cxx
+++ b/cui/source/options/optdeepl.cxx
@@ -22,7 +22,7 @@
 
 OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, 
weld::DialogController* pController,
  const SfxItemSet& rSet)
-: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", 
&rSet)
+: SfxTabPage(pPage, pController, "cui/ui/optdeeplpage.ui", "OptDeeplPage", 
&rSet)
 , m_xAPIUrl(m_xBuilder->weld_entry("apiurl"))
 , m_xAuthKey(m_xBuilder->weld_entry("authkey"))
 {
diff --git a/cui/uiconfig/ui/deepltabpage.ui b/cui/uiconfig/ui/optdeeplpage.ui
similarity index 92%
rename from cui/uiconfig/ui/deepltabpage.ui
rename to cui/uiconfig/ui/optdeeplpage.ui
index d6635b7ae990..6422be8bd611 100644
--- a/cui/uiconfig/ui/deepltabpage.ui
+++ b/cui/uiconfig/ui/optdeeplpage.ui
@@ -18,7 +18,7 @@
 start
 5
 5
-DeepL API Options
+DeepL API Options
 True
 grid1
 
@@ -32,7 +32,7 @@
 
 
   
-Please read the privacy policy
+Please read the privacy policy
 True
 True
 True
@@ -60,8 +60,7 @@
 True
 False
 start
-5
-API URL:
+API URL:
 True
 apiurl
   
@@ -76,7 +75,7 @@
 False
 start
 5
-Authentication key:
+Authentication key:
 True
 authkey
   
diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index d17715a826aa..b38748039bc9 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1993,6 +1993,16 @@ void SwTextShell::GetState( SfxItemSet &rSet )
 }
 break;
 
+case SID_FM_TRANSLATE:
+{
+const SvxDeeplOptions& rDeeplOptions = 
SvxDeeplOptions::Get();
+if (rDeeplOptions.getAPIUrl().isEmpty() || 
rDeeplOptions.getAuthKey().isEmpty())
+{
+rSet.DisableItem(nWhich);
+}
+}
+break;
+
 case SID_HYPERLINK_DIALOG:
 if( GetView().GetDocShell()->IsReadOnly()
 || ( !GetView().GetViewFrame()->HasChildWindow(nWhich)


[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svtools officecfg/registry svtools/source sw/inc sw/source

2022-11-17 Thread Rafael Lima (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |5 
 cui/source/options/optcolor.cxx|1 
 cui/uiconfig/ui/colorconfigwin.ui  |  109 +++--
 include/svtools/colorcfg.hxx   |1 
 officecfg/registry/data/org/openoffice/Office/UI.xcu   |   10 +
 officecfg/registry/schema/org/openoffice/Office/UI.xcs |   10 +
 svtools/source/config/colorcfg.cxx |2 
 sw/inc/viewopt.hxx |2 
 sw/source/core/inc/wrong.hxx   |2 
 sw/source/uibase/config/viewopt.cxx|7 +
 10 files changed, 81 insertions(+), 68 deletions(-)

New commits:
commit 0aa61812a87ac466bea4b35cba75a4e986be8c7f
Author: Rafael Lima 
AuthorDate: Fri Nov 4 20:31:22 2022 +0200
Commit: Rafael Lima 
CommitDate: Thu Nov 17 19:17:58 2022 +0100

tdf#151904 Make grammar mistake color configurable

This patch creates a new color entry in Tools - Options - Application 
Colors for "Grammar mistakes". Default values are also set for the 
"LibreOffice" and "LibreOffice dark" schemes.

This patch also applies the selected color to the document, as well as in 
the SpellChecker dialog.

Change-Id: I07f79da9858b675b330540cf08cf389dce39228d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142294
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Rafael Lima 

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 21f7f2b4da80..4ca5bcfe2d17 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1674,11 +1674,10 @@ void SentenceEditWindow_Impl::MoveErrorMarkTo(sal_Int32 
nStart, sal_Int32 nEnd,
 
 // tdf#116566 Use color defined in the current Color Scheme
 Color aSpellErrorCollor = 
svtools::ColorConfig().GetColorValue(svtools::SPELL).nColor;
+Color aGrammarErrorCollor = 
svtools::ColorConfig().GetColorValue(svtools::GRAMMAR).nColor;
 
-// TODO: Create a new Color Scheme entry for grammar mistakes and use it 
below
-// instead of using hardcoded COL_LIGHTBLUE
 SfxItemSet aSet(m_xEditEngine->GetEmptyItemSet());
-aSet.Put(SvxColorItem(bGrammarError ? COL_LIGHTBLUE : aSpellErrorCollor, 
EE_CHAR_COLOR));
+aSet.Put(SvxColorItem(bGrammarError ? aGrammarErrorCollor : 
aSpellErrorCollor, EE_CHAR_COLOR));
 aSet.Put(SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT));
 aSet.Put(SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT_CJK));
 aSet.Put(SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT_CTL));
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 2249b70e495e..560ae9ddee44 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -106,6 +106,7 @@ const vEntryInfo[] =
 { Group_General, IDS_CB(unvisitedlinks) },
 { Group_General, IDS_CB(visitedlinks) },
 { Group_General, IDS(autospellcheck) },
+{ Group_General, IDS(grammarcheck) },
 { Group_General, IDS(smarttags) },
 { Group_General, IDS_CB(shadows) },
 
diff --git a/cui/uiconfig/ui/colorconfigwin.ui 
b/cui/uiconfig/ui/colorconfigwin.ui
index ac54911f78aa..6cc7717101ef 100644
--- a/cui/uiconfig/ui/colorconfigwin.ui
+++ b/cui/uiconfig/ui/colorconfigwin.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -50,7 +50,6 @@
 True
 0
 True
-
 
   
 
@@ -86,7 +85,6 @@
 end
 0
 True
-
 
   
 
@@ -127,7 +125,6 @@
 end
 0
 True
-
 
   
 
@@ -163,7 +160,6 @@
 end
 0
 True
-
 
   
 
@@ -207,7 +203,6 @@
 end
 0
 True
-
 
   
 
@@ -248,7 +243,6 @@
 end
 0
 True
-
 
   
 
@@ -284,7 +278,6 @@
 end
 0
 True
-
 
   
 
@@ -328,7 +321,6 @@
 end
 0
 True
-
 
   
 
@@ -352,7 +344,7 @@
 False
 start
 center
-AutoSpellcheck
+Spelling mistakes
 True
 autospellcheck_lb
   
@@ -369,7 +361,6 @@
 end
 0
 True
-
 
   
 
@@ -40

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

2022-11-09 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/tabpages/chardlg.cxx |5 -
 cui/uiconfig/ui/positionpage.ui |2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 7f4f536ca9195c7d53463527f00897b65d062486
Author: Samuel Mehrbrodt 
AuthorDate: Mon Nov 7 15:01:53 2022 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 10 08:30:40 2022 +0100

tdf#107405 Allow kerning less than -2

Fallout from 9a745d54a5c7470180f41494283983a3b8b84a51

Change-Id: Ied4d83eb614830718cf304e7010f17516e4a9429
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142388
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index e34eca07485c..3d77e2a338fb 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2775,10 +2775,13 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet 
)
 rCJKFont.SetFixKerning( static_cast(nKern) );
 rCTLFont.SetFixKerning( static_cast(nKern) );
 
-//the attribute value must be displayed also if it's above the maximum 
allowed value
+//the attribute value must be displayed also if it's above/below the 
maximum allowed value
 tools::Long nVal = 
static_cast(m_xKerningMF->get_max(FieldUnit::POINT));
 if(nVal < nKerning)
 m_xKerningMF->set_max(nKerning, FieldUnit::POINT);
+nVal = 
static_cast(m_xKerningMF->get_min(FieldUnit::POINT));
+if (nVal > nKerning)
+m_xKerningMF->set_min(nKerning, FieldUnit::POINT);
 m_xKerningMF->set_value(nKerning, FieldUnit::POINT);
 }
 else
diff --git a/cui/uiconfig/ui/positionpage.ui b/cui/uiconfig/ui/positionpage.ui
index 23d476bbe282..ad962316a73d 100644
--- a/cui/uiconfig/ui/positionpage.ui
+++ b/cui/uiconfig/ui/positionpage.ui
@@ -17,7 +17,7 @@
 10
   
   
--2
+-1000
 1000
 0.1
 1


[Libreoffice-commits] core.git: cui/source cui/uiconfig officecfg/registry vcl/source

2022-10-15 Thread Caolán McNamara (via logerrit)
 cui/source/options/optaccessibility.cxx|7 +
 cui/source/options/optaccessibility.hxx|1 
 cui/uiconfig/ui/optaccessibilitypage.ui|   54 -
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   25 ++
 vcl/source/window/settings.cxx |   19 +++-
 5 files changed, 98 insertions(+), 8 deletions(-)

New commits:
commit 5bf38da0910f590159e8fa4fe359f98c7bd395a4
Author: Caolán McNamara 
AuthorDate: Sat Oct 15 20:10:04 2022 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 15 22:38:13 2022 +0200

tdf#151522 add Accessibility::HighContrast

0 Automatic, do what the system says
1 Disable
2 Enable

Forcing Disable/Enable won't have (much of) an effect on the widgetry, but 
will
affect how document content is rendered where typically content color
is mapped to fore/back ground color.

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

diff --git a/cui/source/options/optaccessibility.cxx 
b/cui/source/options/optaccessibility.cxx
index 1f85254dae22..d0a3694a3c73 100644
--- a/cui/source/options/optaccessibility.cxx
+++ b/cui/source/options/optaccessibility.cxx
@@ -29,6 +29,7 @@ 
SvxAccessibilityOptionsTabPage::SvxAccessibilityOptionsTabPage(weld::Container*
 , 
m_xTextSelectionInReadonly(m_xBuilder->weld_check_button("textselinreadonly"))
 , m_xAnimatedGraphics(m_xBuilder->weld_check_button("animatedgraphics"))
 , m_xAnimatedTexts(m_xBuilder->weld_check_button("animatedtext"))
+, m_xHighContrast(m_xBuilder->weld_combo_box("highcontrast"))
 , m_xAutomaticFontColor(m_xBuilder->weld_check_button("autofontcolor"))
 , m_xPagePreviews(m_xBuilder->weld_check_button("systempagepreviewcolor"))
 {
@@ -60,6 +61,8 @@ bool SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet* 
)
 
officecfg::Office::Common::Accessibility::IsAutomaticFontColor::set(m_xAutomaticFontColor->get_active(),
 batch);
 if ( 
!officecfg::Office::Common::Accessibility::IsSelectionInReadonly::isReadOnly() )
 
officecfg::Office::Common::Accessibility::IsSelectionInReadonly::set(m_xTextSelectionInReadonly->get_active(),
 batch);
+if ( !officecfg::Office::Common::Accessibility::HighContrast::isReadOnly() 
)
+
officecfg::Office::Common::Accessibility::HighContrast::set(m_xHighContrast->get_active(),
 batch);
 batch->commit();
 
 AllSettings aAllSettings = Application::GetSettings();
@@ -96,6 +99,10 @@ void SvxAccessibilityOptionsTabPage::Reset( const 
SfxItemSet* )
 if( 
officecfg::Office::Common::Accessibility::IsSelectionInReadonly::isReadOnly() )
 m_xTextSelectionInReadonly->set_sensitive(false);
 
+m_xHighContrast->set_active( 
officecfg::Office::Common::Accessibility::HighContrast::get() );
+if( officecfg::Office::Common::Accessibility::HighContrast::isReadOnly() )
+m_xHighContrast->set_sensitive(false);
+
 AllSettings aAllSettings = Application::GetSettings();
 const MiscSettings& aMiscSettings = aAllSettings.GetMiscSettings();
 m_xAccessibilityTool->set_active(aMiscSettings.GetEnableATToolSupport());
diff --git a/cui/source/options/optaccessibility.hxx 
b/cui/source/options/optaccessibility.hxx
index c53c17be1158..504e18327c7f 100644
--- a/cui/source/options/optaccessibility.hxx
+++ b/cui/source/options/optaccessibility.hxx
@@ -26,6 +26,7 @@ class SvxAccessibilityOptionsTabPage : public SfxTabPage
 std::unique_ptr m_xTextSelectionInReadonly;
 std::unique_ptr m_xAnimatedGraphics;
 std::unique_ptr m_xAnimatedTexts;
+std::unique_ptr m_xHighContrast;
 std::unique_ptr m_xAutomaticFontColor;
 std::unique_ptr m_xPagePreviews;
 
diff --git a/cui/uiconfig/ui/optaccessibilitypage.ui 
b/cui/uiconfig/ui/optaccessibilitypage.ui
index 2643000fd246..07d89dcac65e 100644
--- a/cui/uiconfig/ui/optaccessibilitypage.ui
+++ b/cui/uiconfig/ui/optaccessibilitypage.ui
@@ -135,6 +135,56 @@
 6
 vertical
 6
+
+  
+  
+True
+False
+True
+6
+
+  
+True
+False
+High Contrast:
+True
+highcontrast
+0
+  
+  
+0
+0
+  
+
+
+  
+True
+False
+start
+0
+
+  Automatic
+  Disable
+  Enable
+
+
+  
+Controls if high 
contr

[Libreoffice-commits] core.git: cui/source cui/uiconfig officecfg/registry svtools/source vcl/source vcl/win

2022-10-15 Thread Caolán McNamara (via logerrit)
 cui/source/options/optaccessibility.cxx|7 ---
 cui/source/options/optaccessibility.hxx|1 
 cui/uiconfig/ui/optaccessibilitypage.ui|   24 --
 officecfg/registry/data/org/openoffice/Setup.xcu   |1 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   10 
 svtools/source/config/colorcfg.cxx |   18 +---
 vcl/source/window/settings.cxx |   29 -
 vcl/win/window/salframe.cxx|5 --
 8 files changed, 6 insertions(+), 89 deletions(-)

New commits:
commit 75fd3093ea748e35beca1f903e7828ad82f2372f
Author: Caolán McNamara 
AuthorDate: Fri Oct 14 20:17:05 2022 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 15 21:09:34 2022 +0200

tdf#151522 drop Accessibility::AutoDetectSystemHC

which doesn't preclude having a different option to force it
on/off against the system HighContrast mode setting.

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

diff --git a/cui/source/options/optaccessibility.cxx 
b/cui/source/options/optaccessibility.cxx
index a394ff955a4a..1f85254dae22 100644
--- a/cui/source/options/optaccessibility.cxx
+++ b/cui/source/options/optaccessibility.cxx
@@ -29,7 +29,6 @@ 
SvxAccessibilityOptionsTabPage::SvxAccessibilityOptionsTabPage(weld::Container*
 , 
m_xTextSelectionInReadonly(m_xBuilder->weld_check_button("textselinreadonly"))
 , m_xAnimatedGraphics(m_xBuilder->weld_check_button("animatedgraphics"))
 , m_xAnimatedTexts(m_xBuilder->weld_check_button("animatedtext"))
-, m_xAutoDetectHC(m_xBuilder->weld_check_button("autodetecthc"))
 , m_xAutomaticFontColor(m_xBuilder->weld_check_button("autofontcolor"))
 , m_xPagePreviews(m_xBuilder->weld_check_button("systempagepreviewcolor"))
 {
@@ -61,8 +60,6 @@ bool SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet* 
)
 
officecfg::Office::Common::Accessibility::IsAutomaticFontColor::set(m_xAutomaticFontColor->get_active(),
 batch);
 if ( 
!officecfg::Office::Common::Accessibility::IsSelectionInReadonly::isReadOnly() )
 
officecfg::Office::Common::Accessibility::IsSelectionInReadonly::set(m_xTextSelectionInReadonly->get_active(),
 batch);
-if ( 
!officecfg::Office::Common::Accessibility::AutoDetectSystemHC::isReadOnly() )
-
officecfg::Office::Common::Accessibility::AutoDetectSystemHC::set(m_xAutoDetectHC->get_active(),
 batch);
 batch->commit();
 
 AllSettings aAllSettings = Application::GetSettings();
@@ -99,10 +96,6 @@ void SvxAccessibilityOptionsTabPage::Reset( const 
SfxItemSet* )
 if( 
officecfg::Office::Common::Accessibility::IsSelectionInReadonly::isReadOnly() )
 m_xTextSelectionInReadonly->set_sensitive(false);
 
-m_xAutoDetectHC->set_active( 
officecfg::Office::Common::Accessibility::AutoDetectSystemHC::get() );
-if( 
officecfg::Office::Common::Accessibility::AutoDetectSystemHC::isReadOnly() )
-m_xAutoDetectHC->set_sensitive(false);
-
 AllSettings aAllSettings = Application::GetSettings();
 const MiscSettings& aMiscSettings = aAllSettings.GetMiscSettings();
 m_xAccessibilityTool->set_active(aMiscSettings.GetEnableATToolSupport());
diff --git a/cui/source/options/optaccessibility.hxx 
b/cui/source/options/optaccessibility.hxx
index 35d5fdefde03..c53c17be1158 100644
--- a/cui/source/options/optaccessibility.hxx
+++ b/cui/source/options/optaccessibility.hxx
@@ -26,7 +26,6 @@ class SvxAccessibilityOptionsTabPage : public SfxTabPage
 std::unique_ptr m_xTextSelectionInReadonly;
 std::unique_ptr m_xAnimatedGraphics;
 std::unique_ptr m_xAnimatedTexts;
-std::unique_ptr m_xAutoDetectHC;
 std::unique_ptr m_xAutomaticFontColor;
 std::unique_ptr m_xPagePreviews;
 
diff --git a/cui/uiconfig/ui/optaccessibilitypage.ui 
b/cui/uiconfig/ui/optaccessibilitypage.ui
index 43be59802974..2643000fd246 100644
--- a/cui/uiconfig/ui/optaccessibilitypage.ui
+++ b/cui/uiconfig/ui/optaccessibilitypage.ui
@@ -135,26 +135,6 @@
 6
 vertical
 6
-
-  
-Automatically _detect high contrast 
mode of operating system
-True
-True
-False
-True
-True
-
-  
-Switches the office 
suite into high contrast mode when the system background color is very 
dark.
-  
-
-  
-  
-False
-True
-0
-  
-
 
   
 Use automatic font _color for 
screen display
@@ -172,7 +152,7 @@
   
 False
 True
-1

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

2022-09-19 Thread Jim Raykowski (via logerrit)
 cui/source/customize/SvxNotebookbarConfigPage.cxx |   22 +++---
 cui/source/customize/cfg.cxx  |   16 
 cui/source/inc/SvxNotebookbarConfigPage.hxx   |1 +
 cui/source/inc/cfg.hxx|1 +
 cui/uiconfig/ui/menuassignpage.ui |2 ++
 5 files changed, 39 insertions(+), 3 deletions(-)

New commits:
commit e79741488cc740f49ebd4426c40b45e7139ff663
Author: Jim Raykowski 
AuthorDate: Fri Sep 16 15:56:49 2022 -0800
Commit: Jim Raykowski 
CommitDate: Tue Sep 20 00:41:04 2022 +0200

tdf#112237 Show tooltips for Assigned Commands in Customize dialog

Change-Id: Iff1946d5d6ac7f2046d36df8fbd76e32edf371c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140142
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx 
b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index 99c15b8f3ca9..91ce6352ddca 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -240,7 +240,7 @@ void 
SvxConfigPage::InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId
 if (xImage.is())
 rTreeView.set_image(rIter, xImage, -1);
 rTreeView.set_text(rIter, aName, 0);
-rTreeView.set_id(rIter, sUIItemId);
+rTreeView.set_id(rIter, sUIItemCommand);
 }
 }
 
@@ -438,8 +438,6 @@ void SvxNotebookbarConfigPage::SelectElement()
 weld::TreeView& rTreeView = m_xContentsListBox->get_widget();
 rTreeView.bulk_insert_for_each(
 aEntries.size(), [this, &rTreeView, &aEntries](weld::TreeIter& rIter, 
int nIdx) {
-OUString sId(OUString::number(nIdx));
-rTreeView.set_id(rIter, sId);
 if (aEntries[nIdx].sActionName != "Null")
 {
 if (aEntries[nIdx].sVisibleValue == "True")
@@ -467,6 +465,9 @@ 
SvxNotebookbarEntriesListBox::SvxNotebookbarEntriesListBox(std::unique_ptrconnect_toggled(LINK(this, SvxNotebookbarEntriesListBox, 
CheckButtonHdl));
 m_xControl->connect_key_press(Link());
 m_xControl->connect_key_press(LINK(this, SvxNotebookbarEntriesListBox, 
KeyInputHdl));
+// remove the inherited connect_query_tooltip then add the new one
+m_xControl->connect_query_tooltip(Link());
+m_xControl->connect_query_tooltip(LINK(this, SvxNotebookbarEntriesListBox, 
QueryTooltip));
 }
 
 SvxNotebookbarEntriesListBox::~SvxNotebookbarEntriesListBox() {}
@@ -540,4 +541,19 @@ IMPL_LINK(SvxNotebookbarEntriesListBox, KeyInputHdl, const 
KeyEvent&, rKeyEvent,
 return SvxMenuEntriesListBox::KeyInputHdl(rKeyEvent);
 }
 
+IMPL_LINK(SvxNotebookbarEntriesListBox, QueryTooltip, const weld::TreeIter&, 
rIter, OUString)
+{
+OUString sCommand = m_xControl->get_id(rIter);
+if (sCommand.isEmpty())
+return OUString();
+OUString 
aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(m_pPage->GetFrame()));
+auto aProperties = 
vcl::CommandInfoProvider::GetCommandProperties(sCommand, aModuleName);
+OUString sTooltipLabel = 
vcl::CommandInfoProvider::GetTooltipForCommand(sCommand, aProperties,
+
m_pPage->GetFrame());
+return CuiResId(RID_CUISTR_COMMANDLABEL) + ": "
+   + m_xControl->get_text(rIter).replaceFirst("~", "") + "\n"
+   + CuiResId(RID_CUISTR_COMMANDNAME) + ": " + sCommand + "\n"
+   + CuiResId(RID_CUISTR_COMMANDTIP) + ": " + 
sTooltipLabel.replaceFirst("~", "");
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index eefa264ba3bd..f5ed658512e9 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -937,6 +937,7 @@ 
SvxMenuEntriesListBox::SvxMenuEntriesListBox(std::unique_ptr xCo
 m_xControl->enable_toggle_buttons(weld::ColumnToggleType::Check);
 CreateDropDown();
 m_xControl->connect_key_press(LINK(this, SvxMenuEntriesListBox, 
KeyInputHdl));
+m_xControl->connect_query_tooltip(LINK(this, SvxMenuEntriesListBox, 
QueryTooltip));
 }
 
 SvxMenuEntriesListBox::~SvxMenuEntriesListBox()
@@ -968,6 +969,21 @@ IMPL_LINK(SvxMenuEntriesListBox, KeyInputHdl, const 
KeyEvent&, rKeyEvent, bool)
 return true;
 }
 
+IMPL_LINK(SvxMenuEntriesListBox, QueryTooltip, const weld::TreeIter&, rIter, 
OUString)
+{
+SvxConfigEntry *pEntry = 
weld::fromId(m_xControl->get_id(rIter));
+if (!pEntry || pEntry->GetCommand().isEmpty())
+return OUString();
+const OUString sCommand(pEntry->GetCommand());
+OUString 
aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(m_pPage->GetFrame()));
+auto aProperties = 
vcl::CommandInfoProvider::GetCommandProperties(sCommand, aModuleName);
+OUString sTooltipLabel = 
vcl::CommandInfoProvider::GetTooltipForCommand(sCommand, aProperties,
+

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/vcl sc/qa

2022-07-28 Thread Balazs Varga (via logerrit)
 cui/source/inc/border.hxx  |2 -
 cui/source/tabpages/border.cxx |   55 ++---
 cui/uiconfig/ui/borderpage.ui  |   14 
 include/vcl/weld.hxx   |   20 
 sc/qa/uitest/calc_tests/formatCells.py |9 +++--
 5 files changed, 83 insertions(+), 17 deletions(-)

New commits:
commit fe2d59a0730e60c0196baa46af12440afd343878
Author: Balazs Varga 
AuthorDate: Mon Jul 25 18:03:49 2022 +0200
Commit: Balazs Varga 
CommitDate: Fri Jul 29 08:53:49 2022 +0200

tdf#150100 sc import and UI: fix double cell border dialog

Hide "Hairline (0.05pt)", "Very thin (0.5pt)" and "Thin (0.75pt)"
predefined border types for Double cell borders, because it has a
minimum thickness 1.1pt, which means, we cannot allow to select them.
Also setting the Medium (1.5pt) predefined thickness to the border
width for Double borders as the thinnest possible predefined value.

TODO: tdf#146466: Inconsistent choices of borders between toolbar and 
sidebar

Change-Id: I46ccb206835a34a6dfaa39e63e614bb01bc6b02e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137441
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 2a3d14ed5062..586b05f9410b 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -178,7 +178,7 @@ private:
 voidFillPresetVS();
 voidFillShadowVS();
 voidFillValueSets();
-voidSetLineWidth(sal_Int64 nWidth);
+voidSetLineWidth(sal_Int64 nWidth, sal_Int32 nRemovedType 
= 0);
 
 // Filler
 voidFillLineListBox_Impl();
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 683dd7713c37..38099a4599c8 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -1242,8 +1242,12 @@ IMPL_LINK(SvxBorderTabPage, SelColHdl_Impl, 
ColorListBox&, rColorBox, void)
 IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthLBHdl_Impl, weld::ComboBox&, void)
 {
 sal_Int32 nPos = m_xLineWidthLB->get_active();
+sal_Int32 nRemovedType = 0;
+if (m_xLineWidthLB->get_values_changed_from_saved()) {
+nRemovedType = m_aLineWidths.size() - m_xLineWidthLB->get_count();
+}
 
-SetLineWidth(m_aLineWidths[nPos]);
+SetLineWidth(m_aLineWidths[nPos + nRemovedType], nRemovedType);
 
 // Call the spinner handler to trigger all related modifications
 ModifyWidthMFHdl_Impl(*m_xLineWidthMF);
@@ -1252,6 +1256,13 @@ IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthLBHdl_Impl, 
weld::ComboBox&, void)
 IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthMFHdl_Impl, 
weld::MetricSpinButton&, void)
 {
 sal_Int64 nVal = m_xLineWidthMF->get_value(FieldUnit::NONE);
+
+// for DOUBLE_THIN line style we cannot allow thinner line width then 
1.10pt
+if (m_xLbLineStyle->GetSelectEntryStyle() == 
SvxBorderLineStyle::DOUBLE_THIN)
+m_xLineWidthMF->set_min(110, FieldUnit::NONE);
+else
+m_xLineWidthMF->set_min(5, FieldUnit::NONE);
+
 nVal = static_cast(vcl::ConvertDoubleValue(
 nVal,
 m_xLineWidthMF->get_digits(),
@@ -1265,6 +1276,13 @@ IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthMFHdl_Impl, 
weld::MetricSpinButton&
 IMPL_LINK_NOARG(SvxBorderTabPage, SelStyleHdl_Impl, SvtLineListBox&, void)
 {
 sal_Int64 nOldWidth = m_xLineWidthMF->get_value(FieldUnit::NONE);
+
+// for DOUBLE_THIN line style we cannot allow thinner line width then 
1.10pt
+if (m_xLbLineStyle->GetSelectEntryStyle() == 
SvxBorderLineStyle::DOUBLE_THIN)
+m_xLineWidthMF->set_min(110, FieldUnit::NONE);
+else
+m_xLineWidthMF->set_min(5, FieldUnit::NONE);
+
 nOldWidth = static_cast(vcl::ConvertDoubleValue(
 nOldWidth,
 m_xLineWidthMF->get_digits(),
@@ -1276,7 +1294,14 @@ IMPL_LINK_NOARG(SvxBorderTabPage, SelStyleHdl_Impl, 
SvtLineListBox&, void)
 
 // auto change line-width if it doesn't correspond to minimal value
 // let's change only in case when user has not changed the line-width into 
some custom value
-const sal_Int64 nNewWidth = (nOldMinWidth == nOldWidth)? nNewMinWidth : 
nOldWidth;
+sal_Int64 nNewWidth = (nOldMinWidth == nOldWidth) ? nNewMinWidth : 
nOldWidth;
+
+// if we had selected a predefined border width under 
SvxBorderLineWidth::Medium set the Medium as default
+// otherwise if we had a cusom border width under 1.10pt then set the 
spinner to the maximum allowed value for double border styles
+bool bNewDoubleHairline = m_xLbLineStyle->GetSelectEntryStyle() == 
SvxBorderLineStyle::DOUBLE_THIN && !m_xLineWidthMF->get_visible() &&
+(nOldWidth == SvxBorderLineWidth::Hairline || nOldWidth == 
SvxBorderLineWidth::VeryThin || nOldWidth == SvxBorderLineWidth::Thin);
+if (bNewDoubleHairline && nNewWidth < SvxBorderLineWidth::Medium)
+   

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/editeng include/oox include/svx offapi/com oox/inc oox/source sd/qa sd/source svl/source svx/source sw/qa

2022-06-16 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/inc/cuitabarea.hxx  |1 
 cui/source/tabpages/tparea.cxx |   36 ++---
 cui/uiconfig/ui/areatabpage.ui |   18 
 include/editeng/unoprnms.hxx   |1 
 include/oox/drawingml/shape.hxx|5 ---
 include/oox/drawingml/shapepropertymap.hxx |1 
 include/svx/strings.hrc|1 
 include/svx/unoshprp.hxx   |4 ++
 include/svx/xdef.hxx   |4 ++
 include/svx/xfilluseslidebackgrounditem.hxx|   32 ++
 offapi/com/sun/star/drawing/FillProperties.idl |7 
 oox/inc/drawingml/fillproperties.hxx   |1 
 oox/source/drawingml/fillproperties.cxx|4 ++
 oox/source/drawingml/shape.cxx |3 --
 oox/source/drawingml/shapepropertymap.cxx  |1 
 oox/source/export/drawingml.cxx|7 
 oox/source/ppt/pptshapegroupcontext.cxx|   27 +-
 oox/source/token/properties.txt|1 
 sd/qa/unit/import-tests2.cxx   |   27 ++
 sd/source/filter/eppt/pptx-epptooxml.cxx   |   11 ++-
 svl/source/items/poolitem.cxx  |1 
 svx/source/svdraw/svdattr.cxx  |1 
 svx/source/xoutdev/xattr2.cxx  |   27 ++
 svx/source/xoutdev/xpool.cxx   |2 +
 sw/qa/extras/layout/layout.cxx |8 ++---
 25 files changed, 175 insertions(+), 56 deletions(-)

New commits:
commit c4cf2e82e8d0aaef9b1daedc033d6edf647e5284
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jun 13 08:53:22 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jun 16 15:44:53 2022 +0200

tdf#128150 Add OOXML import/export for "use background fill"

and allow editing this fill property in area dlg

Change-Id: Ic63ba11e9d499d4a0fb22f6739587e3e25140b8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134406
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index aa4e07343bd2..fa22f56e040f 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -241,6 +241,7 @@ protected:
 std::unique_ptr m_xBtnHatch;
 std::unique_ptr m_xBtnBitmap;
 std::unique_ptr m_xBtnPattern;
+std::unique_ptr m_xBtnUseBackground;
 
 void SetOptimalSize(weld::DialogController* pController);
 
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index f7bbf34ef676..5a94566d83c5 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -41,7 +42,8 @@ enum FillType
 GRADIENT,
 HATCH,
 BITMAP,
-PATTERN
+PATTERN,
+USE_BACKGROUND_FILL
 };
 
 }
@@ -89,6 +91,7 @@ SvxAreaTabPage::SvxAreaTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xBtnHatch(m_xBuilder->weld_toggle_button("btnhatch"))
 , m_xBtnBitmap(m_xBuilder->weld_toggle_button("btnbitmap"))
 , m_xBtnPattern(m_xBuilder->weld_toggle_button("btnpattern"))
+, m_xBtnUseBackground(m_xBuilder->weld_toggle_button("btnusebackground"))
 {
 maBox.AddButton(m_xBtnNone.get());
 maBox.AddButton(m_xBtnColor.get());
@@ -96,6 +99,7 @@ SvxAreaTabPage::SvxAreaTabPage(weld::Container* pPage, 
weld::DialogController* p
 maBox.AddButton(m_xBtnHatch.get());
 maBox.AddButton(m_xBtnBitmap.get());
 maBox.AddButton(m_xBtnPattern.get());
+maBox.AddButton(m_xBtnUseBackground.get());
 Link aLink = LINK(this, SvxAreaTabPage, 
SelectFillTypeHdl_Impl);
 m_xBtnNone->connect_toggled(aLink);
 m_xBtnColor->connect_toggled(aLink);
@@ -103,6 +107,7 @@ SvxAreaTabPage::SvxAreaTabPage(weld::Container* pPage, 
weld::DialogController* p
 m_xBtnHatch->connect_toggled(aLink);
 m_xBtnBitmap->connect_toggled(aLink);
 m_xBtnPattern->connect_toggled(aLink);
+m_xBtnUseBackground->connect_toggled(aLink);
 
 SetExchangeSupport();
 }
@@ -166,7 +171,11 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
 default:
 case drawing::FillStyle_NONE:
 {
-SelectFillType(*m_xBtnNone);
+XFillUseSlideBackgroundItem aBckItem( 
rSet.Get(XATTR_FILLUSESLIDEBACKGROUND));
+if (aBckItem.GetValue())
+SelectFillType(*m_xBtnUseBackground);
+else
+SelectFillType(*m_xBtnNone);
 break;
 }
 case drawing::FillStyle_SOLID:
@@ -184,7 +193,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
 case drawing::FillStyle_HATCH:
 {
 m_rXFSet.Put( rSet.Get(XATTR_FILLHATCH) );
-m_rXFSet.Put( rSet.Get(XATTR_FILLBACKGROUND) );
+m_rXFSet.Put( rSet.Get(XATTR_FILLUSESLIDEBACKGROUND) );

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

2022-06-08 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/chardlg.cxx |9 -
 cui/uiconfig/ui/charnamepage.ui |9 +
 vcl/source/window/builder.cxx   |9 +
 vcl/source/window/window2.cxx   |7 +++
 4 files changed, 25 insertions(+), 9 deletions(-)

New commits:
commit 6f17d42f251bf4a20b4192c16fa007226dcf17ed
Author: Caolán McNamara 
AuthorDate: Wed Jun 8 11:17:55 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 8 14:22:36 2022 +0200

tdf#119827 implement GtkBuilder "scale" property for font size

and use it for the case in charnamepage

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

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 638643601980..226fe846ee3d 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -258,15 +258,6 @@ SvxCharNamePage::SvxCharNamePage(weld::Container* pPage, 
weld::DialogController*
 else if (!bShowCTL) m_xCJK_CTL->remove_page("nbCTL");
 
 
-// info at 80% font size
-vcl::Font aFont(m_xWestFontTypeFT->get_font());
-Size aSize(aFont.GetFontSize());
-aSize.setHeight(aSize.Height() * 0.8);
-aFont.SetFontSize(aSize);
-m_xWestFontTypeFT->set_font(aFont);
-m_xEastFontTypeFT->set_font(aFont);
-m_xCTLFontTypeFT->set_font(aFont);
-
 //In MacOSX the standard dialogs name font-name, font-style as
 //Family, Typeface
 //In GNOME the standard dialogs name font-name, font-style as
diff --git a/cui/uiconfig/ui/charnamepage.ui b/cui/uiconfig/ui/charnamepage.ui
index c4d3501e696e..54d700ecb094 100644
--- a/cui/uiconfig/ui/charnamepage.ui
+++ b/cui/uiconfig/ui/charnamepage.ui
@@ -309,6 +309,9 @@
 30
 30
 0
+
+  
+
   
   
 1
@@ -582,6 +585,9 @@
 30
 30
 0
+
+  
+
   
   
 1
@@ -830,6 +836,9 @@
 30
 30
 0
+
+  
+
   
   
 1
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index c74d2038192a..d25426cedbe7 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -2491,6 +2491,15 @@ VclPtr VclBuilder::insertObject(vcl::Window 
*pParent, const OString
 else
 BuilderUtils::set_properties(pCurrentChild, rProps);
 
+// tdf#119827 handle size before scale so we can trivially
+// scale on the current font size whether size is present
+// or not.
+VclBuilder::stringmap::iterator aSize = rPango.find(OString("size"));
+if (aSize != rPango.end())
+{
+pCurrentChild->set_font_attribute(aSize->first, aSize->second);
+rPango.erase(aSize);
+}
 for (auto const& elem : rPango)
 {
 const OString &rKey = elem.first;
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index eaa3c4fa7d25..c20dc471120b 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1450,6 +1450,13 @@ bool Window::set_font_attribute(const OString &rKey, 
std::u16string_view rValue)
 aFont.SetUnderline(toBool(rValue) ? LINESTYLE_SINGLE : LINESTYLE_NONE);
 SetControlFont(aFont);
 }
+else if (rKey == "scale")
+{
+// if no control font was set yet, take the underlying font from the 
device
+vcl::Font aFont(IsControlFont() ? GetControlFont() : 
GetPointFont(*GetOutDev()));
+aFont.SetFontHeight(aFont.GetFontHeight() * o3tl::toDouble(rValue));
+SetControlFont(aFont);
+}
 else if (rKey == "size")
 {
 vcl::Font aFont(GetControlFont());


[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svtools include/svx sc/qa sd/qa solenv/sanitizers sw/qa

2022-06-07 Thread Heiko Tietze (via logerrit)
 cui/source/inc/chardlg.hxx|   10 
 cui/source/tabpages/chardlg.cxx   |  140 +-
 cui/uiconfig/ui/charnamepage.ui   | 1554 ++
 include/svtools/ctrlbox.hxx   |4 
 include/svx/langbox.hxx   |5 
 sc/qa/uitest/calc_tests/formatCells.py|   50 
 sc/qa/uitest/calc_tests3/clearCells.py|2 
 sc/qa/uitest/calc_tests8/tdf126248.py |4 
 sd/qa/uitest/impress_tests/tdf127900.py   |2 
 solenv/sanitizers/ui/cui.suppr|   10 
 sw/qa/uitest/findReplace/findReplace.py   |2 
 sw/qa/uitest/findReplace/tdf119462.py |2 
 sw/qa/uitest/table/tdf115572.py   |4 
 sw/qa/uitest/table/tdf115573.py   |8 
 sw/qa/uitest/writer_tests2/formatCharacter.py |   57 
 sw/qa/uitest/writer_tests7/tdf145158.py   |2 
 16 files changed, 783 insertions(+), 1073 deletions(-)

New commits:
commit 196d9e16b7017db2225531cd240e7b6e8f7c1d66
Author: Heiko Tietze 
AuthorDate: Fri May 20 10:35:08 2022 +0200
Commit: Heiko Tietze 
CommitDate: Tue Jun 7 11:11:19 2022 +0200

Resolves tdf#146928 - Redesign charnamedialog

Dialog was changed in d73602dc51aa8829fc88e5e67e2b0c4da6b8f715 to fit
vertical size on small screens by placing Western/CJK/CTL into a notebook.
But for CJK and CTL it's required to have Western fonts visible in parallel.

* dual solution for western with nocjk and cjk dropped
  western scales to the dialog width if no CJK nor CTL is enabled
* CJK and CTL placed in a notebook, Western as well for proper alignment
* font names are presented in lists but size and style per simple dropdowns
* info text sized at 80%
* variables renamed to keep track of controls (old names kept in l10n 
descriotion)
* UITests adjusted for variable names and tab positioning

Change-Id: I45b40e9bc37565f6364f1dfc1b5d837270fe4644
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134666
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 70935a6eaaf6..e61675c1e2c3 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -65,7 +65,7 @@ private:
 
 std::unique_ptr   m_pImpl;
 
-std::unique_ptr m_xWestFrame;
+std::unique_ptr m_xWestern;
 std::unique_ptr m_xWestFontNameFT;
 std::unique_ptr m_xWestFontNameLB;
 std::unique_ptr m_xWestFontStyleFT;
@@ -74,10 +74,10 @@ private:
 std::unique_ptr m_xWestFontSizeLB;
 std::unique_ptr m_xWestFontLanguageFT;
 std::unique_ptr m_xWestFontLanguageLB;
-std::unique_ptr m_xWestFontTypeFT;
 std::unique_ptr m_xWestFontFeaturesButton;
-std::unique_ptr m_xLangNotebook;
+std::unique_ptr m_xWestFontTypeFT;
 
+std::unique_ptr m_xCJK_CTL;
 std::unique_ptr m_xEastFontNameFT;
 std::unique_ptr m_xEastFontNameLB;
 std::unique_ptr m_xEastFontStyleFT;
@@ -86,8 +86,8 @@ private:
 std::unique_ptr m_xEastFontSizeLB;
 std::unique_ptr m_xEastFontLanguageFT;
 std::unique_ptr m_xEastFontLanguageLB;
-std::unique_ptr m_xEastFontTypeFT;
 std::unique_ptr m_xEastFontFeaturesButton;
+std::unique_ptr m_xEastFontTypeFT;
 
 std::unique_ptr m_xCTLFontNameFT;
 std::unique_ptr m_xCTLFontNameLB;
@@ -97,8 +97,8 @@ private:
 std::unique_ptr m_xCTLFontSizeLB;
 std::unique_ptr m_xCTLFontLanguageFT;
 std::unique_ptr m_xCTLFontLanguageLB;
-std::unique_ptr m_xCTLFontTypeFT;
 std::unique_ptr m_xCTLFontFeaturesButton;
+std::unique_ptr m_xCTLFontTypeFT;
 
 //for getting FontFeatures
 ScopedVclPtrInstance m_xVDev;
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 2c2d912ae006..638643601980 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -190,27 +190,40 @@ struct SvxCharNamePage_Impl
 SvxCharNamePage::SvxCharNamePage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rInSet)
 : SvxCharBasePage(pPage, pController, "cui/ui/charnamepage.ui", 
"CharNamePage", rInSet)
 , m_pImpl(new SvxCharNamePage_Impl)
-, m_xLangNotebook(m_xBuilder->weld_notebook("notebook"))
-, m_xEastFontNameFT(m_xBuilder->weld_label("eastfontnameft"))
-, m_xEastFontNameLB(m_xBuilder->weld_combo_box("eastfontnamelb"))
-, m_xEastFontStyleFT(m_xBuilder->weld_label("eaststyleft"))
-, m_xEastFontStyleLB(new 
FontStyleBox(m_xBuilder->weld_combo_box("eaststylelb")))
-, m_xEastFontSizeFT(m_xBuilder->weld_label("eastsizeft"))
-, m_xEastFontSizeLB(new 
FontSizeBox(m_xBuilder->weld_combo_box("eastsizelb")))
-, m_xEastFontLanguageFT(m_xBuilder->weld_label("eastlangft"))
-, m_xEastFontLanguageLB(new 
SvxLanguageBox(m_xBuilder->weld_combo_box("eastlanglb")))
-, m_xEastFontTypeFT(m_xBuilder->weld_label("eastfontinfo"))
-, 
m_xEastFontFeaturesButton(m_xBuilder->weld_bu

[Libreoffice-commits] core.git: cui/source cui/uiconfig editeng/source include/editeng include/unotools include/xmloff offapi/com schema/libreoffice svx/sdi sw/inc sw/qa sw/source xmloff/source

2022-06-02 Thread László Németh (via logerrit)
 cui/source/inc/paragrph.hxx |1 
 cui/source/tabpages/paragrph.cxx|   28 
 cui/uiconfig/ui/textflowpage.ui |   48 
 editeng/source/items/paraitem.cxx   |   43 ++-
 include/editeng/editrids.hrc|5 
 include/editeng/hyphenzoneitem.hxx  |8 +
 include/editeng/memberids.h |1 
 include/unotools/linguprops.hxx |2 
 include/xmloff/xmltoken.hxx |1 
 offapi/com/sun/star/style/ParagraphProperties.idl   |7 +
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |   12 ++
 svx/sdi/svxitems.sdi|1 
 sw/inc/inspectorproperties.hrc  |1 
 sw/inc/unoprnms.hxx |1 
 sw/qa/extras/layout/data/tdf149420.odt  |binary
 sw/qa/extras/layout/layout.cxx  |   15 ++
 sw/qa/extras/odfexport/data/tdf149420.odt   |binary
 sw/qa/extras/odfexport/odfexport.cxx|7 +
 sw/qa/uitest/styleInspector/styleInspector.py   |   20 +--
 sw/qa/uitest/styleInspector/tdf137513.py|2 
 sw/source/core/text/guess.cxx   |   72 +---
 sw/source/core/text/inftxt.cxx  |   18 ++-
 sw/source/core/unocore/unomapproperties.hxx |2 
 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx   |1 
 xmloff/source/core/xmltoken.cxx |1 
 xmloff/source/text/txtprmap.cxx |1 
 xmloff/source/token/tokens.txt  |1 
 27 files changed, 257 insertions(+), 42 deletions(-)

New commits:
commit 7a1d4b7d1db93ca1f541856a8d00d621d50e7bd6
Author: László Németh 
AuthorDate: Wed Jun 1 16:38:28 2022 +0200
Commit: László Németh 
CommitDate: Thu Jun 2 09:57:39 2022 +0200

tdf#149420 sw offapi xmloff: add hyphenation zone

Add hyphenation zone support, i.e. allow the specified
amount of extra space in lines instead of forcing hyphenation.
It's for limiting hyphenation, used especially with
not justified paragraph alignment.

Note: this is an OOXML interoperability feature,
used also in DTP software and CSS.

* Add checkbox to Text Flow in paragraph dialog
* Store property in paragraph model 
(com::sun::star::style::ParagraphProperties::ParaHyphenationZone)
* Add ODF import/export
* Add ODF unit test
* Add layout test

Note: extend SvxHyphenZoneItem::GetPresentation() with
missing No CAPS and No last word hyphenation options.

Note: fix OSL_ENSURE condition in SwTextFormatInfo::GetHyphValues().

Follow-up to commit 29359fc15c435cec17987fd6221ab6833d38746e
"tdf#149324 sw offapi xmloff: add option to not hyphenate short words".

Change-Id: Ib8eff6ea98a9aa5ca6cb9d17faa0bbb789687ce9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135247
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index f0c56775fc2c..3947c14d10c8 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -233,6 +233,7 @@ private:
 std::unique_ptr m_xMaxHyphenLabel;
 std::unique_ptr m_xMaxHyphenEdit;
 std::unique_ptr m_xMinWordLength;
+std::unique_ptr m_xHyphenZone;
 
 // pagebreak
 std::unique_ptr m_xPageBreakBox;
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 2d651fedae6a..3fa77d9fb791 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1356,7 +1356,8 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
  m_xExtHyphenBeforeBox->get_value_changed_from_saved() ||
  m_xExtHyphenAfterBox->get_value_changed_from_saved() ||
  m_xMaxHyphenEdit->get_value_changed_from_saved() ||
- m_xMinWordLength->get_value_changed_from_saved() )
+ m_xMinWordLength->get_value_changed_from_saved() ||
+ m_xHyphenZone->get_value_changed_from_saved() )
 {
 SvxHyphenZoneItem aHyphen(
 static_cast(GetItemSet().Get( _nWhich )) 
);
@@ -1372,6 +1373,11 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
 }
 aHyphen.GetMaxHyphens() = 
static_cast(m_xMaxHyphenEdit->get_value());
 
+SfxItemPool* pPool = GetItemSet().GetPool();
+DBG_ASSERT( pPool, "Where is the pool?" );
+MapUnit eUnit = pPool->GetMetric( _nWhich );
+aHyphen.GetTextHyphenZone() = 
static_cast(m_xHyphenZone->GetCoreValue(eUnit));
+
 if ( !pOld ||
 *static_cast(pOld) != aHyphen ||
  

[Libreoffice-commits] core.git: cui/source cui/uiconfig editeng/source include/editeng include/xmloff offapi/com schema/libreoffice svx/sdi sw/inc sw/qa sw/source xmloff/source

2022-05-26 Thread László Németh (via logerrit)
 cui/source/inc/paragrph.hxx |1 
 cui/source/tabpages/paragrph.cxx|   10 ++
 cui/uiconfig/ui/textflowpage.ui |   41 
 editeng/source/items/paraitem.cxx   |   19 -
 include/editeng/editrids.hrc|1 
 include/editeng/hyphenzoneitem.hxx  |4 +
 include/editeng/memberids.h |1 
 include/xmloff/xmltoken.hxx |1 
 offapi/com/sun/star/style/ParagraphProperties.idl   |5 +
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |   12 +++
 svx/sdi/svxitems.sdi|9 +-
 sw/inc/inspectorproperties.hrc  |1 
 sw/inc/unoprnms.hxx |1 
 sw/qa/extras/layout/data/tdf149324.odt  |binary
 sw/qa/extras/layout/layout.cxx  |   15 
 sw/qa/extras/odfexport/data/tdf149324.odt   |binary
 sw/qa/extras/odfexport/odfexport.cxx|7 ++
 sw/qa/uitest/styleInspector/styleInspector.py   |   20 ++---
 sw/qa/uitest/styleInspector/tdf137513.py|2 
 sw/source/core/text/inftxt.cxx  |   14 ++--
 sw/source/core/unocore/unomapproperties.hxx |2 
 sw/source/uibase/app/docshini.cxx   |1 
 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx   |1 
 xmloff/source/core/xmltoken.cxx |1 
 xmloff/source/text/txtprmap.cxx |1 
 xmloff/source/token/tokens.txt  |1 
 26 files changed, 147 insertions(+), 24 deletions(-)

New commits:
commit 29359fc15c435cec17987fd6221ab6833d38746e
Author: László Németh 
AuthorDate: Thu May 26 19:01:07 2022 +0200
Commit: László Németh 
CommitDate: Thu May 26 20:25:35 2022 +0200

tdf#149324 sw offapi xmloff: add option to not hyphenate short words

Add paragraph property to disable automatic hyphenation of short
words based on a minimum character count.

Note: there is a (broken) global option for Minimum Word Length
at hyphenation, see "Minimal number of characters for hyphenation"
in Tools->Options->Language Settings->Writing Aids), but
for better/comfortable paragraph-level adjustment of typesetting,
add a paragraph property for it. The same option is available e.g.
in Adobe InDesign and in CSS Text Module Level 4 (hyphenate-limit-chars).

* Add checkbox to Text Flow in paragraph dialog
* Store property in paragraph model 
(com::sun::star::style::ParagraphProperties::ParaHyphenationMinWordLength)
* Add ODF import/export
* Add ODF unit test
* Add layout test

Follow-up to commit 8c018910ae4d8701b1ce2a95727b9baed4016da3
"tdf#149248 sw offapi xmloff: add option to not hyphenate last word".

Change-Id: I68715f47d17b5c022430bd0e74c88a97bc7f81f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135028
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 0967c32a060e..f0c56775fc2c 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -232,6 +232,7 @@ private:
 std::unique_ptr m_xExtHyphenAfterBox;
 std::unique_ptr m_xMaxHyphenLabel;
 std::unique_ptr m_xMaxHyphenEdit;
+std::unique_ptr m_xMinWordLength;
 
 // pagebreak
 std::unique_ptr m_xPageBreakBox;
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 29bc2fc76b43..2d651fedae6a 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1355,7 +1355,8 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
  m_xHyphenNoLastWordBox->get_state_changed_from_saved() ||
  m_xExtHyphenBeforeBox->get_value_changed_from_saved() ||
  m_xExtHyphenAfterBox->get_value_changed_from_saved() ||
- m_xMaxHyphenEdit->get_value_changed_from_saved() )
+ m_xMaxHyphenEdit->get_value_changed_from_saved() ||
+ m_xMinWordLength->get_value_changed_from_saved() )
 {
 SvxHyphenZoneItem aHyphen(
 static_cast(GetItemSet().Get( _nWhich )) 
);
@@ -1367,6 +1368,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
 {
 aHyphen.GetMinLead() = 
static_cast(m_xExtHyphenBeforeBox->get_value());
 aHyphen.GetMinTrail() = 
static_cast(m_xExtHyphenAfterBox->get_value());
+aHyphen.GetMinWordLength() = 
static_cast(m_xMinWordLength->get_value());
 }
 aHyphen.GetMaxHyphens() = 
static_cast(m_xMaxHyphenEdit->get_value());
 
@@ -1577,6 +1579,7 @@ void SvxExtParagraphTabPage::Reset( const SfxI

[Libreoffice-commits] core.git: cui/source cui/uiconfig editeng/source include/editeng include/unotools include/xmloff offapi/com schema/libreoffice sw/inc sw/qa sw/source xmloff/source

2022-05-26 Thread László Németh (via logerrit)
 cui/source/inc/paragrph.hxx |1 
 cui/source/tabpages/paragrph.cxx|9 +
 cui/uiconfig/ui/textflowpage.ui |   27 ++-
 editeng/source/editeng/editdoc.cxx  |1 
 editeng/source/editeng/eerdll.cxx   |   99 ++--
 editeng/source/items/paraitem.cxx   |   13 +
 include/editeng/eeitem.hxx  |   25 +--
 include/editeng/hyphenzoneitem.hxx  |3 
 include/editeng/memberids.h |1 
 include/editeng/unotext.hxx |1 
 include/unotools/linguprops.hxx |2 
 include/xmloff/xmltoken.hxx |1 
 offapi/com/sun/star/style/ParagraphProperties.idl   |7 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |9 +
 sw/inc/inspectorproperties.hrc  |1 
 sw/inc/unoprnms.hxx |1 
 sw/qa/extras/layout/data/tdf149248.odt  |binary
 sw/qa/extras/layout/layout.cxx  |   15 +
 sw/qa/extras/odfexport/data/tdf149248.odt   |binary
 sw/qa/extras/odfexport/odfexport.cxx|7 
 sw/qa/uitest/styleInspector/styleInspector.py   |   20 +-
 sw/qa/uitest/styleInspector/tdf137513.py|2 
 sw/source/core/text/guess.cxx   |   23 ++
 sw/source/core/text/inftxt.cxx  |   18 +-
 sw/source/core/unocore/unomapproperties.hxx |2 
 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx   |1 
 xmloff/source/core/xmltoken.cxx |1 
 xmloff/source/text/txtprmap.cxx |1 
 xmloff/source/token/tokens.txt  |1 
 29 files changed, 208 insertions(+), 84 deletions(-)

New commits:
commit 8c018910ae4d8701b1ce2a95727b9baed4016da3
Author: László Németh 
AuthorDate: Thu May 26 09:09:38 2022 +0200
Commit: László Németh 
CommitDate: Thu May 26 16:37:02 2022 +0200

tdf#149248 sw offapi xmloff: add option to not hyphenate last word

Add option to disable automatic hyphenation of the last word of
paragraphs for better typography.

Note: the same option used e.g. in Adobe InDesign, and a
similar one in CSS Text Module Level 4 (hyphenate-limit-last).

* Add checkbox to Text Flow in paragraph dialog
* Store property in paragraph model 
(com::sun::star::style::ParagraphProperties::ParaHyphenationNoLastWord)
* Add ODF import/export
* Add ODF unit test
* Add layout test

Follow-up to commit 72bd0df107ee47c4d54fa88b4960d32ea03e9f69
"tdf#121658 Add option to not hyphenate words in CAPS".

Change-Id: Ida29c65b5a7cbfd7c399c342781531a6fb86f639
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134985
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 73cc5faf32cd..0967c32a060e 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -225,6 +225,7 @@ private:
 // hyphenation
 std::unique_ptr m_xHyphenBox;
 std::unique_ptr m_xHyphenNoCapsBox;
+std::unique_ptr m_xHyphenNoLastWordBox;
 std::unique_ptr m_xBeforeText;
 std::unique_ptr m_xExtHyphenBeforeBox;
 std::unique_ptr m_xAfterText;
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 14a43480caa5..29bc2fc76b43 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1352,6 +1352,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
 
 if ( m_xHyphenBox->get_state_changed_from_saved() ||
  m_xHyphenNoCapsBox->get_state_changed_from_saved() ||
+ m_xHyphenNoLastWordBox->get_state_changed_from_saved() ||
  m_xExtHyphenBeforeBox->get_value_changed_from_saved() ||
  m_xExtHyphenAfterBox->get_value_changed_from_saved() ||
  m_xMaxHyphenEdit->get_value_changed_from_saved() )
@@ -1360,6 +1361,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
 static_cast(GetItemSet().Get( _nWhich )) 
);
 aHyphen.SetHyphen( eHyphenState == TRISTATE_TRUE );
 aHyphen.SetNoCapsHyphenation(m_xHyphenNoCapsBox->get_state() == 
TRISTATE_TRUE);
+aHyphen.SetNoLastWordHyphenation(m_xHyphenNoLastWordBox->get_state() 
== TRISTATE_TRUE);
 
 if ( eHyphenState == TRISTATE_TRUE )
 {
@@ -1570,6 +1572,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* 
rSet )
 bIsHyphen = rHyphen.IsHyphen();
 m_xHyphenBox->set_state(bIsHyphen ? TRISTATE_TRUE : TRISTATE_FALSE);
 m_xHyphenNoCapsBox->set_state(rHyphen.IsN

[Libreoffice-commits] core.git: cui/source cui/uiconfig dbaccess/source include/sfx2 include/svtools sc/source sd/source sfx2/source svtools/source sw/qa sw/source

2022-04-06 Thread Mike Kaganski (via logerrit)
 cui/source/options/opthtml.cxx   |   12 ---
 cui/source/options/opthtml.hxx   |1 
 cui/uiconfig/ui/opthtmlpage.ui   |   45 
 dbaccess/source/ui/misc/TokenWriter.cxx  |6 -
 include/sfx2/frmhtmlw.hxx|7 -
 include/svtools/htmlcfg.hxx  |4 -
 include/svtools/htmlout.hxx  |   19 -
 sc/source/filter/html/htmlexp.cxx|   13 +--
 sc/source/filter/html/htmlexp2.cxx   |2 
 sc/source/filter/inc/htmlexp.hxx |1 
 sd/source/filter/html/htmlex.cxx |4 -
 sfx2/source/bastyp/frmhtmlw.cxx  |   47 +---
 svtools/source/config/htmlcfg.cxx|   24 --
 svtools/source/svhtml/htmlout.cxx|  113 ---
 sw/qa/extras/htmlexport/htmlexport.cxx   |5 -
 sw/source/filter/html/css1atr.cxx|   10 +-
 sw/source/filter/html/htmlatr.cxx|   61 ++--
 sw/source/filter/html/htmlbas.cxx|6 -
 sw/source/filter/html/htmldrawwriter.cxx |2 
 sw/source/filter/html/htmlfldw.cxx   |   22 +++---
 sw/source/filter/html/htmlflywriter.cxx  |   19 +
 sw/source/filter/html/htmlforw.cxx   |   33 -
 sw/source/filter/html/htmlftn.cxx|   20 ++---
 sw/source/filter/html/htmlplug.cxx   |   23 +++---
 sw/source/filter/html/htmltabw.cxx   |4 -
 sw/source/filter/html/wrthtml.cxx|   29 +++
 sw/source/filter/html/wrthtml.hxx|3 
 sw/source/ui/dbui/mmresultdialogs.cxx|2 
 sw/source/uibase/dbui/dbmgr.cxx  |5 -
 sw/source/uibase/uiview/srcview.cxx  |8 --
 30 files changed, 183 insertions(+), 367 deletions(-)

New commits:
commit e4f53484d255f844169957c411dc3e872af7d3bb
Author: Mike Kaganski 
AuthorDate: Wed Apr 6 13:22:26 2022 +0300
Commit: Mike Kaganski 
CommitDate: Wed Apr 6 13:51:42 2022 +0200

tdf#148413: Drop HTML export encoding configuration; use UTF-8

Anything else is just a joke today.

Change-Id: Ie6a0cec1edcd257cbadef702018e6a919e6a0b44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132628
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index 5fb93652b9a9..18e3beceb8ef 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -40,7 +40,6 @@ OfaHtmlTabPage::OfaHtmlTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xStarBasicWarningCB(m_xBuilder->weld_check_button("starbasicwarning"))
 , m_xPrintExtensionCB(m_xBuilder->weld_check_button("printextension"))
 , m_xSaveGrfLocalCB(m_xBuilder->weld_check_button("savegrflocal"))
-, m_xCharSetLB(new 
SvxTextEncodingBox(m_xBuilder->weld_combo_box("charset")))
 {
 // replace placeholder with UI string from language list
 OUString aText(m_xNumbersEnglishUSCB->get_label());
@@ -57,9 +56,6 @@ OfaHtmlTabPage::OfaHtmlTabPage(weld::Container* pPage, 
weld::DialogController* p
 }
 
 m_xStarBasicCB->connect_toggled(LINK(this, OfaHtmlTabPage, 
CheckBoxHdl_Impl));
-
-// initialize the characterset listbox
-m_xCharSetLB->FillWithMimeAndSelectBest();
 }
 
 OfaHtmlTabPage::~OfaHtmlTabPage()
@@ -125,10 +121,6 @@ bool OfaHtmlTabPage::FillItemSet( SfxItemSet* )
 officecfg::Office::Common::Filter::HTML::Export::PrintLayout::set(
 m_xPrintExtensionCB->get_active(), xChanges);
 
-if( m_xCharSetLB->GetSelectTextEncoding() != 
SvxHtmlOptions::GetTextEncoding() )
-officecfg::Office::Common::Filter::HTML::Export::Encoding::set(
-m_xCharSetLB->GetSelectTextEncoding(), xChanges );
-
 xChanges->commit();
 return false;
 }
@@ -166,10 +158,6 @@ void OfaHtmlTabPage::Reset( const SfxItemSet* )
 m_xNumbersEnglishUSCB->save_state();
 m_xUnknownTagCB->save_state();
 m_xIgnoreFontNamesCB->save_state();
-
-if( !SvxHtmlOptions::IsDefaultTextEncoding() &&
-m_xCharSetLB->GetSelectTextEncoding() != 
SvxHtmlOptions::GetTextEncoding() )
-m_xCharSetLB->SelectTextEncoding( SvxHtmlOptions::GetTextEncoding() );
 }
 
 IMPL_LINK(OfaHtmlTabPage, CheckBoxHdl_Impl, weld::Toggleable&, rBox, void)
diff --git a/cui/source/options/opthtml.hxx b/cui/source/options/opthtml.hxx
index 4fdb9d754451..33bff167b87a 100644
--- a/cui/source/options/opthtml.hxx
+++ b/cui/source/options/opthtml.hxx
@@ -40,7 +40,6 @@ class OfaHtmlTabPage : public SfxTabPage
 std::unique_ptr m_xStarBasicWarningCB;
 std::unique_ptr m_xPrintExtensionCB;
 std::unique_ptr m_xSaveGrfLocalCB;
-std::unique_ptr m_xCharSetLB;
 
 DECL_LINK(CheckBoxHdl_Impl, weld::Toggleable&, void);
 
diff --git a/cui/uiconfig/ui/opthtmlpage.ui b/cui/uiconfig/ui/opthtmlpage.ui
index ac45186681b1..e8e9e68c2819 100644
--- a/cui/uiconfig/ui/opthtmlpage.ui
+++ b/cui/uiconfig/ui/opthtmlpage.ui
@@ -433,51 +433,6 @@
 6
 12
 6
-
-  
- 

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svtools officecfg/registry sc/source svtools/source

2022-01-27 Thread Heiko Tietze (via logerrit)
 cui/source/options/optcolor.cxx|1 
 cui/uiconfig/ui/colorconfigwin.ui  |   77 +
 include/svtools/colorcfg.hxx   |1 
 officecfg/registry/data/org/openoffice/Office/UI.xcu   |   16 +++
 officecfg/registry/schema/org/openoffice/Office/UI.xcs |   16 +++
 sc/source/ui/inc/gridwin.hxx   |1 
 sc/source/ui/view/gridwin4.cxx |   38 
 svtools/source/config/colorcfg.cxx |2 
 8 files changed, 135 insertions(+), 17 deletions(-)

New commits:
commit ba0100be03c6bbc5ae10201bae340b3f7b7c4500
Author: Heiko Tietze 
AuthorDate: Tue Jan 18 12:20:57 2022 +0100
Commit: Heiko Tietze 
CommitDate: Thu Jan 27 10:31:52 2022 +0100

Resolves tdf#128258 - Draw a dotted line before hidden columns/rows

Color and on/off configurable via Tools > Options > Application Colors

Change-Id: Ia4b1e1c86f36d1b0f508a5b3e866a79418f16c5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128553
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 81030a79e9c8..0bf654b3e031 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -127,6 +127,7 @@ const vEntryInfo[] =
 { Group_Calc,IDS(brk) },
 { Group_Calc,IDS(brkmanual) },
 { Group_Calc,IDS(brkauto) },
+{ Group_Calc,IDS_CB(hiddencolrow) },
 { Group_Calc,IDS(det) },
 { Group_Calc,IDS(deterror) },
 { Group_Calc,IDS(ref) },
diff --git a/cui/uiconfig/ui/colorconfigwin.ui 
b/cui/uiconfig/ui/colorconfigwin.ui
index c25ddba4cf7d..319ac0e483ec 100644
--- a/cui/uiconfig/ui/colorconfigwin.ui
+++ b/cui/uiconfig/ui/colorconfigwin.ui
@@ -795,7 +795,7 @@
 0
 none
 
-  
+  
   
 True
 False
@@ -944,7 +944,7 @@
   
   
 0
-4
+5
   
 
 
@@ -961,7 +961,7 @@
   
   
 1
-4
+5
   
 
 
@@ -978,7 +978,7 @@
   
   
 1
-5
+6
   
 
 
@@ -993,7 +993,7 @@
   
   
 0
-5
+6
   
 
 
@@ -1010,7 +1010,7 @@
   
   
 1
-6
+7
   
 
 
@@ -1025,7 +1025,7 @@
   
   
 0
-6
+7
   
 
 
@@ -1042,7 +1042,7 @@
   
   
 1
-7
+8
   
 
 
@@ -1057,7 +1057,7 @@
   
   
 0
-7
+8
   
 
 
@@ -1074,7 +1074,7 @@
   
   
 1
-8
+9
   
 
 
@@ -1089,7 +1089,7 @@
   
   
 0
-8
+9
   
 
 
@@ -1106,7 +1106,7 @@
   
   
 1
-9
+10
   
 
 
@@ -1121,7 +1121,7 @@
   
   
 0
-9
+10
   
 
 
@@ -1138,7 +1138,7 @@
   
   
 1
-10
+11
   
 
 
@@ -1153,7 +1153,7 @@
   
   
 0
-10
+11
   
 
 
@@ -1170,7 +1170,7 @@
   
   
 1
-11
+12
   
 
 
@@ -1185,7 +1185,50 @@
   
   
 0
-11
+12
+  
+
+
+  
+Hidden columns/rows
+True
+True
+False
+start
+center
+True
+
+  
+
+  
+  
+0
+4
+  
+
+
+  
+True
+True
+False
+end
+True
+
+
+  
+   

[Libreoffice-commits] core.git: cui/source cui/uiconfig sc/qa sw/qa sw/uiconfig

2022-01-15 Thread Heiko Tietze (via logerrit)
 cui/source/inc/chardlg.hxx|3 
 cui/source/tabpages/chardlg.cxx   |9 
 cui/uiconfig/ui/charnamepage.ui   | 1240 --
 cui/uiconfig/ui/effectspage.ui|   25 
 sc/qa/uitest/calc_tests/formatCells.py|4 
 sw/qa/uitest/writer_tests2/formatCharacter.py |5 
 sw/uiconfig/swriter/ui/characterproperties.ui |1 
 sw/uiconfig/swriter/ui/paradialog.ui  |1 
 sw/uiconfig/swriter/ui/templatedialog1.ui |1 
 sw/uiconfig/swriter/ui/templatedialog16.ui|1 
 sw/uiconfig/swriter/ui/templatedialog2.ui |1 
 sw/uiconfig/swriter/ui/templatedialog4.ui |1 
 sw/uiconfig/swriter/ui/templatedialog8.ui |1 
 13 files changed, 615 insertions(+), 678 deletions(-)

New commits:
commit d73602dc51aa8829fc88e5e67e2b0c4da6b8f715
Author: Heiko Tietze 
AuthorDate: Fri Nov 26 16:38:35 2021 +0100
Commit: Heiko Tietze 
CommitDate: Sat Jan 15 13:29:35 2022 +0100

Resolves tdf#139395 - Redesign of font name and effects pages

* Western/CJK/CTL selection placed into a GtkNotebook
* Font color and transparency in one line
* Alignment adjusted at font effects page
* Char-, para- & style dialogs made non-resizable according the guideline

Change-Id: I242c3886534a2696b4c2438ca17e6e778c2c3991
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125909
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index be4db989b57d..70935a6eaaf6 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -76,8 +76,8 @@ private:
 std::unique_ptr m_xWestFontLanguageLB;
 std::unique_ptr m_xWestFontTypeFT;
 std::unique_ptr m_xWestFontFeaturesButton;
+std::unique_ptr m_xLangNotebook;
 
-std::unique_ptr m_xEastFrame;
 std::unique_ptr m_xEastFontNameFT;
 std::unique_ptr m_xEastFontNameLB;
 std::unique_ptr m_xEastFontStyleFT;
@@ -89,7 +89,6 @@ private:
 std::unique_ptr m_xEastFontTypeFT;
 std::unique_ptr m_xEastFontFeaturesButton;
 
-std::unique_ptr m_xCTLFrame;
 std::unique_ptr m_xCTLFontNameFT;
 std::unique_ptr m_xCTLFontNameLB;
 std::unique_ptr m_xCTLFontStyleFT;
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 4c190180e8c2..86e29f9d16c0 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -189,7 +189,7 @@ struct SvxCharNamePage_Impl
 SvxCharNamePage::SvxCharNamePage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rInSet)
 : SvxCharBasePage(pPage, pController, "cui/ui/charnamepage.ui", 
"CharNamePage", rInSet)
 , m_pImpl(new SvxCharNamePage_Impl)
-, m_xEastFrame(m_xBuilder->weld_widget("asian"))
+, m_xLangNotebook(m_xBuilder->weld_notebook("notebook"))
 , m_xEastFontNameFT(m_xBuilder->weld_label("eastfontnameft"))
 , m_xEastFontNameLB(m_xBuilder->weld_combo_box("eastfontnamelb"))
 , m_xEastFontStyleFT(m_xBuilder->weld_label("eaststyleft"))
@@ -200,7 +200,6 @@ SvxCharNamePage::SvxCharNamePage(weld::Container* pPage, 
weld::DialogController*
 , m_xEastFontLanguageLB(new 
SvxLanguageBox(m_xBuilder->weld_combo_box("eastlanglb")))
 , m_xEastFontTypeFT(m_xBuilder->weld_label("eastfontinfo"))
 , 
m_xEastFontFeaturesButton(m_xBuilder->weld_button("east_features_button"))
-, m_xCTLFrame(m_xBuilder->weld_widget("ctl"))
 , m_xCTLFontNameFT(m_xBuilder->weld_label("ctlfontnameft"))
 , m_xCTLFontNameLB(m_xBuilder->weld_combo_box("ctlfontnamelb"))
 , m_xCTLFontStyleFT(m_xBuilder->weld_label("ctlstyleft"))
@@ -293,8 +292,10 @@ SvxCharNamePage::SvxCharNamePage(weld::Container* pPage, 
weld::DialogController*
 m_xCTLFontStyleFT->set_label(sFontStyleString);
 
 m_xWestFrame->show();
-m_xEastFrame->set_visible(bShowCJK);
-m_xCTLFrame->set_visible(bShowCTL);
+if (!bShowCJK)
+m_xLangNotebook->remove_page("lbAsian");
+if (!bShowCTL)
+m_xLangNotebook->remove_page("lbComplex");
 
 m_xWestFontLanguageLB->SetLanguageList(SvxLanguageListFlags::WESTERN, 
true, false, true, true,
LANGUAGE_SYSTEM, 
css::i18n::ScriptType::LATIN);
diff --git a/cui/uiconfig/ui/charnamepage.ui b/cui/uiconfig/ui/charnamepage.ui
index 61f6a6be9289..27be5657a856 100644
--- a/cui/uiconfig/ui/charnamepage.ui
+++ b/cui/uiconfig/ui/charnamepage.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -68,69 +68,73 @@
   
   
 True
-False
+False
 True
 True
-6
+6
 vertical
 12
 
-  
+  
   
-False
-True
+False
+True
+6
+6
+6
+6
 True
 True
-6
-12
+6
+12
 
   
 True
-False
-6
+False
+6
 0
   
   
-   

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

2022-01-07 Thread Caolán McNamara (via logerrit)
 cui/source/options/optcolor.cxx  |   60 +--
 cui/source/options/optcolor.hxx  |5 ++
 cui/uiconfig/ui/colorconfigwin.ui|1 
 cui/uiconfig/ui/optappearancepage.ui |4 --
 4 files changed, 44 insertions(+), 26 deletions(-)

New commits:
commit 7df337b3636f9df9bf05d7f493e6c89e43c3f5ca
Author: Caolán McNamara 
AuthorDate: Thu Jan 6 14:21:38 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 7 14:53:35 2022 +0100

tdf#146423 don't set a size-request during a size-alloc

and use a better width calculation

Change-Id: Ib873a8ed9e6424c09630650af352ba5a20c674b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128051
Reviewed-by: Kevin Suo 
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 3a180621fa21..81030a79e9c8 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -188,7 +188,10 @@ public:
 return *m_xBox;
 }
 
-void AdjustExtraWidths(int nTextWidth);
+int GetLabelIndent() const
+{
+return m_nCheckBoxLabelOffset;
+}
 
 private:
 // Chapter -- horizontal group separator stripe with text
@@ -207,10 +210,9 @@ private:
 {
 public:
 Entry(weld::Window* pTopLevel, weld::Builder& rBuilder, const char* 
pTextWidget, const char* pColorWidget,
-  const Color& rColor, tools::Long nCheckBoxLabelOffset, bool 
bCheckBox, bool bShow);
+  const Color& rColor, int nCheckBoxLabelOffset, bool bCheckBox, 
bool bShow);
 public:
 void SetText(const OUString& rLabel) { 
dynamic_cast(*m_xText).set_label(rLabel); }
-void set_width_request(int nTextWidth) { 
m_xText->set_size_request(nTextWidth, -1); }
 int get_height_request() const
 {
 return std::max(m_xText->get_preferred_size().Height(),
@@ -239,6 +241,7 @@ private:
 
 private:
 weld::Window* m_pTopLevel;
+int m_nCheckBoxLabelOffset;
 std::unique_ptr m_xBuilder;
 std::unique_ptr m_xBox;
 std::unique_ptr m_xWidget1;
@@ -280,7 +283,7 @@ ColorConfigWindow_Impl::Chapter::Chapter(weld::Builder& 
rBuilder, const char* pL
 ColorConfigWindow_Impl::Entry::Entry(weld::Window* pTopLevel, weld::Builder& 
rBuilder,
  const char* pTextWidget, const char* 
pColorWidget,
  const Color& rColor,
- tools::Long nCheckBoxLabelOffset, bool 
bCheckBox, bool bShow)
+ int nCheckBoxLabelOffset, bool bCheckBox, 
bool bShow)
 : m_xColorList(new ColorListBox(rBuilder.weld_menu_button(pColorWidget), 
[pTopLevel]{ return pTopLevel; }))
 , m_aDefaultColor(rColor)
 {
@@ -365,8 +368,8 @@ 
ColorConfigWindow_Impl::ColorConfigWindow_Impl(weld::Window* pTopLevel, weld::Co
 : m_pTopLevel(pTopLevel)
 , m_xBuilder(Application::CreateBuilder(pParent, 
"cui/ui/colorconfigwin.ui"))
 , m_xBox(m_xBuilder->weld_box("ColorConfigWindow"))
-, m_xWidget1(m_xBuilder->weld_widget("doccolor"))
-, m_xWidget2(m_xBuilder->weld_widget("doccolor_lb"))
+, m_xWidget1(m_xBuilder->weld_widget("docboundaries"))
+, m_xWidget2(m_xBuilder->weld_widget("docboundaries_lb"))
 {
 CreateEntries();
 }
@@ -384,9 +387,8 @@ void ColorConfigWindow_Impl::CreateEntries()
 
 // Here we want to get the amount to add to the position of a FixedText to
 // get it to align its contents with that of a CheckBox
-tools::Long nCheckBoxLabelOffset = 0;
 {
-OUString sSampleText("X");
+OUString sSampleText("XX");
 std::unique_ptr 
xCheckBox(m_xBuilder->weld_check_button("docboundaries"));
 std::unique_ptr 
xFixedText(m_xBuilder->weld_label("doccolor"));
 OUString sOrigCheck(xCheckBox->get_label());
@@ -397,7 +399,7 @@ void ColorConfigWindow_Impl::CreateEntries()
 Size aFixedSize(xFixedText->get_preferred_size());
 xCheckBox->set_label(sOrigCheck);
 xFixedText->set_label(sOrigFixed);
-nCheckBoxLabelOffset = aCheckSize.Width() - aFixedSize.Width();
+m_nCheckBoxLabelOffset = aCheckSize.Width() - aFixedSize.Width();
 }
 
 // creating entries
@@ -407,7 +409,7 @@ void ColorConfigWindow_Impl::CreateEntries()
 vEntries.push_back(std::make_shared(m_pTopLevel, *m_xBuilder,
 vEntryInfo[i].pText, vEntryInfo[i].pColor,
 ColorConfig::GetDefaultColor(static_cast(i)),
-nCheckBoxLabelOffset,
+m_nCheckBoxLabelOffset,
 vEntryInfo[i].bCheckBox,
 aModulesInstalled[vEntryInfo[i].eGroup]));
 }
@@ -441,18 +443,12 @@ void ColorConfigWindow_Impl::CreateEntries()
 aExtConfig.GetComponentColorConfigValue(sComponentName, i);
 vEntries.push_back(std::make_shared(m_pTopLevel, 
*vExtBuilders.back(),
 "label", "button", aColorE

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

2021-11-09 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/inc/border.hxx  |1 
 cui/source/tabpages/border.cxx |7 
 cui/uiconfig/ui/borderpage.ui  |   59 +++--
 3 files changed, 34 insertions(+), 33 deletions(-)

New commits:
commit 3746379f251091696b73463f7b27e8ef732dd20b
Author: Samuel Mehrbrodt 
AuthorDate: Tue Nov 9 08:47:02 2021 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Nov 9 10:12:27 2021 +0100

tdf#48622 Fix layout issue when "Custom" was selected

Change-Id: Ie32a763b88cfc26b61d942214b16e008179d410c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124898
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 433ab7425e5c..2a3d14ed5062 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -129,7 +129,6 @@ private:
 
 std::unique_ptr m_xLbLineStyle;
 std::unique_ptr m_xLbLineColor;
-std::unique_ptr m_xLineWidthGroup;
 std::unique_ptr m_xLineWidthLB;
 std::unique_ptr m_xLineWidthMF;
 
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 0203cc7de375..3f6d0fe7b2d4 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -310,7 +310,6 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, 
weld::DialogControlle
 , m_xLbLineStyle(new 
SvtLineListBox(m_xBuilder->weld_menu_button("linestylelb")))
 , m_xLbLineColor(new 
ColorListBox(m_xBuilder->weld_menu_button("linecolorlb"),
 [this]{ return GetDialogController()->getDialog(); }))
-, m_xLineWidthGroup(m_xBuilder->weld_widget("gridlinewidth"))
 , m_xLineWidthLB(m_xBuilder->weld_combo_box("linewidthlb"))
 , m_xLineWidthMF(m_xBuilder->weld_metric_spin_button("linewidthmf", 
FieldUnit::POINT))
 , m_xSpacingFrame(m_xBuilder->weld_container("spacing"))
@@ -541,12 +540,6 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, 
weld::DialogControlle
 m_xWndPresets->SetSelectHdl( LINK( this, SvxBorderTabPage, SelPreHdl_Impl 
) );
 m_xWndShadows->SetSelectHdl( LINK( this, SvxBorderTabPage, SelSdwHdl_Impl 
) );
 
-// lock the group to its original width where both widgets are shown so the
-// notebook page contents don't jump around when the spinbox is
-// hidden/shown
-Size aOrigGroupSize(m_xLineWidthGroup->get_preferred_size());
-m_xLineWidthGroup->set_size_request(aOrigGroupSize.Width(), -1);
-
 FillValueSets();
 FillLineListBox_Impl();
 
diff --git a/cui/uiconfig/ui/borderpage.ui b/cui/uiconfig/ui/borderpage.ui
index b629cb0c88dd..91fd315ce14e 100644
--- a/cui/uiconfig/ui/borderpage.ui
+++ b/cui/uiconfig/ui/borderpage.ui
@@ -211,8 +211,11 @@
 False
 _Width:
 True
-linewidthmf
 0
+
+  
+  
+
   
   
 0
@@ -250,12 +253,25 @@
   
 
 
-  
-  
+  
+True
+True
+False
+0
+True
+
+  
+
+  
+  
+1
+1
+  
+
+
+  
 True
 False
-start
-6
 
   
 True
@@ -270,25 +286,34 @@
   Extra thick
   Custom
 
+
+  
+
   
   
-0
-0
+False
+True
+0
   
 
 
   
 True
 True
+True
 True
 True
 adjustment1
 2
 0.05
+
+  
+
   
   
-1
-0
+False
+True
+1
   
 
   
@@ -297,22 +322,6 @@
 2
   
 
-
-  
-True
-True
-False
-0
-True
-
-  
-
-  
-  
-1
-1
-  
-
   
 
 


[Libreoffice-commits] core.git: cui/source cui/uiconfig editeng/source include/editeng sc/source svx/source sw/source

2021-11-04 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/tabpages/border.cxx   |   18 +-
 cui/uiconfig/ui/borderpage.ui|3 +
 editeng/source/rtf/rtfitem.cxx   |4 -
 include/editeng/borderline.hxx   |   23 ---
 sc/source/core/data/stlpool.cxx  |2 
 sc/source/core/tool/autoform.cxx |2 
 sc/source/filter/html/htmlpars.cxx   |4 -
 sc/source/filter/lotus/lotattr.cxx   |6 +-
 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx |   18 +++---
 sc/source/ui/sidebar/CellBorderStyleControl.cxx  |   12 ++--
 sc/source/ui/sidebar/CellLineStyleControl.cxx|   57 +--
 svx/source/tbxctrls/tbcontrl.cxx |   10 +--
 sw/source/core/doc/DocumentStylePoolManager.cxx  |2 
 sw/source/core/doc/tblafmt.cxx   |2 
 sw/source/core/docnode/ndtbl.cxx |3 -
 sw/source/core/edit/autofmt.cxx  |   24 
 sw/source/filter/html/htmltab.cxx|8 --
 sw/source/filter/html/htmltabw.cxx   |4 -
 sw/source/filter/html/svxcss1.cxx|7 +-
 sw/source/filter/html/swhtml.cxx |4 -
 sw/source/filter/ww8/rtfattributeoutput.cxx  |2 
 sw/source/filter/ww8/ww8atr.cxx  |2 
 sw/source/filter/xml/xmlithlp.cxx|9 +--
 sw/source/uibase/shells/frmsh.cxx|2 
 sw/source/uibase/shells/tabsh.cxx|2 
 25 files changed, 123 insertions(+), 107 deletions(-)

New commits:
commit 41b99644e8913dd4797775f4931382e93fa12a00
Author: Samuel Mehrbrodt 
AuthorDate: Mon Sep 27 11:59:54 2021 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 4 09:07:54 2021 +0100

tdf#48622 Add new border line width defaults

* Hairline (0.05pt)
* Very thin (0.5pt)
* Thin (0.75pt)
* Medium (1.5pt)
* Thick (2.25pt)
* Extra thick (4.5pt)

This unifies the default border line widths throughout the program.

Users can still set any line width they want by chosing "Custom" in the 
"Border" tabpage.

Also, existing documents won't be changed. The new defaults are just for 
newly added borders.

Change-Id: I7af85dc189a688a749812824508c33c7814b50f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122683
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 0cef50e3779a..0203cc7de375 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -77,7 +77,23 @@ const WhichRangesContainer SvxBorderTabPage::pRanges(
 SID_SW_COLLAPSING_BORDERS,  SID_SW_COLLAPSING_BORDERS,
 SID_ATTR_BORDER_DIAG_TLBR,  SID_ATTR_BORDER_DIAG_BLTR>);
 
-const std::vector SvxBorderTabPage::m_aLineWidths = { 75, 200, 400, -1 };
+namespace
+{
+int lcl_twipsToPt(sal_Int64 nTwips)
+{
+return vcl::ConvertDoubleValue(nTwips, 0, FieldUnit::TWIP, 
MapUnit::MapPoint) * 100;
+}
+}
+
+const std::vector SvxBorderTabPage::m_aLineWidths = {
+lcl_twipsToPt(SvxBorderLineWidth::Hairline),
+lcl_twipsToPt(SvxBorderLineWidth::VeryThin),
+lcl_twipsToPt(SvxBorderLineWidth::Thin),
+lcl_twipsToPt(SvxBorderLineWidth::Medium),
+lcl_twipsToPt(SvxBorderLineWidth::Thick),
+lcl_twipsToPt(SvxBorderLineWidth::ExtraThick),
+-1
+};
 
 static void lcl_SetDecimalDigitsTo1(weld::MetricSpinButton& rField)
 {
diff --git a/cui/uiconfig/ui/borderpage.ui b/cui/uiconfig/ui/borderpage.ui
index d748cd1ca395..5dde291c691d 100644
--- a/cui/uiconfig/ui/borderpage.ui
+++ b/cui/uiconfig/ui/borderpage.ui
@@ -266,9 +266,12 @@
 False
 False
 
+  Hairline
+  Very thin
   Thin
   Medium
   Thick
+  Extra thick
   Custom
 
   
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 2f7f2fde29de..36e9bd16836e 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -1350,7 +1350,7 @@ void SvxRTFParser::ReadBorderAttr( int nToken, 
SfxItemSet& rSet,
 aAttr.reset(static_cast(pItem->Clone()));
 }
 
-SvxBorderLine aBrd( nullptr, DEF_LINE_WIDTH_0 );  // Simple plain line
+SvxBorderLine aBrd( nullptr, SvxBorderLineWidth::Hairline );
 bool bContinue = true;
 int nBorderTyp = 0;
 
@@ -1418,7 +1418,7 @@ void SvxRTFParser::ReadBorderAttr( int nToken, 
SfxItemSet& rSet,
 case RTF_BRDRHAIR:  // hairline border
 {
 aBrd.SetBorderLineStyle( SvxBorderLineStyle::SOLID);
-aBrd.SetWidth( DEF_LINE_WIDTH_0 );
+aBrd.SetWidth( SvxBorderLineWid

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/editeng include/svx include/xmloff offapi/com offapi/type_reference offapi/UnoApi_offapi.mk officecfg/registry schema/libreoffice sc/qa

2021-10-29 Thread homeboy445 (via logerrit)
 cui/source/dialogs/QrCodeGenDialog.cxx   |   68 
++
 cui/source/inc/QrCodeGenDialog.hxx   |1 
 cui/uiconfig/ui/qrcodegen.ui |   43 
+-
 include/editeng/unoprnms.hxx |2 
 include/svx/svdograf.hxx |   12 -
 include/svx/unoshprp.hxx |4 
 include/xmloff/xmltoken.hxx  |1 
 offapi/UnoApi_offapi.mk  |4 
 offapi/com/sun/star/drawing/BarCode.idl  |   26 ++-
 offapi/com/sun/star/drawing/BarCodeErrorCorrection.idl   |   16 +-
 offapi/com/sun/star/drawing/GraphicObjectShape.idl   |4 
 offapi/type_reference/offapi.idl |7 -
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |4 
 sc/qa/uitest/calc_tests3/insertQrCodeGen.py  |   12 -
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng  |3 
 svx/source/svdraw/svdograf.cxx   |6 
 svx/source/unodraw/unoshap2.cxx  |   10 -
 sw/qa/extras/odfexport/data/qrcode-properties.odt|binary
 sw/qa/extras/odfexport/odfexport.cxx |   14 +-
 sw/qa/uitest/writer_tests3/insertQrCodeGen.py|   12 -
 xmloff/source/core/xmltoken.cxx  |1 
 xmloff/source/draw/QRCodeContext.cxx |   27 ++-
 xmloff/source/draw/shapeexport.cxx   |   27 ++-
 xmloff/source/token/tokens.txt   |1 
 24 files changed, 190 insertions(+), 115 deletions(-)

New commits:
commit d37a44a9ebdafec1435f98194417a1d8cc8208b5
Author: homeboy445 
AuthorDate: Mon Apr 12 20:31:05 2021 +0530
Commit: Ilmari Lauhakangas 
CommitDate: Fri Oct 29 13:46:12 2021 +0200

tdf#141193 Added support for bar codes in qrcode dialog box[API Change].

Change-Id: I6b79ece1d5419ef92b76755d3bd921a64d6e38fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113989
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
index d2a0f42878ff..271d14999cbf 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -43,8 +43,8 @@
 #include 
 #include 
 #include 
-#include 
-#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -100,29 +100,40 @@ OString ConvertToSVGFormat(const ZXing::BitMatrix& 
bitmatrix)
 return sb.toString();
 }
 
-OString GenerateQRCode(std::u16string_view aQRText, tools::Long aQRECC, int 
aQRBorder)
+std::string GetBarCodeType(const int& type)
+{
+switch (type)
+{
+case 1:
+return "CODE_128";
+default:
+return "QR_CODE";
+}
+}
+
+OString GenerateQRCode(std::u16string_view aQRText, tools::Long aQRECC, int 
aQRBorder, int aQRType)
 {
 // Associated ZXing error correction levels (0-8) to our constants 
arbitrarily.
 int bqrEcc = 1;
 
 switch (aQRECC)
 {
-case css::drawing::QRCodeErrorCorrection::LOW:
+case css::drawing::BarCodeErrorCorrection::LOW:
 {
 bqrEcc = 1;
 break;
 }
-case css::drawing::QRCodeErrorCorrection::MEDIUM:
+case css::drawing::BarCodeErrorCorrection::MEDIUM:
 {
 bqrEcc = 3;
 break;
 }
-case css::drawing::QRCodeErrorCorrection::QUARTILE:
+case css::drawing::BarCodeErrorCorrection::QUARTILE:
 {
 bqrEcc = 5;
 break;
 }
-case css::drawing::QRCodeErrorCorrection::HIGH:
+case css::drawing::BarCodeErrorCorrection::HIGH:
 {
 bqrEcc = 7;
 break;
@@ -131,7 +142,7 @@ OString GenerateQRCode(std::u16string_view aQRText, 
tools::Long aQRECC, int aQRB
 
 OString o = OUStringToOString(aQRText, RTL_TEXTENCODING_UTF8);
 std::string QRText(o.getStr(), o.getLength());
-ZXing::BarcodeFormat format = ZXing::BarcodeFormatFromString("QR_CODE");
+ZXing::BarcodeFormat format = 
ZXing::BarcodeFormatFromString(GetBarCodeType(aQRType));
 auto writer = 
ZXing::MultiFormatWriter(format).setMargin(aQRBorder).setEccLevel(bqrEcc);
 writer.setEncoding(ZXing::CharacterSet::UTF8);
 ZXing::BitMatrix bitmatrix = 
writer.encode(ZXing::TextUtfEncoding::FromUtf8(QRText), 0, 0);
@@ -151,6 +162,7 @@ QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, 
Reference xModel
   m_xBuilder->weld_radio_button("button_quartile"),
   m_xBuil

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

2021-09-27 Thread Vasily Melenchuk (via logerrit)
 cui/source/inc/border.hxx  |6 -
 cui/source/tabpages/border.cxx |   48 -
 cui/uiconfig/ui/borderpage.ui  |   44 ++---
 3 files changed, 84 insertions(+), 14 deletions(-)

New commits:
commit 089c7d05fde13251eb8cd8daaf7627b6bb0072f9
Author: Vasily Melenchuk 
AuthorDate: Tue Apr 27 13:34:23 2021 +0300
Commit: Samuel Mehrbrodt 
CommitDate: Mon Sep 27 17:15:00 2021 +0200

tdf#48622 add border line thickness predefined values in UI

According to multiple reports border line width selection will be
more intuitive with some predefined values. Here is an implementation
of this proposal: line width can be selected from combobox from
predefined values (thin, medium, thick and custom). Classical spinner
is right now hidden unless custom line width is selected.

Change-Id: I87a6237335b79a5f5b63e109360e1ea8f12ae071
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114709
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index d863650ee52f..2a3d14ed5062 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -77,6 +77,7 @@ private:
 class SvxBorderTabPage : public SfxTabPage
 {
 static const WhichRangesContainer pRanges;
+static const std::vector m_aLineWidths;
 
 public:
 SvxBorderTabPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rCoreAttrs);
@@ -128,6 +129,7 @@ private:
 
 std::unique_ptr m_xLbLineStyle;
 std::unique_ptr m_xLbLineColor;
+std::unique_ptr m_xLineWidthLB;
 std::unique_ptr m_xLineWidthMF;
 
 std::unique_ptr m_xSpacingFrame;
@@ -165,7 +167,8 @@ private:
 DECL_LINK(SelSdwHdl_Impl, ValueSet*, void);
 DECL_LINK(LinesChanged_Impl, LinkParamNone*, void);
 DECL_LINK(ModifyDistanceHdl_Impl, weld::MetricSpinButton&, void);
-DECL_LINK(ModifyWidthHdl_Impl, weld::MetricSpinButton&, void);
+DECL_LINK(ModifyWidthLBHdl_Impl, weld::ComboBox&, void);
+DECL_LINK(ModifyWidthMFHdl_Impl, weld::MetricSpinButton&, void);
 DECL_LINK(SyncHdl_Impl, weld::Toggleable&, void);
 DECL_LINK(RemoveAdjacentCellBorderHdl_Impl, weld::Toggleable&, void);
 
@@ -175,6 +178,7 @@ private:
 voidFillPresetVS();
 voidFillShadowVS();
 voidFillValueSets();
+voidSetLineWidth(sal_Int64 nWidth);
 
 // Filler
 voidFillLineListBox_Impl();
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index c0adea646e35..70ec64c1a3bc 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -77,6 +77,8 @@ const WhichRangesContainer SvxBorderTabPage::pRanges(
 SID_SW_COLLAPSING_BORDERS,  SID_SW_COLLAPSING_BORDERS,
 SID_ATTR_BORDER_DIAG_TLBR,  SID_ATTR_BORDER_DIAG_BLTR>);
 
+const std::vector SvxBorderTabPage::m_aLineWidths = { 75, 200, 400, -1 };
+
 static void lcl_SetDecimalDigitsTo1(weld::MetricSpinButton& rField)
 {
 auto nMin = rField.denormalize(rField.get_min(FieldUnit::TWIP));
@@ -292,6 +294,7 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, 
weld::DialogControlle
 , m_xLbLineStyle(new 
SvtLineListBox(m_xBuilder->weld_menu_button("linestylelb")))
 , m_xLbLineColor(new 
ColorListBox(m_xBuilder->weld_menu_button("linecolorlb"),
 [this]{ return GetDialogController()->getDialog(); }))
+, m_xLineWidthLB(m_xBuilder->weld_combo_box("linewidthlb"))
 , m_xLineWidthMF(m_xBuilder->weld_metric_spin_button("linewidthmf", 
FieldUnit::POINT))
 , m_xSpacingFrame(m_xBuilder->weld_container("spacing"))
 , m_xLeftFT(m_xBuilder->weld_label("leftft"))
@@ -416,7 +419,7 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, 
weld::DialogControlle
 {
 // The caller specifies default line width.  Honor it.
 const SfxInt64Item* p = static_cast(pItem);
-m_xLineWidthMF->set_value(p->GetValue(), FieldUnit::POINT);
+SetLineWidth(p->GetValue());
 }
 
 // set metric
@@ -516,13 +519,17 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* 
pPage, weld::DialogControlle
 m_aFrameSel.SetSelectHdl(LINK(this, SvxBorderTabPage, LinesChanged_Impl));
 m_xLbLineStyle->SetSelectHdl( LINK( this, SvxBorderTabPage, 
SelStyleHdl_Impl ) );
 m_xLbLineColor->SetSelectHdl( LINK( this, SvxBorderTabPage, SelColHdl_Impl 
) );
-m_xLineWidthMF->connect_value_changed( LINK( this, SvxBorderTabPage, 
ModifyWidthHdl_Impl ) );
+m_xLineWidthLB->connect_changed(LINK(this, SvxBorderTabPage, 
ModifyWidthLBHdl_Impl));
+m_xLineWidthMF->connect_value_changed(LINK(this, SvxBorderTabPage, 
ModifyWidthMFHdl_Impl));
 m_xWndPresets->SetSelectHdl( LINK( this, SvxBorderTabPage, SelPreHdl_Impl 
) );
 m_xWndShadows->SetSelectHdl( LINK( this, SvxBorderTabPage, SelSdwHdl_Impl 
) );
 
 FillValueSets();
 

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

2021-09-03 Thread Heiko Tietze (via logerrit)
 cui/source/inc/cuitabarea.hxx   |2 
 cui/source/tabpages/tpcolor.cxx |   14 
 cui/uiconfig/ui/colorpage.ui|  575 
 3 files changed, 312 insertions(+), 279 deletions(-)

New commits:
commit ef3dd0e04e734974ff9a6b7f30d0377ecd952842
Author: Heiko Tietze 
AuthorDate: Thu Sep 2 10:38:14 2021 +0200
Commit: Heiko Tietze 
CommitDate: Fri Sep 3 11:59:17 2021 +0200

Resolves tdf#120333 - Access to color palettes via tight extensions

Change-Id: I335854a29eaddf76b847642250626b7032ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121498
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 3f18d069f6e4..b5af2475a218 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -675,6 +675,7 @@ private:
 std::unique_ptr m_xBtnAdd;
 std::unique_ptr m_xBtnDelete;
 std::unique_ptr m_xBtnWorkOn;
+std::unique_ptr m_xMoreColors;
 std::unique_ptr m_xCtlPreviewOld;
 std::unique_ptr m_xCtlPreviewNew;
 std::unique_ptr m_xValSetColorListWin;
@@ -692,6 +693,7 @@ private:
 DECL_LINK(ClickAddHdl_Impl, weld::Button&, void);
 DECL_LINK(ClickWorkOnHdl_Impl, weld::Button&, void);
 DECL_LINK(ClickDeleteHdl_Impl, weld::Button&, void);
+DECL_STATIC_LINK(SvxColorTabPage, OnMoreColorsClick, weld::Button&, void);
 
 DECL_LINK(SelectPaletteLBHdl, weld::ComboBox&, void);
 DECL_LINK( SelectValSetHdl_Impl, ValueSet*, void );
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 7be82dca2676..a5f2e7b7aa98 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace com::sun::star;
 
@@ -75,6 +76,7 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, 
weld::DialogController*
 , m_xBtnAdd(m_xBuilder->weld_button("add"))
 , m_xBtnDelete(m_xBuilder->weld_button("delete"))
 , m_xBtnWorkOn(m_xBuilder->weld_button("edit"))
+, m_xMoreColors(m_xBuilder->weld_button("btnMoreColors"))
 , m_xCtlPreviewOld(new weld::CustomWeld(*m_xBuilder, "oldpreview", 
m_aCtlPreviewOld))
 , m_xCtlPreviewNew(new weld::CustomWeld(*m_xBuilder, "newpreview", 
m_aCtlPreviewNew))
 , m_xValSetColorListWin(new weld::CustomWeld(*m_xBuilder, "colorset", 
*m_xValSetColorList))
@@ -128,6 +130,9 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, 
weld::DialogController*
 m_xBtnDelete->set_sensitive(false);
 m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR1) );
 
+m_xMoreColors->set_from_icon_name("cmd/sc_additionsdialog.png");
+m_xMoreColors->connect_clicked(LINK(this, SvxColorTabPage, 
OnMoreColorsClick));
+
 // disable preset color values
 m_xRGBpreset->set_sensitive(false);
 m_xCMYKpreset->set_sensitive(false);
@@ -536,6 +541,15 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectColorModeHdl_Impl, 
weld::Toggleable&, voi
 UpdateColorValues();
 }
 
+
+IMPL_STATIC_LINK_NOARG(SvxColorTabPage, OnMoreColorsClick, weld::Button&, void)
+{
+css::uno::Sequence aArgs(1);
+aArgs[0].Name = "AdditionsTag";
+aArgs[0].Value <<= OUString("Color Palette");
+comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs);
+}
+
 void SvxColorTabPage::ChangeColor(const Color &rNewColor, bool bUpdatePreset )
 {
 aPreviousColor = rNewColor;
diff --git a/cui/uiconfig/ui/colorpage.ui b/cui/uiconfig/ui/colorpage.ui
index 46f99e9db764..ac680de34ef0 100644
--- a/cui/uiconfig/ui/colorpage.ui
+++ b/cui/uiconfig/ui/colorpage.ui
@@ -1,84 +1,84 @@
 
-
+
 
   
   
 100
-1
-10
+1
+10
   
   
 255
-1
-10
+1
+10
   
   
 100
-1
-10
+1
+10
   
   
 100
-1
-10
+1
+10
   
   
 100
-1
-10
+1
+10
   
   
 255
-1
-10
+1
+10
   
   
 255
-1
-10
+1
+10
   
   
 True
-False
-res/sc10350.png
+False
+res/sc10350.png
   
   
 True
-False
+False
 True
 True
-6
+6
 6
 
   
 True
-False
+False
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
+False
 start
 start
-6
 12
 6
+6
 
   
 True
-False
+False
 3
 
   
 True
-False
+False
 center
 Palette:
-True
-paletteselector
+True
+paletteselector
 0
 0
   
@@ -91,7 +91,7 @@
 

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

2021-08-27 Thread Caolán McNamara (via logerrit)
 cui/source/options/optcolor.cxx|   27 +-
 cui/uiconfig/ui/chapterfragment.ui |   31 --
 cui/uiconfig/ui/colorfragment.ui   |   38 ++---
 3 files changed, 46 insertions(+), 50 deletions(-)

New commits:
commit 05c384cc087a32b65e8ecb1bdf277f1ff063c8b6
Author: Caolán McNamara 
AuthorDate: Fri Aug 27 16:54:08 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 27 20:26:50 2021 +0200

change the extra config colors to match the application ones

these extra ones are dynamically appended to the static set of the
colorconfigwin.ui so adapt them to the changes of

commit 2f706b1e91396cbe044c20fab79772dfc081a340
Date:   Fri Aug 27 11:46:57 2021 +0200

Improve accessibility for application color settings

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

diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 0296e9a0d132..9ab34dd61434 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -185,7 +185,7 @@ public:
 
 weld::Widget& GetBody()
 {
-return *m_xGrid;
+return *m_xBox;
 }
 
 void AdjustExtraWidths(int nTextWidth);
@@ -240,7 +240,7 @@ private:
 private:
 weld::Window* m_pTopLevel;
 std::unique_ptr m_xBuilder;
-std::unique_ptr m_xGrid;
+std::unique_ptr m_xBox;
 std::unique_ptr m_xWidget1;
 std::unique_ptr m_xWidget2;
 
@@ -364,7 +364,7 @@ void 
ColorConfigWindow_Impl::Entry::ColorChanged(ExtendedColorConfigValue& rValu
 ColorConfigWindow_Impl::ColorConfigWindow_Impl(weld::Window* pTopLevel, 
weld::Container* pParent)
 : m_pTopLevel(pTopLevel)
 , m_xBuilder(Application::CreateBuilder(pParent, 
"cui/ui/colorconfigwin.ui"))
-, m_xGrid(m_xBuilder->weld_container("ColorConfigWindow"))
+, m_xBox(m_xBuilder->weld_box("ColorConfigWindow"))
 , m_xWidget1(m_xBuilder->weld_widget("doccolor"))
 , m_xWidget2(m_xBuilder->weld_widget("doccolor_lb"))
 {
@@ -418,38 +418,31 @@ void ColorConfigWindow_Impl::CreateEntries()
 if (!nExtGroupCount)
 return;
 
-size_t nLineNum = vChapters.size() + vEntries.size() + 1;
 for (unsigned j = 0; j != nExtGroupCount; ++j)
 {
-vExtBuilders.emplace_back(Application::CreateBuilder(m_xGrid.get(), 
"cui/ui/chapterfragment.ui"));
-
vExtContainers.emplace_back(vExtBuilders.back()->weld_container("ChapterFragment"));
-
-vExtContainers.back()->set_grid_width(3);
-vExtContainers.back()->set_grid_left_attach(0);
-vExtContainers.back()->set_grid_top_attach(nLineNum);
+vExtBuilders.emplace_back(Application::CreateBuilder(m_xBox.get(), 
"cui/ui/chapterfragment.ui"));
+
vExtContainers.emplace_back(vExtBuilders.back()->weld_frame("ChapterFragment"));
 
 OUString const sComponentName = aExtConfig.GetComponentName(j);
 vChapters.push_back(std::make_shared(
 *vExtBuilders.back(), "chapter", true));
 
vChapters.back()->SetText(aExtConfig.GetComponentDisplayName(sComponentName));
-++nLineNum;
+
+vExtContainers.emplace_back(vExtBuilders.back()->weld_box("contents"));
+weld::Container* pChapterBox = vExtContainers.back().get();
+
 unsigned nColorCount = 
aExtConfig.GetComponentColorCount(sComponentName);
 for (unsigned i = 0; i != nColorCount; ++i)
 {
-
vExtBuilders.emplace_back(Application::CreateBuilder(m_xGrid.get(), 
"cui/ui/colorfragment.ui"));
+vExtBuilders.emplace_back(Application::CreateBuilder(pChapterBox, 
"cui/ui/colorfragment.ui"));
 
vExtContainers.emplace_back(vExtBuilders.back()->weld_container("ColorFragment"));
 
-vExtContainers.back()->set_grid_width(3);
-vExtContainers.back()->set_grid_left_attach(0);
-vExtContainers.back()->set_grid_top_attach(nLineNum);
-
 ExtendedColorConfigValue const aColorEntry =
 aExtConfig.GetComponentColorConfigValue(sComponentName, i);
 vEntries.push_back(std::make_shared(m_pTopLevel, 
*vExtBuilders.back(),
 "label", "button", aColorEntry.getDefaultColor(),
 nCheckBoxLabelOffset, false, true));
 vEntries.back()->SetText(aColorEntry.getDisplayName());
-++nLineNum;
 }
 }
 }
diff --git a/cui/uiconfig/ui/chapterfragment.ui 
b/cui/uiconfig/ui/chapterfragment.ui
index b1179f5fbabd..6ed4fb34a71a 100644
--- a/cui/uiconfig/ui/chapterfragment.ui
+++ b/cui/uiconfig/ui/chapterfragment.ui
@@ -1,28 +1,31 @@
 
-
+
 
   
-  
-  
+  
 True
-False
-6
-12
-True
+False
+0
+none
 
+  
+True
+False
+vertical
+3
+
+  
+
+  
+
+

[Libreoffice-commits] core.git: cui/source cui/uiconfig officecfg/registry sfx2/source

2021-07-23 Thread Jeff Huang (via logerrit)
 cui/source/options/optgdlg.cxx |   14 -
 cui/source/options/optgdlg.hxx |2 
 cui/uiconfig/ui/optgeneralpage.ui  |   20 -
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |8 
 sfx2/source/control/unoctitm.cxx   |  142 -
 5 files changed, 4 insertions(+), 182 deletions(-)

New commits:
commit 2c0b84dc65739bfc47dca684e819717eb9cce387
Author: Jeff Huang 
AuthorDate: Mon Jul 19 17:00:17 2021 +0800
Commit: Heiko Tietze 
CommitDate: Fri Jul 23 13:29:22 2021 +0200

tdf#140107 Remove all collect usage data code.

Remove all collect usage data code because we
don't really use them.

Change-Id: I8d83d57220bed8f8c15bd012584943cd0913500d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119166
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 3870a3df3ca8..83fd85d8a074 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -161,9 +161,9 @@ OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xYearFrame(m_xBuilder->weld_widget("yearframe"))
 , m_xYearValueField(m_xBuilder->weld_spin_button("year"))
 , m_xToYearFT(m_xBuilder->weld_label("toyear"))
-, m_xCollectUsageInfo(m_xBuilder->weld_check_button("collectusageinfo"))
 , m_xCrashReport(m_xBuilder->weld_check_button("crashreport"))
 , m_xQuickStarterFrame(m_xBuilder->weld_widget("quickstarter"))
+, m_xHelpImproveLabel(m_xBuilder->weld_label("label7")) //"Help Improve"
 #if defined(UNX)
 , m_xQuickLaunchCB(m_xBuilder->weld_check_button("systray"))
 #else
@@ -188,6 +188,8 @@ OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, 
weld::DialogController* p
 //Only available in Win or if building the gtk systray
 #if !defined(_WIN32)
 m_xQuickStarterFrame->hide();
+//Hide frame label in case of no content
+m_xHelpImproveLabel->hide();
 #endif
 
 #if defined(_WIN32)
@@ -251,12 +253,6 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
 rSet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, nNum ) );
 }
 
-if (m_xCollectUsageInfo->get_state_changed_from_saved())
-{
-
officecfg::Office::Common::Misc::CollectUsageInformation::set(m_xCollectUsageInfo->get_active(),
 batch);
-bModified = true;
-}
-
 #if HAVE_FEATURE_BREAKPAD
 if (m_xCrashReport->get_state_changed_from_saved())
 {
@@ -309,10 +305,6 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
 else
 m_xYearFrame->set_sensitive(false);
 
-
m_xCollectUsageInfo->set_active(officecfg::Office::Common::Misc::CollectUsageInformation::get());
-
m_xCollectUsageInfo->set_sensitive(!officecfg::Office::Common::Misc::CollectUsageInformation::isReadOnly());
-m_xCollectUsageInfo->save_state();
-
 #if HAVE_FEATURE_BREAKPAD
 
m_xCrashReport->set_active(officecfg::Office::Common::Misc::CrashReport::get() 
&& CrashReporter::IsDumpEnable());
 
m_xCrashReport->set_sensitive(!officecfg::Office::Common::Misc::CrashReport::isReadOnly()
 && CrashReporter::IsDumpEnable());
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 38731cefd043..3d4c342a73a6 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -44,9 +44,9 @@ private:
 std::unique_ptr m_xYearFrame;
 std::unique_ptr m_xYearValueField;
 std::unique_ptr m_xToYearFT;
-std::unique_ptr m_xCollectUsageInfo;
 std::unique_ptr m_xCrashReport;
 std::unique_ptr m_xQuickStarterFrame;
+std::unique_ptr m_xHelpImproveLabel;
 std::unique_ptr m_xQuickLaunchCB;
 #if defined(_WIN32)
 std::unique_ptr m_xFileAssocFrame;
diff --git a/cui/uiconfig/ui/optgeneralpage.ui 
b/cui/uiconfig/ui/optgeneralpage.ui
index 6d9512d72cab..363ed4633a76 100644
--- a/cui/uiconfig/ui/optgeneralpage.ui
+++ b/cui/uiconfig/ui/optgeneralpage.ui
@@ -279,26 +279,6 @@
 False
 12
 6
-
-  
-Collect usage data and send it to The 
Document Foundation
-True
-True
-False
-1
-True
-True
-
-  
-Send usage data to 
help The Document Foundation improve the software usability.
-  
-
-  
-  
-0
-0
-  
-
 
   
 Sen_d crash reports to The Document 
Foundation
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index d74a9411ca3c..c9940001b573 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office

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

2021-06-25 Thread Caolán McNamara (via logerrit)
 cui/source/options/optsave.cxx |2 ++
 cui/uiconfig/ui/optsavepage.ui |1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit bbddb67a59655660ea028bcf1ca23c0f75a29779
Author: Caolán McNamara 
AuthorDate: Fri Jun 25 16:56:50 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jun 25 21:13:10 2021 +0200

remove max-length from GtkSpinButton .ui

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

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 3ee6a66c40d2..9ad1c1f5a4c5 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -91,6 +91,8 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xODFWarningFI(m_xBuilder->weld_widget("odfwarning_image"))
 , m_xODFWarningFT(m_xBuilder->weld_label("odfwarning_label"))
 {
+m_xAutoSaveEdit->set_max_length(2);
+
 m_xODFVersionLB->set_id(0, OUString::number(SvtSaveOptions::ODFVER_011)); 
// 1.0/1.1
 m_xODFVersionLB->set_id(1, OUString::number(SvtSaveOptions::ODFVER_012)); 
// 1.2
 m_xODFVersionLB->set_id(2, 
OUString::number(SvtSaveOptions::ODFVER_012_EXT_COMPAT)); // 1.2 Extended 
(compatibility mode)
diff --git a/cui/uiconfig/ui/optsavepage.ui b/cui/uiconfig/ui/optsavepage.ui
index 8588dde7c7aa..49d237aa0548 100644
--- a/cui/uiconfig/ui/optsavepage.ui
+++ b/cui/uiconfig/ui/optsavepage.ui
@@ -129,7 +129,6 @@
   
 True
 True
-2
 True
 adjustment1
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-30 Thread Jan-Marek Glogowski (via logerrit)
 cui/source/options/optgdlg.cxx|   22 --
 cui/source/options/optgdlg.hxx|1 -
 cui/uiconfig/ui/optgeneralpage.ui |   34 --
 3 files changed, 57 deletions(-)

New commits:
commit 3fc89330a976cb2221a579ccc6d7230b9d20691b
Author: Jan-Marek Glogowski 
AuthorDate: Sun May 30 11:37:19 2021 +0200
Commit: Caolán McNamara 
CommitDate: Sun May 30 17:49:49 2021 +0200

Drop GtkSalPrinter bits from option dialog

After commit ed07ec7606cb24cccaf6b7b81b2bd308debaa2e6 ("drop
never completed GtkSalPrinter"), there is still the experimental
option left, depending on ENABLE_GTK3.

We can't drop the whole PrinterCapType::ExternalDialog, because
the osx code actually uses it.

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index a4cf97811e75..fd79d34926f1 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -18,7 +18,6 @@
  */
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -155,7 +154,6 @@ OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xPopUpNoHelpCB(m_xBuilder->weld_check_button("popupnohelp"))
 , m_xShowTipOfTheDay(m_xBuilder->weld_check_button("cbShowTipOfTheDay"))
 , m_xFileDlgFrame(m_xBuilder->weld_widget("filedlgframe"))
-, m_xPrintDlgFrame(m_xBuilder->weld_widget("printdlgframe"))
 , m_xFileDlgROImage(m_xBuilder->weld_widget("lockimage"))
 , m_xFileDlgCB(m_xBuilder->weld_check_button("filedlg"))
 , m_xPrintDlgCB(m_xBuilder->weld_check_button("printdlg"))
@@ -185,15 +183,6 @@ OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, 
weld::DialogController* p
 m_xFileDlgCB->set_sensitive(false);
 }
 
-#if !ENABLE_GTK3
-m_xPrintDlgFrame->hide();
-#else
-if (!officecfg::Office::Common::Misc::ExperimentalMode::get())
-{
-m_xPrintDlgFrame->hide();
-}
-#endif
-
 m_xQuickLaunchCB->show();
 
 //Only available in Win or if building the gtk systray
@@ -248,15 +237,6 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
 bModified = true;
 }
 
-if ( m_xPrintDlgCB->get_state_changed_from_saved() )
-{
-std::shared_ptr< comphelper::ConfigurationChanges > xChanges(
-comphelper::ConfigurationChanges::create());
-officecfg::Office::Common::Misc::UseSystemPrintDialog::set( 
!m_xPrintDlgCB->get_active(), xChanges );
-xChanges->commit();
-bModified = true;
-}
-
 if (m_xDocStatusCB->get_state_changed_from_saved())
 {
 
officecfg::Office::Common::Print::PrintingModifiesDocument::set(m_xDocStatusCB->get_active(),
 batch);
@@ -316,8 +296,6 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
 m_xShowTipOfTheDay->save_state();
 m_xFileDlgCB->set_active( 
!officecfg::Office::Common::Misc::UseSystemFileDialog::get() );
 m_xFileDlgCB->save_state();
-m_xPrintDlgCB->set_active( 
!officecfg::Office::Common::Misc::UseSystemPrintDialog::get() );
-m_xPrintDlgCB->save_state();
 
 
m_xDocStatusCB->set_active(officecfg::Office::Common::Print::PrintingModifiesDocument::get());
 m_xDocStatusCB->save_state();
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 183ef409e2ca..1bd92980b1d5 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -37,7 +37,6 @@ private:
 std::unique_ptr m_xPopUpNoHelpCB;
 std::unique_ptr m_xShowTipOfTheDay;
 std::unique_ptr m_xFileDlgFrame;
-std::unique_ptr m_xPrintDlgFrame;
 std::unique_ptr m_xFileDlgROImage;
 std::unique_ptr m_xFileDlgCB;
 std::unique_ptr m_xPrintDlgCB;
diff --git a/cui/uiconfig/ui/optgeneralpage.ui 
b/cui/uiconfig/ui/optgeneralpage.ui
index 5f502977f26e..6d9512d72cab 100644
--- a/cui/uiconfig/ui/optgeneralpage.ui
+++ b/cui/uiconfig/ui/optgeneralpage.ui
@@ -152,40 +152,6 @@
 1
   
 
-
-  
-True
-False
-0
-none
-
-  
-Use %PRODUCTNAME _dialogs
-True
-True
-False
-True
-True
-12
-6
-  
-
-
-  
-True
-False
-Print Dialogs
-
-  
-
-  
-
-  
-  
-0
-2
-  
-
 
   
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-21 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/hangulhanjadlg.cxx  |   26 +-
 cui/uiconfig/ui/hangulhanjaconversiondialog.ui |  283 +
 2 files changed, 215 insertions(+), 94 deletions(-)

New commits:
commit f63054cf249a6bddd3e7e2ef69eeb7aabaec76cc
Author: Caolán McNamara 
AuthorDate: Fri May 21 11:53:15 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 21 15:59:28 2021 +0200

move hangul/hanja previews outside radiobuttons

not possible in gtk4 to put an image in here anymore AFAICS,
this was always an odd case anyway

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

diff --git a/cui/source/dialogs/hangulhanjadlg.cxx 
b/cui/source/dialogs/hangulhanjadlg.cxx
index 163a84048541..049a14b448ed 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -194,10 +194,14 @@ namespace svx
 class RubyRadioButton
 {
 public:
-RubyRadioButton(std::unique_ptr xControl);
+RubyRadioButton(std::unique_ptr xControl, 
std::unique_ptr xImage);
 void init(const OUString& rPrimaryText, const OUString& 
rSecondaryText, const PseudoRubyText::RubyPosition& rPosition);
 
-void set_sensitive(bool sensitive) { 
m_xControl->set_sensitive(sensitive); }
+void set_sensitive(bool sensitive)
+{
+m_xControl->set_sensitive(sensitive);
+m_xImage->set_sensitive(sensitive);
+}
 void set_active(bool active) { m_xControl->set_active(active); }
 bool get_active() const { return m_xControl->get_active(); }
 
@@ -209,12 +213,14 @@ namespace svx
 
 ScopedVclPtr m_xVirDev;
 std::unique_ptr m_xControl;
+std::unique_ptr m_xImage;
 PseudoRubyText m_aRubyText;
 };
 
-RubyRadioButton::RubyRadioButton(std::unique_ptr 
xControl)
+RubyRadioButton::RubyRadioButton(std::unique_ptr 
xControl, std::unique_ptr xImage)
 : m_xVirDev(xControl->create_virtual_device())
 , m_xControl(std::move(xControl))
+, m_xImage(std::move(xImage))
 {
 // expand the point size of the desired font to the equivalent pixel 
size
 weld::SetPointFont(*m_xVirDev, m_xControl->get_font());
@@ -228,7 +234,7 @@ namespace svx
 
 Paint(*m_xVirDev);
 
-m_xControl->set_image(m_xVirDev.get());
+m_xImage->set_image(m_xVirDev.get());
 }
 
 void RubyRadioButton::Paint(vcl::RenderContext& rRenderContext)
@@ -431,10 +437,14 @@ namespace svx
 , m_xHanjaBracketed(m_xBuilder->weld_radio_button("hanjabracket"))
 , m_xWordInput(m_xBuilder->weld_entry("wordinput"))
 , m_xOriginalWord(m_xBuilder->weld_label("originalword"))
-, m_xHanjaAbove(new 
RubyRadioButton(m_xBuilder->weld_radio_button("hanja_above")))
-, m_xHanjaBelow(new 
RubyRadioButton(m_xBuilder->weld_radio_button("hanja_below")))
-, m_xHangulAbove(new 
RubyRadioButton(m_xBuilder->weld_radio_button("hangul_above")))
-, m_xHangulBelow(new 
RubyRadioButton(m_xBuilder->weld_radio_button("hangul_below")))
+, m_xHanjaAbove(new 
RubyRadioButton(m_xBuilder->weld_radio_button("hanja_above"),
+
m_xBuilder->weld_image("hanja_above_img")))
+, m_xHanjaBelow(new 
RubyRadioButton(m_xBuilder->weld_radio_button("hanja_below"),
+
m_xBuilder->weld_image("hanja_below_img")))
+, m_xHangulAbove(new 
RubyRadioButton(m_xBuilder->weld_radio_button("hangul_above"),
+ 
m_xBuilder->weld_image("hangul_above_img")))
+, m_xHangulBelow(new 
RubyRadioButton(m_xBuilder->weld_radio_button("hangul_below"),
+ 
m_xBuilder->weld_image("hangul_below_img")))
 , m_xHangulOnly(m_xBuilder->weld_check_button("hangulonly"))
 , m_xHanjaOnly(m_xBuilder->weld_check_button("hanjaonly"))
 , m_xReplaceByChar(m_xBuilder->weld_check_button("replacebychar"))
diff --git a/cui/uiconfig/ui/hangulhanjaconversiondialog.ui 
b/cui/uiconfig/ui/hangulhanjaconversiondialog.ui
index 350630d4fd63..408d6fc62841 100644
--- a/cui/uiconfig/ui/hangulhanjaconversiondialog.ui
+++ b/cui/uiconfig/ui/hangulhanjaconversiondialog.ui
@@ -295,92 +295,12 @@
   
 
 
-  
+  
   
 True
 False
 12
 12
-
-  
-True
-True
-False
-Hanja above
-True
-True
-simpleconversion
-
-  
-  

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

2021-05-18 Thread Matt K (via logerrit)
 cui/source/dialogs/tipofthedaydlg.cxx |   31 +++
 cui/source/factory/dlgfact.cxx|   14 --
 cui/source/factory/dlgfact.hxx|   13 +
 cui/source/inc/tipofthedaydlg.hxx |5 +
 cui/uiconfig/ui/tipofthedaydialog.ui  |4 ++--
 sfx2/source/appl/appserv.cxx  |2 +-
 6 files changed, 64 insertions(+), 5 deletions(-)

New commits:
commit 7f032b2f16fad56beea1df826eb59c6f85c71268
Author: Matt K 
AuthorDate: Sat Apr 3 01:24:30 2021 -0500
Commit: Heiko Tietze 
CommitDate: Tue May 18 09:02:22 2021 +0200

tdf#127533 Make Tip-of-the-Day dialog non-modal and allow multiple tips to 
open

The Tip-of-the-Day dialog is made non-modal and stays on-top of the main 
window
while allowing the user to interact with the rest of application.

Change-Id: I51e1a3488ab74d8371b71a8585d1512ce051f637
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113782
Reviewed-by: Matt K 
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins

diff --git a/cui/source/dialogs/tipofthedaydlg.cxx 
b/cui/source/dialogs/tipofthedaydlg.cxx
index 9d43fd21f4ba..8356f6f0e36f 100644
--- a/cui/source/dialogs/tipofthedaydlg.cxx
+++ b/cui/source/dialogs/tipofthedaydlg.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -38,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -47,6 +49,7 @@ const Size ThumbSize(150, 150);
 
 TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent)
 : GenericDialogController(pParent, "cui/ui/tipofthedaydialog.ui", 
"TipOfTheDayDialog")
+, m_pParent(pParent)
 , m_pText(m_xBuilder->weld_label("lbText"))
 , m_pShowTip(m_xBuilder->weld_check_button("cbShowTip"))
 , m_pNext(m_xBuilder->weld_button("btnNext"))
@@ -58,6 +61,17 @@ TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent)
 m_nCurrentTip = officecfg::Office::Common::Misc::LastTipOfTheDayID::get();
 m_pPreview->set_size_request(ThumbSize.Width(), ThumbSize.Height());
 
+if (pParent != nullptr)
+{
+css::uno::Reference xWindow = pParent->GetXWindow();
+if (xWindow.is())
+{
+VclPtr xVclWin(VCLUnoHelper::GetWindow(xWindow));
+if (xVclWin != nullptr)
+xVclWin->AddEventListener(LINK(this, TipOfTheDayDialog, 
Terminated));
+}
+}
+
 const auto t0 = std::chrono::system_clock::now().time_since_epoch();
 m_nDay = std::chrono::duration_cast(t0).count() / 24;
 if (m_nDay > officecfg::Office::Common::Misc::LastTipOfTheDayShown::get())
@@ -66,6 +80,12 @@ TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent)
 UpdateTip();
 }
 
+IMPL_LINK(TipOfTheDayDialog, Terminated, VclWindowEvent&, rEvent, void)
+{
+if (rEvent.GetId() == VclEventId::ObjectDying)
+TipOfTheDayDialog::response(RET_OK);
+}
+
 TipOfTheDayDialog::~TipOfTheDayDialog()
 {
 std::shared_ptr xChanges(
@@ -74,6 +94,17 @@ TipOfTheDayDialog::~TipOfTheDayDialog()
 officecfg::Office::Common::Misc::LastTipOfTheDayID::set(m_nCurrentTip, 
xChanges);
 
officecfg::Office::Common::Misc::ShowTipOfTheDay::set(m_pShowTip->get_active(), 
xChanges);
 xChanges->commit();
+
+if (m_pParent != nullptr)
+{
+css::uno::Reference xWindow = 
m_pParent->GetXWindow();
+if (xWindow.is())
+{
+VclPtr xVclWin(VCLUnoHelper::GetWindow(xWindow));
+if (xVclWin != nullptr)
+xVclWin->RemoveEventListener(LINK(this, TipOfTheDayDialog, 
Terminated));
+}
+}
 }
 
 static bool file_exists(const OUString& fileName)
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 6d0a44086d47..6d0e9e31f77f 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -106,6 +106,16 @@ short CuiAbstractController_Impl::Execute()
 return m_xDlg->run();
 }
 
+short CuiAbstractTipController_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
+bool CuiAbstractTipController_Impl::StartExecuteAsync(AsyncContext& rCtx)
+{
+return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 short CuiAbstractSingleTabController_Impl::Execute()
 {
 return m_xDlg->run();
@@ -1682,8 +1692,8 @@ 
AbstractDialogFactory_Impl::CreateAboutDialog(weld::Window* pParent)
 VclPtr
 AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent)
 {
-return VclPtr::Create(
-std::make_unique(pParent));
+return VclPtr::Create(
+std::make_shared(pParent));
 }
 
 VclPtr
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 1abf42683c95..1678d3c6349b 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -121,6 +121,19 @@ public:
 virtual short Execute() override;
 };
 
+class CuiAbstractTipController_Impl : public VclAbstractDialog
+{
+std::shared_ptr m_xDlg;
+
+public:
+explicit 
CuiAbstrac

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

2021-04-27 Thread Christian Lohmaier (via logerrit)
 cui/source/dialogs/AdditionsDialog.cxx |4 ++--
 cui/uiconfig/ui/additionsfragment.ui   |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 452fcbe0792aa10042bb8cd2cfd6cd29ca754be5
Author: Christian Lohmaier 
AuthorDate: Tue Apr 27 14:19:22 2021 +0200
Commit: Christian Lohmaier 
CommitDate: Tue Apr 27 21:58:50 2021 +0200

tdf#137470 use a more proper URL for the extensions

also hide the download-count, since those numbers are completely made up
by the script

Change-Id: I15b53a8a023c34ecc6a544b88ad35800891e4327
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114740
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index c41e6c262d0e..344bcf5f9ba3 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -476,8 +476,8 @@ AdditionsDialog::AdditionsDialog(weld::Window* pParent, 
const OUString& sAdditio
 this->set_title(titlePrefix);
 m_sTag = "allextensions"; // Means empty parameter
 }
-//FIXME: Temporary URL
-OUString rURL = "https://libreoffice.yusufketen.com/api/"; + m_sTag + 
".json";
+//FIXME: Temporary URL - v0 is not using actual api
+OUString rURL = "https://extensions.libreoffice.org/api/v0/"; + m_sTag + 
".json";
 m_sURL = rURL;
 
 m_xExtensionManager
diff --git a/cui/uiconfig/ui/additionsfragment.ui 
b/cui/uiconfig/ui/additionsfragment.ui
index 9772ae45fffd..143c7c446c94 100644
--- a/cui/uiconfig/ui/additionsfragment.ui
+++ b/cui/uiconfig/ui/additionsfragment.ui
@@ -136,7 +136,7 @@
 
 
   
-True
+False
 False
 start
 Downloads:
@@ -154,7 +154,7 @@
 
 
   
-True
+False
 False
 start
 label
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-04-16 Thread Szymon Kłos (via logerrit)
 cui/source/customize/cfgutil.cxx   |3 ++-
 cui/source/inc/cfgutil.hxx |1 +
 cui/uiconfig/ui/macroselectordialog.ui |2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 8a994d8f8246b913143c1062f970e045d9105c61
Author: Szymon Kłos 
AuthorDate: Thu Mar 11 12:33:52 2021 +0100
Commit: Szymon Kłos 
CommitDate: Fri Apr 16 16:06:36 2021 +0200

Remove description from mobile macro selector

Change-Id: I76d9a73c65d0c7759b56a3d7b69aadf5b58d7da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112327
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114206
Tested-by: Jenkins

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 84540dd8d7f6..5ac0eda55edb 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -1081,6 +1081,7 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
 , m_xOKButton(m_xBuilder->weld_button("ok"))
 , m_xCancelButton(m_xBuilder->weld_button("cancel"))
 , m_xDescriptionText(m_xBuilder->weld_text_view("description"))
+, m_xDescriptionFrame(m_xBuilder->weld_frame("descriptionframe"))
 {
 m_xCancelButton->show();
 m_xDialogDescription->show();
@@ -1118,7 +1119,7 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
 UpdateUI();
 
 if (comphelper::LibreOfficeKit::isActive())
-m_xDescriptionText->hide();
+m_xDescriptionFrame->hide();
 }
 
 SvxScriptSelectorDialog::~SvxScriptSelectorDialog()
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 0d6a8c1ee4be..0b9e5a439d65 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -242,6 +242,7 @@ class SvxScriptSelectorDialog : public 
weld::GenericDialogController
 std::unique_ptr m_xOKButton;
 std::unique_ptr m_xCancelButton;
 std::unique_ptr m_xDescriptionText;
+std::unique_ptr m_xDescriptionFrame;
 
 DECL_LINK(ClickHdl, weld::Button&, void);
 DECL_LINK(SelectHdl, weld::TreeView&, void);
diff --git a/cui/uiconfig/ui/macroselectordialog.ui 
b/cui/uiconfig/ui/macroselectordialog.ui
index 5403437ab8f6..4b502ddfaa96 100644
--- a/cui/uiconfig/ui/macroselectordialog.ui
+++ b/cui/uiconfig/ui/macroselectordialog.ui
@@ -262,7 +262,7 @@
   
 
 
-  
+  
 True
 False
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-04-16 Thread Szymon Kłos (via logerrit)
 cui/source/customize/cfgutil.cxx   |7 -
 cui/source/inc/cfgutil.hxx |2 
 cui/uiconfig/ui/macroselectordialog.ui |  124 +++--
 3 files changed, 16 insertions(+), 117 deletions(-)

New commits:
commit 748ef40304e523135108905e902655abdf3c5d23
Author: Szymon Kłos 
AuthorDate: Thu Mar 11 09:11:38 2021 +0100
Commit: Szymon Kłos 
CommitDate: Fri Apr 16 14:55:16 2021 +0200

Remove unused code from Macro Selector dialog

Change-Id: I9930fd7eaf2410447f84aa4798478a10915ea738
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112316
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114205
Tested-by: Jenkins

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 0d9491c7ddac..84540dd8d7f6 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -1077,9 +1077,7 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
 , m_xCategories(new 
CuiConfigGroupListBox(m_xBuilder->weld_tree_view("categories")))
 , m_xCommands(new 
CuiConfigFunctionListBox(m_xBuilder->weld_tree_view("commands")))
 , m_xLibraryFT(m_xBuilder->weld_label("libraryft"))
-, m_xCategoryFT(m_xBuilder->weld_label("categoryft"))
 , m_xMacronameFT(m_xBuilder->weld_label("macronameft"))
-, m_xCommandsFT(m_xBuilder->weld_label("commandsft"))
 , m_xOKButton(m_xBuilder->weld_button("ok"))
 , m_xCancelButton(m_xBuilder->weld_button("cancel"))
 , m_xDescriptionText(m_xBuilder->weld_text_view("description"))
@@ -1089,9 +1087,7 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
 m_xOKButton->show();
 
 m_xLibraryFT->set_visible(true);
-m_xCategoryFT->set_visible(false);
 m_xMacronameFT->set_visible(true);
-m_xCommandsFT->set_visible(false);
 
 const OUString 
aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame));
 m_xCategories->SetFunctionListBox(m_xCommands.get());
@@ -1120,6 +1116,9 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
 m_xCategories->SetStylesInfo(&m_aStylesInfo);
 
 UpdateUI();
+
+if (comphelper::LibreOfficeKit::isActive())
+m_xDescriptionText->hide();
 }
 
 SvxScriptSelectorDialog::~SvxScriptSelectorDialog()
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 66ffe4809659..0d6a8c1ee4be 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -238,9 +238,7 @@ class SvxScriptSelectorDialog : public 
weld::GenericDialogController
 std::unique_ptr m_xCategories;
 std::unique_ptr m_xCommands;
 std::unique_ptr m_xLibraryFT;
-std::unique_ptr m_xCategoryFT;
 std::unique_ptr m_xMacronameFT;
-std::unique_ptr m_xCommandsFT;
 std::unique_ptr m_xOKButton;
 std::unique_ptr m_xCancelButton;
 std::unique_ptr m_xDescriptionText;
diff --git a/cui/uiconfig/ui/macroselectordialog.ui 
b/cui/uiconfig/ui/macroselectordialog.ui
index 7756c141c052..5403437ab8f6 100644
--- a/cui/uiconfig/ui/macroselectordialog.ui
+++ b/cui/uiconfig/ui/macroselectordialog.ui
@@ -37,24 +37,10 @@
   
 False
 end
-
-  
-Add
-True
-True
-True
-True
-True
-  
-  
-False
-True
-0
-  
-
 
   
 _OK
+True
 True
 True
 True
@@ -71,6 +57,7 @@
 
   
 _Cancel
+True
 True
 True
 True
@@ -82,20 +69,6 @@
 2
   
 
-
-  
-_Close
-True
-True
-True
-True
-  
-  
-False
-True
-3
-  
-
 
   
 _Help
@@ -143,22 +116,6 @@
 0
   
 
-
-  
-False
-True
-True
-To add a command to a toolbar, select 
the category and then the command. Then drag the command to the Commands list 
of the Toolbars tab page in the Customize dialog.
-True
-60
-0
-  
-  
-False
-True
-1
-  
-
 
   
 True
@@ -219,39 +176,13 @@
   
 
 
-  
+  
 True
 False
-   

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

2021-04-01 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/FontFeaturesDialog.cxx |   17 +++--
 cui/source/inc/FontFeaturesDialog.hxx |3 ++-
 cui/uiconfig/ui/fontfeaturesdialog.ui |1 +
 cui/uiconfig/ui/fontfragment.ui   |2 +-
 4 files changed, 19 insertions(+), 4 deletions(-)

New commits:
commit 6e09d59a503e98f97dea406bb3c2c703edf92d8e
Author: Caolán McNamara 
AuthorDate: Thu Apr 1 16:56:08 2021 +0100
Commit: Caolán McNamara 
CommitDate: Thu Apr 1 22:00:33 2021 +0200

tdf#141333 use a vertical step increment of one row height

for font feature scrolled window

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

diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
index fae448b6a283..04255cb13a6b 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -73,18 +73,26 @@ void FontFeaturesDialog::initialize()
 rFilteredFontFeatures.push_back(rFontFeature);
 }
 
-fillGrid(rFilteredFontFeatures);
+int nRowHeight = fillGrid(rFilteredFontFeatures);
 
 m_xContentWindow->set_size_request(
 -1, std::min(std::max(m_xContentWindow->get_preferred_size().Height(),
   m_xContentGrid->get_preferred_size().Height()),
  static_cast(300L)));
 
+if (nRowHeight)
+{
+// tdf#141333 use row height + the 6 px spacing of contentGrid
+m_xContentWindow->vadjustment_set_step_increment(nRowHeight + 6);
+}
+
 updateFontPreview();
 }
 
-void FontFeaturesDialog::fillGrid(std::vector const& 
rFontFeatures)
+int FontFeaturesDialog::fillGrid(std::vector const& 
rFontFeatures)
 {
+int nRowHeight(0);
+
 vcl::font::FeatureParser aParser(m_sFontName);
 auto aExistingFeatures = aParser.getFeaturesMap();
 
@@ -140,8 +148,13 @@ void 
FontFeaturesDialog::fillGrid(std::vector const& rFontFe
 aCurrentItem.m_xCheck->show();
 }
 
+nRowHeight
+= std::max(nRowHeight, 
aCurrentItem.m_xContainer->get_preferred_size().Height());
+
 i++;
 }
+
+return nRowHeight;
 }
 
 void FontFeaturesDialog::updateFontPreview()
diff --git a/cui/source/inc/FontFeaturesDialog.hxx 
b/cui/source/inc/FontFeaturesDialog.hxx
index 6fd8b9de037e..337014bd8c0d 100644
--- a/cui/source/inc/FontFeaturesDialog.hxx
+++ b/cui/source/inc/FontFeaturesDialog.hxx
@@ -55,7 +55,8 @@ private:
 void initialize();
 OUString createFontNameWithFeatures();
 
-void fillGrid(std::vector const& rFontFeatures);
+// returns the max height of a row
+int fillGrid(std::vector const& rFontFeatures);
 
 DECL_LINK(ComboBoxSelectedHdl, weld::ComboBox&, void);
 DECL_LINK(CheckBoxToggledHdl, weld::ToggleButton&, void);
diff --git a/cui/uiconfig/ui/fontfeaturesdialog.ui 
b/cui/uiconfig/ui/fontfeaturesdialog.ui
index fa36d66ff476..585d3760311a 100644
--- a/cui/uiconfig/ui/fontfeaturesdialog.ui
+++ b/cui/uiconfig/ui/fontfeaturesdialog.ui
@@ -96,6 +96,7 @@
 True
 False
 start
+True
 6
 12
 6
diff --git a/cui/uiconfig/ui/fontfragment.ui b/cui/uiconfig/ui/fontfragment.ui
index 140083b9687e..e66cd71b7ba6 100644
--- a/cui/uiconfig/ui/fontfragment.ui
+++ b/cui/uiconfig/ui/fontfragment.ui
@@ -7,7 +7,7 @@
 True
 False
 True
-start
+center
 True
 True
 6
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-04-01 Thread Miklos Vajna (via logerrit)
 cui/source/inc/page.hxx   |1 +
 cui/source/tabpages/page.cxx  |   16 
 cui/uiconfig/ui/pageformatpage.ui |   16 +++-
 sw/source/core/layout/wsfrm.cxx   |1 +
 sw/source/uibase/utlui/uitool.cxx |6 ++
 5 files changed, 39 insertions(+), 1 deletion(-)

New commits:
commit d48a4174708ce0850577dba76dccaf85c4f6ffa1
Author: Miklos Vajna 
AuthorDate: Thu Apr 1 10:09:45 2021 +0200
Commit: Miklos Vajna 
CommitDate: Thu Apr 1 12:42:53 2021 +0200

tdf#140343 sw page rtl gutter margin: add UI

And extend SwFrame::UpdateAttrFrame() so that the layout is updated when
the UI mutates the doc model.

Change-Id: I4112388981187226f97ec39f4c44ffb3cc1e5253
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113440
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index 1d92d275d3a1..e3c5aa4ed268 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -125,6 +125,7 @@ private:
 std::unique_ptr m_xRegisterLB;
 std::unique_ptr m_xGutterPositionFT;
 std::unique_ptr m_xGutterPositionLB;
+std::unique_ptr m_xRtlGutterCB;
 std::unique_ptr m_xBackgroundFullSizeCB;
 std::unique_ptr m_xInsideLbl;
 std::unique_ptr m_xOutsideLbl;
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 53dfe1e5cb5d..729aef82bbfd 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -179,6 +179,7 @@ SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, 
weld::DialogController*
 , m_xRegisterLB(m_xBuilder->weld_combo_box("comboRegisterStyle"))
 , m_xGutterPositionFT(m_xBuilder->weld_label("labelGutterPosition"))
 , m_xGutterPositionLB(m_xBuilder->weld_combo_box("comboGutterPosition"))
+, m_xRtlGutterCB(m_xBuilder->weld_check_button("checkRtlGutter"))
 , 
m_xBackgroundFullSizeCB(m_xBuilder->weld_check_button("checkBackgroundFullSize"))
 // Strings stored in UI
 , m_xInsideLbl(m_xBuilder->weld_label("labelInner"))
@@ -383,6 +384,14 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 // Left.
 m_xGutterPositionLB->set_active(0);
 }
+it = rGrabBagItem.GetGrabBag().find("RtlGutter");
+bool bRtlGutter{};
+if (it != rGrabBagItem.GetGrabBag().end())
+{
+it->second >>= bRtlGutter;
+m_xRtlGutterCB->set_active(bRtlGutter);
+m_xRtlGutterCB->show();
+}
 it = rGrabBagItem.GetGrabBag().find("BackgroundFullSize");
 bool isBackgroundFullSize{};
 if (it != rGrabBagItem.GetGrabBag().end())
@@ -572,6 +581,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 m_xHorzBox->save_state();
 m_xAdaptBox->save_state();
 m_xGutterPositionLB->save_value();
+m_xRtlGutterCB->save_state();
 m_xBackgroundFullSizeCB->save_state();
 
 CheckMarginEdits( true );
@@ -669,6 +679,12 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet )
 aGrabBagItem.GetGrabBag()["GutterAtTop"] <<= bGutterAtTop;
 bModified = true;
 }
+if (m_xRtlGutterCB->get_state_changed_from_saved())
+{
+bool const bRtlGutter(m_xRtlGutterCB->get_active());
+aGrabBagItem.GetGrabBag()["RtlGutter"] <<= bRtlGutter;
+bModified = true;
+}
 if (m_xBackgroundFullSizeCB->get_state_changed_from_saved())
 {
 bool const 
isBackgroundFullSize(m_xBackgroundFullSizeCB->get_active());
diff --git a/cui/uiconfig/ui/pageformatpage.ui 
b/cui/uiconfig/ui/pageformatpage.ui
index b6974eebc15d..3a28c29409a5 100644
--- a/cui/uiconfig/ui/pageformatpage.ui
+++ b/cui/uiconfig/ui/pageformatpage.ui
@@ -706,6 +706,20 @@
 
   
 
+
+  
+Gutter on right side of page
+True
+False
+True
+True
+True
+  
+  
+1
+8
+  
+
 
   
 Background covers 
margins
@@ -723,7 +737,7 @@
   
   
 1
-8
+9
   
 
   
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index fccf94925187..631d728ba4bd 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -536,6 +536,7 @@ void SwFrame::UpdateAttrFrame( const SfxPoolItem *pOld, 
const SfxPoolItem *pNew,
 [[fallthrough]];
 case RES_LR_SPACE:
 case RES_UL_SPACE:
+case RES_RTL_GUTTER:
 rInvFlags |= 0x0B;
 break;
 
diff --git a/sw/source/uibase/utlui/uitool.cxx 
b/sw/source/uibase/u

[Libreoffice-commits] core.git: cui/source cui/uiconfig offapi/com schema/odf1.3 sw/inc sw/qa sw/source xmloff/source

2021-03-25 Thread Michael Stahl (via logerrit)
 cui/source/inc/page.hxx   |1 
 cui/source/tabpages/page.cxx  |   16 +
 cui/uiconfig/ui/pageformatpage.ui |   20 ++
 offapi/com/sun/star/style/PageProperties.idl  |7 
 schema/odf1.3/OpenDocument-schema-v1.3.rng|5 
 sw/inc/hintids.hxx|  139 +++---
 sw/qa/extras/odfexport/data/pagestyle_background_lo70.odt |binary
 sw/qa/extras/odfexport/odfexport.cxx  |  107 ++
 sw/source/core/bastyp/init.cxx|2 
 sw/source/core/doc/docdesc.cxx|4 
 sw/source/core/layout/paintfrm.cxx|   11 -
 sw/source/core/layout/wsfrm.cxx   |1 
 sw/source/core/unocore/unomap1.cxx|1 
 sw/source/uibase/app/docst.cxx|   15 +
 sw/source/uibase/utlui/uitool.cxx |   27 ++
 xmloff/source/style/PageMasterExportPropMapper.cxx|   61 --
 xmloff/source/style/PageMasterStyleMap.cxx|3 
 17 files changed, 279 insertions(+), 141 deletions(-)

New commits:
commit 56d8007a197b095b09423c691a51515567648e80
Author: Michael Stahl 
AuthorDate: Tue Mar 16 20:10:18 2021 +0100
Commit: Michael Stahl 
CommitDate: Thu Mar 25 09:49:33 2021 +0100

tdf#134734 tdf#141059 tdf#122508 cui,sw,xmloff: BackgroundFullSize

* add BackgroundFullSize property to PageProperties
* add a checkbox on the SvxPageDescPage
* marshal the item via SfxGrabBagItem to avoid changing svxids.hrc
* add RES_BACKGROUND_FULL_SIZE item, pool default is "true" which is
  appropriate for Word import filters
* ODF export: remove hard-coded export in
  XMLPageMasterExportPropMapper::ContextFilter()
* use it in SwFrame::PaintSwFrameBackground()
* fix painting of bitmaps by also using the page frame area in
  SwFrame::GetBackgroundBrush(), which was the reason why
  f006b6339e20af6a3fbd60d97d21590d4ebf5021 painted things inconsistently
* force repaint in lcl_DescSetAttr()/SwFrame::UpdateAttrFrame()

Change-Id: I4cb64f87c01d17c051936e9b8128395fbb8b4fe5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112594
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index 1a2e8fb506c4..1d92d275d3a1 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -125,6 +125,7 @@ private:
 std::unique_ptr m_xRegisterLB;
 std::unique_ptr m_xGutterPositionFT;
 std::unique_ptr m_xGutterPositionLB;
+std::unique_ptr m_xBackgroundFullSizeCB;
 std::unique_ptr m_xInsideLbl;
 std::unique_ptr m_xOutsideLbl;
 std::unique_ptr m_xPrintRangeQueryText;
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index cc3cbcff0bb2..53dfe1e5cb5d 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -179,6 +179,7 @@ SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, 
weld::DialogController*
 , m_xRegisterLB(m_xBuilder->weld_combo_box("comboRegisterStyle"))
 , m_xGutterPositionFT(m_xBuilder->weld_label("labelGutterPosition"))
 , m_xGutterPositionLB(m_xBuilder->weld_combo_box("comboGutterPosition"))
+, 
m_xBackgroundFullSizeCB(m_xBuilder->weld_check_button("checkBackgroundFullSize"))
 // Strings stored in UI
 , m_xInsideLbl(m_xBuilder->weld_label("labelInner"))
 , m_xOutsideLbl(m_xBuilder->weld_label("labelOuter"))
@@ -382,6 +383,14 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 // Left.
 m_xGutterPositionLB->set_active(0);
 }
+it = rGrabBagItem.GetGrabBag().find("BackgroundFullSize");
+bool isBackgroundFullSize{};
+if (it != rGrabBagItem.GetGrabBag().end())
+{
+it->second >>= isBackgroundFullSize;
+m_xBackgroundFullSizeCB->set_active(isBackgroundFullSize);
+m_xBackgroundFullSizeCB->show();
+}
 }
 
 // general page data
@@ -563,6 +572,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 m_xHorzBox->save_state();
 m_xAdaptBox->save_state();
 m_xGutterPositionLB->save_value();
+m_xBackgroundFullSizeCB->save_state();
 
 CheckMarginEdits( true );
 
@@ -659,6 +669,12 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet )
 aGrabBagItem.GetGrabBag()["GutterAtTop"] <<= bGutterAtTop;
 bModified = true;
 }
+if (m_xBackgroundFullSizeCB->get_state_changed_from_saved())
+{
+bool const 
isBackgroundFullSize(m_xBackgroundFullSizeCB->get_active());
+aGrabBagItem.GetGrabBag()["BackgroundFullSize"] <<= 
isBackgroundFullSize;
+bModified = true;
+}
 
 if (bModified)
 {
diff --git a/cui/uiconfig/ui/pageformatpage.ui 
b/cui/uiconfi

[Libreoffice-commits] core.git: cui/source cui/uiconfig sc/qa sw/qa

2021-03-24 Thread homeboy445 (via logerrit)
 cui/source/dialogs/QrCodeGenDialog.cxx|2 +-
 cui/uiconfig/ui/qrcodegen.ui  |   18 +-
 sc/qa/uitest/calc_tests3/insertQrCodeGen.py   |4 ++--
 sw/qa/uitest/writer_tests3/insertQrCodeGen.py |4 ++--
 4 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit a20c9604f1f53e01850fb753e7f932e7648d2459
Author: homeboy445 
AuthorDate: Sun Mar 21 14:38:33 2021 +0530
Commit: Samuel Mehrbrodt 
CommitDate: Wed Mar 24 08:36:44 2021 +0100

QR Code Dialog: Change term 'border' to 'margin'

This adds a margin around the qr code (white space), not a border.

Change-Id: If3e74dfe19dd7f9c063eaa6439810d617a99cb45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112831
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
index d4ac05e965f0..9e4d1df1d96d 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -155,7 +155,7 @@ QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, 
Reference xModel
   m_xBuilder->weld_radio_button("button_medium"),
   m_xBuilder->weld_radio_button("button_quartile"),
   m_xBuilder->weld_radio_button("button_high") }
-, m_xSpinBorder(m_xBuilder->weld_spin_button("edit_border"))
+, m_xSpinBorder(m_xBuilder->weld_spin_button("edit_margin"))
 #if ENABLE_ZXING
 , mpParent(pParent)
 #endif
diff --git a/cui/uiconfig/ui/qrcodegen.ui b/cui/uiconfig/ui/qrcodegen.ui
index a66daa6aed6a..aa9064f6e0dc 100644
--- a/cui/uiconfig/ui/qrcodegen.ui
+++ b/cui/uiconfig/ui/qrcodegen.ui
@@ -2,7 +2,7 @@
 
 
   
-  
+  
 75
 1
 1
@@ -129,7 +129,7 @@
 True
 False
 start
-URL/Text 
:
+URL/Text:
 True
 edit_text
 0
@@ -140,13 +140,13 @@
   
 
 
-  
+  
 True
 False
 start
-Border 
:
+Margin:
 True
-edit_border
+edit_margin
 0
   
   
@@ -187,17 +187,17 @@
   
 
 
-  
+  
 True
 True
 True
-border_value
+margin_value
 True
 True
 True
 
-  
-The width in dots of the border 
surrounding the QR code.
+  
+The margin surrounding the QR 
code.
   
 
   
diff --git a/sc/qa/uitest/calc_tests3/insertQrCodeGen.py 
b/sc/qa/uitest/calc_tests3/insertQrCodeGen.py
index 831fe40eef8d..3dfd396e3fd5 100644
--- a/sc/qa/uitest/calc_tests3/insertQrCodeGen.py
+++ b/sc/qa/uitest/calc_tests3/insertQrCodeGen.py
@@ -36,7 +36,7 @@ class insertQrCode(UITestCase):
 # Get elements in the Dialog Box
 xURL = xDialog.getChild("edit_text")
 xECC_Low = xDialog.getChild("button_low") #How radio button input is 
written in text.
-xBorder = xDialog.getChild("edit_border")
+xBorder = xDialog.getChild("edit_margin")
 
 type_text(xURL, "www.libreoffice.org") #set the QR code
 xECC_Low.executeAction("CLICK", tuple())
@@ -63,7 +63,7 @@ class insertQrCode(UITestCase):
 
 xURL = xDialog.getChild("edit_text")
 xECC_Low = xDialog.getChild("button_low")
-xBorder = xDialog.getChild("edit_border")
+xBorder = xDialog.getChild("edit_margin")
 
 type_text(xURL, "www.libreoffice.org") #set the QR code
 xECC_Low.executeAction("CLICK", tuple())
diff --git a/sw/qa/uitest/writer_tests3/insertQrCodeGen.py 
b/sw/qa/uitest/writer_tests3/insertQrCodeGen.py
index 3124022e0f01..c346932dd5a1 100644
--- a/sw/qa/uitest/writer_tests3/insertQrCodeGen.py
+++ b/sw/qa/uitest/writer_tests3/insertQrCodeGen.py
@@ -35,7 +35,7 @@ class insertQrCode(UITestCase):
 # Get elements in the Dialog Box
 xURL = xDialog.getChild("edit_text")
 xECC_Low = xDialog.getChild("button_low") #How radio button input is 
written in text.
-xBorder = xDialog.getChild("edit_border")
+xBorder = xDialog.getChild("edit_margin")
 
 type_text(xURL, "www.libreoffice.org") #set the QR code
 xECC_Low.executeAction("CLICK", tuple())
@@ -61,7 +61,7

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

2021-03-10 Thread Heiko Tietze (via logerrit)
 cui/source/dialogs/tipofthedaydlg.cxx |   12 +++-
 cui/uiconfig/ui/tipofthedaydialog.ui  |4 +++-
 2 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 7abfb02bda53ed71cdca335fa99490992fa7092b
Author: Heiko Tietze 
AuthorDate: Mon Mar 8 08:47:21 2021 +0100
Commit: Heiko Tietze 
CommitDate: Wed Mar 10 10:26:14 2021 +0100

tdf#140839 - Scale TotD image

Fix preview size of 100x120px
Margin added

Change-Id: If1caad336f2c3ce492aa9551a170b9b20a9b8b50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112152
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/dialogs/tipofthedaydlg.cxx 
b/cui/source/dialogs/tipofthedaydlg.cxx
index 2404052271e6..478780578b56 100644
--- a/cui/source/dialogs/tipofthedaydlg.cxx
+++ b/cui/source/dialogs/tipofthedaydlg.cxx
@@ -42,6 +42,9 @@
 #include 
 #include 
 
+//size of preview
+const Size ThumbSize(100, 120);
+
 TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent)
 : GenericDialogController(pParent, "cui/ui/tipofthedaydialog.ui", 
"TipOfTheDayDialog")
 , m_pText(m_xBuilder->weld_label("lbText"))
@@ -52,8 +55,8 @@ TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent)
 {
 
m_pShowTip->set_active(officecfg::Office::Common::Misc::ShowTipOfTheDay::get());
 m_pNext->connect_clicked(LINK(this, TipOfTheDayDialog, OnNextClick));
-
 m_nCurrentTip = officecfg::Office::Common::Misc::LastTipOfTheDayID::get();
+m_pPreview->set_size_request(ThumbSize.Width(), ThumbSize.Height());
 
 const auto t0 = std::chrono::system_clock::now().time_since_epoch();
 m_nDay = std::chrono::duration_cast(t0).count() / 24;
@@ -176,6 +179,13 @@ void TipOfTheDayDialog::UpdateTip()
 aImageName = "tipoftheday.png";
 Graphic aGraphic;
 GraphicFilter::LoadGraphic(aURL + aImageName, OUString(), aGraphic);
+
+if (!aGraphic.IsAnimated())
+{
+BitmapEx aBmpEx(aGraphic.GetBitmapEx());
+if (aBmpEx.Scale(ThumbSize))
+aGraphic = aBmpEx;
+}
 m_aPreview.SetPreview(aGraphic);
 }
 
diff --git a/cui/uiconfig/ui/tipofthedaydialog.ui 
b/cui/uiconfig/ui/tipofthedaydialog.ui
index 4ee6522558b2..e05738d8466a 100644
--- a/cui/uiconfig/ui/tipofthedaydialog.ui
+++ b/cui/uiconfig/ui/tipofthedaydialog.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -86,6 +86,8 @@
   
 True
 False
+6
+12
   
   
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-08 Thread Miklos Vajna (via logerrit)
 cui/source/inc/page.hxx   |3 +
 cui/source/tabpages/page.cxx  |   77 --
 cui/uiconfig/ui/pageformatpage.ui |   28 +
 sw/source/core/doc/DocumentSettingManager.cxx |5 +
 sw/source/uibase/app/docst.cxx|   30 ++
 sw/source/uibase/app/docstyle.cxx |2 
 6 files changed, 141 insertions(+), 4 deletions(-)

New commits:
commit 63d3bf99101e2138a21a74a3d717d4f25d3d242f
Author: Miklos Vajna 
AuthorDate: Mon Feb 8 09:46:50 2021 +0100
Commit: Miklos Vajna 
CommitDate: Mon Feb 8 11:01:43 2021 +0100

tdf#91920 sw page gutter margin, from top: add UI

- read from sw::DocumentSettingManager::mbGutterAtTop

- improve the preview widget to take gutter position into account

- also change it when the gutter position widget changes

- write it back to sw::DocumentSettingManager::mbGutterAtTop on
  modification

- always check if the dialog's input item set has SID_ATTR_CHAR_GRABBAG,
  otherwise do nothing to keep Calc/Impress unchanged

Change-Id: I05ef864bf7ac18f4c6829d78312044560e6402d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110488
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index d4a39f9b68e3..1a2e8fb506c4 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -123,6 +123,8 @@ private:
 std::unique_ptr m_xRegisterCB;
 std::unique_ptr m_xRegisterFT;
 std::unique_ptr m_xRegisterLB;
+std::unique_ptr m_xGutterPositionFT;
+std::unique_ptr m_xGutterPositionLB;
 std::unique_ptr m_xInsideLbl;
 std::unique_ptr m_xOutsideLbl;
 std::unique_ptr m_xPrintRangeQueryText;
@@ -130,6 +132,7 @@ private:
 
 voidInit_Impl();
 DECL_LINK(LayoutHdl_Impl, weld::ComboBox&, void);
+DECL_LINK(GutterPositionHdl_Impl, weld::ComboBox&, void);
 DECL_LINK(PaperBinHdl_Impl, weld::Widget&, void);
 DECL_LINK(SwapOrientation_Impl, weld::Button&, void);
 void SwapFirstValues_Impl( bool bSet );
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 9a4ee5003f59..cc3cbcff0bb2 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -52,6 +52,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 // static 
 
@@ -175,6 +177,8 @@ SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, 
weld::DialogController*
 , m_xRegisterCB(m_xBuilder->weld_check_button("checkRegisterTrue"))
 , m_xRegisterFT(m_xBuilder->weld_label("labelRegisterStyle"))
 , m_xRegisterLB(m_xBuilder->weld_combo_box("comboRegisterStyle"))
+, m_xGutterPositionFT(m_xBuilder->weld_label("labelGutterPosition"))
+, m_xGutterPositionLB(m_xBuilder->weld_combo_box("comboGutterPosition"))
 // Strings stored in UI
 , m_xInsideLbl(m_xBuilder->weld_label("labelInner"))
 , m_xOutsideLbl(m_xBuilder->weld_label("labelOuter"))
@@ -305,6 +309,7 @@ void SvxPageDescPage::Init_Impl()
 {
 // adjust the handler
 m_xLayoutBox->connect_changed(LINK(this, SvxPageDescPage, LayoutHdl_Impl));
+m_xGutterPositionLB->connect_changed(LINK(this, SvxPageDescPage, 
GutterPositionHdl_Impl));
 
 m_xPaperSizeBox->connect_changed(LINK(this, SvxPageDescPage, 
PaperSizeSelect_Impl));
 m_xPaperWidthEdit->connect_value_changed( LINK(this, SvxPageDescPage, 
PaperSizeModify_Impl));
@@ -326,7 +331,7 @@ void SvxPageDescPage::Init_Impl()
 void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 {
 SfxItemPool* pPool = rSet->GetPool();
-DBG_ASSERT( pPool, "Where is the pool?" );
+SAL_WARN_IF(!pPool, "cui.tabpages", "Where is the pool?");
 MapUnit eUnit = pPool->GetMetric( GetWhich( SID_ATTR_LRSPACE ) );
 
 // adjust margins (right/left)
@@ -358,6 +363,27 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 static_cast(ConvertLong_Impl( 
static_cast(rULSpace.GetLower()), eUnit )) );
 }
 
+if (rSet->HasItem(SID_ATTR_CHAR_GRABBAG, &pItem))
+{
+const auto& rGrabBagItem = static_cast(*pItem);
+bool bGutterAtTop{};
+auto it = rGrabBagItem.GetGrabBag().find("GutterAtTop");
+if (it != rGrabBagItem.GetGrabBag().end())
+{
+it->second >>= bGutterAtTop;
+}
+
+if (bGutterAtTop)
+{
+m_xGutterPositionLB->set_active(1);
+}
+else
+{
+// Left.
+m_xGutterPositionLB->set_active(0);
+}
+}
+
 // general page data
 SvxNumType eNumType = SVX_NUM_ARABIC;
 bLandscape = ( mpDefPrinter->GetOrientation() == Orientation::Landscape );
@@ -480,6 +506,8 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 
 m_xGutterMarginLbl->hide();
 m_xGutterMarginEdit->hide();
+m_xGutterPositionFT->hide();
+

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

2021-02-04 Thread Miklos Vajna (via logerrit)
 cui/source/inc/page.hxx   |2 ++
 cui/source/tabpages/page.cxx  |   24 +++-
 cui/uiconfig/ui/pageformatpage.ui |   32 
 3 files changed, 57 insertions(+), 1 deletion(-)

New commits:
commit e1d7242341ec148b631a96e6d63697bce6a497c9
Author: Miklos Vajna 
AuthorDate: Thu Feb 4 14:07:21 2021 +0100
Commit: Miklos Vajna 
CommitDate: Thu Feb 4 16:52:03 2021 +0100

tdf#91920 sw page gutter margin: add UI

Also update the preview widget and hide the new UI in Calc/Impress.

Change-Id: Ic5c0ba100f6e886651d83c04961e9f0566a4202c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110414
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index 1513347e481f..d4a39f9b68e3 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -106,6 +106,8 @@ private:
 std::unique_ptr m_xRightMarginEdit;
 std::unique_ptr m_xTopMarginEdit;
 std::unique_ptr m_xBottomMarginEdit;
+std::unique_ptr m_xGutterMarginLbl;
+std::unique_ptr m_xGutterMarginEdit;
 // layout settings
 std::unique_ptr m_xPageText;
 std::unique_ptr m_xLayoutBox;
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index e478fbc5f492..9a4ee5003f59 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -162,6 +162,8 @@ SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, 
weld::DialogController*
 , m_xRightMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargRight", 
FieldUnit::CM))
 , m_xTopMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargTop", 
FieldUnit::CM))
 , m_xBottomMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargBot", 
FieldUnit::CM))
+, m_xGutterMarginLbl(m_xBuilder->weld_label("labelGutterMargin"))
+, m_xGutterMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargGut", 
FieldUnit::CM))
 , m_xPageText(m_xBuilder->weld_label("labelPageLayout"))
 , m_xLayoutBox(m_xBuilder->weld_combo_box("comboPageLayout"))
 , m_xNumberFormatText(m_xBuilder->weld_label("labelPageNumbers"))
@@ -231,6 +233,7 @@ SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, 
weld::DialogController*
 SetFieldUnit( *m_xRightMarginEdit, eFUnit );
 SetFieldUnit( *m_xTopMarginEdit, eFUnit );
 SetFieldUnit( *m_xBottomMarginEdit, eFUnit );
+SetFieldUnit(*m_xGutterMarginEdit, eFUnit);
 SetFieldUnit( *m_xPaperWidthEdit, eFUnit );
 SetFieldUnit( *m_xPaperHeightEdit, eFUnit );
 
@@ -281,6 +284,9 @@ SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, 
weld::DialogController*
 
m_xRightMarginEdit->set_max(m_xRightMarginEdit->normalize(aDrawinglayerOpt.GetMaximumPaperRightMargin()),
 FieldUnit::MM);
 
m_xTopMarginEdit->set_max(m_xTopMarginEdit->normalize(aDrawinglayerOpt.GetMaximumPaperTopMargin()),
 FieldUnit::MM);
 
m_xBottomMarginEdit->set_max(m_xBottomMarginEdit->normalize(aDrawinglayerOpt.GetMaximumPaperBottomMargin()),
 FieldUnit::MM);
+m_xGutterMarginEdit->set_max(
+
m_xGutterMarginEdit->normalize(aDrawinglayerOpt.GetMaximumPaperLeftMargin()),
+FieldUnit::MM);
 
 // Get the i18n framework numberings and add them to the listbox.
 
SvxNumOptionsTabPageHelper::GetI18nNumbering(m_xNumberFormatBox->get_widget(), 
std::numeric_limits::max());
@@ -311,6 +317,7 @@ void SvxPageDescPage::Init_Impl()
 m_xRightMarginEdit->connect_value_changed(aLink);
 m_xTopMarginEdit->connect_value_changed(aLink);
 m_xBottomMarginEdit->connect_value_changed(aLink);
+m_xGutterMarginEdit->connect_value_changed(aLink);
 
 m_xHorzBox->connect_toggled(LINK(this, SvxPageDescPage, CenterHdl_Impl));
 m_xVertBox->connect_toggled(LINK(this, SvxPageDescPage, CenterHdl_Impl));
@@ -329,6 +336,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 {
 const SvxLRSpaceItem& rLRSpace = static_cast(*pItem);
 SetMetricValue( *m_xLeftMarginEdit, rLRSpace.GetLeft(), eUnit );
+SetMetricValue(*m_xGutterMarginEdit, rLRSpace.GetGutterMargin(), 
eUnit);
 m_aBspWin.SetLeft(
 static_cast(ConvertLong_Impl( rLRSpace.GetLeft(), 
eUnit )) );
 SetMetricValue( *m_xRightMarginEdit, rLRSpace.GetRight(), eUnit );
@@ -470,6 +478,9 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 m_aBspWin.SetHorz(m_xHorzBox->get_active());
 m_aBspWin.SetVert(m_xVertBox->get_active());
 
+m_xGutterMarginLbl->hide();
+m_xGutterMarginEdit->hide();
+
 break;
 }
 
@@ -485,6 +496,9 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 m_xLayoutBox->hide();
 m_xPageText->hide();
 
+m_xGutterMarginLbl->hide();
+m_xGutterMarginEdit->hide();
+
 break;
 }
 default: ;//prevent warning
@@ -506,6 +520,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 m_xRightMarg

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

2021-01-15 Thread diwanshu885 (via logerrit)
 cui/source/dialogs/FontFeaturesDialog.cxx |5 +
 cui/uiconfig/ui/fontfeaturesdialog.ui |5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit e97bccdba42b464e2df8d5996d4cdc9b03b6c243
Author: diwanshu885 
AuthorDate: Wed Dec 9 00:44:10 2020 +0530
Commit: Jim Raykowski 
CommitDate: Fri Jan 15 22:49:57 2021 +0100

tdf#128176 Add a vertical scrollwindow to fontfeaturesdialog

Change-Id: Id58b3888069fd0136f5620cb5f82c8649a0dfd76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107435
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
index c1e79b4515d7..71c9e34d3e73 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -75,6 +75,11 @@ void FontFeaturesDialog::initialize()
 
 fillGrid(rFilteredFontFeatures);
 
+m_xContentWindow->set_size_request(
+-1, std::min(std::max(m_xContentWindow->get_preferred_size().Height(),
+  m_xContentGrid->get_preferred_size().Height()),
+ 300L));
+
 updateFontPreview();
 }
 
diff --git a/cui/uiconfig/ui/fontfeaturesdialog.ui 
b/cui/uiconfig/ui/fontfeaturesdialog.ui
index f283cff7ebed..fa36d66ff476 100644
--- a/cui/uiconfig/ui/fontfeaturesdialog.ui
+++ b/cui/uiconfig/ui/fontfeaturesdialog.ui
@@ -84,8 +84,8 @@
 True
 True
 never
-never
-in
+automatic
+none
 
   
 True
@@ -98,6 +98,7 @@
 start
 6
 12
+6
 
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-14 Thread Miklos Vajna (via logerrit)
 cui/source/dialogs/sdrcelldlg.cxx|7 +
 cui/source/inc/sdrcelldlg.hxx|2 +
 cui/uiconfig/ui/formatcellsdialog.ui |   48 +++
 svx/source/table/tablecontroller.cxx |   12 
 4 files changed, 69 insertions(+)

New commits:
commit 74ba28fe238b7f15d1fb7d119e4cef3a7b544e0b
Author: Miklos Vajna 
AuthorDate: Mon Dec 14 12:15:09 2020 +0100
Commit: Miklos Vajna 
CommitDate: Mon Dec 14 13:02:19 2020 +0100

tdf#129961 cui: start UI for table shadow as direct format

It reads from the doc model and shows it, but doesn't write it back yet.

Change-Id: I6611229e71d0a49f09576ca452b901958c33db58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107682
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/cui/source/dialogs/sdrcelldlg.cxx 
b/cui/source/dialogs/sdrcelldlg.cxx
index 3c745692f7ea..fda8b4ce1385 100644
--- a/cui/source/dialogs/sdrcelldlg.cxx
+++ b/cui/source/dialogs/sdrcelldlg.cxx
@@ -27,6 +27,7 @@ SvxFormatCellsDialog::SvxFormatCellsDialog(weld::Window* 
pParent, const SfxItemS
 : SfxTabDialogController(pParent, "cui/ui/formatcellsdialog.ui", 
"FormatCellsDialog", pAttr)
 , mrOutAttrs(*pAttr)
 , mpColorTab(rModel.GetColorList())
+, mnColorTabState ( ChangeType::NONE )
 , mpGradientList(rModel.GetGradientList())
 , mpHatchingList(rModel.GetHatchList())
 , mpBitmapList(rModel.GetBitmapList())
@@ -36,6 +37,7 @@ SvxFormatCellsDialog::SvxFormatCellsDialog(weld::Window* 
pParent, const SfxItemS
 AddTabPage("effects", RID_SVXPAGE_CHAR_EFFECTS);
 AddTabPage("border", RID_SVXPAGE_BORDER );
 AddTabPage("area", RID_SVXPAGE_AREA);
+AddTabPage("shadow", SvxShadowTabPage::Create, nullptr);
 }
 
 void SvxFormatCellsDialog::PageCreated(const OString& rId, SfxTabPage &rPage)
@@ -55,6 +57,11 @@ void SvxFormatCellsDialog::PageCreated(const OString& rId, 
SfxTabPage &rPage)
 SvxBorderTabPage& rBorderPage = static_cast(rPage);
 rBorderPage.SetTableMode();
 }
+else if (rId == "shadow")
+{
+static_cast(rPage).SetColorList( mpColorTab );
+static_cast(rPage).SetColorChgd( &mnColorTabState );
+}
 else
 SfxTabDialogController::PageCreated(rId, rPage);
 }
diff --git a/cui/source/inc/sdrcelldlg.hxx b/cui/source/inc/sdrcelldlg.hxx
index a9f6183bd1d1..5b7e9ca71a20 100644
--- a/cui/source/inc/sdrcelldlg.hxx
+++ b/cui/source/inc/sdrcelldlg.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 
 class SdrModel;
 class SvxFormatCellsDialog : public SfxTabDialogController
@@ -30,6 +31,7 @@ private:
 const SfxItemSet&   mrOutAttrs;
 
 XColorListRef   mpColorTab;
+ChangeType  mnColorTabState;
 XGradientListRefmpGradientList;
 XHatchListRef   mpHatchingList;
 XBitmapListRef  mpBitmapList;
diff --git a/cui/uiconfig/ui/formatcellsdialog.ui 
b/cui/uiconfig/ui/formatcellsdialog.ui
index 32c9b0558c4e..3ac39e087551 100644
--- a/cui/uiconfig/ui/formatcellsdialog.ui
+++ b/cui/uiconfig/ui/formatcellsdialog.ui
@@ -285,6 +285,54 @@
 False
   
 
+
+  
+  
+True
+False
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+  
+  
+4
+  
+
+
+  
+True
+False
+Shadow
+  
+  
+5
+False
+  
+
   
   
 False
diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index ee40835ec5d8..1dce1dab81ec 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -925,6 +925,18 @@ void SvxTableController::onFormatTable(const SfxRequest& 
rReq)
 aNewAttr.Put( aBoxItem );
 aNewAttr.Put( aBoxInfoItem );
 
+// Fill in shadow properties.
+const SfxItemSet& rTableItemSet = rTableObj.GetMergedItemSet();
+for (sal_uInt16 nWhich = SDRATTR_SHADOW_FIRST; nWhich <= 
SDRATTR_SHADOW_LAST; ++nWhich)
+{
+if (rTableItemSet.GetItemState(nWhich, false) != SfxItemState::SET)
+{
+continue;
+}
+
+aNewAttr.Put(rTableItemSet.Get(nWhich));
+}
+
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
 VclPtr xDlg( pFact->CreateSvxFormatCellsDialog(
 rReq.GetFrameWeld(),
_

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

2020-12-14 Thread Caolán McNamara (via logerrit)
 cui/source/inc/optpath.hxx  |1 +
 cui/source/options/optpath.cxx  |   10 ++
 cui/uiconfig/ui/optpathspage.ui |4 ++--
 3 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 298663c36bdb64cf05bc80abb7d212ed1091b6a9
Author: Caolán McNamara 
AuthorDate: Sun Dec 13 20:08:09 2020 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 14 09:38:29 2020 +0100

tdf#138874 restore sort on first column of paths treeview

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

diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx
index d4eca9c83413..c3b9aafbbae5 100644
--- a/cui/source/inc/optpath.hxx
+++ b/cui/source/inc/optpath.hxx
@@ -49,6 +49,7 @@ private:
 DECL_LINK(StandardHdl_Impl, weld::Button&, void);
 
 DECL_LINK(PathSelect_Impl, weld::TreeView&, void);
+DECL_LINK(HeaderBarClick, int, void);
 
 DECL_LINK(DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void);
 
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index b5cf2dc2378b..77432e0b7764 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -195,12 +195,20 @@ SvxPathTabPage::SvxPathTabPage(weld::Container* pPage, 
weld::DialogController* p
  m_xPathBox->get_height_rows(20));
 
 m_xPathBox->connect_row_activated( LINK( this, SvxPathTabPage, 
DoubleClickPathHdl_Impl ) );
+m_xPathBox->connect_column_clicked(LINK(this, SvxPathTabPage, 
HeaderBarClick));
 m_xPathBox->connect_changed( LINK( this, SvxPathTabPage, PathSelect_Impl ) 
);
 m_xPathBox->set_selection_mode(SelectionMode::Multiple);
 
 xDialogListener->SetDialogClosedLink( LINK( this, SvxPathTabPage, 
DialogClosedHdl ) );
 }
 
+IMPL_LINK(SvxPathTabPage, HeaderBarClick, int, nColumn, void)
+{
+bool bSortAtoZ = !m_xPathBox->get_sort_order();
+m_xPathBox->set_sort_order(bSortAtoZ);
+m_xPathBox->set_sort_indicator(bSortAtoZ ? TRISTATE_TRUE : TRISTATE_FALSE, 
nColumn);
+}
+
 SvxPathTabPage::~SvxPathTabPage()
 {
 for (int i = 0, nEntryCount = m_xPathBox->n_children(); i < nEntryCount; 
++i)
@@ -228,6 +236,7 @@ bool SvxPathTabPage::FillItemSet( SfxItemSet* )
 void SvxPathTabPage::Reset( const SfxItemSet* )
 {
 m_xPathBox->clear();
+m_xPathBox->make_unsorted();
 
 std::unique_ptr xIter = m_xPathBox->make_iterator();
 for( sal_uInt16 i = 0; i <= 
sal_uInt16(SvtPathOptions::Paths::Classification); ++i )
@@ -320,6 +329,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
 }
 
 m_xPathBox->columns_autosize();
+m_xPathBox->make_sorted();
 PathSelect_Impl(*m_xPathBox);
 }
 
diff --git a/cui/uiconfig/ui/optpathspage.ui b/cui/uiconfig/ui/optpathspage.ui
index 7b436abaed43..b469c0bd98fc 100644
--- a/cui/uiconfig/ui/optpathspage.ui
+++ b/cui/uiconfig/ui/optpathspage.ui
@@ -80,6 +80,8 @@
 True
 6
 Type
+True
+True
 
   
   
@@ -100,7 +102,6 @@
 True
 6
 User Paths
-True
 
   
   
@@ -115,7 +116,6 @@
 True
 6
 Internal Paths
-True
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-13 Thread Jan-Marek Glogowski (via logerrit)
 cui/source/options/fontsubs.cxx |   45 
 cui/uiconfig/ui/optfontspage.ui |6 +++--
 vcl/source/control/edit.cxx |7 +-
 3 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit 579cf9548615e8535a0569a8eb4cdf325fbbbac7
Author: Jan-Marek Glogowski 
AuthorDate: Sat Dec 12 20:47:37 2020 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Sun Dec 13 09:03:22 2020 +0100

tdf#138857 fix font replacement table GUI

- fix the get_text calls missed in tdf#136534, so combo box entry
  and table selection are synced again
- unselect the table row, if the combo box entry doesn't match
  anymore the selected table row.
- empty the combo box entries on multiple selection (allowd for
  mass delete only)
- move the "apply replacement table" checkbox before the table
- also change the comboboxes's sensitivity when toggling the
  "apply replacement table" checkbox.

Change-Id: Ib509e46e3a468ece6ab20e6be41c04caec3265ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107642
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 997f57798860..fa05481d0663 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -227,7 +227,7 @@ void  SvxFontSubstTabPage::Reset( const SfxItemSet* )
 m_xCheckLB->set_sort_column(2);
 m_xCheckLB->set_sort_indicator(TRISTATE_TRUE, 2);
 
-CheckEnable();
+SelectHdl(m_xFont1CB.get());
 
 //fill font name box first
 m_xNonPropFontsOnlyCB->set_active(
@@ -271,7 +271,7 @@ namespace
 {
 for (int i = 0, nEntryCount = rTreeView.n_children(); i < nEntryCount; 
++i)
 {
-if (rTreeView.get_text(i, 3) == rCol)
+if (rTreeView.get_text(i, 2) == rCol)
 return i;
 }
 return -1;
@@ -282,7 +282,7 @@ namespace
 int nRow = findText(rTreeView, rCol1);
 if (nRow == -1)
 return false;
-return rTreeView.get_text(nRow, 4) == rCol2;
+return rTreeView.get_text(nRow, 3) == rCol2;
 }
 }
 
@@ -323,12 +323,18 @@ void SvxFontSubstTabPage::SelectHdl(const weld::Widget* 
pWin)
 
 if (pWin == m_xCheckLB.get())
 {
-if (m_xCheckLB->count_selected_rows() == 1)
+const int nSelectedRowCount = m_xCheckLB->count_selected_rows();
+if (nSelectedRowCount == 1)
 {
 int nRow = m_xCheckLB->get_selected_index();
 m_xFont1CB->set_entry_text(m_xCheckLB->get_text(nRow, 2));
 m_xFont2CB->set_entry_text(m_xCheckLB->get_text(nRow, 3));
 }
+else if (nSelectedRowCount > 1)
+{
+m_xFont1CB->set_entry_text(OUString());
+m_xFont2CB->set_entry_text(OUString());
+}
 }
 
 if (pWin == m_xFont1CB.get())
@@ -344,6 +350,8 @@ void SvxFontSubstTabPage::SelectHdl(const weld::Widget* 
pWin)
 m_xCheckLB->select(nPos);
 }
 }
+else
+m_xCheckLB->unselect_all();
 }
 
 CheckEnable();
@@ -370,13 +378,15 @@ void SvxFontSubstTabPage::CheckEnable()
 {
 bool bEnableAll = m_xUseTableCB->get_active();
 m_xCheckLB->set_sensitive(bEnableAll);
+m_xFont1CB->set_sensitive(bEnableAll);
+m_xFont2CB->set_sensitive(bEnableAll);
+
+bool bApply = bEnableAll, bDelete = bEnableAll;
+
 if (bEnableAll)
 {
-bool bApply, bDelete;
-
 int nEntry = m_xCheckLB->get_selected_index();
 
-// because of OS/2 optimization error (Bug #56267) a bit more 
intricate:
 if (m_xFont1CB->get_active_text().isEmpty() || 
m_xFont2CB->get_active_text().isEmpty())
 bApply = false;
 else if (m_xFont1CB->get_active_text() == 
m_xFont2CB->get_active_text())
@@ -389,27 +399,10 @@ void SvxFontSubstTabPage::CheckEnable()
 bApply = true;
 
 bDelete = nEntry != -1;
-
-m_xApply->set_sensitive(bApply);
-m_xDelete->set_sensitive(bDelete);
 }
 
-if (bEnableAll)
-{
-if (!m_xCheckLB->get_sensitive())
-{
-m_xCheckLB->set_sensitive(true);
-SelectHdl(m_xFont1CB.get());
-}
-}
-else
-{
-if (m_xCheckLB->get_sensitive())
-{
-m_xCheckLB->set_sensitive(false);
-m_xCheckLB->unselect_all();
-}
-}
+m_xApply->set_sensitive(bApply);
+m_xDelete->set_sensitive(bDelete);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/optfontspage.ui b/cui/uiconfig/ui/optfontspage.ui
index 854ac5055ae7..4f716f6b584d 100644
--- a/cui/uiconfig/ui/optfontspage.ui
+++ b/cui/uiconfig/ui/optfontspage.ui
@@ -258,6 +258,7 @@
 
 
   
+False
 True
 False
   

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

2020-11-06 Thread Caolán McNamara (via logerrit)
 cui/source/inc/autocdlg.hxx   |2 +-
 cui/source/tabpages/autocdlg.cxx  |   15 +++
 cui/uiconfig/ui/acorexceptpage.ui |2 ++
 3 files changed, 14 insertions(+), 5 deletions(-)

New commits:
commit 2e4657f57f8ac559a2f3be4286a4726465e88203
Author: Caolán McNamara 
AuthorDate: Fri Nov 6 16:52:50 2020 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 6 22:13:59 2020 +0100

Related: tdf#138030 make 'except' page act like 'replace'

wrt pressing return to activate the entries

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

diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 5aa4a8c6041f..86218a58a581 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -239,7 +239,7 @@ private:
 DECL_LINK(NewDelActionHdl, weld::Entry&, bool);
 DECL_LINK(SelectHdl, weld::TreeView&, void);
 DECL_LINK(ModifyHdl, weld::Entry&, void);
-voidNewDelHdl(const weld::Widget*);
+boolNewDelHdl(const weld::Widget*);
 /// Box filled with new language
 voidRefillReplaceBoxes(bool bFromReset,
 LanguageType eOldLanguage,
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 0ff5fcae4a4d..2328277eb4d8 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1029,7 +1029,7 @@ bool OfaAutocorrReplacePage::NewDelHdl(const 
weld::Widget* pBtn)
 DeleteEntry(m_xReplaceTLB->get_text(nEntry, 0), 
m_xReplaceTLB->get_text(nEntry, 1));
 m_xReplaceTLB->remove(nEntry);
 ModifyHdl(*m_xShortED);
-return false;
+return true;
 }
 }
 
@@ -1450,11 +1450,10 @@ IMPL_LINK(OfaAutocorrExceptPage, NewDelButtonHdl, 
weld::Button&, rBtn, void)
 
 IMPL_LINK(OfaAutocorrExceptPage, NewDelActionHdl, weld::Entry&, rEdit, bool)
 {
-NewDelHdl(&rEdit);
-return false;
+return NewDelHdl(&rEdit);
 }
 
-void OfaAutocorrExceptPage::NewDelHdl(const weld::Widget* pBtn)
+bool OfaAutocorrExceptPage::NewDelHdl(const weld::Widget* pBtn)
 {
 if ((pBtn == m_xNewAbbrevPB.get() || pBtn == m_xAbbrevED.get())
 && !m_xAbbrevED->get_text().isEmpty() && 
m_xNewAbbrevPB->get_sensitive())
@@ -1478,6 +1477,14 @@ void OfaAutocorrExceptPage::NewDelHdl(const 
weld::Widget* pBtn)
 m_xDoubleCapsLB->remove_text(m_xDoubleCapsED->get_text());
 ModifyHdl(*m_xDoubleCapsED);
 }
+else
+{
+// we didn't do anything, if this was because of 'activate' in an
+// entry then let it continue to close the dialog like the replace
+// page does
+return false;
+}
+return true;
 }
 
 IMPL_LINK(OfaAutocorrExceptPage, SelectHdl, weld::TreeView&, rBox, void)
diff --git a/cui/uiconfig/ui/acorexceptpage.ui 
b/cui/uiconfig/ui/acorexceptpage.ui
index 5c9b15678b4c..7558f7fd61ee 100644
--- a/cui/uiconfig/ui/acorexceptpage.ui
+++ b/cui/uiconfig/ui/acorexceptpage.ui
@@ -54,6 +54,7 @@
 True
 True
 True
+True
 
   
 Type an 
abbreviation followed by a period, and then click New. This prevents 
%PRODUCTNAME from automatically capitalizing the first letter of the word that 
comes after the period at the end of the abbreviation.
@@ -251,6 +252,7 @@
 True
 start
 True
+True
 
   
 Type the word 
or abbreviation that starts with two capital letters that you do not want 
%PRODUCTNAME to change to one initial capital. For example, enter PC to prevent 
%PRODUCTNAME from changing PC to Pc.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source cui/uiconfig include/unotools sw/qa unotools/source

2020-11-03 Thread Stephan Bergmann (via logerrit)
 cui/source/dialogs/AdditionsDialog.cxx|6 --
 cui/uiconfig/ui/additionsdialog.ui|1 +
 include/unotools/ucbstreamhelper.hxx  |2 --
 sw/qa/uitest/options/optionsDialog.py |5 +
 unotools/source/ucbhelper/ucbstreamhelper.cxx |5 -
 5 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 32f4186ff10bbd04b17ba806022a5fdab2f6d277
Author: Stephan Bergmann 
AuthorDate: Mon Nov 2 09:34:48 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 3 14:48:03 2020 +0100

ucbGet needs a non-null interaction handler after all

In db6c7a486395304f38e9ea52951f576f34749cbc "Use UCB instead of cURL to 
download
https files", I had not further investigated why using the (GUI) interaction
handler within utl::UcbStreamHelper::CreateStream would lead to deadlock 
during
UITest_sw_options
(UITEST_TEST_NAME=optionsDialog.optionsDialog.test_moreIconsDialog).  
Instead,
I had passed a null XInteractionHandler into 
utl::UcbStreamHelper::CreateStream,
assuming that would solve whatever the issue was (and it did make the UITest
pass).

However, that caused the AdditionsDialog to not be populated at all,
with

> warn:cui.dialogs:26878:26950:cui/source/dialogs/AdditionsDialog.cxx:95: 
Reading  failed with 0x20d(Error 
Area:Io Class:General Code:13)

(see comment at 

"Extensions button in Template choose does not show anything"), because
interaction requests like com.sun.star.ucb.CertificateValidationRequest 
were not
handled properly.

As it turns out, the real reason for the deadlock was that the UITest 
quickly
closes the dialog, causing the main thread to block at

  m_pSearchThread->join();

in ~AdditionsDialog waiting for the SearchAndParseThread to finish, while
SearchAndParseThread::execute encountered a CertificateValidationRequest 
that
needs to be handled and thus blocks in UUIInteractionHelper::handleRequest
(uui/source/iahndl.cxx) waiting for the main thread to process the
PostUserEvent.

In an ideal world, the UCB would allow to cancel the download request issued
from ucbGet while that download is waiting for the 
CertificateValidationRequest
to be handled, and the AdditionsDialog CloseButtonHdl would initiate such
cancellation.  Lacking that, just keep the Close button disabled until the
SearchAndParseThread has finished downloading.  (Pressing the Close button
earlier, ~AdditionsDialog would have blocked the main thread anyway until
SearchAndParseThread had finished downloading, so this should not actually
worsen the user experience.  And the UITest now blocks waiting for the Close
button to become enabled before pressing it; there would already be
UITest.wait_until_property_is_updated available, but it has a hard-coded 
timeout
which might or might not be relevant in existing uses of that function, so 
leave
it alone and repeat the relevant code without an unhelpful timeout here.)

This means that the additional utl::UcbStreamHelper::CreateStream overload
introduced in db6c7a486395304f38e9ea52951f576f34749cbc "Use UCB instead of 
cURL
to download https files" is not necessary after all, so remove it again.

Two further items that should be looked into:
* Should ucbGet pass the AdditionsDialog into 
utl::UcbStreamHelper::CreateStream
  as css::uno::Reference xParentWin argument (which 
defaults
  to null)?
* There might be similar deadlock issues involving ucbDownload, which can 
also
  be called (indirectly) from SearchAndParseThread::execute.

Change-Id: I8d549066940fa4f259a814a31ec7c62960e0db8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105169
Reviewed-by: Heiko Tietze 
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index 45a2ffadd72b..ab91e47cd21b 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -70,8 +70,7 @@ std::string ucbGet(const OUString& rURL)
 {
 try
 {
-auto const s = utl::UcbStreamHelper::CreateStream(
-rURL, StreamMode::STD_READ, 
css::uno::Reference());
+auto const s = utl::UcbStreamHelper::CreateStream(rURL, 
StreamMode::STD_READ);
 if (!s)
 {
 SAL_WARN("cui.dialogs", "CreateStream <" << rURL << "> failed");
@@ -522,7 +521,10 @@ AdditionsDialog::getInstalledExtensions()
 void AdditionsDialog::SetProgress(const OUString& rProgress)
 {
 if (rProgress.isEmpty())
+{
 m_xLabelProgress->hide();
+m_xButtonClose->set_sensitive(true);
+}
 else
 {
 SolarMutexGuard aGuard;
diff --git a/cui/uiconfig/ui/additionsdialog.ui 
b

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

2020-10-27 Thread Seth Chaiklin (via logerrit)
 cui/source/inc/paragrph.hxx  |1 
 cui/source/tabpages/paragrph.cxx |3 
 cui/uiconfig/ui/pageformatpage.ui|9 +
 cui/uiconfig/ui/paraindentspacing.ui |  186 +--
 4 files changed, 98 insertions(+), 101 deletions(-)

New commits:
commit 052dcb7665115f0aeb9dc43308bd7fb882716b19
Author: Seth Chaiklin 
AuthorDate: Thu Oct 15 10:53:57 2020 +0200
Commit: Caolán McNamara 
CommitDate: Tue Oct 27 14:29:18 2020 +0100

Partially resolves: tdf#127279 Change "register-true" to "Page line-spacing"

in Page and Paragraph

   For all places in UI where "register-true" appears, change
   to "Page line-spacing".

   -For Paragraph dialog, remove section heading and rename checkbox to
  "Activate page line-spacing"
   -For Page Style dialog, change label to: "Use page line-spacing"

   -Add tooltip and extended tooltip in Paragraph dialog;
   -Shorten tooltip in Page dialog, and add extended tooltip

   Bonus:
   -Add tooltip to "Automatic" in Paragraph dialog
   -Remove contraction in control label (in accordance with UI guidelines)

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

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 1f2305b54ce7..cea797707a7e 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -73,7 +73,6 @@ private:
 std::unique_ptr m_xAbsDist;
 
 // only writer
-std::unique_ptr m_xRegisterFL;
 std::unique_ptr m_xRegisterCB;
 
 // preview
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 4788969bcf4e..6ad843bdc9b3 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -588,7 +588,6 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet )
 sal_uInt16 nHtmlMode = GetHtmlMode_Impl(*rSet);
 if(nHtmlMode & HTMLMODE_ON)
 {
-m_xRegisterFL->hide();
 m_xRegisterCB->hide();
 m_xAutoCB->hide();
 }
@@ -692,7 +691,6 @@ 
SvxStdParagraphTabPage::SvxStdParagraphTabPage(weld::Container* pPage, weld::Dia
 , 
m_xLineDistAtMetricBox(m_xBuilder->weld_metric_spin_button("spinED_LINEDISTMETRIC",
 FieldUnit::CM))
 , m_xLineDistAtLabel(m_xBuilder->weld_label("labelFT_LINEDIST"))
 , m_xAbsDist(m_xBuilder->weld_label("labelST_LINEDIST_ABS"))
-, m_xRegisterFL(m_xBuilder->weld_widget("frameFL_REGISTER"))
 , m_xRegisterCB(m_xBuilder->weld_check_button("checkCB_REGISTER"))
 , m_xExampleWin(new weld::CustomWeld(*m_xBuilder, "drawingareaWN_EXAMPLE", 
m_aExampleWin))
 {
@@ -921,7 +919,6 @@ void SvxStdParagraphTabPage::UpdateExample_Impl()
 void SvxStdParagraphTabPage::EnableRegisterMode()
 {
 m_xRegisterCB->show();
-m_xRegisterFL->show();
 }
 
 void SvxStdParagraphTabPage::EnableContextualMode()
diff --git a/cui/uiconfig/ui/pageformatpage.ui 
b/cui/uiconfig/ui/pageformatpage.ui
index 81bd0937aaf1..1199b4f023a4 100644
--- a/cui/uiconfig/ui/pageformatpage.ui
+++ b/cui/uiconfig/ui/pageformatpage.ui
@@ -527,14 +527,19 @@
 
 
   
-Page li_ne spacing
+Use page li_ne-spacing
 True
 False
 True
-All paragraph styles 
with the option Page line spacing checked will be affected, assuming the line 
spacing defined here. This will align them to an invisible vertical page grid, 
regardless of their font size, so that each line is the same height.
+Enables page 
line-spacing (register-true) using the selected Reference Style
 True
 0
 True
+
+  
+If enabled, then 
all paragraph styles with the option page line-spacing activated will be 
affected, assuming the line spacing of the Reference Style. This will align 
them to an invisible vertical page grid, regardless of their font size, so that 
each line is the same height.
+  
+ 
   
   
 1
diff --git a/cui/uiconfig/ui/paraindentspacing.ui 
b/cui/uiconfig/ui/paraindentspacing.ui
index c5f9a7070f64..b6eac4b16ceb 100644
--- a/cui/uiconfig/ui/paraindentspacing.ui
+++ b/cui/uiconfig/ui/paraindentspacing.ui
@@ -161,6 +161,7 @@
   
 _Automatic
 True
+Indent paragraph 
automatically according to font size and line spacing.
 True
 False
 True
@@ -323,7 +324,7 @

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

2020-10-20 Thread Luboš Luňák (via logerrit)
 cui/source/options/optgdlg.cxx |   40 
 cui/source/options/optgdlg.hxx |2 --
 cui/uiconfig/ui/optviewpage.ui |   23 +++
 3 files changed, 3 insertions(+), 62 deletions(-)

New commits:
commit fea1d3a487faef85b2b7aa8a87075f81ea22af76
Author: Luboš Luňák 
AuthorDate: Fri Oct 16 12:22:38 2020 +0200
Commit: Luboš Luňák 
CommitDate: Tue Oct 20 19:19:54 2020 +0200

remove ui for 'forceskia' AKA 'ignore skia denylist' (tdf#137159)

I originally copy&pasted this from the OpenGL code, but now that I
think of it, having an easy checkbox to make LO use drivers that LO
decides are faulty is a bad idea. There's still the expert
configuration if somebody insists (and if they're not expert
enough to find the expert setting then they better not mess with it),
but this is asking for unnecessary trouble.
This also solves the problem that the UI option is misleading. As
the description in Common.xcs says, "This one forces the use of Skia
even if the denylist would block the driver.", so the option is
independent of the 'enable skia' option, but the UI didn't make it
appear so.

Change-Id: I74bf3574f16899405272dbb3aec54580a5e3f0bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104425
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 0d427243f9a6..7301bd817144 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -107,7 +107,6 @@ class SkiaCfg
 {
 private:
 bool mbUseSkia;
-bool mbForceSkia;
 bool mbForceSkiaRaster;
 bool mbModified;
 
@@ -116,11 +115,9 @@ public:
 ~SkiaCfg();
 
 bool useSkia() const;
-bool forceSkia() const;
 bool forceSkiaRaster() const;
 
 void setUseSkia(bool bSkia);
-void setForceSkia(bool bSkia);
 void setForceSkiaRaster(bool bSkia);
 
 void reset();
@@ -135,7 +132,6 @@ SkiaCfg::SkiaCfg():
 void SkiaCfg::reset()
 {
 mbUseSkia = officecfg::Office::Common::VCL::UseSkia::get();
-mbForceSkia = officecfg::Office::Common::VCL::ForceSkia::get();
 mbForceSkiaRaster = officecfg::Office::Common::VCL::ForceSkiaRaster::get();
 mbModified = false;
 }
@@ -150,8 +146,6 @@ SkiaCfg::~SkiaCfg()
 std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
 if (!officecfg::Office::Common::VCL::UseSkia::isReadOnly())
 officecfg::Office::Common::VCL::UseSkia::set(mbUseSkia, batch);
-if (!officecfg::Office::Common::VCL::ForceSkia::isReadOnly())
-officecfg::Office::Common::VCL::ForceSkia::set(mbForceSkia, batch);
 if (!officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly())
 
officecfg::Office::Common::VCL::ForceSkiaRaster::set(mbForceSkiaRaster, batch);
 batch->commit();
@@ -166,11 +160,6 @@ bool SkiaCfg::useSkia() const
 return mbUseSkia;
 }
 
-bool SkiaCfg::forceSkia() const
-{
-return mbForceSkia;
-}
-
 bool SkiaCfg::forceSkiaRaster() const
 {
 return mbForceSkiaRaster;
@@ -185,15 +174,6 @@ void SkiaCfg::setUseSkia(bool bSkia)
 }
 }
 
-void SkiaCfg::setForceSkia(bool bSkia)
-{
-if (mbForceSkia != bSkia)
-{
-mbForceSkia = bSkia;
-mbModified = true;
-}
-}
-
 void SkiaCfg::setForceSkiaRaster(bool bSkia)
 {
 if (mbForceSkiaRaster != bSkia)
@@ -693,7 +673,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xUseHardwareAccell(m_xBuilder->weld_check_button("useaccel"))
 , m_xUseAntiAliase(m_xBuilder->weld_check_button("useaa"))
 , m_xUseSkia(m_xBuilder->weld_check_button("useskia"))
-, m_xForceSkia(m_xBuilder->weld_check_button("forceskia"))
 , m_xForceSkiaRaster(m_xBuilder->weld_check_button("forceskiaraster"))
 , m_xSkiaStatusEnabled(m_xBuilder->weld_label("skiaenabled"))
 , m_xSkiaStatusDisabled(m_xBuilder->weld_label("skiadisabled"))
@@ -704,7 +683,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 if (Application::GetToolkitName() == "gtk3")
 {
 m_xUseSkia->hide();
-m_xForceSkia->hide();
 m_xForceSkiaRaster->hide();
 m_xSkiaStatusEnabled->hide();
 m_xSkiaStatusDisabled->hide();
@@ -716,7 +694,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 // For now Skia is used mainly on Windows, hide the controls everywhere 
else.
 // It can also be used on Linux, but only with the rarely used 'gen' 
backend.
 m_xUseSkia->hide();
-m_xForceSkia->hide();
 m_xForceSkiaRaster->hide();
 m_xSkiaStatusEnabled->hide();
 m_xSkiaStatusDisabled->hide();
@@ -724,7 +701,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 
 m_xFontAntiAliasing->connect_toggled( LINK( this, OfaViewTabPage, 
OnAntialiasingToggled ) );
 
-m_xForceSkia->connec

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

2020-10-14 Thread Heiko Tietze (via logerrit)
 cui/source/options/optgdlg.cxx |   13 
 cui/source/options/optgdlg.hxx |2 
 cui/uiconfig/ui/optviewpage.ui |  554 -
 3 files changed, 346 insertions(+), 223 deletions(-)

New commits:
commit c2ed7b4ce31e65867b5f55e90372f67bc2b0e75e
Author: Heiko Tietze 
AuthorDate: Tue Oct 13 14:01:21 2020 +0200
Commit: Heiko Tietze 
CommitDate: Wed Oct 14 09:33:16 2020 +0200

Resolves tdf#137447 - Access icon themes via tight extensions

Button and code added to optgdlg

Change-Id: Ib4aa0883a6af2844ab68ed3c0b7f0e21bc655d94
Signed-off-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104233
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 812579c35b4a..0d427243f9a6 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -71,6 +71,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -698,6 +699,7 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xSkiaStatusDisabled(m_xBuilder->weld_label("skiadisabled"))
 , m_xMousePosLB(m_xBuilder->weld_combo_box("mousepos"))
 , m_xMouseMiddleLB(m_xBuilder->weld_combo_box("mousemiddle"))
+, m_xMoreIcons(m_xBuilder->weld_button("btnMoreIcons"))
 {
 if (Application::GetToolkitName() == "gtk3")
 {
@@ -757,6 +759,9 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 if (officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly())
 m_xForceSkiaRaster->set_sensitive(false);
 
+m_xMoreIcons->set_from_icon_name("cmd/sc_additionsdialog.png");
+m_xMoreIcons->connect_clicked(LINK(this, OfaViewTabPage, 
OnMoreIconsClick));
+
 UpdateSkiaStatus();
 }
 
@@ -764,6 +769,14 @@ OfaViewTabPage::~OfaViewTabPage()
 {
 }
 
+IMPL_STATIC_LINK_NOARG(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void)
+{
+css::uno::Sequence aArgs(1);
+aArgs[0].Name = "AdditionsTag";
+aArgs[0].Value <<= OUString("Icons");
+comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs);
+}
+
 IMPL_LINK_NOARG( OfaViewTabPage, OnAntialiasingToggled, weld::ToggleButton&, 
void )
 {
 bool bAAEnabled = m_xFontAntiAliasing->get_active();
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 5c4177b1f1ba..ff3c7a80d776 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -119,10 +119,12 @@ private:
 
 std::unique_ptr m_xMousePosLB;
 std::unique_ptr m_xMouseMiddleLB;
+std::unique_ptr m_xMoreIcons;
 
 DECL_LINK(OnAntialiasingToggled, weld::ToggleButton&, void);
 DECL_LINK(OnForceSkiaToggled, weld::ToggleButton&, void);
 DECL_LINK(OnForceSkiaRasterToggled, weld::ToggleButton&, void);
+DECL_STATIC_LINK(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void);
 void UpdateSkiaStatus();
 
 public:
diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index f35b31c9b52e..44df6633b200 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -1,80 +1,83 @@
 
-
+
 
   
   
 1
 1
 8
-1
-10
+1
+10
   
+  
   
 True
-False
+False
 start
 start
-6
-24
+6
+24
 
+  
   
 True
-False
+False
 True
-12
+12
 
   
 True
-False
+False
 True
-0
-none
+0
+none
 
   
 True
-False
+False
 True
-6
-12
+6
+12
 
+  
   
 True
-False
+False
 True
-3
-6
+3
+6
 
   
 True
-False
+False
 _Positioning:
-True
-mousepos
+True
+mousepos
 0
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 Middle _button:
-True
-mousemiddle
+True
+mousemiddle
 0
   
   
-

[Libreoffice-commits] core.git: cui/source cui/uiconfig instsetoo_native/util officecfg/registry postprocess/CustomTarget_registry.mk sfx2/source

2020-10-12 Thread Heiko Tietze (via logerrit)
 cui/source/inc/optlingu.hxx  |2 
 cui/source/options/optlingu.cxx  |   15 ++
 cui/uiconfig/ui/optlingupage.ui  |7 +--
 instsetoo_native/util/openoffice.lst.README  |3 -
 instsetoo_native/util/openoffice.lst.in  |4 -
 officecfg/registry/data/org/openoffice/Office/Common.xcu |5 --
 postprocess/CustomTarget_registry.mk |1 
 sfx2/source/appl/appserv.cxx |   33 ++-
 8 files changed, 25 insertions(+), 45 deletions(-)

New commits:
commit acb1c390539730957fb509f18f469fc7f6133082
Author: Heiko Tietze 
AuthorDate: Thu Oct 1 15:44:32 2020 +0200
Commit: Heiko Tietze 
CommitDate: Mon Oct 12 17:05:42 2020 +0200

Resolves tdf#137187 - More dictionaries via extensions dialog

UNO command and linkbutton interaction replaced with the internal dialog
DICT_REPO_URL removed, README adjusted

Change-Id: I401737b538da229ac0d432007e7564105672ff40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103769
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index 6edc093cb169..365acfbbb0fb 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -66,6 +66,7 @@ class SvxEditModulesDlg : public weld::GenericDialogController
 DECL_LINK( BackHdl_Impl, weld::Button&, void );
 DECL_LINK( LangSelectListBoxHdl_Impl, weld::ComboBox&, void );
 DECL_LINK( BoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, void );
+DECL_STATIC_LINK( SvxEditModulesDlg, OnLinkClick, weld::LinkButton&, bool);
 void LangSelectHdl_Impl(const SvxLanguageBox* pBox);
 
 public:
@@ -128,6 +129,7 @@ private:
 DECL_LINK( ModulesBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, 
void );
 DECL_LINK( DicsBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, 
void );
 DECL_LINK( PostDblClickHdl_Impl, void *, void);
+DECL_STATIC_LINK( SvxLinguTabPage, OnLinkClick, weld::LinkButton&, bool);
 
 voidUpdateModulesBox_Impl();
 voidUpdateDicBox_Impl();
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 8d099ad0c884..09cdb0d9e1b5 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -871,6 +872,7 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, 
weld::DialogController*
 m_xLinguOptionsCLB->connect_changed( LINK( this, SvxLinguTabPage, 
SelectHdl_Impl ));
 m_xLinguOptionsCLB->connect_row_activated(LINK(this, SvxLinguTabPage, 
BoxDoubleClickHdl_Impl));
 
+m_xMoreDictsLink->connect_activate_link(LINK(this, SvxLinguTabPage, 
OnLinkClick));
 if (officecfg::Office::Security::Hyperlinks::Open::get() == 
SvtExtendedSecurityOptions::OPEN_NEVER)
 m_xMoreDictsLink->hide();
 
@@ -1535,6 +1537,12 @@ void SvxLinguTabPage::HideGroups( sal_uInt16 nGrp )
 }
 }
 
+IMPL_STATIC_LINK_NOARG(SvxLinguTabPage, OnLinkClick, weld::LinkButton&, bool)
+{
+comphelper::dispatchCommand(".uno:MoreDictionaries", {});
+return true;
+}
+
 SvxEditModulesDlg::SvxEditModulesDlg(weld::Window* pParent, SvxLinguData_Impl& 
rData)
 : GenericDialogController(pParent, "cui/ui/editmodulesdialog.ui", 
"EditModulesDialog")
 , sSpell(CuiResId(RID_SVXSTR_SPELL))
@@ -1568,6 +1576,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(weld::Window* 
pParent, SvxLinguData_Impl& r
 m_xPrioUpPB->set_sensitive( false );
 m_xPrioDownPB->set_sensitive( false );
 
+m_xMoreDictsLink->connect_activate_link(LINK(this, SvxEditModulesDlg, 
OnLinkClick));
 if (officecfg::Office::Security::Hyperlinks::Open::get() == 
SvtExtendedSecurityOptions::OPEN_NEVER)
 m_xMoreDictsLink->hide();
 
@@ -1961,4 +1970,10 @@ IMPL_LINK_NOARG(SvxEditModulesDlg, BackHdl_Impl, 
weld::Button&, void)
 LangSelectHdl_Impl(nullptr);
 }
 
+IMPL_STATIC_LINK_NOARG(SvxEditModulesDlg, OnLinkClick, weld::LinkButton&, bool)
+{
+comphelper::dispatchCommand(".uno:MoreDictionaries", {});
+return true;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/optlingupage.ui b/cui/uiconfig/ui/optlingupage.ui
index 3f574d3be664..8537e0d27d9e 100644
--- a/cui/uiconfig/ui/optlingupage.ui
+++ b/cui/uiconfig/ui/optlingupage.ui
@@ -106,7 +106,7 @@
   
 True
 6
-0.5000
+0,5000
 
   
   
@@ -233,7 +233,7 @@
   
 True
 6
-0.5000

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

2020-08-30 Thread Yusuf Keten (via logerrit)
 cui/source/dialogs/AdditionsDialog.cxx |5 -
 cui/uiconfig/ui/additionsfragment.ui   |   14 +++---
 2 files changed, 11 insertions(+), 8 deletions(-)

New commits:
commit 6379f799704935a571a4b3af44cabd0671c48dbe
Author: Yusuf Keten 
AuthorDate: Fri Aug 28 13:57:57 2020 +0300
Commit: Muhammet Kara 
CommitDate: Sun Aug 30 19:44:40 2020 +0200

tdf#135273: Tight integration dialog shows unclear properties

When there is no info about the author of the extension, the label was NULL.
If it is null, it will be empty after this patch.

The initial label of the labelAuthor is cleared. Also, unnecessary 
translatable expressions in the additionsfragment.ui were deleted.

Change-Id: Iab9517f1b3ff5d8c6b3947d7b29c897c18e94664
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101537
Tested-by: Muhammet Kara 
Reviewed-by: Muhammet Kara 

diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index 7d26416c910c..3586704a1e9b 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -685,7 +685,10 @@ AdditionsItem::AdditionsItem(weld::Widget* pParent, 
AdditionsDialog* pParentDial
 
 m_xLinkButtonName->set_uri(additionInfo.sExtensionURL);
 m_xLabelDescription->set_label(additionInfo.sIntroduction);
-m_xLabelAuthor->set_label(additionInfo.sAuthorName);
+
+if (!additionInfo.sAuthorName.equalsIgnoreAsciiCase("null"))
+m_xLabelAuthor->set_label(additionInfo.sAuthorName);
+
 m_xButtonInstall->set_label(CuiResId(RID_SVXSTR_ADDITIONS_INSTALLBUTTON));
 OUString sLicenseString = CuiResId(RID_SVXSTR_ADDITIONS_LICENCE) + 
additionInfo.sLicense;
 m_xLabelLicense->set_label(sLicenseString);
diff --git a/cui/uiconfig/ui/additionsfragment.ui 
b/cui/uiconfig/ui/additionsfragment.ui
index 93c8e50ad126..cc1701dfce82 100644
--- a/cui/uiconfig/ui/additionsfragment.ui
+++ b/cui/uiconfig/ui/additionsfragment.ui
@@ -77,7 +77,7 @@
 top
 
   
-button
+button
 True
 True
 True
@@ -97,7 +97,7 @@
 True
 False
 start
-label
+
   
   
 False
@@ -125,7 +125,7 @@
 False
 start
 start
-label
+label
 True
 word-char
 1
@@ -146,7 +146,7 @@
 False
 start
 3
-label
+label
   
   
 False
@@ -160,7 +160,7 @@
 False
 start
 3
-label
+label
   
   
 False
@@ -187,7 +187,7 @@
 
 
   
-button
+button
 True
 True
 True
@@ -338,7 +338,7 @@
 True
 False
 start
-label
+label
 
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-24 Thread Yusuf Keten (via logerrit)
 cui/source/dialogs/AdditionsDialog.cxx |   30 +
 cui/source/inc/AdditionsDialog.hxx |7 +-
 cui/uiconfig/ui/additionsfragment.ui   |  101 ++---
 3 files changed, 129 insertions(+), 9 deletions(-)

New commits:
commit 48a796c5bbdf897228eb4125512e4f80527f4b55
Author: Yusuf Keten 
AuthorDate: Wed Aug 19 19:36:58 2020 +0300
Commit: Muhammet Kara 
CommitDate: Mon Aug 24 21:45:07 2020 +0200

tdf#133026: Additions: Rating image implementation

Change-Id: Id250f0e70490941743e0f3ca2b94897f69a9208f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101013
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index f57031511404..680e519a60d0 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -592,7 +592,12 @@ AdditionsItem::AdditionsItem(weld::Widget* pParent, 
AdditionsDialog* pParentDial
 , m_xLabelVersion(m_xBuilder->weld_label("labelVersion"))
 , m_xLabelComments(m_xBuilder->weld_label("labelComments")) // no change
 , m_xLinkButtonComments(m_xBuilder->weld_link_button("linkButtonComments"))
-, m_xImageVoting(m_xBuilder->weld_image("imageVoting"))
+, m_xImageVoting1(m_xBuilder->weld_image("imageVoting1"))
+, m_xImageVoting2(m_xBuilder->weld_image("imageVoting2"))
+, m_xImageVoting3(m_xBuilder->weld_image("imageVoting3"))
+, m_xImageVoting4(m_xBuilder->weld_image("imageVoting4"))
+, m_xImageVoting5(m_xBuilder->weld_image("imageVoting5"))
+, m_xLabelNoVoting(m_xBuilder->weld_label("votingLabel"))
 , m_xImageDownloadNumber(m_xBuilder->weld_image("imageDownloadNumber"))
 , m_xLabelDownloadNumber(m_xBuilder->weld_label("labelDownloadNumber"))
 , m_xButtonShowMore(m_xBuilder->weld_button("buttonShowMore"))
@@ -622,6 +627,29 @@ AdditionsItem::AdditionsItem(weld::Widget* pParent, 
AdditionsDialog* pParentDial
 
 m_xLinkButtonName->set_label(sExtensionName);
 
+double aExtensionRating = additionInfo.sRating.toDouble();
+switch (int(aExtensionRating))
+{
+case 5:
+m_xImageVoting5->show();
+[[fallthrough]];
+case 4:
+m_xImageVoting4->show();
+[[fallthrough]];
+case 3:
+m_xImageVoting3->show();
+[[fallthrough]];
+case 2:
+m_xImageVoting2->show();
+[[fallthrough]];
+case 1:
+m_xImageVoting1->show();
+break;
+case 0:
+m_xLabelNoVoting->show();
+break;
+}
+
 m_xLinkButtonName->set_uri(additionInfo.sExtensionURL);
 m_xLabelDescription->set_label(additionInfo.sIntroduction);
 m_xLabelAuthor->set_label(additionInfo.sAuthorName);
diff --git a/cui/source/inc/AdditionsDialog.hxx 
b/cui/source/inc/AdditionsDialog.hxx
index 5b7089b9b6c5..9061b755a5be 100644
--- a/cui/source/inc/AdditionsDialog.hxx
+++ b/cui/source/inc/AdditionsDialog.hxx
@@ -126,7 +126,12 @@ public:
 std::unique_ptr m_xLabelVersion;
 std::unique_ptr m_xLabelComments;
 std::unique_ptr m_xLinkButtonComments;
-std::unique_ptr m_xImageVoting;
+std::unique_ptr m_xImageVoting1;
+std::unique_ptr m_xImageVoting2;
+std::unique_ptr m_xImageVoting3;
+std::unique_ptr m_xImageVoting4;
+std::unique_ptr m_xImageVoting5;
+std::unique_ptr m_xLabelNoVoting;
 std::unique_ptr m_xImageDownloadNumber;
 std::unique_ptr m_xLabelDownloadNumber;
 std::unique_ptr m_xButtonShowMore;
diff --git a/cui/uiconfig/ui/additionsfragment.ui 
b/cui/uiconfig/ui/additionsfragment.ui
index 2b4c23dff55b..93c8e50ad126 100644
--- a/cui/uiconfig/ui/additionsfragment.ui
+++ b/cui/uiconfig/ui/additionsfragment.ui
@@ -132,7 +132,6 @@
 50
 
   
-  
 
   
   
@@ -209,14 +208,102 @@
   
 
 
-  
+  
 True
 False
-start
-gtk-about
-
-  
-
+
+  
+False
+start
+gtk-about
+
+  
+
+  
+  
+False
+True
+0
+  
+
+
+  
+False
+start
+gtk-about
+
+  
+
+  
+  
+False
+True
+1
+  
+
+
+  
+False
+start
+   

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

2020-08-16 Thread Yusuf Keten (via logerrit)
 cui/source/dialogs/AdditionsDialog.cxx |1 
 cui/source/inc/AdditionsDialog.hxx |2 
 cui/uiconfig/ui/additionsdialog.ui |   84 +
 3 files changed, 87 insertions(+)

New commits:
commit a6373c11938926d0f5d73be74aedfb4ab1d1720c
Author: Yusuf Keten 
AuthorDate: Sat Aug 15 21:41:45 2020 +0300
Commit: Muhammet Kara 
CommitDate: Sun Aug 16 15:20:35 2020 +0200

tdf133275: Additions: Sorting menu ui implementation

Change-Id: I41b0887d0bc6bf4618bd1cf9afd06f4b1ddbabb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100778
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index c467e647e020..3db93edf48e2 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -465,6 +465,7 @@ AdditionsDialog::AdditionsDialog(weld::Window* pParent, 
const OUString& sAdditio
 , m_xContentWindow(m_xBuilder->weld_scrolled_window("contentWindow"))
 , m_xContentGrid(m_xBuilder->weld_container("contentGrid"))
 , m_xLabelProgress(m_xBuilder->weld_label("labelProgress"))
+, m_xGearBtn(m_xBuilder->weld_menu_button("buttonGear"))
 {
 m_aSearchDataTimer.SetInvokeHandler(LINK(this, AdditionsDialog, 
ImplUpdateDataHdl));
 m_aSearchDataTimer.SetDebugName("AdditionsDialog SearchDataTimer");
diff --git a/cui/source/inc/AdditionsDialog.hxx 
b/cui/source/inc/AdditionsDialog.hxx
index 027f2f1f24c9..71df58c63b7f 100644
--- a/cui/source/inc/AdditionsDialog.hxx
+++ b/cui/source/inc/AdditionsDialog.hxx
@@ -74,6 +74,8 @@ public:
 std::unique_ptr m_xContentGrid;
 
 std::unique_ptr m_xLabelProgress;
+std::unique_ptr m_xGearBtn;
+
 ::rtl::Reference m_pSearchThread;
 
 OString m_sURL;
diff --git a/cui/uiconfig/ui/additionsdialog.ui 
b/cui/uiconfig/ui/additionsdialog.ui
index 523bcc276ede..4b91bd5950b9 100644
--- a/cui/uiconfig/ui/additionsdialog.ui
+++ b/cui/uiconfig/ui/additionsdialog.ui
@@ -2,6 +2,89 @@
 
 
   
+  
+True
+False
+
+  
+True
+False
+Active version only
+  
+
+
+  
+True
+False
+  
+
+
+  
+True
+False
+Sort by
+
+  
+True
+False
+
+  
+True
+False
+Voting
+True
+gear_sort_downloads
+  
+
+
+  
+True
+False
+Downloads
+True
+gear_sort_voting
+  
+
+
+  
+True
+False
+Comments
+True
+gear_sort_voting
+  
+
+  
+
+  
+
+
+  
+True
+False
+  
+
+
+  
+True
+False
+Detail view
+True
+True
+True
+gear_condensedList
+  
+
+
+  
+True
+False
+Condensed list
+True
+gear_detailView
+  
+
+  
   
 400
 500
@@ -118,6 +201,7 @@
 True
 end
 1
+additionsmenu
 False
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-28 Thread A_GAN (via logerrit)
 cui/source/inc/cuitabarea.hxx|1 +
 cui/source/tabpages/tpshadow.cxx |   25 +
 cui/uiconfig/ui/shadowtabpage.ui |   37 +++--
 3 files changed, 61 insertions(+), 2 deletions(-)

New commits:
commit 6dbfbebad37fd84208e4c336f0864d26019db153
Author: A_GAN 
AuthorDate: Mon Jul 27 20:28:53 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 28 17:38:53 2020 +0200

Add spin button for shadow blur radius in area dialog

Update shadow tab in area dialog with spin button to control blur radius of 
the shadow.

Change-Id: I41f072ef10d280df4b118afae7a7c058eb975417
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99557
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 849b009c35df..fe16ad2c3bf2 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -312,6 +312,7 @@ private:
 std::unique_ptr m_xMtrDistance;
 std::unique_ptr m_xLbShadowColor;
 std::unique_ptr m_xMtrTransparent;
+std::unique_ptr m_xLbShadowBlurMetric;
 std::unique_ptr m_xCtlPosition;
 std::unique_ptr m_xCtlXRectPreview;
 
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index de448b197fd4..a02d7d6b92b8 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -45,9 +45,11 @@ const sal_uInt16 SvxShadowTabPage::pShadowRanges[] =
 {
 SDRATTR_SHADOWCOLOR,
 SDRATTR_SHADOWTRANSPARENCE,
+SDRATTR_SHADOWBLUR,
 SID_ATTR_FILL_SHADOW,
 SID_ATTR_FILL_SHADOW,
 SID_ATTR_SHADOW_TRANSPARENCE,
+SID_ATTR_SHADOW_BLUR,
 SID_ATTR_SHADOW_YDISTANCE,
 0
 };
@@ -66,6 +68,7 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, 
weld::DialogControlle
 , m_xMtrDistance(m_xBuilder->weld_metric_spin_button("MTR_FLD_DISTANCE", 
FieldUnit::CM))
 , m_xLbShadowColor(new 
ColorListBox(m_xBuilder->weld_menu_button("LB_SHADOW_COLOR"), 
pController->getDialog()))
 , 
m_xMtrTransparent(m_xBuilder->weld_metric_spin_button("MTR_SHADOW_TRANSPARENT", 
FieldUnit::PERCENT))
+, 
m_xLbShadowBlurMetric(m_xBuilder->weld_metric_spin_button("LB_SHADOW_BLUR", 
FieldUnit::POINT))
 , m_xCtlPosition(new weld::CustomWeld(*m_xBuilder, "CTL_POSITION", 
m_aCtlPosition))
 , m_xCtlXRectPreview(new weld::CustomWeld(*m_xBuilder, 
"CTL_COLOR_PREVIEW", m_aCtlXRectPreview))
 {
@@ -151,6 +154,7 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, 
weld::DialogControlle
 m_xTsbShowShadow->connect_toggled(LINK( this, SvxShadowTabPage, 
ClickShadowHdl_Impl));
 m_xLbShadowColor->SetSelectHdl( LINK( this, SvxShadowTabPage, 
SelectShadowHdl_Impl ) );
 Link aLink = LINK( this, SvxShadowTabPage, 
ModifyShadowHdl_Impl );
+m_xLbShadowBlurMetric->connect_value_changed(aLink);
 m_xMtrTransparent->connect_value_changed(aLink);
 m_xMtrDistance->connect_value_changed(aLink);
 }
@@ -160,6 +164,7 @@ SvxShadowTabPage::~SvxShadowTabPage()
 m_xCtlXRectPreview.reset();
 m_xLbShadowColor.reset();
 m_xCtlPosition.reset();
+m_xLbShadowBlurMetric.reset();
 }
 
 void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet )
@@ -315,6 +320,17 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs )
 }
 }
 
+if (m_xLbShadowBlurMetric->get_value_changed_from_saved())
+{
+SdrMetricItem aItem(SDRATTR_SHADOWBLUR, 
m_xLbShadowBlurMetric->get_value(FieldUnit::MM_100TH));
+pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWBLUR );
+if ( !pOld || !( *static_cast(pOld) == aItem ) )
+{
+rAttrs->Put( aItem );
+bModified = true;
+}
+}
+
 rAttrs->Put (CntUInt16Item(SID_PAGE_TYPE, 
static_cast(m_nPageType)));
 
 return bModified;
@@ -398,10 +414,19 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs )
 else
 m_xMtrTransparent->set_text("");
 
+if( rAttrs->GetItemState( SDRATTR_SHADOWBLUR ) != SfxItemState::DONTCARE )
+{
+sal_uInt16 nBlur = rAttrs->Get( SDRATTR_SHADOWBLUR ).GetValue();
+m_xLbShadowBlurMetric->set_value(nBlur, FieldUnit::MM_100TH);
+}
+else
+m_xLbShadowBlurMetric->set_text("");
+
 //aCtlPosition
 m_xMtrDistance->save_value();
 m_xLbShadowColor->SaveValue();
 m_xTsbShowShadow->save_state();
+m_xLbShadowBlurMetric->save_value();
 
 // #66832# This field was not saved, but used to determine changes.
 // Why? Seems to be the error.
diff --git a/cui/uiconfig/ui/shadowtabpage.ui b/cui/uiconfig/ui/shadowtabpage.ui
index f5e674d99c72..2cb49674b9e5 100644
--- a/cui/uiconfig/ui/shadowtabpage.ui
+++ b/cui/uiconfig/ui/shadowtabpage.ui
@@ -12,6 +12,11 @@
 5
 10
   
+  
+150
+1
+10
+  
   
 True
 False
@@ -61,7 +66,7 @@
   
 True
 False
-3
+   

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

2020-07-23 Thread Yusuf Keten (via logerrit)
 cui/source/dialogs/AdditionsDialog.cxx |  228 +-
 cui/source/inc/AdditionsDialog.hxx |   49 +++
 cui/uiconfig/ui/additionsfragment.ui   |  410 +
 3 files changed, 384 insertions(+), 303 deletions(-)

New commits:
commit 04f56b5fc29e082139ee77991f4780372edba34a
Author: Yusuf Keten 
AuthorDate: Thu Jul 23 21:17:01 2020 +0300
Commit: Muhammet Kara 
CommitDate: Thu Jul 23 23:54:26 2020 +0200

tdf#133026: Additions: Add Show More button and refactor

After this patch, not all extensions that come with JSON will be shown. 
Instead, a certain number (currently 30) of extensions will be shown and the 
Show More button will appear after the last extension. If the user presses the 
button, a certain number of extensions will be added again.

Change-Id: Icf8f549d585a5bca1d55b85acf9b72478b507444
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99338
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index 37e90c4ecb66..555f0c74a64e 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -48,6 +48,8 @@
 #include 
 #include 
 
+#define PAGE_SIZE 30
+
 using namespace css;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::XComponentContext;
@@ -71,25 +73,6 @@ const char kUserAgent[] = "LibreOffice 
AdditionsDownloader/1.0 (unknown platform
 
 namespace
 {
-struct AdditionInfo
-{
-OUString sExtensionID;
-OUString sName;
-OUString sAuthorName;
-OUString sExtensionURL;
-OUString sScreenshotURL;
-OUString sIntroduction;
-OUString sDescription;
-OUString sCompatibleVersion;
-OUString sReleaseVersion;
-OUString sLicense;
-OUString sCommentNumber;
-OUString sCommentURL;
-OUString sRating;
-OUString sDownloadNumber;
-OUString sDownloadURL;
-};
-
 size_t WriteCallback(void* ptr, size_t size, size_t nmemb, void* userp)
 {
 if (!userp)
@@ -293,13 +276,32 @@ bool getPreviewFile(const AdditionInfo& aAdditionInfo, 
OUString& sPreviewFile)
 return true;
 }
 
+void LoadImage(const OUString& rPreviewFile, const AdditionsItem& rCurrentItem)
+{
+SolarMutexGuard aGuard;
+
+GraphicFilter aFilter;
+Graphic aGraphic;
+
+INetURLObject aURLObj(rPreviewFile);
+
+// for VCL to be able to create bitmaps / do visual changes in the thread
+aFilter.ImportGraphic(aGraphic, aURLObj);
+BitmapEx aBmp = aGraphic.GetBitmapEx();
+
+ScopedVclPtr xVirDev = 
rCurrentItem.m_xImageScreenshot->create_virtual_device();
+xVirDev->SetOutputSizePixel(aBmp.GetSizePixel());
+xVirDev->DrawBitmapEx(Point(0, 0), aBmp);
+
+rCurrentItem.m_xImageScreenshot->set_image(xVirDev.get());
+xVirDev.disposeAndClear();
+}
+
 } // End of the anonymous namespace
 
-SearchAndParseThread::SearchAndParseThread(AdditionsDialog* pDialog, const 
OUString& rURL,
-   const bool& isFirstLoading)
+SearchAndParseThread::SearchAndParseThread(AdditionsDialog* pDialog, const 
bool& isFirstLoading)
 : Thread("cuiAdditionsSearchThread")
 , m_pAdditionsDialog(pDialog)
-, m_aURL(rURL)
 , m_bExecute(true)
 , m_bIsFirstLoading(isFirstLoading)
 {
@@ -307,6 +309,78 @@ 
SearchAndParseThread::SearchAndParseThread(AdditionsDialog* pDialog, const OUStr
 
 SearchAndParseThread::~SearchAndParseThread() {}
 
+std::vector 
SearchAndParseThread::CreateInfoVectorToLoading(const size_t startNumber)
+{
+std::vector additionInfos;
+for (size_t i = startNumber; i < m_pAdditionsDialog->m_nMaxItemCount; i++)
+{
+if (i == m_pAdditionsDialog->m_aAllExtensionsVector.size())
+break;
+additionInfos.push_back(m_pAdditionsDialog->m_aAllExtensionsVector[i]);
+}
+
+return additionInfos;
+}
+
+void SearchAndParseThread::LoadInfo(const AdditionInfo& additionInfo, 
AdditionsItem& rCurrentItem,
+const size_t nGridPositionY)
+{
+SolarMutexGuard aGuard;
+
+rCurrentItem.m_xContainer->set_grid_left_attach(0);
+rCurrentItem.m_xContainer->set_grid_top_attach(nGridPositionY);
+
+rCurrentItem.m_xLinkButtonName->set_label(additionInfo.sName);
+rCurrentItem.m_xLinkButtonName->set_uri(additionInfo.sExtensionURL);
+rCurrentItem.m_xLabelDescription->set_label(additionInfo.sIntroduction);
+rCurrentItem.m_xLabelAuthor->set_label(additionInfo.sAuthorName);
+
rCurrentItem.m_xButtonInstall->set_label(CuiResId(RID_SVXSTR_ADDITIONS_INSTALLBUTTON));
+OUString sLicenseString = CuiResId(RID_SVXSTR_ADDITIONS_LICENCE) + 
additionInfo.sLicense;
+rCurrentItem.m_xLabelLicense->set_label(sLicenseString);
+OUString sVersionString
+= CuiResId(RID_SVXSTR_ADDITIONS_REQUIREDVERSION) + 
additionInfo.sCompatibleVersion;
+rCurrentItem.m_xLabelVersion->set_label(sVersionString);
+rCurrentItem.m_xLinkButtonCommen

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/unotools officecfg/registry sfx2/source sw/qa unotools/source uui/source xmlsecurity/qa xmlsecurity/source

2020-05-18 Thread Michael Stahl (via logerrit)
 cui/source/options/optsave.cxx |   10 ++
 cui/uiconfig/ui/optsavepage.ui |6 --
 include/unotools/saveopt.hxx   |6 --
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   10 ++
 sfx2/source/doc/objstor.cxx|2 +-
 sw/qa/extras/fodfexport/fodfexport.cxx |8 
 sw/qa/extras/odfexport/odfexport.cxx   |2 +-
 unotools/source/config/saveopt.cxx |4 
 uui/source/iahndl.cxx  |2 +-
 xmlsecurity/qa/unit/signing/signing.cxx|   10 +-
 xmlsecurity/source/component/documentdigitalsignatures.cxx |2 +-
 11 files changed, 41 insertions(+), 21 deletions(-)

New commits:
commit a541cd91951eca15e40764244b34c72b347f9f26
Author: Michael Stahl 
AuthorDate: Tue Apr 28 18:04:14 2020 +0200
Commit: Michael Stahl 
CommitDate: Mon May 18 18:19:03 2020 +0200

officecfg,unotools,cui: add ODF 1.2 Extended / ODF 1.3 versions

... to configuration and UI.

The new default is ODF 1.3 Extended, which is now ODFVER_LATEST and
stored as value "3" in configuration.

Adapt a few places related to DocumentDigitalSignatures etc. to new
default.

Change-Id: I420da4f7787cc864c6bd88470d61b146b9399aa1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93177
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index c165a3f9478b..564fabb730f6 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -87,10 +87,12 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xODFWarningFI(m_xBuilder->weld_widget("odfwarning_image"))
 , m_xODFWarningFT(m_xBuilder->weld_label("odfwarning_label"))
 {
-m_xODFVersionLB->set_id(0, OUString::number(2 )); // 1.0/1.1
-m_xODFVersionLB->set_id(1, OUString::number(4 )); // 1.2
-m_xODFVersionLB->set_id(2, OUString::number(8 )); // 1.2 Extended 
(compatibility mode)
-m_xODFVersionLB->set_id(3, OUString::number(0x7fff)); // 1.2 Extended 
(recommended)
+m_xODFVersionLB->set_id(0, OUString::number(SvtSaveOptions::ODFVER_011)); 
// 1.0/1.1
+m_xODFVersionLB->set_id(1, OUString::number(SvtSaveOptions::ODFVER_012)); 
// 1.2
+m_xODFVersionLB->set_id(2, 
OUString::number(SvtSaveOptions::ODFVER_012_EXT_COMPAT)); // 1.2 Extended 
(compatibility mode)
+m_xODFVersionLB->set_id(3, 
OUString::number(SvtSaveOptions::ODFVER_012_EXTENDED)); // 1.2 Extended
+m_xODFVersionLB->set_id(4, OUString::number(SvtSaveOptions::ODFVER_013)); 
// 1.3
+m_xODFVersionLB->set_id(5, 
OUString::number(SvtSaveOptions::ODFVER_LATEST)); // 1.3 Extended (recommended)
 
 m_xDocTypeLB->set_id(0, OUString::number(APP_WRITER)   );
 m_xDocTypeLB->set_id(1, OUString::number(APP_WRITER_WEB)   );
diff --git a/cui/uiconfig/ui/optsavepage.ui b/cui/uiconfig/ui/optsavepage.ui
index e9a090d45091..dccf9d948eba 100644
--- a/cui/uiconfig/ui/optsavepage.ui
+++ b/cui/uiconfig/ui/optsavepage.ui
@@ -288,7 +288,7 @@
   
 True
 False
-Not using ODF 1.2 Extended may cause information to be 
lost.
+Not using ODF 1.3 Extended may cause information to be 
lost.
   
   
 1
@@ -321,7 +321,9 @@
   1.0/1.1
   1.2
   1.2 Extended (compatibility mode)
-  1.2 Extended (recommended)
+  1.2 Extended
+  1.3
+  1.3 Extended (recommended)
 
   
   
diff --git a/include/unotools/saveopt.hxx b/include/unotools/saveopt.hxx
index 2f0460e21fbc..d1e8f32af12b 100644
--- a/include/unotools/saveopt.hxx
+++ b/include/unotools/saveopt.hxx
@@ -64,6 +64,8 @@ public:
 DO_NOT_USE = 3, // Do not use this, only here for 
compatibility with pre OOo 3.2 configuration
 ODFVER_012 = 4, // ODF 1.2
 ODFVER_012_EXT_COMPAT = 8, // ODF 1.2 extended, but with compatibility 
fallbacks
+ODFVER_012_EXTENDED = 9, // ODF 1.2 extended
+ODFVER_013 = 10,// ODF 1.3
 
 ODFVER_LATEST = SAL_MAX_ENUM,  // ODF latest version with 
enhancements
 };
@@ -82,8 +84,8 @@ public:
 ODFSVER_FUTURE_EXTENDED = 1000 | ODFSVER_EXTENDED, ///< current 
extension, unknown future ODF version
 
 // The latest defined standard. Adapt when a new one is published.
-ODFSVER_LATEST = ODFSVER_012,   ///< @internal DO NOT 
USE in comparisons
-ODFSVER_LATEST_EXTENDED = ODFSVER_012_EX

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

2020-05-16 Thread Stephan Bergmann (via logerrit)
 cui/source/options/optjava.cxx |2 --
 cui/source/options/optjava.hxx |2 --
 cui/uiconfig/ui/optadvancedpage.ui |   11 ---
 3 files changed, 15 deletions(-)

New commits:
commit eadfb43d8c80e1cf1b21d8d42eeb768ebe3f8e4c
Author: Stephan Bergmann 
AuthorDate: Sat May 16 15:44:47 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Sat May 16 19:45:23 2020 +0200

Remove unused "with accessibility support" string

...left over from 3bc8b14bea3c11159bdbd6fc4f9658fce3ba252e "Drop the JVM
'feature' concept support"

Change-Id: Id03362ca78866698e13b85554df0c0900a5b5b0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94361
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 256328fd6e53..0eeaec393c6d 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -79,12 +79,10 @@ SvxJavaOptionsPage::SvxJavaOptionsPage(weld::Container* 
pPage, weld::DialogContr
 , m_xExpertConfigBtn(m_xBuilder->weld_button("expertconfig"))
 , m_xExperimentalCB(m_xBuilder->weld_check_button("experimental"))
 , m_xMacroCB(m_xBuilder->weld_check_button("macrorecording"))
-, m_xAccessibilityText(m_xBuilder->weld_label("a11y"))
 , m_xAddDialogText(m_xBuilder->weld_label("selectruntime"))
 , m_xJavaFrame(m_xBuilder->weld_widget("javaframe"))
 {
 m_sInstallText = m_xJavaPathText->get_label();
-m_sAccessibilityText = m_xAccessibilityText->get_label();
 m_sAddDialogText = m_xAddDialogText->get_label();
 
 m_xJavaList->set_size_request(m_xJavaList->get_approximate_digit_width() * 
30,
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index 01cd15210f44..f117746ebeec 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -55,7 +55,6 @@ private:
 OUStringm_pClassPath;
 #endif
 OUStringm_sInstallText;
-OUStringm_sAccessibilityText;
 OUStringm_sAddDialogText;
 Idlem_aResetIdle;
 
@@ -78,7 +77,6 @@ private:
 std::unique_ptr m_xExperimentalCB;
 std::unique_ptr m_xMacroCB;
 
-std::unique_ptr m_xAccessibilityText;
 std::unique_ptr m_xAddDialogText;
 
 std::unique_ptr m_xJavaFrame;
diff --git a/cui/uiconfig/ui/optadvancedpage.ui 
b/cui/uiconfig/ui/optadvancedpage.ui
index 279a23a5a20d..44baae1aa330 100644
--- a/cui/uiconfig/ui/optadvancedpage.ui
+++ b/cui/uiconfig/ui/optadvancedpage.ui
@@ -264,17 +264,6 @@
 False
 True
 6
-
-  
-True
-False
-with accessibility support
-  
-  
-0
-0
-  
-
 
   
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source cui/uiconfig include/jvmfwk jvmfwk/inc jvmfwk/plugins jvmfwk/source

2020-05-15 Thread Stephan Bergmann (via logerrit)
 cui/source/options/optjava.cxx   |5 --
 cui/uiconfig/ui/optadvancedpage.ui   |   17 
 include/jvmfwk/framework.hxx |   37 +--
 jvmfwk/inc/elements.hxx  |1 
 jvmfwk/inc/vendorbase.hxx|2 -
 jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java |   24 
 jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx |   18 ++---
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx  |1 
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx   |   18 +
 jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx |   25 ++--
 jvmfwk/source/elements.cxx   |   26 -
 jvmfwk/source/framework.cxx  |6 ---
 12 files changed, 23 insertions(+), 157 deletions(-)

New commits:
commit 3bc8b14bea3c11159bdbd6fc4f9658fce3ba252e
Author: Stephan Bergmann 
AuthorDate: Fri May 15 20:09:43 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri May 15 23:29:36 2020 +0200

Drop the JVM "feature" concept support

...now that 6ba74150866d71469827de9f4f19268dfa7db137
"jfw::isAccessibilitySupportDesired is obsolete" demonstrated that there is 
no
more need for JFW_FEATURE_ACCESSBRIDGE, the sole feature that had been 
provided.

* The javasettings_*.xml format still supports the  tag, but it is
  ignored when reading and always written as "0".

* There is no trace that "the bootstrap parameter
  JFW_PLUGIN_NO_NOT_CHECK_ACCESSIBILITY" whose mention gets removed from
  jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java had ever been 
supported.
  (The only mention was 6873b3be47d71f94c38262003101576081acd241 
"INTEGRATION:
  CWS jre5issues (1.3.18); FILE MERGED: 2005/01/18 12:48:48 jl 1.3.18.1:
  #i40879# in build environment the JRE is not tested for accessibility, 
because
  of potential X server problems" introducing that comment.)

* The "Features" column is removed from the JRE table on the "LibreOffice -
  Advance" options page.

Change-Id: I332d34b60548e7f2f852241ea8edfbee0ffcf510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94329
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 8c0060fcdd01..256328fd6e53 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -93,7 +93,6 @@ SvxJavaOptionsPage::SvxJavaOptionsPage(weld::Container* 
pPage, weld::DialogContr
 std::vector aWidths;
 aWidths.push_back(m_xJavaList->get_checkbox_column_width());
 aWidths.push_back(m_xJavaList->get_pixel_size("Sun Microsystems 
Inc.").Width());
-aWidths.push_back(m_xJavaList->get_pixel_size("0.0.0_00-icedtea").Width());
 m_xJavaList->set_column_fixed_widths(aWidths);
 
 std::vector aRadioColumns;
@@ -361,10 +360,6 @@ void SvxJavaOptionsPage::AddJRE( JavaInfo const * _pInfo )
 m_xJavaList->set_toggle(nPos, TRISTATE_FALSE, 0);
 m_xJavaList->set_text(nPos, _pInfo->sVendor, 1);
 m_xJavaList->set_text(nPos, _pInfo->sVersion, 2);
-OUString sFeature;
-if ((_pInfo->nFeatures & JFW_FEATURE_ACCESSBRIDGE) == 
JFW_FEATURE_ACCESSBRIDGE)
-sFeature = m_sAccessibilityText;
-m_xJavaList->set_text(nPos, sFeature, 3);
 
 INetURLObject aLocObj(_pInfo->sLocation);
 OUString sLocation = aLocObj.getFSysPath(FSysStyle::Detect);
diff --git a/cui/uiconfig/ui/optadvancedpage.ui 
b/cui/uiconfig/ui/optadvancedpage.ui
index cd4359b9ae6d..279a23a5a20d 100644
--- a/cui/uiconfig/ui/optadvancedpage.ui
+++ b/cui/uiconfig/ui/optadvancedpage.ui
@@ -10,8 +10,6 @@
   
   
   
-  
-  
   
   
   
@@ -196,7 +194,7 @@
 True
   
   
-5
+4
 0
   
 
@@ -228,19 +226,6 @@
 
   
 
-
-  
-True
-6
-Features
-
-  
-  
-3
-  
-
-  
-
   

[Libreoffice-commits] core.git: cui/source cui/uiconfig sw/qa sw/source

2020-05-06 Thread Gabor Kelemen (via logerrit)
 cui/source/inc/chardlg.hxx|1 
 cui/source/tabpages/chardlg.cxx   |   58 --
 cui/uiconfig/ui/effectspage.ui|   32 +++---
 sw/qa/uitest/writer_tests2/formatCharacter.py |4 -
 sw/qa/uitest/writer_tests5/tdf122722.py   |2 
 sw/source/core/text/inftxt.cxx|   35 ---
 6 files changed, 8 insertions(+), 124 deletions(-)

New commits:
commit 1eb6210d678bbb0c875f0f72bd876a9e7795dfbe
Author: Gabor Kelemen 
AuthorDate: Thu Apr 23 00:39:33 2020 +0200
Commit: Miklos Vajna 
CommitDate: Wed May 6 09:14:33 2020 +0200

tdf#132373 Remove blinking character property from the UI/editor

So far from document body and Character properties tab only.
Importing and exporting existing files still works.

Change-Id: I42179b47c64fe5c7db0393d0d4373363d772b51e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92875
Tested-by: Jenkins
Tested-by: Heiko Tietze 
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 05e655855b4e..06007847e9f2 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -178,7 +178,6 @@ private:
 std::unique_ptr m_xReliefLB;
 std::unique_ptr m_xOutlineBtn;
 std::unique_ptr m_xShadowBtn;
-std::unique_ptr m_xBlinkingBtn;
 std::unique_ptr m_xHiddenBtn;
 std::unique_ptr m_xOverlineLB;
 std::unique_ptr m_xOverlineColorFT;
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 11aaf87aa0fc..307be4f93e22 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1326,7 +1326,6 @@ SvxCharEffectsPage::SvxCharEffectsPage(weld::Container* 
pPage, weld::DialogContr
 , m_xReliefLB(m_xBuilder->weld_combo_box("relieflb"))
 , m_xOutlineBtn(m_xBuilder->weld_check_button("outlinecb"))
 , m_xShadowBtn(m_xBuilder->weld_check_button("shadowcb"))
-, m_xBlinkingBtn(m_xBuilder->weld_check_button("blinkingcb"))
 , m_xHiddenBtn(m_xBuilder->weld_check_button("hiddencb"))
 , m_xOverlineLB(m_xBuilder->weld_combo_box("overlinelb"))
 , m_xOverlineColorFT(m_xBuilder->weld_label("overlinecolorft"))
@@ -2004,33 +2003,6 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
 }
 }
 
-// Blinking
-nWhich = GetWhich( SID_ATTR_FLASH );
-eState = rSet->GetItemState( nWhich );
-
-switch ( eState )
-{
-case SfxItemState::UNKNOWN:
-m_xBlinkingBtn->hide();
-break;
-
-case SfxItemState::DISABLED:
-case SfxItemState::READONLY:
-m_xBlinkingBtn->set_sensitive(false);
-break;
-
-case SfxItemState::DONTCARE:
-m_xBlinkingBtn->set_state( TRISTATE_INDET );
-break;
-
-case SfxItemState::DEFAULT:
-case SfxItemState::SET:
-{
-const SvxBlinkItem& rItem = static_cast(rSet->Get( nWhich ));
-m_xBlinkingBtn->set_state( static_cast(rItem.GetValue()) 
);
-break;
-}
-}
 // Hidden
 nWhich = GetWhich( SID_ATTR_CHAR_HIDDEN );
 eState = rSet->GetItemState( nWhich );
@@ -2081,7 +2053,6 @@ void SvxCharEffectsPage::ChangesApplied()
 m_xReliefLB->save_value();
 m_xOutlineBtn->save_state();
 m_xShadowBtn->save_state();
-m_xBlinkingBtn->save_state();
 m_xHiddenBtn->save_state();
 m_xFontTransparencyMtr->save_value();
 }
@@ -2355,30 +2326,6 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet )
 
 bChanged = true;
 
-// Blinking
-nWhich = GetWhich( SID_ATTR_FLASH );
-pOld = GetOldItem( *rSet, SID_ATTR_FLASH );
-eState = m_xBlinkingBtn->get_state();
-
-if ( pOld )
-{
-const SvxBlinkItem& rItem = *static_cast(pOld);
-if ( rItem.GetValue() == StateToAttr( eState ) && 
m_xBlinkingBtn->get_saved_state() == eState )
-bChanged = false;
-}
-
-if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, false, 
&pItem ) == SfxItemState::SET &&
- !StateToAttr( eState ) && static_cast(pItem)->GetValue() )
-bChanged = true;
-
-if ( bChanged && eState != TRISTATE_INDET )
-{
-rSet->Put( SvxBlinkItem( StateToAttr( eState ), nWhich ) );
-bModified = true;
-}
-else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) )
-rSet->InvalidateItem(nWhich);
-
 // Hidden
 nWhich = GetWhich( SID_ATTR_CHAR_HIDDEN );
 pOld = GetOldItem( *rSet, SID_ATTR_CHAR_HIDDEN );
@@ -2420,9 +2367,6 @@ void SvxCharEffectsPage::DisableControls( sal_uInt16 
nDisable )
 if ( ( DISABLE_WORDLINE & nDisable ) == DISABLE_WORDLINE )
 m_xIndividualWordsBtn->set_sensitive(false);
 
-if ( ( DISABLE_BLINK & nDisable ) == DISABLE_BLINK )
-m_xBlinkingBtn->set_sensitive(false);
-
 if ( ( DISABLE_UNDERLINE_COLOR & nDisable ) == DISABLE_UNDERLINE_COLOR )
 {
  

  1   2   3   4   5   >