[Libreoffice-commits] core.git: cui/source editeng/source oox/source reportdesign/source sc/source soltools/mkdepend sw/source vcl/source

2023-12-04 Thread Julien Nabet (via logerrit)
 cui/source/dialogs/SpellDialog.cxx   |5 -
 editeng/source/misc/svxacorr.cxx |   10 --
 oox/source/drawingml/texteffectscontext.cxx  |5 +++--
 reportdesign/source/filter/xml/xmlExport.cxx |1 +
 sc/source/core/data/SolverSettings.cxx   |4 +++-
 sc/source/ui/namedlg/namedefdlg.cxx  |8 ++--
 soltools/mkdepend/collectdircontent.cxx  |1 +
 sw/source/core/layout/paintfrm.cxx   |2 +-
 vcl/source/cnttype/mcnttype.cxx  |4 +++-
 9 files changed, 30 insertions(+), 10 deletions(-)

New commits:
commit bc95ece0618b9886890d9c758b9d0ebc0fc41c69
Author: Julien Nabet 
AuthorDate: Mon Dec 4 18:03:27 2023 +0100
Commit: Julien Nabet 
CommitDate: Mon Dec 4 19:21:31 2023 +0100

cid#1546021 Using invalid iterator

and :

cid#1545983 Using invalid iterator
cid#1545969 Using invalid iterator
cid#1545949 Using invalid iterator
cid#1545929 Using invalid iterator
cid#1545911 Using invalid iterator
cid#1545910 Using invalid iterator
cid#1545886 Using invalid iterator
cid#1545870 Using invalid iterator
cid#1545813 Using invalid iterator

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

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 3ad9c2b196b0..dfdad984ec41 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1247,7 +1247,10 @@ namespace
 void ExtractErrorDescription(const EECharAttrib& rEECharAttrib, 
SpellErrorDescription& rSpellErrorDescription)
 {
 css::uno::Sequence aSequence;
-static_cast(rEECharAttrib.pAttr)->GetGrabBag().find("SpellErrorDescription")->second
 >>= aSequence;
+const auto pGrabBag = static_cast(rEECharAttrib.pAttr)->GetGrabBag();
+const auto iter = pGrabBag.find("SpellErrorDescription");
+assert(iter != pGrabBag.end());
+iter->second >>= aSequence;
 rSpellErrorDescription.fromSequence(aSequence);
 }
 }
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 8a28ccf42ada..6fdcbcca1ccf 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1750,7 +1750,11 @@ bool SvxAutoCorrect::AddWordStartException( const 
OUString& rNew,
 if (iter != m_aLangTable.end())
 pLists = >second;
 else if(CreateLanguageFile(aLangTagUndetermined))
-pLists = _aLangTable.find(aLangTagUndetermined)->second;
+{
+iter = m_aLangTable.find(aLangTagUndetermined);
+assert(iter != m_aLangTable.end());
+pLists = >second;
+}
 }
 OSL_ENSURE(pLists, "No auto correction file!");
 return pLists && pLists->AddToWordStartExceptList(rNew);
@@ -2030,7 +2034,9 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
 CreateLanguageFile(aLanguageTag, false))
 {
 //the language is available - so bring it on
-SvxAutoCorrectLanguageLists& rList = 
m_aLangTable.find(aLanguageTag)->second;
+const auto iter = m_aLangTable.find(aLanguageTag);
+assert(iter != m_aLangTable.end());
+SvxAutoCorrectLanguageLists& rList = iter->second;
 pRet = lcl_SearchWordsInList( , rTxt, rStt, nEndPos );
 if( pRet )
 {
diff --git a/oox/source/drawingml/texteffectscontext.cxx 
b/oox/source/drawingml/texteffectscontext.cxx
index 0e33a4c3c13b..347971f4616b 100644
--- a/oox/source/drawingml/texteffectscontext.cxx
+++ b/oox/source/drawingml/texteffectscontext.cxx
@@ -91,8 +91,9 @@ OUString const & lclGetGrabBagName(sal_uInt32 aId)
 { OOX_TOKEN(w14, stylisticSets), "CharStylisticSetsTextEffect" },
 { OOX_TOKEN(w14, cntxtAlts), "CharCntxtAltsTextEffect" },
 };
-
-return aGrabBagNameMap.find(aId)->second;
+const auto iter = aGrabBagNameMap.find(aId);
+assert(iter != aGrabBagNameMap.end());
+return iter->second;
 }
 
 }
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index 6e7104724704..c1b2c24232d9 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -755,6 +755,7 @@ void ORptExport::exportContainer(const Reference< 
XSection>& _xSection)
 TGrid::const_iterator aRowEnd = aFind->second.end();
 
 TGridStyleMap::const_iterator aRowFind = m_aRowStyleNames.find(_xSection);
+assert(aRowFind != m_aRowStyleNames.end());
 auto aHeightIter = aRowFind->second.cbegin();
 OSL_ENSURE(aRowFind->second.size() == aFind->second.size(),"Different 
count for rows");
 
diff --git a/sc/source/core/data/SolverSettings.cxx 
b/sc/source/core/data/SolverSettings.cxx
index ac2d2aa24aeb..60eb747f55f5 100644
--- a/sc/source/core/data/SolverSettings.cxx
+++ 

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

2023-12-04 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/options/optaboutconfig.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 1597968f5cd2534fb6e0be40fafecc305a004f4e
Author: Samuel Mehrbrodt 
AuthorDate: Mon Dec 4 16:00:21 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Dec 4 17:43:34 2023 +0100

tdf#155676 Properly support editing string lists

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

diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index b5d218ecadad..ea63035471ca 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -866,7 +866,12 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, 
weld::Button&, void)
 else if (sPropertyType == "string-list")
 {
 SvxListDialog aListDialog(m_xDialog.get());
-aListDialog.SetEntries(commaStringToSequence(sDialogValue));
+Reference xConfigAccess
+= getConfigAccess(pUserData->sPropertyPath, false);
+Any aNode = xConfigAccess->getByName(sPropertyName);
+uno::Sequence aList = 
aNode.get>();
+aListDialog.SetEntries(
+
comphelper::sequenceToContainer>(aList));
 aListDialog.SetMode(ListMode::String);
 if (aListDialog.run() == RET_OK)
 {


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

2023-12-04 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/options/optaboutconfig.cxx |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit a5418fbe09860f770e8aa2f478023c0843bb05d8
Author: Samuel Mehrbrodt 
AuthorDate: Thu Nov 30 16:53:01 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Dec 4 14:40:41 2023 +0100

tdf#158457 Use proper parent

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

diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index a3ccf7fe0206..b5d218ecadad 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -751,8 +751,8 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, 
weld::Button&, void)
 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);
+SvxNumberDialog aNumberDialog(m_xDialog.get(), sPropertyName,
+  sDialogValue.toInt64(), nMin, 
nMax);
 if (aNumberDialog.run() == RET_OK)
 {
 sal_Int64 nNewValue = aNumberDialog.GetNumber();
@@ -774,7 +774,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, 
weld::Button&, void)
 }
 else if (sPropertyType == "double")
 {
-SvxDecimalNumberDialog aNumberDialog(m_pParent, sPropertyName,
+SvxDecimalNumberDialog aNumberDialog(m_xDialog.get(), 
sPropertyName,
  sDialogValue.toDouble());
 if (aNumberDialog.run() == RET_OK)
 {
@@ -786,7 +786,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, 
weld::Button&, void)
 }
 else if (sPropertyType == "string")
 {
-SvxNameDialog aNameDialog(m_pParent, sDialogValue, 
sPropertyName);
+SvxNameDialog aNameDialog(m_xDialog.get(), sDialogValue, 
sPropertyName);
 aNameDialog.SetCheckNameHdl(LINK(this, CuiAboutConfigTabPage, 
ValidNameHdl));
 if (aNameDialog.run() == RET_OK)
 {
@@ -797,7 +797,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, 
weld::Button&, void)
 }
 else if (sPropertyType == "short-list")
 {
-SvxListDialog aListDialog(m_pParent);
+SvxListDialog aListDialog(m_xDialog.get());
 aListDialog.SetEntries(commaStringToSequence(sDialogValue));
 aListDialog.SetMode(ListMode::Int16);
 if (aListDialog.run() == RET_OK)
@@ -814,7 +814,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, 
weld::Button&, void)
 }
 else if (sPropertyType == "int-list")
 {
-SvxListDialog aListDialog(m_pParent);
+SvxListDialog aListDialog(m_xDialog.get());
 aListDialog.SetEntries(commaStringToSequence(sDialogValue));
 aListDialog.SetMode(ListMode::Int32);
 if (aListDialog.run() == RET_OK)
@@ -831,7 +831,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, 
weld::Button&, void)
 }
 else if (sPropertyType == "long-list")
 {
-SvxListDialog aListDialog(m_pParent);
+SvxListDialog aListDialog(m_xDialog.get());
 aListDialog.SetEntries(commaStringToSequence(sDialogValue));
 aListDialog.SetMode(ListMode::Int64);
 if (aListDialog.run() == RET_OK)
@@ -848,7 +848,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, 
weld::Button&, void)
 }
 else if (sPropertyType == "double-list")
 {
-SvxListDialog aListDialog(m_pParent);
+SvxListDialog aListDialog(m_xDialog.get());
 aListDialog.SetEntries(commaStringToSequence(sDialogValue));
 aListDialog.SetMode(ListMode::Double);
 if (aListDialog.run() == RET_OK)
@@ -865,7 +865,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, 
weld::Button&, void)
 }
 else if (sPropertyType == "string-list")
 {
-SvxListDialog aListDialog(m_pParent);
+SvxListDialog aListDialog(m_xDialog.get());
 aListDialog.SetEntries(commaStringToSequence(sDialogValue));
 aListDialog.SetMode(ListMode::String);
 if (aListDialog.run() == RET_OK)


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

2023-12-04 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/options/optaboutconfig.cxx |  140 --
 1 file changed, 83 insertions(+), 57 deletions(-)

New commits:
commit 7976f67600670f789f36232e390f838cf3e00830
Author: Samuel Mehrbrodt 
AuthorDate: Mon Dec 4 10:54:28 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Dec 4 12:29:58 2023 +0100

Expert config: Allow editing settings without default value

Fix fallout from 700ac29771ccec2d66934f66b45a33a48a5ac3f1

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

diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index 885ea189a8c5..a3ccf7fe0206 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -400,7 +400,7 @@ void CuiAboutConfigTabPage::FillItems(const 
Reference& xNameAccess,
 OUStringBuffer sValue;
 
 // Fall back to dynamic type when this is empty
-if (aType == cppu::UnoType::get())
+if (aType == cppu::UnoType::get() && sDynamicType != "void")
 {
 if (sDynamicType == "boolean")
 aType = cppu::UnoType::get();
@@ -436,151 +436,177 @@ void CuiAboutConfigTabPage::FillItems(const 
Reference& xNameAccess,
 sValue = it->sValue;
 else
 {
-if (aNode.getValueType().getTypeClass() == 
css::uno::TypeClass_VOID)
+bool bHasValue = sDynamicType != "void";
+if (aType == cppu::UnoType::get())
 {
-// Skip, no value set
-}
-else if (aType == cppu::UnoType::get())
-{
-sValue = OUString::boolean(aNode.get());
+if (bHasValue)
+sValue = OUString::boolean(aNode.get());
 sType = "boolean";
 }
 else if (aType == cppu::UnoType::get())
 {
-sValue = OUString::number(aNode.get());
+if (bHasValue)
+sValue = OUString::number(aNode.get());
 sType = "short";
 }
 else if (aType == cppu::UnoType::get())
 {
-sValue = OUString::number(aNode.get());
+if (bHasValue)
+sValue = OUString::number(aNode.get());
 sType = "int";
 }
 else if (aType == cppu::UnoType::get())
 {
-sValue = OUString::number(aNode.get());
+if (bHasValue)
+sValue = OUString::number(aNode.get());
 sType = "long";
 }
 else if (aType == cppu::UnoType::get())
 {
-sValue = OUString::number(aNode.get());
+if (bHasValue)
+sValue = OUString::number(aNode.get());
 sType = "double";
 }
 else if (aType == cppu::UnoType::get())
 {
-sValue = aNode.get();
+if (bHasValue)
+sValue = aNode.get();
 sType = "string";
 }
 else if (aType == 
cppu::UnoType>::get())
 {
-const uno::Sequence seq = 
aNode.get>();
-for (sal_Int8 j : seq)
+if (bHasValue)
 {
-OUString s = 
OUString::number(static_cast(j), 16);
-if (s.getLength() == 1)
+const uno::Sequence seq = 
aNode.get>();
+for (sal_Int8 j : seq)
 {
-sValue.append("0");
+OUString s = 
OUString::number(static_cast(j), 16);
+if (s.getLength() == 1)
+{
+sValue.append("0");
+}
+sValue.append(s.toAsciiUpperCase());
 }
-sValue.append(s.toAsciiUpperCase());
 }
 sType = "hexBinary";
 }
 else if (aType == 
cppu::UnoType>::get())
 {
-uno::Sequence seq = 
aNode.get>();
-for (sal_Int32 j = 0; j != seq.getLength(); ++j)
+if (bHasValue)
 {
-if (j != 0)
+uno::Sequence seq = 
aNode.get>();
+for (sal_Int32 j = 0; j != seq.getLength(); ++j)
 {
-

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

2023-11-27 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/dialogs/dlgname.cxx|   40 +-
 cui/source/options/optaboutconfig.cxx |  126 +++---
 cui/source/options/optaboutconfig.hxx |1 
 include/cui/dlgname.hxx   |   14 +++
 4 files changed, 136 insertions(+), 45 deletions(-)

New commits:
commit 45217ca5ba0d4e78b462a10072a4334342cc402c
Author: Samuel Mehrbrodt 
AuthorDate: Thu Nov 23 16:49:43 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Nov 27 10:39:58 2023 +0100

tdf#157438 Make int/double lists editable in expert config

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

diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index a06833bb6ce6..8164bf1c2b40 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -148,6 +148,7 @@ IMPL_LINK_NOARG(SvxObjectTitleDescDialog, DecorativeHdl, 
weld::Toggleable&, void
 
 SvxListDialog::SvxListDialog(weld::Window* pParent)
 : GenericDialogController(pParent, "cui/ui/listdialog.ui", "ListDialog")
+, m_aMode(ListMode::String)
 , m_xList(m_xBuilder->weld_tree_view("assignlist"))
 , m_xAddBtn(m_xBuilder->weld_button("addbtn"))
 , m_xRemoveBtn(m_xBuilder->weld_button("removebtn"))
@@ -168,7 +169,7 @@ SvxListDialog::~SvxListDialog() {}
 
 IMPL_LINK_NOARG(SvxListDialog, AddHdl_Impl, weld::Button&, void)
 {
-SvxNameDialog aNameDlg(m_xDialog.get(), "", "blabla");
+SvxNameDialog aNameDlg(m_xDialog.get(), "", "");
 
 if (!aNameDlg.run())
 return;
@@ -213,7 +214,7 @@ void SvxListDialog::SelectionChanged()
 m_xEditBtn->set_sensitive(bEnable);
 }
 
-std::vector SvxListDialog::GetEntries() const
+std::vector SvxListDialog::GetEntries()
 {
 int nCount = m_xList->n_children();
 std::vector aList;
@@ -240,11 +241,36 @@ void SvxListDialog::EditEntry()
 return;
 
 OUString sOldText(m_xList->get_selected_text());
-SvxNameDialog aNameDlg(m_xDialog.get(), sOldText, "blabla");
+OUString sNewText;
+
+if (m_aMode == ListMode::String)
+{
+SvxNameDialog aNameDlg(m_xDialog.get(), sOldText, "");
+if (!aNameDlg.run())
+return;
+sNewText = comphelper::string::strip(aNameDlg.GetName(), ' ');
+}
+else if (m_aMode == ListMode::Int16 || m_aMode == ListMode::Int32 || 
m_aMode == ListMode::Int64)
+{
+sal_Int64 nMin = m_aMode == ListMode::Int16
+ ? SAL_MIN_INT16
+ : m_aMode == ListMode::Int32 ? SAL_MIN_INT32 : 
SAL_MIN_INT64;
+sal_Int64 nMax = m_aMode == ListMode::Int16
+ ? SAL_MAX_INT16
+ : m_aMode == ListMode::Int32 ? SAL_MAX_INT32 : 
SAL_MAX_INT64;
+SvxNumberDialog aNumberDlg(m_xDialog.get(), "", sOldText.toInt64(), 
nMin, nMax);
+if (!aNumberDlg.run())
+return;
+sNewText = OUString::number(aNumberDlg.GetNumber());
+}
+else if (m_aMode == ListMode::Double)
+{
+SvxDecimalNumberDialog aNumberDlg(m_xDialog.get(), "", 
sOldText.toDouble());
+if (!aNumberDlg.run())
+return;
+sNewText = OUString::number(aNumberDlg.GetNumber());
+}
 
-if (!aNameDlg.run())
-return;
-OUString sNewText = comphelper::string::strip(aNameDlg.GetName(), ' ');
 if (!sNewText.isEmpty() && sNewText != sOldText)
 {
 m_xList->remove(nPos);
@@ -253,4 +279,6 @@ void SvxListDialog::EditEntry()
 }
 }
 
+void SvxListDialog::SetMode(ListMode aMode) { m_aMode = aMode; };
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index 68fa56ccd5ac..f191a59bd2ee 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -259,6 +259,54 @@ OUString lcl_StringListToString(const 
uno::Sequence& seq)
 }
 return sBuffer.makeStringAndClear();
 }
+
+OUString lcl_IntListToString(const uno::Sequence& seq)
+{
+OUStringBuffer sBuffer;
+for (sal_Int32 i = 0; i != seq.getLength(); ++i)
+{
+if (i != 0)
+sBuffer.append(",");
+sBuffer.append(OUString::number(seq[i]));
+}
+return sBuffer.makeStringAndClear();
+}
+
+OUString lcl_IntListToString(const uno::Sequence& seq)
+{
+OUStringBuffer sBuffer;
+for (sal_Int32 i = 0; i != seq.getLength(); ++i)
+{
+if (i != 0)
+sBuffer.append(",");
+sBuffer.append(OUString::number(seq[i]));
+}
+return sBuffer.makeStringAndClear();
+}
+
+OUString lcl_IntListToString(const uno::Sequence& seq)
+{
+OUStringBuffer sBuffer;
+for (sal_Int32 i = 0; i != seq.getLength(); ++i)
+{
+if (i != 0)
+sBuffer.append(",");
+sBuffer.append(OUString::number(seq[i]));
+}
+return 

[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

2023-11-24 Thread Julien Nabet (via logerrit)
 cui/source/dialogs/hltpbase.cxx |   21 +++--
 1 file changed, 15 insertions(+), 6 deletions(-)

New commits:
commit 516f800f84b533db0082b1f39c19d1af40ab29c8
Author: Julien Nabet 
AuthorDate: Fri Nov 24 20:25:47 2023 +0100
Commit: Julien Nabet 
CommitDate: Fri Nov 24 21:31:43 2023 +0100

tdf#158345: Opening Hyperlink dialog leads to crash

terminate called after throwing an instance of 
'com::sun::star::datatransfer::UnsupportedFlavorException'

relevant part of bt from this exception:
0  0x7f34fd6b0231 in __cxa_throw () at 
/lib/x86_64-linux-gnu/libstdc++.so.6
1  0x7f34e9d8207d in 
x11::X11Transferable::getTransferData(com::sun::star::datatransfer::DataFlavor 
const&) (this=0x562594fc9af0, rFlavor=...)
at 
/home/julien/lo/libreoffice/vcl/unx/generic/dtrans/X11_transferable.cxx:58
2  0x7f34e9d825ec in non-virtual thunk to 
x11::X11Transferable::getTransferData(com::sun::star::datatransfer::DataFlavor 
const&) () at /home/julien/lo/libreoffice/instdir/program/libvclplug_genlo.so
3  0x7f34e15589f2 in SvxHyperlinkTabPageBase::Reset(SfxItemSet const&) 
(this=0x5625958378f0, rItemSet=SfxItemSet of pool 0x562591482920 with parent 
0x0 and Which ranges: [(10361, 10362)] = {...})
at /home/julien/lo/libreoffice/cui/source/dialogs/hltpbase.cxx:468

See full bt here: 
https://bugs.documentfoundation.org/attachment.cgi?id=191029

Regression from:
89d3735e05b98223a49a387421386fd736fc3de6^!
tdf#146576 - Propose clipboard content when inserting a hyperlink

Change-Id: Ic111b8348f2288c4e9e6760fe6f7f48faadec582
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159939
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index f2448460ee66..f0aa7c368c04 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::ucbhelper;
 
@@ -465,13 +466,21 @@ void SvxHyperlinkTabPageBase::Reset( const SfxItemSet& 
rItemSet)
 if (xTransferable->isDataFlavorSupported(aFlavor))
 {
 OUString aClipBoardConentent;
-if (xTransferable->getTransferData(aFlavor) >>= 
aClipBoardConentent)
+try
+{
+if (xTransferable->getTransferData(aFlavor) >>= 
aClipBoardConentent)
+{
+INetURLObject aURL;
+aURL.SetSmartURL(aClipBoardConentent);
+if (!aURL.HasError())
+aStrURL
+= 
aURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
+}
+}
+// tdf#158345: Opening Hyperlink dialog leads to crash
+// MimeType = "text/plain;charset=utf-16"
+catch(const 
css::datatransfer::UnsupportedFlavorException&)
 {
-INetURLObject aURL;
-aURL.SetSmartURL(aClipBoardConentent);
-if (!aURL.HasError())
-aStrURL
-= 
aURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
 }
 }
 }


[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 sw/qa

2023-11-17 Thread Andreas Heinisch (via logerrit)
 cui/source/tabpages/paragrph.cxx|6 
 sw/qa/uitest/writer_tests5/tdf154543.py |   39 
 2 files changed, 44 insertions(+), 1 deletion(-)

New commits:
commit 5af2041c551e97903d2ba7994c5e893836891832
Author: Andreas Heinisch 
AuthorDate: Fri Nov 17 12:09:18 2023 +0100
Commit: Andreas Heinisch 
CommitDate: Fri Nov 17 14:13:14 2023 +0100

tdf#154543 - Paragraph dialog: reset snap to grid to parent setting

Added the SID_ATTR_PARA_SNAPTOGRID to the alignment ranges in order to
reset the snap to grid option to the corresponding parent setting.
Without this parameter, the main dialog does not have any knowledge
about this option.

Change-Id: Ib090fae0919be54dd41674d129f5355c3566a90c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159565
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 7c8f2dc225a7..132b125f0293 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -66,7 +66,11 @@ const WhichRangesContainer 
SvxStdParagraphTabPage::pStdRanges(
 >);
 
 const WhichRangesContainer SvxParaAlignTabPage::pAlignRanges(
-svl::Items);  // 10027
+svl::Items<
+SID_ATTR_PARA_ADJUST, SID_ATTR_PARA_ADJUST, // 10027
+// tdf#154543 - reset snap to grid to parent
+SID_ATTR_PARA_SNAPTOGRID, SID_ATTR_PARA_SNAPTOGRID // 10945
+>);
 
 const WhichRangesContainer SvxParaAlignTabPage::pSdrAlignRanges(
 svl::Items<
diff --git a/sw/qa/uitest/writer_tests5/tdf154543.py 
b/sw/qa/uitest/writer_tests5/tdf154543.py
new file mode 100755
index ..ab6ab0a06e19
--- /dev/null
+++ b/sw/qa/uitest/writer_tests5/tdf154543.py
@@ -0,0 +1,39 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import get_state_as_dict
+
+class tdf154543(UITestCase):
+
+   def test_tdf154543_reset_snap_to_grid_parent(self):
+
+with self.ui_test.create_doc_in_start_center("writer"):
+
+# Open the paragraph style dialog and unselect the snap to grid 
checkbox
+with self.ui_test.execute_dialog_through_command(".uno:EditStyle") 
as xDialog:
+xTabs = xDialog.getChild("tabcontrol")
+select_pos(xTabs, "2")
+xSnapCheckbox = xTabs.getChild("checkCB_SNAP")
+xSnapCheckbox.executeAction("CLICK", tuple())
+self.assertEqual(get_state_as_dict(xSnapCheckbox)["Selected"], 
"false")
+
+# Open the paragraph style dialog and reset dialog to parent 
settings
+with self.ui_test.execute_dialog_through_command(".uno:EditStyle") 
as xDialog:
+xTabs = xDialog.getChild("tabcontrol")
+select_pos(xTabs, "2")
+xSnapCheckbox = xTabs.getChild("checkCB_SNAP")
+xStandardButton = xDialog.getChild("standard")
+xStandardButton.executeAction("CLICK", tuple())
+# Without the fix in place, this test would have failed with
+# AssertionError: 'false' != 'true'
+self.assertEqual(get_state_as_dict(xSnapCheckbox)["Selected"], 
"true")
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:


[Libreoffice-commits] core.git: cui/source include/sfx2 officecfg/registry sfx2/source shell/source stoc/source sysui/desktop ucbhelper/source vcl/unx

2023-11-16 Thread Michael Stahl (via logerrit)
 cui/source/options/treeopt.cxx |2 
 include/sfx2/sfxsids.hrc   |2 
 officecfg/registry/data/org/openoffice/Inet.xcu|   10 --
 officecfg/registry/schema/org/openoffice/Inet.xcs  |2 
 sfx2/source/appl/appcfg.cxx|   12 --
 shell/source/backends/desktopbe/desktopbackend.cxx |2 
 shell/source/backends/kf5be/kf5access.cxx  |   54 
 shell/source/backends/kf5be/kf5backend.cxx |   12 +-
 shell/source/backends/macbe/macbackend.mm  |   41 -
 shell/source/backends/wininetbe/wininetbackend.cxx |   27 --
 stoc/source/javavm/javavm.cxx  |   89 -
 sysui/desktop/menus/base.desktop   |2 
 sysui/desktop/menus/calc.desktop   |2 
 sysui/desktop/menus/draw.desktop   |2 
 sysui/desktop/menus/impress.desktop|2 
 sysui/desktop/menus/math.desktop   |2 
 sysui/desktop/menus/startcenter.desktop|2 
 sysui/desktop/menus/writer.desktop |2 
 sysui/desktop/menus/xsltfilter.desktop |2 
 ucbhelper/source/client/proxydecider.cxx   |   34 
 vcl/unx/gtk3_kde5/kde5_filepicker.cxx  |5 -
 vcl/unx/kf5/KFFilePicker.cxx   |5 -
 22 files changed, 25 insertions(+), 288 deletions(-)

New commits:
commit d343a2b6393aec2eba0d25d7f4f390f12d1515f6
Author: Michael Stahl 
AuthorDate: Thu Nov 16 12:55:48 2023 +0100
Commit: Michael Stahl 
CommitDate: Thu Nov 16 19:15:26 2023 +0100

tdf#146386 deprecate, remove usage of Inet::Settings::ooInetFTPProxyName

* officecfg: deprecate Inet::Settings::ooInetFTPProxyName/Port
* ucbhelper: stop handling these settings
* sfx2: remove SID_INET_FTP_PROXY_NAME and SID_INET_FTP_PROXY_PORT
  and usage from SfxApplication::GetOptions()
* shell: remove proxy config code from backends
* stoc: the JavaVM would have its "ftp.proxyHost" properties set based
  on officecfg values; remove that
* sysui,vcl: remove protocol from KDE desktop files and file picker

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

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 0735ce8dcebb..882d59431169 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1509,7 +1509,7 @@ std::optional 
OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId )
 svl::Items<
 //SID_OPTIONS_START - ..END
 SID_SAVEREL_INET, SID_SAVEREL_FSYS,
-SID_INET_NOPROXY, SID_INET_FTP_PROXY_PORT,
+SID_INET_NOPROXY, SID_INET_HTTP_PROXY_PORT,
 SID_SECURE_URL, SID_SECURE_URL> );
 SfxApplication::GetOptions(*pRet);
 break;
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 55327feb0034..3e1775788dc2 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -562,8 +562,6 @@ class SvxZoomItem;
 
 #define SID_INET_HTTP_PROXY_NAME
TypedWhichId(SID_OPTIONS_START + 38)
 #define SID_INET_HTTP_PROXY_PORT
TypedWhichId(SID_OPTIONS_START + 39)
-#define SID_INET_FTP_PROXY_NAME 
TypedWhichId(SID_OPTIONS_START + 40)
-#define SID_INET_FTP_PROXY_PORT 
TypedWhichId(SID_OPTIONS_START + 41)
 
 // Automatic update of Styles - manage TabPage
 #define SID_ATTR_AUTO_STYLE_UPDATE  
TypedWhichId(SID_OPTIONS_START + 65)
diff --git a/officecfg/registry/data/org/openoffice/Inet.xcu 
b/officecfg/registry/data/org/openoffice/Inet.xcu
index 6ebb776a..dbe2fe4166c1 100644
--- a/officecfg/registry/data/org/openoffice/Inet.xcu
+++ b/officecfg/registry/data/org/openoffice/Inet.xcu
@@ -30,16 +30,6 @@
   
   
 
-
-  
-  
-  
-
-
-  
-  
-  
-
 
   
   
diff --git a/officecfg/registry/schema/org/openoffice/Inet.xcs 
b/officecfg/registry/schema/org/openoffice/Inet.xcs
index a236e0f92697..c88b846da76b 100644
--- a/officecfg/registry/schema/org/openoffice/Inet.xcs
+++ b/officecfg/registry/schema/org/openoffice/Inet.xcs
@@ -61,6 +61,7 @@
 
 
   Specifies the name of the FTP proxy server.
+  Not used anymore
 
 
 
@@ -69,6 +70,7 @@
 
 
   Specifies the port of the FTP proxy server.
+  Not used anymore
 
 
   
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 679eb2cd3da9..ee45f9da2661 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -211,14 +211,6 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
 

[Libreoffice-commits] core.git: cui/source solenv/clang-format

2023-11-15 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/options/optaboutconfig.cxx |  364 +-
 cui/source/options/optaboutconfig.hxx |   34 +--
 solenv/clang-format/excludelist   |2 
 3 files changed, 202 insertions(+), 198 deletions(-)

New commits:
commit f271ec5cd98ae32fd643df33174136d0a91a1941
Author: Samuel Mehrbrodt 
AuthorDate: Mon Nov 13 14:22:09 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 16 08:04:31 2023 +0100

Format optaboutconfig with clang-format

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

diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index 11806faa8477..362af44cfd7d 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -7,37 +7,37 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include "optaboutconfig.hxx"
 #include 
 #include 
-#include "optaboutconfig.hxx"
 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
-#include 
-#include 
 
 #include 
 #include 
@@ -52,15 +52,16 @@ using namespace com::sun::star::container;
 
 struct Prop_Impl
 {
-OUStringName;
-OUStringProperty;
-Any Value;
-
-Prop_Impl( OUString sName, OUString sProperty, Any aValue )
-: Name(std::move( sName ))
-, Property(std::move( sProperty ))
-, Value(std::move( aValue ))
-{}
+OUString Name;
+OUString Property;
+Any Value;
+
+Prop_Impl(OUString sName, OUString sProperty, Any aValue)
+: Name(std::move(sName))
+, Property(std::move(sProperty))
+, Value(std::move(aValue))
+{
+}
 };
 
 struct UserData
@@ -72,20 +73,22 @@ struct UserData
 int aLineage;
 Reference aXNameAccess;
 
-explicit UserData( OUString aPropertyPath, OUString aTooltip, bool 
isReadOnly )
-: bIsPropertyPath( true )
-, bIsReadOnly( isReadOnly )
+explicit UserData(OUString aPropertyPath, OUString aTooltip, bool 
isReadOnly)
+: bIsPropertyPath(true)
+, bIsReadOnly(isReadOnly)
 , sPropertyPath(std::move(aPropertyPath))
 , sTooltip(std::move(aTooltip))
 , aLineage(0)
-{}
+{
+}
 
-explicit UserData( Reference const & rXNameAccess, int rIndex 
)
-: bIsPropertyPath( false )
-, bIsReadOnly( false )
+explicit UserData(Reference const& rXNameAccess, int rIndex)
+: bIsPropertyPath(false)
+, bIsReadOnly(false)
 , aLineage(rIndex)
-, aXNameAccess( rXNameAccess )
-{}
+, aXNameAccess(rXNameAccess)
+{
+}
 };
 
 CuiAboutConfigTabPage::CuiAboutConfigTabPage(weld::Window* pParent)
@@ -103,24 +106,20 @@ 
CuiAboutConfigTabPage::CuiAboutConfigTabPage(weld::Window* pParent)
  m_xPrefBox->get_height_rows(23));
 m_xPrefBox->connect_column_clicked(LINK(this, CuiAboutConfigTabPage, 
HeaderBarClick));
 
-m_xEditBtn->connect_clicked(LINK( this, CuiAboutConfigTabPage, 
StandardHdl_Impl));
-m_xResetBtn->connect_clicked(LINK( this, CuiAboutConfigTabPage, 
ResetBtnHdl_Impl));
+m_xEditBtn->connect_clicked(LINK(this, CuiAboutConfigTabPage, 
StandardHdl_Impl));
+m_xResetBtn->connect_clicked(LINK(this, CuiAboutConfigTabPage, 
ResetBtnHdl_Impl));
 m_xPrefBox->connect_row_activated(LINK(this, CuiAboutConfigTabPage, 
DoubleClickHdl_Impl));
 m_xPrefBox->connect_expanding(LINK(this, CuiAboutConfigTabPage, 
ExpandingHdl_Impl));
 m_xSearchBtn->connect_clicked(LINK(this, CuiAboutConfigTabPage, 
SearchHdl_Impl));
 
 m_options.AlgorithmType2 = util::SearchAlgorithms2::ABSOLUTE;
 m_options.transliterateFlags |= TransliterationFlags::IGNORE_CASE;
-m_options.searchFlag |= (util::SearchFlags::REG_NOT_BEGINOFLINE |
-util::SearchFlags::REG_NOT_ENDOFLINE);
+m_options.searchFlag
+|= (util::SearchFlags::REG_NOT_BEGINOFLINE | 
util::SearchFlags::REG_NOT_ENDOFLINE);
 
 float fWidth = m_xPrefBox->get_approximate_digit_width();
-std::vector aWidths
-{
-o3tl::narrowing(fWidth * 65),
-o3tl::narrowing(fWidth * 20),
-o3tl::narrowing(fWidth * 8)
-};
+std::vector aWidths{ o3tl::narrowing(fWidth * 65), 
o3tl::narrowing(fWidth * 20),
+  o3tl::narrowing(fWidth * 8) };
 m_xPrefBox->set_column_fixed_widths(aWidths);
 
 m_xPrefBox->connect_query_tooltip(LINK(this, CuiAboutConfigTabPage, 
QueryTooltip));
@@ -128,7 +127,7 @@ 

[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 && 

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

2023-11-15 Thread Oliver Specht (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7a4a5de2d932b6edfc53b6742029e266c52fa127
Author: Oliver Specht 
AuthorDate: Wed Nov 15 16:49:58 2023 +0100
Commit: Caolán McNamara 
CommitDate: Wed Nov 15 22:19:59 2023 +0100

tdf#157992 update error position after modifying input

a manual fix in the text changes the start/end position of the error
that needs to be updateed to find the correct error text when applying the 
change

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

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 80e1301dcaf8..3ad9c2b196b0 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1571,6 +1571,8 @@ bool SentenceEditWindow_Impl::KeyInput(const KeyEvent& 
rKeyEvt)
 //start position
 if (!IsUndoEditMode() && bIsErrorActive)
 {
+aAttribList.clear();
+m_xEditEngine->GetCharAttribs(0, aAttribList);
 const EECharAttrib* pFontColor = FindCharAttrib(nCursor, 
EE_CHAR_COLOR, aAttribList);
 const EECharAttrib* pErrorAttrib = FindCharAttrib(m_nErrorStart, 
EE_CHAR_GRABBAG, aAttribList);
 if (pFontColor && pErrorAttrib)
@@ -2035,7 +2037,6 @@ svx::SpellPortions 
SentenceEditWindow_Impl::CreateSpellPortions() const
 aPortion1.eLanguage = eLang;
 
 aPortion1.sText = m_xEditEngine->GetText(ESelection(0, nStart, 
0, aStart->nPosition));
-
 bool bIsIgnoreError = m_aIgnoreErrorsAt.find( nStart ) != 
m_aIgnoreErrorsAt.end();
 if( bIsIgnoreError )
 {


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

2023-11-13 Thread Balazs Varga (via logerrit)
 cui/source/options/optgdlg.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 0d30e2a8cd312dfcf5fc2ac0c67e09a1c74d2f46
Author: Balazs Varga 
AuthorDate: Mon Nov 13 10:17:51 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Nov 13 14:35:07 2023 +0100

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

dialog for View Page.

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 9e32e2fc9ea6..941164e5044f 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1116,7 +1116,6 @@ void OfaViewTabPage::UpdateHardwareAccelStatus()
 }
 #if HAVE_FEATURE_SKIA
 m_xUseHardwareAccell->set_sensitive(!m_xUseSkia->get_active());
-m_xUseHardwareAccellImg->set_visible(m_xUseSkia->get_active());
 #endif
 }
 


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

2023-11-13 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/factory/dlgfact.cxx |6 +++---
 cui/source/factory/dlgfact.hxx |2 +-
 cui/source/options/optaboutconfig.cxx  |2 +-
 include/cui/dlgname.hxx|   13 ++---
 include/svx/svxdlg.hxx |2 +-
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |2 +-
 sd/source/ui/view/drviews2.cxx |2 +-
 7 files changed, 10 insertions(+), 19 deletions(-)

New commits:
commit b047c9b21b75f58429c5f55d2838f154c0ea6293
Author: Samuel Mehrbrodt 
AuthorDate: Thu Nov 9 14:01:11 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Nov 13 10:39:29 2023 +0100

Fix old TODO: Remove the parameter bCheckImmediately from SvxNameDialog

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

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 63bfdbddbe39..42a2b19fbaee 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -552,13 +552,13 @@ void AbstractSvxNameDialog_Impl::GetName(OUString& rName)
 rName = m_xDlg->GetName();
 }
 
-void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const 
Link& rLink, bool bCheckImmediately )
+void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const 
Link& rLink )
 {
 aCheckNameHdl = rLink;
 if( rLink.IsSet() )
-m_xDlg->SetCheckNameHdl( LINK(this, AbstractSvxNameDialog_Impl, 
CheckNameHdl), bCheckImmediately );
+m_xDlg->SetCheckNameHdl( LINK(this, AbstractSvxNameDialog_Impl, 
CheckNameHdl) );
 else
-m_xDlg->SetCheckNameHdl( Link(), 
bCheckImmediately );
+m_xDlg->SetCheckNameHdl( Link() );
 }
 
 void AbstractSvxNameDialog_Impl::SetCheckNameTooltipHdl( const 
Link& rLink)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index b57fe2995718..137a5a033294 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -266,7 +266,7 @@ 
DECL_ABSTDLG_CLASS(AbstractSvxNewDictionaryDialog,SvxNewDictionaryDialog)
 // AbstractSvxNameDialog_Impl
 DECL_ABSTDLG_CLASS(AbstractSvxNameDialog,SvxNameDialog)
 virtual voidGetName( OUString& rName ) override ;
-virtual voidSetCheckNameHdl( const Link& 
rLink, bool bCheckImmediately = false ) override ;
+virtual voidSetCheckNameHdl( const Link& 
rLink ) override ;
 virtual voidSetCheckNameTooltipHdl( const Link& rLink ) override ;
 virtual voidSetEditHelpId(const OUString&) override ;
 //from class Window
diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index a5d6ac9757a5..bdc51afdea51 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -655,7 +655,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl, 
weld::Button&, void )
 if( bOpenDialog )
 {
 SvxNameDialog aNameDialog(m_pParent, sDialogValue, sPropertyName);
-aNameDialog.SetCheckNameHdl( LINK( this, CuiAboutConfigTabPage, 
ValidNameHdl ), true );
+aNameDialog.SetCheckNameHdl( LINK( this, CuiAboutConfigTabPage, 
ValidNameHdl ) );
 if (aNameDialog.run() == RET_OK )
 {
 OUString sNewValue = aNameDialog.GetName();
diff --git a/include/cui/dlgname.hxx b/include/cui/dlgname.hxx
index 9eb388caa078..7d207d281812 100644
--- a/include/cui/dlgname.hxx
+++ b/include/cui/dlgname.hxx
@@ -47,20 +47,11 @@ public:
 
 @param rLink a Callback declared with DECL_DLLPRIVATE_LINK and 
implemented with
IMPL_LINK, that is executed on modification.
-
-@param bCheckImmediately If true, the Link is called directly after
-   setting it. It is recommended to set this flag to true to avoid
-   an inconsistent state if the initial String (given in the CTOR)
-   does not satisfy the check condition.
-
-@todo Remove the parameter bCheckImmediately and incorporate the 'true'
-  behaviour as default.
  */
-void SetCheckNameHdl(const Link& rLink, bool 
bCheckImmediately)
+void SetCheckNameHdl(const Link& rLink)
 {
 m_aCheckNameHdl = rLink;
-if (bCheckImmediately)
-ModifyHdl(*m_xEdtName);
+ModifyHdl(*m_xEdtName);
 }
 
 void SetCheckNameTooltipHdl(const Link& rLink)
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 436bfd430368..41158ef2a415 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -163,7 +163,7 @@ protected:
 virtual ~AbstractSvxNameDialog() override = default;
 public:
 virtual voidGetName( OUString& rName ) = 0;
-virtual voidSetCheckNameHdl( const Link& 
rLink, bool bCheckImmediately = false ) = 0;
+virtual voidSetCheckNameHdl( const 

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

2023-11-12 Thread Stephan Bergmann (via logerrit)
 cui/source/inc/hlinettp.hxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 42de667705ed90eb6bb3b9e3308d666e507eddd8
Author: Stephan Bergmann 
AuthorDate: Sun Nov 12 23:13:56 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 13 07:20:36 2023 +0100

-Werror,-Wunused-private-field

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

diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx
index a164063150de..bb86dff9ca5e 100644
--- a/cui/source/inc/hlinettp.hxx
+++ b/cui/source/inc/hlinettp.hxx
@@ -34,9 +34,6 @@
 class SvxHyperlinkInternetTp : public SvxHyperlinkTabPageBase
 {
 private:
-OUStringmaStrOldUser;
-OUStringmaStrOldPassword;
-
 boolm_bMarkWndOpen;
 
 std::unique_ptr m_xRbtLinktypInternet;


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

2023-11-11 Thread Noel Grandin (via logerrit)
 cui/source/dialogs/SpellDialog.cxx|7 ---
 editeng/source/editeng/editeng.cxx|4 ++--
 editeng/source/editeng/impedit.hxx|8 
 editeng/source/outliner/outliner.cxx  |4 ++--
 include/editeng/editeng.hxx   |5 +++--
 include/editeng/outliner.hxx  |5 +++--
 include/svx/svdedxv.hxx   |2 +-
 sc/source/ui/drawfunc/drtxtob.cxx |1 +
 sc/source/ui/drawfunc/futext.cxx  |1 +
 sc/source/ui/view/editsh.cxx  |1 +
 sd/source/ui/annotations/annotationwindow.cxx |1 +
 sd/source/ui/func/fubullet.cxx|5 +++--
 sd/source/ui/func/fuinsfil.cxx|1 +
 sd/source/ui/view/drtxtob.cxx |1 +
 sd/source/ui/view/outlnvsh.cxx|1 +
 sd/source/ui/view/viewshel.cxx|1 +
 starmath/source/document.cxx  |1 +
 starmath/source/view.cxx  |1 +
 sw/source/uibase/docvw/AnnotationWin.cxx  |1 +
 sw/source/uibase/docvw/AnnotationWin2.cxx |1 +
 sw/source/uibase/shells/annotsh.cxx   |1 +
 sw/source/uibase/shells/drwtxtsh.cxx  |1 +
 22 files changed, 36 insertions(+), 18 deletions(-)

New commits:
commit 9bba3a604d12566bfb5e8ab8d2788fe8d3690a96
Author: Noel Grandin 
AuthorDate: Wed Nov 8 18:24:07 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 11 11:03:58 2023 +0100

use more concrete type in ImpEditEngine::SetUndoManager

instead of dynamic_cast'ing to the type we want, and __ignoring__ the
parameter if it is not, just adjust the type that we want, which
luckily everything is already sending

Change-Id: If083e11c9818cdcae199afc1261efbdb652e1c76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159295
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 67de5235d1ad..80e1301dcaf8 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2078,7 +2079,7 @@ svx::SpellPortions 
SentenceEditWindow_Impl::CreateSpellPortions() const
 
 void SentenceEditWindow_Impl::Undo()
 {
-SfxUndoManager& rUndoMgr = m_xEditEngine->GetUndoManager();
+EditUndoManager& rUndoMgr = m_xEditEngine->GetUndoManager();
 DBG_ASSERT(GetUndoActionCount(), "no undo actions available" );
 if(!GetUndoActionCount())
 return;
@@ -2097,13 +2098,13 @@ void SentenceEditWindow_Impl::Undo()
 
 void SentenceEditWindow_Impl::ResetUndo()
 {
-SfxUndoManager& rUndo = m_xEditEngine->GetUndoManager();
+EditUndoManager& rUndo = m_xEditEngine->GetUndoManager();
 rUndo.Clear();
 }
 
 void SentenceEditWindow_Impl::AddUndoAction( std::unique_ptr 
pAction )
 {
-SfxUndoManager& rUndoMgr = m_xEditEngine->GetUndoManager();
+EditUndoManager& rUndoMgr = m_xEditEngine->GetUndoManager();
 rUndoMgr.AddUndoAction(std::move(pAction));
 GetSpellDialog()->m_xUndoPB->set_sensitive(true);
 }
diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 728609cd94e2..d27a38665950 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -112,12 +112,12 @@ bool EditEngine::IsInUndo() const
 return pImpEditEngine->IsInUndo();
 }
 
-SfxUndoManager& EditEngine::GetUndoManager()
+EditUndoManager& EditEngine::GetUndoManager()
 {
 return pImpEditEngine->GetUndoManager();
 }
 
-SfxUndoManager* EditEngine::SetUndoManager(SfxUndoManager* pNew)
+EditUndoManager* EditEngine::SetUndoManager(EditUndoManager* pNew)
 {
 return pImpEditEngine->SetUndoManager(pNew);
 }
diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index 6fcb58dc..d20ed8a1caae 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -838,7 +838,7 @@ public:
 ImpEditEngine&  operator=(const ImpEditEngine&) = delete;
 
 inline EditUndoManager& GetUndoManager();
-inline SfxUndoManager* SetUndoManager(SfxUndoManager* pNew);
+inline EditUndoManager* SetUndoManager(EditUndoManager* pNew);
 
 // @return the previous bUpdateLayout state
 boolSetUpdateLayout( bool bUpdate, EditView* pCurView 
= nullptr, bool bForceUpdate = false );
@@ -1295,16 +1295,16 @@ inline EditUndoManager& ImpEditEngine::GetUndoManager()
 return *pUndoManager;
 }
 
-inline SfxUndoManager* ImpEditEngine::SetUndoManager(SfxUndoManager* pNew)
+inline EditUndoManager* ImpEditEngine::SetUndoManager(EditUndoManager* pNew)
 {
-SfxUndoManager* pRetval = pUndoManager;
+EditUndoManager* pRetval = pUndoManager;
 
 if(pUndoManager)
 {
 pUndoManager->SetEditEngine(nullptr);
 }
 
-pUndoManager = dynamic_cast< 

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

2023-11-10 Thread Noel Grandin (via logerrit)
 cui/source/inc/newtabledlg.hxx |   12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 867c4b75dd4a2cf9470c2859d51432f207eb4166
Author: Noel Grandin 
AuthorDate: Wed Nov 8 18:33:16 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 10 19:55:00 2023 +0100

loplugin:fieldcast in SvxNewTableDialogWrapper

Change-Id: Ia3efee04b725162e4812f1e419cc9d8e11b6d8f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159301
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/inc/newtabledlg.hxx b/cui/source/inc/newtabledlg.hxx
index b62e1199e44d..4a34cb37712c 100644
--- a/cui/source/inc/newtabledlg.hxx
+++ b/cui/source/inc/newtabledlg.hxx
@@ -37,7 +37,7 @@ public:
 class SvxNewTableDialogWrapper : public SvxAbstractNewTableDialog
 {
 private:
-std::shared_ptr m_xDlg;
+std::shared_ptr m_xDlg;
 
 public:
 SvxNewTableDialogWrapper(weld::Window* pParent)
@@ -52,18 +52,16 @@ public:
 
 virtual sal_Int32 getRows() const override
 {
-SvxNewTableDialog* pDlg = 
dynamic_cast(m_xDlg.get());
-if (pDlg)
-return pDlg->getRows();
+if (m_xDlg)
+return m_xDlg->getRows();
 
 return 0;
 }
 
 virtual sal_Int32 getColumns() const override
 {
-SvxNewTableDialog* pDlg = 
dynamic_cast(m_xDlg.get());
-if (pDlg)
-return pDlg->getColumns();
+if (m_xDlg)
+return m_xDlg->getColumns();
 
 return 0;
 }


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

2023-11-10 Thread Balazs Varga (via logerrit)
 cui/source/inc/optlingu.hxx |3 +
 cui/source/options/optlingu.cxx |   61 
 2 files changed, 64 insertions(+)

New commits:
commit 985b404f208559b4a91f31eb31dafa9d0384fdaf
Author: Balazs Varga 
AuthorDate: Wed Nov 8 21:34:41 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 10 11:15:17 2023 +0100

tdf#158003 - UI: Part 22 - Unify lockdown behavior of Options dialog

for Language - Writing Aids Page.

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

diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index dce8f2ccd11f..6c5657acf7bd 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace com::sun::star{
 namespace beans{
@@ -60,6 +61,8 @@ class SvxEditModulesDlg : public weld::GenericDialogController
 std::unique_ptr m_xClosePB;
 std::unique_ptr m_xLanguageLB;
 
+css::uno::Reference< css::configuration::XReadWriteAccess> 
m_xReadWriteAccess;
+
 DECL_LINK( SelectHdl_Impl, weld::TreeView&, void );
 DECL_LINK( UpDownHdl_Impl, weld::Button&, void );
 DECL_LINK( ClickHdl_Impl, weld::Button&, void );
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index b7ac60f5f186..de908b943995 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -46,6 +47,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -1196,6 +1199,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sSpellAuto, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_SPELL_AUTO));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1205,6 +1209,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sGrammarAuto, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_GRAMMAR_AUTO));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1214,6 +1219,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sCapitalWords, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_SPELL_UPPER_CASE));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1223,6 +1229,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sWordsWithDigits, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_SPELL_WITH_DIGITS));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1232,6 +1239,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sSpellClosedCompound, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_SPELL_CLOSED_COMPOUND));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1241,6 +1249,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sSpellHyphenatedCompound, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_SPELL_HYPHENATED_COMPOUND));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1250,6 +1259,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : 
TRISTATE_FALSE);
 m_xLinguOptionsCLB->set_text(nEntry, sSpellSpecial, 0);
 m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData));
+m_xLinguOptionsCLB->set_sensitive(nEntry, 
!aLngCfg.IsReadOnly(UPN_IS_SPELL_SPECIAL));
 
 m_xLinguOptionsCLB->append();
 ++nEntry;
@@ -1258,6 +1268,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 nUserData = OptionsUserData( EID_NUM_MIN_WORDLEN, true, 
static_cast(nVal), 

[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*)
 

[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 ( 

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

2023-11-08 Thread Balazs Varga (via logerrit)
 cui/source/options/doclinkdialog.cxx |   45 +++
 cui/source/options/doclinkdialog.hxx |3 ++
 2 files changed, 48 insertions(+)

New commits:
commit e0dd56acca39524b63b708590f03a3cd6dcbe3ca
Author: Balazs Varga 
AuthorDate: Tue Nov 7 15:17:16 2023 +0100
Commit: Balazs Varga 
CommitDate: Wed Nov 8 10:37:50 2023 +0100

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

Options dialog for Databases Page.

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

diff --git a/cui/source/options/doclinkdialog.cxx 
b/cui/source/options/doclinkdialog.cxx
index fac99002401c..f938399140ab 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -20,7 +20,11 @@
 #include "doclinkdialog.hxx"
 
 #include 
+#include 
+#include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -53,6 +57,9 @@ namespace svx
 m_xURL->DisableHistory();
 m_xURL->SetFilter(u"*.odb");
 
+css::uno::Reference < css::uno::XComponentContext > 
xContext(::comphelper::getProcessComponentContext());
+m_xReadWriteAccess = 
css::configuration::ReadWriteAccess::create(xContext, "*");
+
 m_xName->connect_changed( LINK(this, ODocumentLinkDialog, 
OnEntryModified) );
 m_xURL->connect_changed( LINK(this, ODocumentLinkDialog, 
OnComboBoxModified) );
 m_xBrowseFile->connect_clicked( LINK(this, ODocumentLinkDialog, 
OnBrowseFile) );
@@ -81,6 +88,44 @@ namespace svx
 void ODocumentLinkDialog::validate( )
 {
 m_xOK->set_sensitive((!m_xName->get_text().isEmpty()) && 
(!m_xURL->get_active_text().isEmpty()));
+
+if (m_xOK->get_sensitive())
+{
+Reference xItemList = 
officecfg::Office::DataAccess::RegisteredNames::get();
+Sequence< OUString > lNodeNames = xItemList->getElementNames();
+
+for (const OUString& sNodeName : lNodeNames)
+{
+Reference xSet;
+xItemList->getByName(sNodeName) >>= xSet;
+
+OUString aDatabaseName;
+if (xSet->getPropertySetInfo()->hasPropertyByName("Name"))
+xSet->getPropertyValue("Name") >>= aDatabaseName;
+
+if (!aDatabaseName.isEmpty() && m_xName->get_text() == 
aDatabaseName)
+{
+const OUString aConfigPath = 
officecfg::Office::DataAccess::RegisteredNames::path() + "/" + sNodeName;
+if 
(m_xReadWriteAccess->hasPropertyByHierarchicalName(aConfigPath + "/Name"))
+{
+css::beans::Property aProperty = 
m_xReadWriteAccess->getPropertyByHierarchicalName(aConfigPath + "/Name");
+bool bReadOnly = (aProperty.Attributes & 
css::beans::PropertyAttribute::READONLY) != 0;
+
+m_xURL->set_sensitive(!bReadOnly);
+m_xBrowseFile->set_sensitive(!bReadOnly);
+}
+
+if 
(m_xReadWriteAccess->hasPropertyByHierarchicalName(aConfigPath + "/Location"))
+{
+css::beans::Property aProperty = 
m_xReadWriteAccess->getPropertyByHierarchicalName(aConfigPath + "/Location");
+bool bReadOnly = (aProperty.Attributes & 
css::beans::PropertyAttribute::READONLY) != 0;
+
+m_xName->set_sensitive(!bReadOnly);
+}
+break;
+}
+}
+}
 }
 
 IMPL_LINK_NOARG(ODocumentLinkDialog, OnOk, weld::Button&, void)
diff --git a/cui/source/options/doclinkdialog.hxx 
b/cui/source/options/doclinkdialog.hxx
index 371dc6504fe9..3ea0d5027d0f 100644
--- a/cui/source/options/doclinkdialog.hxx
+++ b/cui/source/options/doclinkdialog.hxx
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 
 namespace svx
 {
@@ -30,6 +31,8 @@ namespace svx
 {
 Link  m_aNameValidator;
 
+css::uno::Reference< css::configuration::XReadWriteAccess> 
m_xReadWriteAccess;
+
 std::unique_ptr m_xBrowseFile;
 std::unique_ptr m_xName;
 std::unique_ptr m_xOK;


[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 && 

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

2023-11-06 Thread Andreas Heinisch (via logerrit)
 cui/source/dialogs/hlmarkwn.cxx |   15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit bf927cb4513f8ef2a5205e98fbcf1ff02c344b4a
Author: Andreas Heinisch 
AuthorDate: Fri Nov 3 14:07:34 2023 +0100
Commit: Andreas Heinisch 
CommitDate: Mon Nov 6 22:39:33 2023 +0100

tdf#149935 - Hyperlink Target Dialog: remember last used position and size

Change-Id: I87fdf78b6ec4963eb4450d937dd86209e03865a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158879
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index 7eb2ced02489..cf90450450ad 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -79,11 +79,19 @@ SvxHlinkDlgMarkWnd::SvxHlinkDlgMarkWnd(weld::Window* 
pParentDialog, SvxHyperlink
 mxBtApply->connect_clicked( LINK ( this, SvxHlinkDlgMarkWnd, 
ClickApplyHdl_Impl ) );
 mxBtClose->connect_clicked( LINK ( this, SvxHlinkDlgMarkWnd, 
ClickCloseHdl_Impl ) );
 mxLbTree->connect_row_activated( LINK ( this, SvxHlinkDlgMarkWnd, 
DoubleClickApplyHdl_Impl ) );
+
+// tdf#149935 - remember last used position and size
+SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id());
+if (aDlgOpt.Exists())
+m_xDialog->set_window_state(aDlgOpt.GetWindowState());
 }
 
 SvxHlinkDlgMarkWnd::~SvxHlinkDlgMarkWnd()
 {
 ClearTree();
+// tdf#149935 - remember last used position and size
+SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id());
+
aDlgOpt.SetWindowState(m_xDialog->get_window_state(vcl::WindowDataMask::PosSize));
 }
 
 void SvxHlinkDlgMarkWnd::ErrorChanged()
@@ -126,7 +134,12 @@ sal_uInt16 SvxHlinkDlgMarkWnd::SetError( sal_uInt16 nError)
 // Move window
 void SvxHlinkDlgMarkWnd::MoveTo(const Point& rNewPos)
 {
-m_xDialog->window_move(rNewPos.X(), rNewPos.Y());
+// tdf#149935 - remember last used position and size
+SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id());
+if (aDlgOpt.Exists())
+m_xDialog->set_window_state(aDlgOpt.GetWindowState());
+else
+m_xDialog->window_move(rNewPos.X(), rNewPos.Y());
 }
 
 namespace


[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", )
 , 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 

[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);
+

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

2023-11-03 Thread Balazs Varga (via logerrit)
 cui/source/options/optchart.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit 08ac4318176074f046ed3422d9dd7ace4591023e
Author: Balazs Varga 
AuthorDate: Thu Nov 2 21:46:11 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 3 10:51:47 2023 +0100

tdf#158000 - UI: Part 17 - Unify lockdown behavior of Options dialog

for Chart Page.

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

diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 66ab40df6e22..eef87d2cd324 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 void SvxDefaultColorOptPage::InsertColorEntry(const XColorEntry& rEntry, 
sal_Int32 nPos)
 {
@@ -100,6 +101,14 @@ 
SvxDefaultColorOptPage::SvxDefaultColorOptPage(weld::Container* pPage, weld::Dia
 {
 m_xLbChartColors->set_size_request(-1, 
m_xLbChartColors->get_height_rows(16));
 
+if (officecfg::Office::Chart::DefaultColor::Series::isReadOnly())
+{
+m_xPBDefault->set_sensitive(false);
+m_xPBAdd->set_sensitive(false);
+m_xPBRemove->set_sensitive(false);
+m_xValSetColorBoxWin->set_sensitive(false);
+}
+
 m_xPBDefault->connect_clicked( LINK( this, SvxDefaultColorOptPage, 
ResetToDefaults ) );
 m_xPBAdd->connect_clicked( LINK( this, SvxDefaultColorOptPage, 
AddChartColor ) );
 m_xPBRemove->connect_clicked( LINK( this, SvxDefaultColorOptPage, 
RemoveChartColor ) );


[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", 
)
 , 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);
+}
+
 

[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())
+{
+

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

2023-11-02 Thread Jim Raykowski (via logerrit)
 cui/source/inc/backgrnd.hxx |   17 +-
 cui/source/inc/cuitabarea.hxx   |1 
 cui/source/tabpages/backgrnd.cxx|  212 +---
 sw/source/uibase/shells/textsh1.cxx |1 
 4 files changed, 116 insertions(+), 115 deletions(-)

New commits:
commit 167fb166e4097c4a855c08a70cdf70c19d4d87ac
Author: Jim Raykowski 
AuthorDate: Tue Oct 17 17:21:33 2023 -0800
Commit: Jim Raykowski 
CommitDate: Fri Nov 3 03:18:38 2023 +0100

tdf#157801 Fix direct formatting is applied after pressing OK in the

Character properties dialog when the Highlighting tab Color page is
open and the color has not been changed

This is noticeable when character highlighting direct formatting is
already at paragraph level.

The expected result of opening the properties dialog, and immediately
pressing OK without changing anything (or alternatively, after
changing something there and then pressing Reset then OK), is no
changes in applied properties at all.

Inspiration for rework of the background tab page. With this patch
XATTR_FILL items need not be included in the InAttrs set, for
example, as part of this patch, the XATTR_FILLSTYLE, XATTR_FILLCOLOR
range is removed from the sw_CharDialog core set.

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

diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 450fbdaaa27f..3d50d69e95f4 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -37,23 +37,28 @@ class SvxBrushItem;
 
 class SvxBkgTabPage : public SvxAreaTabPage
 {
-static const WhichRangesContainer pPageRanges;
+static const WhichRangesContainer pBkgRanges;
 
 std::unique_ptr m_xTblLBox;
-boolbHighlighting   : 1;
-boolbCharBackColor  : 1;
-SfxItemSet maSet;
-std::unique_ptr m_pResetSet;
+bool m_bHighlighting = false;
+bool m_bCharBackColor = false;
+
+// m_aAttrSet is used to convert between SvxBrushItem and XFILL item 
attributes and also to
+// allow for cell, row, and table backgrounds to be set in one Table 
dialog opening.
+SfxItemSet m_aAttrSet;
 
 sal_Int32 m_nActPos = -1;
 
 DECL_LINK(TblDestinationHdl_Impl, weld::ComboBox&, void);
+
+void SetActiveTableDestinationBrushItem();
+
 public:
 SvxBkgTabPage(weld::Container* pPage, weld::DialogController* pController, 
const SfxItemSet& rInAttrs);
 virtual ~SvxBkgTabPage() override;
 
 // returns the area of the which-values
-static WhichRangesContainer GetRanges() { return pPageRanges; }
+static WhichRangesContainer GetRanges() { return pBkgRanges; }
 
 static std::unique_ptr Create( weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet* );
 virtual bool FillItemSet( SfxItemSet* ) override;
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 2fbfcd1435ac..0917fcb91dc8 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -253,7 +253,6 @@ protected:
 void SetOptimalSize(weld::DialogController* pController);
 
 void SelectFillType( weld::Toggleable& rButton, const SfxItemSet* _pSet = 
nullptr );
-SfxTabPage* GetFillTabPage() { return m_xFillTabPage.get(); }
 
 bool IsBtnClicked() const { return m_bBtnClicked; }
 
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 5706f98c310a..56bccfacdffe 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -36,7 +36,7 @@ using namespace css;
 #define TBL_DEST_ROW1
 #define TBL_DEST_TBL2
 
-const WhichRangesContainer SvxBkgTabPage::pPageRanges(svl::Items<
+const WhichRangesContainer SvxBkgTabPage::pBkgRanges(svl::Items<
 SID_ATTR_BRUSH, SID_ATTR_BRUSH,
 SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR
 >);
@@ -63,32 +63,13 @@ static sal_uInt16 lcl_GetTableDestSlot(sal_Int32 nTblDest)
 
 SvxBkgTabPage::SvxBkgTabPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rInAttrs)
 : SvxAreaTabPage(pPage, pController, rInAttrs),
-bHighlighting(false),
-bCharBackColor(false),
-maSet(rInAttrs)
+m_aAttrSet(*rInAttrs.GetPool(),
+   rInAttrs.GetRanges().MergeRange(XATTR_FILL_FIRST, 
XATTR_FILL_LAST))
 {
 m_xBtnGradient->hide();
 m_xBtnHatch->hide();
 m_xBtnBitmap->hide();
 m_xBtnPattern->hide();
-
-SfxObjectShell* pDocSh = SfxObjectShell::Current();
-
-XColorListRef pColorTable;
-if ( pDocSh )
-if (auto pItem = pDocSh->GetItem( SID_COLOR_TABLE ))
-pColorTable = pItem->GetColorList();
-
-if ( !pColorTable.is() )
-pColorTable = XColorList::CreateStdColorList();
-
-XBitmapListRef pBitmapList;
-if ( pDocSh )
-if (auto pItem = pDocSh->GetItem( 

[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", 
)
 , 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());
+

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

2023-11-02 Thread Gabor Kelemen (via logerrit)
 cui/source/options/opthtml.cxx|3 +--
 include/svtools/htmlcfg.hxx   |2 --
 svtools/source/config/htmlcfg.cxx |5 -
 sw/source/filter/html/wrthtml.cxx |2 +-
 sw/source/ui/chrdlg/pardlg.cxx|4 ++--
 sw/source/ui/fmtui/tmpdlg.cxx |4 ++--
 sw/source/ui/table/tabledlg.cxx   |4 ++--
 sw/source/uibase/app/docst.cxx|4 ++--
 8 files changed, 10 insertions(+), 18 deletions(-)

New commits:
commit 08d74d8980d19c7f524c8f60de5c033d026d1c94
Author: Gabor Kelemen 
AuthorDate: Wed Nov 1 22:25:14 2023 +0100
Commit: Noel Grandin 
CommitDate: Thu Nov 2 09:37:08 2023 +0100

Drop SvxHtmlOptions::IsPrintLayoutExtension

as it is just now a simple wrapper over officecfg

Change-Id: If41c7c9db191af7ebede9072fd995d015056bf1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158779
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index 379ccf253c1d..7cd8788dd1d2 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -18,7 +18,6 @@
  */
 
 #include 
-#include 
 #include 
 #include 
 #include "opthtml.hxx"
@@ -166,7 +165,7 @@ void OfaHtmlTabPage::Reset( const SfxItemSet* )
 
m_xStarBasicWarningCB->set_active(officecfg::Office::Common::Filter::HTML::Export::Warning::get());
 m_xStarBasicWarningCB->set_sensitive(!m_xStarBasicCB->get_active());
 
m_xSaveGrfLocalCB->set_active(officecfg::Office::Common::Filter::HTML::Export::LocalGraphic::get());
-m_xPrintExtensionCB->set_active(SvxHtmlOptions::IsPrintLayoutExtension());
+
m_xPrintExtensionCB->set_active(officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get());
 
 m_xPrintExtensionCB->save_state();
 m_xStarBasicCB->save_state();
diff --git a/include/svtools/htmlcfg.hxx b/include/svtools/htmlcfg.hxx
index 5e474cad33a9..259c7e965887 100644
--- a/include/svtools/htmlcfg.hxx
+++ b/include/svtools/htmlcfg.hxx
@@ -35,8 +35,6 @@ namespace SvxHtmlOptions
 SVT_DLLPUBLIC sal_uInt16 GetFontSize(sal_uInt16 nPos);
 
 SVT_DLLPUBLIC sal_uInt16 GetExportMode();
-
-SVT_DLLPUBLIC bool IsPrintLayoutExtension();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/config/htmlcfg.cxx 
b/svtools/source/config/htmlcfg.cxx
index 473efc9d45dd..f2a91bf367ef 100644
--- a/svtools/source/config/htmlcfg.cxx
+++ b/svtools/source/config/htmlcfg.cxx
@@ -67,11 +67,6 @@ sal_uInt16 GetExportMode()
 return nExpMode;
 }
 
-bool IsPrintLayoutExtension()
-{
-return officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get();
-}
-
 } // namespace SvxHtmlOptions
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/wrthtml.cxx 
b/sw/source/filter/html/wrthtml.cxx
index e4980b311f5e..738d47c8978a 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -439,7 +439,7 @@ ErrCode SwHTMLWriter::WriteStream()
 m_bCfgFormFeed = !IsHTMLMode(HTMLMODE_PRINT_EXT);
 m_bCfgCpyLinkedGrfs = 
officecfg::Office::Common::Filter::HTML::Export::LocalGraphic::get();
 
-m_bCfgPrintLayout = SvxHtmlOptions::IsPrintLayoutExtension();
+m_bCfgPrintLayout = 
officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get();
 
 // get HTML template
 bool bOldHTMLMode = false;
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index f28acc46bc87..379ee335cad8 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -20,7 +20,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -38,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 
 SwParaDlg::SwParaDlg(weld::Window *pParent,
 SwView& rVw,
@@ -73,7 +73,7 @@ SwParaDlg::SwParaDlg(weld::Window *pParent,
 AddTabPage("labelTP_PARA_ALIGN", 
pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH),
   
pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH));
 
-if (!m_bDrawParaDlg && (!bHtmlMode || 
SvxHtmlOptions::IsPrintLayoutExtension()))
+if (!m_bDrawParaDlg && (!bHtmlMode || 
officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get()))
 {
 OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), 
"GetTabPageCreatorFunc fail!");
 OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH), 
"GetTabPageRangesFunc fail!");
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 497a8d40e10a..0a5d6686dadd 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -25,7 +25,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -58,6 +57,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // the dialog's carrier
 SwTemplateDlgController::SwTemplateDlgController(weld::Window* pParent,
@@ -146,7 +146,7 @@ 

[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", 
 )
 , 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-27 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", 
)
+, 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 && 

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

2023-10-26 Thread Justin Luth (via logerrit)
 cui/source/tabpages/chardlg.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 7ac066438f6d029fd0be2f0c72207805b0ca8153
Author: Justin Luth 
AuthorDate: Thu Oct 26 15:48:30 2023 -0400
Commit: Justin Luth 
CommitDate: Fri Oct 27 02:38:36 2023 +0200

tdf#156988 chardlg: default to AUTO escapement

As of 24.2, the default value for a superscript or subscript
is automatic placement since d384ccdb04ebeb8b094e6d9a2ddf4e5aea5327c8.

Therefore, it makes sense for the character properties
dialog to also default to automatic.

Normally this happens - since normally there is some kind of context,
and in that case m_xNormalPosBtn was set with AUTO (m_xHighLowRB).
However, in the case of finding a formating, there is no context
for the very first run. That is what this patch intended to fix,
since in that case too we want m_xHighLowRB to be set to true.

For any other similar situation where there is no context,
assuming DFLT_ESC_AUTO_SUPER or DFLT_ESC_AUTO_SUB
should be appropriate.

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

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 3075f3fc4258..d8ea76e9a9d4 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2748,6 +2748,8 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet )
 m_xHighPosBtn->set_active(false);
 m_xNormalPosBtn->set_active(false);
 m_xLowPosBtn->set_active(false);
+
+m_xHighLowRB->set_active(true);
 }
 
 // set BspFont


[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", )
 , 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();
 const 

[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", )
 , 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,14 

[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", 
)
 , 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
+++ 

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

2023-10-24 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());
 

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

2023-10-24 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", )
 , 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())
+

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

2023-10-24 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", 
)
 , 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_shared(
+   

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

2023-10-19 Thread Stephan Bergmann (via logerrit)
 cui/source/customize/acccfg.cxx|4 ++--
 cui/source/customize/cfgutil.cxx   |6 +++---
 cui/source/customize/macropg.cxx   |2 +-
 cui/source/dialogs/colorpicker.cxx |2 +-
 cui/source/dialogs/cuigaldlg.cxx   |2 +-
 cui/source/dialogs/hlinettp.cxx|2 +-
 cui/source/dialogs/hlmarkwn.cxx|6 +++---
 cui/source/dialogs/showcols.cxx|2 +-
 cui/source/options/optasian.cxx|4 ++--
 cui/source/options/optgdlg.cxx |   14 +++---
 cui/source/options/optinet2.cxx|   16 
 cui/source/options/optlanguagetool.cxx |2 +-
 cui/source/options/optlingu.cxx|8 
 cui/source/options/optpath.cxx |4 ++--
 cui/source/options/treeopt.cxx |2 +-
 cui/source/tabpages/chardlg.cxx|2 +-
 16 files changed, 39 insertions(+), 39 deletions(-)

New commits:
commit fa869ef61c790b6407ef6eae3eefc094d13c1361
Author: Stephan Bergmann 
AuthorDate: Thu Oct 19 10:30:09 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Oct 19 19:31:54 2023 +0200

Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: cui

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

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 54b7eb73c81a..027ac72968e8 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -69,9 +69,9 @@
 
 using namespace css;
 
-constexpr OUStringLiteral FOLDERNAME_UICONFIG = u"Configurations2";
+constexpr OUString FOLDERNAME_UICONFIG = u"Configurations2"_ustr;
 
-constexpr OUStringLiteral MEDIATYPE_PROPNAME = u"MediaType";
+constexpr OUString MEDIATYPE_PROPNAME = u"MediaType"_ustr;
 
 const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_F2,
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 3039486a2f30..3a2cdbc1b05e 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -79,9 +79,9 @@ const char CMDURL_STYLEPROT_ONLY[] = ".uno:StyleApply?";
 const char CMDURL_SPART_ONLY[] = "Style:string=";
 const char CMDURL_FPART_ONLY[] = "FamilyName:string=";
 
-constexpr OUStringLiteral STYLEPROP_UINAME = u"DisplayName";
-constexpr OUStringLiteral MACRO_SELECTOR_CONFIGNAME = u"MacroSelectorDialog";
-constexpr OUStringLiteral LAST_RUN_MACRO_INFO = u"LastRunMacro";
+constexpr OUString STYLEPROP_UINAME = u"DisplayName"_ustr;
+constexpr OUString MACRO_SELECTOR_CONFIGNAME = u"MacroSelectorDialog"_ustr;
+constexpr OUString LAST_RUN_MACRO_INFO = u"LastRunMacro"_ustr;
 
 OUString SfxStylesInfo_Impl::generateCommand(
 std::u16string_view sFamily, std::u16string_view sStyle)
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 6a22ee2c3d99..b1a1094733ea 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -38,7 +38,7 @@
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
-constexpr OUStringLiteral aVndSunStarUNO = u"vnd.sun.star.UNO:";
+constexpr OUString aVndSunStarUNO = u"vnd.sun.star.UNO:"_ustr;
 
 SvxMacroTabPage_Impl::SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet )
 : bReadOnly(false)
diff --git a/cui/source/dialogs/colorpicker.cxx 
b/cui/source/dialogs/colorpicker.cxx
index 24dda1936a2a..87f50b534c26 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -1266,7 +1266,7 @@ com_sun_star_cui_ColorPicker_get_implementation(
 }
 
 
-constexpr OUStringLiteral gsColorKey( u"Color" );
+constexpr OUString gsColorKey( u"Color"_ustr );
 constexpr OUStringLiteral gsModeKey( u"Mode" );
 
 ColorPicker::ColorPicker()
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 530ef109c216..9a1a2e26a4ed 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -707,7 +707,7 @@ void TPGalleryThemeProperties::FillFilterList()
 
 #if HAVE_FEATURE_AVMEDIA
 // media filters
-static constexpr OUStringLiteral aWildcard = u"*.";
+static constexpr OUString aWildcard = u"*."_ustr;
 ::avmedia::FilterNameVector aFilters= 
::avmedia::MediaWindow::getMediaFilters();
 
 for(const std::pair & aFilter : aFilters)
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index a01673550851..8ffdb2053f5b 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -24,7 +24,7 @@
 #include 
 #include 
 
-constexpr OUStringLiteral sAnonymous = u"anonymous";
+constexpr OUString sAnonymous = u"anonymous"_ustr;
 
 /*
 |*
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index 96b61a7e2806..7eb2ced02489 100644
--- 

[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

2023-10-18 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e7e5b43c4906d9f0e199f689addc29aa98916e6e
Author: Caolán McNamara 
AuthorDate: Wed Oct 18 16:47:20 2023 +0100
Commit: Caolán McNamara 
CommitDate: Wed Oct 18 22:02:37 2023 +0200

crashreporting: svx::SentenceEditWindow_Impl::CreateSpellPortions()

cui/source/dialogs/SpellDialog.cxx:2005
aRet[ aRet.size() - 1 ].sText += aLeftOverText;

presumably aRet is empty() here

a) don't bother appending if aLeftOverText is empty()
b) don't crah if aRet is empty() and aLeftOverText is not

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

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 1e52d4e2aed3..67de5235d1ad 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -2066,7 +2066,7 @@ svx::SpellPortions 
SentenceEditWindow_Impl::CreateSpellPortions() const
 aPortion2.sText = aLeftOverText.makeStringAndClear();
 aRet.push_back( aPortion2 );
 }
-else
+else if (!aLeftOverText.isEmpty() && !aRet.empty())
 {   // we just need to append the left-over text to the last 
portion (which had no errors)
 aRet[ aRet.size() - 1 ].sText += aLeftOverText;
 }


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

2023-10-16 Thread Balazs Varga (via logerrit)
 cui/source/factory/dlgfact.cxx   |6 ++-
 cui/source/factory/dlgfact.hxx   |3 -
 include/sfx2/objsh.hxx   |2 -
 include/sfx2/sfxdlg.hxx  |2 -
 include/sfx2/sfxsids.hrc |1 
 include/sfx2/strings.hrc |5 --
 include/sfx2/viewfrm.hxx |2 +
 include/unotools/securityoptions.hxx |2 +
 sfx2/source/appl/appserv.cxx |8 +++-
 sfx2/source/appl/appuno.cxx  |7 ++-
 sfx2/source/dialog/infobar.cxx   |8 
 sfx2/source/doc/objserv.cxx  |   69 +++
 sfx2/source/doc/objstor.cxx  |   29 +++---
 sfx2/source/view/viewfrm.cxx |   40 
 sfx2/source/view/viewprn.cxx |3 -
 sfx2/source/view/viewsh.cxx  |   10 ++---
 16 files changed, 116 insertions(+), 81 deletions(-)

New commits:
commit 1f440348eb0892fd2c9597806d87b5fe9d60d49a
Author: Balazs Varga 
AuthorDate: Tue Oct 10 21:55:42 2023 +0200
Commit: Balazs Varga 
CommitDate: Mon Oct 16 23:18:56 2023 +0200

tdf#157482 UI: Turn Security Warnings popup windows into infobars

In case of all the 4 security warnings we will have a new infobar warning
dialog message with an infobar button which can open the security windows
option settings and we can set which security issues should warn us, and 
also
which security infos we want to remove. (etc after saving)

TODO: If the directly the file dialog window pop up the Infobar message 
will only
update after closing the file dialog window. That should be fixed later.

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

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 086fd01c5af3..63bfdbddbe39 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -854,16 +854,18 @@ VclPtr 
AbstractDialogFactory_Impl::CreateVclDialog(weld::Wind
 }
 
 VclPtr 
AbstractDialogFactory_Impl::CreateFrameDialog(weld::Window* pParent, const 
Reference< frame::XFrame >& rxFrame,
-sal_uInt32 nResId, const OUString& rParameter )
+sal_uInt32 nResId, sal_uInt16 nPageId, const OUString& rParameter)
 {
 std::unique_ptr xDlg;
 if (SID_OPTIONS_TREEDIALOG == nResId || SID_OPTIONS_DATABASES == nResId)
 {
 // only activate last page if we don't want to activate a special page
-bool bActivateLastSelection = ( nResId != SID_OPTIONS_DATABASES && 
rParameter.isEmpty() );
+bool bActivateLastSelection = ( nResId != SID_OPTIONS_DATABASES && 
rParameter.isEmpty() && !nPageId);
 xDlg = std::make_unique(pParent, rxFrame, 
bActivateLastSelection);
 if ( nResId == SID_OPTIONS_DATABASES )
 xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
+else if (nPageId)
+xDlg->ActivatePage(nPageId);
 else if ( !rParameter.isEmpty() )
 xDlg->ActivatePage( rParameter );
 }
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 38ca4beded0a..b57fe2995718 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -439,8 +439,7 @@ public:
  const 
SfxItemSet& rAttr,
  const 
css::uno::Reference< css::frame::XFrame >& rFrame) override;
 virtual VclPtrCreateFrameDialog(weld::Window* 
pParent, const css::uno::Reference< css::frame::XFrame >& rxFrame,
-   sal_uInt32 nResId,
-   const OUString& 
rParameter ) override;
+   sal_uInt32 nResId, 
sal_uInt16 nPageId, const OUString& rParameter) override;
 virtual VclPtr CreateAutoCorrTabDialog(weld::Window* 
pParent, const SfxItemSet* pAttrSet) override;
 virtual VclPtr 
CreateCustomizeTabDialog(weld::Window* pParent,
 const SfxItemSet* pAttrSet,
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 7e5cb97827a6..ea2596658a5d 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -440,7 +440,7 @@ public:
 
 virtual boolPrepareClose(bool bUI = true);
 virtual HiddenInformation   GetHiddenInformationState( HiddenInformation 
nStates );
-sal_Int16   QueryHiddenInformation( HiddenWarningFact 
eFact, weld::Window* pParent );
+voidQueryHiddenInformation( HiddenWarningFact 
eFact );
 boolIsSecurityOptOpenReadOnly() const;
 voidSetSecurityOptOpenReadOnly( bool bOpenReadOnly 
);
 
diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx
index 

[Libreoffice-commits] core.git: cui/source framework/source include/vcl offapi/com officecfg/registry vcl/osx vcl/qt5 vcl/unx vcl/win

2023-10-14 Thread Gökay Şatır (via logerrit)
 cui/source/customize/acccfg.cxx|8 
 framework/source/accelerators/keymapping.cxx   |1 +
 include/vcl/keycodes.hxx   |1 +
 offapi/com/sun/star/awt/Key.idl|3 +++
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |6 ++
 vcl/osx/salframe.cxx   |1 +
 vcl/osx/salmenu.cxx|3 +++
 vcl/qt5/QtFrame.cxx|3 +++
 vcl/qt5/QtWidget.cxx   |3 +++
 vcl/unx/generic/app/saldisp.cxx|7 +++
 vcl/unx/gtk3/gtkframe.cxx  |2 ++
 vcl/win/app/salinst.cxx|1 +
 vcl/win/window/salframe.cxx|3 +++
 13 files changed, 42 insertions(+)

New commits:
commit ca74511985981444dbd72ade7244484c131e36a7
Author: Gökay Şatır 
AuthorDate: Wed Oct 4 15:01:38 2023 +0300
Commit: Caolán McNamara 
CommitDate: Sat Oct 14 21:51:43 2023 +0200

Add NUMBERSIGN key handler.

German keyboard layout has number sign key.
Users can print number sign without using modification keys.
So this key can be assigned a shortcut.
Subscript is assigned to CTRL + NUMBERSIGN.

Below PR is used as reference when adding the new key handler:
https://gerrit.libreoffice.org/c/core/+/86713

Signed-off-by: Gökay Şatır 
Change-Id: I340dc47764e9200d2477f8db740a629f62f48004
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157554
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 1db8f6d484b884301a7d3673f4d05478e28cd853)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157959
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index f28eee88afa4..54b7eb73c81a 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -186,6 +186,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_MOD1 | KEY_X,
  KEY_MOD1 | KEY_Y,
  KEY_MOD1 | KEY_Z,
+ KEY_MOD1 | KEY_NUMBERSIGN,
  KEY_MOD1 | KEY_COLON,
  KEY_MOD1 | KEY_SEMICOLON,
  KEY_MOD1 | KEY_QUOTELEFT,
@@ -271,6 +272,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_SHIFT | KEY_MOD1 | KEY_X,
  KEY_SHIFT | KEY_MOD1 | KEY_Y,
  KEY_SHIFT | KEY_MOD1 | KEY_Z,
+ KEY_SHIFT | KEY_MOD1 | KEY_NUMBERSIGN,
  KEY_SHIFT | KEY_MOD1 | KEY_COLON,
  KEY_SHIFT | KEY_MOD1 | KEY_SEMICOLON,
  KEY_SHIFT | KEY_MOD1 | KEY_QUOTELEFT,
@@ -352,6 +354,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_MOD2 | KEY_X,
  KEY_MOD2 | KEY_Y,
  KEY_MOD2 | KEY_Z,
+ KEY_MOD2 | KEY_NUMBERSIGN,
  KEY_MOD2 | KEY_COLON,
  KEY_MOD2 | KEY_SEMICOLON,
  KEY_MOD2 | KEY_QUOTELEFT,
@@ -431,6 +434,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_SHIFT | KEY_MOD2 | KEY_X,
  KEY_SHIFT | KEY_MOD2 | KEY_Y,
  KEY_SHIFT | KEY_MOD2 | KEY_Z,
+ KEY_SHIFT | KEY_MOD2 | KEY_NUMBERSIGN,
  KEY_SHIFT | KEY_MOD2 | KEY_COLON,
  KEY_SHIFT | KEY_MOD2 | KEY_SEMICOLON,
  KEY_SHIFT | KEY_MOD2 | KEY_QUOTELEFT,
@@ -511,6 +515,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_MOD1 | KEY_MOD2 | KEY_X,
  KEY_MOD1 | KEY_MOD2 | KEY_Y,
  KEY_MOD1 | KEY_MOD2 | KEY_Z,
+ KEY_MOD1 | KEY_MOD2 | KEY_NUMBERSIGN,
  KEY_MOD1 | KEY_MOD2 | KEY_COLON,
  KEY_MOD1 | KEY_MOD2 | KEY_SEMICOLON,
  KEY_MOD1 | KEY_MOD2 | KEY_QUOTELEFT,
@@ -590,6 +595,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_X,

[Libreoffice-commits] core.git: cui/source sw/source vcl/inc vcl/jsdialog

2023-10-14 Thread Skyler Grey (via logerrit)
 cui/source/tabpages/numpages.cxx |6 +-
 sw/source/ui/misc/num.cxx|   11 +--
 vcl/inc/jsdialog/jsdialogbuilder.hxx |1 +
 vcl/jsdialog/enabled.cxx |1 +
 vcl/jsdialog/jsdialogbuilder.cxx |6 ++
 5 files changed, 14 insertions(+), 11 deletions(-)

New commits:
commit 328d6aae9e2b7a73f6672800629230f5b46d15b1
Author: Skyler Grey 
AuthorDate: Wed Aug 2 08:31:56 2023 +
Commit: Caolán McNamara 
CommitDate: Sat Oct 14 14:30:17 2023 +0200

Re-enable Bullets and Numbering → Customize

- Revert change If0f7b953a40ca1d5f469087cb8f362a949c39b37
- Enable jsdialog for the customize page
- Fix numbering not being selected when switching level
- Fix start at field not having a default when changing level type to one 
that can use it
- Disable types that rely on supporting graphics in LOK as we cannot
  provide them

Change-Id: I2517289b553b8a3e9ed62c64b6514c6aab3702b6
Signed-off-by: Skyler Grey 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153806
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 6b9415005fee130e9d9b4b005a56975794a47934)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157957
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 45ee580f1667..d1cb79341281 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -52,6 +52,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -1089,7 +1090,9 @@ 
SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogC
 sal_uInt32 nCount = SvxNumberingTypeTable::Count();
 for (sal_uInt32 i = 0; i < nCount; ++i)
 {
-m_xFmtLB->append(OUString::number(SvxNumberingTypeTable::GetValue(i)), 
SvxNumberingTypeTable::GetString(i));
+int nValue = SvxNumberingTypeTable::GetValue(i);
+if (comphelper::LibreOfficeKit::isActive() && (nValue & 
SVX_NUM_BITMAP)) continue;
+m_xFmtLB->append(OUString::number(nValue), 
SvxNumberingTypeTable::GetString(i));
 }
 
 // Get advanced numbering types from the component.
@@ -1464,6 +1467,7 @@ void SvxNumOptionsTabPage::InitControls()
 else
 m_xBulColLB->SetNoSelection();
 }
+m_xStartED->set_value(1); // If this isn't set then changing the bullet 
type to a numbered type doesn't reset the start level
 switch(nBullet)
 {
 case SHOW_NUMBERING:
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 0764a61be710..91e075d26124 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -873,16 +873,7 @@ 
SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(weld::Window* pParent,
 AddTabPage("bullets", RID_SVXPAGE_PICK_BULLET );
 AddTabPage("outlinenum", RID_SVXPAGE_PICK_NUM );
 AddTabPage("graphics", RID_SVXPAGE_PICK_BMP );
-
-if (comphelper::LibreOfficeKit::isActive())
-{
-RemoveTabPage("customize");
-}
-else
-{
-AddTabPage("customize", RID_SVXPAGE_NUM_OPTIONS );
-}
-
+AddTabPage("customize", RID_SVXPAGE_NUM_OPTIONS );
 AddTabPage("position", RID_SVXPAGE_NUM_POSITION );
 }
 
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 33f5bdcbe881..030638e06e75 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -619,6 +619,7 @@ public:
 virtual void set_entry_text_without_notify(const OUString& rText);
 virtual void set_entry_text(const OUString& rText) override;
 virtual void set_active(int pos) override;
+virtual void set_active_id(const OUString& rText) override;
 virtual bool changed_by_direct_pick() const override;
 
 void render_entry(int pos, int dpix, int dpiy);
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 78aa703a8b6e..c61be13c2b7c 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -53,6 +53,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"cui/ui/linetabpage.ui"
 || rUIFile == u"cui/ui/macroselectordialog.ui"
 || rUIFile == u"cui/ui/numberingformatpage.ui"
+|| rUIFile == u"cui/ui/numberingoptionspage.ui"
 || rUIFile == u"cui/ui/numberingpositionpage.ui"
 || rUIFile == u"cui/ui/optlingupage.ui"
 || rUIFile == u"cui/ui/pageformatpage.ui"
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index ec0c4fec1573..91e09663bef1 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1665,6 +1665,12 @@ void JSComboBox::set_active(int pos)
 sendUpdate();
 }
 
+void JSComboBox::set_active_id(const OUString& rStr)
+{
+sal_uInt16 nPos = find_id(rStr);
+set_active(nPos);
+}
+
 bool JSComboBox::changed_by_direct_pick() 

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

2023-10-10 Thread Mike Kaganski (via logerrit)
 cui/source/dialogs/pastedlg.cxx  |4 ++--
 include/vcl/transfer.hxx |4 ++--
 sc/source/ui/view/cellsh.cxx |2 +-
 sw/source/uibase/dochdl/swdtflvr.cxx |2 +-
 vcl/source/treelist/transfer.cxx |4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 2a9e22157b61a67591057b3926e290236250efd0
Author: Mike Kaganski 
AuthorDate: Tue Oct 10 12:47:41 2023 +0300
Commit: Mike Kaganski 
CommitDate: Tue Oct 10 13:07:44 2023 +0200

Make some methods const, and avoid some const_casts

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

diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx
index d86d277cc34f..423637e9d9e9 100644
--- a/cui/source/dialogs/pastedlg.cxx
+++ b/cui/source/dialogs/pastedlg.cxx
@@ -85,7 +85,7 @@ void SvPasteObjectDialog::PreGetFormat( const 
TransferableDataHelper  )
 TransferableObjectDescriptor aDesc;
 if (rHelper.HasFormat(SotClipboardFormatId::OBJECTDESCRIPTOR))
 {
-
(void)const_cast(rHelper).GetTransferableObjectDescriptor(
+(void)rHelper.GetTransferableObjectDescriptor(
 SotClipboardFormatId::OBJECTDESCRIPTOR, aDesc);
 }
 const DataFlavorExVector* pFormats = ();
@@ -204,7 +204,7 @@ SotClipboardFormatId SvPasteObjectDialog::GetFormat( const 
TransferableDataHelpe
 TransferableObjectDescriptor aDesc;
 if (rHelper.HasFormat(SotClipboardFormatId::OBJECTDESCRIPTOR))
 {
-
(void)const_cast(rHelper).GetTransferableObjectDescriptor(
+(void)rHelper.GetTransferableObjectDescriptor(
 SotClipboardFormatId::OBJECTDESCRIPTOR, aDesc);
 }
 const DataFlavorExVector* pFormats = ();
diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx
index e460e9f9c155..e39fe13b039d 100644
--- a/include/vcl/transfer.hxx
+++ b/include/vcl/transfer.hxx
@@ -337,8 +337,8 @@ public:
 boolGetImageMap( SotClipboardFormatId nFormat, 
ImageMap& rIMap ) const;
 boolGetImageMap( const 
css::datatransfer::DataFlavor& rFlavor, ImageMap& rImap ) const;
 
-boolGetTransferableObjectDescriptor( 
SotClipboardFormatId nFormat, TransferableObjectDescriptor& rDesc );
-boolGetTransferableObjectDescriptor( 
TransferableObjectDescriptor& rDesc );
+boolGetTransferableObjectDescriptor( 
SotClipboardFormatId nFormat, TransferableObjectDescriptor& rDesc ) const;
+boolGetTransferableObjectDescriptor( 
TransferableObjectDescriptor& rDesc ) const;
 
 boolGetINetBookmark( SotClipboardFormatId nFormat, 
INetBookmark& rBmk ) const;
 boolGetINetBookmark( const 
css::datatransfer::DataFlavor& rFlavor, INetBookmark& rBmk ) const;
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index ec5914a2224b..34c87d0e61c6 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -445,7 +445,7 @@ static bool lcl_TestFormat( SvxClipboardFormatItem& 
rFormats, const Transferable
 if ( nFormatId == SotClipboardFormatId::EMBED_SOURCE )
 {
 TransferableObjectDescriptor aDesc;
-if ( 
const_cast(rDataHelper).GetTransferableObjectDescriptor(
+if ( rDataHelper.GetTransferableObjectDescriptor(
 
SotClipboardFormatId::OBJECTDESCRIPTOR, aDesc ) )
 aStrVal = aDesc.maTypeName;
 }
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index 918410957579..fc5f9f73a0a5 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -3550,7 +3550,7 @@ void SwTransferable::FillClipFormatItem( const 
SwWrtShell& rSh,
 TransferableObjectDescriptor aDesc;
 if (rData.HasFormat(SotClipboardFormatId::OBJECTDESCRIPTOR))
 {
-
(void)const_cast(rData).GetTransferableObjectDescriptor(
+(void)rData.GetTransferableObjectDescriptor(
 SotClipboardFormatId::OBJECTDESCRIPTOR, aDesc);
 }
 
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index bb13861b9815..812b9609b07f 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -1774,14 +1774,14 @@ bool TransferableDataHelper::GetImageMap( const 
css::datatransfer::DataFlavor& r
 }
 
 
-bool TransferableDataHelper::GetTransferableObjectDescriptor( 
SotClipboardFormatId nFormat, TransferableObjectDescriptor& rDesc )
+bool TransferableDataHelper::GetTransferableObjectDescriptor( 
SotClipboardFormatId nFormat, TransferableObjectDescriptor& rDesc ) const
 {
 DataFlavor aFlavor;
 return( 

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

2023-10-09 Thread Szymon Kłos (via logerrit)
 cui/source/dialogs/cuihyperdlg.cxx |   16 +---
 cui/source/dialogs/iconcdlg.cxx|4 +++-
 2 files changed, 16 insertions(+), 4 deletions(-)

New commits:
commit 0918d476c0bbe526cabb159523f35e4ab0bea2f2
Author: Szymon Kłos 
AuthorDate: Fri Sep 8 21:22:48 2023 +0200
Commit: Szymon Kłos 
CommitDate: Mon Oct 9 14:32:32 2023 +0200

Hyperlink dialog: hide some buttons in LOK

Change-Id: I55a4ca5921b44a7c091a3742a85f2c9da5a188a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156760
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Attila Szűcs 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157672
Tested-by: Jenkins

diff --git a/cui/source/dialogs/cuihyperdlg.cxx 
b/cui/source/dialogs/cuihyperdlg.cxx
index 86fd3c1a2c8f..4fec600441fd 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -109,10 +109,20 @@ SvxHpLinkDlg::SvxHpLinkDlg(SfxBindings* pBindings, 
SfxChildWindow* pChild, weld:
 
 // Buttons
 m_xOKBtn->show();
-m_xApplyBtn->show();
 m_xCancelBtn->show();
-m_xHelpBtn->show();
-m_xResetBtn->show();
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+m_xApplyBtn->hide();
+m_xHelpBtn->hide();
+m_xResetBtn->hide();
+}
+else
+{
+m_xApplyBtn->show();
+m_xHelpBtn->show();
+m_xResetBtn->show();
+}
 
 mbGrabFocus = true;
 
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 4aacf0e2b50e..9bda9d215dcf 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 
 #include 
@@ -151,7 +152,8 @@ void SvxHpLinkDlg::ActivatePageImpl()
 // tdf#90496 - remember last used view in hyperlink dialog
 msRememberedPageId = msCurrentPageId;
 
-m_xResetBtn->show();
+if (!comphelper::LibreOfficeKit::isActive())
+m_xResetBtn->show();
 }
 
 void SvxHpLinkDlg::DeActivatePageImpl ()


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

2023-10-08 Thread Mike Kaganski (via logerrit)
 cui/source/inc/border.hxx  |1 -
 cui/source/tabpages/border.cxx |   34 +++---
 include/editeng/borderline.hxx |   15 +++
 3 files changed, 22 insertions(+), 28 deletions(-)

New commits:
commit c78861094f57198f4cd7117a85a5915358742209
Author: Mike Kaganski 
AuthorDate: Sun Oct 8 13:14:11 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sun Oct 8 15:46:02 2023 +0200

Simplify a bit

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

diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 586b05f9410b..accb555930dc 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -77,7 +77,6 @@ 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);
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 549ab533410a..ca2b7d61e2ef 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -78,22 +78,19 @@ const WhichRangesContainer SvxBorderTabPage::pRanges(
 
 namespace
 {
-int lcl_twipsToPt(sal_Int64 nTwips)
+constexpr int twipsToPt100(sal_Int64 nTwips)
 {
-return vcl::ConvertDoubleValue(nTwips, 0, FieldUnit::TWIP, 
MapUnit::MapPoint) * 100;
+return o3tl::convert(nTwips * 100, o3tl::Length::twip, o3tl::Length::pt);
 }
+constexpr int s_LineWidths[] = { twipsToPt100(SvxBorderLineWidth::Hairline),
+ twipsToPt100(SvxBorderLineWidth::VeryThin),
+ twipsToPt100(SvxBorderLineWidth::Thin),
+ twipsToPt100(SvxBorderLineWidth::Medium),
+ twipsToPt100(SvxBorderLineWidth::Thick),
+ twipsToPt100(SvxBorderLineWidth::ExtraThick),
+ -1 };
 }
 
-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)
 {
 auto nMin = rField.denormalize(rField.get_min(FieldUnit::TWIP));
@@ -1243,10 +1240,10 @@ 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();
+nRemovedType = std::size(s_LineWidths) - m_xLineWidthLB->get_count();
 }
 
-SetLineWidth(m_aLineWidths[nPos + nRemovedType], nRemovedType);
+SetLineWidth(s_LineWidths[nPos + nRemovedType], nRemovedType);
 
 // Call the spinner handler to trigger all related modifications
 ModifyWidthMFHdl_Impl(*m_xLineWidthMF);
@@ -1462,19 +1459,18 @@ void SvxBorderTabPage::SetLineWidth( sal_Int64 nWidth, 
sal_Int32 nRemovedType )
 if ( nWidth >= 0 )
 m_xLineWidthMF->set_value( nWidth, FieldUnit::POINT );
 
-auto it = std::find_if( m_aLineWidths.begin(), m_aLineWidths.end(),
-[nWidth](const int val) -> bool { return val == 
nWidth; } );
+auto it = std::find( std::begin(s_LineWidths), std::end(s_LineWidths), 
nWidth );
 
-if ( it != m_aLineWidths.end() && *it >= 0 )
+if ( it != std::end(s_LineWidths) && *it >= 0 )
 {
 // Select predefined value in combobox
 m_xLineWidthMF->hide();
-m_xLineWidthLB->set_active(std::distance(m_aLineWidths.begin(), it) - 
nRemovedType);
+m_xLineWidthLB->set_active(std::distance(std::begin(s_LineWidths), it) 
- nRemovedType);
 }
 else
 {
 // This is not one of predefined values. Show spinner
-m_xLineWidthLB->set_active(m_aLineWidths.size() - nRemovedType -1);
+m_xLineWidthLB->set_active(std::size(s_LineWidths) - nRemovedType -1);
 m_xLineWidthMF->show();
 }
 }
diff --git a/include/editeng/borderline.hxx b/include/editeng/borderline.hxx
index 596b8b59f413..851c16156dee 100644
--- a/include/editeng/borderline.hxx
+++ b/include/editeng/borderline.hxx
@@ -34,15 +34,14 @@ class IntlWrapper;
 // Line width defaults in twips
 // Thin matches Excel's default values
 // See tdf#48622 for the discussion leading to these defaults.
-class SvxBorderLineWidth
+namespace SvxBorderLineWidth
 {
-public:
-static const sal_Int16 Hairline = 1; // 0.05pt
-static const sal_Int16 VeryThin = 10; // 0.5pt
-static const sal_Int16 Thin = 

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

2023-10-03 Thread Mike Kaganski (via logerrit)
 cui/source/dialogs/cuigrfflt.cxx |   20 ++--
 include/vcl/BitmapEmbossGreyFilter.hxx   |   13 -
 vcl/source/bitmap/BitmapEmbossGreyFilter.cxx |4 ++--
 vcl/workben/vcldemo.cxx  |2 +-
 4 files changed, 21 insertions(+), 18 deletions(-)

New commits:
commit 140dc375adfffa59dff2652eb8b9625c23d81c8b
Author: Mike Kaganski 
AuthorDate: Tue Oct 3 15:09:23 2023 +0300
Commit: Mike Kaganski 
CommitDate: Tue Oct 3 17:03:34 2023 +0200

Use Degree100

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

diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 48373e7f1968..c29bc4947e00 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -431,21 +431,21 @@ GraphicFilterEmboss::~GraphicFilterEmboss()
 Graphic GraphicFilterEmboss::GetFilteredGraphic( const Graphic& rGraphic, 
double, double )
 {
 Graphic aRet;
-sal_uInt16  nAzim, nElev;
+Degree100  nAzim, nElev;
 
 switch (maCtlLight.GetActualRP())
 {
 default:   
OSL_FAIL("svx::GraphicFilterEmboss::GetFilteredGraphic(), unknown Reference 
Point!" );
[[fallthrough]];
-case RectPoint::LT: nAzim = 4500;nElev = 4500; break;
-case RectPoint::MT: nAzim = 9000;nElev = 4500; break;
-case RectPoint::RT: nAzim = 13500;   nElev = 4500; break;
-case RectPoint::LM: nAzim = 0;   nElev = 4500; break;
-case RectPoint::MM: nAzim = 0;   nElev = 9000; break;
-case RectPoint::RM: nAzim = 18000;   nElev = 4500; break;
-case RectPoint::LB: nAzim = 31500;   nElev = 4500; break;
-case RectPoint::MB: nAzim = 27000;   nElev = 4500; break;
-case RectPoint::RB: nAzim = 22500;   nElev = 4500; break;
+case RectPoint::LT: nAzim = 4500_deg100;nElev = 4500_deg100; break;
+case RectPoint::MT: nAzim = 9000_deg100;nElev = 4500_deg100; break;
+case RectPoint::RT: nAzim = 13500_deg100;   nElev = 4500_deg100; break;
+case RectPoint::LM: nAzim = 0_deg100;   nElev = 4500_deg100; break;
+case RectPoint::MM: nAzim = 0_deg100;   nElev = 9000_deg100; break;
+case RectPoint::RM: nAzim = 18000_deg100;   nElev = 4500_deg100; break;
+case RectPoint::LB: nAzim = 31500_deg100;   nElev = 4500_deg100; break;
+case RectPoint::MB: nAzim = 27000_deg100;   nElev = 4500_deg100; break;
+case RectPoint::RB: nAzim = 22500_deg100;   nElev = 4500_deg100; break;
 }
 
 if( rGraphic.IsAnimated() )
diff --git a/include/vcl/BitmapEmbossGreyFilter.hxx 
b/include/vcl/BitmapEmbossGreyFilter.hxx
index 2f1d309e0e59..34d9b5bb8c10 100644
--- a/include/vcl/BitmapEmbossGreyFilter.hxx
+++ b/include/vcl/BitmapEmbossGreyFilter.hxx
@@ -11,6 +11,9 @@
 #ifndef INCLUDED_VCL_BITMAPEMBOSSGREYFILTER_HXX
 #define INCLUDED_VCL_BITMAPEMBOSSGREYFILTER_HXX
 
+#include 
+
+#include 
 #include 
 
 class BitmapEx;
@@ -18,17 +21,17 @@ class BitmapEx;
 class VCL_DLLPUBLIC BitmapEmbossGreyFilter final : public BitmapFilter
 {
 public:
-BitmapEmbossGreyFilter(sal_uInt16 nAzimuthAngle100, sal_uInt16 
nElevationAngle100)
-: mnAzimuthAngle100(nAzimuthAngle100)
-, mnElevationAngle100(nElevationAngle100)
+BitmapEmbossGreyFilter(Degree100 nAzimuthAngle, Degree100 nElevationAngle)
+: mnAzimuthAngle(nAzimuthAngle)
+, mnElevationAngle(nElevationAngle)
 {
 }
 
 virtual BitmapEx execute(BitmapEx const& rBitmapEx) const override;
 
 private:
-sal_uInt16 mnAzimuthAngle100;
-sal_uInt16 mnElevationAngle100;
+Degree100 mnAzimuthAngle;
+Degree100 mnElevationAngle;
 };
 
 #endif
diff --git a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx 
b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx
index 06406152d6d6..405a9056b954 100644
--- a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx
+++ b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx
@@ -39,8 +39,8 @@ BitmapEx BitmapEmbossGreyFilter::execute(BitmapEx const& 
rBitmapEx) const
 BitmapColor aGrey(sal_uInt8(0));
 const sal_Int32 nWidth = pWriteAcc->Width();
 const sal_Int32 nHeight = pWriteAcc->Height();
-const double fAzim = basegfx::deg2rad<100>(mnAzimuthAngle100);
-const double fElev = basegfx::deg2rad<100>(mnElevationAngle100);
+const double fAzim = toRadians(mnAzimuthAngle);
+const double fElev = toRadians(mnElevationAngle);
 std::vector pHMap(nWidth + 2);
 std::vector pVMap(nHeight + 2);
 const double nLx = cos(fAzim) * cos(fElev) * 255.0;
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 5b9b2b0289e1..346de0b52a09 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -149,7 +149,7 @@ public:
 maIntroBW = maIntro.GetBitmap();
 
 BitmapEx aTmpBmpEx(maIntroBW);
-

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

2023-09-26 Thread Miklos Vajna (via logerrit)
 cui/source/tabpages/chardlg.cxx |5 +
 sc/qa/uitest/chart/chartAxes.py |   13 +
 2 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit d5a43da338e4afe3630a072351516e39865a1f2f
Author: Miklos Vajna 
AuthorDate: Mon Sep 25 20:08:53 2023 +0200
Commit: Miklos Vajna 
CommitDate: Tue Sep 26 08:18:22 2023 +0200

tdf#148959 cui: fix hiding semi-transparent UI for chart axis font

Regression from commit b4554b8eddd048532269df610e89ae739c46fab7 (cui:
add UI for semi-transparent shape text, 2019-11-22), the trouble was
that even if semi-transparent text UI is meant to be opt in, we enabled
it by accident also for charts.

This happens because I assumed that we always get a SID_FLAG_TYPE, and
then we can hide the not wanted UI in case SVX_ENABLE_CHAR_TRANSPARENCY
is not in the flags, but even SID_FLAG_TYPE can be missing.

Fix the problem by assuming that in case SID_FLAG_TYPE is not provided,
that means no flags.

An alternative would be to actually add support for semi-transparent
text in chart2/, which is doable, but
chart::wrapper::ItemConverter::ApplyItemSet() assumes that each pool
item can be mapped to exactly one UNO property, which is not the case
for SvxColorItem (it would have to map to CharColor and
CharTransparence), so don't do that yet.

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

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 3245f516338c..56eb92e9b172 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2389,10 +2389,7 @@ void SvxCharEffectsPage::PageCreated(const 
SfxAllItemSet& aSet)
 if (pDisableCtlItem)
 DisableControls(pDisableCtlItem->GetValue());
 
-if (!pFlagItem)
-return;
-
-sal_uInt32 nFlags=pFlagItem->GetValue();
+sal_uInt32 nFlags = pFlagItem ? pFlagItem->GetValue() : 0;
 if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER )
 // the writer uses SID_ATTR_BRUSH as font background
 m_bPreviewBackgroundToCharacter = true;
diff --git a/sc/qa/uitest/chart/chartAxes.py b/sc/qa/uitest/chart/chartAxes.py
index a4ca1d8a1c35..4a5cbab2e5ef 100644
--- a/sc/qa/uitest/chart/chartAxes.py
+++ b/sc/qa/uitest/chart/chartAxes.py
@@ -10,6 +10,7 @@ from uitest.framework import UITestCase
 from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
 
 from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import select_pos
 
 
 # Chart Enable Axes dialog
@@ -55,5 +56,17 @@ class chartAxes(UITestCase):
 self.assertEqual(get_state_as_dict(secondaryX)["Selected"], "true")
 self.assertEqual(get_state_as_dict(secondaryY)["Selected"], "true")
 
+# Test Format -> Axis -> X Axis...: the child name is generated in
+# lcl_getAxisCIDForCommand().
+xAxisX = xChartMain.getChild("CID/D=0:CS=0:Axis=0,0")
+with self.ui_test.execute_dialog_through_action(xAxisX, "COMMAND", 
mkPropertyValues({"COMMAND": "DiagramAxisX"})) as xDialog:
+xTabs = xDialog.getChild("tabcontrol")
+# Select RID_SVXPAGE_CHAR_EFFECTS, see the SchAttribTabDlg ctor.
+select_pos(xTabs, "6")
+xFontTransparency = xDialog.getChild("fonttransparencymtr")
+# Without the accompanying fix in place, this test would have 
failed, the
+# semi-transparent text UI was visible, but then it was lost on 
save.
+self.assertEqual(get_state_as_dict(xFontTransparency)["Visible"], 
"false")
+
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:


[Libreoffice-commits] core.git: cui/source sc/source sd/source sfx2/source starmath/source svx/source sw/source

2023-09-25 Thread Bayram Çiçek (via logerrit)
 cui/source/options/connpooloptions.cxx  |   10 +++
 cui/source/options/dbregister.cxx   |5 +
 cui/source/options/fontsubs.cxx |   10 +++
 cui/source/options/optaccessibility.cxx |   10 +++
 cui/source/options/optasian.cxx |   10 +++
 cui/source/options/optbasic.cxx |   10 +++
 cui/source/options/optchart.cxx |   10 +++
 cui/source/options/optcolor.cxx |5 +
 cui/source/options/optctl.cxx   |   15 -
 cui/source/options/optdeepl.cxx |8 ++-
 cui/source/options/optfltr.cxx  |   20 ++-
 cui/source/options/optgdlg.cxx  |   33 ++--
 cui/source/options/optgenrl.cxx |5 +
 cui/source/options/opthtml.cxx  |   10 +++
 cui/source/options/optinet2.cxx |   28 --
 cui/source/options/optjava.cxx  |   15 -
 cui/source/options/optjsearch.cxx   |   10 +++
 cui/source/options/optlanguagetool.cxx  |   13 +++--
 cui/source/options/optlingu.cxx |5 +
 cui/source/options/optopencl.cxx|5 +
 cui/source/options/optpath.cxx  |4 +
 cui/source/options/optsave.cxx  |   10 +++
 cui/source/options/optupdt.cxx  |   15 -
 cui/source/options/personalization.cxx  |8 ++-
 cui/source/tabpages/tparea.cxx  |5 +
 sc/source/ui/optdlg/opredlin.cxx|5 +
 sc/source/ui/optdlg/tpcalc.cxx  |   15 -
 sc/source/ui/optdlg/tpcompatibility.cxx |5 +
 sc/source/ui/optdlg/tpdefaults.cxx  |5 +
 sc/source/ui/optdlg/tpformula.cxx   |   15 -
 sc/source/ui/optdlg/tpprint.cxx |   10 +++
 sc/source/ui/optdlg/tpusrlst.cxx|   10 +++
 sc/source/ui/optdlg/tpview.cxx  |   25 +++--
 sd/source/ui/dlg/prntopts.cxx   |   15 -
 sd/source/ui/dlg/tpoption.cxx   |   20 ++-
 sfx2/source/dialog/printopt.cxx |   15 -
 starmath/source/dialog.cxx  |   15 -
 svx/source/dialog/optgrid.cxx   |   10 +++
 sw/source/ui/config/mailconfigpage.cxx  |   15 -
 sw/source/ui/config/optcomp.cxx |5 +
 sw/source/ui/config/optload.cxx |   23 ++--
 sw/source/ui/config/optpage.cxx |   83 +---
 42 files changed, 452 insertions(+), 118 deletions(-)

New commits:
commit 0eb05b47a6d89fdfc533515483584fc739962b65
Author: Bayram Çiçek 
AuthorDate: Wed Sep 20 14:37:08 2023 +0300
Commit: Andreas Heinisch 
CommitDate: Mon Sep 25 11:05:25 2023 +0200

tdf#49895: search in Options: check if label exists (related to tdf#157266)

- since ids in ui files can be changed or removed,
we have to check if they are exits or not, to prevent
any crash or misbehavior.
- Proper solution will be iterating over the
widget ids and collecting their strings without
based on a list of identifiers.

Change-Id: I2088af6842ad0acd00838a37295dc2e6140096f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157103
Reviewed-by: Andreas Heinisch 
Tested-by: Andreas Heinisch 

diff --git a/cui/source/options/connpooloptions.cxx 
b/cui/source/options/connpooloptions.cxx
index b13561898ab0..00101bed4fb6 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -165,12 +165,18 @@ namespace offapp
 OUString labels[] = { "label1", "driverslabel", "driverlabel", 
"timeoutlabel", "driver" };
 
 for (const auto& label : labels)
-sAllStrings += m_xBuilder->weld_label(label)->get_label() + " ";
+{
+if (const auto& pString = m_xBuilder->weld_label(label))
+sAllStrings += pString->get_label() + " ";
+}
 
 OUString checkButton[] = { "connectionpooling", "enablepooling" };
 
 for (const auto& check : checkButton)
-sAllStrings += m_xBuilder->weld_check_button(check)->get_label() + 
" ";
+{
+if (const auto& pString = m_xBuilder->weld_check_button(check))
+sAllStrings += pString->get_label() + " ";
+}
 
 return sAllStrings.replaceAll("_", "");
 }
diff --git a/cui/source/options/dbregister.cxx 
b/cui/source/options/dbregister.cxx
index d1c8abb4d102..8386cc546595 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -133,7 +133,10 @@ std::unique_ptr 
DbRegistrationOptionsPage::Create( weld::Container*
 
 OUString DbRegistrationOptionsPage::GetAllStrings()
 {
-OUString sAllStrings = m_xBuilder->weld_label("label1")->get_label() + " ";
+OUString sAllStrings;
+
+if (const auto& pString = m_xBuilder->weld_label("label1"))
+sAllStrings += pString->get_label() + " ";
 
 return sAllStrings.replaceAll("_", "");
 }
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index b2fb0604dcf8..eaf00e2364dd 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -146,12 +146,18 @@ OUString 

[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 
 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 

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

2023-09-12 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit b65c770d095f1c3c6ae68df699b2055a4596fe5a
Author: Caolán McNamara 
AuthorDate: Tue Sep 12 10:23:19 2023 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 12 12:43:36 2023 +0200

tdf#157148 ensure we auto-scroll to current location to make it visible

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

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 09b8a9fc43f9..692c8e4512d1 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1704,6 +1704,8 @@ void SentenceEditWindow_Impl::MoveErrorMarkTo(sal_Int32 
nStart, sal_Int32 nEnd,
 if (!bCurrentSelectionInRange)
 {
 m_xEditView->SetSelection(ESelection(0, nStart));
+// tdf#157148 ensure current location is auto-scrolled to be visible
+m_xEditView->ShowCursor();
 }
 
 Invalidate();


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

2023-09-10 Thread Julien Nabet (via logerrit)
 cui/source/options/dbregister.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 44d50f0226b1003f60dd0a890e2309cac9660812
Author: Julien Nabet 
AuthorDate: Sat Sep 9 22:59:06 2023 +0200
Commit: Julien Nabet 
CommitDate: Sun Sep 10 09:30:53 2023 +0200

tdf#149195: Impossible to change link of a DB and keep the same registered 
name

Just test nEntry to know if it's a new entry (and so the name must be 
different from an existing one)

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

diff --git a/cui/source/options/dbregister.cxx 
b/cui/source/options/dbregister.cxx
index 3aa47d69aea9..d1c8abb4d102 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -287,7 +287,10 @@ void DbRegistrationOptionsPage::openLinkDialog(const 
OUString& sOldName, const O
 ODocumentLinkDialog aDlg(GetFrameWeld(), nEntry == -1);
 
 aDlg.setLink(sOldName, sOldLocation);
-aDlg.setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator 
) );
+
+// tdf#149195: control the name (ie check duplicate) only if new entry case
+if (nEntry == -1)
+aDlg.setNameValidator(LINK( this, DbRegistrationOptionsPage, 
NameValidator ) );
 
 if (aDlg.run() != RET_OK)
 return;


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

2023-09-08 Thread Julien Nabet (via logerrit)
 cui/source/tabpages/tparea.cxx |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit b69e14038288387b5f288a06821fb5df66dcf94e
Author: Julien Nabet 
AuthorDate: Thu Sep 7 16:34:53 2023 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Fri Sep 8 13:26:15 2023 +0200

tdf#157138: Can't switch from Use Background to None area fill

Revert partly tdf#151260 fix

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

diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 23946aa7c4b7..9107bace195c 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -240,11 +240,8 @@ DeactivateRC SvxAreaTabPage::DeactivatePage( SfxItemSet* 
_pSet )
 {
 XFillStyleItem aStyleItem( drawing::FillStyle_NONE );
 _pSet->Put( aStyleItem );
-if (_pSet->HasItem(XATTR_FILLUSESLIDEBACKGROUND))
-{
-XFillUseSlideBackgroundItem aFillBgItem( false );
-_pSet->Put( aFillBgItem );
-}
+XFillUseSlideBackgroundItem aFillBgItem( false );
+_pSet->Put( aFillBgItem );
 }
 break;
 }


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

2023-09-08 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/dialogs/dlgname.cxx   |5 -
 cui/source/factory/dlgfact.cxx   |4 ++--
 cui/source/factory/dlgfact.hxx   |2 +-
 include/cui/dlgname.hxx  |3 ++-
 include/svx/svxdlg.hxx   |2 +-
 sw/inc/AccessibilityCheckStrings.hrc |3 ++-
 sw/source/core/access/AccessibilityIssue.cxx |6 +++---
 7 files changed, 15 insertions(+), 10 deletions(-)

New commits:
commit c7a608a6691c790783c63f504010bc796c36af25
Author: Samuel Mehrbrodt 
AuthorDate: Thu Sep 7 12:49:46 2023 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Fri Sep 8 13:24:21 2023 +0200

tdf#155503 Add title to document title dialog

Otherwise the title was just "Name"

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

diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index fa12a158445f..4e6847e0f5cc 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -25,7 +25,8 @@
 |*
 \/
 
-SvxNameDialog::SvxNameDialog(weld::Window* pParent, const OUString& rName, 
const OUString& rDesc)
+SvxNameDialog::SvxNameDialog(weld::Window* pParent, const OUString& rName, 
const OUString& rDesc,
+ const OUString& rTitle)
 : GenericDialogController(pParent, "cui/ui/namedialog.ui", "NameDialog")
 , m_xEdtName(m_xBuilder->weld_entry("name_entry"))
 , m_xFtDescription(m_xBuilder->weld_label("description_label"))
@@ -36,6 +37,8 @@ SvxNameDialog::SvxNameDialog(weld::Window* pParent, const 
OUString& rName, const
 m_xEdtName->select_region(0, -1);
 ModifyHdl(*m_xEdtName);
 m_xEdtName->connect_changed(LINK(this, SvxNameDialog, ModifyHdl));
+if (!rTitle.isEmpty())
+set_title(rTitle);
 }
 
 IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl, weld::Entry&, void)
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index d0b0fceed8a3..f558f9e4a37d 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1092,9 +1092,9 @@ VclPtr 
AbstractDialogFactory_Impl::CreateSvxEditDictionaryDia
 }
 
 VclPtr 
AbstractDialogFactory_Impl::CreateSvxNameDialog(weld::Window* pParent,
-const OUString& rName, const OUString& 
rDesc)
+const OUString& rName, const OUString& 
rDesc, const OUString& rTitle)
 {
-return 
VclPtr::Create(std::make_unique(pParent,
 rName, rDesc));
+return 
VclPtr::Create(std::make_unique(pParent,
 rName, rDesc, rTitle));
 }
 
 VclPtr 
AbstractDialogFactory_Impl::CreateSvxObjectNameDialog(weld::Window* pParent, 
const OUString& rName)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index cd3f638aced5..4adc0d82ee47 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -521,7 +521,7 @@ public:
 virtual VclPtr 
CreateSvxNewDictionaryDialog(weld::Window* pParent) override;
 virtual VclPtr 
CreateSvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName) 
override;
 virtual VclPtr CreateSvxNameDialog(weld::Window* 
pParent,
-const OUString& rName, const 
OUString& rDesc) override;
+const OUString& rName, const 
OUString& rDesc, const OUString& rTitle = "") override;
 // #i68101#
 virtual VclPtr 
CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) 
override;
 virtual VclPtr 
CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, 
const OUString& rDescription, bool isDecorative) override;
diff --git a/include/cui/dlgname.hxx b/include/cui/dlgname.hxx
index 9083177ee980..16938734ff97 100644
--- a/include/cui/dlgname.hxx
+++ b/include/cui/dlgname.hxx
@@ -36,7 +36,8 @@ private:
 DECL_LINK(ModifyHdl, weld::Entry&, void);
 
 public:
-SvxNameDialog(weld::Window* pWindow, const OUString& rName, const 
OUString& rDesc);
+SvxNameDialog(weld::Window* pWindow, const OUString& rName, const 
OUString& rDesc,
+  const OUString& rTitle = "");
 
 OUString GetName() const { return m_xEdtName->get_text(); }
 
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index d5a0b5fec7fc..436bfd430368 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -377,7 +377,7 @@ public:
 virtual VclPtr 
CreateSvxNewDictionaryDialog(weld::Window* pParent) = 0;
 virtual VclPtr 
CreateSvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName) = 0;
 virtual VclPtr CreateSvxNameDialog(weld::Window* 
pParent,
-const OUString& rName, const 
OUString& rDesc ) = 0;
+const 

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

2023-09-04 Thread Bayram Çiçek (via logerrit)
 cui/source/options/treeopt.cxx |   12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit c68e1dca3a5a06248ce129bfb13206753163d71d
Author: Bayram Çiçek 
AuthorDate: Thu Aug 31 00:01:56 2023 +0300
Commit: Andreas Heinisch 
CommitDate: Mon Sep 4 13:10:26 2023 +0200

tdf#49895: show wait cursor while Options dialog loads

initializing of the dialogs happens at two stage:
- at the loading of the Options dialog
- at the time of searching

We have to notify the user that there is a process ongoing.
Therefore, a wait cursor indicator added to the both
stage of the initialization.

Change-Id: Ia1c6318aa961424e957ae27ac2ff5f496180cb81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156312
Reviewed-by: Andreas Heinisch 
Tested-by: Jenkins

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index d514b7deeb7f..1b5e29e2aca2 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -791,6 +791,12 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, SearchUpdateHdl, 
weld::Entry&, void)
 
 IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void)
 {
+// initializeFirstNDialog() can take a long time, show wait cursor and 
disable input
+std::unique_ptr xWait(m_pParent ? new 
weld::WaitObject(m_pParent) : nullptr);
+
+// Pause redraw
+xTreeLB->freeze();
+
 if (bIsFirtsInitialize)
 {
 m_xSearchEdit->freeze();
@@ -803,9 +809,6 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, 
Timer*, void)
 bIsFirtsInitialize = false;
 }
 
-// Pause redraw
-xTreeLB->freeze();
-
 // Apply the search filter
 OUString aSearchTerm(m_xSearchEdit->get_text());
 int nMatchFound = applySearchFilter(aSearchTerm);
@@ -1186,6 +1189,9 @@ void OfaTreeOptionsDialog::ActivateLastSelection()
 m_xSearchEdit->grab_focus();
 SelectHdl_Impl();
 
+// initializeFirstNDialog() can take a long time, show wait cursor
+std::unique_ptr xWait(m_pParent ? new 
weld::WaitObject(m_pParent) : nullptr);
+
 /* initialize first 25 dialogs which are almost half of the dialogs
 in a row while Options dialog opens. then clear to avoid UI test 
failures. */
 initializeFirstNDialog(25);


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

2023-08-31 Thread Caolán McNamara (via logerrit)
 cui/source/options/treeopt.cxx |   13 +
 1 file changed, 1 insertion(+), 12 deletions(-)

New commits:
commit 379d6042cd379df4988f891d068996ba8035f9da
Author: Caolán McNamara 
AuthorDate: Thu Aug 31 08:57:50 2023 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 31 11:28:25 2023 +0200

cid#1542448 make_iterator always succeeds

so (!xEntry) here doesn't happen

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

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 4af68df0171a..d514b7deeb7f 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -820,7 +820,6 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, 
Timer*, void)
 
 void OfaTreeOptionsDialog::selectFirstEntry()
 {
-std::unique_ptr xEntry;
 std::unique_ptr xTemp = xTreeLB->make_iterator();
 bool bTemp = xTreeLB->get_iter_first(*xTemp);
 
@@ -829,17 +828,7 @@ void OfaTreeOptionsDialog::selectFirstEntry()
 // select only the first child
 if (xTreeLB->get_iter_depth(*xTemp) && 
xTreeLB->get_id(*xTemp).toInt64())
 {
-xEntry = xTreeLB->make_iterator(xTemp.get());
-
-if (!xEntry)
-{
-xEntry = xTreeLB->make_iterator();
-if (!xTreeLB->get_iter_first(*xEntry) || 
!xTreeLB->iter_next(*xEntry))
-xEntry.reset();
-}
-
-if (!xEntry)
-return;
+std::unique_ptr 
xEntry(xTreeLB->make_iterator(xTemp.get()));
 
 std::unique_ptr 
xParent(xTreeLB->make_iterator(xEntry.get()));
 xTreeLB->iter_parent(*xParent);


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

2023-08-25 Thread Tomaž Vajngerl (via logerrit)
 cui/source/tabpages/chardlg.cxx |   13 +
 1 file changed, 1 insertion(+), 12 deletions(-)

New commits:
commit 3f7e9b2ea67a8de9ad9dd819ec2eb91e8180af95
Author: Tomaž Vajngerl 
AuthorDate: Fri Aug 18 22:28:33 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Fri Aug 25 20:48:34 2023 +0200

cui: use common menthod to get the complex color from a NamedColor

NamedColor implements a getComplexColor method, which creates the
ComplexColor from the NamedColor attributes. We don't need to do
this ourselves.

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

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 0bd14b7b38cb..3245f516338c 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1593,18 +1593,7 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( 
SfxItemSet& rSet )
 
 if (bChanged)
 {
-SvxColorItem aItem( aSelectedColor.m_aColor, nWhich );
-
-// The color was picked from the theme palette, remember its index.
-model::ThemeColorType eType = 
model::convertToThemeColorType(aSelectedColor.m_nThemeIndex);
-if (eType != model::ThemeColorType::Unknown)
-{
-auto aComplexColor = model::ComplexColor::Theme(eType);
-
aComplexColor.addTransformation({model::TransformationType::LumMod, 
aSelectedColor.m_nLumMod});
-
aComplexColor.addTransformation({model::TransformationType::LumOff, 
aSelectedColor.m_nLumOff});
-aItem.setComplexColor(aComplexColor);
-}
-
+SvxColorItem aItem(aSelectedColor.m_aColor, 
aSelectedColor.getComplexColor(), nWhich);
 rSet.Put(aItem);
 }
 else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) )


[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 sw/qa

2023-08-22 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/paragrph.cxx  |   26 ++
 sw/qa/uitest/writer_tests2/formatParagraph.py |   10 +-
 sw/qa/uitest/writer_tests3/tdf79236.py|   20 ++--
 3 files changed, 33 insertions(+), 23 deletions(-)

New commits:
commit a701a726dc3ccc174d1323a298c3550733773df9
Author: Caolán McNamara 
AuthorDate: Tue Aug 22 13:14:38 2023 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 22 20:46:40 2023 +0200

tdf#101895 don't unconditionally default to ch[ar]/line

if CJK typography is available.

Given that we choose to show cm vs inch based on
SvtSysLocaleOptions::GetRealLanguageTag() also choose to use ch[ar] and
line based on that setting when bApplyCharUnit is enabled.

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

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 957431e565a9..9f5e94833b3b 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -48,11 +48,14 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 const WhichRangesContainer SvxStdParagraphTabPage::pStdRanges(
 svl::Items<
@@ -527,6 +530,19 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
 return bModified;
 }
 
+static bool UseCharUnitInUI(const SfxItemSet& rSet)
+{
+const bool bApplyCharUnit = GetApplyCharUnit(rSet);
+if (!bApplyCharUnit)
+return false;
+if (!SvtCJKOptions::IsAsianTypographyEnabled())
+return false;
+// tdf#101895 Given that we choose to show cm vs inch based on this Locale
+// setting, also choose to use ch[ar] and line based on that locale when
+// bApplyCharUnit is enabled.
+return 
MsLangId::isCJK(SvtSysLocaleOptions().GetRealLanguageTag().getLanguageType());
+}
+
 void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet )
 {
 SfxItemPool* pPool = rSet->GetPool();
@@ -534,10 +550,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet 
)
 
 // adjust metric
 FieldUnit eFUnit = GetModuleFieldUnit( *rSet );
-
-bool bApplyCharUnit = GetApplyCharUnit( *rSet );
-
-if(SvtCJKOptions::IsAsianTypographyEnabled() && bApplyCharUnit )
+if (UseCharUnitInUI(*rSet))
 eFUnit = FieldUnit::CHAR;
 
 m_aLeftIndent.SetFieldUnit(eFUnit);
@@ -1824,10 +1837,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* 
rSet )
 
 // adjust metric
 FieldUnit eFUnit = GetModuleFieldUnit( *rSet );
-
-bool bApplyCharUnit = GetApplyCharUnit( *rSet );
-
-if( SvtCJKOptions::IsAsianTypographyEnabled() && bApplyCharUnit )
+if (UseCharUnitInUI(*rSet))
 eFUnit = FieldUnit::CHAR;
 
 sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE );
diff --git a/sw/qa/uitest/writer_tests2/formatParagraph.py 
b/sw/qa/uitest/writer_tests2/formatParagraph.py
index cd72dbf7efe7..e90d0fd7f980 100644
--- a/sw/qa/uitest/writer_tests2/formatParagraph.py
+++ b/sw/qa/uitest/writer_tests2/formatParagraph.py
@@ -58,12 +58,12 @@ class formatParagraph(UITestCase):
 xLineSpacing = xDialog.getChild("comboLB_LINEDIST")
 xActivate = xDialog.getChild("checkCB_REGISTER")
 
-self.assertEqual(get_state_as_dict(xBeforeText)["Text"], "0.50 
ch")
-self.assertEqual(get_state_as_dict(xAfterText)["Text"], "0.50 
ch")
-self.assertEqual(get_state_as_dict(xFirstLine)["Text"], "0.50 
ch")
+self.assertEqual(get_state_as_dict(xBeforeText)["Text"], 
"0.02″")
+self.assertEqual(get_state_as_dict(xAfterText)["Text"], 
"0.02″")
+self.assertEqual(get_state_as_dict(xFirstLine)["Text"], 
"0.02″")
 self.assertEqual(get_state_as_dict(xAutomaticChk)["Selected"], 
"true")
-self.assertEqual(get_state_as_dict(xAbovePar)["Text"], "0.50 
line")
-self.assertEqual(get_state_as_dict(xBelowPar)["Text"], "0.50 
line")
+self.assertEqual(get_state_as_dict(xAbovePar)["Text"], "0.02″")
+self.assertEqual(get_state_as_dict(xBelowPar)["Text"], "0.02″")
 self.assertEqual(get_state_as_dict(xChkspace)["Selected"], 
"true")
 
self.assertEqual(get_state_as_dict(xLineSpacing)["SelectEntryText"], "Double")
 self.assertEqual(get_state_as_dict(xActivate)["Selected"], 
"true")
diff --git a/sw/qa/uitest/writer_tests3/tdf79236.py 
b/sw/qa/uitest/writer_tests3/tdf79236.py
index c8e857188c9c..d7b59da19f63 100644
--- a/sw/qa/uitest/writer_tests3/tdf79236.py
+++ b/sw/qa/uitest/writer_tests3/tdf79236.py
@@ -59,11 +59,11 @@ class tdf79236(UITestCase):
 xTopSpnBtn.executeAction("UP", tuple())
 
 
-

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

2023-08-18 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/AdditionsDialog.cxx |   10 --
 cui/source/inc/AdditionsDialog.hxx |1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 5296b0ffe3ce031cab29d64d62e1bdc3fb2595fe
Author: Caolán McNamara 
AuthorDate: Fri Aug 18 11:07:07 2023 +0100
Commit: Noel Grandin 
CommitDate: Fri Aug 18 19:22:53 2023 +0200

don't access network during a UITest

Change-Id: If6cc3da3e75ad7689a0de35784c2d29d5b01b96e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155833
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index 73b16ed06e90..f0dedf626acf 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -275,6 +275,11 @@ 
SearchAndParseThread::SearchAndParseThread(AdditionsDialog* pDialog, const bool
 , m_bExecute(true)
 , m_bIsFirstLoading(isFirstLoading)
 {
+// if we are running a UITest, e.g. UITest_sw_options then
+// don't attempt to downloading anything
+static const bool bUITest = getenv("LIBO_TEST_UNIT");
+
+m_bUITest = bUITest;
 }
 
 SearchAndParseThread::~SearchAndParseThread() {}
@@ -284,7 +289,8 @@ void SearchAndParseThread::Append(AdditionInfo& 
additionInfo)
 if (!m_bExecute)
 return;
 OUString aPreviewFile;
-bool bResult = getPreviewFile(additionInfo, aPreviewFile); // info vector 
json data
+bool bResult
+= !m_bUITest && getPreviewFile(additionInfo, aPreviewFile); // info 
vector json data
 
 if (!bResult)
 {
@@ -398,7 +404,7 @@ void SearchAndParseThread::execute()
 
 if (m_bIsFirstLoading)
 {
-std::string sResponse = ucbGet(m_pAdditionsDialog->m_sURL);
+std::string sResponse = !m_bUITest ? 
ucbGet(m_pAdditionsDialog->m_sURL) : "";
 parseResponse(sResponse, m_pAdditionsDialog->m_aAllExtensionsVector);
 std::sort(m_pAdditionsDialog->m_aAllExtensionsVector.begin(),
   m_pAdditionsDialog->m_aAllExtensionsVector.end(),
diff --git a/cui/source/inc/AdditionsDialog.hxx 
b/cui/source/inc/AdditionsDialog.hxx
index 302d11bbc6ea..559a4ca911ff 100644
--- a/cui/source/inc/AdditionsDialog.hxx
+++ b/cui/source/inc/AdditionsDialog.hxx
@@ -138,6 +138,7 @@ private:
 AdditionsDialog* m_pAdditionsDialog;
 std::atomic m_bExecute;
 bool m_bIsFirstLoading;
+bool m_bUITest;
 
 void Search();
 void Append(AdditionInfo& additionInfo);


[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"))
 , 

[Libreoffice-commits] core.git: cui/source editeng/qa editeng/source include/svl include/svx sfx2/source starmath/source svl/Library_svl.mk svl/qa svl/source svx/source sw/qa sw/source vcl/source

2023-08-18 Thread Armin Le Grand (allotropia) (via logerrit)
 cui/source/dialogs/srchxtra.cxx |   20 +-
 cui/source/options/optgdlg.cxx  |1 
 editeng/qa/unit/core-test.cxx   |1 
 editeng/source/editeng/editattr.cxx |1 
 editeng/source/editeng/editdoc.cxx  |1 
 editeng/source/editeng/eerdll.cxx   |1 
 editeng/source/editeng/impedit2.cxx |1 
 include/svl/itemset.hxx |   18 ++
 include/svl/poolitem.hxx|   37 
 include/svl/voiditem.hxx|   53 ++
 include/svx/srchdlg.hxx |   22 +-
 sfx2/source/appl/appbas.cxx |1 
 sfx2/source/control/bindings.cxx|1 
 sfx2/source/control/sfxstatuslistener.cxx   |1 
 sfx2/source/control/shell.cxx   |1 
 sfx2/source/control/statcach.cxx|1 
 sfx2/source/statbar/stbitem.cxx |1 
 sfx2/source/toolbox/tbxitem.cxx |1 
 sfx2/source/view/lokhelper.cxx  |2 
 starmath/source/view.cxx|1 
 svl/Library_svl.mk  |1 
 svl/qa/unit/items/test_itempool.cxx |1 
 svl/source/items/itemset.cxx|  124 ++--
 svl/source/items/poolitem.cxx   |   60 +++
 svl/source/items/voiditem.cxx   |   59 +++
 svx/source/dialog/srchdlg.cxx   |   52 +++---
 svx/source/mnuctrls/clipboardctl.cxx|1 
 svx/source/stbctrls/zoomctrl.cxx|1 
 svx/source/svdraw/svdattr.cxx   |1 
 sw/qa/extras/tiledrendering/tiledrendering.cxx  |1 
 sw/source/core/bastyp/init.cxx  |1 
 sw/source/core/doc/DocumentContentOperationsManager.cxx |7 
 sw/source/uibase/app/apphdl.cxx |1 
 sw/source/uibase/app/applab.cxx |1 
 sw/source/uibase/lingu/olmenu.cxx   |1 
 sw/source/uibase/ribbar/workctrl.cxx|1 
 vcl/source/app/svapp.cxx|   19 ++
 37 files changed, 341 insertions(+), 157 deletions(-)

New commits:
commit c351f920c426542f0d3685bb9df1363d3a6393f8
Author: Armin Le Grand (allotropia) 
AuthorDate: Mon Aug 14 18:21:13 2023 +0200
Commit: Armin Le Grand 
CommitDate: Fri Aug 18 10:37:44 2023 +0200

ITEM: preparations for more/easier changes

This change is not about speed improvements but diverse
preparations to make changes/reading/understanding easier.
It does not change speed AFAIK.

Added a global static debug-only counter to allow getting
an overview over number of all allocated SfxPoolItem's
and the still alloated ones at office shutdown. The values
are used in Application::~Application to make a short info
statement. It allows to be able to quickly detect if an
error in future changes may lead to memory losses - these
would show in dramaitically higher numbers then (hopefully)
immediately.

Moved SfxVoidItem to own source/header.

Added container library interface support to SfxItemSet,
adapted already some methods to use it - not all possible,
I will commit & get status from gerrit 1st if all still works
and then continue.

Changed INVALID_POOL_ITEM from -1 to use a global unique
incarnation of an isolated derivation from SfxPoolItem. It
allows to avoid the (-1) pointer hack. Since still just
pointers are compared it's not worse. NOTE: That way, more
'special' SfxPoolItem's may be used for more States - a
candidate is e.g. SfxVoidItem(0) which represents ::DISABLED
state -- unfortunately not only, it is also used (mainly for
UI stuff) with 'real' WhichIDs - hard to sort out, will have
to stay that way for now AFAIK.

Changed INVALID_POOL_ITEM stuff to use a static extern
incarnated item in combination with a inline method
to return it, called GetGlobalStaticInvalidItemInstance().

Isolated create/cleanup of a SfxPoolItem entry in
SfxItemSet to further modularize/simplify that. It is
currently from constructor & destructor but already shows
that PoolDefaults are handled differently - probably an
error. Still, for now, do no change in behaviour (yet).

Got regular 'killed by the Kill-Wrapper' messages from
gerrit, seems to have to do with UITest_sw_findReplace.
That python/c++ scripting stuff is hard to debug, but
finally I identified the problem has to do with
the INVALID_POOL_ITEM change. It was in

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

2023-08-09 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/cuicharmap.cxx  |2 +-
 include/sfx2/charwin.hxx   |2 +-
 sfx2/source/control/charmapcontrol.cxx |   13 -
 3 files changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 13eb63f377f46a61bc763ab0f40eb6769dcefbb8
Author: Caolán McNamara 
AuthorDate: Wed Aug 9 09:53:11 2023 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 9 11:35:22 2023 +0200

Resolves: tdf#156661 only set a fixed height for the single row case

of the insert special character dialog. The character popdown uses
multiple rows instead.

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 4c4df2fe9cb3..03d1e8c90b53 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -58,7 +58,7 @@ SvxCharacterMap::SvxCharacterMap(weld::Widget* pParent, const 
SfxItemSet* pSet,
 , m_xVirDev(VclPtr::Create())
 , isSearchMode(true)
 , m_xFrame(std::move(xFrame))
-, m_aCharmapContents(*m_xBuilder, m_xVirDev)
+, m_aCharmapContents(*m_xBuilder, m_xVirDev, true)
 , m_aShowChar(m_xVirDev)
 , m_xOKBtn(m_xFrame.is() ? m_xBuilder->weld_button("insert") : 
m_xBuilder->weld_button("ok"))
 , m_xFontText(m_xBuilder->weld_label("fontft"))
diff --git a/include/sfx2/charwin.hxx b/include/sfx2/charwin.hxx
index 1e3672a9de4e..d0a8f86d2e51 100644
--- a/include/sfx2/charwin.hxx
+++ b/include/sfx2/charwin.hxx
@@ -92,7 +92,7 @@ class SFX2_DLLPUBLIC SfxCharmapContainer
 DECL_DLLPRIVATE_LINK(FavClearAllClickHdl, SvxCharView*, void);
 
 public:
-SfxCharmapContainer(weld::Builder& rBuilder, const VclPtr& 
rVirDev);
+SfxCharmapContainer(weld::Builder& rBuilder, const VclPtr& 
rVirDev, bool bLockGridSizes);
 
 voidinit(bool bHasInsert, const Link 
,
  const Link ,
diff --git a/sfx2/source/control/charmapcontrol.cxx 
b/sfx2/source/control/charmapcontrol.cxx
index ae3018ecd089..c71dbc8bb402 100644
--- a/sfx2/source/control/charmapcontrol.cxx
+++ b/sfx2/source/control/charmapcontrol.cxx
@@ -27,7 +27,7 @@
 
 using namespace css;
 
-SfxCharmapContainer::SfxCharmapContainer(weld::Builder& rBuilder, const 
VclPtr& rVirDev)
+SfxCharmapContainer::SfxCharmapContainer(weld::Builder& rBuilder, const 
VclPtr& rVirDev, bool bLockGridSizes)
 : m_aRecentCharView{SvxCharView(rVirDev),
 SvxCharView(rVirDev),
 SvxCharView(rVirDev),
@@ -95,9 +95,12 @@ SfxCharmapContainer::SfxCharmapContainer(weld::Builder& 
rBuilder, const VclPtrset_size_request(-1, 
m_aRecentCharView[0].get_preferred_size().Height());
-m_xFavGrid->set_size_request(-1, 
m_aFavCharView[0].get_preferred_size().Height());
+if (bLockGridSizes)
+{
+//so things don't jump around if all the children are hidden
+m_xRecentGrid->set_size_request(-1, 
m_aRecentCharView[0].get_preferred_size().Height());
+m_xFavGrid->set_size_request(-1, 
m_aFavCharView[0].get_preferred_size().Height());
+}
 }
 
 void SfxCharmapContainer::init(bool bHasInsert, const Link 
,
@@ -129,7 +132,7 @@ SfxCharmapCtrl::SfxCharmapCtrl(CharmapPopup* pControl, 
weld::Widget* pParent)
 : WeldToolbarPopup(pControl->getFrameInterface(), pParent, 
"sfx/ui/charmapcontrol.ui", "charmapctrl")
 , m_xControl(pControl)
 , m_xVirDev(VclPtr::Create())
-, m_aCharmapContents(*m_xBuilder, m_xVirDev)
+, m_aCharmapContents(*m_xBuilder, m_xVirDev, false)
 , m_xRecentLabel(m_xBuilder->weld_label("label2"))
 , m_xDlgBtn(m_xBuilder->weld_button("specialchardlg"))
 {


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

2023-07-27 Thread Andreas Heinisch (via logerrit)
 cui/source/dialogs/hltpbase.cxx   |   33 ++
 sw/qa/uitest/writer_tests3/hyperlinkdialog.py |   16 
 2 files changed, 45 insertions(+), 4 deletions(-)

New commits:
commit 89d3735e05b98223a49a387421386fd736fc3de6
Author: Andreas Heinisch 
AuthorDate: Wed Jul 26 10:31:56 2023 +0200
Commit: Andreas Heinisch 
CommitDate: Thu Jul 27 09:01:57 2023 +0200

tdf#146576 - Propose clipboard content when inserting a hyperlink

Change-Id: I30067b88b3d1e196f7ecfd150f5215cc93adf095
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154931
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 01776c80d25e..f2448460ee66 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -450,14 +450,39 @@ void SvxHyperlinkTabPageBase::Reset( const SfxItemSet& 
rItemSet)
 
 if ( pHyperlinkItem )
 {
+// tdf#146576 - propose clipboard content when inserting a hyperlink
+OUString aStrURL(pHyperlinkItem->GetURL());
+// Store initial URL
+maStrInitURL = aStrURL;
+if (aStrURL.isEmpty())
+{
+if (auto xClipboard = GetSystemClipboard())
+{
+if (auto xTransferable = xClipboard->getContents())
+{
+css::datatransfer::DataFlavor aFlavor;
+
SotExchange::GetFormatDataFlavor(SotClipboardFormatId::STRING, aFlavor);
+if (xTransferable->isDataFlavorSupported(aFlavor))
+{
+OUString aClipBoardConentent;
+if (xTransferable->getTransferData(aFlavor) >>= 
aClipBoardConentent)
+{
+INetURLObject aURL;
+aURL.SetSmartURL(aClipBoardConentent);
+if (!aURL.HasError())
+aStrURL
+= 
aURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
+}
+}
+}
+}
+}
+
 // set dialog-fields
 FillStandardDlgFields (pHyperlinkItem);
 
 // set all other fields
-FillDlgFields ( pHyperlinkItem->GetURL() );
-
-// Store initial URL
-maStrInitURL = pHyperlinkItem->GetURL();
+FillDlgFields(aStrURL);
 }
 }
 
diff --git a/sw/qa/uitest/writer_tests3/hyperlinkdialog.py 
b/sw/qa/uitest/writer_tests3/hyperlinkdialog.py
index 6390310810d5..531b5f42a866 100644
--- a/sw/qa/uitest/writer_tests3/hyperlinkdialog.py
+++ b/sw/qa/uitest/writer_tests3/hyperlinkdialog.py
@@ -105,6 +105,22 @@ class HyperlinkDialog(UITestCase):
 # i.e. the last used tab in the hyperlink dialog was not 
remembered
 self.assertEqual("1", get_state_as_dict(xTab)["CurrPagePos"])
 
+def test_tdf146576_propose_clipboard_content(self):
+with self.ui_test.create_doc_in_start_center("writer"):
+# Insert a sample URL
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"TEXT": 
"www.libreoffice.org"}))
+
+# Copy URL and open the hyperlink dialog
+self.xUITest.executeCommand(".uno:SelectAll")
+self.xUITest.executeCommand(".uno:Copy")
+with 
self.ui_test.execute_dialog_through_command(".uno:HyperlinkDialog", 
close_button="cancel") as xDialog:
+xTab = xDialog.getChild("tabcontrol")
+select_pos(xTab, "0")
+# Check if the content of the clipboard is proposed as URL in 
the hyperlink dialog
+xTarget = xDialog.getChild("target")
+self.assertEqual(get_state_as_dict(xTarget)["Text"].lower(), 
"http://www.libreoffice.org/;)
 
 def test_tdf141166(self):
 # Skip this test for --with-help=html and --with-help=online, as that 
would fail with a


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

2023-07-20 Thread Justin Luth (via logerrit)
 cui/source/options/optsave.cxx   |   11 +--
 include/svtools/restartdialog.hxx|3 ---
 svtools/source/dialogs/restartdialog.cxx |3 ---
 svtools/uiconfig/ui/restartdialog.ui |   19 ++-
 4 files changed, 3 insertions(+), 33 deletions(-)

New commits:
commit d795d147b644a9abdb9fb343dec5970e435b527b
Author: Justin Luth 
AuthorDate: Thu Jul 20 06:04:11 2023 -0400
Commit: Justin Luth 
CommitDate: Thu Jul 20 15:32:06 2023 +0200

Revert "tdf#149401 show "Restart LibreOffice" dialog changing AutoRecovery"

This reverts 7.4 commit 18cc891483fef63ad168273658a30bff72b87a95.

The bits are no longer used because all options in this dialog
apply immediately, thanks to tdf#65509 and even more so tdf#156308
(which are API changes that won't be backported - so 24.2+ only).

I didn't see any other option in this dialog that could have
benefitted from a restart request, and the scope of this
dialog is rather small, so no value in ignoring the dead code.

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

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index d7cbd61b366d..b257c43fa820 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -38,7 +38,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -239,7 +238,7 @@ void SvxSaveTabPage::DetectHiddenControls()
 bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 {
 auto xChanges = comphelper::ConfigurationChanges::create();
-bool bModified = false, bRequestRestart = false;
+bool bModified = false;
 if (m_xLoadViewPosAnyUserCB->get_state_changed_from_saved())
 {
 
officecfg::Office::Common::Load::ViewPositionForAnyUser::set(m_xLoadViewPosAnyUserCB->get_active(),
 xChanges);
@@ -348,14 +347,6 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 
aModuleOpt.SetFactoryDefaultFilter(SvtModuleOptions::EFactory::WRITERGLOBAL, 
pImpl->aDefaultArr[APP_WRITER_GLOBAL]);
 
 xChanges->commit();
-
-if (bRequestRestart)
-{
-OfaTreeOptionsDialog* 
pParentDlg(static_cast(GetDialogController()));
-if (pParentDlg)
-pParentDlg->SetNeedsRestart(svtools::RESTART_REASON_SAVE);
-}
-
 return bModified;
 }
 
diff --git a/include/svtools/restartdialog.hxx 
b/include/svtools/restartdialog.hxx
index 89178ad26e36..7de336c13b90 100644
--- a/include/svtools/restartdialog.hxx
+++ b/include/svtools/restartdialog.hxx
@@ -62,9 +62,6 @@ enum RestartReason {
 // For restructuring the Form menu,
 // %PRODUCTNAME must be restarted:
 RESTART_REASON_MSCOMPATIBLE_FORMS_MENU,
-// For the modified save settings to take effect,
-// %PRODUCTNAME must be restarted:
-RESTART_REASON_SAVE,
 // To apply changes, %PRODUCTNAME,
 // %PRODUCTNAME must be restarted:
 RESTART_REASON_UI_CHANGE,
diff --git a/svtools/source/dialogs/restartdialog.cxx 
b/svtools/source/dialogs/restartdialog.cxx
index e41ac165269d..8dc4357700ec 100644
--- a/svtools/source/dialogs/restartdialog.cxx
+++ b/svtools/source/dialogs/restartdialog.cxx
@@ -68,9 +68,6 @@ public:
 case svtools::RESTART_REASON_MSCOMPATIBLE_FORMS_MENU:
 reason_ = m_xBuilder->weld_widget("reason_mscompatible_formsmenu");
 break;
-case svtools::RESTART_REASON_SAVE:
-reason_ = m_xBuilder->weld_widget("reason_save");
-break;
 case svtools::RESTART_REASON_UI_CHANGE:
 reason_ = m_xBuilder->weld_widget("reason_uichange");
 break;
diff --git a/svtools/uiconfig/ui/restartdialog.ui 
b/svtools/uiconfig/ui/restartdialog.ui
index 89fc4340533c..d6076a3fe01b 100644
--- a/svtools/uiconfig/ui/restartdialog.ui
+++ b/svtools/uiconfig/ui/restartdialog.ui
@@ -258,21 +258,6 @@
 13
   
 
-
-  
-False
-True
-For the modified save settings to take 
effect, %PRODUCTNAME must be restarted.
-True
-50
-0
-  
-  
-False
-True
-14
-  
-
 
   
 True
@@ -284,7 +269,7 @@
   
 False
 True
-15
+14
   
 
 
@@ -299,7 +284,7 @@
   
 False
 True
-16
+15
   
 
   


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

2023-07-20 Thread Justin Luth (via logerrit)
 cui/source/options/optsave.cxx |2 +-
 framework/source/services/autorecovery.cxx |   12 
 2 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 97e5f7be679c9cc34d905987d08b62a67dde022c
Author: Justin Luth 
AuthorDate: Wed Jul 19 20:39:58 2023 -0400
Commit: Justin Luth 
CommitDate: Thu Jul 20 11:48:48 2023 +0200

tdf#65509 autosave: apply UserAutoSave without restarting

Now that I know there is a config listener running in AutoRecovery,
listen for the config change and apply it immediately
instead of requesting the user to do a restart.

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

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index e63bab701926..d7cbd61b366d 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -301,7 +301,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 {
 rSet->Put( SfxBoolItem( SID_ATTR_USERAUTOSAVE,
m_xUserAutoSaveCB->get_active() ) );
-bModified = bRequestRestart = true;
+bModified = true;
 }
 // save relatively
 if ( m_xRelativeFsysCB->get_state_changed_from_saved() )
diff --git a/framework/source/services/autorecovery.cxx 
b/framework/source/services/autorecovery.cxx
index b1abcf5e9982..f325a45788a2 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -998,6 +998,7 @@ private:
 constexpr OUStringLiteral CFG_PACKAGE_RECOVERY = 
u"/org.openoffice.Office.Recovery";
 
 const char CFG_ENTRY_AUTOSAVE_ENABLED[] = "AutoSave/Enabled";
+const char CFG_ENTRY_AUTOSAVE_USERAUTOSAVE_ENABLED[] = 
"AutoSave/UserAutoSaveEnabled";
 
 constexpr OUStringLiteral CFG_ENTRY_REALDEFAULTFILTER = 
u"ooSetupFactoryActualFilter";
 
@@ -1639,6 +1640,17 @@ void SAL_CALL AutoRecovery::changesOccurred(const 
css::util::ChangesEvent& aEven
 }
 }
 }
+else if (sPath == CFG_ENTRY_AUTOSAVE_USERAUTOSAVE_ENABLED)
+{
+bool bEnabled = false;
+if (pChanges[i].Element >>= bEnabled)
+{
+if (bEnabled)
+m_eJob |= Job::UserAutoSave;
+else
+m_eJob &= ~Job::UserAutoSave;
+}
+}
 }
 
 } /* SAFE */


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

2023-07-19 Thread Justin Luth (via logerrit)
 cui/source/options/optsave.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 896f19764abf9301169bf9631877bdae075edde4
Author: Justin Luth 
AuthorDate: Wed Jul 19 20:16:40 2023 -0400
Commit: Justin Luth 
CommitDate: Thu Jul 20 03:26:49 2023 +0200

tdf#156308 autosave: re-listening to config, no restart requests

The reason the restart request was added was because of the
broken config. Now that the config is correct again,
the listener notices the enable change and turns AutoSave on/off
immediately. So there is no need to prompt the user to restart
after modifying the setting in Tools - Options.

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

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index b60fe8da2594..e63bab701926 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -281,7 +281,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 {
 rSet->Put( SfxBoolItem( SID_ATTR_AUTOSAVE,
m_xAutoSaveCB->get_active() ) );
-bModified = bRequestRestart = true;
+bModified = true;
 }
 if ( m_xWarnAlienFormatCB->get_state_changed_from_saved() )
 {


[Libreoffice-commits] core.git: cui/source include/sfx2 include/svl sfx2/source svl/Library_svl.mk svl/source sw/source

2023-07-18 Thread Mike Kaganski (via logerrit)
 cui/source/inc/page.hxx |1 
 include/sfx2/app.hxx|2 
 include/sfx2/sfxsids.hrc|9 -
 include/svl/aeitem.hxx  |   46 -
 sfx2/source/appl/appcfg.cxx |  191 
 sfx2/source/appl/appserv.cxx|2 
 svl/Library_svl.mk  |1 
 svl/source/items/aeitem.cxx |   69 --
 svl/source/items/poolitem.cxx   |1 
 sw/source/uibase/app/apphdl.cxx |   10 --
 10 files changed, 4 insertions(+), 328 deletions(-)

New commits:
commit 519876dffdc8c93710af543cc11332dab9a50c14
Author: Mike Kaganski 
AuthorDate: Tue Jul 18 23:45:47 2023 +0300
Commit: Mike Kaganski 
CommitDate: Wed Jul 19 03:59:17 2023 +0200

Cleanup SfxApplication::Get/SetOptions, and drop unused SIDs

The removed stuff was never used elsewhere; e.g. all uses of GetOptions
use Which Ranges that don't include the removed identifiers. Elements
removed from SetOptions weren't passed to that function from anywhere.

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

diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index 3d3ccff65ab2..151569ac4634 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -38,7 +38,6 @@
 :  
 :   
 :   
-:   
 :  
 :  
 :  
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 5ed6fbc0dc57..09ddd082db31 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -164,7 +164,7 @@ public:
 SAL_DLLPRIVATE SfxDispatcher* GetAppDispatcher_Impl();
 SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl();
 
-SAL_DLLPRIVATE void SetOptions_Impl(const SfxItemSet &);
+SAL_DLLPRIVATE static void  SetOptions_Nbc(const SfxItemSet &);
 SAL_DLLPRIVATE void Initialize_Impl();
 
 SAL_DLLPRIVATE SfxAppData_Impl* Get_Impl() const { return pImpl.get(); }
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index e1d1cbca869c..b88b778714a8 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -23,7 +23,6 @@
 #include 
 #include 
 
-class SfxAllEnumItem;
 class SfxBoolItem;
 class SfxDocumentInfoItem;
 class SfxEventNamesItem;
@@ -530,23 +529,16 @@ class SvxZoomItem;
 #define SID_ATTR_AUTOSAVE   
TypedWhichId(SID_OPTIONS_START +  3)
 #define SID_ATTR_USERAUTOSAVE   
TypedWhichId(SID_OPTIONS_START +  4)
 #define SID_ATTR_AUTOSAVEMINUTE 
TypedWhichId(SID_OPTIONS_START +  5)
-#define SID_ATTR_WORKINGSET 
TypedWhichId(SID_OPTIONS_START + 13)
 #define SID_ATTR_UNDO_COUNT 
TypedWhichId(SID_OPTIONS_START + 16)
-// unused
-#define SID_ATTR_SAVEDOCVIEW
TypedWhichId(SID_OPTIONS_START + 18)
 
 // GeneralTabPage
 
 #define SID_ATTR_METRIC 
TypedWhichId(SID_OPTIONS_START +  8)
 #define SID_ATTR_DEFTABSTOP 
TypedWhichId(SID_OPTIONS_START + 14)
-#define SID_ATTR_BUTTON_BIGSIZE 
TypedWhichId(SID_OPTIONS_START + 63)
 #define SID_ATTR_QUICKLAUNCHER  
TypedWhichId(SID_OPTIONS_START + 74)
 #define SID_ATTR_YEAR2000   
TypedWhichId(SID_OPTIONS_START + 87)
 #define SID_ATTR_APPLYCHARUNIT  
TypedWhichId(SID_OPTIONS_START + 88)
 
-// PathTabPage
-#define SID_ATTR_PATHNAME   
TypedWhichId(SID_OPTIONS_START + 11)
-
 // LinguTabPage
 #define SID_ATTR_LANGUAGE   
TypedWhichId(SID_OPTIONS_START +  7)
 #define SID_ATTR_HYPHENREGION   
TypedWhichId(SID_OPTIONS_START + 12)
@@ -577,7 +569,6 @@ class SvxZoomItem;
 #define SID_OPT_LOCALE_CHANGED  
TypedWhichId(SID_OPTIONS_START + 94)
 //middle mouse button
 #define SID_ATTR_PRETTYPRINTING 
TypedWhichId(SID_OPTIONS_START + 98)
-#define SID_HELP_STYLESHEET 
TypedWhichId(SID_OPTIONS_START + 99)
 
 // slot IDs from SVX (svxids.hrc) -
 // These SID_SVX_START entries came from include/svx/svxids.hrc, avoid
diff --git a/include/svl/aeitem.hxx b/include/svl/aeitem.hxx
deleted file mode 100644
index d8a44486b1f6..
--- a/include/svl/aeitem.hxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file 

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

[Libreoffice-commits] core.git: cui/source framework/source officecfg/registry officecfg/util sd/source sfx2/source

2023-07-17 Thread Mike Kaganski (via logerrit)
 cui/source/options/optsave.cxx   |8 +--
 framework/source/services/autorecovery.cxx   |   18 ---
 officecfg/registry/schema/org/openoffice/Office/Common.xcs   |   21 -
 officecfg/registry/schema/org/openoffice/Office/Recovery.xcs |   25 +--
 officecfg/util/sanity.xsl|2 
 sd/source/ui/slideshow/slideshowimpl.cxx |4 -
 sfx2/source/appl/appcfg.cxx  |   12 ++---
 7 files changed, 38 insertions(+), 52 deletions(-)

New commits:
commit 3c41b32562d5ccdd306000484c5b16245b2b4a4f
Author: Mike Kaganski 
AuthorDate: Sun Jul 16 18:17:21 2023 +0300
Commit: Mike Kaganski 
CommitDate: Mon Jul 17 21:14:24 2023 +0200

tdf#156308: Restore use of /org.openoffice.Office.Recovery/AutoSave

... instead of respective values from 
/org.openoffice.Office.Common/Save/Document

The history of the problem:

d0f9685d2cfc3927add412b276c804dcc20cb6a5 (2004-11-26)
  made SvtSaveOptions use org.openoffice.Office.Recovery/AutoSave,
  *in addition* to org.openoffice.Office.Common/Save/Document/*,
  as "forward AutoSave/AutoSaveTime to new config location" part
  of i#27726; at this point, org.openoffice.Office.Recovery/AutoSave/*
  took precedence (they were read last).

8e6031e126782ced6d7527b19cf817395e9b63e4 (2004-11-26)
  implemented autorecovery.cxx, already reading
  org.openoffice.Office.Recovery/AutoSave/*

d5b9283985633fdb423269cab961bba2acc3539e (2021-07-25)
  made SvxSaveTabPage and SfxApplication::SetOptions_Impl use
  officecfg::Office::Common::Save::Document::* instead of
  SvtSaveOptions.

134f40136a9bea265d8f2fedfdb41a1e65d81b49 (2021-07-25)
  dropped SvtSaveOptions_Impl::ImplCommit, and its saving of
  officecfg::Office::Recovery::AutoSave::* (which likely
  detached officecfg::Office::Recovery::AutoSave from
  officecfg::Office::Common::Save::Document, making UI edits
  not stored to the former).

aeb8a0076cd5ec2836b3dfc1adffcced432f995f (2022-05-23)
  made AutoRecovery::implts_readAutoSaveConfig read
  officecfg::Office::Common::Save::Document::* instead of
  proper officecfg::Office::Recovery::AutoSave::*.

This change restores the intended use, and deprecates corresponding
values in /org.openoffice.Office.Common/Save/Document.

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

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 2772c6d60944..743c6015b1d5 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -475,8 +475,8 @@ 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_xAutoSaveCB->set_active(officecfg::Office::Common::Save::Document::AutoSave::get());
-
m_xAutoSaveCB->set_sensitive(!officecfg::Office::Common::Save::Document::AutoSave::isReadOnly());
+
m_xAutoSaveCB->set_active(officecfg::Office::Recovery::AutoSave::Enabled::get());
+
m_xAutoSaveCB->set_sensitive(!officecfg::Office::Recovery::AutoSave::Enabled::isReadOnly());
 
 
m_xUserAutoSaveCB->set_active(officecfg::Office::Recovery::AutoSave::UserAutoSaveEnabled::get());
 
m_xUserAutoSaveCB->set_sensitive(!officecfg::Office::Recovery::AutoSave::UserAutoSaveEnabled::isReadOnly());
@@ -484,8 +484,8 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 
m_xWarnAlienFormatCB->set_active(officecfg::Office::Common::Save::Document::WarnAlienFormat::get());
 
m_xWarnAlienFormatCB->set_sensitive(!officecfg::Office::Common::Save::Document::WarnAlienFormat::isReadOnly());
 
-
m_xAutoSaveEdit->set_value(officecfg::Office::Common::Save::Document::AutoSaveTimeIntervall::get());
-
m_xAutoSaveEdit->set_sensitive(!officecfg::Office::Common::Save::Document::AutoSaveTimeIntervall::isReadOnly());
+
m_xAutoSaveEdit->set_value(officecfg::Office::Recovery::AutoSave::TimeIntervall::get());
+
m_xAutoSaveEdit->set_sensitive(!officecfg::Office::Recovery::AutoSave::TimeIntervall::isReadOnly());
 
 // save relatively
 
m_xRelativeFsysCB->set_active(officecfg::Office::Common::Save::URL::FileSystem::get());
diff --git a/framework/source/services/autorecovery.cxx 
b/framework/source/services/autorecovery.cxx
index 07ea3184476f..a1a984e7617e 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -386,11 +386,6 @@ private:
 bool m_bListenForDocEvents;
 bool m_bListenForConfigChanges;
 
-/** @short  specify the time interval between two save actions.
-@descr  tools::Time 

[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 framework/source

2023-07-12 Thread Justin Luth (via logerrit)
 cui/source/options/optsave.cxx |2 +-
 framework/source/services/autorecovery.cxx |   15 +--
 2 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit d36ae6786e05deda7e78338d36624af371e7a3ed
Author: Justin Luth 
AuthorDate: Wed Jul 12 11:59:44 2023 -0400
Commit: Justin Luth 
CommitDate: Thu Jul 13 00:51:10 2023 +0200

tdf#65509 apply new AutoRecovery timeInterval without restarting

Another option would be to listen for config changes I guess.

However, this alternative method of setting the timer interval
(which I assume is related to Impress slideshows, but couldn't reproduce)
is basically never used.

At worst (in case this alternative method sets a non-zero time)
it will be the same as before where a restart is needed to
gain the new time.

I'm not worried about having the user wait for the current
timer to run out (in 10 minutes based on the default state)
before their new time kicks in.

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

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 56e0f4486730..c35da388ebf9 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -283,7 +283,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 {
 rSet->Put( SfxUInt16Item( SID_ATTR_AUTOSAVEMINUTE,
  
static_cast(m_xAutoSaveEdit->get_value()) ) );
-bModified = bRequestRestart = true;
+bModified = true;
 }
 
 if ( m_xUserAutoSaveCB->get_state_changed_from_saved() )
diff --git a/framework/source/services/autorecovery.cxx 
b/framework/source/services/autorecovery.cxx
index c9e7d62cc5f9..ddeeab2c23c5 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1780,15 +1780,6 @@ void AutoRecovery::implts_readAutoSaveConfig()
 m_eTimerType  = AutoRecovery::E_DONT_START_TIMER;
 }
 } /* SAFE */
-
-// AutoSaveTimeIntervall [int] in min
-sal_Int32 nTimeIntervall(
-
officecfg::Office::Common::Save::Document::AutoSaveTimeIntervall::get());
-
-/* SAFE */ {
-osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
-m_nAutoSaveTimeIntervall = nTimeIntervall;
-} /* SAFE */
 }
 
 void AutoRecovery::implts_readConfig()
@@ -2216,7 +2207,11 @@ void AutoRecovery::implts_updateTimer()
 
 if (m_eTimerType == AutoRecovery::E_NORMAL_AUTOSAVE_INTERVALL)
 {
-nMilliSeconds = (m_nAutoSaveTimeIntervall*6); // [min] => 60.000 ms
+nMilliSeconds
+= m_nAutoSaveTimeIntervall
+  ? m_nAutoSaveTimeIntervall
+  : 
officecfg::Office::Common::Save::Document::AutoSaveTimeIntervall::get();
+nMilliSeconds *= 6; // [min] => 60.000 ms
 }
 else if (m_eTimerType == AutoRecovery::E_POLL_FOR_USER_IDLE)
 {


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

2023-07-12 Thread Justin Luth (via logerrit)
 cui/source/customize/CustomNotebookbarGenerator.cxx |6 +-
 cui/source/customize/SvxNotebookbarConfigPage.cxx   |   13 +
 2 files changed, 14 insertions(+), 5 deletions(-)

New commits:
commit 24e02d55b7602f0f3bc74656ecec54635ab09f96
Author: Justin Luth 
AuthorDate: Sat Jul 8 11:29:11 2023 -0400
Commit: Justin Luth 
CommitDate: Wed Jul 12 21:17:11 2023 +0200

related tdf#148121 no custom notebookbar.ui file unless modified

Copying the default notebookbar.ui into the user folder
means that any future changes in future versions of LO
will not be seen by the user until they again reset the notebookbar.

Only if the user actually makes a modification
should the file be created in the user's config folder.

Certainly just opening tools - customize - notebookbar
should not condemn the user to be stuck on some old
configuration of the notebookbar.

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

diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx 
b/cui/source/customize/CustomNotebookbarGenerator.cxx
index bae85525ebd6..ba5d881822fd 100644
--- a/cui/source/customize/CustomNotebookbarGenerator.cxx
+++ b/cui/source/customize/CustomNotebookbarGenerator.cxx
@@ -184,7 +184,11 @@ static xmlDocPtr notebookbarXMLParser(const OString& 
rDocName, const OString& rU
 
 void CustomNotebookbarGenerator::modifyCustomizedUIFile(const 
Sequence& sUIItemProperties)
 {
-OString sCustomizedUIPath = getSystemPath(getCustomizedUIPath());
+const OUString sUIPath = getCustomizedUIPath();
+if (osl::File(sUIPath).open(osl_File_OpenFlag_Read) != 
osl::FileBase::E_None)
+createCustomizedUIFile();
+
+const OString sCustomizedUIPath = getSystemPath(sUIPath);
 for (auto const& aValue : sUIItemProperties)
 {
 std::vector aProperties(aUIPropertiesCount);
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx 
b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index 74e2e8009192..f44bc70d3dc0 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -142,7 +142,6 @@ void SvxNotebookbarConfigPage::Init()
 m_xTopLevelListBox->clear();
 m_xContentsListBox->clear();
 m_xSaveInListBox->clear();
-CustomNotebookbarGenerator::createCustomizedUIFile();
 OUString sNotebookbarInterface = getFileName(m_sFileName);
 
 OUString sScopeName
@@ -181,9 +180,8 @@ short SvxNotebookbarConfigPage::QueryReset()
 int nValue = xQueryBox->run();
 if (nValue == RET_YES)
 {
-OUString sOriginalUIPath = 
CustomNotebookbarGenerator::getOriginalUIPath();
-OUString sCustomizedUIPath = 
CustomNotebookbarGenerator::getCustomizedUIPath();
-osl::File::copy(sOriginalUIPath, sCustomizedUIPath);
+osl::File::remove(CustomNotebookbarGenerator::getCustomizedUIPath());
+
 OUString sNotebookbarInterface = getFileName(m_sFileName);
 Sequence sSequenceEntries;
 CustomNotebookbarGenerator::setCustomizedUIItem(sSequenceEntries, 
sNotebookbarInterface);
@@ -396,6 +394,13 @@ void SvxNotebookbarConfigPage::SelectElement()
 OString sUIFileUIPath = CustomNotebookbarGenerator::getSystemPath(
 CustomNotebookbarGenerator::getCustomizedUIPath());
 xmlDocPtr pDoc = xmlParseFile(sUIFileUIPath.getStr());
+if (!pDoc)
+{
+sUIFileUIPath = CustomNotebookbarGenerator::getSystemPath(
+CustomNotebookbarGenerator::getOriginalUIPath());
+pDoc = xmlParseFile(sUIFileUIPath.getStr());
+}
+
 if (!pDoc)
 return;
 xmlNodePtr pNodePtr = xmlDocGetRootElement(pDoc);


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

[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("");
 }
 
+

[Libreoffice-commits] core.git: cui/source download.lst external/zxing

2023-07-11 Thread Taichi Haradaguchi (via logerrit)
 cui/source/dialogs/QrCodeGenDialog.cxx   |   11 ++-
 download.lst |4 ++--
 external/zxing/StaticLibrary_zxing.mk|   22 +++---
 external/zxing/UnpackedTarball_zxing.mk  |3 ---
 external/zxing/inc/pch/precompiled_zxing.hxx |3 ++-
 external/zxing/invalid_argument.patch.1  |   22 --
 external/zxing/no_sanitize_ignored.patch.0   |   24 
 external/zxing/undeprecate-warning.patch.0   |   14 --
 8 files changed, 25 insertions(+), 78 deletions(-)

New commits:
commit 09c6ef36f43a9c7cc594c7e2d4044fee41a96406
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Sat Jul 8 23:50:10 2023 +0900
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Tue Jul 11 12:44:02 2023 +0200

zxing-cpp: upgrade to release 2.1.0

- remove external/zxing/invalid_argument.patch.1 and
  external/zxing/no_sanitize_ignored.patch.0, no longer needed in 2.1.0.

- If "Utf.h" can be included, use ZXing::FromUtf8() instaed of
  ZXing::TextUtfEncoding::FromUtf8().
  This makes external/zxing/undeprecate-warning.patch.0 unnecessary.

Change-Id: I06acebb623aa8b60c5d2e5f7f265998571d75a89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154221
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
index 887ccaf44de4..0058ea362128 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -29,7 +29,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #ifdef __GNUC__
 #pragma GCC diagnostic pop
@@ -39,6 +38,12 @@
 #include 
 #endif
 
+#if __has_include()
+#include 
+#else
+#include 
+#endif
+
 #endif // ENABLE_ZXING
 
 #include 
@@ -148,7 +153,11 @@ OString GenerateQRCode(std::u16string_view aQRText, 
tools::Long aQRECC, int aQRB
 ZXing::BarcodeFormat format = 
ZXing::BarcodeFormatFromString(GetBarCodeType(aQRType));
 auto writer = 
ZXing::MultiFormatWriter(format).setMargin(aQRBorder).setEccLevel(bqrEcc);
 writer.setEncoding(ZXing::CharacterSet::UTF8);
+#if __has_include()
+ZXing::BitMatrix bitmatrix = writer.encode(ZXing::FromUtf8(QRText), 0, 0);
+#else
 ZXing::BitMatrix bitmatrix = 
writer.encode(ZXing::TextUtfEncoding::FromUtf8(QRText), 0, 0);
+#endif
 #if HAVE_ZXING_TOSVG
 return OString(ZXing::ToSVG(bitmatrix));
 #else
diff --git a/download.lst b/download.lst
index 90d2341fefa7..18cba62be184 100644
--- a/download.lst
+++ b/download.lst
@@ -565,8 +565,8 @@ ZMF_TARBALL := libzmf-0.0.2.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-ZXING_SHA256SUM := 
12b76b7005c30d34265fc20356d340da179b0b4d43d2c1b35bcca86776069f76
-ZXING_TARBALL := zxing-cpp-2.0.0.tar.gz
+ZXING_SHA256SUM := 
6d54e403592ec7a143791c6526c1baafddf4c0897bb49b1af72b70a0f0c4a3fe
+ZXING_TARBALL := zxing-cpp-2.1.0.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/zxing/StaticLibrary_zxing.mk 
b/external/zxing/StaticLibrary_zxing.mk
index 431d523a49b3..f9d031e35541 100644
--- a/external/zxing/StaticLibrary_zxing.mk
+++ b/external/zxing/StaticLibrary_zxing.mk
@@ -79,29 +79,29 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,zxing,\
UnpackedTarball/zxing/core/src/oned/ODDataBarReader \
UnpackedTarball/zxing/core/src/oned/ODEAN8Writer \
UnpackedTarball/zxing/core/src/oned/ODEAN13Writer \
-   UnpackedTarball/zxing/core/src/oned/ODITFWriter \
UnpackedTarball/zxing/core/src/oned/ODITFReader \
+   UnpackedTarball/zxing/core/src/oned/ODITFWriter \
UnpackedTarball/zxing/core/src/oned/ODMultiUPCEANReader \
+   UnpackedTarball/zxing/core/src/oned/ODUPCEANCommon \
UnpackedTarball/zxing/core/src/oned/ODUPCAWriter \
UnpackedTarball/zxing/core/src/oned/ODUPCEWriter \
-   UnpackedTarball/zxing/core/src/oned/ODUPCEANCommon \
UnpackedTarball/zxing/core/src/oned/ODRowReader \
UnpackedTarball/zxing/core/src/oned/ODReader \
UnpackedTarball/zxing/core/src/oned/ODWriterHelper \
+   UnpackedTarball/zxing/core/src/pdf417/PDFBarcodeValue \
+   UnpackedTarball/zxing/core/src/pdf417/PDFBoundingBox \
UnpackedTarball/zxing/core/src/pdf417/PDFCodewordDecoder \
-   UnpackedTarball/zxing/core/src/pdf417/PDFHighLevelEncoder \
+   UnpackedTarball/zxing/core/src/pdf417/PDFDecoder \
+   UnpackedTarball/zxing/core/src/pdf417/PDFDetector \
+   UnpackedTarball/zxing/core/src/pdf417/PDFDetectionResult \
UnpackedTarball/zxing/core/src/pdf417/PDFDetectionResultColumn \
+   UnpackedTarball/zxing/core/src/pdf417/PDFEncoder \
+   UnpackedTarball/zxing/core/src/pdf417/PDFHighLevelEncoder \
+   UnpackedTarball/zxing/core/src/pdf417/PDFModulusGF \
+   

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

2023-07-07 Thread Michael Stahl (via logerrit)
 cui/source/dialogs/dlgname.cxx   |   13 +
 include/cui/dlgname.hxx  |4 
 sw/source/ui/frmdlg/frmpage.cxx  |   14 ++
 sw/source/uibase/inc/frmpage.hxx |2 ++
 4 files changed, 33 insertions(+)

New commits:
commit 04e90103b9a031af4073967228c6ccfc59438ec0
Author: Michael Stahl 
AuthorDate: Fri Jul 7 13:32:34 2023 +0200
Commit: Michael Stahl 
CommitDate: Fri Jul 7 15:45:09 2023 +0200

tdf#152484 cui,sw: if decorative is enabled, disable title/description

... in sw Frame Properties dialog and cui SvxObjectTitleDescDialog.

Reportedly Word behaves weirdly if decorative is set and a description
exists at the same time.

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

diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index 84f21a86d616..fa12a158445f 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -90,7 +90,9 @@ 
SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(weld::Window* pParent, const
const OUString& 
rDescription,
bool const isDecorative)
 : GenericDialogController(pParent, "cui/ui/objecttitledescdialog.ui", 
"ObjectTitleDescDialog")
+, m_xTitleFT(m_xBuilder->weld_label("object_title_label"))
 , m_xEdtTitle(m_xBuilder->weld_entry("object_title_entry"))
+, m_xDescriptionFT(m_xBuilder->weld_label("desc_label"))
 , m_xEdtDescription(m_xBuilder->weld_text_view("desc_entry"))
 , m_xDecorativeCB(m_xBuilder->weld_check_button("decorative"))
 {
@@ -104,6 +106,17 @@ 
SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(weld::Window* pParent, const
 m_xEdtTitle->select_region(0, -1);
 
 m_xDecorativeCB->set_active(isDecorative);
+m_xDecorativeCB->connect_toggled(LINK(this, SvxObjectTitleDescDialog, 
DecorativeHdl));
+DecorativeHdl(*m_xDecorativeCB);
+}
+
+IMPL_LINK_NOARG(SvxObjectTitleDescDialog, DecorativeHdl, weld::Toggleable&, 
void)
+{
+bool const bEnable(!m_xDecorativeCB->get_active());
+m_xEdtTitle->set_sensitive(bEnable);
+m_xTitleFT->set_sensitive(bEnable);
+m_xEdtDescription->set_sensitive(bEnable);
+m_xDescriptionFT->set_sensitive(bEnable);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/cui/dlgname.hxx b/include/cui/dlgname.hxx
index 2ca8a8a55e29..9083177ee980 100644
--- a/include/cui/dlgname.hxx
+++ b/include/cui/dlgname.hxx
@@ -105,13 +105,17 @@ class SvxObjectTitleDescDialog final : public 
weld::GenericDialogController
 {
 private:
 // title
+std::unique_ptr m_xTitleFT;
 std::unique_ptr m_xEdtTitle;
 
 // description
+std::unique_ptr m_xDescriptionFT;
 std::unique_ptr m_xEdtDescription;
 
 std::unique_ptr m_xDecorativeCB;
 
+DECL_LINK(DecorativeHdl, weld::Toggleable&, void);
+
 public:
 // constructor
 SvxObjectTitleDescDialog(weld::Window* pWindow, const OUString& rTitle, 
const OUString& rDesc,
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 19bed7ba0476..352dc15df463 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2860,6 +2860,7 @@ SwFrameAddPage::SwFrameAddPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xNameED(m_xBuilder->weld_entry("name"))
 , m_xAltNameFT(m_xBuilder->weld_label("altname_label"))
 , m_xAltNameED(m_xBuilder->weld_entry("altname"))
+, m_xDescriptionFT(m_xBuilder->weld_label("description_label"))
 , m_xDescriptionED(m_xBuilder->weld_text_view("description"))
 , m_xDecorativeCB(m_xBuilder->weld_check_button("decorative"))
 , m_xSequenceFrame(m_xBuilder->weld_widget("frmSequence"))
@@ -2884,6 +2885,8 @@ SwFrameAddPage::SwFrameAddPage(weld::Container* pPage, 
weld::DialogController* p
 m_xTextFlowLB->append(SvxFrameDirection::Vertical_LR_BT, 
SvxResId(RID_SVXSTR_PAGEDIR_LTR_BTT_VERT));
 m_xTextFlowLB->append(SvxFrameDirection::Environment, 
SvxResId(RID_SVXSTR_FRAMEDIR_SUPER));
 m_xDescriptionED->set_size_request(-1, 
m_xDescriptionED->get_preferred_size().Height());
+
+m_xDecorativeCB->connect_toggled(LINK(this, SwFrameAddPage, 
DecorativeHdl));
 }
 
 SwFrameAddPage::~SwFrameAddPage()
@@ -3090,6 +3093,8 @@ void SwFrameAddPage::Reset(const SfxItemSet *rSet )
 m_xVertAlignLB->set_active(nPos);
 }
 m_xVertAlignLB->save_value();
+
+DecorativeHdl(*m_xDecorativeCB);
 }
 
 bool SwFrameAddPage::FillItemSet(SfxItemSet *rSet)
@@ -3178,6 +3183,15 @@ IMPL_LINK_NOARG(SwFrameAddPage, EditModifyHdl, 
weld::Entry&, void)
 m_xAltNameFT->set_sensitive(bEnable);
 }
 
+IMPL_LINK_NOARG(SwFrameAddPage, DecorativeHdl, weld::Toggleable&, void)
+{
+bool const bEnable(!m_xDecorativeCB->get_active());
+m_xAltNameED->set_sensitive(bEnable);
+

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

2023-07-05 Thread Noel Grandin (via logerrit)
 cui/source/options/optgdlg.cxx   |4 ++--
 include/svl/cjkoptions.hxx   |   14 +-
 svl/source/config/cjkoptions.cxx |   30 --
 3 files changed, 11 insertions(+), 37 deletions(-)

New commits:
commit 082993c38e68089282b42fdb46179ac2574d61d5
Author: Noel Grandin 
AuthorDate: Wed Jul 5 13:13:48 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Jul 5 18:55:40 2023 +0200

SvtCJKOptions::EOption is unused

ever since

commit 5db72ef0b381671b7867bda759098a92909e06d8
Author: Noel Grandin 
Date:   Mon Jul 26 13:51:57 2021 +0200
drop SvtLanguageOptions class

Change-Id: I2d56b0c21510239ef1ee1d0b95748641d485580c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154053
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index ecd671ef2c31..64d11a62451b 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1165,7 +1165,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* 
pPage, weld::DialogCon
 m_bOldAsian = SvtCJKOptions::IsAnyEnabled();
 m_xAsianSupportCB->set_active(m_bOldAsian);
 m_xAsianSupportCB->save_state();
-bool bReadonly = SvtCJKOptions::IsReadOnly(SvtCJKOptions::E_ALL);
+bool bReadonly = SvtCJKOptions::IsAnyReadOnly();
 m_xAsianSupportCB->set_sensitive(!bReadonly);
 SupportHdl(*m_xAsianSupportCB);
 
@@ -1651,7 +1651,7 @@ IMPL_LINK_NOARG(OfaLanguagesTabPage, LocaleSettingHdl, 
weld::ComboBox&, void)
 }
 // second check if CJK must be enabled
 // #103299# - if CJK support is not readonly
-if(!SvtCJKOptions::IsReadOnly(SvtCJKOptions::E_ALL))
+if(!SvtCJKOptions::IsAnyReadOnly())
 {
 bool bIsCJKFixed = bool(nType & SvtScriptType::ASIAN);
 lcl_checkLanguageCheckBox(*m_xAsianSupportCB, bIsCJKFixed, 
m_bOldAsian);
diff --git a/include/svl/cjkoptions.hxx b/include/svl/cjkoptions.hxx
index 9ac227541b91..cec2f035b780 100644
--- a/include/svl/cjkoptions.hxx
+++ b/include/svl/cjkoptions.hxx
@@ -22,18 +22,6 @@
 
 namespace SvtCJKOptions
 {
-enum EOption
-{
-E_CJKFONT,
-E_VERTICALTEXT,
-E_ASIANTYPOGRAPHY,
-E_JAPANESEFIND,
-E_RUBY,
-E_CHANGECASEMAP,
-E_DOUBLELINES,
-E_ALL // special one for IsAnyEnabled()/SetAll() functionality
-};
-
 SVL_DLLPUBLIC bool IsCJKFontEnabled();
 SVL_DLLPUBLIC bool IsVerticalTextEnabled();
 SVL_DLLPUBLIC bool IsAsianTypographyEnabled();
@@ -44,7 +32,7 @@ SVL_DLLPUBLIC bool IsDoubleLinesEnabled();
 
 SVL_DLLPUBLIC void SetAll(bool bSet);
 SVL_DLLPUBLIC bool IsAnyEnabled();
-SVL_DLLPUBLIC bool IsReadOnly(EOption eOption);
+SVL_DLLPUBLIC bool IsAnyReadOnly();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/config/cjkoptions.cxx b/svl/source/config/cjkoptions.cxx
index 72e5c8ea2a3d..e43d379f7e66 100644
--- a/svl/source/config/cjkoptions.cxx
+++ b/svl/source/config/cjkoptions.cxx
@@ -105,30 +105,16 @@ boolIsAnyEnabled()
 IsRubyEnabled() || IsChangeCaseMapEnabled() || 
IsDoubleLinesEnabled() ;
 }
 
-boolIsReadOnly(EOption eOption)
+boolIsAnyReadOnly()
 {
 SvtCJKOptions_Load();
-switch (eOption)
-{
-case E_CJKFONT: return 
officecfg::Office::Common::I18N::CJK::CJKFont::isReadOnly();
-case E_VERTICALTEXT: return 
officecfg::Office::Common::I18N::CJK::VerticalText::isReadOnly();
-case E_ASIANTYPOGRAPHY: return 
officecfg::Office::Common::I18N::CJK::AsianTypography::isReadOnly();
-case E_JAPANESEFIND: return 
officecfg::Office::Common::I18N::CJK::JapaneseFind::isReadOnly();
-case E_RUBY: return 
officecfg::Office::Common::I18N::CJK::Ruby::isReadOnly();
-case E_CHANGECASEMAP: return 
officecfg::Office::Common::I18N::CJK::ChangeCaseMap::isReadOnly();
-case E_DOUBLELINES: return 
officecfg::Office::Common::I18N::CJK::DoubleLines::isReadOnly();
-case E_ALL:
-return officecfg::Office::Common::I18N::CJK::CJKFont::isReadOnly()
-|| 
officecfg::Office::Common::I18N::CJK::VerticalText::isReadOnly()
-|| 
officecfg::Office::Common::I18N::CJK::AsianTypography::isReadOnly()
-|| 
officecfg::Office::Common::I18N::CJK::JapaneseFind::isReadOnly()
-|| officecfg::Office::Common::I18N::CJK::Ruby::isReadOnly()
-|| 
officecfg::Office::Common::I18N::CJK::ChangeCaseMap::isReadOnly()
-|| 
officecfg::Office::Common::I18N::CJK::DoubleLines::isReadOnly();
-default:
-assert(false);
-}
-return false;
+return officecfg::Office::Common::I18N::CJK::CJKFont::isReadOnly()
+|| officecfg::Office::Common::I18N::CJK::VerticalText::isReadOnly()
+|| officecfg::Office::Common::I18N::CJK::AsianTypography::isReadOnly()
+|| officecfg::Office::Common::I18N::CJK::JapaneseFind::isReadOnly()
+|| 

[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 = >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

2023-06-28 Thread Justin Luth (via logerrit)
 cui/source/dialogs/passwdomdlg.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit 49e34144a8148bf3c77bcfd70bf6c628dcefeedd
Author: Justin Luth 
AuthorDate: Fri Nov 25 15:51:34 2022 -0500
Commit: Justin Luth 
CommitDate: Wed Jun 28 22:53:14 2023 +0200

tdf#148416 password dialog: suggest current loadreadonly status

If a document is set to load readonly,
and the user saves with a password,
then suggest LoadReadOnly status
by pre-populating and displaying the checkbox for that setting

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

diff --git a/cui/source/dialogs/passwdomdlg.cxx 
b/cui/source/dialogs/passwdomdlg.cxx
index 579af0edc9aa..e4981f442fbf 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -133,6 +134,14 @@ 
PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(weld::Window * pParent, s
 m_xOptionsExpander->set_sensitive(bIsPasswordToModify);
 if (!bIsPasswordToModify)
 m_xOptionsExpander->hide();
+else if (SfxObjectShell* pSh = SfxObjectShell::Current())
+{
+if (pSh->IsLoadReadonly())
+{
+m_xOpenReadonlyCB->set_active(true);
+m_xOptionsExpander->set_expanded(true);
+}
+}
 
 m_xOpenReadonlyCB->connect_toggled(LINK(this, PasswordToOpenModifyDialog, 
ReadonlyOnOffHdl));
 ReadonlyOnOffHdl(*m_xOpenReadonlyCB);


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

2023-06-28 Thread Regina Henschel (via logerrit)
 cui/source/tabpages/tparea.cxx   |2 +
 cui/source/tabpages/tpgradnt.cxx |   42 +--
 2 files changed, 29 insertions(+), 15 deletions(-)

New commits:
commit 48a9ade1dacc63e61cc9a5748f29119d1d01d841
Author: Regina Henschel 
AuthorDate: Wed Jun 21 23:04:52 2023 +0200
Commit: Regina Henschel 
CommitDate: Wed Jun 28 22:48:47 2023 +0200

tdf#107787 Sync FillGradientStepCount and StepCount

The FillGradientStepCount property of a shape or page background and
the StepCount member of the Gradient2 API struct or nStepCount member
of the basegfx::BGradient class are used parallel and mixed. Therefore
we need to be careful to keep the values in sync as far as possible.

Change-Id: I58ab9654ba0106417794fafe68fb296e66cb3bf5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153714
Tested-by: Jenkins
Reviewed-by: Regina Henschel 

diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index bbdb9733a02f..d1ece1c0e4d4 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -194,6 +195,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
 case drawing::FillStyle_GRADIENT:
 {
 m_rXFSet.Put( rSet.Get( GetWhich( XATTR_FILLGRADIENT ) ) );
+m_rXFSet.Put(rSet.Get(GetWhich(XATTR_GRADIENTSTEPCOUNT)));
 SelectFillType(*m_xBtnGradient);
 break;
 }
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 37c56da9aefc..df629a154ff4 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -37,8 +37,6 @@
 #include 
 #include 
 
-#define DEFAULT_GRADIENTSTEP 64
-
 using namespace com::sun::star;
 
 SvxGradientTabPage::SvxGradientTabPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rInAttrs)
@@ -186,10 +184,17 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
 {
 std::unique_ptr pBGradient;
 size_t nPos = m_xGradientLB->IsNoSelection() ? VALUESET_ITEM_NOTFOUND : 
m_xGradientLB->GetSelectItemPos();
+
+sal_uInt16 nValue = 0; // automatic step count
+if (!m_xCbIncrement->get_active())
+nValue = m_xMtrIncrement->get_value();
+
 if( nPos != VALUESET_ITEM_NOTFOUND )
 {
 pBGradient.reset(new basegfx::BGradient( m_pGradientList->GetGradient( 
static_cast(nPos) )->GetGradient() ));
 OUString aString = m_xGradientLB->GetItemText( 
m_xGradientLB->GetSelectedItemId() );
+// update StepCount to current value to be in sync with 
FillGradientStepCount
+pBGradient->SetSteps(nValue);
 rSet->Put( XFillGradientItem( aString, *pBGradient ) );
 }
 else
@@ -204,14 +209,10 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
 
static_cast(m_xMtrBorder->get_value(FieldUnit::NONE)),
 
static_cast(m_xMtrColorFrom->get_value(FieldUnit::NONE)),
 
static_cast(m_xMtrColorTo->get_value(FieldUnit::NONE)),
-static_cast(m_xMtrIncrement->get_value()) ));
+nValue));
 rSet->Put( XFillGradientItem( OUString(), *pBGradient ) );
 }
 
-sal_uInt16 nValue = 0;
-if (!m_xCbIncrement->get_active())
-nValue = m_xMtrIncrement->get_value();
-
 assert( pBGradient && "basegfx::BGradient could not be created" );
 rSet->Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) );
 rSet->Put( XGradientStepCountItem( nValue ) );
@@ -220,8 +221,7 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
 
 void SvxGradientTabPage::Reset( const SfxItemSet* )
 {
-m_xMtrIncrement->set_value(DEFAULT_GRADIENTSTEP);
-ChangeGradientHdl_Impl();
+ChangeGradientHdl_Impl(); // includes setting m_xCbIncrement and 
m_xMtrIncrement
 
 // determine state of the buttons
 if( m_pGradientList->Count() )
@@ -293,6 +293,10 @@ void SvxGradientTabPage::ModifiedHdl_Impl( void const * 
pControl )
 
 css::awt::GradientStyle eXGS = 
static_cast(m_xLbGradientType->get_active());
 
+sal_uInt16 nValue = 0; // automatic
+if (!m_xCbIncrement->get_active())
+nValue = static_cast(m_xMtrIncrement->get_value());
+
 basegfx::BGradient aBGradient(
   createColorStops(),
   eXGS,
@@ -302,15 +306,12 @@ void SvxGradientTabPage::ModifiedHdl_Impl( void const * 
pControl )
   
static_cast(m_xMtrBorder->get_value(FieldUnit::NONE)),
   
static_cast(m_xMtrColorFrom->get_value(FieldUnit::NONE)),
   
static_cast(m_xMtrColorTo->get_value(FieldUnit::NONE)),
-  
static_cast(m_xMtrIncrement->get_value()) );
+  nValue);
 
 // enable/disable controls
 if (pControl == m_xLbGradientType.get() || 

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

2023-06-28 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/cuicharmap.cxx  |  408 +-
 include/cui/cuicharmap.hxx |   34 --
 include/sfx2/charwin.hxx   |   58 
 sfx2/inc/charmapcontrol.hxx|   16 -
 sfx2/source/control/charmapcontrol.cxx |  440 ++---
 sfx2/uiconfig/ui/charmapcontrol.ui |4 
 6 files changed, 430 insertions(+), 530 deletions(-)

New commits:
commit c706fde1c4ecc6974bcf32ce33aacf3093355ae1
Author: Caolán McNamara 
AuthorDate: Tue Jun 27 12:35:57 2023 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 28 09:41:20 2023 +0200

Resolves: tdf#156067 merge special char dialog/popup logic

there was some cut and paste done to create the popup
at some point, so put it back together and reuse the
"delete recent" etc which is missing from the popup case

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index c075c12326d2..4c4df2fe9cb3 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -58,38 +58,7 @@ SvxCharacterMap::SvxCharacterMap(weld::Widget* pParent, 
const SfxItemSet* pSet,
 , m_xVirDev(VclPtr::Create())
 , isSearchMode(true)
 , m_xFrame(std::move(xFrame))
-, m_aRecentCharView{SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev),
-SvxCharView(m_xVirDev)}
-, m_aFavCharView{SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev),
- SvxCharView(m_xVirDev)}
+, m_aCharmapContents(*m_xBuilder, m_xVirDev)
 , m_aShowChar(m_xVirDev)
 , m_xOKBtn(m_xFrame.is() ? m_xBuilder->weld_button("insert") : 
m_xBuilder->weld_button("ok"))
 , m_xFontText(m_xBuilder->weld_label("fontft"))
@@ -101,41 +70,7 @@ SvxCharacterMap::SvxCharacterMap(weld::Widget* pParent, 
const SfxItemSet* pSet,
 , m_xDecimalCodeText(m_xBuilder->weld_entry("decimalvalue"))
 , m_xFavouritesBtn(m_xBuilder->weld_button("favbtn"))
 , m_xCharName(m_xBuilder->weld_label("charname"))
-, m_xRecentGrid(m_xBuilder->weld_widget("viewgrid"))
-, m_xFavGrid(m_xBuilder->weld_widget("favgrid"))
 , m_xShowChar(new weld::CustomWeld(*m_xBuilder, "showchar", m_aShowChar))
-, m_xRecentCharView{std::make_unique(*m_xBuilder, 
"viewchar1", m_aRecentCharView[0]),
-std::make_unique(*m_xBuilder, 
"viewchar2", m_aRecentCharView[1]),
-std::make_unique(*m_xBuilder, 
"viewchar3", m_aRecentCharView[2]),
-std::make_unique(*m_xBuilder, 
"viewchar4", m_aRecentCharView[3]),
-std::make_unique(*m_xBuilder, 
"viewchar5", m_aRecentCharView[4]),
-std::make_unique(*m_xBuilder, 
"viewchar6", m_aRecentCharView[5]),
-std::make_unique(*m_xBuilder, 
"viewchar7", m_aRecentCharView[6]),
-std::make_unique(*m_xBuilder, 
"viewchar8", m_aRecentCharView[7]),
-std::make_unique(*m_xBuilder, 
"viewchar9", m_aRecentCharView[8]),
-std::make_unique(*m_xBuilder, 
"viewchar10", m_aRecentCharView[9]),
-std::make_unique(*m_xBuilder, 
"viewchar11", m_aRecentCharView[10]),
-std::make_unique(*m_xBuilder, 
"viewchar12", m_aRecentCharView[11]),
-std::make_unique(*m_xBuilder, 
"viewchar13", m_aRecentCharView[12]),
-std::make_unique(*m_xBuilder, 
"viewchar14", m_aRecentCharView[13]),
-

[Libreoffice-commits] core.git: cui/source dbaccess/source fpicker/source oox/source ucb/source

2023-06-27 Thread Mike Kaganski (via logerrit)
 cui/source/dialogs/scriptdlg.cxx|   19 +++
 dbaccess/source/ui/dlg/dbfindex.cxx |7 ++-
 fpicker/source/office/fileview.cxx  |4 +---
 oox/source/export/drawingml.cxx |8 +++-
 ucb/source/core/ucbstore.cxx|   13 -
 5 files changed, 17 insertions(+), 34 deletions(-)

New commits:
commit ae5cb9b75984d9a63b392d8bfc5b3d224f00c741
Author: Mike Kaganski 
AuthorDate: Tue Jun 27 14:45:39 2023 +0300
Commit: Mike Kaganski 
CommitDate: Wed Jun 28 04:38:48 2023 +0200

Simplify a bit

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

diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index f482c540294c..4113f7334a1c 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -128,9 +128,6 @@ void SvxScriptOrgDialog::Init( std::u16string_view language 
 )
 
 Sequence< Reference< browse::XBrowseNode > > children;
 
-OUString userStr("user");
-static constexpr OUStringLiteral shareStr(u"share");
-
 try
 {
 Reference< browse::XBrowseNodeFactory > xFac = 
browse::theBrowseNodeFactory::get(xCtx);
@@ -155,17 +152,15 @@ void SvxScriptOrgDialog::Init( std::u16string_view 
language  )
 bool app = false;
 OUString uiName = childNode->getName();
 OUString factoryURL;
-if ( uiName == userStr || uiName == shareStr )
+if (uiName == "user")
 {
 app = true;
-if ( uiName == userStr )
-{
-uiName = m_sMyMacros;
-}
-else
-{
-uiName = m_sProdMacros;
-}
+uiName = m_sMyMacros;
+}
+else if (uiName == "share")
+{
+app = true;
+uiName = m_sProdMacros;
 }
 else
 {
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx 
b/dbaccess/source/ui/dlg/dbfindex.cxx
index e5f62afc6be3..d0a03b5b238c 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -254,9 +254,6 @@ void ODbaseIndexDialog::Init()
 
 // first assume for all indexes they're free
 
-static constexpr OUStringLiteral aIndexExt(u"ndx");
-static constexpr OUStringLiteral aTableExt(u"dbf");
-
 std::vector< OUString > aUsedIndexes;
 
 aURL.SetSmartProtocol(INetProtocol::File);
@@ -267,11 +264,11 @@ void ODbaseIndexDialog::Init()
 osl::FileBase::getSystemPathFromFileURL(rURL,aName);
 aURL.SetSmartURL(aName);
 OUString aExt = aURL.getExtension();
-if (aExt == aIndexExt)
+if (aExt == "ndx")
 {
 m_aFreeIndexList.emplace_back(aURL.getName() );
 }
-else if (aExt == aTableExt)
+else if (aExt == "dbf")
 {
 m_aTableInfoList.emplace_back(aURL.getName() );
 OTableInfo& rTabInfo = m_aTableInfoList.back();
diff --git a/fpicker/source/office/fileview.cxx 
b/fpicker/source/office/fileview.cxx
index 9d8d0f347449..ebc3ee3b8b18 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -1499,8 +1499,6 @@ void SvtFileView_Impl::CreateDisplayText_Impl()
 {
 ::osl::MutexGuard aGuard( maMutex );
 
-static constexpr OUStringLiteral aDateSep( u", " );
-
 for (auto const& elem : maContent)
 {
 // title, type, size, date
@@ -1514,7 +1512,7 @@ void SvtFileView_Impl::CreateDisplayText_Impl()
 SvtSysLocale aSysLocale;
 const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData();
 elem->maDisplayDate = rLocaleData.getDate( elem->maModDate )
-  + aDateSep
+  + ", "
   + rLocaleData.getTime( elem->maModDate, 
false );
 }
 
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 01328fa2576a..a8c032259476 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1512,16 +1512,14 @@ OUString GraphicExport::writeToStorage(const Graphic& 
rGraphic , bool bRelPathTo
 xOutStream->writeBytes(Sequence(static_cast(aData), nDataSize));
 xOutStream->closeOutput();
 
-static constexpr OStringLiteral sRelPathToMedia = "media/image";
-OString sRelationCompPrefix;
+const char* sRelationCompPrefix;
 if (bRelPathToMedia)
 sRelationCompPrefix = "../";
 else
 sRelationCompPrefix = getRelationCompPrefix(meDocumentType);
 sPath = OUStringBuffer()
-.appendAscii(sRelationCompPrefix.getStr())
-.appendAscii(sRelPathToMedia.getStr())
-.append(nImageCount)
+.appendAscii(sRelationCompPrefix)
+.append("media/image" + 

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

2023-06-24 Thread Regina Henschel (via logerrit)
 cui/source/tabpages/tpgradnt.cxx  |   13 ++---
 cui/source/tabpages/tptrans.cxx   |8 
 sd/source/ui/sidebar/SlideBackground.cxx  |   13 ++---
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |   13 ++---
 svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx |9 -
 5 files changed, 26 insertions(+), 30 deletions(-)

New commits:
commit 81daca18b69d31995bcd56f804659318398c02e2
Author: Regina Henschel 
AuthorDate: Sat Jun 24 16:08:26 2023 +0200
Commit: Caolán McNamara 
CommitDate: Sat Jun 24 22:29:34 2023 +0200

CID several. Use ctor 'from other' instead 'first..last'

This covers CID#1532461, CID#1532462, CID#1532464, CID#1532467,
CID#1532479.
Now solutions without iterator are used.

In all cases constructions like
maColorStops = basegfx::BColorStops(rGradient.GetColorStops().begin(),
rGradient.GetColorStops().end());
are replaced with solutions like
maColorStops = rGradient.GetColorStops();

And instead of constructions like
aColorStops.emplace_back(maColorStops.front().getStopOffset(),
aStartBColor);
aColorStops.insert(aColorStops.begin(),
   maColorStops.begin() + 1, maColorStops.end() - 1);
aColorStops.emplace_back(maColorStops.back().getStopOffset(),
 aEndBColor);
now it is like
aColorStops = maColorStops;
aColorStops.front() =
basegfx::BColorStop(maColorStops.front().getStopOffset(),
aStartBColor);
aColorStops.back() =
basegfx::BColorStop(maColorStops.back().getStopOffset(),
aEndBColor);

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

diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index d3d066236ae1..37c56da9aefc 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -551,8 +551,7 @@ void SvxGradientTabPage::ChangeGradientHdl_Impl()
 // MCGR: preserve ColorStops if given.
 // tdf#155901 We need offset of first and last stop, so include them.
 if (pGradient->GetColorStops().size() >= 2)
-m_aColorStops = 
basegfx::BColorStops(pGradient->GetColorStops().begin(),
- pGradient->GetColorStops().end());
+m_aColorStops = pGradient->GetColorStops();
 else
 m_aColorStops.clear();
 
@@ -645,11 +644,11 @@ basegfx::BColorStops 
SvxGradientTabPage::createColorStops()
 
 if(m_aColorStops.size() >= 2)
 {
-aColorStops.emplace_back(m_aColorStops.front().getStopOffset(),
- 
m_xLbColorFrom->GetSelectEntryColor().getBColor());
-aColorStops.insert(aColorStops.begin(), m_aColorStops.begin() + 1, 
m_aColorStops.end() - 1);
-aColorStops.emplace_back(m_aColorStops.back().getStopOffset(),
- 
m_xLbColorTo->GetSelectEntryColor().getBColor());
+aColorStops = m_aColorStops;
+aColorStops.front() = 
basegfx::BColorStop(m_aColorStops.front().getStopOffset(),
+  
m_xLbColorFrom->GetSelectEntryColor().getBColor());
+aColorStops.back() = 
basegfx::BColorStop(m_aColorStops.back().getStopOffset(),
+ 
m_xLbColorTo->GetSelectEntryColor().getBColor());
 }
 else
 {
diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx
index 3d157850a526..04cbdfb6b24a 100644
--- a/cui/source/tabpages/tptrans.cxx
+++ b/cui/source/tabpages/tptrans.cxx
@@ -370,7 +370,7 @@ void SvxTransparenceTabPage::Reset(const SfxItemSet* rAttrs)
 // MCGR: preserve ColorStops if given
 // tdf#155901 We need offset of first and last stop, so include them.
 if (rGradient.GetColorStops().size() >= 2)
-maColorStops = basegfx::BColorStops(rGradient.GetColorStops().begin(), 
rGradient.GetColorStops().end());
+maColorStops = rGradient.GetColorStops();
 else
 maColorStops.clear();
 
@@ -519,9 +519,9 @@ basegfx::BColorStops 
SvxTransparenceTabPage::createColorStops()
 
 if(maColorStops.size() >= 2)
 {
-aColorStops.emplace_back(maColorStops.front().getStopOffset(), 
aStartBColor);
-aColorStops.insert(aColorStops.begin(), maColorStops.begin() + 1, 
maColorStops.end() - 1);
-aColorStops.emplace_back(maColorStops.back().getStopOffset(), 
aEndBColor);
+aColorStops = maColorStops;
+aColorStops.front() = 
basegfx::BColorStop(maColorStops.front().getStopOffset(), aStartBColor);
+aColorStops.back() = 
basegfx::BColorStop(maColorStops.back().getStopOffset(), aEndBColor);
 }
 else
 {
diff --git 

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

2023-06-23 Thread Regina Henschel (via logerrit)
 cui/source/inc/cuitabarea.hxx |8 +-
 cui/source/tabpages/tpgradnt.cxx  |   25 +---
 cui/source/tabpages/tptrans.cxx   |   28 +
 include/svx/sidebar/AreaPropertyPanelBase.hxx |4 -
 include/svx/sidebar/AreaTransparencyGradientPopup.hxx |4 -
 sd/source/ui/sidebar/SlideBackground.cxx  |   25 +---
 sd/source/ui/sidebar/SlideBackground.hxx  |4 -
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |   33 +++
 svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx |   42 --
 9 files changed, 105 insertions(+), 68 deletions(-)

New commits:
commit bb19bda1dc620f0f8662776d9818aedf45486994
Author: Regina Henschel 
AuthorDate: Wed Jun 21 15:01:20 2023 +0200
Commit: Regina Henschel 
CommitDate: Fri Jun 23 10:54:24 2023 +0200

tdf#155901 MCGR: preserve first and last gradient stop too

Error was, that only the in-between gradient stops were preserve. First
stop was set with fixed offset 0, last stop with fixed offset 1. The
offsets of first and last gradient stop of the original gradient were
lost. Now in all cases (hopefully) the complete gradient stops vector is
preserved and the original offset is used, if e.g. the user changes the
color.

For calculating transparence the indirect way over Color is removed.
Instead percent is directly transformed to the 0..1 values of BColor.
That avoids rounding errors.

Change-Id: Icdf699a6c2e9c6289d2f77033858448e58396a60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153395
Tested-by: Jenkins
Reviewed-by: Regina Henschel 

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 2d6c713236da..4e766c76e57d 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -169,7 +169,7 @@ class SvxTransparenceTabPage : public SfxTabPage
 std::unique_ptr m_xCtlBitmapPreview;
 std::unique_ptr m_xCtlXRectPreview;
 
-// MCGR: Preserve in-between ColorStops until we have an UI to edit these
+// MCGR: Preserve ColorStops until we have a UI to edit these
 basegfx::BColorStops maColorStops;
 
 DECL_LINK(ClickTransOffHdl_Impl, weld::Toggleable&, void);
@@ -187,7 +187,7 @@ class SvxTransparenceTabPage : public SfxTabPage
 bool InitPreview ( const SfxItemSet& rSet );
 void InvalidatePreview (bool bEnable = true );
 
-// MCGR: Preserve in-between ColorStops until we have an UI to edit these
+// MCGR: Preserve ColorStops until we have a UI to edit these
 basegfx::BColorStops createColorStops();
 
 public:
@@ -367,7 +367,7 @@ private:
 XFillAttrSetItemm_aXFillAttr;
 SfxItemSet& m_rXFSet;
 
-// MCGR: Preserve in-between ColorStops until we have an UI to edit these
+// MCGR: Preserve ColorStops until we have a UI to edit these
 basegfx::BColorStops m_aColorStops;
 
 SvxXRectPreview m_aCtlPreview;
@@ -409,7 +409,7 @@ private:
 void SetControlState_Impl( css::awt::GradientStyle eXGS );
 sal_Int32 SearchGradientList(std::u16string_view rGradientName);
 
-// MCGR: Preserve in-between ColorStops until we have an UI to edit these
+// MCGR: Preserve ColorStops until we have a UI to edit these
 basegfx::BColorStops createColorStops();
 
 public:
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 7f6630747a42..d3d066236ae1 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -548,9 +548,11 @@ void SvxGradientTabPage::ChangeGradientHdl_Impl()
 m_xLbColorTo->SetNoSelection();
 
m_xLbColorTo->SelectEntry(Color(pGradient->GetColorStops().back().getStopColor()));
 
-// MCGR: preserve in-between ColorStops if given
-if (pGradient->GetColorStops().size() > 2)
-m_aColorStops = 
basegfx::BColorStops(pGradient->GetColorStops().begin() + 1, 
pGradient->GetColorStops().end() - 1);
+// MCGR: preserve ColorStops if given.
+// tdf#155901 We need offset of first and last stop, so include them.
+if (pGradient->GetColorStops().size() >= 2)
+m_aColorStops = 
basegfx::BColorStops(pGradient->GetColorStops().begin(),
+ pGradient->GetColorStops().end());
 else
 m_aColorStops.clear();
 
@@ -641,14 +643,19 @@ basegfx::BColorStops 
SvxGradientTabPage::createColorStops()
 {
 basegfx::BColorStops aColorStops;
 
-aColorStops.emplace_back(0.0, 
m_xLbColorFrom->GetSelectEntryColor().getBColor());
-
-if(!m_aColorStops.empty())
+if(m_aColorStops.size() >= 2)
 {
-aColorStops.insert(aColorStops.begin(), m_aColorStops.begin(), 
m_aColorStops.end());
+aColorStops.emplace_back(m_aColorStops.front().getStopOffset(),
+ 
m_xLbColorFrom->GetSelectEntryColor().getBColor());
+

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

2023-06-21 Thread Miklos Vajna (via logerrit)
 cui/source/options/optjava.cxx |4 ++--
 cui/source/options/optjava.hxx |2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 8b330bb761e05fcfabd5a30f8784046c93b91431
Author: Miklos Vajna 
AuthorDate: Wed Jun 21 16:16:57 2023 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 21 21:23:57 2023 +0200

cui: don't build SvxJavaClassPathDlg::SetClassPath() for the non-java case

Since SvxJavaClassPathDlg::SetClassPath  is only called from #if
HAVE_FEATURE_JAVA  code (in IMPL_LINK_NOARG(SvxJavaOptionsPage,
ClassPathHdl_Impl, weld::Button&, void)  in
cui/source/options/optjava.cxx ) anyway, see

.

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

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 7a537dfe4eed..64ba41c3fe0b 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -935,12 +935,12 @@ OUString SvxJavaClassPathDlg::GetClassPath() const
 return sPath.makeStringAndClear();
 }
 
+#if HAVE_FEATURE_JAVA
 void SvxJavaClassPathDlg::SetClassPath( const OUString& _rPath )
 {
 if ( m_sOldPath.isEmpty() )
 m_sOldPath = _rPath;
 m_xPathList->clear();
-#if HAVE_FEATURE_JAVA
 if (!_rPath.isEmpty())
 {
 std::vector paths = jfw_convertUserPathList(_rPath);
@@ -962,8 +962,8 @@ void SvxJavaClassPathDlg::SetClassPath( const OUString& 
_rPath )
 // select first entry
 m_xPathList->select(0);
 }
-#endif
 SelectHdl_Impl(*m_xPathList);
 }
+#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index 097b7ffb5336..929dfe71738a 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -200,7 +200,9 @@ public:
 void SetFocus() { m_xPathList->grab_focus(); }
 
 OUStringGetClassPath() const;
+#if HAVE_FEATURE_JAVA
 voidSetClassPath( const OUString& _rPath );
+#endif
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2023-06-21 Thread Miklos Vajna (via logerrit)
 cui/source/options/optjava.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit af3963c32c63893949a3028396af90ee7d811e5b
Author: Miklos Vajna 
AuthorDate: Wed Jun 21 12:06:42 2023 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 21 14:37:40 2023 +0200

cui: fix --without-java build

This went wrong in commit 7795a2adc0a724220440dca997495043902f1384
(Allow bootstrap variables in Java user classpath settings, 2nd try,
2023-06-12), I assume that _rPath is always empty in the without-java
case.

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

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 17f128ce9b3b..7a537dfe4eed 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -940,6 +940,7 @@ void SvxJavaClassPathDlg::SetClassPath( const OUString& 
_rPath )
 if ( m_sOldPath.isEmpty() )
 m_sOldPath = _rPath;
 m_xPathList->clear();
+#if HAVE_FEATURE_JAVA
 if (!_rPath.isEmpty())
 {
 std::vector paths = jfw_convertUserPathList(_rPath);
@@ -961,6 +962,7 @@ void SvxJavaClassPathDlg::SetClassPath( const OUString& 
_rPath )
 // select first entry
 m_xPathList->select(0);
 }
+#endif
 SelectHdl_Impl(*m_xPathList);
 }
 


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

2023-06-20 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/options/optjava.cxx |   19 +-
 include/jvmfwk/framework.hxx   |   11 
 jvmfwk/source/framework.cxx|   55 +++--
 3 files changed, 77 insertions(+), 8 deletions(-)

New commits:
commit 7795a2adc0a724220440dca997495043902f1384
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jun 12 14:31:45 2023 +0200
Commit: Thorsten Behrens 
CommitDate: Wed Jun 21 00:45:53 2023 +0200

Allow bootstrap variables in Java user classpath settings, 2nd try

Add a second mode: When a classpath starts with '$', bootstrap variables 
are recognized.
The classpath must then be provided as URL, not native path.

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

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index c1528138f326..17f128ce9b3b 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -33,6 +33,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -941,16 +942,22 @@ void SvxJavaClassPathDlg::SetClassPath( const OUString& 
_rPath )
 m_xPathList->clear();
 if (!_rPath.isEmpty())
 {
-sal_Int32 nIdx = 0;
-do
+std::vector paths = jfw_convertUserPathList(_rPath);
+for (auto const& path : paths)
 {
-OUString sToken = _rPath.getToken( 0, CLASSPATH_DELIMITER, nIdx );
 OUString sURL;
-osl::FileBase::getFileURLFromSystemPath(sToken, sURL); // best 
effort
+if (path.startsWith("$"))
+{
+sURL = path;
+rtl::Bootstrap::expandMacros(sURL);
+}
+else
+{
+osl::FileBase::getFileURLFromSystemPath(path, sURL);
+}
 INetURLObject aURL( sURL );
-m_xPathList->append("", sToken, 
SvFileInformationManager::GetImageId(aURL));
+m_xPathList->append("", path, 
SvFileInformationManager::GetImageId(aURL));
 }
-while (nIdx>=0);
 // select first entry
 m_xPathList->select(0);
 }
diff --git a/include/jvmfwk/framework.hxx b/include/jvmfwk/framework.hxx
index 8f7eb8a2ad29..d3cf01791e6b 100644
--- a/include/jvmfwk/framework.hxx
+++ b/include/jvmfwk/framework.hxx
@@ -345,6 +345,17 @@ JVMFWK_DLLPUBLIC javaFrameworkError 
jfw_findAndSelectJRE(std::unique_ptr>* parInfo);
 
+/**
+ * Convert colon-separated userClassPath which might contain bootstrap 
variables
+ * (which also might contain colons) to a list of classPaths, keeping 
bootstrap variables intact.
+ *
+ * FIXME: Nested or multiple occurrences of ${...:...:...} are currently not 
supported.
+ *
+ * @param sUserPath colon-separated string of user classpaths
+ * @return list of user classpaths
+ */
+JVMFWK_DLLPUBLIC std::vector jfw_convertUserPathList(OUString const& 
sUserPath);
+
 /** determines if a path points to a Java installation.
 
If the path belongs to a JRE installation then it returns the
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 5f83e7be739e..cfeca1f72904 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -23,11 +23,12 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
-#ifdef _WIN32
 #include 
+#ifdef _WIN32
 #include 
 #endif
 #include 
@@ -132,6 +133,40 @@ javaFrameworkError 
jfw_findAllJREs(std::vector> *pparI
 }
 }
 
+std::vector jfw_convertUserPathList(OUString const& sUserPath)
+{
+std::vector result;
+sal_Int32 nIdx = 0;
+do
+{
+sal_Int32 nextColon = sUserPath.indexOf(SAL_PATHSEPARATOR, nIdx);
+OUString sToken(sUserPath.subView(nIdx, nextColon > 0 ? nextColon - 
nIdx
+  : 
sUserPath.getLength() - nIdx));
+
+// Check if we are in bootstrap variable mode (class path starts with 
'$').
+// Then the class path must be in URL format.
+if (sToken.startsWith("$"))
+{
+// Detect open bootstrap variables - they might contain colons - 
we need to skip those.
+sal_Int32 nBootstrapVarStart = sToken.indexOf("${");
+if (nBootstrapVarStart >= 0)
+{
+sal_Int32 nBootstrapVarEnd = sToken.indexOf("}", 
nBootstrapVarStart);
+if (nBootstrapVarEnd == -1)
+{
+// Current colon is part of bootstrap variable - skip it!
+nextColon = sUserPath.indexOf(SAL_PATHSEPARATOR, nextColon 
+ 1);
+sToken = sUserPath.subView(nIdx, nextColon > 0 ? nextColon 
- nIdx
+   : 
sUserPath.getLength() - nIdx);
+}
+}
+}
+result.emplace_back(sToken);
+nIdx = nextColon + 1;
+} while (nIdx > 0);
+  

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

2023-06-18 Thread Baole Fang (via logerrit)
 cui/source/customize/cfgutil.cxx |   33 +++--
 cui/source/inc/cfgutil.hxx   |2 +-
 2 files changed, 24 insertions(+), 11 deletions(-)

New commits:
commit 94bf26798bb973c7df26e2aa841099bb9cbaf3cb
Author: Baole Fang 
AuthorDate: Tue May 23 20:40:51 2023 -0400
Commit: Mike Kaganski 
CommitDate: Sun Jun 18 19:04:55 2023 +0200

tdf#148836: Alphabetize customize keyboard dialog

"All Commands" is kept at the top, and LibreOffice Macros, Styles and 
Sidebar Decks are kept at the bottom,
while others are sorted alphabetally.

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

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index aa77952563a8..3039486a2f30 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -469,21 +469,16 @@ void CuiConfigGroupListBox::ClearAll()
 m_xTreeView->clear();
 }
 
-void CuiConfigGroupListBox::InitModule()
+sal_Int32 CuiConfigGroupListBox::InitModule()
 {
 try
 {
+// return the number of added groups
 css::uno::Reference< css::frame::XDispatchInformationProvider > 
xProvider(m_xFrame, css::uno::UNO_QUERY_THROW);
 css::uno::Sequence< sal_Int16 > lGroups = 
xProvider->getSupportedCommandGroups();
 sal_Int32   c1  = lGroups.getLength();
 sal_Int32   i1  = 0;
-
-if ( c1 )
-{
-// Add All Commands category
-
aArr.push_back(std::make_unique(SfxCfgKind::GROUP_ALLFUNCTIONS,
 0));
-m_xTreeView->append(weld::toId(aArr.back().get()), 
CuiResId(RID_CUISTR_ALLFUNCTIONS));
-}
+sal_Int32   nAddedGroups = 0;
 
 for (i1=0; i1( 
SfxCfgKind::GROUP_FUNCTION, nGroupID ) );
 m_xTreeView->append(weld::toId(aArr.back().get()), sGroupName);
+nAddedGroups++;
 }
+return nAddedGroups;
 }
 catch(const css::uno::RuntimeException&)
 { throw; }
 catch(const css::uno::Exception&)
 {}
+return 0;
 }
 
 void CuiConfigGroupListBox::FillScriptList(const css::uno::Reference< 
css::script::browse::XBrowseNode >& xRootNode,
@@ -634,6 +632,7 @@ void CuiConfigGroupListBox::Init(const css::uno::Reference< 
css::uno::XComponent
 
 m_xContext = xContext;
 m_xFrame = xFrame;
+sal_Int32 nAddedGroups = 0;
 if( bEventMode )
 {
 m_sModuleLongName = sModuleLongName;
@@ -641,7 +640,7 @@ void CuiConfigGroupListBox::Init(const css::uno::Reference< 
css::uno::XComponent
 
m_xModuleCategoryInfo.set(m_xGlobalCategoryInfo->getByName(m_sModuleLongName), 
css::uno::UNO_QUERY_THROW);
 m_xUICmdDescription   = css::frame::theUICommandDescription::get( 
m_xContext );
 
-InitModule();
+nAddedGroups = InitModule();
 }
 
 SAL_INFO("cui.customize", "** ** About to initialise SF Scripts");
@@ -658,7 +657,21 @@ void CuiConfigGroupListBox::Init(const 
css::uno::Reference< css::uno::XComponent
 // TODO exception handling
 }
 
+m_xTreeView->thaw();
+m_xTreeView->make_sorted();
+m_xTreeView->make_unsorted();
+m_xTreeView->freeze();
+
+// add All Commands to the top
+if ( bEventMode && nAddedGroups )
+{
+aArr.insert(aArr.begin(), 
std::make_unique(SfxCfgKind::GROUP_ALLFUNCTIONS, 0));
+OUString sId(weld::toId(aArr.front().get()));
+OUString s(CuiResId(RID_CUISTR_ALLFUNCTIONS));
+m_xTreeView->insert(nullptr, 0, , , nullptr, nullptr, false, 
nullptr);
+}
 
+// add application macros to the end
 if ( rootNode.is() )
 {
 if ( bEventMode )
@@ -681,7 +694,7 @@ void CuiConfigGroupListBox::Init(const css::uno::Reference< 
css::uno::XComponent
 }
 }
 
-// add styles and sidebar decks
+// add styles and sidebar decks to the end
 if ( bEventMode )
 {
 aArr.push_back( std::make_unique( 
SfxCfgKind::GROUP_STYLES, 0, nullptr ) ); // TODO last parameter should contain 
user data
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 44f532baa6ba..b1f22e4065b9 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -204,7 +204,7 @@ class CuiConfigGroupListBox
 css::uno::Reference< css::uno::XComponentContext > const & xCtx,
 std::u16string_view docName);
 
-void InitModule();
+sal_Int32 InitModule();
 void FillScriptList(const css::uno::Reference< 
css::script::browse::XBrowseNode >& xRootNode,
 const weld::TreeIter* pParentEntry);
 void FillFunctionsList(const css::uno::Sequence< 
css::frame::DispatchInformation >& xCommands);


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

2023-06-08 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/options/optjava.cxx |   21 ++---
 jvmfwk/source/framework.cxx|5 +
 2 files changed, 3 insertions(+), 23 deletions(-)

New commits:
commit 452856addb26a24846505061b08e2dd64a9c5b5f
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jun 5 10:21:44 2023 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jun 8 09:18:42 2023 +0200

Revert "Allow bootstrap variables in Java user classpath settings"

This breaks existing paths which contain "\" or "$".

This reverts commit cfc2376f804f13eb562f39182cb24fe7dc61d6ef.

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

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 631d085c3bfb..c1528138f326 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -944,30 +944,13 @@ void SvxJavaClassPathDlg::SetClassPath( const OUString& 
_rPath )
 sal_Int32 nIdx = 0;
 do
 {
-sal_Int32 nextColon = _rPath.indexOf(CLASSPATH_DELIMITER, nIdx);
-OUString sToken(
-_rPath.subView(nIdx, nextColon > 0 ? nextColon - nIdx : 
_rPath.getLength() - nIdx));
-
-// Detect open bootstrap variables - they might contain colons - 
we need to skip those.
-sal_Int32 nBootstrapVarStart = sToken.indexOf("${");
-if (nBootstrapVarStart >= 0)
-{
-sal_Int32 nBootstrapVarEnd = sToken.indexOf("}");
-if (nBootstrapVarEnd == -1)
-{
-// Current colon is part of bootstrap variable - skip it!
-nextColon = _rPath.indexOf(CLASSPATH_DELIMITER, nextColon 
+ 1);
-sToken = _rPath.subView(nIdx, nextColon > 0 ? nextColon - 
nIdx
-: 
_rPath.getLength() - nIdx);
-}
-}
+OUString sToken = _rPath.getToken( 0, CLASSPATH_DELIMITER, nIdx );
 OUString sURL;
 osl::FileBase::getFileURLFromSystemPath(sToken, sURL); // best 
effort
 INetURLObject aURL( sURL );
 m_xPathList->append("", sToken, 
SvFileInformationManager::GetImageId(aURL));
-nIdx = nextColon + 1;
 }
-while (nIdx > 0);
+while (nIdx>=0);
 // select first entry
 m_xPathList->select(0);
 }
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 33b61f1622fd..5f83e7be739e 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -185,10 +185,7 @@ javaFrameworkError jfw_startVM(
 return JFW_E_NEED_RESTART;
 
 vmParams = settings.getVmParametersUtf8();
-// Expand user classpath (might contain bootstrap vars)
-OUString sUserPath(settings.getUserClassPath());
-rtl::Bootstrap::expandMacros(sUserPath);
-sUserClassPath = jfw::makeClassPathOption(sUserPath);
+sUserClassPath = 
jfw::makeClassPathOption(settings.getUserClassPath());
 } // end mode FWK_MODE_OFFICE
 else if (mode == jfw::JFW_MODE_DIRECT)
 {


[Libreoffice-commits] core.git: cui/source extensions/source framework/source include/svtools sfx2/source svtools/source

2023-06-06 Thread Noel Grandin (via logerrit)
 cui/source/customize/SvxConfigPageHelper.cxx|4 +-
 cui/source/options/optgdlg.cxx  |8 ++--
 extensions/source/bibliography/toolbar.cxx  |7 +--
 framework/source/uielement/FixedImageToolbarController.cxx  |7 +--
 framework/source/uielement/imagebuttontoolbarcontroller.cxx |4 +-
 framework/source/uielement/menubarmanager.cxx   |4 +-
 framework/source/uielement/toolbarmanager.cxx   |   23 +---
 include/svtools/miscopt.hxx |   10 ++---
 sfx2/source/appl/appcfg.cxx |3 -
 svtools/source/config/miscopt.cxx   |   16 +++-
 10 files changed, 39 insertions(+), 47 deletions(-)

New commits:
commit 0558926c2f9201a12b4c46efc36b8a4080af4d46
Author: Noel Grandin 
AuthorDate: Tue Jun 6 10:42:10 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Jun 6 20:45:52 2023 +0200

use more officecfg for SvtMiscOptions

Change-Id: I6c87025fc0997b5edbc085fc88333fe9e150eb3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152648
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/customize/SvxConfigPageHelper.cxx 
b/cui/source/customize/SvxConfigPageHelper.cxx
index 52265ef093e6..c14cb3560c9f 100644
--- a/cui/source/customize/SvxConfigPageHelper.cxx
+++ b/cui/source/customize/SvxConfigPageHelper.cxx
@@ -66,11 +66,11 @@ void SvxConfigPageHelper::InitImageType()
 {
 theImageType = css::ui::ImageType::COLOR_NORMAL | 
css::ui::ImageType::SIZE_DEFAULT;
 
-if (SvtMiscOptions().GetCurrentSymbolsSize() == SFX_SYMBOLS_SIZE_LARGE)
+if (SvtMiscOptions::GetCurrentSymbolsSize() == SFX_SYMBOLS_SIZE_LARGE)
 {
 theImageType |= css::ui::ImageType::SIZE_LARGE;
 }
-else if (SvtMiscOptions().GetCurrentSymbolsSize() == SFX_SYMBOLS_SIZE_32)
+else if (SvtMiscOptions::GetCurrentSymbolsSize() == SFX_SYMBOLS_SIZE_32)
 {
 theImageType |= css::ui::ImageType::SIZE_32;
 }
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 428a85ab3cbc..5819171001af 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -855,13 +855,13 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
 {
 SvtMiscOptions aMiscOptions;
 
-if (aMiscOptions.GetSymbolsSize() != SFX_SYMBOLS_SIZE_AUTO)
+if (SvtMiscOptions::GetSymbolsSize() != SFX_SYMBOLS_SIZE_AUTO)
 {
 nSizeLB_InitialSelection = 1;
 
-if (aMiscOptions.GetSymbolsSize() == SFX_SYMBOLS_SIZE_LARGE)
+if (SvtMiscOptions::GetSymbolsSize() == SFX_SYMBOLS_SIZE_LARGE)
 nSizeLB_InitialSelection = 2;
-else if (aMiscOptions.GetSymbolsSize() == SFX_SYMBOLS_SIZE_32)
+else if (SvtMiscOptions::GetSymbolsSize() == SFX_SYMBOLS_SIZE_32)
 nSizeLB_InitialSelection = 3;
 }
 m_xIconSizeLB->set_active( nSizeLB_InitialSelection );
@@ -893,7 +893,7 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
 nStyleLB_InitialSelection = 0;
 }
 else {
-const OUString& selected = aMiscOptions.GetIconTheme();
+const OUString& selected = SvtMiscOptions::GetIconTheme();
 const vcl::IconThemeInfo& selectedInfo =
 vcl::IconThemeInfo::FindIconThemeById(mInstalledIconThemes, 
selected);
 nStyleLB_InitialSelection = 
m_xIconStyleLB->find_text(selectedInfo.GetDisplayName());
diff --git a/extensions/source/bibliography/toolbar.cxx 
b/extensions/source/bibliography/toolbar.cxx
index cee4d5fbb44a..7675a761c1ed 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -235,8 +235,7 @@ BibToolBar::BibToolBar(vcl::Window* pParent, 
Link aLink)
 , aLayoutManager(aLink)
 , nSymbolsSize(SFX_SYMBOLS_SIZE_SMALL)
 {
-SvtMiscOptions aSvtMiscOptions;
-nSymbolsSize = aSvtMiscOptions.GetCurrentSymbolsSize();
+nSymbolsSize = SvtMiscOptions::GetCurrentSymbolsSize();
 
 xSource->Show();
 pLbSource->connect_changed(LINK( this, BibToolBar, SelHdl));
@@ -561,7 +560,7 @@ void BibToolBar::DataChanged( const DataChangedEvent& 
rDCEvt )
 IMPL_LINK_NOARG( BibToolBar, OptionsChanged_Impl, LinkParamNone*, void )
 {
 bool bRebuildToolBar = false;
-sal_Int16 eSymbolsSize = SvtMiscOptions().GetCurrentSymbolsSize();
+sal_Int16 eSymbolsSize = SvtMiscOptions::GetCurrentSymbolsSize();
 if ( nSymbolsSize != eSymbolsSize )
 {
 nSymbolsSize = eSymbolsSize;
@@ -575,7 +574,7 @@ IMPL_LINK_NOARG( BibToolBar, OptionsChanged_Impl, 
LinkParamNone*, void )
 IMPL_LINK_NOARG( BibToolBar, SettingsChanged_Impl, VclSimpleEvent&, void )
 {
 // Check if toolbar button size have changed and we have to use system 
settings
-sal_Int16 eSymbolsSize = SvtMiscOptions().GetCurrentSymbolsSize();
+sal_Int16 eSymbolsSize = SvtMiscOptions::GetCurrentSymbolsSize();
 if ( eSymbolsSize != nSymbolsSize )
 {
 

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

2023-06-04 Thread Hossein (via logerrit)
 cui/source/inc/connect.hxx  |2 +-
 cui/source/tabpages/connect.cxx |   16 
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit af27b57521075b35234daed4a6a7b554ed434df7
Author: Hossein 
AuthorDate: Sun Jun 4 22:16:27 2023 +0200
Commit: Hossein 
CommitDate: Sun Jun 4 23:56:55 2023 +0200

Rename function to SetMetricValueAndSave

Rename the function, remove prefix and suffix

Change-Id: Iaca0541d15a9162f11f8461892bf4c4454c9d674
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151843
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/cui/source/inc/connect.hxx b/cui/source/inc/connect.hxx
index 9aa2cc92dabb..73891d0ff8e6 100644
--- a/cui/source/inc/connect.hxx
+++ b/cui/source/inc/connect.hxx
@@ -56,7 +56,7 @@ private:
 DECL_LINK(ChangeAttrListBoxHdl_Impl, weld::ComboBox&, void);
 
 template
-void lcl_SetMetricValueAndSave_new(const SfxItemSet *rAttrs, 
weld::MetricSpinButton , TypedWhichId nWhich);
+void SetMetricValueAndSave(const SfxItemSet *rAttrs, 
weld::MetricSpinButton , TypedWhichId nWhich);
 public:
 
 SvxConnectionPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rInAttrs);
diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index a76de5eff3fd..b69f17b55113 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -119,7 +119,7 @@ SvxConnectionPage::~SvxConnectionPage()
 }
 
 template
-void SvxConnectionPage::lcl_SetMetricValueAndSave_new(const SfxItemSet* 
rAttrs, weld::MetricSpinButton& rField, TypedWhichId nWhich)
+void SvxConnectionPage::SetMetricValueAndSave(const SfxItemSet* rAttrs, 
weld::MetricSpinButton& rField, TypedWhichId nWhich)
 {
 const SfxPoolItem* pItem = GetItem( *rAttrs,  nWhich);
 const SfxItemPool* pPool = rAttrs->GetPool();
@@ -141,25 +141,25 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
 const SfxItemPool* pPool = rAttrs->GetPool();
 
 // SdrEdgeNode1HorzDistItem
-lcl_SetMetricValueAndSave_new(rAttrs, *m_xMtrFldHorz1, 
SDRATTR_EDGENODE1HORZDIST);
+SetMetricValueAndSave(rAttrs, *m_xMtrFldHorz1, SDRATTR_EDGENODE1HORZDIST);
 
 // SdrEdgeNode2HorzDistItem
-lcl_SetMetricValueAndSave_new(rAttrs, *m_xMtrFldHorz2, 
SDRATTR_EDGENODE2HORZDIST);
+SetMetricValueAndSave(rAttrs, *m_xMtrFldHorz2, SDRATTR_EDGENODE2HORZDIST);
 
 // SdrEdgeNode1VertDistItem
-lcl_SetMetricValueAndSave_new(rAttrs, *m_xMtrFldVert1, 
SDRATTR_EDGENODE1VERTDIST);
+SetMetricValueAndSave(rAttrs, *m_xMtrFldVert1, SDRATTR_EDGENODE1VERTDIST);
 
 // SdrEdgeNode2VertDistItem
-lcl_SetMetricValueAndSave_new(rAttrs, *m_xMtrFldVert2, 
SDRATTR_EDGENODE2VERTDIST);
+SetMetricValueAndSave(rAttrs, *m_xMtrFldVert2, SDRATTR_EDGENODE2VERTDIST);
 
 // SdrEdgeLine1DeltaItem
-lcl_SetMetricValueAndSave_new(rAttrs, *m_xMtrFldLine1, 
SDRATTR_EDGELINE1DELTA);
+SetMetricValueAndSave(rAttrs, *m_xMtrFldLine1, SDRATTR_EDGELINE1DELTA);
 
 // SdrEdgeLine2DeltaItem
-lcl_SetMetricValueAndSave_new(rAttrs, *m_xMtrFldLine2, 
SDRATTR_EDGELINE2DELTA);
+SetMetricValueAndSave(rAttrs, *m_xMtrFldLine2, SDRATTR_EDGELINE2DELTA);
 
 // SdrEdgeLine3DeltaItem
-lcl_SetMetricValueAndSave_new(rAttrs, *m_xMtrFldLine3, 
SDRATTR_EDGELINE3DELTA);
+SetMetricValueAndSave(rAttrs, *m_xMtrFldLine3, SDRATTR_EDGELINE3DELTA);
 
 // SdrEdgeLineDeltaAnzItem
 pItem = GetItem( *rAttrs, SDRATTR_EDGELINEDELTACOUNT );


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

2023-06-04 Thread Tomaž Vajngerl (via logerrit)
 cui/source/tabpages/border.cxx   |4 
 cui/source/tabpages/chardlg.cxx  |   34 ++-
 cui/source/tabpages/tpcolor.cxx  |   32 --
 editeng/source/items/borderline.cxx  |   22 +-
 editeng/source/items/frmitems.cxx|   68 ++
 editeng/source/items/textitem.cxx|   39 ++-
 include/editeng/borderline.hxx   |   19 +
 include/editeng/boxitem.hxx  |   17 +
 include/editeng/memberids.h  |   17 +
 include/editeng/udlnitem.hxx |   26 +-
 include/svx/frmsel.hxx   |2 
 svx/source/dialog/frmsel.cxx |6 
 svx/source/unodraw/unobrushitemhelper.cxx|   15 -
 sw/inc/unoprnms.hxx  |   20 +
 sw/source/core/docnode/ndtbl1.cxx|8 
 sw/source/core/model/ThemeColorChanger.cxx   |  297 +--
 sw/source/core/unocore/unomap.cxx|   23 +-
 sw/source/core/unocore/unomap1.cxx   |   30 ++
 sw/source/core/unocore/unomapproperties.hxx  |   27 ++
 sw/source/uibase/docvw/edtwin.cxx|2 
 sw/source/uibase/inc/uitool.hxx  |3 
 sw/source/uibase/shells/basesh.cxx   |6 
 sw/source/uibase/shells/frmsh.cxx|   16 -
 sw/source/uibase/shells/textsh1.cxx  |   34 +--
 sw/source/uibase/sidebar/PageStylesPanel.cxx |5 
 sw/source/uibase/utlui/uitool.cxx|7 
 26 files changed, 644 insertions(+), 135 deletions(-)

New commits:
commit cc6db9f418cae422a4733163f85801c5a14f47c8
Author: Tomaž Vajngerl 
AuthorDate: Tue May 30 21:11:28 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sun Jun 4 18:27:45 2023 +0200

sw: border and background theme color support for multiple props.

This adds support for theme colors for multiple properties that
are stored in SvxBoxItem and SvxBrushItem / XFillColorItem. For
those items the ComplexColor member variable was introduced.

The UNO properties for the colors are added.

The properties with the added support includes paragraph border
and background + styles, page border and  background, frame border
and background + styles.

The ThemeColorChanges has been extended to support changing the
colors for those propertes.

Color picker and tab pages have been fixed so they pass or set
the theme color properties to the items.

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

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 9b94bc0eb28a..549ab533410a 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -1234,8 +1234,8 @@ IMPL_LINK_NOARG(SvxBorderTabPage, SelSdwHdl_Impl, 
ValueSet*, void)
 
 IMPL_LINK(SvxBorderTabPage, SelColHdl_Impl, ColorListBox&, rColorBox, void)
 {
-Color aColor = rColorBox.GetSelectEntryColor();
-m_aFrameSel.SetColorToSelection(aColor);
+NamedColor aNamedColor = rColorBox.GetSelectedEntry();
+m_aFrameSel.SetColorToSelection(aNamedColor.m_aColor, 
aNamedColor.getComplexColor());
 }
 
 IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthLBHdl_Impl, weld::ComboBox&, void)
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 7a8788728b46..ace220bcc5c0 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2095,21 +2095,26 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet )
 //! item-state in the 'rOldSet' will be invalid. In this case
 //! changing the underline style will be allowed if a style is
 //! selected in the listbox.
-bool bAllowChg = nPos != -1  &&
+bool bAllowChange = nPos != -1  &&
  SfxItemState::DEFAULT > rOldSet.GetItemState( nWhich 
);
 
 const SvxUnderlineItem& rItem = *static_cast(pOld);
-if ( rItem.GetValue() == eUnder &&
- ( LINESTYLE_NONE == eUnder || rItem.GetColor() == 
m_xUnderlineColorLB->GetSelectEntryColor() ) &&
- ! bAllowChg )
+if (rItem.GetValue() == eUnder &&
+ (LINESTYLE_NONE == eUnder || (rItem.GetColor() == 
m_xUnderlineColorLB->GetSelectEntryColor() &&
+   rItem.getComplexColor() == 
m_xUnderlineColorLB->GetSelectedEntry().getComplexColor())) &&
+ !bAllowChange)
+{
 bChanged = false;
+}
 }
 
 if ( bChanged )
 {
 SvxUnderlineItem aNewItem( eUnder, nWhich );
-aNewItem.SetColor( m_xUnderlineColorLB->GetSelectEntryColor() );
-rSet->Put( aNewItem );
+auto aNamedColor = m_xUnderlineColorLB->GetSelectedEntry();
+aNewItem.SetColor(aNamedColor.m_aColor);
+aNewItem.setComplexColor(aNamedColor.getComplexColor());
+rSet->Put(aNewItem);
 

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

2023-06-02 Thread Mike Kaganski (via logerrit)
 cui/source/options/optlingu.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 00a44a080539fa5d7cbd9cc21442b500b66164ef
Author: Mike Kaganski 
AuthorDate: Fri Jun 2 22:17:56 2023 +0300
Commit: Mike Kaganski 
CommitDate: Fri Jun 2 22:20:00 2023 +0200

tdf#155652: use UI language for language service display names

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

diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index d04de6aed890..9184460cbec3 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -559,7 +559,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
 uno::Reference< XComponentContext > xContext = 
::comphelper::getProcessComponentContext();
 xLinguSrvcMgr = LinguServiceManager::create(xContext);
 
-const Locale& rCurrentLocale = 
Application::GetSettings().GetLanguageTag().getLocale();
+const Locale& rCurrentLocale = 
Application::GetSettings().GetUILanguageTag().getLocale();
 Sequence aArgs
 {
 Any(LinguMgr::GetLinguPropertySet()),


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

2023-06-02 Thread Baole Fang (via logerrit)
 cui/source/options/connpooloptions.cxx |2 +-
 cui/source/options/optgdlg.cxx |6 +++---
 cui/source/options/optlingu.cxx|4 ++--
 cui/source/options/optsave.cxx |2 +-
 cui/source/options/treeopt.cxx |2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 69a3bcdaa54700a372151af52ccfbb0deed9db45
Author: Baole Fang 
AuthorDate: Sat May 27 13:23:25 2023 -0400
Commit: Mike Kaganski 
CommitDate: Fri Jun 2 17:02:33 2023 +0200

tdf#43157: Clean up OSL_FAIL

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

diff --git a/cui/source/options/connpooloptions.cxx 
b/cui/source/options/connpooloptions.cxx
index c067af0c3e47..80c202a78c0b 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -145,7 +145,7 @@ namespace offapp
 UpdateDriverList(pDriverSettings->getSettings());
 else
 {
-OSL_FAIL("ConnectionPoolOptionsPage::implInitControls: missing the 
DriverTimeouts item!");
+SAL_WARN("cui.options", 
"ConnectionPoolOptionsPage::implInitControls: missing the DriverTimeouts 
item!");
 UpdateDriverList(DriverPoolingSettings());
 }
 saveDriverList();
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 249d7b0318b6..da546d760d05 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -702,7 +702,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 case 2: eSet = SFX_SYMBOLS_SIZE_LARGE; break;
 case 3: eSet = SFX_SYMBOLS_SIZE_32; break;
 default:
-OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of 
m_xIconSizeLB should not be possible!" );
+SAL_WARN("cui.options", "OfaViewTabPage::FillItemSet(): This 
state of m_xIconSizeLB should not be possible!");
 }
 aMiscOptions.SetSymbolsSize( eSet );
 }
@@ -718,7 +718,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 case 1: eSet = ToolBoxButtonSize::Small; break;
 case 2: eSet = ToolBoxButtonSize::Large; break;
 default:
-OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of 
m_xSidebarIconSizeLB should not be possible!" );
+SAL_WARN("cui.options", "OfaViewTabPage::FillItemSet(): This 
state of m_xSidebarIconSizeLB should not be possible!");
 }
 
officecfg::Office::Common::Misc::SidebarIconSize::set(static_cast(eSet),
 xChanges);
 }
@@ -734,7 +734,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 case 1: eSet = ToolBoxButtonSize::Small; break;
 case 2: eSet = ToolBoxButtonSize::Large; break;
 default:
-OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of 
m_xNotebookbarIconSizeLB should not be possible!" );
+SAL_WARN("cui.options", "OfaViewTabPage::FillItemSet(): This 
state of m_xNotebookbarIconSizeLB should not be possible!");
 }
 
officecfg::Office::Common::Misc::NotebookbarIconSize::set(static_cast(eSet),
 xChanges);
 }
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 584c86c5f7d6..d04de6aed890 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1519,7 +1519,7 @@ IMPL_LINK(SvxLinguTabPage, ClickHdl_Impl, weld::Button&, 
rBtn, void)
 }
 else
 {
-OSL_FAIL( "rBtn unexpected value" );
+SAL_WARN("cui.options", "rBtn unexpected value");
 }
 }
 
@@ -1551,7 +1551,7 @@ IMPL_LINK(SvxLinguTabPage, SelectHdl_Impl, 
weld::TreeView&, rBox, void)
 }
 else
 {
-OSL_FAIL( "rBox unexpected value" );
+SAL_WARN("cui.options", "rBtn unexpected value");
 }
 }
 
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 7799da84c8b6..56e0f4486730 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -422,7 +422,7 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 case  APP_IMPRESS   : sReplace = 
"com.sun.star.presentation.PresentationDocument";break;
 case  APP_DRAW  : sReplace = 
"com.sun.star.drawing.DrawingDocument";break;
 case  APP_MATH  : sReplace = 
"com.sun.star.formula.FormulaProperties";break;
-default: OSL_FAIL("illegal user data");
+default: SAL_WARN("cui.options", "illegal user data");
 }
 sCommand = sCommand.replaceFirst("%1", sReplace);
 Reference< XEnumeration > xList = 
xQuery->createSubSetEnumerationByQuery(sCommand);
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index c32fb8d5fa7e..98d8a3e77c7d 100644

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

2023-06-01 Thread Tomaž Vajngerl (via logerrit)
 cui/source/inc/cuitabarea.hxx   |4 -
 cui/source/tabpages/tpcolor.cxx |   91 
 include/svx/Palette.hxx |   31 +++--
 3 files changed, 76 insertions(+), 50 deletions(-)

New commits:
commit d7d2b172065f90aa2f61c0216f3722e868ae76a1
Author: Tomaž Vajngerl 
AuthorDate: Mon May 29 19:03:33 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Jun 1 18:26:14 2023 +0200

prefix aPreviousColor and aCurrentColor in SvxColorTabPage

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

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 7399f03eb0be..2d6c713236da 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -657,8 +657,8 @@ private:
 
 ColorModel  eCM;
 
-Color   aPreviousColor;
-NamedColor aCurrentColor;
+Color m_aPreviousColor;
+NamedColor m_aCurrentColor;
 
 PaletteManager maPaletteManager;
 SvxXRectPreview m_aCtlPreviewOld;
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index bdefcf10114d..056afe822e7a 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -238,25 +238,25 @@ bool SvxColorTabPage::FillItemSet( SfxItemSet* rSet )
 {
 Color aColor = m_xValSetColorList->GetItemColor( 
m_xValSetColorList->GetSelectedItemId() );
 OUString sColorName;
-if ( aCurrentColor.m_aColor == aColor )
+if (m_aCurrentColor.m_aColor == aColor)
sColorName = m_xValSetColorList->GetItemText( 
m_xValSetColorList->GetSelectedItemId() );
 else
-   sColorName = "#" + 
aCurrentColor.m_aColor.AsRGBHexString().toAsciiUpperCase();
-maPaletteManager.AddRecentColor( aCurrentColor.m_aColor, sColorName );
-XFillColorItem aColorItem( sColorName, aCurrentColor.m_aColor );
-model::ThemeColorType eType = 
model::convertToThemeColorType(aCurrentColor.m_nThemeIndex);
+   sColorName = "#" + 
m_aCurrentColor.m_aColor.AsRGBHexString().toAsciiUpperCase();
+maPaletteManager.AddRecentColor( m_aCurrentColor.m_aColor, sColorName );
+XFillColorItem aColorItem( sColorName, m_aCurrentColor.m_aColor );
+model::ThemeColorType eType = 
model::convertToThemeColorType(m_aCurrentColor.m_nThemeIndex);
 if (eType != model::ThemeColorType::Unknown)
 {
 aColorItem.getComplexColor().setSchemeColor(eType);
 }
 aColorItem.getComplexColor().clearTransformations();
-if (aCurrentColor.m_nLumMod != 1)
+if (m_aCurrentColor.m_nLumMod != 1)
 {
-
aColorItem.getComplexColor().addTransformation({model::TransformationType::LumMod,
 aCurrentColor.m_nLumMod});
+
aColorItem.getComplexColor().addTransformation({model::TransformationType::LumMod,
 m_aCurrentColor.m_nLumMod});
 }
-if (aCurrentColor.m_nLumOff != 0)
+if (m_aCurrentColor.m_nLumOff != 0)
 {
-
aColorItem.getComplexColor().addTransformation({model::TransformationType::LumOff,
 aCurrentColor.m_nLumOff});
+
aColorItem.getComplexColor().addTransformation({model::TransformationType::LumOff,
 m_aCurrentColor.m_nLumOff});
 }
 rSet->Put( aColorItem );
 rSet->Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
@@ -278,7 +278,7 @@ void SvxColorTabPage::Reset( const SfxItemSet* rSet )
 if ( nState >= SfxItemState::DEFAULT )
 {
 XFillColorItem aColorItem( rSet->Get( XATTR_FILLCOLOR ) );
-aPreviousColor = aColorItem.GetColorValue();
+m_aPreviousColor = aColorItem.GetColorValue();
 aNewColor = aColorItem.GetColorValue();
 }
 
@@ -304,12 +304,12 @@ std::unique_ptr 
SvxColorTabPage::Create(weld::Container* pPage, weld
 IMPL_LINK_NOARG(SvxColorTabPage, SpinValueHdl_Impl, weld::SpinButton&, void)
 {
 // read current MtrFields, if cmyk, then k-value as transparency
-aCurrentColor.m_aColor = 
Color(static_cast(PercentToColor_Impl(m_xRcustom->get_value())),
+m_aCurrentColor.m_aColor = 
Color(static_cast(PercentToColor_Impl(m_xRcustom->get_value())),
   
static_cast(PercentToColor_Impl(m_xGcustom->get_value())),
   
static_cast(PercentToColor_Impl(m_xBcustom->get_value(;
 UpdateColorValues();
 
-rXFSet.Put( XFillColorItem( OUString(), aCurrentColor.m_aColor ) );
+rXFSet.Put( XFillColorItem( OUString(), m_aCurrentColor.m_aColor ) );
 m_aCtlPreviewNew.SetAttributes( aXFillAttr.GetItemSet() );
 
 m_aCtlPreviewNew.Invalidate();
@@ -318,13 +318,13 @@ IMPL_LINK_NOARG(SvxColorTabPage, SpinValueHdl_Impl, 
weld::SpinButton&, void)
 IMPL_LINK_NOARG(SvxColorTabPage, MetricSpinValueHdl_Impl, 
weld::MetricSpinButton&, void)
 {
 // read current MtrFields, if cmyk, then k-value as transparency
-aCurrentColor.m_aColor = Color(ColorTransparency, 

  1   2   3   4   5   6   7   8   9   10   >