[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - dbaccess/source include/sfx2 sc/source sfx2/source

2023-11-09 Thread Caolán McNamara (via logerrit)
 dbaccess/source/core/dataaccess/ModelImpl.cxx |3 +-
 include/sfx2/docmacromode.hxx |4 ++-
 include/sfx2/objsh.hxx|3 ++
 sc/source/core/data/global.cxx|   34 +-
 sfx2/source/doc/docmacromode.cxx  |8 --
 sfx2/source/doc/objmisc.cxx   |8 +-
 sfx2/source/doc/objxtor.cxx   |1 
 sfx2/source/inc/objshimp.hxx  |3 +-
 8 files changed, 57 insertions(+), 7 deletions(-)

New commits:
commit 113e16674e94955702edde514a9fb86fbe70b3ae
Author: Caolán McNamara 
AuthorDate: Fri Nov 3 17:26:25 2023 +
Commit: Miklos Vajna 
CommitDate: Fri Nov 10 08:14:06 2023 +0100

default to ignoring libreoffice special-purpose protocols in calc hyperlink

Change-Id: Ib9f62be3acc05f24ca234dec0fec21e24579e9de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158911
Tested-by: Jenkins
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit b6062623b4d69c79e90e9365ac7c5e7f11986793)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159046
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx 
b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 3e21289dbe9a..e399d5da7067 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1125,7 +1125,8 @@ bool ODatabaseModelImpl::checkMacrosOnLoading()
 {
 Reference< XInteractionHandler > xInteraction;
 xInteraction = m_aMediaDescriptor.getOrDefault( "InteractionHandler", 
xInteraction );
-return m_aMacroMode.checkMacrosOnLoading( xInteraction );
+const bool bHasMacros = m_aMacroMode.hasMacros();
+return m_aMacroMode.checkMacrosOnLoading(xInteraction, false 
/*HasValidContentSignature*/, bHasMacros);
 }
 
 void ODatabaseModelImpl::resetMacroExecutionMode()
diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index 7ed42f6a14dd..0acb44cbfbb1 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -264,6 +264,8 @@ namespace sfx2
 */
 static bool storageHasMacros( const css::uno::Reference< 
css::embed::XStorage >& _rxStorage );
 
+bool hasMacros() const;
+
 static bool containerHasBasicMacros( const css::uno::Reference< 
css::script::XLibraryContainer >& xContainer );
 /** checks the macro execution mode while loading the document.
 
@@ -291,7 +293,7 @@ namespace sfx2
 bool
 checkMacrosOnLoading(
 const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
-bool bHasValidContentSignature = false
+bool bHasValidContentSignature, bool bHasMacros
 );
 
 private:
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index e447b4297362..5a3cd8699663 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -428,6 +428,9 @@ public:
 voidSetMacroCallsSeenWhileLoading();
 boolGetMacroCallsSeenWhileLoading() const;
 
+// true if the document had macros (or similar) on load to trigger warning 
user
+boolGetHadCheckedMacrosOnLoad() const;
+
 const css::uno::Sequence< css::beans::PropertyValue >& 
GetModifyPasswordInfo() const;
 boolSetModifyPasswordInfo( const 
css::uno::Sequence< css::beans::PropertyValue >& aInfo );
 
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 1e8a0cb2158c..f8989403344c 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -29,7 +29,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -39,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -820,7 +823,7 @@ void ScGlobal::OpenURL(const OUString& rURL, const 
OUString& rTarget, bool bIgno
 
 OUString aUrlName( rURL );
 SfxViewFrame* pFrame = nullptr;
-const SfxObjectShell* pObjShell = nullptr;
+SfxObjectShell* pObjShell = nullptr;
 OUString aReferName;
 if ( pScActiveViewShell )
 {
@@ -854,6 +857,35 @@ void ScGlobal::OpenURL(const OUString& rURL, const 
OUString& rTarget, bool bIgno
 aUrlName = aNewUrlName;
 }
 
+if (INetURLObject(aUrlName).IsExoticProtocol())
+{
+// Default to ignoring exotic protocols
+bool bAllow = false;
+if (pObjShell)
+{
+// If the document had macros when loaded then follow the allowed 
macro-mode
+if (pObjShell->GetHadCheckedMacrosOnLoad())
+bAllow = pObjShell->AdjustMacroMode();
+else // otherwise ask the user, defaulting to cancel
+{
+assert(pFrame && "if w

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/source xmloff/source

2023-11-09 Thread Skyler Grey (via logerrit)
 sw/source/filter/ww8/ww8atr.cxx |3 +++
 xmloff/source/text/txtfldi.cxx  |3 +++
 2 files changed, 6 insertions(+)

New commits:
commit 7471de2849e076304b6e59f4d78b83a272f46607
Author: Skyler Grey 
AuthorDate: Thu Nov 9 16:57:50 2023 +
Commit: Miklos Vajna 
CommitDate: Fri Nov 10 08:13:11 2023 +0100

Fix STYLEREF crashes and forwards-compatibility

This commit fixes a crash in STYLEREF caused by a dereferenced nullptr
when serializing chapter fields for .doc export. Along with the STYLEREF
changes, I also changed the chapter export logic to allow exporting
chapter fields when they were in document text, and to use the style of
the thing they pointed to. Unfortunately, in some cases that would be
null. This commit makes us fall back to previous behavior in those
cases.

This commit also adds import logic for styleref on the TEXT namespace in
addition to LO_EXT. This is important as if/when the STYLEREF field is
no longer LO_EXT we want to be able to open new documents in old
versions of libreoffice. This was erroneously missed when we changed
TEXT references to LO_EXT in our export logic.

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

diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 62ae243168ec..6e73e9255495 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3430,6 +3430,9 @@ void AttributeOutputBase::TextField( const SwFormatField& 
rField )
 // Otherwise, get the style of the text and use it as the 
style name
 const SwTextNode* pOutlineNd = 
pTextNd->FindOutlineNodeOfLevel(aCopy.GetLevel());
 
+if (!pOutlineNd) break;
+// Sometimes we can't find the outline node, in that case 
let's just fallback to exporting the text
+
 sStr = FieldString(ww::eSTYLEREF)
  + 
GetExport().GetStyleRefName(pOutlineNd->GetFormatColl()->GetName());
 }
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 4b43240878af..07496cb74c05 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -408,6 +408,7 @@ XMLTextFieldImportContext::CreateTextFieldImportContext(
 case XML_ELEMENT(TEXT, XML_BOOKMARK_REF):
 case XML_ELEMENT(TEXT, XML_NOTE_REF):
 case XML_ELEMENT(TEXT, XML_SEQUENCE_REF):
+case XML_ELEMENT(TEXT, XML_STYLE_REF):
 case XML_ELEMENT(LO_EXT, XML_STYLE_REF):
 pContext = new XMLReferenceFieldImportContext( rImport, rHlp, 
nToken );
 break;
@@ -2512,6 +2513,7 @@ void XMLReferenceFieldImportContext::startFastElement(
 case XML_ELEMENT(TEXT, XML_SEQUENCE_REF):
 nSource = ReferenceFieldSource::SEQUENCE_FIELD;
 break;
+case XML_ELEMENT(TEXT, XML_STYLE_REF):
 case XML_ELEMENT(LO_EXT, XML_STYLE_REF):
 nSource = ReferenceFieldSource::STYLE;
 break;
@@ -2593,6 +2595,7 @@ void XMLReferenceFieldImportContext::PrepareField(
 {
 case XML_ELEMENT(TEXT, XML_REFERENCE_REF):
 case XML_ELEMENT(TEXT, XML_BOOKMARK_REF):
+case XML_ELEMENT(TEXT, XML_STYLE_REF):
 case XML_ELEMENT(LO_EXT, XML_STYLE_REF):
 xPropertySet->setPropertyValue("SourceName", Any(sName));
 xPropertySet->setPropertyValue("ReferenceFieldFlags", Any(nFlags));


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

2023-11-09 Thread Skyler Grey (via logerrit)
 sw/source/filter/ww8/ww8atr.cxx |3 +++
 xmloff/source/text/txtfldi.cxx  |3 +++
 2 files changed, 6 insertions(+)

New commits:
commit 7924d8fc274bb611c829443e0eb1a53d883cc9a3
Author: Skyler Grey 
AuthorDate: Thu Nov 9 16:57:50 2023 +
Commit: Miklos Vajna 
CommitDate: Fri Nov 10 08:12:28 2023 +0100

Fix STYLEREF crashes and forwards-compatibility

This commit fixes a crash in STYLEREF caused by a dereferenced nullptr
when serializing chapter fields for .doc export. Along with the STYLEREF
changes, I also changed the chapter export logic to allow exporting
chapter fields when they were in document text, and to use the style of
the thing they pointed to. Unfortunately, in some cases that would be
null. This commit makes us fall back to previous behavior in those
cases.

This commit also adds import logic for styleref on the TEXT namespace in
addition to LO_EXT. This is important as if/when the STYLEREF field is
no longer LO_EXT we want to be able to open new documents in old
versions of libreoffice. This was erroneously missed when we changed
TEXT references to LO_EXT in our export logic.

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

diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 79446939957e..4949c7ffe6fd 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3456,6 +3456,9 @@ void AttributeOutputBase::TextField( const SwFormatField& 
rField )
 // Otherwise, get the style of the text and use it as the 
style name
 const SwTextNode* pOutlineNd = 
pTextNd->FindOutlineNodeOfLevel(aCopy.GetLevel());
 
+if (!pOutlineNd) break;
+// Sometimes we can't find the outline node, in that case 
let's just fallback to exporting the text
+
 sStr = FieldString(ww::eSTYLEREF)
  + 
GetExport().GetStyleRefName(pOutlineNd->GetFormatColl()->GetName());
 }
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index e0f6a01ecca6..1228e232d328 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -408,6 +408,7 @@ XMLTextFieldImportContext::CreateTextFieldImportContext(
 case XML_ELEMENT(TEXT, XML_BOOKMARK_REF):
 case XML_ELEMENT(TEXT, XML_NOTE_REF):
 case XML_ELEMENT(TEXT, XML_SEQUENCE_REF):
+case XML_ELEMENT(TEXT, XML_STYLE_REF):
 case XML_ELEMENT(LO_EXT, XML_STYLE_REF):
 pContext = new XMLReferenceFieldImportContext( rImport, rHlp, 
nToken );
 break;
@@ -2512,6 +2513,7 @@ void XMLReferenceFieldImportContext::startFastElement(
 case XML_ELEMENT(TEXT, XML_SEQUENCE_REF):
 nSource = ReferenceFieldSource::SEQUENCE_FIELD;
 break;
+case XML_ELEMENT(TEXT, XML_STYLE_REF):
 case XML_ELEMENT(LO_EXT, XML_STYLE_REF):
 nSource = ReferenceFieldSource::STYLE;
 break;
@@ -2593,6 +2595,7 @@ void XMLReferenceFieldImportContext::PrepareField(
 {
 case XML_ELEMENT(TEXT, XML_REFERENCE_REF):
 case XML_ELEMENT(TEXT, XML_BOOKMARK_REF):
+case XML_ELEMENT(TEXT, XML_STYLE_REF):
 case XML_ELEMENT(LO_EXT, XML_STYLE_REF):
 xPropertySet->setPropertyValue("SourceName", Any(sName));
 xPropertySet->setPropertyValue("ReferenceFieldFlags", Any(nFlags));


[Libreoffice-commits] core.git: 2 commits - include/comphelper sw/source sw/uiconfig

2023-11-09 Thread Balazs Varga (via logerrit)
 include/comphelper/configuration.hxx |7 
 sw/source/ui/config/optload.cxx  |   54 +++
 sw/source/uibase/inc/optload.hxx |   11 
 sw/uiconfig/swriter/ui/optgeneralpage.ui |  497 +++
 4 files changed, 387 insertions(+), 182 deletions(-)

New commits:
commit 0012f23ca0b59edbb38da055d3388b465146f7eb
Author: Balazs Varga 
AuthorDate: Thu Nov 9 20:52:42 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 10 08:08:01 2023 +0100

tdf#158007 - UI: Part 23 - Unify lockdown behavior of Options dialog

for Writer - General Page.

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

diff --git a/include/comphelper/configuration.hxx 
b/include/comphelper/configuration.hxx
index 45228b700944..652e9afaa640 100644
--- a/include/comphelper/configuration.hxx
+++ b/include/comphelper/configuration.hxx
@@ -246,6 +246,13 @@ private:
 /// to access each given localized configuration property.
 template< typename T, typename U > struct ConfigurationLocalizedProperty
 {
+/// Get the read-only status of the given (localized) configuration
+/// property.
+static bool isReadOnly()
+{
+return detail::ConfigurationWrapper::get().isReadOnly(T::path());
+}
+
 /// Get the value of the given localized configuration property, for the
 /// locale currently set at the
 /// com.sun.star.configuration.theDefaultProvider.
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 92e754113aff..675a2d48e8d6 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -83,16 +83,27 @@ SwLoadOptPage::SwLoadOptPage(weld::Container* pPage, 
weld::DialogController* pCo
 , m_xAlwaysRB(m_xBuilder->weld_radio_button("always"))
 , m_xRequestRB(m_xBuilder->weld_radio_button("onrequest"))
 , m_xNeverRB(m_xBuilder->weld_radio_button("never"))
+, m_xGridupdatelink(m_xBuilder->weld_widget("gridupdatelink"))
+, m_xUpdateLinkImg(m_xBuilder->weld_widget("lockupdatelink"))
 , m_xAutoUpdateFields(m_xBuilder->weld_check_button("updatefields"))
+, m_xAutoUpdateFieldsImg(m_xBuilder->weld_widget("lockupdatefields"))
 , m_xAutoUpdateCharts(m_xBuilder->weld_check_button("updatecharts"))
+, m_xAutoUpdateChartsImg(m_xBuilder->weld_widget("lockupdatecharts"))
 , m_xMetricLB(m_xBuilder->weld_combo_box("metric"))
+, m_xMetricImg(m_xBuilder->weld_widget("lockmetric"))
 , m_xTabFT(m_xBuilder->weld_label("tablabel"))
 , m_xTabMF(m_xBuilder->weld_metric_spin_button("tab", FieldUnit::CM))
+, m_xTabImg(m_xBuilder->weld_widget("locktab"))
 , m_xUseSquaredPageMode(m_xBuilder->weld_check_button("squaremode"))
+, m_xUseSquaredPageModeImg(m_xBuilder->weld_widget("locksquaremode"))
 , m_xUseCharUnit(m_xBuilder->weld_check_button("usecharunit"))
+, m_xUseCharUnitImg(m_xBuilder->weld_widget("lockusecharunit"))
 , m_xWordCountED(m_xBuilder->weld_entry("wordcount"))
+, m_xWordCountImg(m_xBuilder->weld_widget("lockwordcount"))
 , 
m_xShowStandardizedPageCount(m_xBuilder->weld_check_button("standardizedpageshow"))
+, 
m_xShowStandardizedPageCountImg(m_xBuilder->weld_widget("lockstandardizedpageshow"))
 , 
m_xStandardizedPageSizeNF(m_xBuilder->weld_spin_button("standardpagesize"))
+, 
m_xStandardizedPageSizeImg(m_xBuilder->weld_widget("lockstandardpagesize"))
 {
 for (sal_uInt32 i = 0; i < SwFieldUnitTable::Count(); ++i)
 {
@@ -362,16 +373,51 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet)
 }
 m_xUseCharUnit->save_state();
 
+bool bReadOnly = 
officecfg::Office::Writer::Content::Update::Link::isReadOnly();
+m_xGridupdatelink->set_sensitive(!bReadOnly);
+m_xUpdateLinkImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Content::Update::Field::isReadOnly();
+m_xAutoUpdateFields->set_sensitive(!bReadOnly);
+m_xAutoUpdateFieldsImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Content::Update::Chart::isReadOnly();
+m_xAutoUpdateCharts->set_sensitive(!bReadOnly);
+m_xAutoUpdateChartsImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Layout::Other::MeasureUnit::isReadOnly();
+m_xMetricLB->set_sensitive(!bReadOnly);
+m_xMetricImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Layout::Other::TabStop::isReadOnly();
+m_xTabMF->set_sensitive(!bReadOnly);
+m_xTabImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Layout::Other::ApplyCharUnit::isReadOnly();
+m_xUseCharUnit->set_sensitive(!bReadOnly);
+m_xUseCharUnitImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Layout::Other::IsSquaredPageMode::isReadOnly();
+m_xUseSquaredPageMode->set_sensitive(!bReadOnly);
+m_xUseSquaredPageModeImg->set_visible(b

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

2023-11-09 Thread Miklos Vajna (via logerrit)
 sw/source/core/inc/layfrm.hxx   |1 +
 sw/source/core/layout/wsfrm.cxx |   12 
 sw/source/core/text/xmldump.cxx |7 ---
 3 files changed, 13 insertions(+), 7 deletions(-)

New commits:
commit 052c917d97aa88f21008cc3d978c6ca2ad83c88e
Author: Miklos Vajna 
AuthorDate: Thu Nov 9 19:59:45 2023 +0100
Commit: Miklos Vajna 
CommitDate: Fri Nov 10 08:06:47 2023 +0100

sw layout xml dump: avoid a static_cast in SwFrame::dumpAsXmlAttributes()

Move the code to SwLayoutFrame from SwFrame, then no cast is needed.

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

diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index b0f981477499..52e22829d4ad 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -183,6 +183,7 @@ public:
 m_VertPosOrientFramesFor.end(), pObj),
 m_VertPosOrientFramesFor.end());
 }
+void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override;
 };
 
 /**
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 7fdd19ace322..1cd01d53c680 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -4139,6 +4139,18 @@ void SwLayoutFrame::FormatWidthCols( const SwBorderAttrs 
&rAttrs,
 }
 }
 
+void SwLayoutFrame::dumpAsXmlAttributes(xmlTextWriterPtr writer) const
+{
+SwFrame::dumpAsXmlAttributes(writer);
+
+const SwFrameFormat* pFormat = GetFormat();
+if (pFormat)
+{
+(void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "format" ), 
"%p", pFormat);
+(void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( 
"formatName" ), "%s", BAD_CAST(pFormat->GetName().toUtf8().getStr()));
+}
+}
+
 static SwContentFrame* lcl_InvalidateSection( SwFrame *pCnt, SwInvalidateFlags 
nInv )
 {
 SwSectionFrame* pSect = pCnt->FindSctFrame();
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 019866a9acbd..445a0e306336 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -234,13 +234,6 @@ void SwFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer 
) const
 }
 (void)xmlTextWriterWriteAttribute(writer, BAD_CAST("WritingMode"), 
BAD_CAST(aMode.getStr()));
 }
-if (IsHeaderFrame() || IsFooterFrame())
-{
-const SwHeadFootFrame *pHeadFootFrame = static_cast(this);
-OUString aFormatName = pHeadFootFrame->GetFormat()->GetName();
-(void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtName" 
), "%s", BAD_CAST(OUStringToOString(aFormatName, 
RTL_TEXTENCODING_UTF8).getStr()));
-(void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtPtr" ), 
"%p", pHeadFootFrame->GetFormat());
-}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


Re: Testing CJK glyphs

2023-11-09 Thread Jun Nogata
Hi,

2023年11月10日(金) 10:18 Chris Sherlock :
> We seem to bundle Noto Sans in extras, but not the CJK variant. Is this 
> something we could look at including?

That would be nice. However, I think it would be difficult to bundle
it because of its very large size.
My idea would be to include it in a language pack. But that task would
be time consuming.

Now, for CJK, how about using Google's Noto CJK Font as a default font?
* https://github.com/notofonts/noto-cjk
For Japanese fonts for Windows and Mac, Yu Gothic and Yu Mincho are
used for OS bundled fonts. But, since they are OS bundled fonts, they
are not freely available.
Recently, BIZ UD Gothic and BIZ UD Mincho are also used. These are SIL OFL.
* https://github.com/googlefonts/morisawa-biz-ud-gothic
* https://github.com/googlefonts/morisawa-biz-ud-mincho

I haven't been able to find the cause yet, but using Propotional
Alternate Metrics in the font feature can cause the letter filling to
be wrong. I would be happy to find the cause of this problem.


2023年11月10日(金) 10:18 Chris Sherlock :
>
>
> Sent from my iPhone
>
> > On 9 Nov 2023, at 8:03 pm, Caolán McNamara  
> > wrote:
> >
> > On Thu, 2023-11-09 at 16:23 +1100, Chris Sherlock wrote:
> >> Just a quick question - I want to write a unit test that checks the
> >> glyph advancements for CJK glyphs.
> >>
> >> Specifically, I want to test the advancements of the following text:
> >>
> >> 根据10.1(37BA) Eng
> >>
> >> What font comes bundled with LibreOffice that I can use?
> >
> > My understanding is that we don't bundle a CJK font. I think the best
> > option is to follow the pattern of:
> > https://git.libreoffice.org/core/commit/6b178c6e88ec5a765ad2b3ccd98182286222f550
> > where you can see from the little font.readme how to make a small
> > testing font with just the subset of glyphs you need from (an
> > appropriately licensed) CJK font for the purposes of such a test.
>
> Thanks Caolán, that’s very helpful.
> We seem to bundle Noto Sans in extras, but not the CJK variant. Is this 
> something we could look at including?
>
> Chris

-- 
野方 純 (Jun Nogata) - mail: noga...@gmail.com
 - web: http://www.nofuture.tv/


[Libreoffice-commits] core.git: Branch 'feature/cib_contract49' - instsetoo_native/CustomTarget_install.mk solenv/bin

2023-11-09 Thread Christian Lohmaier (via logerrit)
 instsetoo_native/CustomTarget_install.mk |   16 
 solenv/bin/job-limiter.cpp   |  116 +++
 2 files changed, 131 insertions(+), 1 deletion(-)

New commits:
commit 4e1dcfe9947a57f70a394ffcc687ffb9029aff2b
Author: Christian Lohmaier 
AuthorDate: Fri Nov 3 15:41:39 2023 +0100
Commit: Thorsten Behrens 
CommitDate: Fri Nov 10 00:12:53 2023 +0100

limit parallelism during msi packaging stage to avoid cscript failures

with high parallelism there's a high risk of running into random
failures when calling WiLangId.vbs via cscript.

The limiter doesn't use make's jobserver since it is too easy to
deadlock the build since all jobs are started at once, consuming all
slots, but in addition all wait for an additional slot that never is
made available because all jobs are blocked waiting
All jobs being started at once and all jobs getting started from that
point on getting put under the limiter's control makes this simple
approach with separate grab/release calls possible. If they were spread
out the semaphore wouldn't be available (gets closed/removed as soon as
nothing waits for it anymore)

Change-Id: I345f2904a1d7e8989720722415fb51282ab3b05b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158886
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit edf6c155b0b22cbff2d255796c0541b644a5f245)

Fix typo

Change-Id: I84186bee245a95a74e92c974ca94bb81c31ee1ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158950
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
(cherry picked from commit 0053dfbabd8b6711ea7e9354e5792048931daf7c)

Fix typo

Change-Id: Ie41ca6c56bf44b04bd2d65b6cb64594d66295f24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158951
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
(cherry picked from commit 24e1d6dbd27fa6c37723b55bbab5f5b5cce279f2)

msi packaging job-limiter: use CXX_FOR_BUILD

since it is a build-tool it needs to match the arch of the platform the
build is performed, already had used ILIB_FOR_BUILD, but CXX was missed
and broke the build for the aarch64 daily tinderbox

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

diff --git a/instsetoo_native/CustomTarget_install.mk 
b/instsetoo_native/CustomTarget_install.mk
index f05b771fa107..aa18e827fda9 100644
--- a/instsetoo_native/CustomTarget_install.mk
+++ b/instsetoo_native/CustomTarget_install.mk
@@ -95,8 +95,19 @@ $(call 
gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_templates/%/Bin
$(call gb_Output_announce,setting up msi templates for type $* - 
copying binary assets,$(true),CPY,4)
rm -rf $@ && mkdir -p $@ && cd $@ && cp 
$(SRCDIR)/instsetoo_native/inc_common/windows/msi_templates/Binary/*.* ./
 
+gb_Make_JobLimiter := $(WORKDIR)/job-limiter.exe
+
+$(gb_Make_JobLimiter): $(SRCDIR)/solenv/bin/job-limiter.cpp
+   cd $(WORKDIR) && \
+   $(CXX_FOR_BUILD) $(SOLARINC) -EHsc $^ -link -LIBPATH:$(subst ;, 
-LIBPATH:,$(ILIB_FOR_BUILD)) || rm -f $@
+
 # with all languages the logfile name would be too long when building the 
windows installation set,
 # that's the reason for the substitution to multilang below in case more than 
just en-US is packaged
+# also for windows msi packaging parallel execution is reduced by the 
job-limiter. This only has any
+# effect when building with help and multiple languages, and it also won't 
affect the real time for
+# packaging (since packaging the main installer takes longer than packaging 
sdk and all helppacks
+# even with the reduced parallelism (the higher the parallelism, the higher 
the chance for random
+# failures during the cscript call to WiLangId.vbs)
 $(instsetoo_installer_targets): $(SRCDIR)/solenv/bin/make_installer.pl \
 $(foreach ulf,$(instsetoo_ULFLIST),$(call 
gb_CustomTarget_get_workdir,instsetoo_native/install)/win_ulffiles/$(ulf).ulf) \
 $(if $(filter-out WNT,$(OS)),\
@@ -104,12 +115,15 @@ $(instsetoo_installer_targets): 
$(SRCDIR)/solenv/bin/make_installer.pl \
 bin/find-requires-gnome.sh \
 bin/find-requires-x11.sh) \
 ,instsetoo_msi_templates) \
-$(call gb_Postprocess_get_target,AllModulesButInstsetNative) | 
instsetoo_wipe
+$(call gb_Postprocess_get_target,AllModulesButInstsetNative) \
+| instsetoo_wipe $(if $(filter msi,$(PKGFORMAT)),$(gb_Make_JobLimiter))
$(call gb_Output_announce,$(if $(filter 
en-US$(COMMA)%,$(instsetoo_installer_langs)),$(subst 
$(instsetoo_installer_langs),multilang,$@),$@),$(true),INS,1)
+   $(if $(filter %msi‧nostrip,$@),$(gb_Make_JobLimiter) grab)
$(call gb_Trace_StartRange,$@,INSTALLER)
$(call gb_Helper_print_on_error, \
$(

[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - instsetoo_native/CustomTarget_install.mk solenv/bin

2023-11-09 Thread Christian Lohmaier (via logerrit)
 instsetoo_native/CustomTarget_install.mk |   16 
 solenv/bin/job-limiter.cpp   |  116 +++
 2 files changed, 131 insertions(+), 1 deletion(-)

New commits:
commit 58f03414215dbb84bfd8875abe73b6521b83438b
Author: Christian Lohmaier 
AuthorDate: Fri Nov 3 15:41:39 2023 +0100
Commit: Thorsten Behrens 
CommitDate: Fri Nov 10 00:11:19 2023 +0100

limit parallelism during msi packaging stage to avoid cscript failures

with high parallelism there's a high risk of running into random
failures when calling WiLangId.vbs via cscript.

The limiter doesn't use make's jobserver since it is too easy to
deadlock the build since all jobs are started at once, consuming all
slots, but in addition all wait for an additional slot that never is
made available because all jobs are blocked waiting
All jobs being started at once and all jobs getting started from that
point on getting put under the limiter's control makes this simple
approach with separate grab/release calls possible. If they were spread
out the semaphore wouldn't be available (gets closed/removed as soon as
nothing waits for it anymore)

Change-Id: I345f2904a1d7e8989720722415fb51282ab3b05b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158886
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit edf6c155b0b22cbff2d255796c0541b644a5f245)

Fix typo

Change-Id: I84186bee245a95a74e92c974ca94bb81c31ee1ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158950
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
(cherry picked from commit 0053dfbabd8b6711ea7e9354e5792048931daf7c)

Fix typo

Change-Id: Ie41ca6c56bf44b04bd2d65b6cb64594d66295f24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158951
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
(cherry picked from commit 24e1d6dbd27fa6c37723b55bbab5f5b5cce279f2)

msi packaging job-limiter: use CXX_FOR_BUILD

since it is a build-tool it needs to match the arch of the platform the
build is performed, already had used ILIB_FOR_BUILD, but CXX was missed
and broke the build for the aarch64 daily tinderbox

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

diff --git a/instsetoo_native/CustomTarget_install.mk 
b/instsetoo_native/CustomTarget_install.mk
index f05b771fa107..aa18e827fda9 100644
--- a/instsetoo_native/CustomTarget_install.mk
+++ b/instsetoo_native/CustomTarget_install.mk
@@ -95,8 +95,19 @@ $(call 
gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_templates/%/Bin
$(call gb_Output_announce,setting up msi templates for type $* - 
copying binary assets,$(true),CPY,4)
rm -rf $@ && mkdir -p $@ && cd $@ && cp 
$(SRCDIR)/instsetoo_native/inc_common/windows/msi_templates/Binary/*.* ./
 
+gb_Make_JobLimiter := $(WORKDIR)/job-limiter.exe
+
+$(gb_Make_JobLimiter): $(SRCDIR)/solenv/bin/job-limiter.cpp
+   cd $(WORKDIR) && \
+   $(CXX_FOR_BUILD) $(SOLARINC) -EHsc $^ -link -LIBPATH:$(subst ;, 
-LIBPATH:,$(ILIB_FOR_BUILD)) || rm -f $@
+
 # with all languages the logfile name would be too long when building the 
windows installation set,
 # that's the reason for the substitution to multilang below in case more than 
just en-US is packaged
+# also for windows msi packaging parallel execution is reduced by the 
job-limiter. This only has any
+# effect when building with help and multiple languages, and it also won't 
affect the real time for
+# packaging (since packaging the main installer takes longer than packaging 
sdk and all helppacks
+# even with the reduced parallelism (the higher the parallelism, the higher 
the chance for random
+# failures during the cscript call to WiLangId.vbs)
 $(instsetoo_installer_targets): $(SRCDIR)/solenv/bin/make_installer.pl \
 $(foreach ulf,$(instsetoo_ULFLIST),$(call 
gb_CustomTarget_get_workdir,instsetoo_native/install)/win_ulffiles/$(ulf).ulf) \
 $(if $(filter-out WNT,$(OS)),\
@@ -104,12 +115,15 @@ $(instsetoo_installer_targets): 
$(SRCDIR)/solenv/bin/make_installer.pl \
 bin/find-requires-gnome.sh \
 bin/find-requires-x11.sh) \
 ,instsetoo_msi_templates) \
-$(call gb_Postprocess_get_target,AllModulesButInstsetNative) | 
instsetoo_wipe
+$(call gb_Postprocess_get_target,AllModulesButInstsetNative) \
+| instsetoo_wipe $(if $(filter msi,$(PKGFORMAT)),$(gb_Make_JobLimiter))
$(call gb_Output_announce,$(if $(filter 
en-US$(COMMA)%,$(instsetoo_installer_langs)),$(subst 
$(instsetoo_installer_langs),multilang,$@),$@),$(true),INS,1)
+   $(if $(filter %msi‧nostrip,$@),$(gb_Make_JobLimiter) grab)
$(call gb_Trace_StartRange,$@,INSTALLER)
$(call gb_Helper_print_on_error, \
$(

Re: Testing CJK glyphs

2023-11-09 Thread Chris Sherlock


Sent from my iPhone

> On 9 Nov 2023, at 8:03 pm, Caolán McNamara  
> wrote:
> 
> On Thu, 2023-11-09 at 16:23 +1100, Chris Sherlock wrote:
>> Just a quick question - I want to write a unit test that checks the
>> glyph advancements for CJK glyphs. 
>> 
>> Specifically, I want to test the advancements of the following text:
>> 
>> 根据10.1(37BA) Eng
>> 
>> What font comes bundled with LibreOffice that I can use?
> 
> My understanding is that we don't bundle a CJK font. I think the best
> option is to follow the pattern of:
> https://git.libreoffice.org/core/commit/6b178c6e88ec5a765ad2b3ccd98182286222f550
> where you can see from the little font.readme how to make a small
> testing font with just the subset of glyphs you need from (an
> appropriately licensed) CJK font for the purposes of such a test.

Thanks Caolán, that’s very helpful. 
We seem to bundle Noto Sans in extras, but not the CJK variant. Is this 
something we could look at including?

Chris

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/source extensions/source external/libcmis include/curlinit.hxx lingucomponent/source linguistic/source svl/source ucb/sourc

2023-11-09 Thread Michael Stahl (via logerrit)
 desktop/source/app/updater.cxx 
  |4 
 desktop/source/minidump/minidump.cxx   
  |4 
 extensions/source/update/check/download.cxx
  |4 
 
external/libcmis/0002-HttpSession-add-a-callback-that-can-be-used-to-confi.patch
 |  142 ++
 external/libcmis/UnpackedTarball_libcmis.mk
  |1 
 include/curlinit.hxx   
  |   59 
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx  
  |3 
 linguistic/source/translate.cxx
  |4 
 svl/source/crypto/cryptosign.cxx   
  |6 
 ucb/source/ucp/cmis/cmis_content.cxx   
  |5 
 ucb/source/ucp/ftp/ftploaderthread.cxx 
  |4 
 ucb/source/ucp/webdav-curl/CurlSession.cxx 
  |2 
 12 files changed, 238 insertions(+)

New commits:
commit 6bb273876fb608d51f00b20e8cf7393eea6ce6b4
Author: Michael Stahl 
AuthorDate: Fri Nov 3 20:16:09 2023 +0100
Commit: Andras Timar 
CommitDate: Thu Nov 9 21:22:34 2023 +0100

curl: mitigate migration to OpenSSL on Linux

The problem is that curl 8.3.0 removed the NSS backend, so we now
have no other choice than to use the bundled OpenSSL on Linux.

Currently any curl https connection fails with:

  CurlSession.cxx:963: curl_easy_perform failed: (60) SSL certificate 
problem: unable to get local issuer certificate

Apparently this requires manually telling curl which CA certificates to
trust; there is a configure flag --with-ca-bundle but that is useless as
it tries to load the file relative to whatever is the current working
directory, and also did i mention that there are at least 3 different
locations where a Linux system may store its system trusted CA
certificates because ALL ABOUT CHOICE.

So add a new header with an init function to try out various file
locations listed in this nice blog article and call it from way too many
places that independently use curl.


https://www.happyassassin.net/posts/2015/01/12/a-note-about-ssltls-trusted-certificate-stores-and-platforms/

TODO: perhaps bundle a cacert.pem as a fallback in case the system chose
to innovate by putting its certificates in yet another unexpected place

(regression from commit c2930ebff82c4f7ffe8377ab82627131f8544226)

Change-Id: Ibf1cc0069bc2ae011ecead9a4c2b455e94b01241
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158915
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 11f439b861922b9286b2e47ed326f3508a48d44e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159218
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx
index 5fb18dfad0bf..4e4d2cda413f 100644
--- a/desktop/source/app/updater.cxx
+++ b/desktop/source/app/updater.cxx
@@ -37,6 +37,8 @@
 #include 
 #include 
 #include 
+
+#include 
 #include 
 
 #include 
@@ -546,6 +548,8 @@ std::string download_content(const OString& rURL, bool 
bFile, OUString& rHash)
 if (!curl)
 return std::string();
 
+::InitCurl_easy(curl.get());
+
 curl_easy_setopt(curl.get(), CURLOPT_URL, rURL.getStr());
 curl_easy_setopt(curl.get(), CURLOPT_USERAGENT, kUserAgent);
 bool bUseProxy = false;
diff --git a/desktop/source/minidump/minidump.cxx 
b/desktop/source/minidump/minidump.cxx
index 0bf20f2aa419..7fbb0884987d 100644
--- a/desktop/source/minidump/minidump.cxx
+++ b/desktop/source/minidump/minidump.cxx
@@ -17,6 +17,8 @@
 
 #include 
 
+#include 
+
 #ifdef _WIN32
 #include 
 #include 
@@ -95,6 +97,8 @@ static bool uploadContent(std::map& 
parameters, std::s
 if (!curl)
 return false;
 
+::InitCurl_easy(curl);
+
 std::string proxy, proxy_user_pwd, ca_certificate_file, file, url, version;
 
 getProperty("Proxy", proxy, parameters);
diff --git a/extensions/source/update/check/download.cxx 
b/extensions/source/update/check/download.cxx
index ba371bdee570..cdbbe2c32734 100644
--- a/extensions/source/update/check/download.cxx
+++ b/extensions/source/update/check/download.cxx
@@ -23,6 +23,8 @@
 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -222,6 +224,8 @@ static bool curl_run(std::u16string_view rURL, OutData& 
out, const OString& aPro
 
 if( nullptr != pCURL )
 {
+::InitCurl_easy(pCURL);
+
 out.curl = pCURL;
 
 OString aURL(OUStringToOString(rURL, RTL_TEXTENCODING_UTF8));
diff --git 
a/external/libcmis/0002-HttpSession-add-a-callback-that-can-be-used-to-confi.patch
 
b/external/libcmis/0002-HttpSession-add-

[Libreoffice-commits] core.git: vcl/unx

2023-11-09 Thread Michael Weghorn (via logerrit)
 vcl/unx/gtk4/a11y.cxx |   47 +++
 1 file changed, 47 insertions(+)

New commits:
commit 3aca2d9776a871f15009a1aa70628ba3a03ee147
Author: Michael Weghorn 
AuthorDate: Thu Nov 9 15:31:57 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 21:00:05 2023 +0100

gtk4 a11y: Handle the "level" object attribute

Add initial handling/mapping for object attributes.

In LibreOffice and Gtk 3/ATK/AT-SPI, object attributes
are currently key-value pairs, so arbitrary attribute
names and values can be set.

For Gtk 4, there's currently a discussion on how
AT-SPI object attributes should be handled, s. [1].

One potential option is for them to be handled as
`GtkAccessibleProperty`s.

In any case, there's already a `GTK_ACCESSIBLE_PROPERTY_LEVEL`
property that matches the "level" object attribute that
Writer sets for headings to specify what heading level
this is (s. `SwAccessibleParagraph::getExtendedAttributes`)
and that the gtk3 VCL plugin reports as an ATK/AT-SPI
object attribute with the same name and semantics for AT-SPI,
which is in line with the specification in the Core
Accessibility API Mappings 1.2 [2].

Map that LO object attribute to the above-mentioned
`GTK_ACCESSIBLE_PROPERTY_LEVEL`.

The property is currently not yet mapped to an AT-SPI
attribute in Gtk 4, but together with a corresponding
merge request [3], the object attribute can be seen
in Accerciser as expected.

While object properties in LO are currently generally
only generated/updated when they're queried
(via `XAccessibleExtendedAttributes::getExtendedAttributes`),
the `GtkAccessibleProperty` handling in Gtk 4
would require to explicitly call
`gtk_accessible_update_property` with the new value.

This may require further adjustments on LO side to
keep the properties up-to-date (e.g. adding something
like a new `AccessibleEventId::OBJECT_PROPERTY_CHANGED`
event and then implementing corresponding handling in
all places that provide object properties).
But that's something to look into later, also depending
on the outcome of the discussion in [1].
(As of now, the gtk4 VCL plugin doesn't handle any
a11y events, not even the existing ones.)

[1] https://gitlab.gnome.org/GNOME/gtk/-/issues/6196
[2] https://www.w3.org/TR/core-aam-1.2/#ariaLevelHeading
[3] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6549

Change-Id: I024afd7b527a20922e69156e1562dda783be2b49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159216
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/vcl/unx/gtk4/a11y.cxx b/vcl/unx/gtk4/a11y.cxx
index 8bd1b97f0aa9..42a0fd59e4b9 100644
--- a/vcl/unx/gtk4/a11y.cxx
+++ b/vcl/unx/gtk4/a11y.cxx
@@ -10,6 +10,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -307,6 +308,50 @@ static void applyStates(GtkAccessible* pGtkAccessible,
 }
 }
 
+static void applyObjectAttribute(GtkAccessible* pGtkAccessible, const 
OUString& rName,
+ const OUString& rValue)
+{
+assert(pGtkAccessible);
+
+if (rName == u"level")
+{
+const int nLevel = static_cast(rValue.toInt32());
+gtk_accessible_update_property(pGtkAccessible, 
GTK_ACCESSIBLE_PROPERTY_LEVEL, nLevel, -1);
+}
+}
+
+/**
+ * Based on the object attributes set for xContext, set the corresponding Gtk 
equivalents
+ * in pGtkAccessible, where applicable.
+ */
+static void
+applyObjectAttributes(GtkAccessible* pGtkAccessible,
+  
css::uno::Reference xContext)
+{
+assert(pGtkAccessible);
+
+css::uno::Reference 
xAttributes(
+xContext, css::uno::UNO_QUERY);
+if (!xAttributes.is())
+return;
+
+OUString sAttrs;
+xAttributes->getExtendedAttributes() >>= sAttrs;
+
+sal_Int32 nIndex = 0;
+do
+{
+const OUString sAttribute = sAttrs.getToken(0, ';', nIndex);
+sal_Int32 nColonPos = 0;
+const OUString sName = sAttribute.getToken(0, ':', nColonPos);
+const OUString sValue = sAttribute.getToken(0, ':', nColonPos);
+assert(nColonPos == -1
+   && "Too many colons in attribute that should have 
\"name:value\" syntax");
+
+applyObjectAttribute(pGtkAccessible, sName, sValue);
+} while (nIndex >= 0);
+}
+
 #define LO_TYPE_ACCESSIBLE (lo_accessible_get_type())
 #define LO_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), 
LO_TYPE_ACCESSIBLE, LoAccessible))
 // #define LO_IS_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
LO_TYPE_ACCESSIBLE))
@@ -545,6 +590,8 @@ lo_accessible_new(GdkDisplay* pDisplay, GtkAccessible* 
pParent,
 
 applyStates(pGtkAccessible, xContext);
 
+applyObjectAttributes(GTK_ACCESSIBLE(ret), xContext);
+
 // set values from XAccessibleValue interface if that's implem

[Libreoffice-commits] core.git: vcl/unx

2023-11-09 Thread Michael Weghorn (via logerrit)
 vcl/unx/gtk4/a11y.cxx |  122 --
 1 file changed, 69 insertions(+), 53 deletions(-)

New commits:
commit 9cb506a37a3228cf820eaeec681e49c08607cf59
Author: Michael Weghorn 
AuthorDate: Thu Nov 9 15:24:26 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 20:58:22 2023 +0100

gtk4 a11y: Extract state handling to helper function

Change-Id: I1f6dba461b328fc41de6d944bd8657daa9b05370
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159215
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/vcl/unx/gtk4/a11y.cxx b/vcl/unx/gtk4/a11y.cxx
index 482c3aef3487..8bd1b97f0aa9 100644
--- a/vcl/unx/gtk4/a11y.cxx
+++ b/vcl/unx/gtk4/a11y.cxx
@@ -240,6 +240,73 @@ static 
css::uno::Reference get_uno_accessible(G
 return pWindow->GetAccessible();
 }
 
+/**
+ * Based on the states set in xContext, set the corresponding Gtk 
states/properties
+ * in pGtkAccessible.
+ */
+static void applyStates(GtkAccessible* pGtkAccessible,
+
css::uno::Reference xContext)
+{
+assert(pGtkAccessible);
+
+if (!xContext.is())
+return;
+
+// Gtk differentiates between GtkAccessibleState and GtkAccessibleProperty
+// (both handled here) and GtkAccessiblePlatformState (handled in
+// 'lo_accessible_get_platform_state')
+const sal_Int64 nStates = xContext->getAccessibleStateSet();
+gtk_accessible_update_property(
+pGtkAccessible, GTK_ACCESSIBLE_PROPERTY_MODAL,
+bool(nStates & 
com::sun::star::accessibility::AccessibleStateType::MODAL),
+GTK_ACCESSIBLE_PROPERTY_MULTI_LINE,
+bool(nStates & 
com::sun::star::accessibility::AccessibleStateType::MULTI_LINE),
+GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE,
+bool(nStates & 
com::sun::star::accessibility::AccessibleStateType::MULTI_SELECTABLE),
+GTK_ACCESSIBLE_PROPERTY_READ_ONLY,
+bool(!(nStates & 
com::sun::star::accessibility::AccessibleStateType::EDITABLE)), -1);
+if (nStates & 
com::sun::star::accessibility::AccessibleStateType::HORIZONTAL)
+{
+gtk_accessible_update_property(pGtkAccessible, 
GTK_ACCESSIBLE_PROPERTY_ORIENTATION,
+   GTK_ORIENTATION_HORIZONTAL, -1);
+}
+else if (nStates & 
com::sun::star::accessibility::AccessibleStateType::VERTICAL)
+{
+gtk_accessible_update_property(pGtkAccessible, 
GTK_ACCESSIBLE_PROPERTY_ORIENTATION,
+   GTK_ORIENTATION_VERTICAL, -1);
+}
+
+gtk_accessible_update_state(
+pGtkAccessible, GTK_ACCESSIBLE_STATE_BUSY,
+bool(nStates & 
com::sun::star::accessibility::AccessibleStateType::BUSY),
+GTK_ACCESSIBLE_STATE_DISABLED,
+bool(!(nStates & 
com::sun::star::accessibility::AccessibleStateType::ENABLED)),
+GTK_ACCESSIBLE_STATE_EXPANDED,
+bool(nStates & 
com::sun::star::accessibility::AccessibleStateType::EXPANDED),
+GTK_ACCESSIBLE_STATE_SELECTED,
+bool(nStates & 
com::sun::star::accessibility::AccessibleStateType::SELECTED), -1);
+
+const sal_Int16 nRole = xContext->getAccessibleRole();
+if (nRole == com::sun::star::accessibility::AccessibleRole::CHECK_BOX)
+{
+GtkAccessibleTristate eState = GTK_ACCESSIBLE_TRISTATE_FALSE;
+if (nStates & 
com::sun::star::accessibility::AccessibleStateType::INDETERMINATE)
+eState = GTK_ACCESSIBLE_TRISTATE_MIXED;
+else if (nStates & 
com::sun::star::accessibility::AccessibleStateType::CHECKED)
+eState = GTK_ACCESSIBLE_TRISTATE_TRUE;
+gtk_accessible_update_state(pGtkAccessible, 
GTK_ACCESSIBLE_STATE_CHECKED, eState, -1);
+}
+else if (nRole == 
com::sun::star::accessibility::AccessibleRole::TOGGLE_BUTTON)
+{
+GtkAccessibleTristate eState = GTK_ACCESSIBLE_TRISTATE_FALSE;
+if (nStates & 
com::sun::star::accessibility::AccessibleStateType::INDETERMINATE)
+eState = GTK_ACCESSIBLE_TRISTATE_MIXED;
+else if (nStates & 
com::sun::star::accessibility::AccessibleStateType::PRESSED)
+eState = GTK_ACCESSIBLE_TRISTATE_TRUE;
+gtk_accessible_update_state(pGtkAccessible, 
GTK_ACCESSIBLE_STATE_PRESSED, eState, -1);
+}
+}
+
 #define LO_TYPE_ACCESSIBLE (lo_accessible_get_type())
 #define LO_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), 
LO_TYPE_ACCESSIBLE, LoAccessible))
 // #define LO_IS_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
LO_TYPE_ACCESSIBLE))
@@ -474,60 +541,9 @@ lo_accessible_new(GdkDisplay* pDisplay, GtkAccessible* 
pParent,
 ret->uno_accessible->getAccessibleContext());
 assert(xContext.is() && "No accessible context");
 
-// handle states
-// Gtk differentiates between GtkAccessibleState and GtkAccessibleProperty
-// (both handled here) and GtkAccessiblePlatformState (handled in
-// 'lo_accessible_get_platform_state')
-const sal_Int64 nStates = xContext->getAccessibleStateSet(

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

2023-11-09 Thread Balazs Varga (via logerrit)
 sw/source/ui/config/optpage.cxx   |   84 +
 sw/source/uibase/inc/optpage.hxx  |   16 +
 sw/uiconfig/swriter/ui/viewoptionspage.ui |  254 +++---
 3 files changed, 328 insertions(+), 26 deletions(-)

New commits:
commit 51f4cadfdd50e757e593c3166d4e54c6b2634af9
Author: Balazs Varga 
AuthorDate: Wed Nov 8 12:33:56 2023 +0100
Commit: Balazs Varga 
CommitDate: Thu Nov 9 20:29:02 2023 +0100

tdf#158006 - UI: Part 21 - Unify lockdown behavior of Options dialog

for Writer - View Page.

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

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index b1f24d671a92..6fb499f455ad 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -86,25 +87,40 @@ void drawRect(vcl::RenderContext& rRenderContext, const 
tools::Rectangle &rRect,
 SwContentOptPage::SwContentOptPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rCoreSet)
 : SfxTabPage(pPage, pController, "modules/swriter/ui/viewoptionspage.ui", 
"ViewOptionsPage", &rCoreSet)
 , m_xCrossCB(m_xBuilder->weld_check_button("helplines"))
+, m_xCrossImg(m_xBuilder->weld_widget("lockhelplines"))
 , m_xHMetric(m_xBuilder->weld_combo_box("hrulercombobox"))
+, m_xHMetricImg(m_xBuilder->weld_widget("lockhruler"))
 , m_xVRulerCBox(m_xBuilder->weld_check_button("vruler"))
+, m_xVRulerImg(m_xBuilder->weld_widget("lockvruler"))
 , m_xVRulerRightCBox(m_xBuilder->weld_check_button("vrulerright"))
+, m_xVRulerRightImg(m_xBuilder->weld_widget("lockvrulerright"))
 , m_xVMetric(m_xBuilder->weld_combo_box("vrulercombobox"))
 , m_xSmoothCBox(m_xBuilder->weld_check_button("smoothscroll"))
+, m_xSmoothImg(m_xBuilder->weld_widget("locksmoothscroll"))
 , m_xGrfCB(m_xBuilder->weld_check_button("graphics"))
+, m_xGrfImg(m_xBuilder->weld_widget("lockgraphics"))
 , m_xTableCB(m_xBuilder->weld_check_button("tables"))
+, m_xTableImg(m_xBuilder->weld_widget("locktables"))
 , m_xDrwCB(m_xBuilder->weld_check_button("drawings"))
+, m_xDrwImg(m_xBuilder->weld_widget("lockdrawings"))
 , m_xPostItCB(m_xBuilder->weld_check_button("comments"))
+, m_xPostItImg(m_xBuilder->weld_widget("lockcomments"))
 , m_xSettingsFrame(m_xBuilder->weld_frame("settingsframe"))
 , m_xSettingsLabel(m_xBuilder->weld_label("settingslabel"))
 , m_xMetricLabel(m_xBuilder->weld_label("measureunitlabel"))
 , m_xMetricLB(m_xBuilder->weld_combo_box("measureunit"))
 , m_xShowInlineTooltips(m_xBuilder->weld_check_button("changestooltip"))
+, m_xShowInlineTooltipsImg(m_xBuilder->weld_widget("lockchangestooltip"))
 , 
m_xShowOutlineContentVisibilityButton(m_xBuilder->weld_check_button("outlinecontentvisibilitybutton"))
+, 
m_xShowOutlineContentVImg(m_xBuilder->weld_widget("lockoutlinecontentvisibility"))
 , 
m_xTreatSubOutlineLevelsAsContent(m_xBuilder->weld_check_button("suboutlinelevelsascontent"))
+, 
m_xTreatSubOutlineLevelsImg(m_xBuilder->weld_widget("locksuboutlinelevels"))
 , m_xShowChangesInMargin(m_xBuilder->weld_check_button("changesinmargin"))
+, m_xShowChangesInMarginImg(m_xBuilder->weld_widget("lockchangesinmargin"))
 , m_xFieldHiddenCB(m_xBuilder->weld_check_button("hiddentextfield"))
+, m_xFieldHiddenImg(m_xBuilder->weld_widget("lockhiddentextfield"))
 , m_xFieldHiddenParaCB(m_xBuilder->weld_check_button("hiddenparafield"))
+, m_xFieldHiddenParaImg(m_xBuilder->weld_widget("lockhiddenparafield"))
 {
 m_xShowOutlineContentVisibilityButton->connect_toggled(LINK(this, 
SwContentOptPage, ShowOutlineContentVisibilityButtonHdl));
 
@@ -187,25 +203,88 @@ static void lcl_SelectMetricLB(weld::ComboBox& rMetric, 
TypedWhichIdGetItemIfSet( FN_PARAM_ELEM , false );
 if(pElemAttr)
 {
+bReadOnly = 
officecfg::Office::Writer::Content::Display::Table::isReadOnly();
 m_xTableCB->set_active(pElemAttr->m_bTable);
+m_xTableCB->set_sensitive(!bReadOnly);
+m_xTableImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Content::Display::GraphicObject::isReadOnly();
 m_xGrfCB->set_active(pElemAttr->m_bGraphic);
+m_xGrfCB->set_sensitive(!bReadOnly);
+m_xGrfImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Content::Display::DrawingControl::isReadOnly();
 m_xDrwCB->set_active(pElemAttr->m_bDrawing);
+m_xDrwCB->set_sensitive(!bReadOnly);
+m_xDrwImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Writer::Content::Display::Note::isReadOnly();
 m_xPostItCB->set_active(pElemAttr->m_bNotes);
+m_xPostItCB->set_sensitive

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

2023-11-09 Thread Noel Grandin (via logerrit)
 sc/source/filter/xml/xmlcvali.cxx |   10 --
 sc/source/filter/xml/xmlstyli.cxx |4 ++--
 sc/source/filter/xml/xmlstyli.hxx |6 --
 3 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 38a4672bdb55314edc9ce2cd5224b879d8df007f
Author: Noel Grandin 
AuthorDate: Wed Nov 8 13:23:43 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 9 20:10:59 2023 +0100

loplugin:fieldcast in ScXMLContentValidationContext

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

diff --git a/sc/source/filter/xml/xmlcvali.cxx 
b/sc/source/filter/xml/xmlcvali.cxx
index 6a5669b7866a..20b1f235fd17 100644
--- a/sc/source/filter/xml/xmlcvali.cxx
+++ b/sc/source/filter/xml/xmlcvali.cxx
@@ -49,7 +49,7 @@ class ScXMLContentValidationContext : public 
ScXMLImportContext
 bool   bDisplayHelp;
 bool   bDisplayError;
 
-SvXMLImportContextRef   xEventContext;
+rtl::Reference xEventContext;
 
 css::sheet::ValidationAlertStyle GetAlertStyle() const;
 void SetFormula( OUString& rFormula, OUString& rFormulaNmsp, 
FormulaGrammar::Grammar& reGrammar,
@@ -232,8 +232,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL 
ScXMLContentValidationC
 pContext = new ScXMLErrorMacroContext( GetScImport(), pAttribList, 
this);
 break;
 case XML_ELEMENT(OFFICE, XML_EVENT_LISTENERS):
-pContext = new XMLEventsImportContext( GetImport() );
-xEventContext = pContext;
+xEventContext = new XMLEventsImportContext( GetImport() );
+pContext = xEventContext.get();
 }
 
 return pContext;
@@ -357,10 +357,8 @@ void SAL_CALL 
ScXMLContentValidationContext::endFastElement( sal_Int32 /*nElemen
 // #i36650# event-listeners element moved up one level
 if (xEventContext.is())
 {
-XMLEventsImportContext* pEvents =
-static_cast(xEventContext.get());
 uno::Sequence aValues;
-pEvents->GetEventSequence( "OnError", aValues );
+xEventContext->GetEventSequence( "OnError", aValues );
 
 auto pValue = std::find_if(std::cbegin(aValues), std::cend(aValues),
 [](const beans::PropertyValue& rValue) {
commit f6370725d8a68645e82f16d61518fd2d400f148d
Author: Noel Grandin 
AuthorDate: Wed Nov 8 13:16:31 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 9 20:10:50 2023 +0100

loplugin:fieldcast in XMLTableStyleContext

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

diff --git a/sc/source/filter/xml/xmlstyli.cxx 
b/sc/source/filter/xml/xmlstyli.cxx
index 3d7d86488425..a607b013e9c7 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -426,7 +426,7 @@ void XMLTableStyleContext::SetAttribute( sal_Int32 nElement,
 
 
 XMLTableStyleContext::XMLTableStyleContext( ScXMLImport& rImport,
-SvXMLStylesContext& rStyles, XmlStyleFamily nFamily, bool 
bDefaultStyle ) :
+XMLTableStylesContext& rStyles, XmlStyleFamily nFamily, bool 
bDefaultStyle ) :
 XMLPropStyleContext( rImport, rStyles, nFamily, bDefaultStyle ),
 pStyles(&rStyles),
 nNumberFormat(-1),
@@ -563,7 +563,7 @@ void XMLTableStyleContext::AddProperty(const sal_Int16 
nContextID, const uno::An
 XMLPropertyState* property = FindProperty(nContextID);
 if (property)
 property->mnIndex = -1; // #i46996# remove old property, so it isn't 
double
-sal_Int32 nIndex(static_cast(pStyles)->GetIndex(nContextID));
+sal_Int32 nIndex(pStyles->GetIndex(nContextID));
 OSL_ENSURE(nIndex != -1, "Property not found in Map");
 XMLPropertyState aPropState(nIndex, rValue);
 GetProperties().push_back(aPropState); // has to be inserted in a sort 
order later
diff --git a/sc/source/filter/xml/xmlstyli.hxx 
b/sc/source/filter/xml/xmlstyli.hxx
index 8101a72b1f7c..e977b84e0ec6 100644
--- a/sc/source/filter/xml/xmlstyli.hxx
+++ b/sc/source/filter/xml/xmlstyli.hxx
@@ -63,11 +63,13 @@ public:
 ::std::vector< XMLPropertyState >& rProperties, sal_Int32 
nStartIndex, sal_Int32 nEndIndex ) const override;
 };
 
+class XMLTableStylesContext;
+
 class XMLTableStyleContext : public XMLPropStyleContext
 {
 OUString sDataStyleName;
 OUString   sPageStyle;
-SvXMLStylesContext* pStyles;
+XMLTableStylesContext*  pStyles;
 sal_Int32   nNumberFormat;
 SCTAB   nLastSheet;
 boolbParentSet;
@@ -85,7 +87,7 @@ protected:
 public:
 
 XMLTableStyleContext( ScXMLImport& rImport,
-SvXMLStylesContext& rStyles, XmlStyleFamily nFamily, bool 
bDefaultStyle = false );
+XMLTableStylesContext& rStyles, XmlStyleFamily nFamily, bool 
bDefaultStyle =

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

2023-11-09 Thread Caolán McNamara (via logerrit)
 sw/uiconfig/swriter/ui/translationdialog.ui |   28 
 1 file changed, 4 insertions(+), 24 deletions(-)

New commits:
commit 3afdf59d7a13101de6b943efb3395e6fc406ab94
Author: Caolán McNamara 
AuthorDate: Thu Nov 9 14:37:25 2023 +
Commit: Caolán McNamara 
CommitDate: Thu Nov 9 20:03:49 2023 +0100

give the Language Selection dialog the usual spacings

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

diff --git a/sw/uiconfig/swriter/ui/translationdialog.ui 
b/sw/uiconfig/swriter/ui/translationdialog.ui
index 2ffa83df4a0f..c520fd851921 100644
--- a/sw/uiconfig/swriter/ui/translationdialog.ui
+++ b/sw/uiconfig/swriter/ui/translationdialog.ui
@@ -15,7 +15,7 @@
   
 False
 vertical
-2
+12
 
   
 False
@@ -71,17 +71,18 @@
   
 
 
-  
+  
   
 True
 False
-5
+6
 
   
 True
 False
 start
 Select the target language for 
translation
+True
 combobox1
   
   
@@ -100,27 +101,6 @@
 1
   
 
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
   
   
 False


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

2023-11-09 Thread Noel Grandin (via logerrit)
 reportdesign/source/filter/xml/xmlStyleImport.cxx |4 ++--
 reportdesign/source/filter/xml/xmlStyleImport.hxx |5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit fcfb7f65bfc507a6bffebea98a9e9bd281ad9dbb
Author: Noel Grandin 
AuthorDate: Wed Nov 8 13:35:20 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 9 19:04:18 2023 +0100

loplugin:fieldcast in rptxml::OControlStyleContext

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

diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx 
b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 595bd5506dca..4ccc672f97ca 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -67,7 +67,7 @@ public:
 }
 
 OControlStyleContext::OControlStyleContext( ORptFilter& rImport,
-SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ) :
+OReportStylesContext& rStyles, XmlStyleFamily nFamily ) :
 XMLPropStyleContext( rImport, rStyles, nFamily, false/*bDefaultStyle*/ ),
 pStyles(&rStyles),
 m_nNumberFormat(-1),
@@ -121,7 +121,7 @@ void OControlStyleContext::SetDefaults()
 
 void OControlStyleContext::AddProperty(const sal_Int16 nContextID, const 
uno::Any& rValue)
 {
-sal_Int32 nIndex(static_cast(pStyles)->GetIndex(nContextID));
+sal_Int32 nIndex(pStyles->GetIndex(nContextID));
 OSL_ENSURE(nIndex != -1, "Property not found in Map");
 XMLPropertyState aPropState(nIndex, rValue);
 GetProperties().push_back(aPropState); // has to be inserted in a sort 
order later
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.hxx 
b/reportdesign/source/filter/xml/xmlStyleImport.hxx
index b51108fd5244..691b6d384160 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.hxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.hxx
@@ -27,11 +27,12 @@
 namespace rptxml
 {
 class ORptFilter;
+class OReportStylesContext;
 
 class OControlStyleContext : public XMLPropStyleContext
 {
 OUString m_sDataStyleName;
-SvXMLStylesContext* pStyles;
+OReportStylesContext*   pStyles;
 //  std::vectoraMaps;
 sal_Int32   m_nNumberFormat;
 ORptFilter& m_rImport;
@@ -46,7 +47,7 @@ namespace rptxml
 public:
 
 OControlStyleContext( ORptFilter& rImport,
-SvXMLStylesContext& rStyles, XmlStyleFamily nFamily );
+OReportStylesContext& rStyles, XmlStyleFamily nFamily );
 
 virtual ~OControlStyleContext() override;
 


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

2023-11-09 Thread Mike Kaganski (via logerrit)
 sfx2/source/doc/docmacromode.cxx |   26 --
 1 file changed, 20 insertions(+), 6 deletions(-)

New commits:
commit 7a73eedf00541b5ba56b81e7d78faef4247f046f
Author: Mike Kaganski 
AuthorDate: Thu Nov 9 16:12:45 2023 +0300
Commit: Mike Kaganski 
CommitDate: Thu Nov 9 18:37:26 2023 +0100

Fix USE_CONFIG_APPROVE_CONFIRMATION and USE_CONFIG_REJECT_CONFIRMATION

They still showed UI in case of signed macros.
Two decisions were made, to improve security of 
USE_CONFIG_APPROVE_CONFIRMATION:
1. In case of High macro security mode, valid but untrusted certificate 
will be
   automatically rejected (because it is not safe to automatically add 
trusted
   certificates) - so in this mode, USE_CONFIG_APPROVE_CONFIRMATION is the 
same
   as USE_CONFIG_REJECT_CONFIRMATION;
2. In case of Medium macro security mode, valid but untrusted certificate 
will
   not automatically allow macros execution, but will proceed to the 
following
   checks - which on Windows will try to check the source's Security Zone, 
and
   may disallow macros based on that. Only after Security Zone check the 
macros
   will be automatically allowed.

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

diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index d64b0b60697f..4e9311593aed 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -213,9 +213,12 @@ namespace sfx2
 // should not ask any confirmations. FROM_LIST_AND_SIGNED_WARN 
should only allow
 // trusted signed macros at this point; so it may only ask for 
confirmation to add
 // certificates to trusted, and shouldn't show UI when trusted 
list is read-only.
-const bool bAllowUI = nMacroExecutionMode != 
MacroExecMode::FROM_LIST_AND_SIGNED_NO_WARN
- && (nMacroExecutionMode == 
MacroExecMode::ALWAYS_EXECUTE
- || 
!SvtSecurityOptions::IsReadOnly(SvtSecurityOptions::EOption::MacroTrustedAuthors));
+const bool bAllowUI
+= nMacroExecutionMode != 
MacroExecMode::FROM_LIST_AND_SIGNED_NO_WARN
+  && eAutoConfirm == eNoAutoConfirm
+  && (nMacroExecutionMode == MacroExecMode::ALWAYS_EXECUTE
+  || !SvtSecurityOptions::IsReadOnly(
+  
SvtSecurityOptions::EOption::MacroTrustedAuthors));
 const bool bHasTrustedMacroSignature = 
m_xData->m_rDocumentAccess.hasTrustedScriptingSignature(bAllowUI ? 
rxInteraction : nullptr);
 
 if (bHasTrustedMacroSignature)
@@ -227,9 +230,20 @@ namespace sfx2
|| nSignatureState == SignatureState::NOTVALIDATED )
 {
 // there is valid signature, but it is not from the 
trusted author
-// this case includes explicit reject from user in the UI 
in cases of
-// FROM_LIST_AND_SIGNED_WARN and ALWAYS_EXECUTE
-return disallowMacroExecution();
+if (eAutoConfirm == eAutoConfirmApprove
+&& nMacroExecutionMode == 
MacroExecMode::ALWAYS_EXECUTE)
+{
+// For ALWAYS_EXECUTE + eAutoConfirmApprove 
(USE_CONFIG_APPROVE_CONFIRMATION
+// in Medium security mode), do not approve it right 
here; let Security Zone
+// check below do its job first.
+}
+else
+{
+// All other cases of valid but untrusted signatures 
should result in denied
+// macros here. This includes explicit reject from 
user in the UI in cases
+// of FROM_LIST_AND_SIGNED_WARN and ALWAYS_EXECUTE
+return disallowMacroExecution();
+}
 }
 // Other values of nSignatureState would result in either 
rejected macros
 // (FROM_LIST_AND_SIGNED_*), or a confirmation.


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

2023-11-09 Thread Noel Grandin (via logerrit)
 sc/inc/compiler.hxx  |4 ++--
 sc/source/core/tool/compiler.cxx |6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 4d263b48a1353804816a55433f2ee90e96be1e32
Author: Noel Grandin 
AuthorDate: Wed Nov 8 13:32:17 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 9 17:53:14 2023 +0100

loplugin:fieldcast in ScCompiler::TableRefEntry

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

diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index fbf5073743e1..9cff881db62d 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -307,9 +307,9 @@ private:
 
 struct TableRefEntry
 {
-ScTokenRef  mxToken;
+boost::intrusive_ptr mxToken;
 sal_uInt16  mnLevel;
-TableRefEntry( formula::FormulaToken* p ) : mxToken(p), mnLevel(0) {}
+TableRefEntry( ScTableRefToken* p ) : mxToken(p), mnLevel(0) {}
 };
 std::vector maTableRefs; /// "stack" of currently 
active ocTableRef tokens
 
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 2a5491f4666b..63b1f0969225 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3999,7 +3999,7 @@ bool ScCompiler::ParseTableRefItem( const OUString& rName 
)
 {
 // Only called when there actually is a current TableRef, hence
 // accessing maTableRefs.back() is safe.
-ScTableRefToken* p = 
dynamic_cast(maTableRefs.back().mxToken.get());
+ScTableRefToken* p = maTableRefs.back().mxToken.get();
 assert(p);  // not a ScTableRefToken can't be
 
 switch ((*iLook).second)
@@ -4067,7 +4067,7 @@ bool ScCompiler::ParseTableRefColumn( const OUString& 
rName )
 {
 // Only called when there actually is a current TableRef, hence
 // accessing maTableRefs.back() is safe.
-ScTableRefToken* p = 
dynamic_cast(maTableRefs.back().mxToken.get());
+ScTableRefToken* p = maTableRefs.back().mxToken.get();
 assert(p);  // not a ScTableRefToken can't be
 
 ScDBData* pDBData = rDoc.GetDBCollection()->getNamedDBs().findByIndex( 
p->GetIndex());
@@ -4918,7 +4918,7 @@ std::unique_ptr ScCompiler::CompileString( 
const OUString& rFormul
 const FormulaToken* pPrev = pArr->PeekPrev( nIdx);
 if (pPrev && pPrev->GetOpCode() == ocDBArea)
 {
-FormulaToken* pTableRefToken = new ScTableRefToken( 
pPrev->GetIndex(), ScTableRefToken::TABLE);
+ScTableRefToken* pTableRefToken = new ScTableRefToken( 
pPrev->GetIndex(), ScTableRefToken::TABLE);
 maTableRefs.emplace_back( pTableRefToken);
 // pPrev may be dead hereafter.
 static_cast(pArr)->ReplaceToken( nIdx, 
pTableRefToken,


[Libreoffice-commits] core.git: configure.ac instsetoo_native/util

2023-11-09 Thread Andras Timar (via logerrit)
 configure.ac|3 +++
 instsetoo_native/util/openoffice.lst.in |8 
 2 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit d9ccfb162f211565ea8e98ae58ab4199eac22452
Author: Andras Timar 
AuthorDate: Tue May 23 15:16:26 2023 +0200
Commit: Caolán McNamara 
CommitDate: Thu Nov 9 17:13:34 2023 +0100

replace license in package header to MPL-2.0 in case of MPL subset

Change-Id: I0ba75ff7da69a3a45afde3252de272aa18f69932
(cherry picked from commit fb228423017d2fce4491232f66299be6aa78b3d9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158672
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/configure.ac b/configure.ac
index 65cedd785904..39767d4e9da9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14732,6 +14732,7 @@ dnl 
===
 
 AC_MSG_CHECKING([MPL subset])
 MPL_SUBSET=
+LICENSE="LGPL"
 
 if test "$enable_mpl_subset" = "yes"; then
 mpl_error_string=
@@ -14783,12 +14784,14 @@ if test "$enable_mpl_subset" = "yes"; then
 fi
 
 MPL_SUBSET="TRUE"
+LICENSE="MPL-2.0"
 AC_DEFINE(MPL_HAVE_SUBSET)
 AC_MSG_RESULT([only])
 else
 AC_MSG_RESULT([no restrictions])
 fi
 AC_SUBST(MPL_SUBSET)
+AC_SUBST(LICENSE)
 
 dnl ===
 
diff --git a/instsetoo_native/util/openoffice.lst.in 
b/instsetoo_native/util/openoffice.lst.in
index fb0ff9c81f9d..b5da0bfb6697 100644
--- a/instsetoo_native/util/openoffice.lst.in
+++ b/instsetoo_native/util/openoffice.lst.in
@@ -57,7 +57,7 @@ LibreOffice
 ADDSYSTEMINTEGRATION 1
 PACKAGEVERSION 
@LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@.@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@
 PACKAGEREVISION {buildid}
-LICENSENAME LGPL
+LICENSENAME @LICENSE@
 ROOTMODULEGID gid_Module_Root
 GLOBALPATCHFILEGID gid_File_Txt_Patchfiles
 SPELLCHECKERFILE spellchecker_selection.txt
@@ -100,7 +100,7 @@ LibreOfficeDev
 ADDSYSTEMINTEGRATION 1
 PACKAGEVERSION 
@LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@.@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@
 PACKAGEREVISION {buildid}
-LICENSENAME LGPL
+LICENSENAME @LICENSE@
 ROOTMODULEGID gid_Module_Root
 GLOBALPATCHFILEGID gid_File_Txt_Patchfiles
 SPELLCHECKERFILE spellchecker_selection.txt
@@ -138,7 +138,7 @@ LibreOffice_SDK
 DMG_VOLUMEEXTENSION SDK
 DATABASENAME libreoffice40sdk
 NO_README_IN_ROOTDIR 1
-LICENSENAME LGPL
+LICENSENAME @LICENSE@
 IGNOREDIRECTORYLAYER 1
 NOVERSIONINDIRNAME 0
 NOSPACEINDIRECTORYNAME 1
@@ -179,7 +179,7 @@ LibreOfficeDev_SDK
 DMG_VOLUMEEXTENSION SDK
 DATABASENAME libreoffice40devsdk
 NO_README_IN_ROOTDIR 1
-LICENSENAME LGPL
+LICENSENAME @LICENSE@
 IGNOREDIRECTORYLAYER 1
 NOVERSIONINDIRNAME 0
 NOSPACEINDIRECTORYNAME 1


[Libreoffice-commits] core.git: desktop/Library_offacc.mk desktop/source officecfg/registry

2023-11-09 Thread Michael Stahl (via logerrit)
 desktop/Library_offacc.mk|4 
 desktop/source/app/appinit.cxx   |4 +++-
 desktop/source/offacc/acceptor.cxx   |7 +++
 officecfg/registry/schema/org/openoffice/Office/Security.xcs |8 +++-
 4 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit ec3ffe62685f9c5e944ae0924a9963fbe016a706
Author: Michael Stahl 
AuthorDate: Wed Nov 8 16:12:08 2023 +0100
Commit: Michael Stahl 
CommitDate: Thu Nov 9 17:11:00 2023 +0100

officecfg,desktop: add Office::Security::Net::AllowInsecureUNORemoteProtocol

This disables the "com.sun.star.office.Acceptor" UNO service that
handles the soffice "--accept" argument; now it can be disabled and
locked in configuration by system administrator.

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

diff --git a/desktop/Library_offacc.mk b/desktop/Library_offacc.mk
index a7f560379627..fb1a162b2b90 100644
--- a/desktop/Library_offacc.mk
+++ b/desktop/Library_offacc.mk
@@ -11,6 +11,10 @@ $(eval $(call gb_Library_Library,offacc))
 
 $(eval $(call gb_Library_use_sdk_api,offacc))
 
+$(eval $(call gb_Library_use_custom_headers,offacc,\
+   officecfg/registry \
+))
+
 $(eval $(call gb_Library_use_libraries,offacc,\
 comphelper \
 cppu \
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 6eca704c7fb9..51b466c6b980 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -41,6 +41,8 @@
 #include 
 #include 
 #include 
+
+#include 
 #include 
 
 using namespace ::com::sun::star::uno;
@@ -165,7 +167,7 @@ void Desktop::createAcceptor(const OUString& aAcceptString)
 }
 else
 {
-SAL_WARN( "desktop.app", "Acceptor could not be created");
+::std::cerr << "UNO Remote Protocol acceptor could not be created, 
presumably because it has been disabled in configuration." << ::std::endl;
 }
 }
 
diff --git a/desktop/source/offacc/acceptor.cxx 
b/desktop/source/offacc/acceptor.cxx
index b8612f668b22..9598466d9c5b 100644
--- a/desktop/source/offacc/acceptor.cxx
+++ b/desktop/source/offacc/acceptor.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -240,6 +241,12 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
 desktop_Acceptor_get_implementation(
 css::uno::XComponentContext* context, css::uno::Sequence 
const&)
 {
+if 
(!officecfg::Office::Security::Net::AllowInsecureUNORemoteProtocol::get())
+{
+// this is not allowed to throw
+SAL_WARN("desktop", "UNO Remote Protocol is disabled by 
configuration");
+return nullptr;
+}
 return cppu::acquire(new desktop::Acceptor(context));
 }
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/Security.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Security.xcs
index 4cb9073012f5..67bd4078585f 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Security.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Security.xcs
@@ -46,7 +46,7 @@
 
 
   
-Specifies how secure hyperlinks are processed.
+Specifies security aspects of network connections.
   
   
 
@@ -54,6 +54,12 @@
 
 true
   
+  
+
+  Allow listening for unauthenticated remote code execution via 
soffice --accept.
+
+true
+  
 
   
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - translations

2023-11-09 Thread Andras Timar (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f64dcce774a7b538f1d98af6d10ab26e215740e3
Author: Andras Timar 
AuthorDate: Thu Nov 9 17:02:27 2023 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Nov 9 17:02:27 2023 +0100

Update git submodules

* Update translations from branch 'distro/collabora/co-23.05'
  to d9823bf3ff81390524b84a00134d0a56ce70d044
  - updated German translations for Calc (cond. form. dlg etc.)

Change-Id: I431d6c42296aeba2ed92fce34181eb909ec23b6c

diff --git a/translations b/translations
index d9fea2a7f0d3..d9823bf3ff81 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit d9fea2a7f0d3a4625c55081d1e916441bb164eee
+Subproject commit d9823bf3ff81390524b84a00134d0a56ce70d044


[Libreoffice-commits] translations.git: Branch 'distro/collabora/co-23.05' - source/de

2023-11-09 Thread Andras Timar (via logerrit)
 source/de/sc/messages.po |  174 +--
 1 file changed, 169 insertions(+), 5 deletions(-)

New commits:
commit d9823bf3ff81390524b84a00134d0a56ce70d044
Author: Andras Timar 
AuthorDate: Thu Nov 9 17:01:52 2023 +0100
Commit: Andras Timar 
CommitDate: Thu Nov 9 17:01:52 2023 +0100

updated German translations for Calc (cond. form. dlg etc.)

Change-Id: I431d6c42296aeba2ed92fce34181eb909ec23b6c

diff --git a/source/de/sc/messages.po b/source/de/sc/messages.po
index 014b18b7695..86375103d6c 100644
--- a/source/de/sc/messages.po
+++ b/source/de/sc/messages.po
@@ -3,8 +3,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: 
https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n";
-"POT-Creation-Date: 2022-12-19 15:00+0100\n"
-"PO-Revision-Date: 2023-09-28 11:38+\n"
+"POT-Creation-Date: 2023-11-09 16:44+0100\n"
+"PO-Revision-Date: 2023-11-09 17:00+\n"
 "Last-Translator: Christian Kühl \n"
 "Language-Team: German 
\n"
 "Language: de\n"
@@ -909,6 +909,18 @@ msgctxt "STR_PIVOT_GROUP"
 msgid "Group"
 msgstr "Gruppierung"
 
+#. FTZKz
+#: sc/inc/globstr.hrc:158
+msgctxt "STR_PIVOT_ROW_LABELS"
+msgid "Row Labels"
+msgstr "Zeilenbeschriftungen"
+
+#. FNBev
+#: sc/inc/globstr.hrc:159
+msgctxt "STR_PIVOT_COL_LABELS"
+msgid "Column Labels"
+msgstr "Spaltenbeschriftungen"
+
 #. 9YfrB
 #. To translators: $1 == will be replaced by STR_SELCOUNT_ROWARG, and $2 by 
STR_SELCOUNT_COLARG
 #. e.g. Selected: 1 row, 2 columns
@@ -3293,6 +3305,18 @@ msgctxt "STR_UNDO_EDIT_SPARKLINE"
 msgid "Edit Sparkline"
 msgstr "Sparkline bearbeiten"
 
+#. eAj8m
+#: sc/inc/globstr.hrc:551
+msgctxt "STR_UNDO_THEME_CHANGE"
+msgid "Theme Change"
+msgstr "Themenwechsel"
+
+#. aAxDv
+#: sc/inc/globstr.hrc:552
+msgctxt "STR_UNDO_THEME_COLOR_CHANGE"
+msgid "Theme Color Change"
+msgstr "Themenfarbe-Änderung"
+
 #. dB8cp
 #: sc/inc/pvfundlg.hrc:28
 msgctxt "SCSTR_DPFUNCLISTBOX"
@@ -18597,6 +18621,73 @@ msgctxt "extended_tip|annot"
 msgid "Specifies that a small rectangle in the top right corner of the cell 
indicates that a comment exists. The comment will be shown only when you enable 
tips under %PRODUCTNAME - General in the Options dialog box."
 msgstr "Legt fest, dass ein Rechteck in der oberen rechten Ecke einer Zelle 
angezeigt wird, sobald ein Kommentar vorhanden ist. Der Kommentar wird nur 
angezeigt, wenn Sie im Dialog Optionen unter %PRODUCTNAME - Allgemein Tipps 
erlaubt haben."
 
+#. nLT6N
+#. Simple conditional formatting dialog
+#: sc/inc/strings.hrc:394
+msgctxt "STR_CONDITION_EQUAL"
+msgid "equal to"
+msgstr "ist gleich"
+
+#. NEvcE
+#: sc/inc/strings.hrc:395
+msgctxt "STR_CONDITION_LESS"
+msgid "less than"
+msgstr "ist kleiner als"
+
+#. mUddX
+#: sc/inc/strings.hrc:396
+msgctxt "STR_CONDITION_GREATER"
+msgid "greater than"
+msgstr "ist größer als"
+
+#. mGfFZ
+#: sc/inc/strings.hrc:397
+msgctxt "STR_CONDITION_EQLESS"
+msgid "equal or less than"
+msgstr "ist kleiner oder gleich"
+
+#. BXQvL
+#: sc/inc/strings.hrc:398
+msgctxt "STR_CONDITION_EQGREATER"
+msgid "equal or greater than"
+msgstr "ist größer oder gleich"
+
+#. CbPRM
+#: sc/inc/strings.hrc:399
+msgctxt "STR_CONDITION_NOT_EQUAL"
+msgid "not equal to"
+msgstr "ist ungleich"
+
+#. gmJDh
+#: sc/inc/strings.hrc:401
+msgctxt "STR_CONDITION_BETWEEN"
+msgid "between"
+msgstr "ist zwischen"
+
+#. HUNFG
+#: sc/inc/strings.hrc:403
+msgctxt "STR_CONDITION_ERROR"
+msgid "with error "
+msgstr "ist ein Fehler "
+
+#. iNFYk
+#: sc/inc/strings.hrc:404
+msgctxt "STR_CONDITION_NOERROR"
+msgid "without error "
+msgstr "ist kein Fehler "
+
+#. mcir7
+#: sc/inc/strings.hrc:405
+msgctxt "STR_CONDITION_CONTAINS_TEXT"
+msgid "containing text"
+msgstr "enthält Text"
+
+#. YpCMa
+#: sc/inc/strings.hrc:406
+msgctxt "STR_CONDITION_NOT_CONTAINS_TEXT"
+msgid "not containing text"
+msgstr "enthält keinen Text"
+
 #. Et4zM
 #: sc/inc/subtotals.hrc:28
 msgctxt "subtotalgrppage|liststore1"
@@ -19617,6 +19708,24 @@ msgctxt 
"condformatmanager|extended_tip|CondFormatManager"
 msgid "This dialog allows you to see all the conditional formatting defined in 
the spreadsheet."
 msgstr "Dieser Dialog erlaubt es Ihnen, alle bedingten Formatierungen zu 
sehen, die im Tabellendokument definiert sind."
 
+#. pDRks
+#: sc/uiconfig/scalc/ui/conditionaleasydialog.ui:30
+msgctxt "conditionaleasydialog|extended_tip|ok"
+msgid "Saves all changes and closes dialog."
+msgstr "Speichert alle Änderungen und schließt den Dialog."
+
+#. YJVUn
+#: sc/uiconfig/scalc/ui/conditionaleasydialog.ui:49
+msgctxt "conditionaleasydialog|extended_tip|cancel"
+msgid "Closes dialog and discards all changes."
+msgstr "Schließt den Dialog und verwirft alle Änderungen."
+
+#. 5MDWE
+#: sc/uiconfig/scalc/ui/conditionaleasydialog.ui:225
+msgctxt "conditionaleasydialog|extended_tip|rbassign"
+msgid "Click the Shrink icon to reduce 

[Libreoffice-commits] core.git: config_host/config_crypto.h.in configure.ac include/curlinit.hxx include/opensslinit.hxx vcl/source

2023-11-09 Thread Michael Stahl (via logerrit)
 config_host/config_crypto.h.in |2 ++
 configure.ac   |3 +++
 include/curlinit.hxx   |   23 +--
 include/opensslinit.hxx|   41 +
 vcl/source/app/svmain.cxx  |   21 +
 5 files changed, 68 insertions(+), 22 deletions(-)

New commits:
commit 1472e2d68b9cff43b99069d3ba9439fff0a5684c
Author: Michael Stahl 
AuthorDate: Wed Nov 8 14:50:26 2023 +0100
Commit: Michael Stahl 
CommitDate: Thu Nov 9 16:54:47 2023 +0100

vcl,openssl: set SSL_CERT_FILE for bundled OpenSSL

OpenSSL may read a CA certificate file from $SSL_CERT_FILE, if the
client library calls SSL_CTX_set_default_verify_paths(); python's ssl
module does it but apparently libcurl does not.

So split the code from commit 3fc632c0261c75fb4079a5305e814698e791f75c
and set the environment variable in ImplSVMain(), hopefully before
any threads are spawned; seems to work for PyMailSMTPService.

This needs to have SYSTEM_OPENSSL available in a config header.

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

diff --git a/config_host/config_crypto.h.in b/config_host/config_crypto.h.in
index 106485d55213..33877f99af36 100644
--- a/config_host/config_crypto.h.in
+++ b/config_host/config_crypto.h.in
@@ -33,4 +33,6 @@
 
 #endif
 
+#undef SYSTEM_OPENSSL
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/configure.ac b/configure.ac
index 5a610aacba13..65cedd785904 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11097,6 +11097,9 @@ if test "$enable_openssl" = "yes"; then
 OPENSSL_LIBS="-lssl -lcrypto"
 else
 libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
+if test -n "${SYSTEM_OPENSSL}"; then
+AC_DEFINE([SYSTEM_OPENSSL])
+fi
 fi
 if test "$with_system_openssl" = "yes"; then
 AC_MSG_CHECKING([whether openssl supports SHA512])
diff --git a/include/curlinit.hxx b/include/curlinit.hxx
index 14f660b41efa..c80397caf466 100644
--- a/include/curlinit.hxx
+++ b/include/curlinit.hxx
@@ -16,28 +16,7 @@
 #if defined(LINUX) && !defined(SYSTEM_CURL)
 #include 
 
-#include 
-
-static char const* GetCABundleFile()
-{
-// try system ones first; inspired by:
-// 
https://www.happyassassin.net/posts/2015/01/12/a-note-about-ssltls-trusted-certificate-stores-and-platforms/
-auto const candidates = {
-"/etc/pki/tls/certs/ca-bundle.crt",
-"/etc/pki/tls/certs/ca-bundle.trust.crt",
-"/etc/ssl/certs/ca-certificates.crt",
-"/var/lib/ca-certificates/ca-bundle.pem",
-};
-for (char const* const candidate : candidates)
-{
-if (access(candidate, R_OK) == 0)
-{
-return candidate;
-}
-}
-
-throw css::uno::RuntimeException("no OpenSSL CA certificate bundle found");
-}
+#include "opensslinit.hxx"
 #endif
 
 static void InitCurl_easy(CURL* const pCURL)
diff --git a/include/opensslinit.hxx b/include/opensslinit.hxx
new file mode 100644
index ..9c3f4c860895
--- /dev/null
+++ b/include/opensslinit.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#pragma once
+
+#include 
+
+#if defined(LINUX) && !defined(SYSTEM_OPENSSL)
+#include 
+
+#include 
+
+static char const* GetCABundleFile()
+{
+// try system ones first; inspired by:
+// 
https://www.happyassassin.net/posts/2015/01/12/a-note-about-ssltls-trusted-certificate-stores-and-platforms/
+auto const candidates = {
+"/etc/pki/tls/certs/ca-bundle.crt",
+"/etc/pki/tls/certs/ca-bundle.trust.crt",
+"/etc/ssl/certs/ca-certificates.crt",
+"/var/lib/ca-certificates/ca-bundle.pem",
+};
+for (char const* const candidate : candidates)
+{
+if (access(candidate, R_OK) == 0)
+{
+return candidate;
+}
+}
+
+throw css::uno::RuntimeException("no OpenSSL CA certificate bundle found");
+}
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index bf822c73162e..aa22d61de197 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -82,6 +82,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -192,6 +193,26 @@ int ImplSVMain()
 int nReturn = EXIT_FAILURE;
 
 const bool bWasInitVCL = IsVCLInit();
+
+#if defined(LINUX) && !defined(SYSTEM_OPENSSL)
+if (!bWasI

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

2023-11-09 Thread Michael Stahl (via logerrit)
 scripting/source/pyprov/mailmerge.py |   56 ---
 1 file changed, 39 insertions(+), 17 deletions(-)

New commits:
commit 8e46dd9599bc84f60abf2d2d5625fa15076dfc80
Author: Michael Stahl 
AuthorDate: Tue Nov 7 15:40:55 2023 +0100
Commit: Michael Stahl 
CommitDate: Thu Nov 9 16:55:18 2023 +0100

scripting: PyMailServiceProvider: implement AllowInsecureProtocols

The "ehlo" calls look redundant, smtplib will do these implicitly if
required (checked in Python 3.5.9); it will also check that the STARTTLS
is successful which very old versions of Python didn't do.

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

diff --git a/scripting/source/pyprov/mailmerge.py 
b/scripting/source/pyprov/mailmerge.py
index 40be53b9366a..3c781c52f2cb 100644
--- a/scripting/source/pyprov/mailmerge.py
+++ b/scripting/source/pyprov/mailmerge.py
@@ -55,6 +55,34 @@ g_ImplementationHelper = unohelper.ImplementationHelper()
 g_providerImplName = "org.openoffice.pyuno.MailServiceProvider"
 g_messageImplName = "org.openoffice.pyuno.MailMessage"
 
+def prepareTLSContext(xComponent, xContext, isTLSRequested):
+   xConfigProvider = 
xContext.ServiceManager.createInstance("com.sun.star.configuration.ConfigurationProvider")
+   prop = uno.createUnoStruct('com.sun.star.beans.PropertyValue')
+   prop.Name = "nodepath"
+   prop.Value = "/org.openoffice.Office.Security/Net"
+   xSettings = 
xConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess",
+   (prop,))
+   isAllowedInsecure = xSettings.getByName("AllowInsecureProtocols")
+   tlscontext = None
+   if isTLSRequested:
+   if dbg:
+   print("SSL config: " + 
str(ssl.get_default_verify_paths()), file=sys.stderr)
+   tlscontext = ssl.create_default_context()
+   # SSLv2/v3 is already disabled by default.
+   # This check does not work, because OpenSSL 3 defines 
SSL_OP_NO_SSLv2
+   # as 0, so even though _ssl__SSLContext_impl() tries to set it,
+   # getting the value from SSL_CTX_get_options() doesn't lead to 
setting
+   # the python-level flag.
+   #assert (tlscontext.options & ssl.Options.OP_NO_SSLv2) != 0
+   assert (tlscontext.options & ssl.Options.OP_NO_SSLv3) != 0
+   if not(isAllowedInsecure):
+   if not(isTLSRequested):
+   if dbg:
+   print("mailmerge.py: insecure connection not 
allowed by configuration", file=sys.stderr)
+   raise IllegalArgumentException("insecure connection not 
allowed by configuration", xComponent, 1)
+   tlscontext.options |= ssl.Options.OP_NO_TLSv1 | 
ssl.Options.OP_NO_TLSv1_1
+   return tlscontext
+
 class PyMailSMTPService(unohelper.Base, XSmtpService):
def __init__( self, ctx ):
self.ctx = ctx
@@ -95,25 +123,21 @@ class PyMailSMTPService(unohelper.Base, XSmtpService):
tout = _GLOBAL_DEFAULT_TIMEOUT
if dbg:
print("Timeout: " + str(tout), file=sys.stderr)
+   connectiontype = 
xConnectionContext.getValueByName("ConnectionType")
+   if dbg:
+   print("ConnectionType: " + connectiontype, 
file=sys.stderr)
+   tlscontext = prepareTLSContext(self, self.ctx, 
connectiontype.upper() == 'SSL' or port == 465)
if port == 465:
-   if dbg:
-   print("SSL config: " + 
str(ssl.get_default_verify_paths()), file=sys.stderr)
-   self.server = smtplib.SMTP_SSL(server, port, 
timeout=tout, context=ssl.create_default_context())
+   self.server = smtplib.SMTP_SSL(server, port, 
timeout=tout, context=tlscontext)
else:
self.server = smtplib.SMTP(server, port,timeout=tout)
 
if dbg:
self.server.set_debuglevel(1)
 
-   connectiontype = 
xConnectionContext.getValueByName("ConnectionType")
-   if dbg:
-   print("ConnectionType: " + connectiontype, 
file=sys.stderr)
if connectiontype.upper() == 'SSL' and port != 465:
-   if dbg:
-   print("SSL config: " + 
str(ssl.get_default_verify_paths()), file=sys.stderr)
-   self.server.ehlo()
-   
self.server.starttls(context=ssl.create_default_context())
-   self.server.ehlo()
+   # STRIPTLS: smtplib raises an exception if result is 
not 220
+   self.server.starttls(context=tlscontext)
 
user = xAuthenticator.getUse

ESC meeting minutes: 2023-11-09

2023-11-09 Thread Miklos Vajna

* Present:
+ Caolan, Heiko, Hossein, Ilmari, Michael W, Regina, Stephan, Stephane, 
Thorsten, Cloph, Miklos, Michael S, Eike

* Completed Action Items:

* Pending Action Items:
+ Set up a daily tinderbox for the python-based windows installer (Cloph)
  [ in progress, .NET 3.5 install is harder than expected ]

* Release Engineering update (Cloph)
+ 7.5.8 release on Linux:
  + no https access, planning an additional release (RC3) just for that 
problem, for Linux
  + also for the mac app store version
  + thanks Michael S for fixing
  + affects also the update check service, but no easy solution to that
  + expect people upgrade to 7.6 anyway.
  + or a whole release for all platforms? (Cloph)
+ fine to keep going unchanged (Caolan)
+ 7.6 status: 7.6.3 rc2 next week, as planned
+ 24.2: first alpha in 2 weeks, from master
+ Android version in the play store (Michael W)
  + in progress, addressing the play console warnings

* Documentation (Olivier)
+ Missing Olivier, LatAm conf is in progress.
+ Bugzilla Documentation statistics
272(272) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created  2(-5)   16(-3) 49(-4) 284(-7)
 commented 12(-1)   50(6) 159(-3)1068(-8)
  resolved  1(-2)6(1)  17(-4) 153(-4)
+ top 10 contributors:
  Ilmari Lauhakangas made 13 changes in 1 month, and 131 changes in 1 
year
  Heiko Tietze made 10 changes in 1 month, and 112 changes in 1 year
  Seth Chaiklin made 10 changes in 1 month, and 316 changes in 1 year
  Kaganski, Mike made 9 changes in 1 month, and 77 changes in 1 year
  Olivier Hallot made 9 changes in 1 month, and 431 changes in 1 year
  Stéphane Guillou made 8 changes in 1 month, and 359 changes in 1 year
  Jérôme made 6 changes in 1 month, and 6 changes in 1 year
  Adolfo Jayme Barrientos made 1 changes in 1 month, and 22 changes in 
1 year
  m.a.riosv made 1 changes in 1 month, and 11 changes in 1 year
  MISY Nyias made 1 changes in 1 month, and 1 changes in 1 year

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
254(254) (topicUI) bugs open, 67(67) (needsUXEval) needs to be 
evaluated by the UXteam
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
 added 12(4) 24(8) 29(10)  50(10)
 commented 68(12)   246(51)   490(40)2264(24)
   removed  1(1)  2(0)  4(1)   18(-2)
  resolved  5(-3)31(1) 89(1)  332(-4)
+ top 10 contributors:
  Heiko Tietze made 138 changes in 1 month, and 1380 changes in 1 year
  Stéphane Guillou made 130 changes in 1 month, and 612 changes in 1 
year
  Eyal Rozenberg made 32 changes in 1 month, and 258 changes in 1 year
  m.a.riosv made 31 changes in 1 month, and 103 changes in 1 year
  Vernon, Stuart Foote made 30 changes in 1 month, and 349 changes in 1 
year
  Justin Luth made 25 changes in 1 month, and 118 changes in 1 year
  Ilmari Lauhakangas made 22 changes in 1 month, and 246 changes in 1 
year
  Dieter made 20 changes in 1 month, and 245 changes in 1 year
  Amin Irgaliev made 14 changes in 1 month, and 17 changes in 1 year
  Henschel, Regina made 12 changes in 1 month, and 43 changes in 1 year
+ [Bug 158126] UI: Scalable buttons for Impress navigation bar
+ [Bug 158123] Overflow the tabbed interface to scroll/flip instead of a 
popup
+ [Bug 156915] Cannot access document themes option using tabbed UI
 -> + [Bug 137272] Make it less likely that user unwillingly loses footnote and
   endnote font size inheritance from paragraph
   + additional footnote char style adds some flexibility but make 
things inconsistent
   + no special style in Word, but then can't change all footnotes at 
once
   + an option is to hardcode how the footnote is derived from the 
current char style
   + would leave towards not having a dedicated char style for the 
footnote portion (Miklos)
 -> + [Bug 158069] Scroll through font selection listbox using arrow keys and
   preview change on document canvas
   + sounds nice if it can work fast enough (Miklos)
+ [Bug 158084] Start Center: hover highlight color is inconsistent
+ [Bug 143340] Undo/redo for checking/unchecking KeepRatio in Image 
Properties
   Dialog not properly handled
+ [Bug 158077] "double bracket" callout name is a misnomer
+ [Bug 157972] Don't shorten "Relative size" to "Rel. Size" in
   Bullets & Numbering dialog
+ [Bug 158034] Feature request: Editing, Formatting, UI. Option to add 
linebreaks
   when merging cells into one.
+ [Bug 157945] UI: Resizing of a selection of columns/rows should 
correspond to

[Libreoffice-commits] core.git: external/python3

2023-11-09 Thread Michael Stahl (via logerrit)
 external/python3/ExternalPackage_python3.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a2fabc78a4ba12ad8df6b040783be0fa22aefa54
Author: Michael Stahl 
AuthorDate: Wed Nov 8 11:55:51 2023 +0100
Commit: Michael Stahl 
CommitDate: Thu Nov 9 16:54:08 2023 +0100

python3: name gdb pretty-printer after .so, not .bin

So it works not only with instdir/program/python but also with
soffice in-process python.

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

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 0a6d2f8bff8a..907b0b530c46 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -49,7 +49,7 @@ else
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin,python))
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 
$(ENABLE_DBGUTIL),d).so,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d).so))
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 
$(ENABLE_DBGUTIL),d).so.1.0,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d).so))
-$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin-gdb.py,Tools/gdb/libpython.py))
+$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d).so.1.0-gdb.py,Tools/gdb/libpython.py))
 
 # Unfortunately the python build system does not allow to explicitly enable or
 # disable these, it just tries to build them and then prints which did not


[Libreoffice-commits] core.git: 2 commits - extensions/source fpicker/source svtools/source svtools/uiconfig swext/mediawiki

2023-11-09 Thread Michael Stahl (via logerrit)
 extensions/source/update/check/download.cxx   |5 
 fpicker/source/office/RemoteFilesDialog.cxx   |2 -
 svtools/source/dialogs/PlaceEditDialog.cxx|6 -
 svtools/uiconfig/ui/placeedit.ui  |1 
 swext/mediawiki/src/com/sun/star/wiki/Helper.java |   24 +-
 5 files changed, 24 insertions(+), 14 deletions(-)

New commits:
commit 8b0b453ecbf41a33a33e45756fddc7ec3fbddfc3
Author: Michael Stahl 
AuthorDate: Tue Nov 7 19:55:07 2023 +0100
Commit: Michael Stahl 
CommitDate: Thu Nov 9 16:53:55 2023 +0100

swext: MediaWiki: implement AllowInsecureProtocols

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

diff --git a/swext/mediawiki/src/com/sun/star/wiki/Helper.java 
b/swext/mediawiki/src/com/sun/star/wiki/Helper.java
index 4a5ec943ad8c..e43091d2e269 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/Helper.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/Helper.java
@@ -38,6 +38,7 @@ import com.sun.star.frame.XModel;
 import com.sun.star.frame.XModuleManager;
 import com.sun.star.io.XInputStream;
 import com.sun.star.io.XOutputStream;
+import com.sun.star.lang.IllegalArgumentException;
 import com.sun.star.lang.XMultiComponentFactory;
 import com.sun.star.lang.XMultiServiceFactory;
 import com.sun.star.lang.XComponent;
@@ -54,6 +55,7 @@ import com.sun.star.util.XChangesBatch;
 import java.net.*;
 import java.io.*;
 import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLException;
 import javax.swing.text.html.HTMLEditorKit;
 
@@ -645,7 +647,27 @@ public class Helper
 } else {
 conn = (HttpURLConnection) uri.toURL().openConnection();
 }
-if (uri.getScheme().equals("https") && AllowUnknownCert(xContext, 
uri.getHost()))
+
+boolean isAllowedInsecure;
+try {
+XNameAccess xNameAccess = GetConfigNameAccess(xContext, 
"org.openoffice.Office.Security/Net");
+isAllowedInsecure = 
AnyConverter.toBoolean(xNameAccess.getByName("AllowInsecureProtocols"));
+} catch (Exception e) {
+throw new RuntimeException("failed to read configuration", e);
+}
+if (!isAllowedInsecure) {
+if (!uri.getScheme().equals("https")) {
+throw new IllegalArgumentException("insecure connection not 
allowed by configuration", null, (short)0);
+}
+try {
+SSLContext context = SSLContext.getInstance("TLSv1.2");
+context.init(null, null, null); // defaults
+((HttpsURLConnection) 
conn).setSSLSocketFactory(context.getSocketFactory());
+} catch (Exception e) {
+throw new RuntimeException("failed to create SSLContext", e);
+}
+}
+else if (uri.getScheme().equals("https") && AllowUnknownCert(xContext, 
uri.getHost()))
 {
 // let unknown certificates be accepted
 ((HttpsURLConnection) conn).setSSLSocketFactory(new 
WikiProtocolSocketFactory());
commit b91daea3c1a38883c06cdd63c6eababe1df9e61d
Author: Michael Stahl 
AuthorDate: Tue Nov 7 13:20:21 2023 +0100
Commit: Michael Stahl 
CommitDate: Thu Nov 9 16:53:41 2023 +0100

tdf#146386 fpicker,svtools: remove FTP from Remote Files dialog

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

diff --git a/extensions/source/update/check/download.cxx 
b/extensions/source/update/check/download.cxx
index 2124ee5a0512..9b4823777289 100644
--- a/extensions/source/update/check/download.cxx
+++ b/extensions/source/update/check/download.cxx
@@ -203,11 +203,6 @@ Download::getProxyForURL(std::u16string_view rURL, 
OString& rHost, sal_Int32& rP
 rHost = getStringValue(xNameAccess, "ooInetHTTPSProxyName");
 rPort = getInt32Value(xNameAccess, "ooInetHTTPSProxyPort");
 }
-else if( o3tl::starts_with(rURL, u"ftp:") )
-{
-rHost = getStringValue(xNameAccess, "ooInetFTPProxyName");
-rPort = getInt32Value(xNameAccess, "ooInetFTPProxyPort");
-}
 }
 }
 
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index ae03c2774f38..2b7dbd3d46db 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -195,8 +195,6 @@ static OUString lcl_GetServiceType( const ServicePtr& 
pService )
 INetProtocol aProtocol = pService->GetUrlObject().GetProtocol();
 switch( aProtocol )
 {
-case INetProtocol::Ftp:
-return "FTP";
 case INetProtocol::Cmis:
 {
 OUString sHost = pService->GetUrlObject().GetHost( 
INetURLObject::DecodeMechanism:

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

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

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

tdf#146386 cui: remove FTP UI, SvxProxyTabPage

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

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

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

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

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

tdf#146386 cui: remove FTP UI, SvxHyperlinkInternetTp

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

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

[Libreoffice-commits] core.git: 2 commits - desktop/Library_crashreport.mk extensions/Library_updchk.mk external/curl include/curlinit.hxx linguistic/Library_lng.mk officecfg/registry qadevOOo/Jar_OOo

2023-11-09 Thread Michael Stahl (via logerrit)
 Repository.mk   |1 
 desktop/Library_crashreport.mk  |4 
 extensions/Library_updchk.mk|4 
 external/curl/ExternalProject_curl.mk   |2 
 external/curl/curl-msvc-disable-protocols.patch.1   |2 
 include/curlinit.hxx|   29 
 linguistic/Library_lng.mk   |4 
 officecfg/registry/data/org/openoffice/ucb/Configuration.xcu|   11 
 officecfg/registry/schema/org/openoffice/Office/Security.xcs|   11 
 qadevOOo/Jar_OOoRunner.mk   |1 
 qadevOOo/objdsc/ucpftp/com.sun.star.comp.ucb.FTPContentProvider.csv |2 
 qadevOOo/tests/java/mod/_ucpftp/FTPContentProvider.java |   66 
 ucb/JunitTest_ucb_complex.mk|   26 
 ucb/Library_ucpcmis1.mk |4 
 ucb/Library_ucpftp1.mk  |   46 
 ucb/Module_ucb.mk   |2 
 ucb/qa/complex/ucb/UCB.java |  151 -
 ucb/qa/complex/ucb/makefile.mk  |   53 
 ucb/qa/unoapi/ucb.sce   |1 
 ucb/source/ucp/ftp/curl.hxx |   24 
 ucb/source/ucp/ftp/ftpcfunc.cxx |   50 
 ucb/source/ucp/ftp/ftpcfunc.hxx |   39 
 ucb/source/ucp/ftp/ftpcontainer.hxx |   56 
 ucb/source/ucp/ftp/ftpcontent.cxx   |  853 
--
 ucb/source/ucp/ftp/ftpcontent.hxx   |  146 -
 ucb/source/ucp/ftp/ftpcontentcaps.cxx   |  167 -
 ucb/source/ucp/ftp/ftpcontentidentifier.cxx |   65 
 ucb/source/ucp/ftp/ftpcontentidentifier.hxx |   59 
 ucb/source/ucp/ftp/ftpcontentprovider.cxx   |  244 -
 ucb/source/ucp/ftp/ftpcontentprovider.hxx   |  107 
 ucb/source/ucp/ftp/ftpdirp.cxx  | 1269 
--
 ucb/source/ucp/ftp/ftpdirp.hxx  |  158 -
 ucb/source/ucp/ftp/ftpdynresultset.cxx  |   67 
 ucb/source/ucp/ftp/ftpdynresultset.hxx  |   48 
 ucb/source/ucp/ftp/ftpintreq.cxx|   64 
 ucb/source/ucp/ftp/ftpintreq.hxx|   84 
 ucb/source/ucp/ftp/ftploaderthread.cxx  |   96 
 ucb/source/ucp/ftp/ftploaderthread.hxx  |   59 
 ucb/source/ucp/ftp/ftpresultsetI.cxx|   90 
 ucb/source/ucp/ftp/ftpresultsetI.hxx|   46 
 ucb/source/ucp/ftp/ftpresultsetbase.cxx |  510 
 ucb/source/ucp/ftp/ftpresultsetbase.hxx |  410 ---
 ucb/source/ucp/ftp/ftpresultsetfactory.hxx  |   57 
 ucb/source/ucp/ftp/ftpurl.cxx   |  793 
--
 ucb/source/ucp/ftp/ftpurl.hxx   |  161 -
 ucb/source/ucp/ftp/ucpftp1.component|   26 
 ucb/source/ucp/webdav-curl/CurlSession.cxx  |   13 
 ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx|   18 
 48 files changed, 73 insertions(+), 6126 deletions(-)

New commits:
commit 4a26dcac8e4f3ff3cbc3c356ad0a34968ef9d8fe
Author: Michael Stahl 
AuthorDate: Tue Nov 7 11:57:58 2023 +0100
Commit: Michael Stahl 
CommitDate: Thu Nov 9 16:51:42 2023 +0100

tdf#146386 curl,ucb: remove FTP UCP

FTP support has been deprecated since LO 7.4.

The UCP currently doesn't even support TLS connections.

Also disable FTP protocol in libcurl.

Also remove JunitTest_ucb_complex: turns out the only test in it,
checkWrongFtpConnection, fails on Linux because now GIO UCP handles
ftp:// URLs and it throws InteractiveAugmentedIOException instead of
expected ones, and on other platforms it would fail differently because
there is no GIO.

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

diff --git a/Repository.mk b/Repository.mk
index f2d560b4cad3..72a88d3e8429 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -679,7 +679,6 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
ucbhelper \
$(if $(WITH_WEBDAV),ucpdav1) \
ucpfile1 \
-

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

2023-11-09 Thread Noel Grandin (via logerrit)
 sc/source/filter/inc/xcl97rec.hxx   |5 +++--
 sc/source/filter/xcl97/xcl97esc.cxx |2 +-
 sc/source/filter/xcl97/xcl97rec.cxx |6 +++---
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit c32bf48b7446808ffc47472021ec32cb7c70eea7
Author: Noel Grandin 
AuthorDate: Wed Nov 8 13:26:15 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 9 16:32:47 2023 +0100

loplugin:fieldcast in XclObjOle

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

diff --git a/sc/source/filter/inc/xcl97rec.hxx 
b/sc/source/filter/inc/xcl97rec.hxx
index 78d173568e97..57210208ddad 100644
--- a/sc/source/filter/inc/xcl97rec.hxx
+++ b/sc/source/filter/inc/xcl97rec.hxx
@@ -33,6 +33,7 @@ class SdrCaptionObj;
 class SdrTextObj;
 class XclTxo;
 class XclEscherEx;
+class SdrOle2Obj;
 
 class ScURLTransformer : public oox::drawingml::URLTransformer
 {
@@ -237,13 +238,13 @@ class XclObjOle : public XclObj
 {
 private:
 
-const SdrObject&rOleObj;
+const SdrOle2Obj&rOleObj;
 SotStorage* pRootStorage;
 
 virtual voidWriteSubRecs( XclExpStream& rStrm ) override;
 
 public:
-XclObjOle( XclExpObjectManager& rObjMgr, const 
SdrObject& rObj );
+XclObjOle( XclExpObjectManager& rObjMgr, const 
SdrOle2Obj& rObj );
 virtual ~XclObjOle() override;
 
 virtual voidSave( XclExpStream& rStrm ) override;
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx 
b/sc/source/filter/xcl97/xcl97esc.cxx
index 07e3769e65b9..43538de6c889 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -217,7 +217,7 @@ EscherExHostAppData* XclEscherEx::StartShape( const 
Reference< XShape >& rxShape
 pCurrXclObj = nullptr; // no metafile or whatsoever
 }
 else// metafile and OLE object
-pCurrXclObj = new XclObjOle( mrObjMgr, *pObj );
+pCurrXclObj = new XclObjOle( mrObjMgr, 
*static_cast(pObj) );
 }
 else// just a metafile
 pCurrXclObj = new XclObjAny( mrObjMgr, rxShape, &GetDoc() 
);
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx 
b/sc/source/filter/xcl97/xcl97rec.cxx
index f9031449bf70..e9ae7bdeba42 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -996,7 +996,7 @@ std::size_t XclTxo::GetLen() const
 
 // --- class XclObjOle ---
 
-XclObjOle::XclObjOle( XclExpObjectManager& rObjMgr, const SdrObject& rObj ) :
+XclObjOle::XclObjOle( XclExpObjectManager& rObjMgr, const SdrOle2Obj& rObj ) :
 XclObj( rObjMgr, EXC_OBJTYPE_PICTURE ),
 rOleObj( rObj ),
 pRootStorage( rObjMgr.GetRoot().GetRootStorage().get() )
@@ -1020,7 +1020,7 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm )
 if( !xOleStg.is() )
 return;
 
-uno::Reference < embed::XEmbeddedObject > xObj( static_cast(rOleObj).GetObjRef() );
+uno::Reference < embed::XEmbeddedObject > xObj( rOleObj.GetObjRef() );
 if ( !xObj.is() )
 return;
 
@@ -1051,7 +1051,7 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm )
 // OBJFLAGS subrecord, undocumented as usual
 rStrm.StartRecord( EXC_ID_OBJFLAGS, 2 );
 sal_uInt16 nFlags = EXC_OBJ_PIC_MANUALSIZE;
-::set_flag( nFlags, EXC_OBJ_PIC_SYMBOL, static_cast(rOleObj).GetAspect() == embed::Aspects::MSOLE_ICON );
+::set_flag( nFlags, EXC_OBJ_PIC_SYMBOL, rOleObj.GetAspect() == 
embed::Aspects::MSOLE_ICON );
 rStrm << nFlags;
 rStrm.EndRecord();
 


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

2023-11-09 Thread Samuel Mehrbrodt (via logerrit)
 configmgr/source/access.cxx  |   13 
 configmgr/source/access.hxx  |3 
 configmgr/source/node.hxx|4 
 configmgr/source/xcsparser.cxx   |2 
 configmgr/source/xcsparser.hxx   |1 
 cui/source/options/optaboutconfig.cxx|  350 +--
 offapi/com/sun/star/configuration/XDocumentation.idl |   12 
 7 files changed, 204 insertions(+), 181 deletions(-)

New commits:
commit 700ac29771ccec2d66934f66b45a33a48a5ac3f1
Author: Samuel Mehrbrodt 
AuthorDate: Mon Oct 16 11:19:19 2023 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 9 15:37:16 2023 +0100

Use proper type in expert config dialog

In preparation for proper editing support for the different types.

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

diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index f2b0931b0beb..6ef23a40597b 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -455,6 +455,19 @@ OUString Access::getDescriptionByHierarchicalName(OUString 
const & aName)
 return child->getNode()->getDescription();
 }
 
+OUString Access::getTypeByHierarchicalName(OUString const & aName)
+{
+assert(thisIs(IS_ANY));
+osl::MutexGuard g(*lock_);
+checkLocalizedPropertyAccess();
+rtl::Reference< ChildAccess > child(getSubChild(aName));
+if (!child.is()) {
+throw css::container::NoSuchElementException(
+aName, getXWeak());
+}
+return child->getNode()->getType();
+}
+
 sal_Bool Access::hasByHierarchicalName(OUString const & aName)
 {
 assert(thisIs(IS_ANY));
diff --git a/configmgr/source/access.hxx b/configmgr/source/access.hxx
index 4efa910b68c5..19276e6aca06 100644
--- a/configmgr/source/access.hxx
+++ b/configmgr/source/access.hxx
@@ -165,6 +165,9 @@ public:
 virtual OUString SAL_CALL getDescriptionByHierarchicalName(
 OUString const & aName) override;
 
+virtual OUString SAL_CALL getTypeByHierarchicalName(
+OUString const & aName) override;
+
 virtual sal_Bool SAL_CALL hasByHierarchicalName(OUString const & aName) 
override;
 
 virtual void SAL_CALL replaceByHierarchicalName(
diff --git a/configmgr/source/node.hxx b/configmgr/source/node.hxx
index cce8e3d4abb3..7961d090a4c0 100644
--- a/configmgr/source/node.hxx
+++ b/configmgr/source/node.hxx
@@ -56,6 +56,9 @@ public:
 void setDescription(OUString const& description) { description_ = 
description; };
 OUString getDescription() { return description_; }
 
+void setType(OUString const& type) { type_ = type; };
+OUString getType() { return type_; }
+
 rtl::Reference< Node > getMember(OUString const & name);
 
 protected:
@@ -67,6 +70,7 @@ private:
 int layer_;
 int finalized_;
 OUString description_;
+OUString type_;
 };
 
 }
diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx
index 4f9cf2ee2ddb..020cdeaabd82 100644
--- a/configmgr/source/xcsparser.cxx
+++ b/configmgr/source/xcsparser.cxx
@@ -313,6 +313,7 @@ void XcsParser::endElement(xmlreader::XmlReader const & 
reader) {
 while (desc.indexOf("  ") != -1)
 desc = desc.replaceAll("  ", " ");
 top.node->setDescription(desc);
+top.node->setType(typeName_);
 if (elements_.empty()) {
 switch (state_) {
 case STATE_TEMPLATES:
@@ -488,6 +489,7 @@ void XcsParser::handleProp(xmlreader::XmlReader & reader) {
 } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
attrLn == "type")
 {
+typeName_ = reader.getAttributeValue(true).convertFromUtf8();
 valueParser_.type_ = xmldata::parseType(
 reader, reader.getAttributeValue(true));
 } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
diff --git a/configmgr/source/xcsparser.hxx b/configmgr/source/xcsparser.hxx
index aedcccde1147..7d0e6ca44a0a 100644
--- a/configmgr/source/xcsparser.hxx
+++ b/configmgr/source/xcsparser.hxx
@@ -96,6 +96,7 @@ private:
 ElementStack elements_;
 bool bIsParsingInfo_;
 OUStringBuffer description_;
+OUString typeName_;
 };
 
 }
diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index 74bf672a3cf1..791856ef2ae5 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -357,180 +357,220 @@ void CuiAboutConfigTabPage::FillItems(const Reference< 
XNameAccess >& xNameAcces
 ::comphelper::getProcessComponentContext(), "*");
 beans::Property aProperty;
 bool bReadOnly = false;
+OUString sFullPath(sPath + "/" + sPropertyName);
 try
 {
-aProperty

[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - dbaccess/source include/sfx2 sc/source sfx2/source

2023-11-09 Thread Caolán McNamara (via logerrit)
 dbaccess/source/core/dataaccess/ModelImpl.cxx |3 +-
 include/sfx2/docmacromode.hxx |4 ++-
 include/sfx2/objsh.hxx|3 ++
 sc/source/core/data/global.cxx|   33 +-
 sfx2/source/doc/docmacromode.cxx  |8 --
 sfx2/source/doc/objmisc.cxx   |8 +-
 sfx2/source/doc/objxtor.cxx   |1 
 sfx2/source/inc/objshimp.hxx  |3 +-
 8 files changed, 56 insertions(+), 7 deletions(-)

New commits:
commit 672716d09c54cb6fdd59baa7da4b8393cf104cd2
Author: Caolán McNamara 
AuthorDate: Fri Nov 3 17:26:25 2023 +
Commit: Eike Rathke 
CommitDate: Thu Nov 9 15:00:33 2023 +0100

default to ignoring libreoffice special-purpose protocols in calc hyperlink

Change-Id: Ib9f62be3acc05f24ca234dec0fec21e24579e9de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158911
Tested-by: Jenkins
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit b6062623b4d69c79e90e9365ac7c5e7f11986793)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159045
Reviewed-by: Eike Rathke 

diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx 
b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 3e21289dbe9a..e399d5da7067 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1125,7 +1125,8 @@ bool ODatabaseModelImpl::checkMacrosOnLoading()
 {
 Reference< XInteractionHandler > xInteraction;
 xInteraction = m_aMediaDescriptor.getOrDefault( "InteractionHandler", 
xInteraction );
-return m_aMacroMode.checkMacrosOnLoading( xInteraction );
+const bool bHasMacros = m_aMacroMode.hasMacros();
+return m_aMacroMode.checkMacrosOnLoading(xInteraction, false 
/*HasValidContentSignature*/, bHasMacros);
 }
 
 void ODatabaseModelImpl::resetMacroExecutionMode()
diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index 2a0421aa0c90..9ba32017fdbb 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -266,6 +266,8 @@ namespace sfx2
 */
 static bool storageHasMacros( const css::uno::Reference< 
css::embed::XStorage >& _rxStorage );
 
+bool hasMacros() const;
+
 static bool containerHasBasicMacros( const css::uno::Reference< 
css::script::XLibraryContainer >& xContainer );
 /** checks the macro execution mode while loading the document.
 
@@ -293,7 +295,7 @@ namespace sfx2
 bool
 checkMacrosOnLoading(
 const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
-bool bHasValidContentSignature = false
+bool bHasValidContentSignature, bool bHasMacros
 );
 
 private:
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 9b7db5347597..bd3e25e65c58 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -429,6 +429,9 @@ public:
 voidSetMacroCallsSeenWhileLoading();
 boolGetMacroCallsSeenWhileLoading() const;
 
+// true if the document had macros (or similar) on load to trigger warning 
user
+boolGetHadCheckedMacrosOnLoad() const;
+
 const css::uno::Sequence< css::beans::PropertyValue >& 
GetModifyPasswordInfo() const;
 boolSetModifyPasswordInfo( const 
css::uno::Sequence< css::beans::PropertyValue >& aInfo );
 
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 027bc5768a35..e9490079b560 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -29,7 +29,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -822,7 +824,7 @@ void ScGlobal::OpenURL(const OUString& rURL, const 
OUString& rTarget, bool bIgno
 
 OUString aUrlName( rURL );
 SfxViewFrame* pFrame = nullptr;
-const SfxObjectShell* pObjShell = nullptr;
+SfxObjectShell* pObjShell = nullptr;
 OUString aReferName;
 if ( pScActiveViewShell )
 {
@@ -856,6 +858,35 @@ void ScGlobal::OpenURL(const OUString& rURL, const 
OUString& rTarget, bool bIgno
 aUrlName = aNewUrlName;
 }
 
+if (INetURLObject(aUrlName).IsExoticProtocol())
+{
+// Default to ignoring exotic protocols
+bool bAllow = false;
+if (pObjShell)
+{
+// If the document had macros when loaded then follow the allowed 
macro-mode
+if (pObjShell->GetHadCheckedMacrosOnLoad())
+bAllow = pObjShell->AdjustMacroMode();
+else // otherwise ask the user, defaulting to cancel
+{
+assert(pFrame && "if we have pObjShell we have pFrame");
+//Reuse URITools::onOpenURI warning string
+std::unique_ptr 
xQueryBox

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

2023-11-09 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/mozilla/gecko/gfx/LayerView.java |   10 --
 1 file changed, 10 deletions(-)

New commits:
commit c5c2d3195189a329516c918faa251cff4baaed5a
Author: Michael Weghorn 
AuthorDate: Thu Nov 9 08:26:18 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 14:40:43 2023 +0100

android: Drop unused LayerView#mFullScreen

... and the getters and setters.

Change-Id: I14e69e2543d92dc63954bc3faf5a7456d2343fff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159200
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
index 2e1a897b62e7..29049f92912d 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -45,8 +45,6 @@ public class LayerView extends FrameLayout {
 private InputConnectionHandler mInputConnectionHandler;
 private LayerRenderer mRenderer;
 
-private boolean mFullScreen = false;
-
 private SurfaceView mSurfaceView;
 
 private Listener mListener;
@@ -336,12 +334,4 @@ public class LayerView extends FrameLayout {
 super(e);
 }
 }
-
-public void setFullScreen(boolean fullScreen) {
-mFullScreen = fullScreen;
-}
-
-public boolean isFullScreen() {
-return mFullScreen;
-}
 }


[Libreoffice-commits] core.git: bridges/source dbaccess/qa javaunohelper/test qadevOOo/runner qadevOOo/tests ridljar/com sfx2/qa solenv/gbuild wizards/com

2023-11-09 Thread Noel Grandin (via logerrit)
 bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java |  
  2 +-
 dbaccess/qa/complex/dbaccess/DatabaseDocument.java  |  
  1 +
 dbaccess/qa/complex/dbaccess/RowSet.java|  
  8 
 dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java |  
  2 +-
 dbaccess/qa/complex/dbaccess/TestCase.java  |  
  2 +-
 javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java |  
  1 +
 qadevOOo/runner/util/ValueChanger.java  |  
  1 +
 qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java|  
  3 ++-
 qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java   |  
  1 +
 qadevOOo/tests/java/ifc/io/_XDataInputStream.java   |  
  4 ++--
 qadevOOo/tests/java/ifc/io/_XDataOutputStream.java  |  
  1 +
 qadevOOo/tests/java/ifc/sdbc/_XParameters.java  |  
  1 +
 qadevOOo/tests/java/ifc/sdbc/_XRow.java |  
  1 +
 qadevOOo/tests/java/ifc/sdbc/_XRowUpdate.java   |  
  1 +
 qadevOOo/tests/java/ifc/view/_XMultiSelectionSupplier.java  |  
  1 +
 qadevOOo/tests/java/ifc/view/_XSelectionSupplier.java   |  
  1 +
 ridljar/com/sun/star/lib/util/WeakMap.java  |  
  4 
 sfx2/qa/complex/sfx2/UndoManager.java   |  
  1 +
 solenv/gbuild/JavaClassSet.mk   |  
  3 ++-
 wizards/com/sun/star/wizards/ui/ButtonList.java |  
  1 +
 20 files changed, 29 insertions(+), 11 deletions(-)

New commits:
commit eee1ff965143910eb52895af471b260564938db6
Author: Noel Grandin 
AuthorDate: Thu Nov 9 11:07:34 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 9 14:27:47 2023 +0100

enable unchecked lint for our java code

and annotate where necessary, mostly just suppressing the warnings

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

diff --git 
a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java 
b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java
index 12817e57eeda..200f664f32c3 100644
--- a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java
+++ b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java
@@ -139,7 +139,7 @@ public final class JNI_proxy implements 
java.lang.reflect.InvocationHandler
 public static java.lang.reflect.Constructor get_proxy_ctor( Class clazz )
 throws Throwable
 {
-Class proxy_class = java.lang.reflect.Proxy.getProxyClass(
+Class proxy_class = java.lang.reflect.Proxy.getProxyClass(
 s_classloader,
 new Class [] { clazz, IQueryInterface.class,
com.sun.star.lib.uno.Proxy.class } );
diff --git a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java 
b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
index 5bd28053b77c..3087ad6374c2 100644
--- a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
+++ b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
@@ -174,6 +174,7 @@ public class DatabaseDocument extends TestCase implements 
com.sun.star.document.
 };
 }
 
+@SuppressWarnings("unchecked")
 public void dispose()
 {
 final EventObject event = new EventObject(this);
diff --git a/dbaccess/qa/complex/dbaccess/RowSet.java 
b/dbaccess/qa/complex/dbaccess/RowSet.java
index 4c5fcc6da793..ed42a271b46f 100644
--- a/dbaccess/qa/complex/dbaccess/RowSet.java
+++ b/dbaccess/qa/complex/dbaccess/RowSet.java
@@ -365,7 +365,7 @@ public class RowSet extends TestCase
 m_rowSet.addRowSetListener(pRow);
 
 // do some movements to check if we got all notifications
-final Class cResSet = Class.forName("com.sun.star.sdbc.XResultSet");
+final Class cResSet = Class.forName("com.sun.star.sdbc.XResultSet");
 final boolean moves[] = new boolean[9];
 for (int i = 0; i < moves.length; ++i)
 {
@@ -399,7 +399,7 @@ public class RowSet extends TestCase
 testCursorMove(m_resultSet, cResSet.getMethod(NEXT, (Class[]) null), 
pRow, moves, null);
 
 moves[RowSetEventListener.IS_MODIFIED] = false;
-final Class cupd = Class.forName("com.sun.star.sdbc.XResultSetUpdate");
+final Class cupd = 
Class.forName("com.sun.star.sdbc.XResultSetUpdate");
 final XResultSetUpdate upd = UnoRuntime.queryInterface( 
XResultSetUpdate.class, m_resultSet );
 testCursorMove(upd, cupd.getMethod("moveToInsertRow", (Class[]) null), 
pRow, moves, null);
 
@@ -445,7 +445,7 @@ public

[Libreoffice-commits] core.git: sd/uiconfig

2023-11-09 Thread Samuel Mehrbrodt (via logerrit)
 sd/uiconfig/simpress/ui/presentationdialog.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b4cbd33588c194c21926bf6ab70aa76088a9bb09
Author: Samuel Mehrbrodt 
AuthorDate: Thu Nov 9 09:33:46 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 9 14:23:02 2023 +0100

Use hub link

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

diff --git a/sd/uiconfig/simpress/ui/presentationdialog.ui 
b/sd/uiconfig/simpress/ui/presentationdialog.ui
index 9ca601e5c645..75ad453f9093 100644
--- a/sd/uiconfig/simpress/ui/presentationdialog.ui
+++ b/sd/uiconfig/simpress/ui/presentationdialog.ui
@@ -774,7 +774,7 @@
 end
 True
 none
-https://www.libreoffice.org/download/impress-remote-2/
+https://hub.libreoffice.org/impress-remote
   
   
 1


[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sw/source tools/source xmloff/source

2023-11-09 Thread Caolán McNamara (via logerrit)
 sw/source/filter/html/htmlplug.cxx |2 +-
 sw/source/filter/xml/xmltexti.cxx  |2 +-
 tools/source/fsys/urlobj.cxx   |3 ++-
 xmloff/source/draw/ximpshap.cxx|2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 2e1bcbb550d54278b366ec619cc5280d44d6aba4
Author: Caolán McNamara 
AuthorDate: Sat Nov 4 19:57:51 2023 +
Commit: Eike Rathke 
CommitDate: Thu Nov 9 13:50:23 2023 +0100

warn about exotic protocols as well

Change-Id: I50dcf4f36cd20d75f5ad3876353143268740a50f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151834
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 1305f70cff8a81a58a5a6d9c96c5bb032005389e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159034
Reviewed-by: Eike Rathke 

diff --git a/sw/source/filter/html/htmlplug.cxx 
b/sw/source/filter/html/htmlplug.cxx
index e078b00e2d3b..880d16cf0219 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -1117,7 +1117,7 @@ void SwHTMLParser::InsertFloatingFrame()
 
 OUString sHRef = aFrameDesc.GetURL().GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
 
-if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro)
+if (INetURLObject(sHRef).IsExoticProtocol())
 NotifyMacroEventRead();
 
 xSet->setPropertyValue("FrameURL", uno::Any( sHRef ) );
diff --git a/sw/source/filter/xml/xmltexti.cxx 
b/sw/source/filter/xml/xmltexti.cxx
index 3035e22bce76..3c8fe79deb63 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -813,7 +813,7 @@ uno::Reference< XPropertySet > 
SwXMLTextImportHelper::createAndInsertFloatingFra
 OUString sHRef = URIHelper::SmartRel2Abs(
 INetURLObject( GetXMLImport().GetBaseURL() ), 
rHRef );
 
-if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro)
+if (INetURLObject(sHRef).IsExoticProtocol())
 GetXMLImport().NotifyMacroEventRead();
 
 xSet->setPropertyValue("FrameURL",
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index cb749863e9fb..35b5e9244191 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -4885,7 +4885,8 @@ bool INetURLObject::IsExoticProtocol() const
 return m_eScheme == INetProtocol::Slot ||
m_eScheme == INetProtocol::Macro ||
m_eScheme == INetProtocol::Uno ||
-   isSchemeEqualTo(u"vnd.sun.star.script");
+   isSchemeEqualTo(u"vnd.sun.star.script") ||
+   isSchemeEqualTo(u"service");
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index c32dd7cc847c..c653ef021a83 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -3185,7 +3185,7 @@ void SdXMLFloatingFrameShapeContext::startFastElement 
(sal_Int32 /*nElement*/,
 
 if( !maHref.isEmpty() )
 {
-if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro)
+if (INetURLObject(maHref).IsExoticProtocol())
 GetImport().NotifyMacroEventRead();
 
 xProps->setPropertyValue("FrameURL", Any(maHref) );


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

2023-11-09 Thread Yli875 (via logerrit)
 dbaccess/source/ui/misc/UITools.cxx |2 +-
 include/svtools/brwbox.hxx  |8 
 svtools/source/brwbox/brwbox1.cxx   |   14 +++---
 svtools/source/brwbox/brwbox2.cxx   |8 
 svtools/source/brwbox/datwin.cxx|4 ++--
 svtools/source/brwbox/datwin.hxx|   10 +-
 svtools/source/brwbox/editbrowsebox.cxx |2 +-
 7 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 38f9bc92401899489c94276f8647a747f17598e1
Author: Yli875 
AuthorDate: Sun Oct 1 22:08:43 2023 -0700
Commit: Hossein 
CommitDate: Thu Nov 9 13:45:47 2023 +0100

tdf#114441 Convert sal_uLong to better integer types

The maximum value of the width in BrowserColumn is LONG_MAX. tools::Long
value range is the closest among other integer types. It is widely used
in these files. Also, other parameter types and return types have been
changed to match the width type.

Change-Id: Ia8b941a8ea02075a0d9b4d44675d5809005738bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157477
Tested-by: Hossein 
Reviewed-by: Hossein 

diff --git a/dbaccess/source/ui/misc/UITools.cxx 
b/dbaccess/source/ui/misc/UITools.cxx
index a07d588be2a9..483afced1082 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -929,7 +929,7 @@ void notifySystemWindow(vcl::Window const * _pWindow, 
vcl::Window* _pToRegister,
 void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 
_nColId )
 {
 sal_Int32 nColSize = -1;
-sal_uInt32 nDefaultWidth = _pBox->GetDefaultColumnWidth( 
_pBox->GetColumnTitle( _nColId ) );
+::tools::Long nDefaultWidth = _pBox->GetDefaultColumnWidth( 
_pBox->GetColumnTitle( _nColId ) );
 if ( nDefaultWidth != _pBox->GetColumnWidth( _nColId ) )
 {
 Size aSizeMM = _pBox->PixelToLogic( Size( _pBox->GetColumnWidth( 
_nColId ), 0 ), MapMode( MapUnit::MapMM ) );
diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx
index 2bdd2b910465..42155eb1f45e 100644
--- a/include/svtools/brwbox.hxx
+++ b/include/svtools/brwbox.hxx
@@ -510,12 +510,12 @@ public:
 { Control::SetFont( rNewFont ); }
 
 // inserting, changing, removing and freezing of columns
-voidInsertHandleColumn( sal_uLong nWidth );
+voidInsertHandleColumn( tools::Long nWidth );
 voidInsertDataColumn( sal_uInt16 nItemId, const OUString& 
rText,
 tools::Long nSize, HeaderBarItemBits nBits 
= HeaderBarItemBits::STDSTYLE,
 sal_uInt16 nPos = HEADERBAR_APPEND );
 voidSetColumnTitle( sal_uInt16 nColumnId, const OUString 
&rTitle );
-voidSetColumnWidth( sal_uInt16 nColumnId, sal_uLong nWidth );
+voidSetColumnWidth( sal_uInt16 nColumnId, tools::Long nWidth );
 voidSetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos );
 voidFreezeColumn( sal_uInt16 nColumnId );
 voidRemoveColumn( sal_uInt16 nColumnId );
@@ -530,7 +530,7 @@ public:
 // access to dynamic values of cursor row
 OUStringGetColumnTitle( sal_uInt16 nColumnId ) const;
 tools::Rectangle   GetFieldRect( sal_uInt16 nColumnId ) const;
-sal_uLong   GetColumnWidth( sal_uInt16 nColumnId ) const;
+tools::Long GetColumnWidth( sal_uInt16 nColumnId ) const;
 sal_uInt16  GetColumnId( sal_uInt16 nPos ) const;
 sal_uInt16  GetColumnPos( sal_uInt16 nColumnId ) const;
 boolIsFrozen( sal_uInt16 nColumnId ) const;
@@ -619,7 +619,7 @@ public:
 
 The width is calculated so that the text fits completely, plus some 
margin.
 */
-sal_uLong GetDefaultColumnWidth( const OUString& _rText ) const;
+tools::Long   GetDefaultColumnWidth( const OUString& _rText ) const;
 
 /** GetCellText returns the text at the given position
 @param  _nRow
diff --git a/svtools/source/brwbox/brwbox1.cxx 
b/svtools/source/brwbox/brwbox1.cxx
index 509d1265649f..cc78b514f7a6 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -272,13 +272,13 @@ const vcl::Font& BrowseBox::GetFont() const
 return pDataWin->GetFont();
 }
 
-sal_uLong BrowseBox::GetDefaultColumnWidth( const OUString& _rText ) const
+tools::Long BrowseBox::GetDefaultColumnWidth( const OUString& _rText ) const
 {
 return pDataWin->GetTextWidth( _rText ) + 
pDataWin->GetTextWidth(OUString('0')) * 4;
 }
 
 
-void BrowseBox::InsertHandleColumn( sal_uLong nWidth )
+void BrowseBox::InsertHandleColumn( tools::Long nWidth )
 {
 
 #if OSL_DEBUG_LEVEL > 0
@@ -570,7 +570,7 @@ void BrowseBox::SetColumnTitle( sal_uInt16 nItemId, const 
OUString& rTitle )
 }
 
 
-void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth )
+void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, tools::Long nWidth )
 {
 
 // get the pos

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

2023-11-09 Thread Caolán McNamara (via logerrit)
 dbaccess/source/core/dataaccess/ModelImpl.cxx |3 +-
 include/sfx2/docmacromode.hxx |4 ++-
 include/sfx2/objsh.hxx|3 ++
 sc/source/core/data/global.cxx|   33 +-
 sfx2/source/doc/docmacromode.cxx  |8 --
 sfx2/source/doc/objmisc.cxx   |8 +-
 sfx2/source/doc/objxtor.cxx   |1 
 sfx2/source/inc/objshimp.hxx  |3 +-
 8 files changed, 56 insertions(+), 7 deletions(-)

New commits:
commit 8ccd386b0793b14859ba2031b34853715606828c
Author: Caolán McNamara 
AuthorDate: Fri Nov 3 17:26:25 2023 +
Commit: Caolán McNamara 
CommitDate: Thu Nov 9 13:29:50 2023 +0100

default to ignoring libreoffice special-purpose protocols in calc hyperlink

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

diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx 
b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 98023c53c38b..2144a1793e11 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1122,7 +1122,8 @@ bool ODatabaseModelImpl::checkMacrosOnLoading()
 {
 Reference< XInteractionHandler > xInteraction;
 xInteraction = m_aMediaDescriptor.getOrDefault( "InteractionHandler", 
xInteraction );
-return m_aMacroMode.checkMacrosOnLoading( xInteraction );
+const bool bHasMacros = m_aMacroMode.hasMacros();
+return m_aMacroMode.checkMacrosOnLoading(xInteraction, false 
/*HasValidContentSignature*/, bHasMacros);
 }
 
 void ODatabaseModelImpl::resetMacroExecutionMode()
diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index f7213b709b87..688297f26598 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -274,6 +274,8 @@ namespace sfx2
 */
 static bool storageHasMacros( const css::uno::Reference< 
css::embed::XStorage >& _rxStorage );
 
+bool hasMacros() const;
+
 static bool containerHasBasicMacros( const css::uno::Reference< 
css::script::XLibraryContainer >& xContainer );
 /** checks the macro execution mode while loading the document.
 
@@ -301,7 +303,7 @@ namespace sfx2
 bool
 checkMacrosOnLoading(
 const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
-bool bHasValidContentSignature = false
+bool bHasValidContentSignature, bool bHasMacros
 );
 
 private:
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index ea2596658a5d..83fbeba7a230 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -433,6 +433,9 @@ public:
 voidSetMacroCallsSeenWhileLoading();
 boolGetMacroCallsSeenWhileLoading() const;
 
+// true if the document had macros (or similar) on load to trigger warning 
user
+boolGetHadCheckedMacrosOnLoad() const;
+
 const css::uno::Sequence< css::beans::PropertyValue >& 
GetModifyPasswordInfo() const;
 boolSetModifyPasswordInfo( const 
css::uno::Sequence< css::beans::PropertyValue >& aInfo );
 
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 57c9759f17a4..72323f7630e8 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -29,7 +29,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -822,7 +824,7 @@ void ScGlobal::OpenURL(const OUString& rURL, const 
OUString& rTarget, bool bIgno
 
 OUString aUrlName( rURL );
 SfxViewFrame* pFrame = nullptr;
-const SfxObjectShell* pObjShell = nullptr;
+SfxObjectShell* pObjShell = nullptr;
 OUString aReferName;
 if ( pScActiveViewShell )
 {
@@ -856,6 +858,35 @@ void ScGlobal::OpenURL(const OUString& rURL, const 
OUString& rTarget, bool bIgno
 aUrlName = aNewUrlName;
 }
 
+if (INetURLObject(aUrlName).IsExoticProtocol())
+{
+// Default to ignoring exotic protocols
+bool bAllow = false;
+if (pObjShell)
+{
+// If the document had macros when loaded then follow the allowed 
macro-mode
+if (pObjShell->GetHadCheckedMacrosOnLoad())
+bAllow = pObjShell->AdjustMacroMode();
+else // otherwise ask the user, defaulting to cancel
+{
+assert(pFrame && "if we have pObjShell we have pFrame");
+//Reuse URITools::onOpenURI warning string
+std::unique_ptr 
xQueryBox(Application::CreateMessageDialog(pFrame->GetFrameWeld(),
+   
VclMessageType::Warning, VclButtonsType:

[Libreoffice-commits] core.git: 2 commits - android/source

2023-11-09 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java |   15 
--
 android/source/src/java/org/mozilla/gecko/gfx/LayerView.java |2 -
 2 files changed, 17 deletions(-)

New commits:
commit f324220e8772799ecf2b21cb6084757c0e56953f
Author: Michael Weghorn 
AuthorDate: Thu Nov 9 08:13:22 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 13:18:17 2023 +0100

android: Drop Robocop comment

Robocop is a tool for UI-testing fore Firefox on Android [1],
but not used for LibreOffice Viewer, so drop the misleading
comment.

[1] https://wiki.mozilla.org/Auto-tools/Projects/Robocop

Change-Id: I270735b2258f18691f60865c683856d58a94bb04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159199
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
index 7c2dda766d0a..2e1a897b62e7 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -35,8 +35,6 @@ import org.mozilla.gecko.OnSlideSwipeListener;
  *
  * This view delegates to LayerRenderer to actually do the drawing. Its role 
is largely that of a
  * mediator between the LayerRenderer and the LayerController.
- *
- * Note that LayerView is accessed by Robocop via reflection.
  */
 public class LayerView extends FrameLayout {
 private static String LOGTAG = LayerView.class.getName();
commit aef1b023d5ccd3cf532f98f921734b22e4a027ed
Author: Michael Weghorn 
AuthorDate: Thu Nov 9 08:09:47 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 13:18:11 2023 +0100

android: Drop never-assigned to LayerRenderer#mPixelBuffer

That member was never assigned a value but only read
from by code claiming to be "used by robocop for testing purposes".

[1] describes Robocop as a UI-level testing framework for Firefox
for Android, which we don't use, so drop the class member and
related test code.

[1] https://wiki.mozilla.org/Auto-tools/Projects/Robocop

Change-Id: I467296874d4295060cc9670d1f1c8b0dfeb77523
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159198
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
index 6f013612384e..6ea7dd0edc10 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
@@ -51,9 +51,6 @@ public class LayerRenderer implements GLSurfaceView.Renderer {
 
 private CopyOnWriteArrayList mExtraLayers = new 
CopyOnWriteArrayList();
 
-/* Used by robocop for testing purposes */
-private IntBuffer mPixelBuffer;
-
 // Used by GLES 2.0
 private int mProgram;
 private int mPositionHandle;
@@ -451,18 +448,6 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
 // If a layer update requires further work, schedule another redraw
 if (!mUpdated)
 mView.requestRender();
-
-/* Used by robocop for testing purposes */
-IntBuffer pixelBuffer = mPixelBuffer;
-if (mUpdated && pixelBuffer != null) {
-synchronized (pixelBuffer) {
-pixelBuffer.position(0);
-GLES20.glReadPixels(0, 0, 
(int)mScreenContext.viewport.width(),
-(int)mScreenContext.viewport.height(), 
GLES20.GL_RGBA,
-GLES20.GL_UNSIGNED_BYTE, pixelBuffer);
-pixelBuffer.notify();
-}
-}
 }
 }
 }


[Libreoffice-commits] core.git: 3 commits - android/source sfx2/source sw/source

2023-11-09 Thread Noel Grandin (via logerrit)
 android/source/src/java/org/mozilla/gecko/gfx/GLController.java |3 ++-
 sfx2/source/doc/exoticfileloadexception.cxx |7 +--
 sfx2/source/doc/exoticfileloadexception.hxx |6 --
 sw/source/core/doc/docfmt.cxx   |2 +-
 sw/source/core/inc/DocumentContentOperationsManager.hxx |2 +-
 5 files changed, 9 insertions(+), 11 deletions(-)

New commits:
commit c621e6a2614dd8277def293b55d0444ea28c3d4e
Author: Noel Grandin 
AuthorDate: Wed Nov 8 10:17:26 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 9 13:16:28 2023 +0100

loplugin:fieldcast in ExoticFileLoadException

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

diff --git a/sfx2/source/doc/exoticfileloadexception.cxx 
b/sfx2/source/doc/exoticfileloadexception.cxx
index 91dc9c273929..2b2500d71aef 100644
--- a/sfx2/source/doc/exoticfileloadexception.cxx
+++ b/sfx2/source/doc/exoticfileloadexception.cxx
@@ -27,11 +27,6 @@ ExoticFileLoadException::ExoticFileLoadException(const 
OUString& rURL,
 m_aRequest <<= aReq;
 }
 
-bool ExoticFileLoadException::isApprove() const
-{
-comphelper::OInteractionApprove* pBase
-= static_cast(m_xApprove.get());
-return pBase->wasSelected();
-}
+bool ExoticFileLoadException::isApprove() const { return 
m_xApprove->wasSelected(); }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/exoticfileloadexception.hxx 
b/sfx2/source/doc/exoticfileloadexception.hxx
index 8204d6f55426..9a4211d5d6f9 100644
--- a/sfx2/source/doc/exoticfileloadexception.hxx
+++ b/sfx2/source/doc/exoticfileloadexception.hxx
@@ -12,7 +12,9 @@
 
 #include 
 #include 
+#include 
 #include 
+#include 
 
 class ExoticFileLoadException : public 
cppu::WeakImplHelper
 {
@@ -33,8 +35,8 @@ public:
 // member
 private:
 css::uno::Any m_aRequest;
-css::uno::Reference m_xAbort;
-css::uno::Reference m_xApprove;
+rtl::Reference m_xAbort;
+rtl::Reference m_xApprove;
 
css::uno::Sequence> 
m_lContinuations;
 };
 
commit 444548b4c7ac47028cdfe0a6c45b1cc32514848a
Author: Noel Grandin 
AuthorDate: Tue Nov 7 16:13:38 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 9 13:16:18 2023 +0100

loplugin:fieldcast in ParaRstFormat

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

diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index c7deb91478b9..b6ac04ef682a 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1013,7 +1013,7 @@ static bool lcl_SetTextFormatColl( SwNode* pNode, void* 
pArgs )
 }
 }
 
-SwTextFormatColl* pFormat = 
static_cast(pPara->pFormatColl);
+SwTextFormatColl* pFormat = pPara->pFormatColl;
 if ( pPara->bReset )
 {
 lcl_RstAttr(pCNd, pPara);
diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx 
b/sw/source/core/inc/DocumentContentOperationsManager.hxx
index 434eaf7ed07b..8332cf34bf92 100644
--- a/sw/source/core/inc/DocumentContentOperationsManager.hxx
+++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx
@@ -117,7 +117,7 @@ public:
 //originallyfrom docfmt.cxx
 struct ParaRstFormat
 {
-SwFormatColl* pFormatColl;
+SwTextFormatColl* pFormatColl;
 SwHistory* pHistory;
 const SwPosition *pSttNd, *pEndNd;
 const SfxItemSet* pDelSet;
commit d9a43fa5f94839d79cbd8524ba5c0b1865e6ad52
Author: Michael Weghorn 
AuthorDate: Thu Nov 9 08:54:08 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 13:16:16 2023 +0100

tdf#158125 android: Don't insist on RGB 565 EGL config

As the `eglChooseConfig` doc [1] says:

> eglChooseConfig returns in configs a list of all EGL frame buffer
> configurations that match the attributes specified
> [...]
> Attributes are matched in an attribute-specific manner. Some of the
> attributes, such as EGL_LEVEL, must match the specified value exactly.
> Others, such as, EGL_RED_SIZE must meet or exceed the specified minimum
> values.

The config/attribute list used for Android Viewer specifies
EGL_RED_SIZE=5, EGL_GREEN_SIZE=6, and EGL_BLUE_SIZE=5 and so
far, only configs using exactly those bit sizes were accepted,
causing 1 of the 11 devices used in automated tests in Google Play CI
crashing with this stack trace:

Exception org.mozilla.gecko.gfx.GLController$GLControllerException: No 
suitable EGL configuration found
  at org.mozilla.gecko.gfx.GLController.chooseConfig 
(GLController.java:219)
  at org.mozilla.gecko.gfx.GLController.initEGL (GLController.java:172)
  at org.mozilla.gecko.gfx.GLController.initEG

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

2023-11-09 Thread Michael Weghorn (via logerrit)
 android/source/res/layout/activity_document_browser.xml |1 +
 android/source/res/layout/toolbar_bottom.xml|7 +--
 android/source/res/values/strings.xml   |3 +++
 3 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit a21e7a76d745750dcea14bc6311e4f1766c3fa45
Author: Michael Weghorn 
AuthorDate: Thu Nov 9 10:24:13 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 12:59:28 2023 +0100

android a11y: Add content labels

Add a few content labels, so screen readers can
present these UI elements in a more meaningful way.

Reported by Google Play CI:

> This item may not have a label readable by screen readers.
> Learn more [1]

[1] https://support.google.com/accessibility/android/answer/7158690

Change-Id: Ic8e8885ed132367426207fad652e324ea4eb0790
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159206
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/res/layout/activity_document_browser.xml 
b/android/source/res/layout/activity_document_browser.xml
index 23ef44f4e5dc..c4dcf3f0c8c1 100644
--- a/android/source/res/layout/activity_document_browser.xml
+++ b/android/source/res/layout/activity_document_browser.xml
@@ -116,6 +116,7 @@
 
 
+android:src="@drawable/ic_search_direction_down"
+android:contentDescription="@string/search_find_next" />
 
 
+android:src="@drawable/ic_search_direction_up"
+android:contentDescription="@string/search_find_previous" />
+/>
 
 
 Show Notice
 More Info
 
+Create New File
 New Text Document
 New Presentation
 New Spreadsheet
@@ -26,6 +27,8 @@
 LibreOffice Browser
 Search
 Keyword not found
+Find Next
+Find Previous
 Preferences
 fileicon
 Recent files


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

2023-11-09 Thread Mike Kaganski (via logerrit)
 extensions/source/ole/olethread.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 7938b495947e4311924bea7724a24c10e363de42
Author: Mike Kaganski 
AuthorDate: Thu Nov 9 12:55:34 2023 +0300
Commit: Mike Kaganski 
CommitDate: Thu Nov 9 12:31:28 2023 +0100

Downgrade expected failures in CoInitializeEx to SAL_INFO

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

diff --git a/extensions/source/ole/olethread.cxx 
b/extensions/source/ole/olethread.cxx
index 1580c0b7d44a..503f8bc096c1 100644
--- a/extensions/source/ole/olethread.cxx
+++ b/extensions/source/ole/olethread.cxx
@@ -34,14 +34,17 @@ void o2u_attachCurrentThread()
 {   // FIXME: is it a problem that this ends up in STA currently?
 assert(RPC_E_CHANGED_MODE == hr);
 // Let's find out explicitly what apartment mode we are in.
-SAL_WARN("extensions.olebridge", "CoInitializeEx failed"
- << (hr == RPC_E_CHANGED_MODE ? " (expectedly)" : "")
- << ": " << WindowsErrorStringFromHRESULT(hr));
+if (hr == RPC_E_CHANGED_MODE)
+SAL_INFO("extensions.olebridge", "CoInitializeEx failed 
(expectedly): "
+ << 
WindowsErrorStringFromHRESULT(hr));
+else
+SAL_WARN("extensions.olebridge",
+ "CoInitializeEx failed: " << 
WindowsErrorStringFromHRESULT(hr));
 APTTYPE nAptType;
 APTTYPEQUALIFIER nAptTypeQualifier;
 if (SUCCEEDED(CoGetApartmentType(&nAptType, &nAptTypeQualifier)))
 {
-SAL_WARN("extensions.olebridge",
+SAL_INFO("extensions.olebridge",
  "  Thread is in a "
  << (nAptType == APTTYPE_STA ? 
OUString("single-threaded") :
  (nAptType == APTTYPE_MTA ? 
OUString("multi-threaded") :


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

2023-11-09 Thread Miklos Vajna (via logerrit)
 sw/qa/uitest/ui/frmdlg/frmdlg.py   |   20 +++-
 sw/source/ui/frmdlg/frmpage.cxx|   16 +++-
 sw/source/uibase/frmdlg/frmmgr.cxx |   25 ++---
 sw/source/uibase/inc/frmmgr.hxx|2 ++
 4 files changed, 54 insertions(+), 9 deletions(-)

New commits:
commit e306352b9ddd8bddfc37f0cfaac078d9260650d6
Author: Miklos Vajna 
AuthorDate: Thu Nov 9 08:51:59 2023 +0100
Commit: Miklos Vajna 
CommitDate: Thu Nov 9 11:37:33 2023 +0100

sw floattable, insert UI: allow direct creation of floating tables

The frame insert UI could move a table into a new fly, and then the
frame properties allowed marking this fly as a split fly, but not in one
step.

This happened because the "split fly" checkbox is only visible when we
have a fly that has exactly 1 table, but the "new frame" dialog has no
fly as it still has to be created.

Fix the problem by showing the "split fly" checkbox if we don't have a
fly, but a single table is selected, because we know
SwDoc::MakeFlyAndMove() will create a fly that has exactly one table in
it.

Extract the common code to a new
SwFlyFrameAttrMgr::SingleTableSelected() to avoid copy&paste.

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

diff --git a/sw/qa/uitest/ui/frmdlg/frmdlg.py b/sw/qa/uitest/ui/frmdlg/frmdlg.py
index e30b67ff5313..4a438895572b 100644
--- a/sw/qa/uitest/ui/frmdlg/frmdlg.py
+++ b/sw/qa/uitest/ui/frmdlg/frmdlg.py
@@ -17,7 +17,7 @@ from uitest.uihelper.common import get_url_for_data_file
 
 
 class Test(UITestCase):
-def test_content_control_dialog(self):
+def test_uno_frame_dialog(self):
 with self.ui_test.create_doc_in_start_center("writer") as xComponent:
 # Given a document with a floating table:
 args = {
@@ -80,4 +80,22 @@ class Test(UITestCase):
 # i.e. the width was empty instead of the size from the UI.
 self.assertEqual(xComponent.TextFrames.Frame1.Size.Width, 
expected_mm100)
 
+def test_insert_floating_table(self):
+with self.ui_test.create_doc_in_start_center("writer") as xComponent:
+# Given a Writer document with a selected (inline) table:
+args = {
+"Columns": 1,
+"Rows": 1,
+}
+self.xUITest.executeCommandWithParameters(".uno:InsertTable", 
mkPropertyValues(args))
+self.xUITest.executeCommand(".uno:SelectAll")
+# When converting it to a split fly:
+with 
self.ui_test.execute_dialog_through_command(".uno:InsertFrame") as xDialog:
+xFlySplit = xDialog.getChild("flysplit")
+fly_split_visible = get_state_as_dict(xFlySplit)["Visible"] == 
"true"
+# Then make sure the inserted fly can be marked as "split allowed":
+# Without the accompanying fix in place, this test would have 
failed, the fly had to be
+# inserted first, only then it could be marked as "split allowed".
+self.assertEqual(fly_split_visible, True)
+
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index b38ac22d0d11..911df55f66d7 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -1050,9 +1050,23 @@ void SwFramePage::Reset( const SfxItemSet *rSet )
 const SwFrameFormat* pFlyFormat = pSh->GetFlyFrameFormat();
 if (!pFlyFormat || !ContainsSingleTable(*pFlyFormat) || 
ContainsChain(*pFlyFormat))
 {
+bool bSingleTable = false;
+if (!pFlyFormat && m_bNew)
+{
+// No fly is selected: check if a whole table is selected. If so, 
allow moving that into
+// a split fly.
+if (SwFlyFrameAttrMgr::SingleTableSelected(*pSh))
+{
+bSingleTable = true;
+}
+}
+
 // Only allow fly split if the frame contains a single table, 
otherwise it would be hard to
 // save the resulting model to Word formats.
-m_xFlySplitCB->hide();
+if (!bSingleTable)
+{
+m_xFlySplitCB->hide();
+}
 }
 
 Init(*rSet);
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx 
b/sw/source/uibase/frmdlg/frmmgr.cxx
index a71b7ef3fb0a..eb38c1c803f7 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -625,36 +625,47 @@ void SwFlyFrameAttrMgr::SetAttrSet(const SfxItemSet& rSet)
 m_aSet.Put( rSet );
 }
 
-void SwFlyFrameAttrMgr::SetFrameSizeFromTable()
+const SwTableFormat* SwFlyFrameAttrMgr::SingleTableSelected(SwWrtShell& 
rWrtShell)
 {
-if (!m_pOwnSh->IsTableMode())
+if (!rWrtShell.IsTableMode())
 {
-return;
+return nullptr;
 }
 
 // We have a table selection

[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - chart2/qa

2023-11-09 Thread Stephan Bergmann (via logerrit)
 chart2/qa/extras/xshape/data/ods/tdf90839-4.ods   |binary
 chart2/qa/extras/xshape/data/pptx/tdf149204.pptx  |binary
 chart2/qa/extras/xshape/data/reference/tdf149204.xml  |  152 +-
 chart2/qa/extras/xshape/data/reference/tdf90839-1.xml |  142 
 chart2/qa/extras/xshape/data/reference/tdf90839-2.xml |  148 -
 chart2/qa/extras/xshape/data/reference/tdf90839-3.xml |  148 -
 chart2/qa/extras/xshape/data/reference/tdf90839-4.xml |   96 +--
 chart2/qa/extras/xshape/data/xlsx/tdf90839-1.xlsx |binary
 chart2/qa/extras/xshape/data/xlsx/tdf90839-2.xlsx |binary
 chart2/qa/extras/xshape/data/xlsx/tdf90839-3.xlsx |binary
 10 files changed, 343 insertions(+), 343 deletions(-)

New commits:
commit d1c74f123f630b50c40db04e4d3b8d2f2cda0462
Author: Stephan Bergmann 
AuthorDate: Tue Oct 24 10:34:55 2023 +0200
Commit: Michael Stahl 
CommitDate: Thu Nov 9 11:08:54 2023 +0100

Replace use of "Calibri" and "Calibri Light" with "Noto Sans"

...in CppunitTest_chart2_xshape, which had caused
 to fail with

> diff.cxx:324:Assertion
> Test name: Chart2XShapeTest::testTdf149204
> assertion failed
> - Expression: valInTolerance
> - 3511; Found Value: 3485; Tolerance: 1; Relative: 0
>
> diff.cxx:265:Assertion
> Test name: Chart2XShapeTest::testPieChartLabels1
> double equality assertion failed
> - Expected: 8383
> - Actual  : 8399
> - Delta   : 1e-08
> - Reference: 
/run/build/libreoffice/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
> - Node: /XShapes/XShape[2]/XShapes/XShape[3]/XShapes/XShape[2]
> - Attr: positionX
>
> diff.cxx:324:Assertion
> Test name: Chart2XShapeTest::testPieChartLabels2
> assertion failed
> - Expression: valInTolerance
> - 3124; Found Value: 2966; Tolerance: 1; Relative: 0
>
> diff.cxx:324:Assertion
> Test name: Chart2XShapeTest::testPieChartLabels3
> assertion failed
> - Expression: valInTolerance
> - 3124; Found Value: 2966; Tolerance: 1; Relative: 0
>
> diff.cxx:324:Assertion
> Test name: Chart2XShapeTest::testPieChartLabels4
> assertion failed
> - Expression: valInTolerance
> - 2768; Found Value: 2531; Tolerance: 1; Relative: 0

(cherry picked from commit e82c4f133d13722fc39f06302f49279169681608)
Conflicts:
chart2/qa/extras/xshape/data/reference/tdf149204.xml
chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
chart2/qa/extras/xshape/data/reference/tdf90839-3.xml
chart2/qa/extras/xshape/data/reference/tdf90839-4.xml

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

diff --git a/chart2/qa/extras/xshape/data/ods/tdf90839-4.ods 
b/chart2/qa/extras/xshape/data/ods/tdf90839-4.ods
index fe9950f2797f..3126ac1759e3 100644
Binary files a/chart2/qa/extras/xshape/data/ods/tdf90839-4.ods and 
b/chart2/qa/extras/xshape/data/ods/tdf90839-4.ods differ
diff --git a/chart2/qa/extras/xshape/data/pptx/tdf149204.pptx 
b/chart2/qa/extras/xshape/data/pptx/tdf149204.pptx
index a5c1a96a0d04..60d006547a2a 100644
Binary files a/chart2/qa/extras/xshape/data/pptx/tdf149204.pptx and 
b/chart2/qa/extras/xshape/data/pptx/tdf149204.pptx differ
diff --git a/chart2/qa/extras/xshape/data/reference/tdf149204.xml 
b/chart2/qa/extras/xshape/data/reference/tdf149204.xml
index 4c9ea8161af9..edbe94dd5bec 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf149204.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf149204.xml
@@ -46,15 +46,15 @@

 
  
- 
+ 
   
-   
+   
 
- 
+ 
   
-   
+   
 
- 
+ 
   
   
   
@@ -64,29 +64,29 @@
   
   

-   
+   

   
  
 
 
  
- 
+ 
  
 

   
   

-   
+   

   
  
- 
+ 
   
-   
+   
 
- 
+ 
   
   
   
@@ -96,29 +96,29 @@
   
   

-   
+   

   
  
 
 
  
- 
+ 
  
 

   
   

-   
+   

   
  
- 
+ 
   
-   
+ 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/qa sw/source

2023-11-09 Thread Miklos Vajna (via logerrit)
 sw/qa/uibase/frmdlg/frmdlg.cxx |   45 +
 sw/source/uibase/frmdlg/frmmgr.cxx |   35 
 sw/source/uibase/inc/frmmgr.hxx|1 
 3 files changed, 81 insertions(+)

New commits:
commit 323d5bb792bb718e6c30622a0e0f53c36edab1f4
Author: Miklos Vajna 
AuthorDate: Wed Nov 8 08:25:23 2023 +0100
Commit: Caolán McNamara 
CommitDate: Thu Nov 9 10:31:46 2023 +0100

sw floattable, insert UI: inherit fly width from selected table width

Inline table width defaults to the body frame width, so a hardcoded 2cm
default for the fly width is a bit poor.

Leave the normal fly insert case unchanged, but if an entire table is
selected, then change the default to the table width.

Check for the table selection like SwFEShell::NewFlyFrame() does it, and
determine if the entire table is selected like SwDoc::MakeFlyAndMove()
does it.

With this, a default table with a default frame keeps its width on frame
insert.

(cherry picked from commit 0ecb69d53864b582eb59533729ada01d85d383e6)

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

diff --git a/sw/qa/uibase/frmdlg/frmdlg.cxx b/sw/qa/uibase/frmdlg/frmdlg.cxx
index f6b7653de824..81a7746170c1 100644
--- a/sw/qa/uibase/frmdlg/frmdlg.cxx
+++ b/sw/qa/uibase/frmdlg/frmdlg.cxx
@@ -13,6 +13,11 @@
 
 #include 
 
+#include 
+#include 
+#include 
+#include 
+
 /// Covers sw/source/uibase/frmdlg/ fixes.
 class SwUibaseFrmdlgTest : public SwModelTestBase
 {
@@ -60,6 +65,46 @@ CPPUNIT_TEST_FIXTURE(SwUibaseFrmdlgTest, 
testAnchorTypeFromStyle)
 CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, eActual);
 }
 
+CPPUNIT_TEST_FIXTURE(SwUibaseFrmdlgTest, testInsertFrameWidth)
+{
+// Given a document with an inline table, its width is set to 6000 twips:
+createSwDoc();
+// Insert a table:
+SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+SwInsertTableOptions aTableOptions(SwInsertTableFlags::DefaultBorder, 0);
+pWrtShell->InsertTable(aTableOptions, /*nRows=*/1, /*nCols=*/1);
+pWrtShell->MoveTable(GotoPrevTable, fnTableStart);
+SwTwips nExpectedWidth = 6000;
+{
+SfxItemSetFixed 
aSet(pWrtShell->GetAttrPool());
+SwFormatFrameSize aSize(SwFrameSize::Variable, nExpectedWidth);
+aSet.Put(aSize);
+pWrtShell->SetTableAttr(aSet);
+}
+pWrtShell->GoPrevCell();
+pWrtShell->Insert("A1");
+SwFormatFrameSize aRowSize(SwFrameSize::Minimum);
+pWrtShell->SetRowHeight(aRowSize);
+pWrtShell->GoNextCell();
+pWrtShell->Insert("A2");
+pWrtShell->SetRowHeight(aRowSize);
+// Select cell:
+pWrtShell->SelAll();
+// Select table:
+pWrtShell->SelAll();
+
+// When converting that table to a floating table:
+SwFlyFrameAttrMgr aMgr(/*bNew=*/true, pWrtShell, Frmmgr_Type::TEXT, 
nullptr);
+
+// Then make sure that the fly width will be based on the table width:
+const SwFormatFrameSize* pFrameSize = 
aMgr.GetAttrSet().GetItem(RES_FRM_SIZE);
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 6000 (nExpectedWidth)
+// - Actual  : 1134 (2cm)
+// i.e. the fly width was the default, not inherited from the selected 
table.
+CPPUNIT_ASSERT_EQUAL(nExpectedWidth, pFrameSize->GetWidth());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx 
b/sw/source/uibase/frmdlg/frmmgr.cxx
index d135f5f2d24b..1060dcb6e2d9 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -84,6 +84,9 @@ SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* 
pSh, Frmmgr_Type nT
 }
 m_aSet.SetParent( &m_pOwnSh->GetFormatFromPool( nId )->GetAttrSet());
 m_aSet.Put( SwFormatFrameSize( SwFrameSize::Minimum, DFLT_WIDTH, 
DFLT_HEIGHT ));
+
+SetFrameSizeFromTable();
+
 if ( 0 != ::GetHtmlMode(pSh->GetView().GetDocShell()) )
 m_aSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::LEFT, 
text::RelOrientation::PRINT_AREA ) );
 
@@ -622,4 +625,36 @@ void SwFlyFrameAttrMgr::SetAttrSet(const SfxItemSet& rSet)
 m_aSet.Put( rSet );
 }
 
+void SwFlyFrameAttrMgr::SetFrameSizeFromTable()
+{
+if (!m_pOwnSh->IsTableMode())
+{
+return;
+}
+
+// We have a table selection.
+SwSelBoxes aBoxes;
+GetTableSel(*m_pOwnSh, aBoxes);
+if (aBoxes.empty())
+{
+return;
+}
+
+auto pTableNd = 
const_cast(aBoxes[0]->GetSttNd()->FindTableNode());
+if (!pTableNd)
+{
+return;
+}
+
+SwTable& rTable = pTableNd->GetTable();
+if (aBoxes.size() != rTable.GetTabSortBoxes().size())
+{
+return;
+}
+
+

Re: Testing CJK glyphs

2023-11-09 Thread Caolán McNamara
On Thu, 2023-11-09 at 16:23 +1100, Chris Sherlock wrote:
> Just a quick question - I want to write a unit test that checks the
> glyph advancements for CJK glyphs. 
> 
> Specifically, I want to test the advancements of the following text:
> 
> 根据10.1(37BA) Eng
> 
> What font comes bundled with LibreOffice that I can use?

My understanding is that we don't bundle a CJK font. I think the best
option is to follow the pattern of:
https://git.libreoffice.org/core/commit/6b178c6e88ec5a765ad2b3ccd98182286222f550
where you can see from the little font.readme how to make a small
testing font with just the subset of glyphs you need from (an
appropriately licensed) CJK font for the purposes of such a test.

There is also the existence of vcl/qa/cppunit/cjktext.cxx which is
basically an optional test if run on a config which happens to have one
of a set of known CJK fonts installed, that's not a great option. Maybe
the 2nd one should be replaced by some variant of the first one.


[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - pyuno/source

2023-11-09 Thread Stephan Bergmann (via logerrit)
 pyuno/source/loader/pyuno_loader.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 08a3b1bd2984da05b7a7c66cac3034b2d7985e06
Author: Stephan Bergmann 
AuthorDate: Thu Jun 16 18:58:18 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 9 09:40:37 2023 +0100

rhbz#2097411 Avoid obsolete PyThreadState_Delete crashing Python 3.11

1fb53a637597f76bea86514b62ddfad34f60c889 "pyuno_loader::CreateInstance: 
delete
the initial PyThreadState" had added the PyThreadState_Delete for claimed
benefits but whose details appear lost to history (cf. the comment thread
starting at


"pyuno_loader::CreateInstance: delete the initial PyThreadState").  And at 
least
a recent master Linux --enable-python=fully-internal build with the bundled
Python 3.8.12 appears to succeed `make check` just fine with the
PyThreadState_Delete temporarily removed.

But on the other hand, building against upcoming Python 3.11 now started to 
make
CppunitTest_services fail with

> Fatal Python error: init_threadstate: thread state already initialized
> Python runtime state: initialized
> Thread 0x81c8b020 (most recent call first):
>   
> Fatal exception: Signal 6
> Stack:
> 
/builddir/build/BUILD/libreoffice-7.3.4.2/instdir/program/libuno_sal.so.3(+0x37c28)[0x81be7c28]
> 
/builddir/build/BUILD/libreoffice-7.3.4.2/instdir/program/libuno_sal.so.3(+0x37e40)[0x81be7e40]
> linux-vdso.so.1(__kernel_rt_sigreturn+0x0)[0x81ccb7ec]
> /lib64/libc.so.6(+0x82878)[0x81742878]
> /lib64/libc.so.6(raise+0x20)[0x816fae00]
> /lib64/libc.so.6(abort+0xe8)[0x816e72b8]
> /lib64/libpython3.11.so.1.0(+0x104e28)[0xfffee4de4e28]
> /lib64/libpython3.11.so.1.0(+0x105200)[0xfffee4de5200]
> 
/lib64/libpython3.11.so.1.0(PyThread_get_thread_native_id+0x0)[0xfffee4ed6764]
> /lib64/libpython3.11.so.1.0(PyThreadState_New+0x14)[0xfffee4ed6628]
> 
/builddir/build/BUILD/libreoffice-7.3.4.2/instdir/program/libpyuno.so(_ZN5pyuno14PyThreadAttachC2EP3_is+0x78)[0xfffee4c8c52c]
> 
/builddir/build/BUILD/libreoffice-7.3.4.2/instdir/program/libpythonloaderlo.so(pyuno_Loader_get_implementation+0x5c)[0xfffee5243060]
> 
/builddir/build/BUILD/libreoffice-7.3.4.2/instdir/program/libuno_cppuhelpergcc3.so.3(+0x544b4)[0x815544b4]

because of the PyThreadState_Delete.  (The deleted PyThreadState, while not
reused again directly, is still recorded in the state obtained from
PyInterpreterState_Head() later.)

So conservatively keep the PyThreadState_Delete of unclear benefit for older
Python versions and only drop it for 3.11 where it is known to have negative
effects now.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136006
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 1638b4f78af70b7b97d0a081ed51390dd87bf1f9)

Change-Id: I9b99f1e947f0b165ddc95c2bfbd764858dda39db

diff --git a/pyuno/source/loader/pyuno_loader.cxx 
b/pyuno/source/loader/pyuno_loader.cxx
index 938d53814545..477c8a3a318a 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -230,10 +230,12 @@ PythonInit() {
 
 PyThreadState *tstate = PyThreadState_Get();
 PyEval_ReleaseThread( tstate );
+#if PY_VERSION_HEX < 0x030B
 // This tstate is never used again, so delete it here.
 // This prevents an assertion in PyThreadState_Swap on the
 // PyThreadAttach below.
 PyThreadState_Delete(tstate);
+#endif
 }
 }
 };


[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - dictionaries

2023-11-09 Thread Samuel Mehrbrodt (via logerrit)
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e1357551fb692d0cb8e088ede7585f3259b8365f
Author: Samuel Mehrbrodt 
AuthorDate: Thu Nov 9 09:40:26 2023 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Nov 9 09:40:26 2023 +0100

Update git submodules

* Update dictionaries from branch 'feature/cib_contract57d'
  to fad51a3e1c2a485b98fc388768d869e01905bb1c
  - Add new word "Ratenvereinbarung"

And put "Rattenvereinbarung" on the blacklist

Change-Id: Ie4d7b8fd93c5758316b5a60539c2a42152725537

diff --git a/dictionaries b/dictionaries
index be0a77ce3842..fad51a3e1c2a 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit be0a77ce3842c5059b9bc5bc5523bd6125b7838f
+Subproject commit fad51a3e1c2a485b98fc388768d869e01905bb1c


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

2023-11-09 Thread Szymon Kłos (via logerrit)
 sfx2/source/appl/linksrc.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ef5828fb45e2b46a36b73260232dede3d98e22a4
Author: Szymon Kłos 
AuthorDate: Mon Nov 6 18:35:20 2023 +0100
Commit: Caolán McNamara 
CommitDate: Thu Nov 9 09:40:40 2023 +0100

lok: fix crash on DDE Link modify

1. Open document with editable DDE Link section in 2 views
2. View A selects content containing section and copies that
3. View A is closed
4. View B tries to modify section
Result: crash

Avoid destroying SwTransferDdeLink in SwTransferable::~SwTransferable()
what happens while calling RemoveDDELinkFormat in 
SwTransferDdeLink::DataChanged
by keeping reference to it while iterating in 
SvLinkSource::NotifyDataChanged()

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

diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index 131992c51040..3a1af228f6a4 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -287,7 +287,8 @@ void SvLinkSource::NotifyDataChanged()
 if( ( p->nAdviseModes & ADVISEMODE_NODATA ) ||
 GetData( aVal, p->aDataMimeType, true ) )
 {
-p->xSink->DataChanged( p->aDataMimeType, aVal );
+tools::SvRef xLink(p->xSink);
+xLink->DataChanged( p->aDataMimeType, aVal );
 
 if ( !aIter.IsValidCurrValue( p ) )
 continue;


[Libreoffice-commits] dictionaries.git: Branch 'feature/cib_contract57d' - de/de_AT_frami.dic de/de_DE_frami.dic

2023-11-09 Thread Samuel Mehrbrodt (via logerrit)
 de/de_AT_frami.dic |2 ++
 de/de_DE_frami.dic |2 ++
 2 files changed, 4 insertions(+)

New commits:
commit fad51a3e1c2a485b98fc388768d869e01905bb1c
Author: Samuel Mehrbrodt 
AuthorDate: Mon Nov 6 21:44:48 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Nov 6 21:44:48 2023 +0100

Add new word "Ratenvereinbarung"

And put "Rattenvereinbarung" on the blacklist

Change-Id: Ie4d7b8fd93c5758316b5a60539c2a42152725537

diff --git a/de/de_AT_frami.dic b/de/de_AT_frami.dic
index af01bc7..7858516 100644
--- a/de/de_AT_frami.dic
+++ b/de/de_AT_frami.dic
@@ -73905,6 +73905,7 @@ Rattenplage/Nm
 Rattenplage/m
 Rattensparplan/dSTp
 Rattenzahlungsplan/dSTp
+Rattenvereinbarung/dSTp
 Ratterger�usch/EPSTm
 Rattern/S
 Ratzeburg/Sm
@@ -212030,6 +212031,7 @@ ratenzahlungspl
 ratenzahlungsplan/STozm
 ratenzahlungsvereinbarung/Pozm
 ratenzahlungszuschlag/STpozm
+ratenvereinbarung/Pozm
 ratespiel/EPSTozm
 ratewahrscheinlichkeit/Pozm
 ratgeber/FNSozm
diff --git a/de/de_DE_frami.dic b/de/de_DE_frami.dic
index 7e08137..3d02c29 100644
--- a/de/de_DE_frami.dic
+++ b/de/de_DE_frami.dic
@@ -74124,6 +74124,7 @@ Ratenzahlungspl
 Ratenzahlungsplan/STm
 Ratenzahlungsvereinbarung/Pm
 Ratenzahlungszuschlag/STpm
+ratenvereinbarung/Pm
 Ratespiel/EPSTm
 Ratewahrscheinlichkeit/Pm
 Ratgeber/FNSm
@@ -74229,6 +74230,7 @@ Rattenplage/Nm
 Rattenplage/m
 Rattensparplan/dSTp
 Rattenzahlungsplan/dSTp
+Rattenvereinbarung/dSTp
 Ratterger�usch/EPSTm
 Rattern/S
 Ratzeburg/Sm


[Libreoffice-commits] dictionaries.git: Changes to 'feature/cib_contract57d'

2023-11-09 Thread Christian Lohmaier (via logerrit)
New branch 'feature/cib_contract57d' available with the following commits:


Re: Import of curved connectors from OOXML

2023-11-09 Thread Miklos Vajna
Hi Regina,

On Wed, Nov 08, 2023 at 02:38:03AM +0100, Regina Henschel 
 wrote:
> If we are in running LibreOffice we could distinguish two ways by a new
> constant in enum class SdrCompatibilityFlag, for example. But how to save
> such information to ODF?
> Keep path definition as vague as it is now and put the information into
> settings.xml?
> Add a new value "curveOOXML" to draw:type (19.229.2) to specify a path as in
> OOXML?

I expect the settings.xml way would work if we know you won't have both
curve and curveOOXML shapes at the same time in a document. I assume
that can happen, so that's not a good fit here.

Adding a new value to draw:type sounds better, though possibly
"curveOOXML" is a poor name, it would be better to have a
"curveSomething" name that actually describes the new behavior, without
explicitly referring to OOXML.

But quite probably you know this already. :-)

Regards,

Miklos


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

2023-11-09 Thread Noel Grandin (via logerrit)
 sc/source/ui/vba/vbaaxes.cxx |   10 +-
 sc/source/ui/vba/vbaaxes.hxx |6 --
 2 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 4f505ba25335b1b279ab8164825c3d051cd74757
Author: Noel Grandin 
AuthorDate: Wed Nov 8 13:13:15 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 9 09:10:43 2023 +0100

loplugin:fieldcast in AxisIndexWrapper

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

diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx
index 0a377750aa59..66155bccfc43 100644
--- a/sc/source/ui/vba/vbaaxes.cxx
+++ b/sc/source/ui/vba/vbaaxes.cxx
@@ -91,14 +91,14 @@ class AxisIndexWrapper : public ::cppu::WeakImplHelper< 
container::XIndexAccess
 // on each getByIndex
 uno::Reference< uno::XComponentContext > mxContext;
 std::vector< AxesCoordinate > mCoordinates;
-uno::Reference< excel::XChart > mxChart;
+rtl::Reference< ScVbaChart > mxChart;
 public:
-AxisIndexWrapper( uno::Reference< uno::XComponentContext > xContext, 
uno::Reference< excel::XChart > xChart ) : mxContext(std::move( xContext )), 
mxChart(std::move( xChart ))
+AxisIndexWrapper( uno::Reference< uno::XComponentContext > xContext, 
rtl::Reference< ScVbaChart > xChart ) : mxContext(std::move( xContext )), 
mxChart(std::move( xChart ))
 {
 if ( !mxChart.is() )
 return;
 
-ScVbaChart* pChart = static_cast< ScVbaChart* >( mxChart.get() );
+ScVbaChart* pChart = mxChart.get();
 // primary
 bool bBool = false;
 uno::Reference< beans::XPropertySet > xDiagramPropertySet( 
pChart->xDiagramPropertySet() );
@@ -145,7 +145,7 @@ public:
 }
 };
 
-uno::Reference< container::XIndexAccess > createIndexWrapper( const 
uno::Reference< excel::XChart >& xChart, const uno::Reference< 
uno::XComponentContext >& xContext )
+uno::Reference< container::XIndexAccess > createIndexWrapper( const 
rtl::Reference< ScVbaChart >& xChart, const uno::Reference< 
uno::XComponentContext >& xContext )
 {
 return new AxisIndexWrapper( xContext, xChart );
 }
@@ -153,7 +153,7 @@ uno::Reference< container::XIndexAccess > 
createIndexWrapper( const uno::Referen
 }
 
 // #FIXME The collection semantics will never work as this object is not yet 
initialised correctly
-ScVbaAxes::ScVbaAxes( const uno::Reference< XHelperInterface >& xParent,const 
uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< 
excel::XChart >& xChart ) : ScVbaAxes_BASE( xParent, xContext, 
createIndexWrapper( xChart, xContext )), moChartParent( xChart )
+ScVbaAxes::ScVbaAxes( const uno::Reference< XHelperInterface >& xParent,const 
uno::Reference< uno::XComponentContext > & xContext, const rtl::Reference< 
ScVbaChart >& xChart ) : ScVbaAxes_BASE( xParent, xContext, createIndexWrapper( 
xChart, xContext )), moChartParent( xChart )
 {
 }
 
diff --git a/sc/source/ui/vba/vbaaxes.hxx b/sc/source/ui/vba/vbaaxes.hxx
index cb7c48a7fccd..62f39717468c 100644
--- a/sc/source/ui/vba/vbaaxes.hxx
+++ b/sc/source/ui/vba/vbaaxes.hxx
@@ -20,16 +20,18 @@
 
 #include 
 #include 
+#include 
 
 namespace ooo::vba::excel { class XAxis; }
 namespace ooo::vba::excel { class XChart; }
+class ScVbaChart;
 
 typedef CollTestImplHelper< ov::excel::XAxes > ScVbaAxes_BASE;
 class ScVbaAxes : public ScVbaAxes_BASE
 {
-css::uno::Reference< ov::excel::XChart > moChartParent; // not the true 
parent I guess
+rtl::Reference< ScVbaChart > moChartParent; // not the true parent I guess
 public:
-ScVbaAxes( const css::uno::Reference< ov::XHelperInterface >& xParent, 
const css::uno::Reference< css::uno::XComponentContext > & xContext, const 
css::uno::Reference< ov::excel::XChart >& xChart );
+ScVbaAxes( const css::uno::Reference< ov::XHelperInterface >& xParent, 
const css::uno::Reference< css::uno::XComponentContext > & xContext, const 
rtl::Reference< ScVbaChart >& xChart );
 // XEnumerationAccess
 virtual css::uno::Type SAL_CALL getElementType() override;
 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL 
createEnumeration() override;


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

2023-11-09 Thread Noel Grandin (via logerrit)
 sc/source/ui/vba/vbaaxes.cxx |3 +--
 sc/source/ui/vba/vbaaxis.cxx |6 +++---
 sc/source/ui/vba/vbaaxis.hxx |9 ++---
 sc/source/ui/vba/vbaformatconditions.cxx |6 +++---
 sc/source/ui/vba/vbaformatconditions.hxx |4 +++-
 5 files changed, 16 insertions(+), 12 deletions(-)

New commits:
commit a85c7cf02603408b09c15344803e293bb4b5bb81
Author: Noel Grandin 
AuthorDate: Wed Nov 8 13:09:48 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 9 09:10:20 2023 +0100

loplugin:fieldcast in ScVbaAxis

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

diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx
index 5dc3fb7a07e9..0a377750aa59 100644
--- a/sc/source/ui/vba/vbaaxes.cxx
+++ b/sc/source/ui/vba/vbaaxes.cxx
@@ -79,8 +79,7 @@ ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& 
xChart, const uno:
 }
 else
 DebugHelper::runtimeexception(ERRCODE_BASIC_METHOD_FAILED);
-uno::Reference< XHelperInterface > xParent( xChart, uno::UNO_QUERY_THROW );
-return new ScVbaAxis( xParent, xContext, xAxisPropertySet, nType, 
nAxisGroup);
+return new ScVbaAxis( pChart, xContext, xAxisPropertySet, nType, 
nAxisGroup);
 }
 
 namespace {
diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx
index aa461abee0da..76cf9fe066e3 100644
--- a/sc/source/ui/vba/vbaaxis.cxx
+++ b/sc/source/ui/vba/vbaaxis.cxx
@@ -37,7 +37,7 @@ constexpr OUStringLiteral VBA_MAX(u"Min");
 ScVbaChart*
 ScVbaAxis::getChartPtr()
 {
-ScVbaChart* pChart = static_cast< ScVbaChart* >( moChartParent.get() );
+ScVbaChart* pChart = moChartParent.get();
 if ( !pChart )
 throw uno::RuntimeException("Can't access parent chart impl" );
 return pChart;
@@ -53,17 +53,17 @@ ScVbaAxis::isValueAxis()
 return true;
 }
 
-ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,
+ScVbaAxis::ScVbaAxis( const rtl::Reference< ScVbaChart >& xParent,
   const uno::Reference< uno::XComponentContext > & 
xContext,
   uno::Reference< beans::XPropertySet >  _xPropertySet,
   sal_Int32 _nType, sal_Int32 _nGroup )
   : ScVbaAxis_BASE( xParent, xContext ),
+moChartParent(xParent),
 mxPropertySet(std::move( _xPropertySet )),
 mnType( _nType ), mnGroup( _nGroup ),
 maShapeHelper( uno::Reference< drawing::XShape >( mxPropertySet, 
uno::UNO_QUERY ) ),
 bCrossesAreCustomized( false )
 {
-moChartParent.set( xParent, uno::UNO_QUERY_THROW  );
 setType(_nType);
 setCrosses(xlAxisCrossesAutomatic);
 }
diff --git a/sc/source/ui/vba/vbaaxis.hxx b/sc/source/ui/vba/vbaaxis.hxx
index 787d2e03763a..8fcb9a399092 100644
--- a/sc/source/ui/vba/vbaaxis.hxx
+++ b/sc/source/ui/vba/vbaaxis.hxx
@@ -21,12 +21,15 @@
 #include 
 #include 
 #include 
+#include 
 #include 
-typedef InheritedHelperInterfaceWeakImpl< ov::excel::XAxis >  ScVbaAxis_BASE;
+
 class ScVbaChart;
+
+typedef InheritedHelperInterfaceWeakImpl< ov::excel::XAxis >  ScVbaAxis_BASE;
 class ScVbaAxis : public ScVbaAxis_BASE
 {
-css::uno::Reference< ov::excel::XChart > moChartParent;
+rtl::Reference< ScVbaChart > moChartParent;
 css::uno::Reference< css::beans::XPropertySet > mxPropertySet;
 sal_Int32 mnType;
 sal_Int32 mnGroup;
@@ -39,7 +42,7 @@ class ScVbaAxis : public ScVbaAxis_BASE
 bool isValueAxis();
 
 public:
-ScVbaAxis( const css::uno::Reference< ov::XHelperInterface >& xParent, 
const css::uno::Reference< css::uno::XComponentContext > & xContext, 
css::uno::Reference< css::beans::XPropertySet >  _xPropertySet, sal_Int32 
_nType, sal_Int32 _nGroup );
+ScVbaAxis( const rtl::Reference< ScVbaChart >& xParent, const 
css::uno::Reference< css::uno::XComponentContext > & xContext, 
css::uno::Reference< css::beans::XPropertySet >  _xPropertySet, sal_Int32 
_nType, sal_Int32 _nGroup );
 // Methods
 virtual void SAL_CALL Delete(  ) override;
 virtual css::uno::Reference< ::ooo::vba::excel::XAxisTitle > SAL_CALL 
getAxisTitle(  ) override;
commit 33729810b5f8ff5232195a5390c58e6e50900253
Author: Noel Grandin 
AuthorDate: Wed Nov 8 13:07:19 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 9 09:10:12 2023 +0100

loplugin:fieldcast in ScVbaFormatConditions

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

diff --git a/sc/source/ui/vba/vbaformatconditions.cxx 
b/sc/source/ui/vba/vbaformatconditions.cxx
index a840a6fb5f78..a6c3ae4125e8 100644
--- a/sc/source/ui/vba/vbaformatconditions.cxx
+++ b/sc/source/ui/vba/vbaformatconditions.cxx
@@ -37,7 +37,7 @@ ScVbaFormatConditions::Delete(  )
 {
 try
 {
-ScVbaStyles* pStyles = static_cast< ScVbaStyles* >( mxStyles.get

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

2023-11-09 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/appinit.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 4897083c120fbe7ea2fbe14f0f7d2cb293b79fa8
Author: Stephan Bergmann 
AuthorDate: Wed Nov 8 16:54:20 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Nov 9 09:06:22 2023 +0100

Move "Acceptor already exists" warning to where it belongs

036ed05fe35044e49a91e12b6a8e5f36a5b9c4c2 "MWS_SRX644: migrate branch 
mws_srx644
-> HEAD" had added this with misleading indentation, so it (apparently
accidentally) did not pertain to the "aAcceptString was found in the map of
already existing acceptors" case.  Then 
4acffc240b4845beedfe66eaa571b814d65e2e57
"catch by const reference" fixed the indentation, but left the warning at 
the
apparently wrong place.

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

diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 926ad1bfa6b7..6eca704c7fb9 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -138,7 +138,11 @@ void Desktop::createAcceptor(const OUString& aAcceptString)
 AcceptorMap &rMap = acceptorMap();
 AcceptorMap::const_iterator pIter = rMap.find(aAcceptString);
 if (pIter != rMap.end() )
+{
+// there is already an acceptor with this description
+SAL_WARN( "desktop.app", "Acceptor already exists.");
 return;
+}
 
 Sequence< Any > aSeq{ Any(aAcceptString), Any(bAccept) };
 Reference< XComponentContext > xContext = 
::comphelper::getProcessComponentContext();
@@ -161,8 +165,7 @@ void Desktop::createAcceptor(const OUString& aAcceptString)
 }
 else
 {
-// there is already an acceptor with this description
-SAL_WARN( "desktop.app", "Acceptor already exists.");
+SAL_WARN( "desktop.app", "Acceptor could not be created");
 }
 }