Re: ESC meeting minutes: 2021-10-28

2021-10-29 Thread Stephan Bergmann

On 28/10/2021 18:03, Luboš Luňák wrote:

  Had nobody noticed that before? It seems likely that tb68-bytemark was
consistently failing every master build since May.


(you can look that up at 
, btw)




[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - xmlsecurity/CppunitTest_xmlsecurity_signing.mk xmlsecurity/inc xmlsecurity/qa xmlsecurity/source

2021-10-29 Thread Michael Stahl (via logerrit)
 xmlsecurity/CppunitTest_xmlsecurity_signing.mk|1 
 xmlsecurity/inc/biginteger.hxx|   11 +
 xmlsecurity/qa/unit/signing/signing.cxx   |   16 +
 xmlsecurity/source/component/documentdigitalsignatures.cxx|2 
 xmlsecurity/source/helper/xmlsignaturehelper.cxx  |5 
 xmlsecurity/source/helper/xsecverify.cxx  |6 
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx |   92 
-
 xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx |   95 
+-
 8 files changed, 208 insertions(+), 20 deletions(-)

New commits:
commit 3dfe381032fc61ea31106f103dee9db8277d4d25
Author: Michael Stahl 
AuthorDate: Wed Oct 27 15:28:11 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Fri Oct 29 09:27:14 2021 +0200

xmlsecurity: some Distinguished Names are less equal than others

It turns out that the 2 backends NSS and MS CryptoAPI generate different
string representations of the same Distinguished Name in at least one
corner case, when a value contains a quote " U+0022.

The CryptoAPI function to generate the strings is:
CertNameToStr(..., CERT_X500_NAME_STR | CERT_NAME_STR_REVERSE_FLAG, ...)

This is documented on MSDN:

https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-certnametostra#CERT_X500_NAME_STR

NSS appears to implement RFC 1485, at least that's what the internal
function is named after, or perhaps one of its several successor RFCs
(not clear currently if there's a relevant difference).

This is now causing trouble if a certificate with such a DN is used in a
signature, created on WNT but then verified on another platform, because
commit 5af5ea893bcb8a8eb472ac11133da10e5a604e66
introduced consistency checks that compare the DNs that occur as strings
in META-INF/documentsignatures.xml:

xmlsecurity/source/helper/xmlsignaturehelper.cxx:672: X509Data cannot be 
parsed

The reason is that in XSecController::setX509Data() the value read from
the X509IssuerSerial element (a string generated by CryptoAPI) doesn't
match the value generated by NSS from the certificate parsed from the
X509Certificate element, so these are erroneously interpreted as 2
distinct certificates.

Try to make the EqualDistinguishedNames() more flexible so that it can
try also a converted variant of the DN.

(libxmlsec's NSS backend also complains that it cannot parse the DN:
 x509vfy.c:607: xmlSecNssX509NameRead() '' '' 12 'invalid data for 'char': 
actual=34 and expected comma ',''
 but it manages to validate the signature despite this.)

Change-Id: I4f72900738d1f5313146bbda7320a8f44319ebc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124287
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit e63611fabd38c757809b510fbb71c077880b1081)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124196
Reviewed-by: Thorsten Behrens 

diff --git a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk 
b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
index 2d8d92c37300..bf746b022de7 100644
--- a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
+++ b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
@@ -30,6 +30,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,xmlsecurity_signing, \
utl \
vcl \
xmlsecurity \
+   xsec_xmlsec \
 ))
 
 $(eval $(call gb_CppunitTest_use_externals,xmlsecurity_signing,\
diff --git a/xmlsecurity/inc/biginteger.hxx b/xmlsecurity/inc/biginteger.hxx
index c15b54de6229..fc99320c7ea2 100644
--- a/xmlsecurity/inc/biginteger.hxx
+++ b/xmlsecurity/inc/biginteger.hxx
@@ -35,8 +35,17 @@ XSECXMLSEC_DLLPUBLIC OUString 
bigIntegerToNumericString(const css::uno::Sequence
 XSECXMLSEC_DLLPUBLIC css::uno::Sequence
 numericStringToBigInteger(std::u16string_view serialNumber);
 
+// DNs read as strings from XML files may need to be mangled for compatibility
+// as NSS and MS CryptoAPI have different string serialisations; if the DN is
+// from an XCertificate it's "native" already and doesn't need to be mangled.
+enum EqualMode
+{
+NOCOMPAT,
+COMPAT_2ND,
+COMPAT_BOTH
+};
 XSECXMLSEC_DLLPUBLIC bool EqualDistinguishedNames(std::u16string_view rName1,
-  std::u16string_view rName2);
+  std::u16string_view rName2, 
EqualMode eMode);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx 
b/xmlsecurity/qa/unit/signing/signing.cxx
index b6f76d69034d..4a726e0d7a2f 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -49,6 +49,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -662,6 +663,21 @@ CPPUNIT_TE

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/vcl vcl/source

2021-10-29 Thread Szymon Kłos (via logerrit)
 include/vcl/fixed.hxx|2 ++
 vcl/source/control/fixed.cxx |   25 +
 2 files changed, 27 insertions(+)

New commits:
commit e0f594e96ea0b3b9a81dfbd21f80d03ae5c94805
Author: Szymon Kłos 
AuthorDate: Thu Jul 15 09:44:54 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 10:22:39 2021 +0200

jsdialog: dump FixedImage

Change-Id: I9803558fa19ef5e508817d5db0bdeb54827f63d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118969
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124222

diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx
index 00ae91c7624a..2a83c2488c89 100644
--- a/include/vcl/fixed.hxx
+++ b/include/vcl/fixed.hxx
@@ -177,6 +177,8 @@ public:
 virtual boolset_property(const OString &rKey, const OUString &rValue) 
override;
 
 static Image loadThemeImage(const OUString &rFileName);
+
+boost::property_tree::ptree DumpAsPropertyTree() override;
 };
 
 #endif // INCLUDED_VCL_FIXED_HXX
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index c5eb075a8e0d..6bf24d6fc8bc 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -17,15 +17,18 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
 #include 
 #include 
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #define FIXEDLINE_TEXT_BORDER4
 
@@ -970,4 +973,26 @@ bool FixedImage::set_property(const OString &rKey, const 
OUString &rValue)
 return true;
 }
 
+boost::property_tree::ptree FixedImage::DumpAsPropertyTree()
+{
+boost::property_tree::ptree aTree = Control::DumpAsPropertyTree();
+
+aTree.put("type", "image");
+
+if (!!maImage)
+{
+SvMemoryStream aOStm(6535, 6535);
+if(GraphicConverter::Export(aOStm, maImage.GetBitmapEx(), 
ConvertDataFormat::PNG) == ERRCODE_NONE)
+{
+css::uno::Sequence aSeq( static_cast(aOStm.GetData()), aOStm.Tell());
+OUStringBuffer aBuffer("data:image/png;base64,");
+::comphelper::Base64::encode(aBuffer, aSeq);
+aTree.put("image", aBuffer.makeStringAndClear());
+}
+}
+
+return aTree;
+}
+
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/vcl vcl/source

2021-10-29 Thread Szymon Kłos (via logerrit)
 include/vcl/salvtables.hxx|   15 +++
 vcl/source/app/salvtables.cxx |   56 ++
 2 files changed, 40 insertions(+), 31 deletions(-)

New commits:
commit aa8f12e46804029ee6eef47097e5a4de4bf7e511
Author: Szymon Kłos 
AuthorDate: Wed Oct 20 10:53:53 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 10:22:56 2021 +0200

Move SalInstanceImage decl to header file

Change-Id: Ic71e10a9cb296e8fed366b7dd622d8875d68f2d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123876
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124223

diff --git a/include/vcl/salvtables.hxx b/include/vcl/salvtables.hxx
index be939b4176f6..16b3db623c73 100644
--- a/include/vcl/salvtables.hxx
+++ b/include/vcl/salvtables.hxx
@@ -1540,4 +1540,19 @@ public:
 virtual ~SalInstanceRadioButton() override;
 };
 
+class SalInstanceImage : public SalInstanceWidget, public virtual weld::Image
+{
+private:
+VclPtr m_xImage;
+
+public:
+SalInstanceImage(FixedImage* pImage, SalInstanceBuilder* pBuilder, bool 
bTakeOwnership);
+
+virtual void set_from_icon_name(const OUString& rIconName) override;
+
+virtual void set_image(VirtualDevice* pDevice) override;
+
+virtual void set_image(const css::uno::Reference& 
rImage) override;
+};
+
 #endif
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 32deb0c9a310..6fa2797b73a6 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -2928,37 +2928,6 @@ public:
 }
 };
 
-class SalInstanceImage : public SalInstanceWidget, public virtual weld::Image
-{
-private:
-VclPtr m_xImage;
-
-public:
-SalInstanceImage(FixedImage* pImage, SalInstanceBuilder* pBuilder, bool 
bTakeOwnership)
-: SalInstanceWidget(pImage, pBuilder, bTakeOwnership)
-, m_xImage(pImage)
-{
-}
-
-virtual void set_from_icon_name(const OUString& rIconName) override
-{
-m_xImage->SetImage(::Image(StockImage::Yes, rIconName));
-}
-
-virtual void set_image(VirtualDevice* pDevice) override
-{
-if (pDevice)
-m_xImage->SetImage(createImage(*pDevice));
-else
-m_xImage->SetImage(::Image());
-}
-
-virtual void set_image(const css::uno::Reference& 
rImage) override
-{
-m_xImage->SetImage(::Image(rImage));
-}
-};
-
 class SalInstanceCalendar : public SalInstanceWidget, public virtual 
weld::Calendar
 {
 private:
@@ -3007,6 +2976,31 @@ IMPL_LINK_NOARG(SalInstanceCalendar, ActivateHdl, 
::Calendar*, void)
 signal_activated();
 }
 
+SalInstanceImage::SalInstanceImage(FixedImage* pImage, SalInstanceBuilder* 
pBuilder,
+   bool bTakeOwnership)
+: SalInstanceWidget(pImage, pBuilder, bTakeOwnership)
+, m_xImage(pImage)
+{
+}
+
+void SalInstanceImage::set_from_icon_name(const OUString& rIconName)
+{
+m_xImage->SetImage(::Image(StockImage::Yes, rIconName));
+}
+
+void SalInstanceImage::set_image(VirtualDevice* pDevice)
+{
+if (pDevice)
+m_xImage->SetImage(createImage(*pDevice));
+else
+m_xImage->SetImage(::Image());
+}
+
+void SalInstanceImage::set_image(const 
css::uno::Reference& rImage)
+{
+m_xImage->SetImage(::Image(rImage));
+}
+
 WeldTextFilter::WeldTextFilter(Link& rInsertTextHdl)
 : TextFilter(OUString())
 , m_rInsertTextHdl(rInsertTextHdl)


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/inc vcl/jsdialog

2021-10-29 Thread Szymon Kłos (via logerrit)
 vcl/inc/jsdialog/jsdialogbuilder.hxx |9 +++
 vcl/jsdialog/jsdialogbuilder.cxx |   44 +++
 2 files changed, 38 insertions(+), 15 deletions(-)

New commits:
commit afeaa3394ecaa913a409a12d5a67b27eb9596405
Author: Szymon Kłos 
AuthorDate: Wed Oct 20 10:59:12 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 10:23:17 2021 +0200

jsdialog: weld Image widget

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

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index a6b8021a50b4..d826e6625606 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -259,6 +259,8 @@ public:
bool bTakeOwnership 
= false) override;
 virtual std::unique_ptr
 weld_radio_button(const OString& id, bool bTakeOwnership = false) override;
+virtual std::unique_ptr weld_image(const OString& id,
+bool bTakeOwnership = 
false) override;
 
 static weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent,
 VclMessageType 
eMessageType,
@@ -597,4 +599,11 @@ public:
 virtual void set_active(bool active) override;
 };
 
+class JSImage : public JSWidget
+{
+public:
+JSImage(JSDialogSender* pSender, FixedImage* pImage, SalInstanceBuilder* 
pBuilder,
+bool bTakeOwnership);
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index b102b557002f..56163a3e377d 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -520,7 +520,8 @@ void JSInstanceBuilder::RememberWidget(const OString& id, 
weld::Widget* pWidget)
 }
 }
 
-void JSInstanceBuilder::AddChildWidget(sal_uInt64 nWindowId, const OString& 
id, weld::Widget* pWidget)
+void JSInstanceBuilder::AddChildWidget(sal_uInt64 nWindowId, const OString& id,
+   weld::Widget* pWidget)
 {
 auto it = GetLOKWeldWidgetsMap().find(nWindowId);
 if (it != GetLOKWeldWidgetsMap().end())
@@ -807,6 +808,19 @@ std::unique_ptr 
JSInstanceBuilder::weld_radio_button(const OS
 return pWeldWidget;
 }
 
+std::unique_ptr JSInstanceBuilder::weld_image(const OString& id, 
bool bTakeOwnership)
+{
+FixedImage* pImage = m_xBuilder->get(id);
+
+auto pWeldWidget
+= pImage ? std::make_unique(this, pImage, this, 
bTakeOwnership) : nullptr;
+
+if (pWeldWidget)
+RememberWidget(id, pWeldWidget.get());
+
+return pWeldWidget;
+}
+
 weld::MessageDialog* JSInstanceBuilder::CreateMessageDialog(weld::Widget* 
pParent,
 VclMessageType 
eMessageType,
 VclButtonsType 
eButtonType,
@@ -1023,21 +1037,21 @@ JSMessageDialog::JSMessageDialog(::MessageDialog* 
pDialog, SalInstanceBuilder* p
 
 if (!pBuilder)
 {
-if(::OKButton* pOKBtn = 
dynamic_cast<::OKButton*>(m_xMessageDialog->get_widget_for_response(RET_OK)))
+if (::OKButton* pOKBtn
+= 
dynamic_cast<::OKButton*>(m_xMessageDialog->get_widget_for_response(RET_OK)))
 {
 m_pOK.reset(new JSButton(m_pSender, pOKBtn, nullptr, false));
 
JSInstanceBuilder::AddChildWidget(m_xMessageDialog->GetLOKWindowId(),
-  pOKBtn->get_id().toUtf8(),
-  m_pOK.get());
+  pOKBtn->get_id().toUtf8(), 
m_pOK.get());
 m_pOK->connect_clicked(LINK(this, JSMessageDialog, OKHdl));
 }
 
-if(::CancelButton* pCancelBtn = 
dynamic_cast<::CancelButton*>(m_xMessageDialog->get_widget_for_response(RET_CANCEL)))
+if (::CancelButton* pCancelBtn
+= 
dynamic_cast<::CancelButton*>(m_xMessageDialog->get_widget_for_response(RET_CANCEL)))
 {
 m_pCancel.reset(new JSButton(m_pSender, pCancelBtn, nullptr, 
false));
 
JSInstanceBuilder::AddChildWidget(m_xMessageDialog->GetLOKWindowId(),
-  pCancelBtn->get_id().toUtf8(),
-  m_pCancel.get());
+  pCancelBtn->get_id().toUtf8(), 
m_pCancel.get());
 m_pCancel->connect_clicked(LINK(this, JSMessageDialog, CancelHdl));
 }
 }
@@ -1049,15 +1063,9 @@ JSMessageDialog::~JSMessageDialog()
 
JSInstanceBuilder::RemoveWindowWidget(m_xMessageDialog->GetLOKWindowId());
 }
 
-IMPL_LINK_NOARG(JSMessageDialog, OKHdl, weld::Button&, void)
-{
-response

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-10-29 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 8f077de13e78cda0f626fa9ae386496ceba60c69
Author: Szymon Kłos 
AuthorDate: Mon Oct 25 15:02:30 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 10:23:38 2021 +0200

jsdialog: activate tabpage after switch

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

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 56163a3e377d..431b9a46df8a 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -983,6 +983,8 @@ void JSNotebook::set_current_page(int nPage)
 
 SalInstanceNotebook::set_current_page(nPage);
 sendFullUpdate(bForce);
+
+m_aEnterPageHdl.Call(get_current_page_ident());
 }
 
 void JSNotebook::set_current_page(const OString& rIdent)
@@ -994,6 +996,8 @@ void JSNotebook::set_current_page(const OString& rIdent)
 
 SalInstanceNotebook::set_current_page(rIdent);
 sendFullUpdate(bForce);
+
+m_aEnterPageHdl.Call(get_current_page_ident());
 }
 
 void JSNotebook::remove_page(const OString& rIdent)


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/sfx2 sfx2/source vcl/jsdialog xmlsecurity/inc xmlsecurity/source

2021-10-29 Thread Szymon Kłos (via logerrit)
 include/sfx2/objsh.hxx |2 
 sfx2/source/doc/objserv.cxx|   27 ++---
 vcl/jsdialog/enabled.cxx   |3 -
 xmlsecurity/inc/digitalsignaturesdialog.hxx|1 
 xmlsecurity/source/component/documentdigitalsignatures.cxx |   19 ++---
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |   14 ++
 6 files changed, 52 insertions(+), 14 deletions(-)

New commits:
commit 0a298aab1296c65c7b362ec9c34cff9960e5a6cc
Author: Szymon Kłos 
AuthorDate: Wed Oct 20 11:01:41 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 10:23:54 2021 +0200

jsdialog: enable Digital Signatures dialog

In LOK case run it in the readonly mode.
In readonly mode we can run it asynchronously.

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

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 9c331092bda1..9ac09d96a02a 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -348,7 +348,7 @@ public:
 
 /** Returns to if preparing was successful, else false. */
 bool PrepareForSigning(weld::Window* pDialogParent);
-bool CheckIsReadonly(bool bSignScriptingContent);
+bool CheckIsReadonly(bool bSignScriptingContent, weld::Window* 
pDialogParent = nullptr);
 void RecheckSignature(bool bAlsoRecheckScriptingSignature);
 void AfterSigning(bool bSignSuccess, bool bSignScriptingContent);
 bool HasValidSignatures() const;
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 619054815bff..6963f62cf6b5 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1851,9 +1851,10 @@ void SfxObjectShell::AfterSigning(bool bSignSuccess, 
bool bSignScriptingContent)
 EnableSetModified();
 }
 
-bool SfxObjectShell::CheckIsReadonly(bool bSignScriptingContent)
+bool SfxObjectShell::CheckIsReadonly(bool bSignScriptingContent, weld::Window* 
pDialogParent)
 {
-if (GetMedium()->IsOriginallyReadOnly())
+// in LOK case we support only viewer / readonly mode so far
+if (GetMedium()->IsOriginallyReadOnly() || 
comphelper::LibreOfficeKit::isActive())
 {
 // If the file is physically read-only, we just show the existing 
signatures
 try
@@ -1863,6 +1864,10 @@ bool SfxObjectShell::CheckIsReadonly(bool 
bSignScriptingContent)
 uno::Reference xSigner(
 
security::DocumentDigitalSignatures::createWithVersionAndValidSignature(
 comphelper::getProcessComponentContext(), aODFVersion, 
HasValidSignatures()));
+
+if (pDialogParent)
+xSigner->setParentWindow(pDialogParent->GetXWindow());
+
 if (bSignScriptingContent)
 
xSigner->showScriptingContentSignatures(GetMedium()->GetZipStorageToSign_Impl(),
 
uno::Reference());
@@ -1876,6 +1881,18 @@ bool SfxObjectShell::CheckIsReadonly(bool 
bSignScriptingContent)
 {
 std::unique_ptr pStream(
 utl::UcbStreamHelper::CreateStream(GetName(), 
StreamMode::READ));
+
+if (!pStream)
+{
+pStream = 
utl::UcbStreamHelper::CreateStream(GetMedium()->GetName(), StreamMode::READ);
+
+if (!pStream)
+{
+SAL_WARN( "sfx.doc", "Couldn't use signing 
functionality!" );
+return true;
+}
+}
+
 uno::Reference xStream(new 
utl::OStreamWrapper(*pStream));
 
xSigner->showDocumentContentSignatures(uno::Reference(),
xStream);
@@ -1908,7 +1925,7 @@ void SfxObjectShell::SignDocumentContent(weld::Window* 
pDialogParent)
 if (!PrepareForSigning(pDialogParent))
 return;
 
-if (CheckIsReadonly(false))
+if (CheckIsReadonly(false, pDialogParent))
 return;
 
 bool bSignSuccess = GetMedium()->SignContents_Impl(pDialogParent, false, 
HasValidSignatures());
@@ -2005,7 +2022,7 @@ void SfxObjectShell::SignSignatureLine(weld::Window* 
pDialogParent,
 if (!PrepareForSigning(pDialogParent))
 return;
 
-if (CheckIsReadonly(false))
+if (CheckIsReadonly(false, pDialogParent))
 return;
 
 bool bSignSuccess = GetMedium()->SignContents_Impl(pDialogParent,
@@ -2030,7 +2047,7 @@ void SfxObjectShell::SignScriptingContent(weld::Window* 
pDialogParent)
 if (!PrepareForSigning(pDialogParent))
 return;
 
-if (CheckIsReadonly(true))
+if (CheckIsReadonly(true, pDialogParent))
 return;
 
 bool bSignSuccess = GetMedium()->SignContents_Impl

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 2 commits - vcl/jsdialog xmlsecurity/inc xmlsecurity/source

2021-10-29 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/enabled.cxx   |4 +++-
 xmlsecurity/inc/certificateviewer.hxx  |2 ++
 xmlsecurity/inc/digitalsignaturesdialog.hxx|3 +++
 xmlsecurity/source/dialogs/certificateviewer.cxx   |   13 +++--
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |9 +++--
 5 files changed, 26 insertions(+), 5 deletions(-)

New commits:
commit dcbfeb51cd35f00e6f4c5ffeb925e03f51753917
Author: Szymon Kłos 
AuthorDate: Mon Oct 25 12:03:26 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 10:24:26 2021 +0200

Make View Certificate sub-dialog async

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

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 5c23ecb8bd43..ab1cc9852d74 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -52,7 +52,8 @@ bool isBuilderEnabled(const OUString& rUIFile, bool bMobile)
 || rUIFile == "cui/ui/macroselectordialog.ui" || rUIFile == 
"uui/ui/macrowarnmedium.ui"
 || rUIFile == "modules/scalc/ui/textimportcsv.ui"
 || rUIFile == "xmlsec/ui/digitalsignaturesdialog.ui"
-|| rUIFile == "xmlsec/ui/viewcertdialog.ui")
+|| rUIFile == "xmlsec/ui/viewcertdialog.ui" || rUIFile == 
"xmlsec/ui/certgeneral.ui"
+|| rUIFile == "xmlsec/ui/viewcertdialog.ui" || rUIFile == 
"xmlsec/ui/certpage.ui")
 {
 return true;
 }
diff --git a/xmlsecurity/inc/certificateviewer.hxx 
b/xmlsecurity/inc/certificateviewer.hxx
index d531dd1fc205..ccb2278f6972 100644
--- a/xmlsecurity/inc/certificateviewer.hxx
+++ b/xmlsecurity/inc/certificateviewer.hxx
@@ -139,6 +139,7 @@ private:
 boolmbFirstActivateDone;
 
 std::vector> maUserData;
+std::shared_ptr mxCertificateViewer;
 
 std::unique_ptr mxCertPathLB;
 std::unique_ptr mxViewCertPB;
@@ -154,6 +155,7 @@ private:
 
 public:
 CertificateViewerCertPathTP(weld::Container* pParent, CertificateViewer* 
pDlg);
+~CertificateViewerCertPathTP();
 void ActivatePage();
 };
 
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx 
b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 3807300e7b49..228cbfdc8a54 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -268,6 +268,12 @@ 
CertificateViewerCertPathTP::CertificateViewerCertPathTP(weld::Container* pParen
 mxViewCertPB->connect_clicked( LINK( this, CertificateViewerCertPathTP, 
ViewCertHdl ) );
 }
 
+CertificateViewerCertPathTP::~CertificateViewerCertPathTP()
+{
+if (mxCertificateViewer)
+mxCertificateViewer->response(RET_OK);
+}
+
 void CertificateViewerCertPathTP::ActivatePage()
 {
 if ( !mbFirstActivateDone )
@@ -319,10 +325,13 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, ViewCertHdl, 
weld::Button&, void)
 std::unique_ptr xIter = mxCertPathLB->make_iterator();
 if (mxCertPathLB->get_selected(xIter.get()))
 {
+if (mxCertificateViewer)
+mxCertificateViewer->response(RET_OK);
+
 CertPath_UserData* pData = 
reinterpret_cast(mxCertPathLB->get_id(*xIter).toInt64());
-CertificateViewer aViewer(mpDlg->getDialog(), 
mpDlg->mxSecurityEnvironment,
+mxCertificateViewer = 
std::make_shared(mpDlg->getDialog(), 
mpDlg->mxSecurityEnvironment,
 pData->mxCert, false, nullptr);
-aViewer.run();
+weld::DialogController::runAsync(mxCertificateViewer, [this] 
(sal_Int32) { mxCertificateViewer = nullptr; });
 }
 }
 
commit de4e67a330d4cf244b2703ed4cf126b4d4e9
Author: Szymon Kłos 
AuthorDate: Fri Oct 22 13:08:46 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 10:24:09 2021 +0200

Make View Certificate dialog async

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

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 99df1bf6fc3f..5c23ecb8bd43 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -51,7 +51,8 @@ bool isBuilderEnabled(const OUString& rUIFile, bool bMobile)
 || rUIFile == "svx/ui/fontworkgallerydialog.ui"
 || rUIFile == "cui/ui/macroselectordialog.ui" || rUIFile == 
"uui/ui/macrowarnmedium.ui"
 || rUIFile == "modules/scalc/ui/textimportcsv.ui"
-|| rUIFile == "xmlsec/ui/digitalsignaturesdialog.ui")
+|| rUIFile == "xmlsec/ui/digitalsignaturesdialog.ui"
+|| rUIFile == "xmlsec/ui/viewcertdialog.ui")
 {
 return true;
 }
diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx 
b/xmlsecurity/inc/digitalsignaturesdialog.hxx
index f6991bcb61b5..64fd26bae169 100644
--- a/xmlsecurity/inc/digitalsignaturesdialog.

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/source

2021-10-29 Thread Szymon Kłos (via logerrit)
 vcl/source/window/builder.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 32fa6dc99a4053f134bc37e93a03743ff84527c4
Author: Szymon Kłos 
AuthorDate: Wed Oct 27 13:04:47 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 10:24:43 2021 +0200

jsdialogs: use for MessageDialogs

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

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 8bd423b77cbc..892c7c4f1751 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -180,9 +180,9 @@ weld::Builder* 
Application::CreateInterimBuilder(vcl::Window* pParent, const OUS
 
 weld::MessageDialog* Application::CreateMessageDialog(weld::Widget* pParent, 
VclMessageType eMessageType,
   VclButtonsType 
eButtonType, const OUString& rPrimaryMessage,
-  bool bMobile)
+  bool /*bMobile*/)
 {
-if (bMobile)
+if (comphelper::LibreOfficeKit::isActive())
 return JSInstanceBuilder::CreateMessageDialog(pParent, eMessageType, 
eButtonType, rPrimaryMessage);
 else
 return ImplGetSVData()->mpDefInst->CreateMessageDialog(pParent, 
eMessageType, eButtonType, rPrimaryMessage);


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - xmlsecurity/inc xmlsecurity/source

2021-10-29 Thread Szymon Kłos (via logerrit)
 xmlsecurity/inc/digitalsignaturesdialog.hxx|1 +
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |   10 --
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 601d3094547649f088638faa168010eb0bb18136
Author: Szymon Kłos 
AuthorDate: Wed Oct 27 13:04:17 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 10:25:07 2021 +0200

Make Certificate not found dialog async

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

diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx 
b/xmlsecurity/inc/digitalsignaturesdialog.hxx
index 64fd26bae169..848a2deeac80 100644
--- a/xmlsecurity/inc/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/digitalsignaturesdialog.hxx
@@ -81,6 +81,7 @@ private:
 std::unique_ptr  m_xCloseBtn;
 
 std::shared_ptr m_xViewer;
+std::shared_ptr m_xInfoBox;
 
 DECL_LINK(AdESCompliantCheckBoxHdl, weld::ToggleButton&, void);
 DECL_LINK(ViewButtonHdl, weld::Button&, void);
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 
b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 9c8a48c0df48..a27737668eba 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -202,6 +202,9 @@ DigitalSignaturesDialog::~DigitalSignaturesDialog()
 {
 if (m_xViewer)
 m_xViewer->response(RET_OK);
+
+if (m_xInfoBox)
+m_xInfoBox->response(RET_OK);
 }
 
 bool DigitalSignaturesDialog::Init()
@@ -778,10 +781,13 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails()
 }
 else
 {
-std::unique_ptr 
xInfoBox(Application::CreateMessageDialog(m_xDialog.get(),
+if (m_xInfoBox)
+m_xInfoBox->response(RET_OK);
+
+m_xInfoBox = 
std::shared_ptr(Application::CreateMessageDialog(m_xDialog.get(),
   
VclMessageType::Info, VclButtonsType::Ok,
   
XsResId(STR_XMLSECDLG_NO_CERT_FOUND)));
-xInfoBox->run();
+m_xInfoBox->runAsync(m_xInfoBox, [this] (sal_Int32) { m_xInfoBox = 
nullptr; });
 }
 }
 }


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

2021-10-29 Thread Mike Kaganski (via logerrit)
 codemaker/source/cppumaker/cpputype.cxx |5 
 comphelper/source/container/embeddedobjectcontainer.cxx |   88 ++--
 comphelper/source/eventattachermgr/eventattachermgr.cxx |4 
 comphelper/source/misc/docpasswordhelper.cxx|   42 ++---
 comphelper/source/misc/documentinfo.cxx |5 
 comphelper/source/misc/graphicmimetype.cxx  |6 
 comphelper/source/misc/mimeconfighelper.cxx |   85 ++-
 comphelper/source/misc/storagehelper.cxx|  114 +---
 comphelper/source/xml/ofopxmlhelper.cxx |   40 +++--
 9 files changed, 176 insertions(+), 213 deletions(-)

New commits:
commit 5661f257f9edd8bc80bb9dc62855d6bbe88a541f
Author: Mike Kaganski 
AuthorDate: Thu Oct 28 21:14:28 2021 +0300
Commit: Mike Kaganski 
CommitDate: Fri Oct 29 10:31:35 2021 +0200

Prepare for removal of non-const operator[] from Sequence in comphelper

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

diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx 
b/comphelper/source/container/embeddedobjectcontainer.cxx
index faed14065082..ac85e9cfdc70 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -322,24 +323,24 @@ uno::Reference 
EmbeddedObjectContainer::Get_Impl(
 //TODO/LATER: it would be good to detect an error when an object 
should be created already, but isn't (not an "inside" call)
 uno::Reference < embed::XEmbeddedObjectCreator > xFactory = 
embed::EmbeddedObjectCreator::create( 
::comphelper::getProcessComponentContext() );
 uno::Sequence< beans::PropertyValue > aObjDescr(1 + (xCopy.is() ? 1 : 
0) + (pBaseURL ? 1 : 0));
-aObjDescr[0].Name = "Parent";
-aObjDescr[0].Value <<= pImpl->m_xModel.get();
-sal_Int32 i = 1;
+auto itObjDescr = aObjDescr.getArray();
+itObjDescr->Name = "Parent";
+itObjDescr->Value <<= pImpl->m_xModel.get();
 if (pBaseURL)
 {
-aObjDescr[i].Name = "DefaultParentBaseURL";
-aObjDescr[i].Value <<= *pBaseURL;
-++i;
+++itObjDescr;
+itObjDescr->Name = "DefaultParentBaseURL";
+itObjDescr->Value <<= *pBaseURL;
 }
 if ( xCopy.is() )
 {
-aObjDescr[i].Name = "CloneFrom";
-aObjDescr[i].Value <<= xCopy;
+++itObjDescr;
+itObjDescr->Name = "CloneFrom";
+itObjDescr->Value <<= xCopy;
 }
 
-uno::Sequence< beans::PropertyValue > aMediaDescr( 1 );
-aMediaDescr[0].Name = "ReadOnly";
-aMediaDescr[0].Value <<= bReadOnlyMode;
+uno::Sequence< beans::PropertyValue > aMediaDescr{ 
comphelper::makePropertyValue(
+"ReadOnly", bReadOnlyMode) };
 xObj.set( xFactory->createInstanceInitFromEntry(
 pImpl->mxStorage, rName,
 aMediaDescr, aObjDescr ), uno::UNO_QUERY );
@@ -371,14 +372,15 @@ uno::Reference < embed::XEmbeddedObject > 
EmbeddedObjectContainer::CreateEmbedde
 
 const size_t nExtraArgs = pBaseURL ? 2 : 1;
 uno::Sequence< beans::PropertyValue > aObjDescr( rArgs.getLength() + 
nExtraArgs );
-aObjDescr[0].Name = "Parent";
-aObjDescr[0].Value <<= pImpl->m_xModel.get();
+auto pObjDescr = aObjDescr.getArray();
+pObjDescr[0].Name = "Parent";
+pObjDescr[0].Value <<= pImpl->m_xModel.get();
 if (pBaseURL)
 {
-aObjDescr[1].Name = "DefaultParentBaseURL";
-aObjDescr[1].Value <<= *pBaseURL;
+pObjDescr[1].Name = "DefaultParentBaseURL";
+pObjDescr[1].Value <<= *pBaseURL;
 }
-std::copy( rArgs.begin(), rArgs.end(), aObjDescr.getArray() + 
nExtraArgs );
+std::copy( rArgs.begin(), rArgs.end(), pObjDescr + nExtraArgs );
 xObj.set( xFactory->createInstanceInitNew(
 rClassId, OUString(), pImpl->mxStorage, rNewName,
 aObjDescr ), uno::UNO_QUERY );
@@ -591,12 +593,13 @@ uno::Reference < embed::XEmbeddedObject > 
EmbeddedObjectContainer::InsertEmbedde
 {
 uno::Reference < embed::XEmbeddedObjectCreator > xFactory = 
embed::EmbeddedObjectCreator::create( 
::comphelper::getProcessComponentContext() );
 uno::Sequence< beans::PropertyValue > aObjDescr(pBaseURL ? 2 : 1);
-aObjDescr[0].Name = "Parent";
-aObjDescr[0].Value <<= pImpl->m_xModel.get();
+auto pObjDescr = aObjDescr.getArray();
+pObjDescr[0].Name = "Parent";
+pObjDescr[0].Value <<= pImpl->m_xModel.get();
 if (pBaseURL)
 {
-aObjDescr[1].Name = "DefaultParentBase

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

2021-10-29 Thread Mike Kaganski (via logerrit)
 connectivity/source/commontools/CommonTools.cxx|8 -
 connectivity/source/commontools/ConnectionWrapper.cxx  |2 
 connectivity/source/commontools/dbtools.cxx|8 -
 connectivity/source/commontools/paramwrapper.cxx   |2 
 connectivity/source/cpool/ZPoolCollection.cxx  |3 
 connectivity/source/drivers/calc/CConnection.cxx   |   17 +-
 connectivity/source/drivers/dbase/DTable.cxx   |8 -
 connectivity/source/drivers/hsqldb/HConnection.cxx |   14 +-
 connectivity/source/drivers/hsqldb/HStorageAccess.cxx  |   10 -
 connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx|2 
 connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx |3 
 connectivity/source/drivers/mysqlc/mysqlc_connection.cxx   |3 
 connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx |4 
 connectivity/source/drivers/postgresql/pq_driver.cxx   |4 
 connectivity/source/drivers/postgresql/pq_statics.cxx  |   65 
+++---
 connectivity/source/drivers/postgresql/pq_tools.cxx|3 
 connectivity/source/drivers/postgresql/pq_xcontainer.cxx   |3 
 connectivity/source/drivers/postgresql/pq_xindexes.cxx |3 
 connectivity/source/drivers/writer/WConnection.cxx |   17 +-
 connectivity/source/manager/mdrivermanager.cxx |4 
 20 files changed, 78 insertions(+), 105 deletions(-)

New commits:
commit 089dbfda13bbc43ef2bc4b4c6f2cb06163545c2d
Author: Mike Kaganski 
AuthorDate: Thu Oct 28 21:15:12 2021 +0300
Commit: Mike Kaganski 
CommitDate: Fri Oct 29 10:31:51 2021 +0200

Prepare for removal of non-const operator[] from Sequence in connectivity

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

diff --git a/connectivity/source/commontools/CommonTools.cxx 
b/connectivity/source/commontools/CommonTools.cxx
index 223129a71e92..b7467c6933ab 100644
--- a/connectivity/source/commontools/CommonTools.cxx
+++ b/connectivity/source/commontools/CommonTools.cxx
@@ -120,10 +120,10 @@ namespace connectivity
 {
 Reference< XJavaVM > xVM = JavaVirtualMachine::create(_rxContext);
 
-Sequence processID(16);
-rtl_getGlobalProcessId( 
reinterpret_cast(processID.getArray()) );
-processID.realloc(17);
-processID[16] = 0;
+Sequence processID(17); // 16 + 1
+auto pprocessID = processID.getArray();
+rtl_getGlobalProcessId( reinterpret_cast(pprocessID) );
+pprocessID[16] = 0; // RETURN_VIRTUALMACHINE
 
 Any uaJVM = xVM->getJavaVM( processID );
 sal_Int64 nTemp;
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx 
b/connectivity/source/commontools/ConnectionWrapper.cxx
index 8a0cc852ed98..9ed4f394b5ee 100644
--- a/connectivity/source/commontools/ConnectionWrapper.cxx
+++ b/connectivity/source/commontools/ConnectionWrapper.cxx
@@ -122,7 +122,7 @@ css::uno::Sequence< OUString > SAL_CALL 
OConnectionWrapper::getSupportedServiceN
 {
 sal_Int32 nLen = aSupported.getLength();
 aSupported.realloc( nLen + 1 );
-aSupported[ nLen ] = sConnectionService;
+aSupported.getArray()[ nLen ] = sConnectionService;
 }
 
 // outta here
diff --git a/connectivity/source/commontools/dbtools.cxx 
b/connectivity/source/commontools/dbtools.cxx
index 88f9e37760c0..8cb7a292c375 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -279,9 +279,7 @@ static Reference< XConnection > 
getConnection_allowException(
 Reference xIni(xDataSource, UNO_QUERY);
 if (xIni.is())
 {
-Sequence< Any > aArgs(1);
-NamedValue aParam( "ParentWindow", makeAny(_rxParent) );
-aArgs[0] <<= aParam;
+Sequence< Any > aArgs{ Any(NamedValue( "ParentWindow", 
makeAny(_rxParent) )) };
 xIni->initialize(aArgs);
 }
 
@@ -319,9 +317,7 @@ static Reference< XConnection > 
getConnection_allowException(
 
 if (xIni.is())
 {
-Sequence< Any > aArgs(1);
-NamedValue aParam( "ParentWindow", makeAny(Reference()) );
-aArgs[0] <<= aParam;
+Sequence< Any > aArgs{ Any(NamedValue( "ParentWindow", 
makeAny(Reference()) )) };
 xIni->initialize(aArgs);
 }
 
diff --git a/connectivity/source/commontools/paramwrapper.cxx 
b/connectivity/source/commontools/paramwrapper.cxx
index a914115d895b..8616277c7ddf 100644
--- a/connectivity/source/commontools/paramwrapper.cxx
+++ b/connectivity/source/commontools/paramwrapper.cxx
@@ -158,7 +158,7 @@ namespace dbtools::param
  

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

2021-10-29 Thread Mike Kaganski (via logerrit)
 configmgr/source/access.cxx|   16 +---
 configmgr/source/configurationregistry.cxx |4 ++--
 configmgr/source/valueparser.cxx   |3 ++-
 3 files changed, 13 insertions(+), 10 deletions(-)

New commits:
commit 0787aeac2428bf6a2e372ed5f2eac2f079c28ba6
Author: Mike Kaganski 
AuthorDate: Thu Oct 28 21:14:47 2021 +0300
Commit: Mike Kaganski 
CommitDate: Fri Oct 29 10:33:14 2021 +0200

Prepare for removal of non-const operator[] from Sequence in configmgr

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

diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index dc16b0211ade..95c5de4ed47a 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -856,10 +856,10 @@ css::uno::Sequence< css::uno::Any > 
Access::getPropertyValues(
 assert(thisIs(IS_GROUP));
 osl::MutexGuard g(*lock_);
 css::uno::Sequence< css::uno::Any > vals(aPropertyNames.getLength());
-
+auto aValsRange = asNonConstRange(vals);
 for (sal_Int32 i = 0; i < aPropertyNames.getLength(); ++i)
 {
-if (!getByNameFast(aPropertyNames[i], vals[i]))
+if (!getByNameFast(aPropertyNames[i], aValsRange[i]))
 throw css::uno::RuntimeException(
 "configmgr getPropertyValues inappropriate property name",
 static_cast< cppu::OWeakObject * >(this));
@@ -912,11 +912,12 @@ void Access::firePropertiesChangeEvent(
 assert(thisIs(IS_GROUP));
 css::uno::Sequence< css::beans::PropertyChangeEvent > events(
 aPropertyNames.getLength());
+auto aEventsRange = asNonConstRange(events);
 for (sal_Int32 i = 0; i < events.getLength(); ++i) {
-events[i].Source = static_cast< cppu::OWeakObject * >(this);
-events[i].PropertyName = aPropertyNames[i];
-events[i].Further = false;
-events[i].PropertyHandle = -1;
+aEventsRange[i].Source = static_cast< cppu::OWeakObject * >(this);
+aEventsRange[i].PropertyName = aPropertyNames[i];
+aEventsRange[i].Further = false;
+aEventsRange[i].PropertyHandle = -1;
 }
 xListener->propertiesChange(events);
 }
@@ -1013,6 +1014,7 @@ css::uno::Sequence< css::uno::Any > 
Access::getHierarchicalPropertyValues(
 osl::MutexGuard g(*lock_);
 css::uno::Sequence< css::uno::Any > vals(
 aHierarchicalPropertyNames.getLength());
+auto aValsRange = asNonConstRange(vals);
 for (sal_Int32 i = 0; i < aHierarchicalPropertyNames.getLength(); ++i) {
 rtl::Reference< ChildAccess > child(
 getSubChild(aHierarchicalPropertyNames[i]));
@@ -1022,7 +1024,7 @@ css::uno::Sequence< css::uno::Any > 
Access::getHierarchicalPropertyValues(
  " hierarchical property name"),
 static_cast< cppu::OWeakObject * >(this), -1);
 }
-vals[i] = child->asValue();
+aValsRange[i] = child->asValue();
 }
 return vals;
 }
diff --git a/configmgr/source/configurationregistry.cxx 
b/configmgr/source/configurationregistry.cxx
index c0e945ffc622..e4d86c46e9f2 100644
--- a/configmgr/source/configurationregistry.cxx
+++ b/configmgr/source/configurationregistry.cxx
@@ -246,8 +246,8 @@ void Service::open(OUString const & rURL, sal_Bool 
bReadOnly, sal_Bool)
 if (access_.is()) {
 doClose();
 }
-css::uno::Sequence< css::uno::Any > args(1);
-args[0] <<= css::beans::NamedValue("nodepath", css::uno::Any(rURL));
+css::uno::Sequence< css::uno::Any > args{ css::uno::Any(
+css::beans::NamedValue("nodepath", css::uno::Any(rURL))) };
 try {
 access_ = provider_->createInstanceWithArguments(
 (bReadOnly
diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx
index 6245cb11b654..a70c3231b702 100644
--- a/configmgr/source/valueparser.cxx
+++ b/configmgr/source/valueparser.cxx
@@ -439,8 +439,9 @@ void ValueParser::start(
 
 template< typename T > css::uno::Any ValueParser::convertItems() {
 css::uno::Sequence< T > seq(items_.size());
+auto seqRange = asNonConstRange(seq);
 for (sal_Int32 i = 0; i < seq.getLength(); ++i) {
-bool ok = (items_[i] >>= seq[i]);
+bool ok = (items_[i] >>= seqRange[i]);
 assert(ok);
 (void) ok; // avoid warnings
 }


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

2021-10-29 Thread Mike Kaganski (via logerrit)
 chart2/qa/extras/PivotChartTest.cxx|5 
 chart2/qa/extras/chart2_trendcalculators.cxx   |   36 
+++--
 chart2/qa/extras/charttest.hxx |3 
 chart2/source/controller/accessibility/AccessibleChartElement.cxx  |7 -
 chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx  |   16 
+-
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx  |5 
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx|4 
 chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx |9 -
 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx  |9 -
 chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx   |   11 -
 chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx  |   15 
+-
 chart2/source/controller/dialogs/DialogModel.cxx   |4 
 chart2/source/controller/dialogs/RangeSelectionHelper.cxx  |   30 
++--
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx  |3 
 chart2/source/controller/dialogs/tp_DataSource.cxx |2 
 chart2/source/controller/dialogs/tp_RangeChooser.cxx   |4 
 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx  |4 
 chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx |2 
 chart2/source/controller/main/ChartController.cxx  |   11 -
 chart2/source/controller/main/ChartController_Window.cxx   |9 -
 chart2/source/controller/main/CommandDispatchContainer.cxx |3 
 chart2/source/controller/main/ConfigurationAccess.cxx  |6 
 chart2/source/inc/CommonConverters.hxx |3 
 chart2/source/model/filter/XMLFilter.cxx   |   61 
+++-
 chart2/source/model/main/Axis.cxx  |3 
 chart2/source/model/main/ChartModel.cxx|3 
 chart2/source/model/main/ChartModel_Persistence.cxx|   26 
+--
 chart2/source/model/template/BubbleDataInterpreter.cxx |   16 
--
 chart2/source/model/template/ChartTypeTemplate.cxx |   15 
--
 chart2/source/model/template/ColumnChartType.cxx   |6 
 chart2/source/model/template/ColumnLineDataInterpreter.cxx |5 
 chart2/source/model/template/DataInterpreter.cxx   |7 -
 chart2/source/model/template/StockDataInterpreter.cxx  |   47 
+++---
 chart2/source/model/template/XYDataInterpreter.cxx |   11 -
 chart2/source/tools/CommonConverters.cxx   |   70 
++
 chart2/source/tools/DataSourceHelper.cxx   |   15 
--
 chart2/source/tools/DiagramHelper.cxx  |   18 
+-
 chart2/source/tools/ErrorBar.cxx   |3 
 chart2/source/tools/ExplicitCategoriesProvider.cxx |9 -
 chart2/source/tools/ExponentialRegressionCurveCalculator.cxx   |7 -
 chart2/source/tools/InternalData.cxx   |   10 -
 chart2/source/tools/InternalDataProvider.cxx   |   43 
+++---
 chart2/source/tools/LinearRegressionCurveCalculator.cxx|7 -
 chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx   |7 -
 chart2/source/tools/MeanValueRegressionCurveCalculator.cxx |7 -
 chart2/source/tools/MediaDescriptorHelper.cxx  |   10 -
 chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx |9 -
 chart2/source/tools/NameContainer.cxx  |   13 -
 chart2/source/tools/PotentialRegressionCurveCalculator.cxx |7 -
 chart2/source/tools/RangeHighlighter.cxx   |   18 
+-
 chart2/source/tools/RegressionCurveCalculator.cxx  |5 
 chart2/source/tools/RegressionCurveHelper.cxx  |3 
 chart2/source/tools/StatisticsHelper.cxx   |3 
 chart2/source/tools/TitleHelper.cxx|6 
 chart2/source/tools/UncachedDataSequence.cxx   |2 
 chart2/source/tools/WrappedPropertySet.cxx |9 -
 chart2/source/view/axes/Tickmarks.cxx  |   17 
+-
 chart2/source/view/axes/Tickmarks_Equidistant.cxx  |   18 
+-
 chart2/source/view/axes/VCartesianGrid.cxx |   41 
++---
 chart2/source/view/axes/VCoordinateSystem.cxx  |8 -
 chart2/source/view/axes/VPolarCoordinateSystem.cxx |9 -
 chart2/source/v

Re: ESC meeting minutes: 2021-10-28

2021-10-29 Thread Luboš Luňák
On Friday 29 of October 2021, Stephan Bergmann wrote:
> On 28/10/2021 18:03, Luboš Luňák wrote:
> >   Had nobody noticed that before? It seems likely that tb68-bytemark was
> > consistently failing every master build since May.
>
> (you can look that up at
> , btw)

 I know I can, but does anyone or anything do that?

 And in this case it was actually hard to spot, since the failures are 
interleaved with successful bibisect builds, and are marked as 'broken since 
this build'.

-- 
 Luboš Luňák
 l.lu...@collabora.com


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 2 commits - configure.ac readlicense_oo/license

2021-10-29 Thread Tor Lillqvist (via logerrit)
 configure.ac|   17 
 readlicense_oo/license/CREDITS.fodt | 3492 ++--
 2 files changed, 1766 insertions(+), 1743 deletions(-)

New commits:
commit 10a92904b036c7d2bfcd8f5dc91e3f9a4e113dbe
Author: Tor Lillqvist 
AuthorDate: Wed Oct 27 13:28:58 2021 +0300
Commit: Andras Timar 
CommitDate: Fri Oct 29 11:21:40 2021 +0200

Accept macOS SDK 12.0

Change-Id: I3e2b004578394e0199ac425f7b80da47a668f70d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124266
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124276
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/configure.ac b/configure.ac
index e8d580767953..151e6dc08954 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3126,7 +3126,7 @@ if test $_os = Darwin; then
 # higher than or equal to the minimum required should be found.
 
 AC_MSG_CHECKING([what macOS SDK to use])
-for _macosx_sdk in ${with_macosx_sdk-11.3 11.1 11.0 10.15 10.14 10.13}; do
+for _macosx_sdk in ${with_macosx_sdk-12.0 11.3 11.1 11.0 10.15 10.14 
10.13}; do
 MACOSX_SDK_PATH=`xcrun --sdk macosx${_macosx_sdk} --show-sdk-path 2> 
/dev/null`
 if test -d "$MACOSX_SDK_PATH"; then
 with_macosx_sdk="${_macosx_sdk}"
@@ -3164,8 +3164,11 @@ if test $_os = Darwin; then
 11.3)
 MACOSX_SDK_VERSION=110300
 ;;
+12.0)
+MACOSX_SDK_VERSION=12
+;;
 *)
-AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported 
value, supported values are 10.13--11.3])
+AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported 
value, supported values are 10.13--12.0])
 ;;
 esac
 
@@ -3233,8 +3236,11 @@ if test $_os = Darwin; then
 11.3)
 MAC_OS_X_VERSION_MIN_REQUIRED="110300"
 ;;
+12.0)
+MAC_OS_X_VERSION_MIN_REQUIRED="12"
+;;
 *)
-AC_MSG_ERROR([with-macosx-version-min-required 
$with_macosx_version_min_required is not a supported value, supported values 
are 10.10--11.3])
+AC_MSG_ERROR([with-macosx-version-min-required 
$with_macosx_version_min_required is not a supported value, supported values 
are 10.10--12.0])
 ;;
 esac
 
@@ -3301,8 +3307,11 @@ if test $_os = Darwin; then
 11.3)
 MAC_OS_X_VERSION_MAX_ALLOWED="110300"
 ;;
+12.0)
+MAC_OS_X_VERSION_MAX_ALLOWED="12"
+;;
 *)
-AC_MSG_ERROR([with-macosx-version-max-allowed 
$with_macosx_version_max_allowed is not a supported value, supported values are 
10.10--11.3])
+AC_MSG_ERROR([with-macosx-version-max-allowed 
$with_macosx_version_max_allowed is not a supported value, supported values are 
10.10--12.0])
 ;;
 esac
 
commit 40a5e54212f7131515d1a4a81cd48635a3441e7b
Author: Christian Lohmaier 
AuthorDate: Wed Oct 27 12:41:52 2021 +0200
Commit: Andras Timar 
CommitDate: Fri Oct 29 11:21:30 2021 +0200

update credits

Change-Id: Iec12f3c4f948d7e9e7991a212860e79f80750417
(cherry picked from commit c4a484b09ff4dca094ad2c56fd9e519f8ff8599a)

diff --git a/readlicense_oo/license/CREDITS.fodt 
b/readlicense_oo/license/CREDITS.fodt
index 01c9608c18f1..e5ddde09fe23 100644
--- a/readlicense_oo/license/CREDITS.fodt
+++ b/readlicense_oo/license/CREDITS.fodt
@@ -1,24 +1,24 @@
 
 
 http://openoffice.org/2009/office"; 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns
 :config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmln

[Libreoffice-commits] translations.git: Branch 'distro/collabora/co-2021' - source/am source/an source/ar source/ast source/ca source/cs source/de source/es source/eu source/fi source/fy source/gl sou

2021-10-29 Thread Christian Lohmaier (via logerrit)
 source/am/framework/messages.po  |
8 
 source/am/sfx2/messages.po   |
4 
 source/an/cui/messages.po|
9 
 source/an/desktop/messages.po|
9 
 source/an/officecfg/registry/data/org/openoffice/Office/UI.po|
5 
 source/an/sd/messages.po |
4 
 source/an/svx/messages.po|
6 
 source/ar/cui/messages.po|   
14 
 source/ast/cui/messages.po   |
6 
 source/ast/filter/source/config/fragments/filters.po |   
14 
 source/ast/helpcontent2/source/text/sdatabase.po |   
20 
 source/ast/helpcontent2/source/text/sdraw/guide.po   |   
16 
 source/ast/helpcontent2/source/text/shared/00.po |
6 
 source/ast/helpcontent2/source/text/shared/01.po |
8 
 source/ast/helpcontent2/source/text/simpress/00.po   |
8 
 source/ast/helpcontent2/source/text/simpress/01.po   |
6 
 source/ast/helpcontent2/source/text/swriter/01.po|   
10 
 source/ast/helpcontent2/source/text/swriter/02.po|
6 
 source/ast/helpcontent2/source/text/swriter/guide.po |
6 
 source/ast/officecfg/registry/data/org/openoffice/Office/UI.po   |
8 
 source/ast/sc/messages.po|
7 
 source/ast/scp2/source/ooo.po|   
33 
 source/ast/sd/messages.po|   
10 
 source/ast/svtools/messages.po   |   
20 
 source/ast/sw/messages.po|   
20 
 source/ast/vcl/messages.po   |
4 
 source/ast/wizards/source/resources.po   |
8 
 source/ca/cui/messages.po|   
16 
 source/ca/helpcontent2/source/text/sbasic/shared/01.po   |
8 
 source/ca/helpcontent2/source/text/scalc/01.po   |   
10 
 source/ca/helpcontent2/source/text/scalc/guide.po|
6 
 source/ca/helpcontent2/source/text/sdatabase.po  |
4 
 source/ca/helpcontent2/source/text/sdraw.po  |
4 
 source/ca/helpcontent2/source/text/shared/00.po  |   
10 
 source/ca/helpcontent2/source/text/shared/01.po  |   
32 
 source/ca/helpcontent2/source/text/shared/02.po  |
6 
 source/ca/helpcontent2/source/text/shared/guide.po   |   
22 
 source/ca/helpcontent2/source/text/shared/optionen.po|   
28 
 source/ca/helpcontent2/source/text/simpress/guide.po |   
22 
 source/ca/helpcontent2/source/text/smath/00.po   |   
10 
 source/ca/helpcontent2/source/text/smath/01.po   |   
16 
 source/ca/helpcontent2/source/text/swriter.po|
6 
 source/ca/helpcontent2/source/text/swriter/01.po |   
22 
 source/ca/helpcontent2/source/text/swriter/guide.po  |   
10 
 source/ca/sfx2/messages.po   |
8 
 source/ca/starmath/messages.po   |   
10 
 source/ca/svtools/messages.po|
8 
 source/ca/sw/messages.po |   
12 
 source/cs/helpcontent2/source/text/sbasic/shared/02.po   |   
12 
 source/cs/helpcontent2/source/text/scalc/04.po   |   
12 
 source/cs/helpcontent2/source/text/swriter/00.po |
8 
 source/cs/helpcontent2/source/text/swriter/guide.po  |   
16 
 source/cs/officecfg/registry/data/org/openoffice/Office/UI.po|
6 
 source/de/cui/messages.po|   
16 
 source/de/dictionaries/ca.po |   
15 
 source/de/dictionaries/cs_CZ.po  |   
15 
 source/de/dictionaries/da_DK.po  |
6 
 source/de/dictionaries/de.po |   
16 
 source/de/dictionaries/en.po |   
16 
 source/de/dictionaries/gl.po |   
17 
 source/de/dictiona

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

2021-10-29 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ec454c55a683bec4221b85ee5c58dcca88634136
Author: Christian Lohmaier 
AuthorDate: Fri Oct 29 11:23:54 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Fri Oct 29 11:23:54 2021 +0200

Update git submodules

* Update translations from branch 'distro/collabora/co-2021'
  to 0b553b25815d61d60042f58cf00faaea5a1da55c
  - update templates for 7.1.7 rc2

and force-fix errors using pocheck

Change-Id: If939ee89c3695d61e8191c75572479d13c22f903

diff --git a/translations b/translations
index 199bc9df9e0c..0b553b25815d 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 199bc9df9e0c79c47767cf6abb24e7b4aa116c6f
+Subproject commit 0b553b25815d61d60042f58cf00faaea5a1da55c


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - xmlsecurity/CppunitTest_xmlsecurity_signing.mk xmlsecurity/inc xmlsecurity/qa xmlsecurity/source

2021-10-29 Thread Michael Stahl (via logerrit)
 xmlsecurity/CppunitTest_xmlsecurity_signing.mk|1 
 xmlsecurity/inc/biginteger.hxx|   11 +
 xmlsecurity/qa/unit/signing/signing.cxx   |   16 +
 xmlsecurity/source/component/documentdigitalsignatures.cxx|2 
 xmlsecurity/source/helper/xmlsignaturehelper.cxx  |5 
 xmlsecurity/source/helper/xsecverify.cxx  |6 
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx |   92 
-
 xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx |   95 
+-
 8 files changed, 208 insertions(+), 20 deletions(-)

New commits:
commit 9f74e725b0fe39a483120463294b61e1e7c7b8c1
Author: Michael Stahl 
AuthorDate: Wed Oct 27 15:28:11 2021 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 29 11:51:38 2021 +0200

xmlsecurity: some Distinguished Names are less equal than others

It turns out that the 2 backends NSS and MS CryptoAPI generate different
string representations of the same Distinguished Name in at least one
corner case, when a value contains a quote " U+0022.

The CryptoAPI function to generate the strings is:
CertNameToStr(..., CERT_X500_NAME_STR | CERT_NAME_STR_REVERSE_FLAG, ...)

This is documented on MSDN:

https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-certnametostra#CERT_X500_NAME_STR

NSS appears to implement RFC 1485, at least that's what the internal
function is named after, or perhaps one of its several successor RFCs
(not clear currently if there's a relevant difference).

This is now causing trouble if a certificate with such a DN is used in a
signature, created on WNT but then verified on another platform, because
commit 5af5ea893bcb8a8eb472ac11133da10e5a604e66
introduced consistency checks that compare the DNs that occur as strings
in META-INF/documentsignatures.xml:

xmlsecurity/source/helper/xmlsignaturehelper.cxx:672: X509Data cannot be 
parsed

The reason is that in XSecController::setX509Data() the value read from
the X509IssuerSerial element (a string generated by CryptoAPI) doesn't
match the value generated by NSS from the certificate parsed from the
X509Certificate element, so these are erroneously interpreted as 2
distinct certificates.

Try to make the EqualDistinguishedNames() more flexible so that it can
try also a converted variant of the DN.

(libxmlsec's NSS backend also complains that it cannot parse the DN:
 x509vfy.c:607: xmlSecNssX509NameRead() '' '' 12 'invalid data for 'char': 
actual=34 and expected comma ',''
 but it manages to validate the signature despite this.)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124287
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit e63611fabd38c757809b510fbb71c077880b1081)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124196
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 3dfe381032fc61ea31106f103dee9db8277d4d25)

Change-Id: I4f72900738d1f5313146bbda7320a8f44319ebc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124420
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk 
b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
index bdac7bda71e5..9709b49e2b19 100644
--- a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
+++ b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
@@ -28,6 +28,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,xmlsecurity_signing, \
unotest \
utl \
xmlsecurity \
+   xsec_xmlsec \
 ))
 
 $(eval $(call gb_CppunitTest_use_externals,xmlsecurity_signing,\
diff --git a/xmlsecurity/inc/biginteger.hxx b/xmlsecurity/inc/biginteger.hxx
index 8b4d8a9143b5..1e6b3f4a876e 100644
--- a/xmlsecurity/inc/biginteger.hxx
+++ b/xmlsecurity/inc/biginteger.hxx
@@ -32,8 +32,17 @@ namespace xmlsecurity
 XSECXMLSEC_DLLPUBLIC OUString bigIntegerToNumericString( const 
css::uno::Sequence< sal_Int8 >& serial );
 XSECXMLSEC_DLLPUBLIC css::uno::Sequence< sal_Int8 > numericStringToBigInteger 
( const OUString& serialNumber );
 
+// DNs read as strings from XML files may need to be mangled for compatibility
+// as NSS and MS CryptoAPI have different string serialisations; if the DN is
+// from an XCertificate it's "native" already and doesn't need to be mangled.
+enum EqualMode
+{
+NOCOMPAT,
+COMPAT_2ND,
+COMPAT_BOTH
+};
 XSECXMLSEC_DLLPUBLIC bool EqualDistinguishedNames(OUString const& rName1,
-  OUString const& rName2);
+  OUString const& rName2, 
EqualMode eMode);
 }
 
 #endif
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx 
b/xmlsecurity/qa/unit/signing/signing.cxx
index a8c6eba03ec0..5bacc6cee249 100644
--- a/xmlsec

valve products.

2021-10-29 Thread yihuajjjc
 
 
Hello! Dear wholesaler 
friend, I am the business director of Foshan Yihua Home Building Materials Co., 
Ltd.
 
The company's main valve 
products: gate valves, butterfly valves, check valves, ball valves, globe 
valves, pressure reducing valves, regulating valves, hydraulic control valves, 
pneumatic valves, PPR valves and other products.
 
Products are widely used 
in electric power, petrochemical, petroleum, metallurgy, gas, municipal, 
construction, water supply and drainage industries. Can be customized according 
to customer requirements. Products include bronze, brass, cast iron, ductile 
iron and so on.
 
Products are exported to 
Southeast Asia, Middle East, Europe, North America, Africa and other countries 
and regions. We sincerely welcome overseas new and old customers to cooperate 
with each other, and we look forward to serving you sincerely! Looking forward 
to your email. thank you
 
Business Representative: 
Mr. Zhang.
 
Tel: 
17819865598.

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - xmlsecurity/CppunitTest_xmlsecurity_signing.mk xmlsecurity/inc xmlsecurity/qa xmlsecurity/source

2021-10-29 Thread Michael Stahl (via logerrit)
 xmlsecurity/CppunitTest_xmlsecurity_signing.mk|1 
 xmlsecurity/inc/biginteger.hxx|   11 +
 xmlsecurity/qa/unit/signing/signing.cxx   |   18 +
 xmlsecurity/source/component/documentdigitalsignatures.cxx|2 
 xmlsecurity/source/helper/xmlsignaturehelper.cxx  |6 
 xmlsecurity/source/helper/xsecverify.cxx  |6 
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx |   92 
-
 xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx |   95 
+-
 8 files changed, 211 insertions(+), 20 deletions(-)

New commits:
commit 7e1024dd869abfe971419bd8b48090d8004b3629
Author: Michael Stahl 
AuthorDate: Wed Oct 27 15:28:11 2021 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 29 12:33:51 2021 +0200

xmlsecurity: some Distinguished Names are less equal than others

It turns out that the 2 backends NSS and MS CryptoAPI generate different
string representations of the same Distinguished Name in at least one
corner case, when a value contains a quote " U+0022.

The CryptoAPI function to generate the strings is:
CertNameToStr(..., CERT_X500_NAME_STR | CERT_NAME_STR_REVERSE_FLAG, ...)

This is documented on MSDN:

https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-certnametostra#CERT_X500_NAME_STR

NSS appears to implement RFC 1485, at least that's what the internal
function is named after, or perhaps one of its several successor RFCs
(not clear currently if there's a relevant difference).

This is now causing trouble if a certificate with such a DN is used in a
signature, created on WNT but then verified on another platform, because
commit 5af5ea893bcb8a8eb472ac11133da10e5a604e66
introduced consistency checks that compare the DNs that occur as strings
in META-INF/documentsignatures.xml:

xmlsecurity/source/helper/xmlsignaturehelper.cxx:672: X509Data cannot be 
parsed

The reason is that in XSecController::setX509Data() the value read from
the X509IssuerSerial element (a string generated by CryptoAPI) doesn't
match the value generated by NSS from the certificate parsed from the
X509Certificate element, so these are erroneously interpreted as 2
distinct certificates.

Try to make the EqualDistinguishedNames() more flexible so that it can
try also a converted variant of the DN.

(libxmlsec's NSS backend also complains that it cannot parse the DN:
 x509vfy.c:607: xmlSecNssX509NameRead() '' '' 12 'invalid data for 'char': 
actual=34 and expected comma ',''
 but it manages to validate the signature despite this.)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124287
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit e63611fabd38c757809b510fbb71c077880b1081)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124196
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 3dfe381032fc61ea31106f103dee9db8277d4d25)

Change-Id: I4f72900738d1f5313146bbda7320a8f44319ebc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124421
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk 
b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
index 4b3c4787ea73..030becd36a37 100644
--- a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
+++ b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
@@ -27,6 +27,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,xmlsecurity_signing, \
unotest \
utl \
xmlsecurity \
+   xsec_xmlsec \
 ))
 
 $(eval $(call gb_CppunitTest_use_externals,xmlsecurity_signing,\
diff --git a/xmlsecurity/inc/biginteger.hxx b/xmlsecurity/inc/biginteger.hxx
index 8b4d8a9143b5..1e6b3f4a876e 100644
--- a/xmlsecurity/inc/biginteger.hxx
+++ b/xmlsecurity/inc/biginteger.hxx
@@ -32,8 +32,17 @@ namespace xmlsecurity
 XSECXMLSEC_DLLPUBLIC OUString bigIntegerToNumericString( const 
css::uno::Sequence< sal_Int8 >& serial );
 XSECXMLSEC_DLLPUBLIC css::uno::Sequence< sal_Int8 > numericStringToBigInteger 
( const OUString& serialNumber );
 
+// DNs read as strings from XML files may need to be mangled for compatibility
+// as NSS and MS CryptoAPI have different string serialisations; if the DN is
+// from an XCertificate it's "native" already and doesn't need to be mangled.
+enum EqualMode
+{
+NOCOMPAT,
+COMPAT_2ND,
+COMPAT_BOTH
+};
 XSECXMLSEC_DLLPUBLIC bool EqualDistinguishedNames(OUString const& rName1,
-  OUString const& rName2);
+  OUString const& rName2, 
EqualMode eMode);
 }
 
 #endif
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx 
b/xmlsecurity/qa/unit/signing/signing.cxx
index 781c555fbd3f..85aacdd12cf3 100644
--- a/xmlsec

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - xmlsecurity/CppunitTest_xmlsecurity_signing.mk xmlsecurity/inc xmlsecurity/qa xmlsecurity/source

2021-10-29 Thread Michael Stahl (via logerrit)
 xmlsecurity/CppunitTest_xmlsecurity_signing.mk|1 
 xmlsecurity/inc/biginteger.hxx|   11 +
 xmlsecurity/qa/unit/signing/signing.cxx   |   16 +
 xmlsecurity/source/component/documentdigitalsignatures.cxx|2 
 xmlsecurity/source/helper/xmlsignaturehelper.cxx  |5 
 xmlsecurity/source/helper/xsecverify.cxx  |6 
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx |   92 
-
 xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx |   95 
+-
 8 files changed, 208 insertions(+), 20 deletions(-)

New commits:
commit ee48ce9886d884730a91c695b5d0668c6d90c740
Author: Michael Stahl 
AuthorDate: Wed Oct 27 15:28:11 2021 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 29 11:56:31 2021 +0200

xmlsecurity: some Distinguished Names are less equal than others

It turns out that the 2 backends NSS and MS CryptoAPI generate different
string representations of the same Distinguished Name in at least one
corner case, when a value contains a quote " U+0022.

The CryptoAPI function to generate the strings is:
CertNameToStr(..., CERT_X500_NAME_STR | CERT_NAME_STR_REVERSE_FLAG, ...)

This is documented on MSDN:

https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-certnametostra#CERT_X500_NAME_STR

NSS appears to implement RFC 1485, at least that's what the internal
function is named after, or perhaps one of its several successor RFCs
(not clear currently if there's a relevant difference).

This is now causing trouble if a certificate with such a DN is used in a
signature, created on WNT but then verified on another platform, because
commit 5af5ea893bcb8a8eb472ac11133da10e5a604e66
introduced consistency checks that compare the DNs that occur as strings
in META-INF/documentsignatures.xml:

xmlsecurity/source/helper/xmlsignaturehelper.cxx:672: X509Data cannot be 
parsed

The reason is that in XSecController::setX509Data() the value read from
the X509IssuerSerial element (a string generated by CryptoAPI) doesn't
match the value generated by NSS from the certificate parsed from the
X509Certificate element, so these are erroneously interpreted as 2
distinct certificates.

Try to make the EqualDistinguishedNames() more flexible so that it can
try also a converted variant of the DN.

(libxmlsec's NSS backend also complains that it cannot parse the DN:
 x509vfy.c:607: xmlSecNssX509NameRead() '' '' 12 'invalid data for 'char': 
actual=34 and expected comma ',''
 but it manages to validate the signature despite this.)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124287
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit e63611fabd38c757809b510fbb71c077880b1081)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124196
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 3dfe381032fc61ea31106f103dee9db8277d4d25)

Change-Id: I4f72900738d1f5313146bbda7320a8f44319ebc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124420
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk 
b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
index bdac7bda71e5..9709b49e2b19 100644
--- a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
+++ b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
@@ -28,6 +28,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,xmlsecurity_signing, \
unotest \
utl \
xmlsecurity \
+   xsec_xmlsec \
 ))
 
 $(eval $(call gb_CppunitTest_use_externals,xmlsecurity_signing,\
diff --git a/xmlsecurity/inc/biginteger.hxx b/xmlsecurity/inc/biginteger.hxx
index 8b4d8a9143b5..1e6b3f4a876e 100644
--- a/xmlsecurity/inc/biginteger.hxx
+++ b/xmlsecurity/inc/biginteger.hxx
@@ -32,8 +32,17 @@ namespace xmlsecurity
 XSECXMLSEC_DLLPUBLIC OUString bigIntegerToNumericString( const 
css::uno::Sequence< sal_Int8 >& serial );
 XSECXMLSEC_DLLPUBLIC css::uno::Sequence< sal_Int8 > numericStringToBigInteger 
( const OUString& serialNumber );
 
+// DNs read as strings from XML files may need to be mangled for compatibility
+// as NSS and MS CryptoAPI have different string serialisations; if the DN is
+// from an XCertificate it's "native" already and doesn't need to be mangled.
+enum EqualMode
+{
+NOCOMPAT,
+COMPAT_2ND,
+COMPAT_BOTH
+};
 XSECXMLSEC_DLLPUBLIC bool EqualDistinguishedNames(OUString const& rName1,
-  OUString const& rName2);
+  OUString const& rName2, 
EqualMode eMode);
 }
 
 #endif
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx 
b/xmlsecurity/qa/unit/signing/signing.cxx
index d696c2b5128f..96d233ad9027 100644
--- a/xmlsec

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/inc vcl/jsdialog

2021-10-29 Thread Szymon Kłos (via logerrit)
 vcl/inc/jsdialog/jsdialogbuilder.hxx |8 
 vcl/jsdialog/jsdialogbuilder.cxx |   18 ++
 2 files changed, 26 insertions(+)

New commits:
commit 92ea119ab9a8df119011a722f0cfff1ac358ca3e
Author: Szymon Kłos 
AuthorDate: Wed Oct 20 10:59:12 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 12:39:03 2021 +0200

jsdialog: weld Image widget

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

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 7dba4b7a3120..9f52846206d7 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -274,6 +274,7 @@ public:
 virtual std::unique_ptr weld_popover(const OString& id) 
override;
 virtual std::unique_ptr weld_box(const OString& id) override;
 virtual std::unique_ptr weld_widget(const OString& id) 
override;
+virtual std::unique_ptr weld_image(const OString& id) 
override;
 
 static weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent,
 VclMessageType 
eMessageType,
@@ -694,4 +695,11 @@ public:
 }
 };
 
+class JSImage : public JSWidget
+{
+public:
+JSImage(JSDialogSender* pSender, FixedImage* pImage, SalInstanceBuilder* 
pBuilder,
+bool bTakeOwnership);
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index cb95b528af8b..a9085ea0f320 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1065,6 +1065,18 @@ std::unique_ptr 
JSInstanceBuilder::weld_widget(const OString& id)
 return pWeldWidget;
 }
 
+std::unique_ptr JSInstanceBuilder::weld_image(const OString& id)
+{
+FixedImage* pImage = m_xBuilder->get(id);
+
+auto pWeldWidget = pImage ? std::make_unique(this, pImage, this, 
false) : nullptr;
+
+if (pWeldWidget)
+RememberWidget(id, pWeldWidget.get());
+
+return pWeldWidget;
+}
+
 weld::MessageDialog* JSInstanceBuilder::CreateMessageDialog(weld::Widget* 
pParent,
 VclMessageType 
eMessageType,
 VclButtonsType 
eButtonType,
@@ -1690,4 +1702,10 @@ JSBox::JSBox(JSDialogSender* pSender, VclBox* pBox, 
SalInstanceBuilder* pBuilder
 {
 }
 
+JSImage::JSImage(JSDialogSender* pSender, FixedImage* pImage, 
SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
+: JSWidget(pSender, pImage, pBuilder, 
bTakeOwnership)
+{
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */


[Libreoffice-commits] core.git: canvas/source cppcanvas/source drawinglayer/source editeng/source emfio/inc emfio/source filter/source include/editeng include/o3tl include/vcl sc/source sfx2/source sv

2021-10-29 Thread Noel Grandin (via logerrit)
 canvas/source/cairo/cairo_textlayout.cxx|6 +-
 canvas/source/directx/dx_textlayout_drawhelper.cxx  |2 
 canvas/source/opengl/ogl_canvashelper.cxx   |6 +-
 canvas/source/vcl/textlayout.cxx|   12 ++---
 cppcanvas/source/inc/implrenderer.hxx   |2 
 cppcanvas/source/mtfrenderer/implrenderer.cxx   |   16 +++---
 cppcanvas/source/mtfrenderer/textaction.cxx |   15 +++---
 cppcanvas/source/mtfrenderer/textaction.hxx |2 
 drawinglayer/source/primitive2d/textlayoutdevice.cxx|2 
 drawinglayer/source/processor2d/vclprocessor2d.cxx  |   12 ++---
 drawinglayer/source/tools/wmfemfhelper.cxx  |6 +-
 editeng/source/editeng/editeng.cxx  |2 
 editeng/source/editeng/impedit3.cxx |   15 +++---
 editeng/source/items/svxfont.cxx|6 +-
 editeng/source/outliner/outleeng.cxx|2 
 editeng/source/outliner/outleeng.hxx|2 
 editeng/source/outliner/outliner.cxx|6 +-
 emfio/inc/mtftools.hxx  |2 
 emfio/source/reader/emfreader.cxx   |   13 ++---
 emfio/source/reader/mtftools.cxx|   23 +
 emfio/source/reader/wmfreader.cxx   |   19 
 filter/source/svg/svgwriter.cxx |   16 +++---
 filter/source/svg/svgwriter.hxx |4 -
 include/editeng/editeng.hxx |3 -
 include/editeng/outliner.hxx|6 +-
 include/editeng/svxfont.hxx |3 -
 include/o3tl/span.hxx   |5 ++
 include/vcl/metaact.hxx |   13 +++--
 include/vcl/outdev.hxx  |   11 ++--
 include/vcl/pdfwriter.hxx   |2 
 sc/source/ui/view/output2.cxx   |4 -
 sfx2/source/doc/SfxRedactionHelper.cxx  |6 +-
 svtools/source/control/ruler.cxx|4 -
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |4 -
 svx/source/svdraw/svdotextdecomposition.cxx |2 
 svx/source/svdraw/svdotextpathdecomposition.cxx |2 
 sw/source/core/txtnode/fntcache.cxx |   28 +--
 toolkit/source/awt/vclxgraphics.cxx |6 +-
 vcl/inc/pdf/pdfwriter_impl.hxx  |2 
 vcl/qa/cppunit/complextext.cxx  |8 +--
 vcl/qa/cppunit/text.cxx |2 
 vcl/source/control/calendar.cxx |5 +-
 vcl/source/control/imp_listbox.cxx  |2 
 vcl/source/filter/eps/eps.cxx   |   18 +++
 vcl/source/filter/svm/SvmConverter.cxx  |   12 ++---
 vcl/source/filter/svm/SvmReader.cxx |   14 +++--
 vcl/source/filter/svm/SvmWriter.cxx |6 +-
 vcl/source/filter/wmf/emfwr.cxx |   25 ++
 vcl/source/filter/wmf/emfwr.hxx |2 
 vcl/source/filter/wmf/wmfwr.cxx |   22 -
 vcl/source/filter/wmf/wmfwr.hxx |6 +-
 vcl/source/gdi/gdimtf.cxx   |4 -
 vcl/source/gdi/metaact.cxx  |   38 
 vcl/source/gdi/mtfxmldump.cxx   |2 
 vcl/source/gdi/pdfwriter.cxx|2 
 vcl/source/gdi/pdfwriter_impl.cxx   |2 
 vcl/source/gdi/pdfwriter_impl2.cxx  |2 
 vcl/source/gdi/textlayout.cxx   |2 
 vcl/source/outdev/text.cxx  |   31 ++---
 vcl/source/outdev/transparent.cxx   |2 
 vcl/source/window/menuitemlist.cxx  |2 
 61 files changed, 267 insertions(+), 234 deletions(-)

New commits:
commit 894b4911ffb96ff667fdeb3aec7922316ab7230a
Author: Noel Grandin 
AuthorDate: Thu Oct 28 09:27:29 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 29 12:38:51 2021 +0200

pass DX array around using o3tl::span instead of pointer

so we get bounds checking in debug mode

Note that I cannot just pass around the std::vectors
involved because there is a place in editeng which
calls with a subset of a vector.

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

diff --git a/canvas/source/cairo/cairo_textlayout.cxx 
b/canvas/source/cairo/cairo_textlayout.cxx
index 9952d33d343c..acf2672be51d 100644
--- a/canvas/source/

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - xmlsecurity/CppunitTest_xmlsecurity_signing.mk xmlsecurity/inc xmlsecurity/qa xmlsecurity/source

2021-10-29 Thread Michael Stahl (via logerrit)
 xmlsecurity/CppunitTest_xmlsecurity_signing.mk|1 
 xmlsecurity/inc/biginteger.hxx|   11 +
 xmlsecurity/qa/unit/signing/signing.cxx   |   18 +
 xmlsecurity/source/component/documentdigitalsignatures.cxx|2 
 xmlsecurity/source/helper/xmlsignaturehelper.cxx  |6 
 xmlsecurity/source/helper/xsecverify.cxx  |6 
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx |   92 
-
 xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx |   95 
+-
 8 files changed, 211 insertions(+), 20 deletions(-)

New commits:
commit f77ecfff1963aea4e5903824a304fa902ac4be35
Author: Michael Stahl 
AuthorDate: Wed Oct 27 15:28:11 2021 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 29 12:35:51 2021 +0200

xmlsecurity: some Distinguished Names are less equal than others

It turns out that the 2 backends NSS and MS CryptoAPI generate different
string representations of the same Distinguished Name in at least one
corner case, when a value contains a quote " U+0022.

The CryptoAPI function to generate the strings is:
CertNameToStr(..., CERT_X500_NAME_STR | CERT_NAME_STR_REVERSE_FLAG, ...)

This is documented on MSDN:

https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-certnametostra#CERT_X500_NAME_STR

NSS appears to implement RFC 1485, at least that's what the internal
function is named after, or perhaps one of its several successor RFCs
(not clear currently if there's a relevant difference).

This is now causing trouble if a certificate with such a DN is used in a
signature, created on WNT but then verified on another platform, because
commit 5af5ea893bcb8a8eb472ac11133da10e5a604e66
introduced consistency checks that compare the DNs that occur as strings
in META-INF/documentsignatures.xml:

xmlsecurity/source/helper/xmlsignaturehelper.cxx:672: X509Data cannot be 
parsed

The reason is that in XSecController::setX509Data() the value read from
the X509IssuerSerial element (a string generated by CryptoAPI) doesn't
match the value generated by NSS from the certificate parsed from the
X509Certificate element, so these are erroneously interpreted as 2
distinct certificates.

Try to make the EqualDistinguishedNames() more flexible so that it can
try also a converted variant of the DN.

(libxmlsec's NSS backend also complains that it cannot parse the DN:
 x509vfy.c:607: xmlSecNssX509NameRead() '' '' 12 'invalid data for 'char': 
actual=34 and expected comma ',''
 but it manages to validate the signature despite this.)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124287
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit e63611fabd38c757809b510fbb71c077880b1081)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124196
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 3dfe381032fc61ea31106f103dee9db8277d4d25)

Change-Id: I4f72900738d1f5313146bbda7320a8f44319ebc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124421
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk 
b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
index 4b3c4787ea73..030becd36a37 100644
--- a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
+++ b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
@@ -27,6 +27,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,xmlsecurity_signing, \
unotest \
utl \
xmlsecurity \
+   xsec_xmlsec \
 ))
 
 $(eval $(call gb_CppunitTest_use_externals,xmlsecurity_signing,\
diff --git a/xmlsecurity/inc/biginteger.hxx b/xmlsecurity/inc/biginteger.hxx
index 8b4d8a9143b5..1e6b3f4a876e 100644
--- a/xmlsecurity/inc/biginteger.hxx
+++ b/xmlsecurity/inc/biginteger.hxx
@@ -32,8 +32,17 @@ namespace xmlsecurity
 XSECXMLSEC_DLLPUBLIC OUString bigIntegerToNumericString( const 
css::uno::Sequence< sal_Int8 >& serial );
 XSECXMLSEC_DLLPUBLIC css::uno::Sequence< sal_Int8 > numericStringToBigInteger 
( const OUString& serialNumber );
 
+// DNs read as strings from XML files may need to be mangled for compatibility
+// as NSS and MS CryptoAPI have different string serialisations; if the DN is
+// from an XCertificate it's "native" already and doesn't need to be mangled.
+enum EqualMode
+{
+NOCOMPAT,
+COMPAT_2ND,
+COMPAT_BOTH
+};
 XSECXMLSEC_DLLPUBLIC bool EqualDistinguishedNames(OUString const& rName1,
-  OUString const& rName2);
+  OUString const& rName2, 
EqualMode eMode);
 }
 
 #endif
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx 
b/xmlsecurity/qa/unit/signing/signing.cxx
index 781c555fbd3f..85aacdd12cf3 100644
--- a/xmlsec

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/jsdialog

2021-10-29 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 65dc39563a2907f791d3fdda322a861590f5564b
Author: Szymon Kłos 
AuthorDate: Mon Oct 25 15:02:30 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 12:40:07 2021 +0200

jsdialog: activate tabpage after switch

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

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index a9085ea0f320..c74d0532a420 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1246,6 +1246,8 @@ void JSNotebook::set_current_page(int nPage)
 
 SalInstanceNotebook::set_current_page(nPage);
 sendFullUpdate(bForce);
+
+m_aEnterPageHdl.Call(get_current_page_ident());
 }
 
 void JSNotebook::set_current_page(const OString& rIdent)
@@ -1257,6 +1259,8 @@ void JSNotebook::set_current_page(const OString& rIdent)
 
 SalInstanceNotebook::set_current_page(rIdent);
 sendFullUpdate(bForce);
+
+m_aEnterPageHdl.Call(get_current_page_ident());
 }
 
 void JSNotebook::remove_page(const OString& rIdent)


[Libreoffice-commits] core.git: 2 commits - cppcanvas/qa cppcanvas/source cppuhelper/source

2021-10-29 Thread Mike Kaganski (via logerrit)
 cppcanvas/qa/unit/test.cxx  |9 +-
 cppcanvas/source/mtfrenderer/implrenderer.cxx   |   29 ++-
 cppcanvas/source/mtfrenderer/polypolyaction.cxx |4 -
 cppcanvas/source/tools/tools.cxx|   13 +--
 cppuhelper/source/component_context.cxx |3 
 cppuhelper/source/propertysetmixin.cxx  |   14 ++-
 cppuhelper/source/servicemanager.cxx|4 -
 cppuhelper/source/typemanager.cxx   |   89 +++-
 8 files changed, 90 insertions(+), 75 deletions(-)

New commits:
commit 4c71240a8e09f253d6156036485ed78449863f64
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 08:12:18 2021 +0300
Commit: Mike Kaganski 
CommitDate: Fri Oct 29 13:15:15 2021 +0200

Prepare for removal of non-const operator[] from Sequence in cppuhelper

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

diff --git a/cppuhelper/source/component_context.cxx 
b/cppuhelper/source/component_context.cxx
index 16264dae53c4..1aa3d33e5c35 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -288,8 +288,7 @@ Any ComponentContext::lookupMap( OUString const & rName )
 Sequence args;
 if (args_.hasValue() && !(args_ >>= args))
 {
-args.realloc( 1 );
-args[ 0 ] = args_;
+args = { args_ };
 }
 
 Reference< lang::XSingleComponentFactory > xFac;
diff --git a/cppuhelper/source/propertysetmixin.cxx 
b/cppuhelper/source/propertysetmixin.cxx
index 41f9442ff311..030160c65f0f 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -220,7 +220,7 @@ void Data::initProperties(
 break;
 }
 attrAttribs |= n;
-css::uno::Sequence<
+const css::uno::Sequence<
 css::uno::Reference< css::reflection::XTypeDescription > >
 args(
 css::uno::Reference<
@@ -291,11 +291,12 @@ css::uno::Sequence< css::beans::Property > 
Info::getProperties()
 assert(m_data->properties.size() <= SAL_MAX_INT32);
 css::uno::Sequence< css::beans::Property > s(
 static_cast< sal_Int32 >(m_data->properties.size()));
+auto r = asNonConstRange(s);
 sal_Int32 n = 0;
 for (const auto& rEntry : m_data->properties)
 {
 if (rEntry.second.present) {
-s[n++] = rEntry.second.property;
+r[n++] = rEntry.second.property;
 }
 }
 s.realloc(n);
@@ -1093,12 +1094,13 @@ PropertySetMixinImpl::getPropertyValues()
 {
 css::uno::Sequence< css::beans::PropertyValue > s(
 m_impl->handleMap.getLength());
+auto r = asNonConstRange(s);
 sal_Int32 n = 0;
 for (sal_Int32 i = 0; i < m_impl->handleMap.getLength(); ++i) {
 try {
-s[n].Value = m_impl->getProperty(
+r[n].Value = m_impl->getProperty(
 static_cast< css::beans::XPropertySet * >(this),
-m_impl->handleMap[i], &s[n].State);
+m_impl->handleMap[i], &r[n].State);
 } catch (css::beans::UnknownPropertyException &) {
 continue;
 } catch (css::lang::WrappedTargetException & e) {
@@ -1106,8 +1108,8 @@ PropertySetMixinImpl::getPropertyValues()
 e.Message, static_cast< css::beans::XPropertySet * >(this),
 e.TargetException);
 }
-s[n].Name = m_impl->handleMap[i];
-s[n].Handle = i;
+r[n].Name = m_impl->handleMap[i];
+r[n].Handle = i;
 ++n;
 }
 s.realloc(n);
diff --git a/cppuhelper/source/servicemanager.cxx 
b/cppuhelper/source/servicemanager.cxx
index 121ad088dc50..57a3b646858e 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -1279,9 +1279,7 @@ void 
cppuhelper::ServiceManager::removeVetoableChangeListener(
 
 css::uno::Sequence< css::beans::Property >
 cppuhelper::ServiceManager::getProperties() {
-css::uno::Sequence< css::beans::Property > props(1);
-props[0] = getDefaultContextProperty();
-return props;
+return { getDefaultContextProperty() };
 }
 
 css::beans::Property cppuhelper::ServiceManager::getPropertyByName(
diff --git a/cppuhelper/source/typemanager.cxx 
b/cppuhelper/source/typemanager.cxx
index 82aad46483fc..d6bf844a74ee 100644
--- a/cppuhelper/source/typemanager.cxx
+++ b/cppuhelper/source/typemanager.cxx
@@ -179,8 +179,9 @@ ModuleDescription::getMembers() {
 sal_Int32 n = static_cast< sal_Int32 >(names.size());
 css::uno::Sequence<
 css::uno::Reference< css::reflection::XTypeDescription > > s(n);
+auto r = asNonConstRange(s);
 for (sal_Int32 i = 0; i != n; ++i) {
-s[i] = manager_->resolve(makePrefix(name_) + names[i]);
+ 

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

2021-10-29 Thread Mike Kaganski (via logerrit)
 cui/source/customize/SvxConfigPageHelper.cxx  |   67 +++---
 cui/source/customize/SvxNotebookbarConfigPage.cxx |7 +-
 cui/source/customize/acccfg.cxx   |9 --
 cui/source/customize/cfg.cxx  |   59 ---
 cui/source/customize/cfgutil.cxx  |6 -
 cui/source/dialogs/QrCodeGenDialog.cxx|6 -
 cui/source/dialogs/SignSignatureLineDialog.cxx|6 -
 cui/source/dialogs/SpellAttrib.hxx|   19 ++
 cui/source/dialogs/colorpicker.cxx|6 -
 cui/source/dialogs/cuicharmap.cxx |   35 ++-
 cui/source/dialogs/insdlg.cxx |   13 +---
 cui/source/dialogs/scriptdlg.cxx  |   10 +--
 cui/source/options/cfgchart.cxx   |   10 +--
 cui/source/options/optaboutconfig.cxx |   36 ---
 cui/source/options/optgdlg.cxx|   21 ++
 cui/source/options/optinet2.cxx   |3 
 cui/source/options/optupdt.cxx|3 
 cui/source/tabpages/numpages.cxx  |   10 +--
 cui/source/tabpages/tpcolor.cxx   |   16 ++---
 19 files changed, 150 insertions(+), 192 deletions(-)

New commits:
commit 4b2ad350213ececdbb1002b3ada87791dc126b20
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 08:12:46 2021 +0300
Commit: Mike Kaganski 
CommitDate: Fri Oct 29 13:15:25 2021 +0200

Prepare for removal of non-const operator[] from Sequence in cui

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

diff --git a/cui/source/customize/SvxConfigPageHelper.cxx 
b/cui/source/customize/SvxConfigPageHelper.cxx
index 39044173b8ed..52265ef093e6 100644
--- a/cui/source/customize/SvxConfigPageHelper.cxx
+++ b/cui/source/customize/SvxConfigPageHelper.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -361,29 +362,20 @@ bool SvxConfigPageHelper::GetToolbarItemData(
 css::uno::Sequence
 SvxConfigPageHelper::ConvertSvxConfigEntry(const SvxConfigEntry* pEntry)
 {
-css::uno::Sequence aPropSeq(4);
-
-aPropSeq[0].Name = ITEM_DESCRIPTOR_COMMANDURL;
-aPropSeq[0].Value <<= pEntry->GetCommand();
-
-aPropSeq[1].Name = ITEM_DESCRIPTOR_TYPE;
-aPropSeq[1].Value <<= css::ui::ItemType::DEFAULT;
-
 // If the name has not been changed, then the label can be stored
 // as an empty string.
 // It will be initialised again later using the command to label map.
-aPropSeq[2].Name = ITEM_DESCRIPTOR_LABEL;
-if (!pEntry->HasChangedName() && !pEntry->GetCommand().isEmpty())
-{
-aPropSeq[2].Value <<= OUString();
-}
-else
-{
-aPropSeq[2].Value <<= pEntry->GetName();
-}
-
-aPropSeq[3].Name = ITEM_DESCRIPTOR_STYLE;
-aPropSeq[3].Value <<= static_cast(pEntry->GetStyle());
+OUString sLabel;
+if (pEntry->HasChangedName() || pEntry->GetCommand().isEmpty())
+sLabel = pEntry->GetName();
+
+css::uno::Sequence aPropSeq{
+comphelper::makePropertyValue(ITEM_DESCRIPTOR_COMMANDURL, 
pEntry->GetCommand()),
+comphelper::makePropertyValue(ITEM_DESCRIPTOR_TYPE, 
css::ui::ItemType::DEFAULT),
+comphelper::makePropertyValue(ITEM_DESCRIPTOR_LABEL, sLabel),
+comphelper::makePropertyValue(ITEM_DESCRIPTOR_STYLE,
+  
static_cast(pEntry->GetStyle()))
+};
 
 return aPropSeq;
 }
@@ -391,32 +383,21 @@ SvxConfigPageHelper::ConvertSvxConfigEntry(const 
SvxConfigEntry* pEntry)
 css::uno::Sequence
 SvxConfigPageHelper::ConvertToolbarEntry(const SvxConfigEntry* pEntry)
 {
-css::uno::Sequence aPropSeq(5);
-
-aPropSeq[0].Name = ITEM_DESCRIPTOR_COMMANDURL;
-aPropSeq[0].Value <<= pEntry->GetCommand();
-
-aPropSeq[1].Name = ITEM_DESCRIPTOR_TYPE;
-aPropSeq[1].Value <<= css::ui::ItemType::DEFAULT;
-
 // If the name has not been changed, then the label can be stored
 // as an empty string.
 // It will be initialised again later using the command to label map.
-aPropSeq[2].Name = ITEM_DESCRIPTOR_LABEL;
-if (!pEntry->HasChangedName() && !pEntry->GetCommand().isEmpty())
-{
-aPropSeq[2].Value <<= OUString();
-}
-else
-{
-aPropSeq[2].Value <<= pEntry->GetName();
-}
-
-aPropSeq[3].Name = ITEM_DESCRIPTOR_ISVISIBLE;
-aPropSeq[3].Value <<= pEntry->IsVisible();
-
-aPropSeq[4].Name = ITEM_DESCRIPTOR_STYLE;
-aPropSeq[4].Value <<= static_cast(pEntry->GetStyle());
+OUString sLabel;
+if (pEntry->HasChangedName() || pEntry->GetCommand().isEmpty())
+sLabel = pEntry->GetName();
+
+css::uno::Sequence aPropSeq{
+comphelper::makePropertyValue(ITEM_DESCRIPTOR_COMMANDURL, 
pEntry->GetCommand()),
+comphelper::makePropertyValue(ITEM_DESCRIPTOR_TYPE, 
css::ui::ItemType::

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

2021-10-29 Thread Mike Kaganski (via logerrit)
 dbaccess/qa/extras/dialog-save.cxx   |3 
 dbaccess/qa/extras/empty-stdlib-save.cxx |3 
 dbaccess/qa/extras/nolib-save.cxx|3 
 dbaccess/source/core/api/FilteredContainer.cxx   |   15 +---
 dbaccess/source/core/api/KeySet.cxx  |3 
 dbaccess/source/core/dataaccess/ContentHelper.cxx|   25 +++
 dbaccess/source/core/dataaccess/ModelImpl.cxx|9 --
 dbaccess/source/core/dataaccess/connection.cxx   |5 -
 dbaccess/source/core/dataaccess/databasedocument.cxx |   23 ++
 dbaccess/source/core/dataaccess/datasource.cxx   |   34 +
 dbaccess/source/core/dataaccess/documentcontainer.cxx|7 --
 dbaccess/source/core/dataaccess/documentdefinition.cxx   |   16 ++--
 dbaccess/source/core/dataaccess/intercept.cxx|   25 +++
 dbaccess/source/core/misc/DatabaseDataProvider.cxx   |5 -
 dbaccess/source/filter/hsqldb/rowinputbinary.cxx |4 -
 dbaccess/source/filter/xml/xmlDataSourceSetting.cxx  |2 
 dbaccess/source/filter/xml/xmlExport.cxx |   15 ++--
 dbaccess/source/ui/app/AppController.cxx |   13 ++-
 dbaccess/source/ui/app/AppControllerGen.cxx  |7 +-
 dbaccess/source/ui/browser/formadapter.cxx   |3 
 dbaccess/source/ui/browser/sbagrid.cxx   |   16 +---
 dbaccess/source/ui/control/dbtreelistbox.cxx |9 +-
 dbaccess/source/ui/dlg/ConnectionHelper.cxx  |6 -
 dbaccess/source/ui/dlg/paramdialog.cxx   |2 
 dbaccess/source/ui/dlg/queryfilter.cxx   |   52 ---
 dbaccess/source/ui/dlg/tablespage.cxx|5 -
 dbaccess/source/ui/misc/TokenWriter.cxx  |3 
 dbaccess/source/ui/misc/WCopyTable.cxx   |9 +-
 dbaccess/source/ui/misc/databaseobjectview.cxx   |   19 +
 dbaccess/source/ui/misc/linkeddocuments.cxx  |   34 -
 dbaccess/source/ui/misc/singledoccontroller.cxx  |6 +
 dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx  |6 -
 dbaccess/source/ui/querydesign/TableFieldDescription.cxx |5 -
 dbaccess/source/ui/querydesign/TableWindowAccess.cxx |3 
 dbaccess/source/ui/querydesign/limitboxcontroller.cxx|6 -
 dbaccess/source/ui/querydesign/querycontroller.cxx   |8 +-
 dbaccess/source/ui/uno/textconnectionsettings_uno.cxx|   13 ++-
 37 files changed, 185 insertions(+), 237 deletions(-)

New commits:
commit 3412c0f091c54da74ea6964062b9be302e126fe9
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 08:14:44 2021 +0300
Commit: Mike Kaganski 
CommitDate: Fri Oct 29 13:22:00 2021 +0200

Prepare for removal of non-const operator[] from Sequence in dbaccess

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

diff --git a/dbaccess/qa/extras/dialog-save.cxx 
b/dbaccess/qa/extras/dialog-save.cxx
index 1eb4720cbcd1..ff4f612dc869 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -92,8 +92,7 @@ void DialogSaveTest::test()
 // All our uno::References are (should?) be invalid now -> let them go 
out of scope
 }
 {
-uno::Sequence args(1);
-args[0] <<= aFileName;
+uno::Sequence args{ uno::Any(aFileName) };
 Reference 
xHNA(getMultiServiceFactory()->createInstanceWithArguments("com.sun.star.packages.Package",
 args), UNO_QUERY_THROW);
 Reference< beans::XPropertySet > 
xPS(xHNA->getByHierarchicalName("Dialogs/Standard/Dialog1.xml"), 
UNO_QUERY_THROW);
 sal_Int64 nSize = 0;
diff --git a/dbaccess/qa/extras/empty-stdlib-save.cxx 
b/dbaccess/qa/extras/empty-stdlib-save.cxx
index 9339d3c4307e..2ffbccaa6131 100644
--- a/dbaccess/qa/extras/empty-stdlib-save.cxx
+++ b/dbaccess/qa/extras/empty-stdlib-save.cxx
@@ -106,8 +106,7 @@ void DialogSaveTest::test()
 // All our uno::References are (should?) be invalid now -> let them go 
out of scope
 }
 {
-uno::Sequence args(1);
-args[0] <<= aFileName;
+uno::Sequence args{ uno::Any(aFileName) };
 Reference 
xHNA(getMultiServiceFactory()->createInstanceWithArguments("com.sun.star.packages.Package",
 args), UNO_QUERY_THROW);
 CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Basic/Standard"));
 CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Dialogs/Standard"));
diff --git a/dbaccess/qa/extras/nolib-save.cxx 
b/dbaccess/qa/extras/nolib-save.cxx
index f441b608b31e..f64e0fbece10 100644
--- a/dbaccess/qa/extras/nolib-save.cxx
+++ b/dbaccess/qa/extras/nolib-save.cxx
@@ -96,8 +96,7 @@ void DialogSaveTest::test()
 // All our uno::References are (should?) be invalid now -> let them go 
out of scope
 }
 {
-uno::Sequenc

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

2021-10-29 Thread Bjoern Michaelsen (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx  |   18 +-
 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx |   10 -
 sw/qa/extras/uiwriter/uiwriter3.cxx   |3 
 sw/source/core/frmedt/fecopy.cxx  |  254 +++---
 sw/source/core/layout/flycnt.cxx  |3 
 5 files changed, 145 insertions(+), 143 deletions(-)

New commits:
commit 3cfd63cb55ab1a7e6df53eaeb2a7623be05983d0
Author: Bjoern Michaelsen 
AuthorDate: Mon Oct 25 20:50:26 2021 +0200
Commit: Bjoern Michaelsen 
CommitDate: Fri Oct 29 13:24:01 2021 +0200

tdf#140798, tdf#143815, tdf#141659: fix fly content hint handling

Also revert most of the test changes in
188ec34cf157ffee8c63f03f420ca9daafb5ff29, except in mailmerge, where
3bc8f90e9693f710f12632f69b9348c1c833c906 seems to have done some
research and the old state wasnt particulary well-justified.

In testSmartArtAnchoredInline the order of elements has changed.

This exposes a bug in SwFEShell::Paste, which stops copying
SpzFrameFormats (aka FlyFrameFormats and DrawFrameFormats) after having
copied the first FlyFrameFormat, claiming other Flys will have been
copied via FlyInFly. If there are DrawFrameFormats behind the
FlyFrameFormats, they will be forgotten.

So instead:
- first copy the DrawFrameFormats
- then copy the first FlyFrameFormat

to not forget any Draw Formats. Also, give the format copying its own
function, at 100 lines its annoying enough all by itself.

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index fcc5d6aebd4d..ce5092e01585 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -481,31 +481,31 @@ CPPUNIT_TEST_FIXTURE(Test, testMsoPosition)
 // We write the frames out in different order than they were read, so 
check it's the correct
 // textbox first by checking width. These tests may need reordering if 
that gets fixed.
 OUString style1 = getXPath(doc, 
"/w:ftr/w:p/w:r[3]/mc:AlternateContent/mc:Fallback/w:pict/v:rect", "style");
-CPPUNIT_ASSERT( style1.indexOf( ";width:36pt;" ) >= 0 );
-CPPUNIT_ASSERT( style1.indexOf( 
";mso-position-horizontal-relative:text" ) >= 0 );
-CPPUNIT_ASSERT( style1.indexOf( ";mso-position-vertical-relative:text" 
) >= 0 );
+CPPUNIT_ASSERT( style1.indexOf( ";width:531pt;" ) >= 0 );
+CPPUNIT_ASSERT( style1.indexOf( ";mso-position-vertical-relative:page" 
) >= 0 );
+CPPUNIT_ASSERT( style1.indexOf( 
";mso-position-horizontal-relative:page" ) >= 0 );
 OUString style2 = getXPath(doc, 
"/w:ftr/w:p/w:r[4]/mc:AlternateContent/mc:Fallback/w:pict/v:rect", "style");
 CPPUNIT_ASSERT( style2.indexOf( ";width:549pt;" ) >= 0 );
 CPPUNIT_ASSERT( style2.indexOf( ";mso-position-vertical-relative:text" 
) >= 0 );
 CPPUNIT_ASSERT( style2.indexOf( ";mso-position-horizontal:center" ) >= 
0 );
 CPPUNIT_ASSERT( style2.indexOf( 
";mso-position-horizontal-relative:text" ) >= 0 );
 OUString style3 = getXPath(doc, 
"/w:ftr/w:p/w:r[5]/mc:AlternateContent/mc:Fallback/w:pict/v:rect", "style");
-CPPUNIT_ASSERT( style3.indexOf( ";width:531pt;" ) >= 0 );
-CPPUNIT_ASSERT( style3.indexOf( ";mso-position-vertical-relative:page" 
) >= 0 );
-CPPUNIT_ASSERT( style3.indexOf( 
";mso-position-horizontal-relative:page" ) >= 0 );
+CPPUNIT_ASSERT( style3.indexOf( ";width:36pt;" ) >= 0 );
+CPPUNIT_ASSERT( style3.indexOf( 
";mso-position-horizontal-relative:text" ) >= 0 );
+CPPUNIT_ASSERT( style3.indexOf( ";mso-position-vertical-relative:text" 
) >= 0 );
 }
 
 xmlDocUniquePtr doc = parseExport("word/header1.xml");
 OUString style1 = getXPath(doc, 
"/w:hdr/w:p/w:r[2]/mc:AlternateContent/mc:Fallback/w:pict/v:rect", "style");
-CPPUNIT_ASSERT( style1.indexOf( ";width:138.15pt;" ) >= 0 );
+CPPUNIT_ASSERT( style1.indexOf( ";width:335.75pt;" ) >= 0 );
 CPPUNIT_ASSERT( style1.indexOf( ";mso-position-horizontal-relative:page" ) 
>= 0 );
 CPPUNIT_ASSERT( style1.indexOf( ";mso-position-vertical-relative:page" ) 
>= 0 );
 OUString style2 = getXPath(doc, 
"/w:hdr/w:p/w:r[3]/mc:AlternateContent/mc:Fallback/w:pict/v:rect", "style");
-CPPUNIT_ASSERT( style2.indexOf( ";width:163.8pt;" ) >= 0 );
+CPPUNIT_ASSERT( style2.indexOf( ";width:138.15pt;" ) >= 0 );
 CPPUNIT_ASSERT( style2.indexOf( ";mso-position-horizontal-relative:page" ) 
>= 0 );
 CPPUNIT_ASSERT( style2.indexOf( ";mso-position-vertical-relative:page" ) 
>= 0 );
 OUString style3 = getXPath(doc, 
"/w:hdr/w:p/w:r[4]/mc:AlternateContent/mc:Fallback/w:pict/v:rect", "style");
-CPPUNIT_ASSERT( style3.indexOf( ";width:335.75pt;" ) >= 0 );
+

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

2021-10-29 Thread Stephan Bergmann (via logerrit)
 vcl/win/dtrans/ImplHelper.cxx |   16 +++
 vcl/win/window/salframe.cxx   |   44 +-
 2 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 166399c5017c05406ecae4132e817f2b206170d8
Author: Stephan Bergmann 
AuthorDate: Fri Oct 29 09:20:10 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 29 13:25:25 2021 +0200

loplugin:indentation (clang-cl)

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

diff --git a/vcl/win/dtrans/ImplHelper.cxx b/vcl/win/dtrans/ImplHelper.cxx
index 227876b19cb8..84c7383b2ce7 100644
--- a/vcl/win/dtrans/ImplHelper.cxx
+++ b/vcl/win/dtrans/ImplHelper.cxx
@@ -241,17 +241,17 @@ bool CopyFormatEtc( LPFORMATETC petcDest, LPFORMATETC 
petcSrc )
 if ( petcDest != petcSrc )
 {
 
-petcDest->cfFormat = petcSrc->cfFormat;
+petcDest->cfFormat = petcSrc->cfFormat;
 
-petcDest->ptd  = nullptr;
-if ( nullptr != petcSrc->ptd )
-petcDest->ptd  = CopyTargetDevice(petcSrc->ptd);
+petcDest->ptd  = nullptr;
+if ( nullptr != petcSrc->ptd )
+petcDest->ptd  = CopyTargetDevice(petcSrc->ptd);
 
-petcDest->dwAspect = petcSrc->dwAspect;
-petcDest->lindex   = petcSrc->lindex;
-petcDest->tymed= petcSrc->tymed;
+petcDest->dwAspect = petcSrc->dwAspect;
+petcDest->lindex   = petcSrc->lindex;
+petcDest->tymed= petcSrc->tymed;
 
-bRet = true;
+bRet = true;
 }
 }
 __except( EXCEPTION_EXECUTE_HANDLER )
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 8d3f52d9c354..6593b2fbebb6 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -5328,41 +5328,41 @@ static LRESULT ImplHandleIMEReconvertString( HWND hWnd, 
LPARAM lParam )
 UINT nImeProps = ImmGetProperty( GetKeyboardLayout( 0 ), IGP_SETCOMPSTR );
 if( (nImeProps & SCS_CAP_SETRECONVERTSTRING) == 0 )
 {
-// This IME does not support reconversion.
-return 0;
+// This IME does not support reconversion.
+return 0;
 }
 
 if( !pReconvertString )
 {
-// The first call for reconversion.
-pFrame->CallCallback( SalEvent::StartReconversion, nullptr );
+// The first call for reconversion.
+pFrame->CallCallback( SalEvent::StartReconversion, nullptr );
 
-// Retrieve the surrounding text from the focused control.
-pFrame->CallCallback( SalEvent::SurroundingTextRequest, &aEvt );
+// Retrieve the surrounding text from the focused control.
+pFrame->CallCallback( SalEvent::SurroundingTextRequest, &aEvt );
 
-if( aEvt.maText.isEmpty())
-{
-return 0;
-}
+if( aEvt.maText.isEmpty())
+{
+return 0;
+}
 
-nRet = sizeof(RECONVERTSTRING) + (aEvt.maText.getLength() + 1) * 
sizeof(WCHAR);
+nRet = sizeof(RECONVERTSTRING) + (aEvt.maText.getLength() + 1) * 
sizeof(WCHAR);
 }
 else
 {
-// The second call for reconversion.
+// The second call for reconversion.
 
-// Retrieve the surrounding text from the focused control.
-pFrame->CallCallback( SalEvent::SurroundingTextRequest, &aEvt );
-nRet = sizeof(RECONVERTSTRING) + (aEvt.maText.getLength() + 1) * 
sizeof(WCHAR);
+// Retrieve the surrounding text from the focused control.
+pFrame->CallCallback( SalEvent::SurroundingTextRequest, &aEvt );
+nRet = sizeof(RECONVERTSTRING) + (aEvt.maText.getLength() + 1) * 
sizeof(WCHAR);
 
-pReconvertString->dwStrOffset = sizeof(RECONVERTSTRING);
-pReconvertString->dwStrLen = aEvt.maText.getLength();
-pReconvertString->dwCompStrOffset = aEvt.mnStart * sizeof(WCHAR);
-pReconvertString->dwCompStrLen = aEvt.mnEnd - aEvt.mnStart;
-pReconvertString->dwTargetStrOffset = pReconvertString->dwCompStrOffset;
-pReconvertString->dwTargetStrLen = pReconvertString->dwCompStrLen;
+pReconvertString->dwStrOffset = sizeof(RECONVERTSTRING);
+pReconvertString->dwStrLen = aEvt.maText.getLength();
+pReconvertString->dwCompStrOffset = aEvt.mnStart * sizeof(WCHAR);
+pReconvertString->dwCompStrLen = aEvt.mnEnd - aEvt.mnStart;
+pReconvertString->dwTargetStrOffset = 
pReconvertString->dwCompStrOffset;
+pReconvertString->dwTargetStrLen = pReconvertString->dwCompStrLen;
 
-memcpy( pReconvertString + 1, aEvt.maText.getStr(), 
(aEvt.maText.getLength() + 1) * sizeof(WCHAR) );
+memcpy( pReconvertString + 1, aEvt.maText.getStr(), 
(aEvt.maText.getLength() + 1) * sizeof(WCHAR) );
 }
 
 // just return the required size of buffer to reconvert.


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

2021-10-29 Thread Stephan Bergmann (via logerrit)
 external/nss/clang-cl.patch.0 |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 2f39a7b8f90a65d0be9894a0edcf01c161289459
Author: Stephan Bergmann 
AuthorDate: Fri Oct 29 09:21:51 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 29 13:25:53 2021 +0200

external/nss: More -Werror,-Wunknown-pragmas with clang-cl

> In file included from 
C:/lo-clang/core/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx:28:
> In file included from 
C:/lo-clang/core/workdir/UnpackedTarball/nss/dist/public/nss\pk11pub.h:12:
> In file included from 
C:/lo-clang/core/workdir/UnpackedTarball/nss/dist/public/nss/pk11hpke.h:8:
> 
C:/lo-clang/core/workdir/UnpackedTarball/nss/dist/public/nss/blapit.h(66,9): 
error: unknown pragma ignored [-Werror,-Wunknown-pragmas]
> #pragma deprecated(DSA_SUBPRIME_LEN, DSA_SIGNATURE_LEN, DSA_QBITS)
> ^

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

diff --git a/external/nss/clang-cl.patch.0 b/external/nss/clang-cl.patch.0
index 1d615c2397d8..b02fff60e36b 100644
--- a/external/nss/clang-cl.patch.0
+++ b/external/nss/clang-cl.patch.0
@@ -61,6 +61,17 @@
  #pragma deprecated(CERTDB_VALID_PEER)
  #endif
  #define CERTDB_VALID_PEER CERTDB_TERMINAL_RECORD
+--- nss/lib/freebl/blapit.h
 nss/lib/freebl/blapit.h
+@@ -53,7 +53,7 @@
+  * Mark the old defines as deprecated. This will warn code that expected
+  * DSA1 only that they need to change if the are to support DSA2.
+  */
+-#if defined(__GNUC__) && (__GNUC__ > 3)
++#if defined(__GNUC__) && (__GNUC__ > 3) || defined __clang__
+ /* make GCC warn when we use these #defines */
+ typedef int __BLAPI_DEPRECATED __attribute__((deprecated));
+ #define DSA_SUBPRIME_LEN ((__BLAPI_DEPRECATED)DSA1_SUBPRIME_LEN)
 --- nss/lib/util/pkcs11n.h
 +++ nss/lib/util/pkcs11n.h
 @@ -426,7 +426,7 @@


[Libreoffice-commits] core.git: embedserv/source setup_native/source svl/source winaccessibility/source

2021-10-29 Thread Stephan Bergmann (via logerrit)
 embedserv/source/embed/ed_idataobj.cxx  |2 +-
 embedserv/source/embed/ed_ipersiststr.cxx   |2 +-
 setup_native/source/win32/customactions/sellang/sellang.cxx |4 ++--
 svl/source/crypto/cryptosign.cxx|6 +++---
 winaccessibility/source/UAccCOM/AccAction.h |2 +-
 winaccessibility/source/UAccCOM/AccComponent.h  |2 +-
 winaccessibility/source/UAccCOM/AccEditableText.h   |2 +-
 winaccessibility/source/UAccCOM/AccHypertext.h  |2 +-
 winaccessibility/source/UAccCOM/AccImage.h  |2 +-
 winaccessibility/source/UAccCOM/AccTable.h  |2 +-
 winaccessibility/source/UAccCOM/AccTableCell.h  |2 +-
 winaccessibility/source/UAccCOM/AccText.h   |2 +-
 winaccessibility/source/UAccCOM/AccValue.h  |2 +-
 winaccessibility/source/UAccCOM/MAccessible.cxx |2 +-
 winaccessibility/source/UAccCOM/MAccessible.h   |2 +-
 winaccessibility/source/service/AccObject.cxx   |2 +-
 winaccessibility/source/service/AccObjectManagerAgent.cxx   |2 +-
 17 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit a5cea74034a8e029bfdf0f2b82ea8800bf5bd206
Author: Stephan Bergmann 
AuthorDate: Fri Oct 29 09:26:28 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 29 13:26:12 2021 +0200

Fix misuses of NULL across Windows-only code

...which defines NULL as a plain 0 integer literal instead of the GNU __null
extension, so clang-cl's -Wnull-conversion cannot kick in.  These findings 
are
from an experimental build done with clang-cl and a modified

> --- a/clang/lib/Headers/stddef.h
> +++ b/clang/lib/Headers/stddef.h
> @@ -83,6 +83,10 @@ typedef __WCHAR_TYPE__ wchar_t;
>  #  if !defined(__MINGW32__) && !defined(_MSC_VER)
>  #define NULL __null
>  #  else
> -#define NULL 0
> +#if __cplusplus >= 201103L
> +#  define NULL nullptr
> +#else
> +#  define NULL 0
> +#endif
>  #  endif
>  #else
>  #  define NULL ((void*)0)

However, that build also ran into lots of places where 3rd-party code in
external/ and Windows system headers caused issues when NULL is nullptr 
(which
I worked around with various hacky patches for that build), so this is
unfortunately not something that can easily be enabled generally.

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

diff --git a/embedserv/source/embed/ed_idataobj.cxx 
b/embedserv/source/embed/ed_idataobj.cxx
index ca482a421939..84886e63cb4a 100644
--- a/embedserv/source/embed/ed_idataobj.cxx
+++ b/embedserv/source/embed/ed_idataobj.cxx
@@ -34,7 +34,7 @@ using namespace ::com::sun::star;
 
 sal_uInt64 EmbedDocument_Impl::getMetaFileHandle_Impl( bool isEnhMeta )
 {
-sal_uInt64 pResult = NULL;
+sal_uInt64 pResult = 0;
 
 uno::Reference< datatransfer::XTransferable > xTransferable( 
m_pDocHolder->GetDocument(), uno::UNO_QUERY );
 if ( xTransferable.is() )
diff --git a/embedserv/source/embed/ed_ipersiststr.cxx 
b/embedserv/source/embed/ed_ipersiststr.cxx
index df5f412593a4..c23141636de0 100644
--- a/embedserv/source/embed/ed_ipersiststr.cxx
+++ b/embedserv/source/embed/ed_ipersiststr.cxx
@@ -585,7 +585,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::Save( 
IStorage *pStgSave,
 if ( !fSameAsLoad && pStgSave != m_pMasterStorage )
 {
 OSL_ENSURE( m_pMasterStorage, "How could the document be initialized 
without storage!??" );
-HRESULT hr = m_pMasterStorage->CopyTo( NULL, nullptr, nullptr, 
pStgSave );
+HRESULT hr = m_pMasterStorage->CopyTo( 0, nullptr, nullptr, pStgSave );
 if ( FAILED( hr ) ) return E_FAIL;
 
 STATSTG aStat;
diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx 
b/setup_native/source/win32/customactions/sellang/sellang.cxx
index 35022ac7dd50..594bd70bc77c 100644
--- a/setup_native/source/win32/customactions/sellang/sellang.cxx
+++ b/setup_native/source/win32/customactions/sellang/sellang.cxx
@@ -251,7 +251,7 @@ extern "C" __declspec(dllexport) UINT __stdcall 
SelectLanguage( MSIHANDLE handle
 return ERROR_SUCCESS;
 }
 
-if (MsiViewExecute(view, NULL) != ERROR_SUCCESS) {
+if (MsiViewExecute(view, 0) != ERROR_SUCCESS) {
 MsiCloseHandle(view);
 MsiCloseHandle(database);
 return ERROR_SUCCESS;
@@ -287,7 +287,7 @@ extern "C" __declspec(dllexport) UINT __stdcall 
SelectLanguage( MSIHANDLE handle
 &view)
 == ERROR_SUCCESS)
 {
-if (MsiViewExecute(view, NULL) == ERROR_SUCCESS) {
+if (MsiViewExecute(view, 0) == ERROR_SUCCESS) {
 while (ndicts < MAX_LANGUAGES &&
  

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

2021-10-29 Thread Stephan Bergmann (via logerrit)
 include/sfx2/strings.hrc   |1 
 sfx2/source/appl/openuriexternally.cxx |   73 +++--
 2 files changed, 44 insertions(+), 30 deletions(-)

New commits:
commit 70009098fd70df021048c540d1796c928554b494
Author: Stephan Bergmann 
AuthorDate: Fri Oct 29 11:17:09 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 29 13:26:36 2021 +0200

tdf#128969: Let the user explicitly decide to execute an external program

...bringing up a warning dialog now in cases where it would have before only
brought up a failure message

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

diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index 4b95c8505d87..82bd1c2168a1 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -103,6 +103,7 @@
 #define STR_GB  NC_("STR_GB", "GB")
 #define STR_QUERY_LASTVERSION   NC_("STR_QUERY_LASTVERSION", 
"Cancel all changes?")
 #define STR_NO_WEBBROWSER_FOUND NC_("STR_NO_WEBBROWSER_FOUND", 
"Opening \"$(ARG1)\" failed with error code $(ARG2) and message: 
\"$(ARG3)\"\nMaybe no web browser could be found on your system. In that case, 
please check your Desktop Preferences or install a web browser (for example, 
Firefox) in the default location requested during the browser installation.")
+#define STR_DANGEROUS_TO_OPEN   NC_("STR_DANGEROUS_TO_OPEN", 
"It might be dangerous to open \"$(ARG1)\".\nDo you really want to open it?")
 #define STR_NO_ABS_URI_REF  NC_("STR_NO_ABS_URI_REF", 
"\"$(ARG1)\" cannot be passed to an external application to open it (e.g., it 
might not be an absolute URL, or might denote no existing file).")
 #define STR_GID_INTERN  NC_("STR_GID_INTERN", 
"Internal")
 #define STR_GID_APPLICATION NC_("STR_GID_APPLICATION", 
"Application")
diff --git a/sfx2/source/appl/openuriexternally.cxx 
b/sfx2/source/appl/openuriexternally.cxx
index d149f63d257d..0425da7208be 100644
--- a/sfx2/source/appl/openuriexternally.cxx
+++ b/sfx2/source/appl/openuriexternally.cxx
@@ -80,37 +80,50 @@ IMPL_LINK_NOARG(URITools, onOpenURI, Timer*, void)
 std::unique_ptr guard(this);
 css::uno::Reference< css::system::XSystemShellExecute > exec(
 
css::system::SystemShellExecute::create(comphelper::getProcessComponentContext()));
-try {
-exec->execute(
-msURI, OUString(),
-css::system::SystemShellExecuteFlags::URIS_ONLY);
-} catch (css::lang::IllegalArgumentException & e) {
-if (e.ArgumentPosition != 0) {
-throw css::uno::RuntimeException(
-"unexpected IllegalArgumentException: " + e.Message);
+for (sal_Int32 flags = css::system::SystemShellExecuteFlags::URIS_ONLY;;) {
+try {
+exec->execute(msURI, OUString(), flags);
+} catch (css::lang::IllegalArgumentException & e) {
+if (e.ArgumentPosition != 0) {
+throw css::uno::RuntimeException(
+"unexpected IllegalArgumentException: " + e.Message);
+}
+SolarMutexGuard g;
+weld::Window *pWindow = SfxGetpApp()->GetTopWindow();
+if (flags == css::system::SystemShellExecuteFlags::URIS_ONLY) {
+std::unique_ptr eb(
+Application::CreateMessageDialog(
+pWindow, VclMessageType::Warning, 
VclButtonsType::OkCancel,
+SfxResId(STR_DANGEROUS_TO_OPEN)));
+
eb->set_primary_text(eb->get_primary_text().replaceFirst("$(ARG1)", msURI));
+if (eb->run() == RET_OK) {
+flags = 0;
+continue;
+}
+} else {
+std::unique_ptr 
eb(Application::CreateMessageDialog(pWindow,
+ 
VclMessageType::Warning, VclButtonsType::Ok,
+ 
SfxResId(STR_NO_ABS_URI_REF)));
+
eb->set_primary_text(eb->get_primary_text().replaceFirst("$(ARG1)", msURI));
+eb->run();
+}
+} catch (css::system::SystemShellExecuteException & e) {
+if (!mbHandleSystemShellExecuteException) {
+throw;
+}
+SolarMutexGuard g;
+weld::Window *pWindow = SfxGetpApp()->GetTopWindow();
+std::unique_ptr 
eb(Application::CreateMessageDialog(pWindow,
+ 
VclMessageType::Warning, VclButtonsType::Ok,
+ 
SfxResId(STR_NO_WEBBROWSER_FOUND)));
+eb->set_primary_text(
+   

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

2021-10-29 Thread Noel Grandin (via logerrit)
 dbaccess/source/core/dataaccess/databasedocument.cxx |9 +
 dbaccess/source/core/dataaccess/databasedocument.hxx |7 +--
 2 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 31315fea28ad327f36c0e593156bf808c7af3467
Author: Noel Grandin 
AuthorDate: Fri Oct 29 11:35:14 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 29 13:41:39 2021 +0200

tdf#143392 fix title on Base window

regression from
commit 857caa5fc69b92e781457a1b67a89aa051c2d70f
tdf#79049 speed up OOXML workbook load

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

diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 45867c0e3bac..fa8e755b799b 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -796,6 +796,15 @@ Sequence< PropertyValue > SAL_CALL 
ODatabaseDocument::getArgs(  )
 return m_pImpl->getMediaDescriptor().getPropertyValues();
 }
 
+Sequence< PropertyValue > SAL_CALL ODatabaseDocument::getArgs2( const 
::css::uno::Sequence< ::rtl::OUString >& requestedArgs )
+{
+DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
+std::vector aRet;
+for (const auto & rArgName : requestedArgs)
+aRet.push_back(PropertyValue(rArgName, 0, 
m_pImpl->getMediaDescriptor().get(rArgName), PropertyState_DIRECT_VALUE));
+return comphelper::containerToSequence(aRet);
+}
+
 void SAL_CALL ODatabaseDocument::setArgs(const Sequence& 
/* aArgs */)
 {
 throw NoSupportException();
diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx 
b/dbaccess/source/core/dataaccess/databasedocument.hxx
index b1bfbedc61b2..b20a2f3ed1d8 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.hxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.hxx
@@ -28,7 +28,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -130,7 +130,7 @@ private:
 };
 
 // ODatabaseDocument
-typedef cppu::PartialWeakComponentImplHelper<   css::frame::XModel2
+typedef cppu::PartialWeakComponentImplHelper<   css::frame::XModel3
 ,   css::util::XModifiable
 ,   css::frame::XStorable
 ,   
css::document::XEventBroadcaster
@@ -330,6 +330,9 @@ public:
 virtual css::uno::Reference< css::frame::XController2 > SAL_CALL 
createViewController( const OUString& ViewName, const css::uno::Sequence< 
css::beans::PropertyValue >& Arguments, const css::uno::Reference< 
css::frame::XFrame >& Frame ) override ;
 virtual void SAL_CALL setArgs(const 
css::uno::Sequence& aArgs) override;
 
+// XModel3
+virtual ::css::uno::Sequence< ::css::beans::PropertyValue > SAL_CALL 
getArgs2( const ::css::uno::Sequence< ::rtl::OUString >& requestedArgs ) 
override;
+
 // XStorable
 virtual sal_Bool SAL_CALL hasLocation(  ) override ;
 virtual OUString SAL_CALL getLocation(  ) override ;


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

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

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

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

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

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

valve products.

2021-10-29 Thread yihuajjjc
 
 
Hello! Dear wholesaler 
friend, I am the business director of Foshan Yihua Home Building Materials Co., 
Ltd.
 
The company's main valve 
products: gate valves, butterfly valves, check valves, ball valves, globe 
valves, pressure reducing valves, regulating valves, hydraulic control valves, 
pneumatic valves, PPR valves and other products.
 
Products are widely used 
in electric power, petrochemical, petroleum, metallurgy, gas, municipal, 
construction, water supply and drainage industries. Can be customized according 
to customer requirements. Products include bronze, brass, cast iron, ductile 
iron and so on.
 
Products are exported to 
Southeast Asia, Middle East, Europe, North America, Africa and other countries 
and regions. We sincerely welcome overseas new and old customers to cooperate 
with each other, and we look forward to serving you sincerely! Looking forward 
to your email. thank you
 
Business Representative: 
Mr. Zhang.
 
Tel: 
17819865598.

[Libreoffice-commits] core.git: vcl/inc vcl/osx

2021-10-29 Thread Tor Lillqvist (via logerrit)
 vcl/inc/osx/salinst.h|2 
 vcl/osx/DropTarget.cxx   |7 --
 vcl/osx/a11ytextattributeswrapper.mm |   24 
 vcl/osx/salframe.cxx |   97 +++
 vcl/osx/salinst.cxx  |   40 +++---
 vcl/osx/salmenu.cxx  |   24 ++--
 vcl/osx/salnsmenu.mm |   18 +-
 vcl/osx/saltimer.cxx |5 -
 vcl/osx/vclnsapp.mm  |   31 +++
 9 files changed, 87 insertions(+), 161 deletions(-)

New commits:
commit 34327fdbc4b1d9070ff39d0a2caddad983b48385
Author: Tor Lillqvist 
AuthorDate: Thu Oct 28 13:43:39 2021 +0300
Commit: Tor Lillqvist 
CommitDate: Fri Oct 29 14:08:36 2021 +0200

Use non-deprecated names for bits and constants

Change-Id: I9004aaef7b2d526ad99b316b78733671a785c847
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124328
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 

diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index c94d5871a1df..3be765057ca9 100644
--- a/vcl/inc/osx/salinst.h
+++ b/vcl/inc/osx/salinst.h
@@ -145,7 +145,7 @@ public:
 void startedPrintJob() { mnActivePrintJobs++; }
 void endedPrintJob() { mnActivePrintJobs--; }
 
-// event subtypes for NSApplicationDefined events
+// event subtypes for NSEventTypeApplicationDefined events
 static const short AppExecuteSVMain   = 1;
 static const short AppStartTimerEvent = 10;
 static const short YieldWakeupEvent   = 20;
diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx
index 26398cb903a3..56407a40abe9 100644
--- a/vcl/osx/DropTarget.cxx
+++ b/vcl/osx/DropTarget.cxx
@@ -370,12 +370,7 @@ void SAL_CALL DropTarget::initialize(const Sequence< Any 
>& aArguments)
 
 id wnd = [mView window];
 NSWindow* parentWnd = [wnd parentWindow];
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-// 'NSClosableWindowMask' is deprecated: first deprecated in macOS 
10.12
-// 'NSResizableWindowMask' is deprecated: first deprecated in macOS 
10.12
-// 'NSTitleWindowMask' is deprecated: first deprecated in macOS 10.12
-unsigned int topWndStyle = (NSTitledWindowMask | NSClosableWindowMask | 
NSResizableWindowMask);
-SAL_WNODEPRECATED_DECLARATIONS_POP
+unsigned int topWndStyle = (NSWindowStyleMaskTitled | 
NSWindowStyleMaskClosable | NSWindowStyleMaskResizable);
 unsigned int wndStyles = [wnd styleMask] & topWndStyle;
 
 if (parentWnd == nil && (wndStyles == topWndStyle))
diff --git a/vcl/osx/a11ytextattributeswrapper.mm 
b/vcl/osx/a11ytextattributeswrapper.mm
index a1a6d0350e4b..84a9b27e54cc 100644
--- a/vcl/osx/a11ytextattributeswrapper.mm
+++ b/vcl/osx/a11ytextattributeswrapper.mm
@@ -247,19 +247,21 @@ using namespace ::com::sun::star::uno;
 sal_Int32 alignment;
 property.Value >>= alignment;
 NSNumber *textAlignment = nil;
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-// 'NSCenterTextAlignment' is deprecated: first deprecated in macOS 10.12
-// 'NSJustifiedTextAlignment' is deprecated: first deprecated in macOS 
10.12
-// 'NSLeftTextAlignment' is deprecated: first deprecated in macOS 10.12
-// 'NSRightTextAlignment' is deprecated: first deprecated in macOS 10.12
 switch(static_cast(alignment)) {
-case css::style::ParagraphAdjust_RIGHT : textAlignment = 
[NSNumber numberWithInteger:NSRightTextAlignment]; break;
-case css::style::ParagraphAdjust_CENTER: textAlignment = 
[NSNumber numberWithInteger:NSCenterTextAlignment]   ; break;
-case css::style::ParagraphAdjust_BLOCK : textAlignment = 
[NSNumber numberWithInteger:NSJustifiedTextAlignment]; break;
-case css::style::ParagraphAdjust_LEFT  :
-default : 
textAlignment = [NSNumber numberWithInteger:NSLeftTextAlignment] ; break;
+case css::style::ParagraphAdjust_RIGHT:
+textAlignment = [NSNumber 
numberWithInteger:NSTextAlignmentRight];
+break;
+case css::style::ParagraphAdjust_CENTER:
+textAlignment = [NSNumber 
numberWithInteger:NSTextAlignmentCenter];
+break;
+case css::style::ParagraphAdjust_BLOCK:
+textAlignment = [NSNumber 
numberWithInteger:NSTextAlignmentJustified];
+break;
+case css::style::ParagraphAdjust_LEFT:
+default:
+textAlignment = [NSNumber 
numberWithInteger:NSTextAlignmentLeft];
+break;
 }
-SAL_WNODEPRECATED_DECLARATIONS_POP
 NSDictionary *paragraphStyle = [NSDictionary 
dictionaryWithObjectsAndKeys:textAlignment, @"AXTextAlignment", textAlignment, 
@"AXVisualTextAlignment", nil]

[Libreoffice-commits] core.git: instsetoo_native/CustomTarget_setup.mk

2021-10-29 Thread Tor Lillqvist (via logerrit)
 instsetoo_native/CustomTarget_setup.mk |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 2e2931ba2d5cb85d93391e68296f0b29807a0fc6
Author: Tor Lillqvist 
AuthorDate: Fri Oct 29 12:19:35 2021 +0300
Commit: Tor Lillqvist 
CommitDate: Fri Oct 29 14:09:14 2021 +0200

Split overly long line into multiple logically separate pieces for sanity

Change-Id: Ic23bfba8ff9f403e49bda89e4fffe73cf11fdd70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124424
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/instsetoo_native/CustomTarget_setup.mk 
b/instsetoo_native/CustomTarget_setup.mk
index 137489aee223..ed27e27f8278 100644
--- a/instsetoo_native/CustomTarget_setup.mk
+++ b/instsetoo_native/CustomTarget_setup.mk
@@ -55,7 +55,15 @@ $(call 
gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
&& echo 'BRAND_INI_DIR=$${ORIGIN}' \
&& echo 'BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)' \
&& echo 
'BRAND_SHARE_RESOURCE_SUBDIR=$(LIBO_SHARE_RESOURCE_FOLDER)' \
-   && echo 
'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry 
res:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry $(if 
$(ENABLE_DCONF),dconf:* )$(if $(filter WNT,$(OS)),winreg:LOCAL_MACHINE 
)bundledext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,louno):BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini
 sharedext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,louno):SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini
 userext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,louno):UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini
 $(if $(filter WNT,$(OS)),winreg:CURRENT_USER 
)user:!$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/registrymodifications.xcu'
 \
+   && echo 
'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry' \
+'res:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry' \
+$(if $(ENABLE_DCONF),'dconf:* ') \
+$(if $(filter WNT,$(OS)),'winreg:LOCAL_MACHINE ') \
+'bundledext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,louno):BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini'
 \
+'sharedext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,louno):SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini'
 \
+'userext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,louno):UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini'
 \
+$(if $(filter WNT,$(OS)),'winreg:CURRENT_USER ') \
+'user:!$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/registrymodifications.xcu'
 \
&& echo 
'LO_JAVA_DIR=$${BRAND_BASE_DIR}/$(LIBO_SHARE_JAVA_FOLDER)' \
&& echo 'LO_LIB_DIR=$${BRAND_BASE_DIR}/$(LIBO_LIB_FOLDER)' \
&& echo 'BAK_EXTENSIONS=$${$$ORIGIN/$(call 
gb_Helper_get_rcfile,louno):TMP_EXTENSIONS}' \


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

2021-10-29 Thread Noel Grandin (via logerrit)
 dbaccess/source/core/dataaccess/databasedocument.cxx |5 ---
 dbaccess/source/ui/browser/genericcontroller.cxx |6 ---
 framework/source/fwe/helper/titlehelper.cxx  |   26 +---
 framework/source/services/frame.cxx  |4 --
 include/framework/titlehelper.hxx|   30 ---
 reportdesign/source/core/api/ReportDefinition.cxx|6 +--
 sfx2/source/doc/sfxbasemodel.cxx |5 ---
 sfx2/source/view/sfxbasecontroller.cxx   |6 ---
 8 files changed, 22 insertions(+), 66 deletions(-)

New commits:
commit 8ce81efa73f93afdf46f9586b7b6cecf36cf6914
Author: Noel Grandin 
AuthorDate: Fri Oct 29 12:25:39 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 29 14:28:54 2021 +0200

simplify framework::TitleHelper

Every callsite (bar one) calls setOwner and connectWithUntitledNumbers 
after construction,
so just pass them in the constructor.
And for that lone callsite we can just nullptr as an argument.

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

diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index fa8e755b799b..25be01ce1671 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -2094,10 +2094,7 @@ Reference< XTitle > const & 
ODatabaseDocument::impl_getTitleHelper_throw()
 Reference< XUntitledNumbers >  
xDesktop(Desktop::create(m_pImpl->m_aContext), uno::UNO_QUERY_THROW);
 Reference< frame::XModel > xThis   (getThis(), 
uno::UNO_QUERY_THROW);
 
-rtl::Reference<::framework::TitleHelper> pHelper = new 
::framework::TitleHelper(m_pImpl->m_aContext);
-m_xTitleHelper = pHelper;
-pHelper->setOwner   (xThis   );
-pHelper->connectWithUntitledNumbers (xDesktop);
+m_xTitleHelper = new ::framework::TitleHelper(m_pImpl->m_aContext, 
xThis, xDesktop);
 }
 
 return m_xTitleHelper;
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx 
b/dbaccess/source/ui/browser/genericcontroller.cxx
index 7d0d326605b0..6cb392b35192 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -1057,11 +1057,7 @@ Reference< XTitle > 
OGenericUnoController::impl_getTitleHelper_throw()
 Reference< XUntitledNumbers > xUntitledProvider(getPrivateModel(), 
UNO_QUERY  );
 Reference< XController >  xThis(static_cast< XController* >(this), 
UNO_QUERY_THROW);
 
-rtl::Reference<::framework::TitleHelper> pHelper = new 
::framework::TitleHelper( m_xContext );
-m_xTitleHelper = pHelper;
-
-pHelper->setOwner   (xThis);
-pHelper->connectWithUntitledNumbers (xUntitledProvider);
+m_xTitleHelper = new ::framework::TitleHelper( m_xContext, xThis, 
xUntitledProvider );
 }
 
 return m_xTitleHelper;
diff --git a/framework/source/fwe/helper/titlehelper.cxx 
b/framework/source/fwe/helper/titlehelper.cxx
index a3854489d0f8..5c4d07e69caa 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -48,26 +48,21 @@ using namespace css::frame;
 
 namespace framework{
 
-TitleHelper::TitleHelper(const css::uno::Reference< 
css::uno::XComponentContext >& rxContext)
+TitleHelper::TitleHelper(const css::uno::Reference< 
css::uno::XComponentContext >& rxContext,
+const css::uno::Reference< css::uno::XInterface >& 
xOwner,
+const css::uno::Reference< 
css::frame::XUntitledNumbers >& xNumbers)
 : ::cppu::BaseMutex ()
 , m_xContext(rxContext)
 , m_bExternalTitle  (false)
 , m_nLeasedNumber   (css::frame::UntitledNumbersConst::INVALID_NUMBER)
 , m_aListener   (m_aMutex)
-{
-}
-
-TitleHelper::~TitleHelper()
-{
-}
-
-void TitleHelper::setOwner(const css::uno::Reference< css::uno::XInterface >& 
xOwner)
 {
 // SYNCHRONIZED ->
 {
 osl::MutexGuard aLock(m_aMutex);
 
 m_xOwner = xOwner;
+m_xUntitledNumbers = xNumbers;
 }
 // <- SYNCHRONIZED
 
@@ -93,6 +88,10 @@ void TitleHelper::setOwner(const css::uno::Reference< 
css::uno::XInterface >& xO
 }
 }
 
+TitleHelper::~TitleHelper()
+{
+}
+
 OUString SAL_CALL TitleHelper::getTitle()
 {
 // SYNCHRONIZED ->
@@ -115,15 +114,6 @@ OUString SAL_CALL TitleHelper::getTitle()
 // <- SYNCHRONIZED
 }
 
-void TitleHelper::connectWithUntitledNumbers (const css::uno::Reference< 
css::frame::XUntitledNumbers >& xNumbers)
-{
-// SYNCHRONIZED ->
-osl::MutexGuard aLock(m_aMutex);
-
-m_xUntitledNumbers = xNumbers;
-// <- SYNCHRONIZED
-}
-
 void SAL_CALL TitleHelper::setTitle(const OUString& sTitle)
 {
  

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

2021-10-29 Thread Mike Kaganski (via logerrit)
 chart2/source/controller/dialogs/TitleDialogData.cxx|   26 
 chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx|   22 +++
 chart2/source/controller/dialogs/res_Titles.cxx |   30 
+-
 chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx |7 +-
 chart2/source/tools/AxisHelper.cxx  |   19 +++---
 drawinglayer/source/geometry/viewinformation3d.cxx  |3 -
 6 files changed, 53 insertions(+), 54 deletions(-)

New commits:
commit 19c611f3275de7ffc47e517ad1f3141695fa83fb
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 09:32:59 2021 +0300
Commit: Mike Kaganski 
CommitDate: Fri Oct 29 14:30:36 2021 +0200

Prepare for removal of non-const operator[] from Sequence in drawinglayer

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

diff --git a/drawinglayer/source/geometry/viewinformation3d.cxx 
b/drawinglayer/source/geometry/viewinformation3d.cxx
index f0d25bbb07fa..84dd3ccfe79d 100644
--- a/drawinglayer/source/geometry/viewinformation3d.cxx
+++ b/drawinglayer/source/geometry/viewinformation3d.cxx
@@ -127,6 +127,7 @@ namespace drawinglayer::geometry
 
 // prepare extended information for filtering. Maximum size is 
nCount
 mxExtendedInformation.realloc(nCount);
+auto pExtendedInformation = mxExtendedInformation.getArray();
 
 for(sal_Int32 a(0); a < nCount; a++)
 {
@@ -200,7 +201,7 @@ namespace drawinglayer::geometry
 else
 {
 // extra information; add to filtered information
-mxExtendedInformation[nExtendedInsert++] = rProp;
+pExtendedInformation[nExtendedInsert++] = rProp;
 }
 }
 
commit 0e7ea85a0d67dcbdb6da28dcdd6d586358c50901
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 14:04:35 2021 +0300
Commit: Mike Kaganski 
CommitDate: Fri Oct 29 14:30:25 2021 +0200

Prepare for removal of non-const operator[] from Sequence in chart2

The bits missing from 5b0ae3b59cd2cccfb72d991657366eb2a69bff49, where
explicit use of sal_Bool* was needed instead of 'auto', to workaround
loplugin:implicitboolconversion warnings.

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

diff --git a/chart2/source/controller/dialogs/TitleDialogData.cxx 
b/chart2/source/controller/dialogs/TitleDialogData.cxx
index e4e9099011a6..eb4b1443aa1f 100644
--- a/chart2/source/controller/dialogs/TitleDialogData.cxx
+++ b/chart2/source/controller/dialogs/TitleDialogData.cxx
@@ -32,16 +32,11 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
 
 TitleDialogData::TitleDialogData( std::unique_ptr 
pRefSizeProvider )
-: aPossibilityList(7)
-, aExistenceList(7)
+: aPossibilityList{ true, true, true, true, true, true, true }
+, aExistenceList{ false, false, false, false, false, false, false }
 , aTextList(7)
 , apReferenceSizeProvider( std::move(pRefSizeProvider) )
 {
-for (sal_Int32 i = 0; i < 7; i++)
-{
-aPossibilityList[i] = true;
-aExistenceList[i] = false;
-}
 }
 
 void TitleDialogData::readFromModel( const uno::Reference< frame::XModel>& 
xChartModel )
@@ -51,12 +46,15 @@ void TitleDialogData::readFromModel( const uno::Reference< 
frame::XModel>& xChar
 //get possibilities
 uno::Sequence< sal_Bool > aAxisPossibilityList;
 AxisHelper::getAxisOrGridPossibilities( aAxisPossibilityList, xDiagram );
-aPossibilityList[2]=aAxisPossibilityList[0];//x axis title
-aPossibilityList[3]=aAxisPossibilityList[1];//y axis title
-aPossibilityList[4]=aAxisPossibilityList[2];//z axis title
-aPossibilityList[5]=aAxisPossibilityList[3];//secondary x axis title
-aPossibilityList[6]=aAxisPossibilityList[4];//secondary y axis title
+sal_Bool* pPossibilityList = aPossibilityList.getArray();
+pPossibilityList[2]=aAxisPossibilityList[0];//x axis title
+pPossibilityList[3]=aAxisPossibilityList[1];//y axis title
+pPossibilityList[4]=aAxisPossibilityList[2];//z axis title
+pPossibilityList[5]=aAxisPossibilityList[3];//secondary x axis title
+pPossibilityList[6]=aAxisPossibilityList[4];//secondary y axis title
 
+sal_Bool* pExistenceList = aExistenceList.getArray();
+auto pTextList = aTextList.getArray();
 //find out which title exists and get their text
 //main title:
 for( sal_Int32 nTitleIndex = static_cast< sal_Int32 >( 
TitleHelper::TITLE_BEGIN);
@@ -65,8 +63,8 @@ void TitleDialogData::readFromModel( const uno::Reference< 
frame::XModel>& xChar
 {
 uno::Reference< 

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

2021-10-29 Thread Xisco Fauli (via logerrit)
 vcl/qa/cppunit/pdfexport/data/tdf145274.docx |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx   |   45 +++
 2 files changed, 45 insertions(+)

New commits:
commit 80afffed57564e40854c1bb8a539fdc3c22b9684
Author: Xisco Fauli 
AuthorDate: Thu Oct 28 17:20:36 2021 +0200
Commit: Xisco Fauli 
CommitDate: Fri Oct 29 14:40:01 2021 +0200

tdf#145274: vcl_pdfexport: Add unittest

Exporting to PDF was the only way I could find to test this issue

Change-Id: Id2af0f98b505c49ad912e74477d7bb5246cf850c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124341
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf145274.docx 
b/vcl/qa/cppunit/pdfexport/data/tdf145274.docx
new file mode 100644
index ..5b3b6afecfec
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf145274.docx differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index ad19395c5669..73ef63661236 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1150,6 +1150,51 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115117_2a)
 #endif
 }
 
+CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf145274)
+{
+// Import the bugdoc and export as PDF.
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf145274.docx";
+mxComponent = loadFromDesktop(aURL);
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+utl::MediaDescriptor aMediaDescriptor;
+aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+xStorable->storeToURL(maTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
+
+// Parse the export result with pdfium.
+SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ);
+SvMemoryStream aMemory;
+aMemory.WriteStream(aFile);
+std::shared_ptr pPDFium = vcl::pdf::PDFiumLibrary::get();
+std::unique_ptr pPdfDocument
+= pPDFium->openDocument(aMemory.GetData(), aMemory.GetSize());
+CPPUNIT_ASSERT(pPdfDocument);
+
+CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
+
+auto pPage = pPdfDocument->openPage(0);
+CPPUNIT_ASSERT(pPage);
+
+int nPageObjectCount = pPage->getObjectCount();
+
+// Without the fix in place, this test would have failed with
+// - Expected: 6
+// - Actual  : 4
+CPPUNIT_ASSERT_EQUAL(6, nPageObjectCount);
+
+auto pTextPage = pPage->getTextPage();
+
+for (int i = 0; i < nPageObjectCount; ++i)
+{
+std::unique_ptr pPageObject = 
pPage->getObject(i);
+if (pPageObject->getType() != vcl::pdf::PDFPageObjectType::Text)
+continue;
+
+CPPUNIT_ASSERT_EQUAL(11.0, pPageObject->getFontSize());
+CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFTextRenderMode::Fill, 
pPageObject->getTextRenderMode());
+CPPUNIT_ASSERT_EQUAL(COL_RED, pPageObject->getFillColor());
+}
+}
+
 /// Test writing ToUnicode CMAP for doubly encoded glyphs.
 CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_1)
 {


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/sfx2 sfx2/source vcl/jsdialog xmlsecurity/inc xmlsecurity/source

2021-10-29 Thread Szymon Kłos (via logerrit)
 include/sfx2/objsh.hxx |2 
 sfx2/source/doc/objserv.cxx|   27 ++---
 vcl/jsdialog/enabled.cxx   |3 -
 xmlsecurity/inc/digitalsignaturesdialog.hxx|1 
 xmlsecurity/source/component/documentdigitalsignatures.cxx |   19 ++---
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |   14 ++
 6 files changed, 52 insertions(+), 14 deletions(-)

New commits:
commit f5e65834c77162ac12d8bbcec82972e055aa3084
Author: Szymon Kłos 
AuthorDate: Wed Oct 20 11:01:41 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 14:47:30 2021 +0200

jsdialog: enable Digital Signatures dialog

In LOK case run it in the readonly mode.
In readonly mode we can run it asynchronously.

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

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index ee3d3d6eefb7..872127048db1 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -350,7 +350,7 @@ public:
 
 /** Returns to if preparing was successful, else false. */
 bool PrepareForSigning(weld::Window* pDialogParent);
-bool CheckIsReadonly(bool bSignScriptingContent);
+bool CheckIsReadonly(bool bSignScriptingContent, weld::Window* 
pDialogParent = nullptr);
 void RecheckSignature(bool bAlsoRecheckScriptingSignature);
 void AfterSigning(bool bSignSuccess, bool bSignScriptingContent);
 bool HasValidSignatures() const;
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 147d4a9a74a7..2a69aeb95510 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1877,9 +1877,10 @@ void SfxObjectShell::AfterSigning(bool bSignSuccess, 
bool bSignScriptingContent)
 EnableSetModified();
 }
 
-bool SfxObjectShell::CheckIsReadonly(bool bSignScriptingContent)
+bool SfxObjectShell::CheckIsReadonly(bool bSignScriptingContent, weld::Window* 
pDialogParent)
 {
-if (GetMedium()->IsOriginallyReadOnly())
+// in LOK case we support only viewer / readonly mode so far
+if (GetMedium()->IsOriginallyReadOnly() || 
comphelper::LibreOfficeKit::isActive())
 {
 // If the file is physically read-only, we just show the existing 
signatures
 try
@@ -1889,6 +1890,10 @@ bool SfxObjectShell::CheckIsReadonly(bool 
bSignScriptingContent)
 uno::Reference xSigner(
 
security::DocumentDigitalSignatures::createWithVersionAndValidSignature(
 comphelper::getProcessComponentContext(), aODFVersion, 
HasValidSignatures()));
+
+if (pDialogParent)
+xSigner->setParentWindow(pDialogParent->GetXWindow());
+
 if (bSignScriptingContent)
 
xSigner->showScriptingContentSignatures(GetMedium()->GetZipStorageToSign_Impl(),
 
uno::Reference());
@@ -1902,6 +1907,18 @@ bool SfxObjectShell::CheckIsReadonly(bool 
bSignScriptingContent)
 {
 std::unique_ptr pStream(
 utl::UcbStreamHelper::CreateStream(GetName(), 
StreamMode::READ));
+
+if (!pStream)
+{
+pStream = 
utl::UcbStreamHelper::CreateStream(GetMedium()->GetName(), StreamMode::READ);
+
+if (!pStream)
+{
+SAL_WARN( "sfx.doc", "Couldn't use signing 
functionality!" );
+return true;
+}
+}
+
 uno::Reference xStream(new 
utl::OStreamWrapper(*pStream));
 
xSigner->showDocumentContentSignatures(uno::Reference(),
xStream);
@@ -1934,7 +1951,7 @@ void SfxObjectShell::SignDocumentContent(weld::Window* 
pDialogParent)
 if (!PrepareForSigning(pDialogParent))
 return;
 
-if (CheckIsReadonly(false))
+if (CheckIsReadonly(false, pDialogParent))
 return;
 
 bool bSignSuccess = GetMedium()->SignContents_Impl(pDialogParent, false, 
HasValidSignatures());
@@ -2031,7 +2048,7 @@ void SfxObjectShell::SignSignatureLine(weld::Window* 
pDialogParent,
 if (!PrepareForSigning(pDialogParent))
 return;
 
-if (CheckIsReadonly(false))
+if (CheckIsReadonly(false, pDialogParent))
 return;
 
 bool bSignSuccess = GetMedium()->SignContents_Impl(pDialogParent,
@@ -2056,7 +2073,7 @@ void SfxObjectShell::SignScriptingContent(weld::Window* 
pDialogParent)
 if (!PrepareForSigning(pDialogParent))
 return;
 
-if (CheckIsReadonly(true))
+if (CheckIsReadonly(true, pDialogParent))
 return;
 
 bool bSignSuccess = GetMedium()->SignContents_Impl

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/jsdialog xmlsecurity/inc xmlsecurity/source

2021-10-29 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/enabled.cxx   |3 ++-
 xmlsecurity/inc/digitalsignaturesdialog.hxx|3 +++
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |9 +++--
 3 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 7f2aea30f18b0c76dbbb58d3498cb68778040ef3
Author: Szymon Kłos 
AuthorDate: Fri Oct 22 13:08:46 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 14:47:49 2021 +0200

Make View Certificate dialog async

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

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index c071cda333c5..30fa14deffa0 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -53,7 +53,8 @@ bool isBuilderEnabled(const OUString& rUIFile, bool bMobile)
 || rUIFile == "svx/ui/fontworkgallerydialog.ui"
 || rUIFile == "cui/ui/macroselectordialog.ui" || rUIFile == 
"uui/ui/macrowarnmedium.ui"
 || rUIFile == "modules/scalc/ui/textimportcsv.ui"
-|| rUIFile == "xmlsec/ui/digitalsignaturesdialog.ui")
+|| rUIFile == "xmlsec/ui/digitalsignaturesdialog.ui"
+|| rUIFile == "xmlsec/ui/viewcertdialog.ui")
 {
 return true;
 }
diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx 
b/xmlsecurity/inc/digitalsignaturesdialog.hxx
index f49af516ba00..7ba84d2a677f 100644
--- a/xmlsecurity/inc/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/digitalsignaturesdialog.hxx
@@ -37,6 +37,7 @@ namespace com::sun::star {
 
 
 class HeaderBar;
+class CertificateViewer;
 
 class DigitalSignaturesDialog final : public weld::GenericDialogController
 {
@@ -72,6 +73,8 @@ private:
 std::unique_ptr  m_xStartCertMgrBtn;
 std::unique_ptr  m_xCloseBtn;
 
+std::shared_ptr m_xViewer;
+
 DECL_LINK(AdESCompliantCheckBoxHdl, weld::ToggleButton&, void);
 DECL_LINK(ViewButtonHdl, weld::Button&, void);
 DECL_LINK(AddButtonHdl, weld::Button&, void);
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 
b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index ac31d5ba3875..3179a5c09b20 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -205,6 +205,8 @@ DigitalSignaturesDialog::DigitalSignaturesDialog(
 
 DigitalSignaturesDialog::~DigitalSignaturesDialog()
 {
+if (m_xViewer)
+m_xViewer->response(RET_OK);
 }
 
 bool DigitalSignaturesDialog::Init()
@@ -773,9 +775,12 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails()
 
 if ( xCert.is() )
 {
+if (m_xViewer)
+m_xViewer->response(RET_OK);
+
 uno::Reference xSecEnv = 
getSecurityEnvironmentForCertificate(xCert);
-CertificateViewer aViewer(m_xDialog.get(), xSecEnv, xCert, false, 
nullptr);
-aViewer.run();
+m_xViewer = std::make_shared(m_xDialog.get(), 
xSecEnv, xCert, false, nullptr);
+weld::DialogController::runAsync(m_xViewer, [this] (sal_Int32) { 
m_xViewer = nullptr; });
 }
 else
 {


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/jsdialog xmlsecurity/inc xmlsecurity/source

2021-10-29 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/enabled.cxx |3 ++-
 xmlsecurity/inc/certificateviewer.hxx|2 ++
 xmlsecurity/source/dialogs/certificateviewer.cxx |   13 +++--
 3 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit d1c8e1627e39a6d816f82aa3a31d3092c35263f5
Author: Szymon Kłos 
AuthorDate: Mon Oct 25 12:03:26 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 14:48:07 2021 +0200

Make View Certificate sub-dialog async

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

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 30fa14deffa0..03957b4ec4cf 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -54,7 +54,8 @@ bool isBuilderEnabled(const OUString& rUIFile, bool bMobile)
 || rUIFile == "cui/ui/macroselectordialog.ui" || rUIFile == 
"uui/ui/macrowarnmedium.ui"
 || rUIFile == "modules/scalc/ui/textimportcsv.ui"
 || rUIFile == "xmlsec/ui/digitalsignaturesdialog.ui"
-|| rUIFile == "xmlsec/ui/viewcertdialog.ui")
+|| rUIFile == "xmlsec/ui/viewcertdialog.ui" || rUIFile == 
"xmlsec/ui/certgeneral.ui"
+|| rUIFile == "xmlsec/ui/viewcertdialog.ui" || rUIFile == 
"xmlsec/ui/certpage.ui")
 {
 return true;
 }
diff --git a/xmlsecurity/inc/certificateviewer.hxx 
b/xmlsecurity/inc/certificateviewer.hxx
index 1d0ec5f72e2d..ea47c41029a8 100644
--- a/xmlsecurity/inc/certificateviewer.hxx
+++ b/xmlsecurity/inc/certificateviewer.hxx
@@ -134,6 +134,7 @@ private:
 boolmbFirstActivateDone;
 
 std::vector> maUserData;
+std::shared_ptr mxCertificateViewer;
 
 std::unique_ptr mxCertPathLB;
 std::unique_ptr mxScratchIter;
@@ -150,6 +151,7 @@ private:
 
 public:
 CertificateViewerCertPathTP(weld::Container* pParent, CertificateViewer* 
pDlg);
+~CertificateViewerCertPathTP();
 void ActivatePage();
 };
 
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx 
b/xmlsecurity/source/dialogs/certificateviewer.cxx
index fbbdcf53514d..cb039b304800 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -273,6 +273,12 @@ 
CertificateViewerCertPathTP::CertificateViewerCertPathTP(weld::Container* pParen
 mxViewCertPB->connect_clicked( LINK( this, CertificateViewerCertPathTP, 
ViewCertHdl ) );
 }
 
+CertificateViewerCertPathTP::~CertificateViewerCertPathTP()
+{
+if (mxCertificateViewer)
+mxCertificateViewer->response(RET_OK);
+}
+
 void CertificateViewerCertPathTP::ActivatePage()
 {
 if ( mbFirstActivateDone )
@@ -324,10 +330,13 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, ViewCertHdl, 
weld::Button&, void)
 std::unique_ptr xIter = mxCertPathLB->make_iterator();
 if (mxCertPathLB->get_selected(xIter.get()))
 {
+if (mxCertificateViewer)
+mxCertificateViewer->response(RET_OK);
+
 CertPath_UserData* pData = 
reinterpret_cast(mxCertPathLB->get_id(*xIter).toInt64());
-CertificateViewer aViewer(mpDlg->getDialog(), 
mpDlg->mxSecurityEnvironment,
+mxCertificateViewer = 
std::make_shared(mpDlg->getDialog(), 
mpDlg->mxSecurityEnvironment,
 pData->mxCert, false, nullptr);
-aViewer.run();
+weld::DialogController::runAsync(mxCertificateViewer, [this] 
(sal_Int32) { mxCertificateViewer = nullptr; });
 }
 }
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - xmlsecurity/inc xmlsecurity/source

2021-10-29 Thread Szymon Kłos (via logerrit)
 xmlsecurity/inc/digitalsignaturesdialog.hxx|1 +
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |   14 ++
 2 files changed, 11 insertions(+), 4 deletions(-)

New commits:
commit 21b594c1a55f1cda80e6ba66b0b902fb265e1c9e
Author: Szymon Kłos 
AuthorDate: Wed Oct 27 13:04:17 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 14:48:25 2021 +0200

Make Certificate not found dialog async

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

diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx 
b/xmlsecurity/inc/digitalsignaturesdialog.hxx
index 7ba84d2a677f..bac3a70470d2 100644
--- a/xmlsecurity/inc/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/digitalsignaturesdialog.hxx
@@ -74,6 +74,7 @@ private:
 std::unique_ptr  m_xCloseBtn;
 
 std::shared_ptr m_xViewer;
+std::shared_ptr m_xInfoBox;
 
 DECL_LINK(AdESCompliantCheckBoxHdl, weld::ToggleButton&, void);
 DECL_LINK(ViewButtonHdl, weld::Button&, void);
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 
b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 3179a5c09b20..86cf99c0288c 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -207,6 +207,9 @@ DigitalSignaturesDialog::~DigitalSignaturesDialog()
 {
 if (m_xViewer)
 m_xViewer->response(RET_OK);
+
+if (m_xInfoBox)
+m_xInfoBox->response(RET_OK);
 }
 
 bool DigitalSignaturesDialog::Init()
@@ -784,10 +787,13 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails()
 }
 else
 {
-std::unique_ptr 
xInfoBox(Application::CreateMessageDialog(m_xDialog.get(),
-  VclMessageType::Info, 
VclButtonsType::Ok,
-  
XsResId(STR_XMLSECDLG_NO_CERT_FOUND)));
-xInfoBox->run();
+if (m_xInfoBox)
+m_xInfoBox->response(RET_OK);
+
+m_xInfoBox = 
std::shared_ptr(Application::CreateMessageDialog(m_xDialog.get(),
+  
VclMessageType::Info, VclButtonsType::Ok,
+  
XsResId(STR_XMLSECDLG_NO_CERT_FOUND)));
+m_xInfoBox->runAsync(m_xInfoBox, [this] (sal_Int32) { m_xInfoBox = 
nullptr; });
 }
 }
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - editeng/source

2021-10-29 Thread Szymon Kłos (via logerrit)
 editeng/source/editeng/impedit.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e62b40b056120bb5eebf00fc88f58fe042356520
Author: Szymon Kłos 
AuthorDate: Thu Oct 28 12:33:48 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 14:49:03 2021 +0200

Check pOutWin before use in ImpEditView::DeselectAll

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

diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index 8cee20102c0a..c485b8d64174 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -2036,7 +2036,7 @@ void ImpEditView::DeselectAll()
 SetEditSelection(aNewSelection);
 // const_cast(GetEditSelection().Min()) = 
GetEditSelection().Max();
 
-if (comphelper::LibreOfficeKit::isActive() && mpViewShell)
+if (comphelper::LibreOfficeKit::isActive() && mpViewShell && pOutWin)
 {
 VclPtr pParent = pOutWin->GetParentWithLOKNotifier();
 if (pParent && pParent->GetLOKWindowId())


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - xmlsecurity/source

2021-10-29 Thread Szymon Kłos (via logerrit)
 xmlsecurity/source/helper/pdfsignaturehelper.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 1c9f55e7a1d3321bcc817d6302c6fdb70c310c55
Author: Szymon Kłos 
AuthorDate: Mon Oct 25 12:04:30 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 16:13:38 2021 +0200

tdf#145312 xmlsecurity: prevent from crash when cannot receive pdfium 
annotation

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

diff --git a/xmlsecurity/source/helper/pdfsignaturehelper.cxx 
b/xmlsecurity/source/helper/pdfsignaturehelper.cxx
index ffadecfaea14..e55618befeb2 100644
--- a/xmlsecurity/source/helper/pdfsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/pdfsignaturehelper.cxx
@@ -284,6 +284,11 @@ void AnalyizeSignatureStream(SvMemoryStream& rStream, 
std::vector&
 for (int i = 0; i < pPdfPage->getAnnotationCount(); ++i)
 {
 std::unique_ptr pPdfAnnotation = 
pPdfPage->getAnnotation(i);
+if (!pPdfAnnotation)
+{
+SAL_WARN("xmlsecurity.helper", "Cannot get PDFiumAnnotation");
+continue;
+}
 vcl::pdf::PDFAnnotationSubType eType = 
pPdfAnnotation->getSubType();
 switch (eType)
 {


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

2021-10-29 Thread Tor Lillqvist (via logerrit)
 tools/source/generic/poly.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 9dd38a0b4021aa942196babdd6406691c1638a2a
Author: Tor Lillqvist 
AuthorDate: Fri Oct 29 13:26:11 2021 +0300
Commit: Tor Lillqvist 
CommitDate: Fri Oct 29 16:14:41 2021 +0200

Let's assume this is a bogus warning

Change-Id: I3941d8b1811d34b2b7646b20bc7e91c9034770be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124427
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 8128491ac8cd..7c5eca59d4c0 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1030,8 +1030,6 @@ double Polygon::CalcDistance( sal_uInt16 nP1, sal_uInt16 
nP2 ) const
 
 void Polygon::Optimize( PolyOptimizeFlags nOptimizeFlags )
 {
-DBG_ASSERT( !mpImplPolygon->mxFlagAry, "Optimizing could fail with 
beziers!" );
-
 sal_uInt16 nSize = mpImplPolygon->mnPoints;
 
 if( !(bool(nOptimizeFlags) && nSize) )


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/source

2021-10-29 Thread Szymon Kłos (via logerrit)
 vcl/source/window/builder.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 86bd18e062cf4829e2b3b8ba7e18170deb7b79ac
Author: Szymon Kłos 
AuthorDate: Wed Oct 27 13:04:47 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 16:29:34 2021 +0200

jsdialogs: use for MessageDialogs

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

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 11d8073d6320..87d438dead69 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -196,9 +196,9 @@ weld::Builder* 
Application::CreateInterimBuilder(vcl::Window* pParent, const OUS
 
 weld::MessageDialog* Application::CreateMessageDialog(weld::Widget* pParent, 
VclMessageType eMessageType,
   VclButtonsType 
eButtonType, const OUString& rPrimaryMessage,
-  bool bMobile)
+  bool /*bMobile*/)
 {
-if (bMobile)
+if (comphelper::LibreOfficeKit::isActive())
 return JSInstanceBuilder::CreateMessageDialog(pParent, eMessageType, 
eButtonType, rPrimaryMessage);
 else
 return ImplGetSVData()->mpDefInst->CreateMessageDialog(pParent, 
eMessageType, eButtonType, rPrimaryMessage);


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

2021-10-29 Thread Andrea Gelmini (via logerrit)
 xmloff/source/draw/shapeexport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cf158b801a8d23538e339e3e1b9b571e8f1575d7
Author: Andrea Gelmini 
AuthorDate: Fri Oct 29 14:28:00 2021 +0200
Commit: Julien Nabet 
CommitDate: Fri Oct 29 16:34:50 2021 +0200

Fix typo

Change-Id: I06cb364b31274d36a712f43db258a2421995388a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124434
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Julien Nabet 

diff --git a/xmloff/source/draw/shapeexport.cxx 
b/xmloff/source/draw/shapeexport.cxx
index dbd52fadd1d1..ae5dbf041d1e 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -4588,7 +4588,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& 
rExport, const uno::Referenc
 // tdf#141301: no specific skew values provided
 if (!bSkewValuesProvided)
 {
-// so we need to export default values 
explicitely
+// so we need to export default values 
explicitly
 rExport.AddAttribute( XML_NAMESPACE_DRAW, 
XML_EXTRUSION_SKEW, "50 -135");
 }
 }


[Libreoffice-commits] core.git: m4/libgcrypt.m4

2021-10-29 Thread Julien Nabet (via logerrit)
 m4/libgcrypt.m4 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9117e1c291f1ed7883ad60d9d33aea1a7def88df
Author: Julien Nabet 
AuthorDate: Thu Oct 28 22:47:47 2021 +0200
Commit: Julien Nabet 
CommitDate: Fri Oct 29 16:36:00 2021 +0200

Fix macro "AC_HELP_STRING" is obsolete (m4)

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

diff --git a/m4/libgcrypt.m4 b/m4/libgcrypt.m4
index 1be2fe61fed7..bf3c59862e42 100644
--- a/m4/libgcrypt.m4
+++ b/m4/libgcrypt.m4
@@ -22,7 +22,7 @@ dnl with a changed API.
 dnl
 AC_DEFUN([AM_PATH_LIBGCRYPT],
 [ AC_ARG_WITH(libgcrypt-prefix,
-AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
+AS_HELP_STRING([--with-libgcrypt-prefix=PFX],
[prefix where LIBGCRYPT is installed (optional)]),
  libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
   if test x$libgcrypt_config_prefix != x ; then


[Libreoffice-commits] translations.git: source/ab source/af source/am source/an source/ar source/as source/ast source/az source/be source/bg source/bn source/bn-IN source/bo source/br source/brx sourc

2021-10-29 Thread Christian Lohmaier (via logerrit)
 source/ab/svx/messages.po 
|  318 +-
 source/af/extensions/messages.po  
|   28 
 source/af/svx/messages.po 
|  320 +-
 source/af/sw/messages.po  
|   28 
 source/am/helpcontent2/source/text/sbasic/shared.po   
|  182 -
 source/am/helpcontent2/source/text/scalc/01.po
|   44 
 source/am/helpcontent2/source/text/shared/guide.po
| 1511 +
 source/am/svx/messages.po 
|  318 +-
 source/an/svx/messages.po 
|  320 +-
 source/ar/helpcontent2/source/text/sbasic/shared.po   
|  182 -
 source/ar/helpcontent2/source/text/scalc/01.po
|   42 
 source/ar/helpcontent2/source/text/shared/guide.po
| 1523 +
 source/ar/sfx2/classification.po  
|   36 
 source/ar/svx/messages.po 
|  318 +-
 source/as/svx/messages.po 
|  318 +-
 source/ast/connectivity/registry/firebird/org/openoffice/Office/DataAccess.po 
|6 
 source/ast/helpcontent2/source/text/sbasic/shared.po  
|  182 -
 source/ast/helpcontent2/source/text/sbasic/shared/03.po   
|8 
 source/ast/helpcontent2/source/text/scalc/01.po   
|   44 
 source/ast/helpcontent2/source/text/shared/guide.po   
| 1517 +
 source/ast/sc/messages.po 
|9 
 source/ast/sd/messages.po 
|7 
 source/ast/svx/messages.po
|  320 +-
 source/ast/sw/messages.po 
|   28 
 source/ast/vcl/messages.po
|6 
 source/az/svx/messages.po 
|  318 +-
 source/be/svx/messages.po 
|  318 +-
 source/bg/connectivity/registry/firebird/org/openoffice/Office/DataAccess.po  
|   10 
 source/bg/dbaccess/messages.po
|8 
 source/bg/helpcontent2/source/text/sbasic/shared.po   
|  182 -
 source/bg/helpcontent2/source/text/scalc/01.po
|   44 
 source/bg/helpcontent2/source/text/shared/guide.po
| 1515 +
 source/bg/helpcontent2/source/text/swriter/00.po  
|6 
 source/bg/sd/messages.po  
|   12 
 source/bg/svtools/messages.po 
|6 
 source/bg/svx/messages.po 
|  318 +-
 source/bn-IN/helpcontent2/source/text/sbasic/shared.po
|  182 -
 source/bn-IN/helpcontent2/source/text/scalc/01.po 
|   44 
 source/bn-IN/helpcontent2/source/text/shared/guide.po 
| 1517 +
 source/bn-IN/svx/messages.po  
|  318 +-
 source/bn/helpcontent2/source/text/sbasic/shared.po   
|  182 -
 source/bn/helpcontent2/source/text/scalc/01.po
|   44 
 source/bn/helpcontent2/source/text/shared/guide.po
| 1517 +
 source/bn/svx/messages.po 
|  318 +-
 source/bo/helpcontent2/source/text/sbasic/shared.po   
|  182 -
 source/bo/helpcontent2/source/text/scalc/01.po
|   44 
 source/bo/helpcontent2/source/text/shared/guide.po
| 1517 +
 source/bo/svx/messages.po 
|  318 +-
 source/br/svx/messages.po 
|  318 +-
 source/brx/svx/messages.po
|  318 +-
 source/bs/helpcontent2/source/text/sbasic/shared.po   
|  182 -
 source/bs/helpcontent2/source/text/scalc/01.po
|   42 
 source/bs/helpcontent2/source/text/shared/guide.po
| 1523 +
 source/bs/svx/messages.po 
|  318 +-
 source/ca-valencia/helpcontent2/source/text/sbasic/shared.po  
|  182 -
 source/ca-valencia/helpcontent2/source/text/s

[Libreoffice-commits] core.git: translations

2021-10-29 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 47de08e518ba88b01ec7aaad5450778332048a72
Author: Christian Lohmaier 
AuthorDate: Fri Oct 29 18:31:09 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Fri Oct 29 18:31:09 2021 +0200

Update git submodules

* Update translations from branch 'master'
  to 327c876f4c35127cff03b26303acd4831252ce66
  - update translations for 7.3.0 alpha1

and force-fix errors using pocheck

Change-Id: I9968e128a11cee0afa01bb87dc619ee180d2209f

diff --git a/translations b/translations
index 569442292afe..327c876f4c35 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 569442292afe8da0847d542276cdddea3d1728a1
+Subproject commit 327c876f4c35127cff03b26303acd4831252ce66


[Libreoffice-commits] core.git: configure.ac

2021-10-29 Thread Christian Lohmaier (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d23e106b55794160aa4c45e93b125bd84da1b726
Author: Christian Lohmaier 
AuthorDate: Fri Oct 29 19:07:50 2021 +0200
Commit: Christian Lohmaier 
CommitDate: Fri Oct 29 19:07:50 2021 +0200

bump product version to 7.3.0.0.alpha1+

Change-Id: I0e62ad9397ae3a9558f609afb37f44e56b0a4e9e

diff --git a/configure.ac b/configure.ac
index f0cca1285c76..8b35199de6da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[7.3.0.0.alpha0+],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[7.3.0.0.alpha1+],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/libreoffice-7.3.0.0.alpha1'

2021-10-29 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.3.0.0.alpha1' created by Christian Lohmaier 
 at 2021-10-29 17:06 +

Tag libreoffice-7.3.0.0.alpha1
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmF8KiIACgkQ9DSh76/u
rqPSKQ/7BpjhMBETq3HUCX9WfG5uRQrasV4FZct5T+78SzuafjfCRUTYahxhx/XT
0g5pq7zVNWiXCPqrMPGlG31yRVPiRfhxLF+U+A3o5dIwVbE9YG+tKgCpDVMFLpp/
3unFq8sDHM5ZwER+NGPVpQ48ltlxXJB234JdcC4nIcFcpjSCPFsAArU7jy29BnbQ
7inlLzNH7jY8XEGketRQmFSVYJO1g5ONyiZZyx4ykNxnPo1lNg0n7E6TQzWXnxHs
9ObfTg0/P87NTPXicPe21uVGpMb5XPm0DxSaGDytQKuoqIhbzOOJBzvJuGeAljE/
wxjQC7bURXu//FdVgyPU2wixUJojPEhV9BiIRNR+nOmQK8PKmHc4jW7qoy/haxBM
M85RAvXPema90QCukQojbJviLntYGOfcXIgXAr46cnBstse1QCRSgPItihfGwm86
9uORMRBymcNswXTDZAz9f5jvMlcLFdummoAf0yxoC8VcIibClnqK7ZeUkB1GQJw1
xUeNEK5htLrUdZmyOOUlQnLM6puWwyU/XI16uWgBV88he0smyi03VloZEAoFXxgg
AFaEOqYlZzaz15wS0KsRVXwalRbX5lDoW0ZC/5kuV6u9p9AbVGAjzPNSPzRuAkyO
i0NwFPx6X6qM6ls9i6Jm7atCXkXanS+3jk1y5hpbCW1CLATWFJo=
=nP24
-END PGP SIGNATURE-

Changes since libreoffice-7-2-branch-point-30:
---
 0 files changed
---


[Libreoffice-commits] help.git: Changes to 'refs/tags/libreoffice-7.3.0.0.alpha1'

2021-10-29 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.3.0.0.alpha1' created by Christian Lohmaier 
 at 2021-10-29 17:06 +

Tag libreoffice-7.3.0.0.alpha1
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmF8KiYACgkQ9DSh76/u
rqOoYhAAoNWAb5eizveNM/Ag6enOB6S6t/VBOm/xrsqZLC7nx77HoswEdQV5HqiZ
8xY9/uYeYQfa1JKkyI9ML+A2sp9Yk+07sl5S7PQkU6O9r3Cq8GqKVu/SpW/s+XO+
J6wNJMPiu0gZF/m2uRHYFxL9/lH173VbmjxOM7pgmUHFFKQna0c9wLEOKYnAsQyV
S0pCBZ4Ve68jkwK1EuldcHUTQW5atCZfT14CxEpMhAXR45Y1TMQIG2oPE/bD0/LX
W6wRYFf7JoYPHJhpy5fPZwObOn1u+GDkUmz94ACYYvEWXEYJTWXn1KrhMZFtUeKb
5gmd2/YgvHEmxieKQN0nn8U5EVYNFopZKRjwQhpY3h/lDdaRVpiS7PNwXlaVdLET
0tbus5/8sFc4XsQ+fQbVO+5vcETI7r1t06C3NaAEBYDaPiy/CNiZuOTzHrEK6/wF
RTyPhKSRJpmDmZSnVaTwig3qcknBFC/kYN2zwGqcPZ+Hfk103w2uWipAkqorHSYw
Ru/r4q0Km+eRXHUAL6yhmYtsdm70t6Sp/b7EVOH0k36USphrbznk+aH2jIynsmXJ
8yFsqo78n+8R599Fo4NGGtGhRsPXK+d753YICgU8xpxPF7hm709nEOAxDpMiH/4g
1InGw52ZCeHhWNYVY98of1phz7x/b4oq65wFjNhIeTqE0lAbd+c=
=Wu5n
-END PGP SIGNATURE-

Changes since libreoffice-7-2-branch-point-342:
---
 0 files changed
---


[Libreoffice-commits] translations.git: Changes to 'refs/tags/libreoffice-7.3.0.0.alpha1'

2021-10-29 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.3.0.0.alpha1' created by Christian Lohmaier 
 at 2021-10-29 17:06 +

Tag libreoffice-7.3.0.0.alpha1
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmF8KiYACgkQ9DSh76/u
rqNS5Q/7Bd0b46yI6uWIA08sUOD8irCwcdG5pOCClSwuDRybfZmaY75Sk6Pk0Jjr
RZYmu+x4PMP/r7IBEJMQ0HHqLuFWCZVp1SJkwtjGxjyvXXNGrs5l55QCeErkItlU
ypH6BJjOfjNAgkwnOtyAaDDERz0wZGNBkpQVYZ/RjJ1ylWDp/GYEZV1NagWaMnxp
09bLqU6s8i94e72KQ+MlVgbfUAUNehrybv82mlQ6/OQ+OXuoZ2zMI6XB0Nf4PcHi
fEzAUZ9HF2jkIk4khIOOYEoulZieW+0qdWCYjUzaFZwwp3U5bxsL8QF8hKn/YUXo
j4rNyggs315iteAnPSCkp96m+qGv0xvrVNkxDD05Zk1xWbftKpKkIMz/On2sRCY7
nNtTia5khDBiY4bMWYz1pf44AGUtVMF+N90FNFbocu198rlYfxfpdpQdi6taujy0
Cim3WF/kpaUYNcRtDExi/NDRff6JLO/xwRZEZtFU1Hxyu8s27apJ52MD0aUK7J6q
RuDmuxmUNCaxuMLRRmF1pcN36r3fO5H3OvbMwYJTXqh3bW6hqr+8ZoczxKVguROv
m9LoU3IEwZt7TK6qIHQwDcYmY+oQoagyBQb6epcvLGq+PHOLB+hOKw4M9jvSs6MI
ClC1TSArRk+048BLUkFljHZktGv9WXWWHriPbDft0Q4WYI/k4T4=
=P7xq
-END PGP SIGNATURE-

Changes since libreoffice-7-2-branch-point-16:
---
 0 files changed
---


[Libreoffice-commits] core.git: Changes to 'refs/tags/libreoffice-7.3.0.0.alpha1'

2021-10-29 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.3.0.0.alpha1' created by Christian Lohmaier 
 at 2021-10-29 17:06 +

Tag libreoffice-7.3.0.0.alpha1
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmF8KiYACgkQ9DSh76/u
rqNHjg//b5s7BP+DI6bR66wV8H1dUs9Yd4Pwb3NROWvlKWABsOzTJOLcGUdU4RPg
qq15iSbyf7iNuJLS3uPkgfPHz3Hb9e0HuQyB6DoCjeDrWlmTzuquWuP+I6fLxrIM
sGCewGBAlZ63FmzAHuhr8R3QJqiHQPi/8ZzNeKzp1GoWmvGnwaIN012Av1hjPTH6
navsrmGVEqNb5AlhaxE4t3QFr4nCPuoX8/JFSu9KnN9nflILWJWenSrOyCpgnwUx
iHs+dKhOJZmUj04kZT/WyPsPf+KIva+zm5407oMV6S9F2If+v64UMresTyr7Al5Y
0KxBXiijAzO4iU+V66JxypgTvOWRbTBNyhZdEoqg2gPOIfEMRqxkLXgr+QnKgu70
ahuDZH20XkKUqN0aGJxx1oaSLjhecIEjfmJu10IYQ3tabZmimwPIbGDz7JcAuwxy
BoXvg/vY3cjIKl9q34RNDyfKjLq2gOkxCwhio92bkEDX6WKqLTfOf6hBIb7MJ4mx
JYF8YC8FjuludgYBNzOZbzyjTXC8u33S8/rDMtZWaumECuE7L0U/ErK52wIvpzZ3
TJNppJ0XL+JVDXikUWIPbpsCCH5bAUqlAoA2ArW8ow6pzSBBBbzg5E1vmVi3mrzz
4yTUot6nrK6dHRA95TC8Gavpm2T1G6eGpSOZj2VSHaNmxYuyRc4=
=m7Ni
-END PGP SIGNATURE-

Changes since libreoffice-7-2-branch-point-4763:
---
 0 files changed
---


[Libreoffice-commits] core.git: Branch 'feature/wasm' - 468 commits - accessibility/Library_acc.mk accessibility/source android/Bootstrap apple_remote/source avmedia/Library_avmedia.mk avmedia/Module_

2021-10-29 Thread Jan-Marek Glogowski (via logerrit)
Rebased ref, commits from common ancestor:
commit 92b65fc9579720de53dc5b82688d10a93fd54a27
Author: Jan-Marek Glogowski 
AuthorDate: Fri Oct 29 20:32:43 2021 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Fri Oct 29 20:33:20 2021 +0200

Minimize bridge code

This way it doesn't fail the optimized build.

Change-Id: I7d1b1e56da359835373ce093bb18df8219a09aac

diff --git a/bridges/source/cpp_uno/gcc3_wasm/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_wasm/cpp2uno.cxx
index 90e1d372da03..fd7fa817588a 100644
--- a/bridges/source/cpp_uno/gcc3_wasm/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_wasm/cpp2uno.cxx
@@ -5,536 +5,43 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#include 
-#include 
-#include 
-#include 
-#include "bridge.hxx"
-#include "cppinterfaceproxy.hxx"
-#include "types.hxx"
-#include "vtablefactory.hxx"
-#include "share.hxx"
-
-
-
-extern "C" int codeSnippets[];
-const int nFunIndexes = 8;
-const int nVtableOffsets = 4;
-
 
+#include 
+#include 
 
 using namespace ::com::sun::star::uno;
 
-namespace
-{
-static typelib_TypeClass cpp2uno_call(
-bridges::cpp_uno::shared::CppInterfaceProxy* pThis,
-const typelib_TypeDescription * pMemberTypeDescr,
-typelib_TypeDescriptionReference * pReturnTypeRef,
-sal_Int32 nParams,
-typelib_MethodParameter * pParams,
-void ** pCallStack,
-sal_Int64 * pRegisterReturn /* space for register return */ )
-{
-// pCallStack: x8, lr, d0..d7, x0..x7, rest of params originally on 
stack
-char *pTopStack = (char *)pCallStack;
-char *pFloatRegs = pTopStack + 2;
-char *pGPRegs =  pTopStack + (2+8)*8;
-char *pStackedArgs = pTopStack + (2+8+8)*8;
-
-int nGPR = 0;
-int nFPR = 0;
-
-// return
-typelib_TypeDescription * pReturnTypeDescr = 0;
-if (pReturnTypeRef)
-TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
-void * pUnoReturn = 0;
-// complex return ptr: if != 0 && != pUnoReturn, reconversion need
-void * pCppReturn = 0;
-
-if (pReturnTypeDescr)
-{
-if (!arm::return_in_x8(pReturnTypeRef))
-pUnoReturn = pRegisterReturn; // direct way for simple types
-else // complex return via x8
-{
-pCppReturn = pCallStack[0];
-
-pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType(
-pReturnTypeDescr )
-? alloca( pReturnTypeDescr->nSize )
-: pCppReturn); // direct way
-}
-}
-
-// Skip 'this'
-pGPRegs += 8;
-nGPR++;
-
-// Parameters
-void ** pUnoArgs = (void **)alloca( sizeof(void *) * nParams );
-void ** pCppArgs = (void **)alloca( sizeof(void *) * nParams );
-
-// Indices of values this have to be converted (interface conversion
-// cpp<=>uno)
-int * pTempIndices = (int *)alloca( sizeof(int) * nParams);
-
-// Type descriptions for reconversions
-typelib_TypeDescription ** ppTempParamTypeDescr = 
(typelib_TypeDescription **)alloca( sizeof(typelib_TypeDescription *) * 
nParams);
-
-int nTempIndices = 0;
-
-for ( int nPos = 0; nPos < nParams; ++nPos )
-{
-const typelib_MethodParameter & rParam = pParams[nPos];
-typelib_TypeDescription * pParamTypeDescr = 0;
-TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
-if (!rParam.bOut &&
-bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
-{
-if (nFPR < 8 && (pParamTypeDescr->eTypeClass == 
typelib_TypeClass_FLOAT ||
- pParamTypeDescr->eTypeClass == 
typelib_TypeClass_DOUBLE))
-{
-pCppArgs[nPos] = pUnoArgs[nPos] = pFloatRegs;
-pFloatRegs += 8;
-nFPR++;
-}
-else if (pParamTypeDescr->eTypeClass == 
typelib_TypeClass_FLOAT)
-{
-if ((pStackedArgs - pTopStack) % 4)
-pStackedArgs += 4 - ((pStackedArgs - pTopStack) % 4);
-   

[Libreoffice-commits] help.git: AllLangHelp_sbasic.mk source/auxiliary source/text

2021-10-29 Thread Rafael Lima (via logerrit)
 AllLangHelp_sbasic.mk|1 
 source/auxiliary/sbasic.tree |1 
 source/text/sbasic/shared/03/lib_ScriptForge.xhp |8 
 source/text/sbasic/shared/03/sf_chart.xhp|  501 +++
 4 files changed, 509 insertions(+), 2 deletions(-)

New commits:
commit 3445df8b3761cc8dafd0f5a275696ad54dc9bbec
Author: Rafael Lima 
AuthorDate: Wed Oct 27 15:28:42 2021 +0200
Commit: Rafael Lima 
CommitDate: Fri Oct 29 22:41:46 2021 +0200

Create help page for SF_Chart service

Change-Id: Ie244e4416d2b523dfe460701297f6ecfc81f964d
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/124195
Tested-by: Jenkins
Reviewed-by: Rafael Lima 

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index d1acdf5a4..f154d1de6 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -84,6 +84,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
 helpcontent2/source/text/sbasic/shared/03/sf_base \
 helpcontent2/source/text/sbasic/shared/03/sf_basic \
 helpcontent2/source/text/sbasic/shared/03/sf_calc \
+helpcontent2/source/text/sbasic/shared/03/sf_chart \
 helpcontent2/source/text/sbasic/shared/03/sf_database \
 helpcontent2/source/text/sbasic/shared/03/sf_dialog \
 helpcontent2/source/text/sbasic/shared/03/sf_dialogcontrol \
diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree
index cdd7c7ae6..562abdbda 100644
--- a/source/auxiliary/sbasic.tree
+++ b/source/auxiliary/sbasic.tree
@@ -342,6 +342,7 @@
 Base service
 Basic service
 Calc service
+Chart service
 Database service
 Dialog service
 DialogControl 
service
diff --git a/source/text/sbasic/shared/03/lib_ScriptForge.xhp 
b/source/text/sbasic/shared/03/lib_ScriptForge.xhp
index 466532b1d..17cbac0d8 100644
--- a/source/text/sbasic/shared/03/lib_ScriptForge.xhp
+++ b/source/text/sbasic/shared/03/lib_ScriptForge.xhp
@@ -78,13 +78,14 @@

  
Base
-   Calc
+   Calc
+   Chart
  


  
Database
-   Document
+   Document
  

 
@@ -138,6 +139,9 @@
 
   
 
+
+  
+
 
   
 
diff --git a/source/text/sbasic/shared/03/sf_chart.xhp 
b/source/text/sbasic/shared/03/sf_chart.xhp
new file mode 100644
index 0..62136eeeb
--- /dev/null
+++ b/source/text/sbasic/shared/03/sf_chart.xhp
@@ -0,0 +1,501 @@
+
+
+
+
+  
+ScriptForge.Chart service
+/text/sbasic/shared/03/sf_chart.xhp
+  
+  
+
+  
+
+  Chart service
+
+  
+  
+ScriptForge.Chart 
service
+The 
Chart service provides a set of properties and methods to 
handle charts in Calc documents. With this service it is possible 
to:
+
+  
+Access chart 
objects in Calc documents and manipulate their properties.
+  
+  
+Create and 
insert new charts into a Calc document.
+  
+  
+Export charts as 
image files.
+  
+
+  
+
+  Chart names
+  Charts may have two 
different names:
+  
+
+An internal 
name given by %PRODUCTNAME as soon as the chart object is created 
(usually "Object 1", "Object 2" and so on).
+
+
+A 
user-defined name, which can be defined by right-clicking the 
chart and choosing Name in the context menu.
+
+  
+  The Chart service 
primarily uses the user-defined name to access a chart object. If it does not 
exist, than the internal name is used.
+
+  Service invocation
+  The 
Chart service is instantiated from a Calc 
service instance either using the Charts or 
CreateChart methods.
+  
+  The example below 
creates a Chart service instance from an existing chart in 
the current Calc document:
+  
+GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")
+Dim 
oDoc as Object, oChart as Object
+Set 
oDoc = CreateScriptService("Calc")
+Set 
oChart = oDoc.Charts("Sheet1", "Object 1")
+  
+  The following example 
instantiate the Chart service by creating a new chart object 
based on the data contained in the range "Sheet1.A1:C10".
+  
+Dim 
oDoc as Object, oChart as Object
+Set 
oDoc = CreateScriptService("Calc")
+Set 
oChart = oDoc.CreateChart("My Chart", "Sheet1", "Sheet1.A1:C10")
+  
+  Read the CreateChart method description to learn more 
about its arguments.
+
+  
+  The examples above 
can be written in Python as follows:
+  
+from 
scriptforge import CreateScriptService
+doc = 
CreateScriptService("Calc")
+chart 
= doc.Charts("Sheet1", "Object 1")
+  
+  
+doc = 
CreateScriptService("Calc")
+chart 
= doc.CreateChart("My Chart", "Sheet1", "Sheet1.A1:C10")
+  
+
+  
+Chart service;ChartType
+Chart service;Deep
+Chart service;Dim3D
+Chart service;Exploded
+Chart s

[Libreoffice-commits] core.git: helpcontent2

2021-10-29 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e357cfdc8cda9878ebbc61645e8557a474871d47
Author: Rafael Lima 
AuthorDate: Fri Oct 29 22:41:48 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Fri Oct 29 22:41:48 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 3445df8b3761cc8dafd0f5a275696ad54dc9bbec
  - Create help page for SF_Chart service

Change-Id: Ie244e4416d2b523dfe460701297f6ecfc81f964d
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/124195
Tested-by: Jenkins
Reviewed-by: Rafael Lima 

diff --git a/helpcontent2 b/helpcontent2
index 7f8b84bbf7fd..3445df8b3761 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 7f8b84bbf7fda91426d01bab26b5fa0d148624a1
+Subproject commit 3445df8b3761cc8dafd0f5a275696ad54dc9bbec


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sw/source

2021-10-29 Thread Michael Meeks (via logerrit)
 sw/source/uibase/shells/langhelper.cxx |5 +++--
 sw/source/uibase/shells/textsh1.cxx|5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit a613204272151bc533ace9c2794dc812e06aba27
Author: Michael Meeks 
AuthorDate: Fri Oct 29 19:39:21 2021 +0100
Commit: Aron Budea 
CommitDate: Fri Oct 29 22:45:23 2021 +0200

tdf#145386 Avoid LANGUAGE_PROCESS_OR_USER_DEFAULT messing up the status bar.

Importing a simple .doc gives this language code in various bits
of logic, unexpectedly - which then results in very odd
FeatureStateEvents containing state like this:

  uno::Sequence of length 4 = {"{en-US};en-US", "1", "", "Doc.doc"}

where really they should be:

  uno::Sequence of length 4 = {"English (USA);en-US", "1", "", "Doc.doc"}

and worse - that looks like JSON.

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

diff --git a/sw/source/uibase/shells/langhelper.cxx 
b/sw/source/uibase/shells/langhelper.cxx
index 32a6cb1a5793..27326c973fb0 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -39,6 +39,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -75,14 +76,14 @@ namespace SwLangHelper
 
 vcl::Window* pWin = rEditView.GetWindow();
 if(pWin)
-nLang = pWin->GetInputLanguage();
+nLang = MsLangId::getRealLanguage( pWin->GetInputLanguage() );
 if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
 aKeyboardLang = SvtLanguageTable::GetLanguageString( nLang );
 
 // get the language that is in use
 OUString aCurrentLang("*");
 SfxItemSet aSet(pOLV->GetAttribs());
-nLang = SwLangHelper::GetCurrentLanguage( aSet,nScriptType );
+nLang = MsLangId::getRealLanguage( SwLangHelper::GetCurrentLanguage( 
aSet,nScriptType ) );
 if (nLang != LANGUAGE_DONTKNOW)
 aCurrentLang = SvtLanguageTable::GetLanguageString( nLang );
 
diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 630d54a2efc6..e7747e36db76 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -26,6 +26,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1623,13 +1624,13 @@ void SwTextShell::GetState( SfxItemSet &rSet )
 // get keyboard language
 OUString aKeyboardLang;
 SwEditWin& rEditWin = GetView().GetEditWin();
-LanguageType nLang = rEditWin.GetInputLanguage();
+LanguageType nLang = MsLangId::getRealLanguage( 
rEditWin.GetInputLanguage() );
 if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
 aKeyboardLang = SvtLanguageTable::GetLanguageString( nLang 
);
 
 // get the language that is in use
 OUString aCurrentLang = "*";
-nLang = SwLangHelper::GetCurrentLanguage( rSh );
+nLang = MsLangId::getRealLanguage( 
SwLangHelper::GetCurrentLanguage( rSh ) );
 if (nLang != LANGUAGE_DONTKNOW)
 {
 aCurrentLang = SvtLanguageTable::GetLanguageString( nLang 
);


[Libreoffice-commits] core.git: Branch 'feature/wasm' - 52 commits - accessibility/Library_acc.mk accessibility/source avmedia/Library_avmedia.mk avmedia/Module_avmedia.mk avmedia/source basctl/Librar

2021-10-29 Thread Jan-Marek Glogowski (via logerrit)
Rebased ref, commits from common ancestor:
commit a4f54cfbe5877fad9c12e8c77f2f951e7719fdc9
Author: Jan-Marek Glogowski 
AuthorDate: Fri Oct 29 22:24:12 2021 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Fri Oct 29 22:24:17 2021 +0200

Qt5 don't create a window handle for non-xcb

Fix the non-hidden main fallback window and the native menu bar
overlay window for WASM.

Change-Id: I6b6edfa26466814cb0500116098eafcbe41bba26

diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx
index 57d9c2220ecf..00cd5142c2e3 100644
--- a/include/vcl/sysdata.hxx
+++ b/include/vcl/sysdata.hxx
@@ -62,7 +62,7 @@ struct VCL_DLLPUBLIC SystemEnvData
 #elif defined( IOS )
 // Nothing
 #elif defined( UNX )
-enum class Platform { Wayland, Xcb };
+enum class Platform { Wayland, Xcb, WASM };
 
 void*   pDisplay;   // the relevant display connection
 SalFrame*   pSalFrame;  // contains a salframe, if object has 
one
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index d6db37d21579..364b7afd2f04 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -181,13 +181,21 @@ QtFrame::QtFrame(QtFrame* pParent, SalFrameStyleFlags 
nStyle, bool bUseCairo)
 pChildWindow->setTransientParent(pParentWindow);
 }
 
+if (QGuiApplication::platformName() == "wayland")
+m_aSystemData.platform = SystemEnvData::Platform::Wayland;
+else if (QGuiApplication::platformName() == "xcb")
+m_aSystemData.platform = SystemEnvData::Platform::Xcb;
+else if (QGuiApplication::platformName() == "wasm")
+m_aSystemData.platform = SystemEnvData::Platform::WASM;
+else
+std::abort();
+
 // Calling 'QWidget::winId()' implicitly enables native windows to be used
 // rather than "alien widgets" that are unknown to the windowing system,
 // s. https://doc.qt.io/qt-5/qwidget.html#native-widgets-vs-alien-widgets
 // Avoid this on Wayland due to problems with missing 'mouseMoveEvent's,
 // s. tdf#122293/QTBUG-75766
-const bool bWayland = QGuiApplication::platformName() == "wayland";
-if (!bWayland)
+if (m_aSystemData.platform == SystemEnvData::Platform::Xcb)
 m_aSystemData.SetWindowHandle(m_pQWidget->winId());
 else
 {
@@ -204,10 +212,6 @@ QtFrame::QtFrame(QtFrame* pParent, SalFrameStyleFlags 
nStyle, bool bUseCairo)
 m_aSystemData.pWidget = m_pQWidget;
 //m_aSystemData.nScreen = m_nXScreen.getXScreen();
 m_aSystemData.toolkit = SystemEnvData::Toolkit::Qt;
-if (!bWayland)
-m_aSystemData.platform = SystemEnvData::Platform::Xcb;
-else
-m_aSystemData.platform = SystemEnvData::Platform::Wayland;
 
 SetIcon(SV_ICON_ID_OFFICE);
 
@@ -224,7 +228,7 @@ void QtFrame::fixICCCMwindowGroup()
 return;
 g_bNeedsWmHintsWindowGroup = false;
 
-if (QGuiApplication::platformName() != "xcb")
+if (m_aSystemData.platform != SystemEnvData::Platform::Xcb)
 return;
 if (QVersionNumber::fromString(qVersion()) >= QVersionNumber(5, 12))
 return;
@@ -1256,7 +1260,7 @@ void QtFrame::SetScreenNumber(unsigned int nScreen)
 void QtFrame::SetApplicationID(const OUString& rWMClass)
 {
 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT5_USING_X11
-if (QGuiApplication::platformName() != "xcb" || !m_pTopLevel)
+if (m_aSystemData.platform != SystemEnvData::Platform::Xcb || !m_pTopLevel)
 return;
 
 OString aResClass = OUStringToOString(rWMClass, RTL_TEXTENCODING_ASCII_US);
commit d113809547b9eee936e13d2b9d3a7ed5ce624ffe
Author: Jan-Marek Glogowski 
AuthorDate: Fri Oct 29 21:04:21 2021 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Fri Oct 29 21:04:21 2021 +0200

LibreOfficeWASM32 defaults are now in configure.ac

Change-Id: I6d578abba0368efe12c85f8bc72b49484a76dbb7

diff --git a/distro-configs/LibreOfficeWASM32.conf 
b/distro-configs/LibreOfficeWASM32.conf
index 962b76a55302..b4a3f1dc6ae7 100644
--- a/distro-configs/LibreOfficeWASM32.conf
+++ b/distro-configs/LibreOfficeWASM32.conf
@@ -1,5 +1 @@
 --host=wasm32-local-emscripten
---enable-services-rdb-from-build
---enable-wasm-strip
---disable-gtk3
---enable-qt5
commit b61246582322d843edf34aa02d14292810a82fb5
Author: Jan-Marek Glogowski 
AuthorDate: Fri Oct 29 20:32:43 2021 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Fri Oct 29 20:42:00 2021 +0200

Minimize bridge code

This way it doesn't fail the optimized build.

Change-Id: I7d1b1e56da359835373ce093bb18df8219a09aac

diff --git a/bridges/source/cpp_uno/gcc3_wasm/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_wasm/cpp2uno.cxx
index 90e1d372da03..fd7fa817588a 100644
--- a/bridges/source/cpp_uno/gcc3_wasm/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_wasm/cpp2uno.cxx
@@ -5,536 +5,43 @@
  * 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://mozill

Simple Mode (Expanded)

2021-10-29 Thread o lu
> ‐‐‐ Original Message ‐‐‐
> On Tuesday, October 26th, 2021 at 6:36 PM, o lu  
> wrote:
>
>> I wanted to start this here instead of opening a bug.
>>
>> The menus and toolbars in Writer are overwhelming and complex.
>>
>> I think there should be a simple mode, akin to something like Apple Pages (I 
>> only work in Writer at this point).
>>
>> Any thoughts or questions?

On second thought, copying the Pages UI is nto a good idea. I was looking at 
some of the screenshots on the web, and it seems too simple, or not really 
conducive to editing. I am still for the idea that it might provide a good 
starting point (Like only 10 icons visible initially, with sidebars for just 
about everything).

Please take this as constructive criticism: This would be (partially) doable by 
users if one had the ability to customize the toolbars (and the ribbon in 
particular), as I see alot of sidebars already.

What do you guys think?

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

2021-10-29 Thread Luboš Luňák (via logerrit)
 i18npool/source/breakiterator/xdictionary.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5b38b5744af1e896892df708c16b83e1b551d2c7
Author: Luboš Luňák 
AuthorDate: Fri Oct 29 14:20:57 2021 +0200
Commit: Luboš Luňák 
CommitDate: Fri Oct 29 23:53:19 2021 +0200

fix comparison when searching cache

This made the cache always fail and re-cache, making CJK text layout
slower over time. A mistake from ef513fd4b049b214a03fbe6e that
converted !strcmp() to != instead of ==.

Change-Id: Ib70579cd36d7b1df062e4d067e03f5c65e34b142
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124432
Reviewed-by: Noel Grandin 
Reviewed-by: Luboš Luňák 
Tested-by: Luboš Luňák 

diff --git a/i18npool/source/breakiterator/xdictionary.cxx 
b/i18npool/source/breakiterator/xdictionary.cxx
index 9134fbc4be13..dd1f83f8baa7 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -151,7 +151,7 @@ void xdictionary::initDictionaryData(const char *pLang)
 osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() );
 for(const datacache & i : aLoadedCache)
 {
-if( i.maLang != pLang )
+if( i.maLang == pLang )
 {
 data = i.maData;
 return;


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - i18npool/source

2021-10-29 Thread Luboš Luňák (via logerrit)
 i18npool/source/breakiterator/xdictionary.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d1a0bb1257f868c1424e503a872af8dd4cb4c7b0
Author: Luboš Luňák 
AuthorDate: Fri Oct 29 14:20:57 2021 +0200
Commit: Luboš Luňák 
CommitDate: Fri Oct 29 23:53:40 2021 +0200

fix comparison when searching cache

This made the cache always fail and re-cache, making CJK text layout
slower over time. A mistake from ef513fd4b049b214a03fbe6e that
converted !strcmp() to != instead of ==.

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

diff --git a/i18npool/source/breakiterator/xdictionary.cxx 
b/i18npool/source/breakiterator/xdictionary.cxx
index 947a23c5073b..6b57433370c7 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -152,7 +152,7 @@ void xdictionary::initDictionaryData(const char *pLang)
 osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() );
 for(const datacache & i : aLoadedCache)
 {
-if( i.maLang != pLang )
+if( i.maLang == pLang )
 {
 data = i.maData;
 return;


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

2021-10-29 Thread Xisco Fauli (via logerrit)
 sd/qa/uitest/impress_tests/save_readonly_with_password.py |   54 ++
 1 file changed, 54 insertions(+)

New commits:
commit 1d09e7da3047579b394897aec4b48d8af444b05b
Author: Xisco Fauli 
AuthorDate: Fri Oct 29 18:02:21 2021 +0200
Commit: Xisco Fauli 
CommitDate: Sat Oct 30 00:06:16 2021 +0200

sd: uitest: test "save to ODP as read-only with password protection"

Similar to the UItest added in 1b53c1dfc76f08ca7df40a0673aa50eca700d072
< tdf#144374 DOCX: export the password for editing > for the DOCX format

Change-Id: I4e6914d5224ba051d68ffebaffcadaa16c8f349b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124445
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sd/qa/uitest/impress_tests/save_readonly_with_password.py 
b/sd/qa/uitest/impress_tests/save_readonly_with_password.py
new file mode 100644
index ..3f789035d0a8
--- /dev/null
+++ b/sd/qa/uitest/impress_tests/save_readonly_with_password.py
@@ -0,0 +1,54 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from org.libreoffice.unotest import systemPathToFileUrl
+from uitest.uihelper.common import select_by_text
+from tempfile import TemporaryDirectory
+import os.path
+
+class save_readonly_with_password(UITestCase):
+
+   def test_save_to_odp(self):
+
+with TemporaryDirectory() as tempdir:
+xFilePath = os.path.join(tempdir, "readonly_with_password_tmp.odp")
+
+with self.ui_test.create_doc_in_start_center("impress"):
+xTemplateDlg = self.xUITest.getTopFocusWindow()
+xCancelBtn = xTemplateDlg.getChild("close")
+self.ui_test.close_dialog_through_button(xCancelBtn)
+
+# Save the document
+with self.ui_test.execute_dialog_through_command(".uno:Save", 
close_button="") as xSaveDialog:
+xFileName = xSaveDialog.getChild("file_name")
+xFileName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
+xFileName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": 
xFilePath}))
+xPasswordCheckButton = xSaveDialog.getChild("password")
+xPasswordCheckButton.executeAction("CLICK", tuple())
+xOpen = xSaveDialog.getChild("open")
+
+with self.ui_test.execute_dialog_through_action(xOpen, 
"CLICK") as xPasswordDialog:
+xReadonly = xPasswordDialog.getChild("readonly")
+xReadonly.executeAction("CLICK", tuple())
+xNewPassword = 
xPasswordDialog.getChild("newpassroEntry")
+xNewPassword.executeAction("TYPE", 
mkPropertyValues({"TEXT": "password"}))
+xConfirmPassword = 
xPasswordDialog.getChild("confirmropassEntry")
+xConfirmPassword.executeAction("TYPE", 
mkPropertyValues({"TEXT": "password"}))
+
+with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as 
document:
+
+self.assertTrue(document.isReadonly())
+
+with 
self.ui_test.execute_dialog_through_command(".uno:EditDoc") as xDialog:
+xPassword = xDialog.getChild("newpassEntry")
+xPassword.executeAction("TYPE", mkPropertyValues({"TEXT": 
"password"}))
+
+self.assertFalse(document.isReadonly())
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:


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

2021-10-29 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/calc_tests7/save_readonly_with_password.py |   91 
 1 file changed, 91 insertions(+)

New commits:
commit 1e562859d597e2523159d93d04e205017da092f4
Author: Xisco Fauli 
AuthorDate: Fri Oct 29 17:36:40 2021 +0200
Commit: Xisco Fauli 
CommitDate: Sat Oct 30 00:07:13 2021 +0200

sc: uitest: test "save to ODS/XLSX as read-only with password protection"

Similar to the UItest added in 1b53c1dfc76f08ca7df40a0673aa50eca700d072
< tdf#144374 DOCX: export the password for editing > for the DOCX format

Change-Id: I4e9349044355107bbf015fc821e330dfb8005922
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124443
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/uitest/calc_tests7/save_readonly_with_password.py 
b/sc/qa/uitest/calc_tests7/save_readonly_with_password.py
new file mode 100644
index ..c930b3ece9cd
--- /dev/null
+++ b/sc/qa/uitest/calc_tests7/save_readonly_with_password.py
@@ -0,0 +1,91 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from org.libreoffice.unotest import systemPathToFileUrl
+from uitest.uihelper.common import select_by_text
+from tempfile import TemporaryDirectory
+import os.path
+
+class save_readonly_with_password(UITestCase):
+
+   def test_save_to_xlsx(self):
+
+with TemporaryDirectory() as tempdir:
+xFilePath = os.path.join(tempdir, 
"readonly_with_password_tmp.xlsx")
+
+with self.ui_test.create_doc_in_start_center("calc"):
+# Save the document
+with self.ui_test.execute_dialog_through_command(".uno:Save", 
close_button="") as xSaveDialog:
+xFileName = xSaveDialog.getChild("file_name")
+xFileName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
+xFileName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": 
xFilePath}))
+xFileTypeCombo = xSaveDialog.getChild("file_type")
+select_by_text(xFileTypeCombo, "Excel 2007–365 (.xlsx)")
+xPasswordCheckButton = xSaveDialog.getChild("password")
+xPasswordCheckButton.executeAction("CLICK", tuple())
+xOpen = xSaveDialog.getChild("open")
+
+with self.ui_test.execute_dialog_through_action(xOpen, 
"CLICK") as xPasswordDialog:
+xReadonly = xPasswordDialog.getChild("readonly")
+xReadonly.executeAction("CLICK", tuple())
+xNewPassword = 
xPasswordDialog.getChild("newpassroEntry")
+xNewPassword.executeAction("TYPE", 
mkPropertyValues({"TEXT": "password"}))
+xConfirmPassword = 
xPasswordDialog.getChild("confirmropassEntry")
+xConfirmPassword.executeAction("TYPE", 
mkPropertyValues({"TEXT": "password"}))
+
+# XLSX confirmation dialog is displayed
+xWarnDialog = self.xUITest.getTopFocusWindow()
+xSave = xWarnDialog.getChild("save")
+self.ui_test.close_dialog_through_button(xSave)
+
+with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as 
document:
+
+self.assertTrue(document.isReadonly())
+
+with 
self.ui_test.execute_dialog_through_command(".uno:EditDoc") as xDialog:
+xPassword = xDialog.getChild("newpassEntry")
+xPassword.executeAction("TYPE", mkPropertyValues({"TEXT": 
"password"}))
+
+self.assertFalse(document.isReadonly())
+
+   def test_save_to_ods(self):
+
+with TemporaryDirectory() as tempdir:
+xFilePath = os.path.join(tempdir, "readonly_with_password_tmp.ods")
+
+with self.ui_test.create_doc_in_start_center("calc"):
+# Save the document
+with self.ui_test.execute_dialog_through_command(".uno:Save", 
close_button="") as xSaveDialog:
+xFileName = xSaveDialog.getChild("file_name")
+xFileName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
+xFileName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": 
xFilePath}))
+xPasswordCheckButton = xSaveDialog.getChild("password")
+xPasswordCheckButton.executeAction("CLICK", tuple())
+xOpen = xSaveDialog.getChild("open")
+
+with

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

2021-10-29 Thread Mike Kaganski (via logerrit)
 embedserv/source/embed/docholder.cxx  |   24 +++-
 embedserv/source/embed/ed_ipersiststr.cxx |   33 ++
 embedserv/source/embed/intercept.cxx  |   44 --
 embedserv/source/inc/intercept.hxx|2 -
 4 files changed, 46 insertions(+), 57 deletions(-)

New commits:
commit 52f6aa4bf1047f98ab9884799baa104bca9d2a47
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 09:35:32 2021 +0300
Commit: Mike Kaganski 
CommitDate: Sat Oct 30 00:30:25 2021 +0200

Prepare for removal of non-const operator[] from Sequence in embedserv

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

diff --git a/embedserv/source/embed/docholder.cxx 
b/embedserv/source/embed/docholder.cxx
index cfa7cb87e88c..e79c26a2a0d5 100644
--- a/embedserv/source/embed/docholder.cxx
+++ b/embedserv/source/embed/docholder.cxx
@@ -60,6 +60,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -111,22 +112,22 @@ void DocumentHolder::LoadDocInFrame( bool bPluginMode )
 uno::Reference< task::XInteractionHandler2 > xHandler(
 
task::InteractionHandler::createWithParent(comphelper::getComponentContext(m_xFactory),
 nullptr) );
 
-sal_Int32 nLen = 3;
+sal_Int32 nLen = bPluginMode ? 6 : 5;
 uno::Sequence aSeq( nLen );
-
-aSeq[0] = beans::PropertyValue(
+auto pSeq = aSeq.getArray();
+pSeq[0] = beans::PropertyValue(
 "Model",
 -1,
 uno::Any(uno::Reference(m_xDocument, 
uno::UNO_QUERY)),
 beans::PropertyState_DIRECT_VALUE);
 
-aSeq[1] = beans::PropertyValue(
+pSeq[1] = beans::PropertyValue(
 "ReadOnly",
 -1,
 uno::Any(false),
 beans::PropertyState_DIRECT_VALUE);
 
-aSeq[2] = beans::PropertyValue(
+pSeq[2] = beans::PropertyValue(
 "NoAutoSave",
 -1,
 uno::Any(true),
@@ -134,22 +135,20 @@ void DocumentHolder::LoadDocInFrame( bool bPluginMode )
 
 if ( bPluginMode )
 {
-aSeq.realloc( ++nLen );
-aSeq[nLen-1] = beans::PropertyValue(
+pSeq[3] = beans::PropertyValue(
 "PluginMode",
 -1,
 uno::Any(sal_Int16(3)),
 beans::PropertyState_DIRECT_VALUE);
 }
 
-aSeq.realloc( nLen+=2 );
-aSeq[nLen-2] = beans::PropertyValue(
+pSeq[nLen-2] = beans::PropertyValue(
 "InteractionHandler",
 -1,
 uno::Any(xHandler),
 beans::PropertyState_DIRECT_VALUE);
 
-aSeq[nLen-1] = beans::PropertyValue(
+pSeq[nLen-1] = beans::PropertyValue(
 "MacroExecutionMode",
 -1,
 uno::Any(m_nMacroExecMode),
@@ -701,9 +700,8 @@ void DocumentHolder::SetDocument( const uno::Reference< 
frame::XModel >& xDoc, b
 if ( m_xDocument.is() && !m_bLink )
 {
 // set the document mode to embedded
-uno::Sequence< beans::PropertyValue > aSeq(1);
-aSeq[0].Name = "SetEmbedded";
-aSeq[0].Value <<= true;
+uno::Sequence< beans::PropertyValue > aSeq{ 
comphelper::makePropertyValue("SetEmbedded",
+   
   true) };
 m_xDocument->attachResource(OUString(),aSeq);
 }
 }
diff --git a/embedserv/source/embed/ed_ipersiststr.cxx 
b/embedserv/source/embed/ed_ipersiststr.cxx
index c23141636de0..698bbe13f586 100644
--- a/embedserv/source/embed/ed_ipersiststr.cxx
+++ b/embedserv/source/embed/ed_ipersiststr.cxx
@@ -195,22 +195,21 @@ EmbedDocument_Impl::~EmbedDocument_Impl()
 
 uno::Sequence< beans::PropertyValue > 
EmbedDocument_Impl::fillArgsForLoading_Impl( uno::Reference< io::XInputStream > 
const & xStream, DWORD /*nStreamMode*/, LPCOLESTR pFilePath )
 {
-uno::Sequence< beans::PropertyValue > aArgs( 3 );
-
-sal_Int32 nInd = 0; // must not be bigger than the preset size
-aArgs[nInd].Name = "FilterName";
-aArgs[nInd++].Value <<= getFilterNameFromGUID_Impl( &m_guid );
+uno::Sequence< beans::PropertyValue > aArgs( xStream.is() ? 3 : 2 );
+auto pArgs = aArgs.getArray();
+pArgs[0].Name = "FilterName";
+pArgs[0].Value <<= getFilterNameFromGUID_Impl( &m_guid );
 
 if ( xStream.is() )
 {
-aArgs[nInd].Name = "InputStream";
-aArgs[nInd++].Value <<= xStream;
-aArgs[nInd].Name = "URL";
-aArgs[nInd++].Value <<= OUString( "private:stream" );
+pArgs[1].Name = "InputStream";
+pArgs[1].Value <<= xStream;
+pArgs[2].Name = "URL";
+pArgs[2].Value <<= OUString( "private:stream" );
 }
 else
 {
-aArgs[nInd].Name = "URL";
+pArgs[1].Name = "URL";
 
 OUString sDocUrl;
 if ( pFilePa

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

2021-10-29 Thread Mike Kaganski (via logerrit)
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |4 
 editeng/source/items/frmitems.cxx   |   34 +--
 editeng/source/items/paraitem.cxx   |   18 -
 editeng/source/items/textitem.cxx   |3 
 editeng/source/misc/hangulhanja.cxx |5 
 embeddedobj/source/commonembedding/embedobj.cxx |4 
 embeddedobj/source/commonembedding/miscobj.cxx  |   46 +---
 embeddedobj/source/commonembedding/persistence.cxx  |  125 
 embeddedobj/source/general/docholder.cxx|   48 +---
 embeddedobj/source/general/dummyobject.cxx  |5 
 embeddedobj/source/general/intercept.cxx|   37 +--
 embeddedobj/source/inc/intercept.hxx|2 
 embeddedobj/source/msole/graphconvert.cxx   |   15 -
 embeddedobj/source/msole/olecomponent.cxx   |   39 ++-
 embeddedobj/source/msole/oleembed.cxx   |   38 +--
 embeddedobj/source/msole/olepersist.cxx |   43 +---
 embeddedobj/source/msole/ownview.cxx|   37 +--
 embeddedobj/source/msole/xdialogcreator.cxx |   13 -
 18 files changed, 238 insertions(+), 278 deletions(-)

New commits:
commit e3d1fb97fcdff75424d4a116f29e8550f94f8a42
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 09:34:44 2021 +0300
Commit: Mike Kaganski 
CommitDate: Sat Oct 30 00:30:58 2021 +0200

Prepare for removal of non-const operator[] from Sequence in embeddedobj

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

diff --git a/embeddedobj/source/commonembedding/embedobj.cxx 
b/embeddedobj/source/commonembedding/embedobj.cxx
index 0b1154394651..223f25e6302c 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -193,8 +193,8 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 
nNextState )
 else
 {
 // objects without persistence will be initialized 
internally
-uno::Sequence < uno::Any > aArgs(1);
-aArgs[0] <<= uno::Reference < embed::XEmbeddedObject >( 
this );
+uno::Sequence < uno::Any > aArgs{ uno::Any(
+uno::Reference < embed::XEmbeddedObject >( this )) };
 uno::Reference< util::XCloseable > xDocument(
 
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( 
GetDocumentServiceName(), aArgs, m_xContext),
 uno::UNO_QUERY );
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx 
b/embeddedobj/source/commonembedding/miscobj.cxx
index 1e107e36c491..9c24185ed184 100644
--- a/embeddedobj/source/commonembedding/miscobj.cxx
+++ b/embeddedobj/source/commonembedding/miscobj.cxx
@@ -42,6 +42,8 @@
 
 #include "persistence.hxx"
 
+#include 
+
 using namespace ::com::sun::star;
 
 
@@ -123,13 +125,12 @@ void OCommonEmbeddedObject::CommonInit_Impl( const 
uno::Sequence< beans::NamedVa
 throw uno::RuntimeException(); // something goes really wrong
 
 // accepted states
-m_aAcceptedStates.realloc( NUM_SUPPORTED_STATES );
-
-m_aAcceptedStates[0] = embed::EmbedStates::LOADED;
-m_aAcceptedStates[1] = embed::EmbedStates::RUNNING;
-m_aAcceptedStates[2] = embed::EmbedStates::INPLACE_ACTIVE;
-m_aAcceptedStates[3] = embed::EmbedStates::UI_ACTIVE;
-m_aAcceptedStates[4] = embed::EmbedStates::ACTIVE;
+m_aAcceptedStates = { /* [0] */ embed::EmbedStates::LOADED,
+  /* [1] */ embed::EmbedStates::RUNNING,
+  /* [2] */ embed::EmbedStates::INPLACE_ACTIVE,
+  /* [3] */ embed::EmbedStates::UI_ACTIVE,
+  /* [4] */ embed::EmbedStates::ACTIVE };
+assert(m_aAcceptedStates.getLength() == NUM_SUPPORTED_STATES);
 
 
 // intermediate states
@@ -141,31 +142,23 @@ void OCommonEmbeddedObject::CommonInit_Impl( const 
uno::Sequence< beans::NamedVa
 // state to the target state is forbidden, only if direct switch is 
possible
 // the state can be reached.
 
-m_pIntermediateStatesSeqs[0][2].realloc( 1 );
-m_pIntermediateStatesSeqs[0][2][0] = embed::EmbedStates::RUNNING;
+m_pIntermediateStatesSeqs[0][2] = { embed::EmbedStates::RUNNING };
 
-m_pIntermediateStatesSeqs[0][3].realloc( 2 );
-m_pIntermediateStatesSeqs[0][3][0] = embed::EmbedStates::RUNNING;
-m_pIntermediateStatesSeqs[0][3][1] = embed::EmbedStates::INPLACE_ACTIVE;
+m_pIntermediateStatesSeqs[0][3] = { embed::EmbedStates::RUNNING,
+embed::EmbedStates::INPLACE_ACTIVE };
 
-m_pIntermediateStatesSeqs[0][4].realloc( 1 );
-

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

2021-10-29 Thread Noel Grandin (via logerrit)
 filter/source/xslt/odf2xhtml/export/common/body.xsl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6c747ccf6cbfe0dc5d591f8ce68a1ca6c63cde53
Author: Noel Grandin 
AuthorDate: Fri Oct 29 14:31:19 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Oct 30 07:45:21 2021 +0200

tdf#145361 fix XSLT for older libxslt

regression from
commit 3eb870f0843a00042ca7dd89837fbe0cc6f918c2
Author: Noel 
Date:   Fri Feb 26 12:45:19 2021 +0200
fix xhtml list export in other locales
where I used 'replace' which is not available on older libxslt, so
switch to 'translate' which works just as well here, and is available

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

diff --git a/filter/source/xslt/odf2xhtml/export/common/body.xsl 
b/filter/source/xslt/odf2xhtml/export/common/body.xsl
index 9b10e56187bf..bcad3abd9ab3 100644
--- a/filter/source/xslt/odf2xhtml/export/common/body.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/body.xsl
@@ -106,7 +106,7 @@
 
 
 
-margin-left:cm
+margin-left:cm
 
 
 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - i18npool/source

2021-10-29 Thread Luboš Luňák (via logerrit)
 i18npool/source/breakiterator/xdictionary.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1924289f1a1f0b41abdef6bab7215b89dc407d84
Author: Luboš Luňák 
AuthorDate: Fri Oct 29 14:20:57 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Oct 30 07:47:58 2021 +0200

fix comparison when searching cache

This made the cache always fail and re-cache, making CJK text layout
slower over time. A mistake from ef513fd4b049b214a03fbe6e that
converted !strcmp() to != instead of ==.

Change-Id: Ib70579cd36d7b1df062e4d067e03f5c65e34b142
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124432
Reviewed-by: Noel Grandin 
Reviewed-by: Luboš Luňák 
Tested-by: Luboš Luňák 
(cherry picked from commit 5b38b5744af1e896892df708c16b83e1b551d2c7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124205
Tested-by: Jenkins

diff --git a/i18npool/source/breakiterator/xdictionary.cxx 
b/i18npool/source/breakiterator/xdictionary.cxx
index 25dc8bb0ee9b..298a1c0665c9 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -152,7 +152,7 @@ void xdictionary::initDictionaryData(const char *pLang)
 osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() );
 for(const datacache & i : aLoadedCache)
 {
-if( i.maLang != pLang )
+if( i.maLang == pLang )
 {
 data = i.maData;
 return;


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - i18npool/source

2021-10-29 Thread Luboš Luňák (via logerrit)
 i18npool/source/breakiterator/xdictionary.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a94b58277c7aeaa83ce14347cd0b8f7137969d03
Author: Luboš Luňák 
AuthorDate: Fri Oct 29 14:20:57 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Oct 30 07:48:04 2021 +0200

fix comparison when searching cache

This made the cache always fail and re-cache, making CJK text layout
slower over time. A mistake from ef513fd4b049b214a03fbe6e that
converted !strcmp() to != instead of ==.

Change-Id: Ib70579cd36d7b1df062e4d067e03f5c65e34b142
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124432
Reviewed-by: Noel Grandin 
Reviewed-by: Luboš Luňák 
Tested-by: Luboš Luňák 
(cherry picked from commit 5b38b5744af1e896892df708c16b83e1b551d2c7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124206
Tested-by: Jenkins

diff --git a/i18npool/source/breakiterator/xdictionary.cxx 
b/i18npool/source/breakiterator/xdictionary.cxx
index 947a23c5073b..6b57433370c7 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -152,7 +152,7 @@ void xdictionary::initDictionaryData(const char *pLang)
 osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() );
 for(const datacache & i : aLoadedCache)
 {
-if( i.maLang != pLang )
+if( i.maLang == pLang )
 {
 data = i.maData;
 return;


[Libreoffice-commits] core.git: include/comphelper

2021-10-29 Thread Mike Kaganski (via logerrit)
 include/comphelper/sequence.hxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 00a76942e423589e3fdd4e059be753eab3393344
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 16:23:53 2021 +0200
Commit: Mike Kaganski 
CommitDate: Sat Oct 30 08:01:28 2021 +0200

Optimize comphelper::arrayToSequence for same types case

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

diff --git a/include/comphelper/sequence.hxx b/include/comphelper/sequence.hxx
index a42ef2d2f341..1aa3fbea803d 100644
--- a/include/comphelper/sequence.hxx
+++ b/include/comphelper/sequence.hxx
@@ -121,9 +121,14 @@ namespace comphelper
 template < typename DstType, typename SrcType >
 inline css::uno::Sequence< DstType > arrayToSequence( const SrcType* 
i_pArray, sal_Int32 nNum )
 {
-css::uno::Sequence< DstType > result( nNum );
-::std::copy( i_pArray, i_pArray+nNum, result.getArray() );
-return result;
+if constexpr (std::is_same_v< DstType, SrcType >)
+return css::uno::Sequence< DstType >( i_pArray, nNum );
+else
+{
+css::uno::Sequence< DstType > result( nNum );
+::std::copy( i_pArray, i_pArray+nNum, result.getArray() );
+return result;
+}
 }
 
 


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

2021-10-29 Thread Mike Kaganski (via logerrit)
 eventattacher/source/eventattacher.cxx  |3 +
 extensions/qa/update/test_update.cxx|3 -
 extensions/source/abpilot/unodialogabp.cxx  |4 +-
 extensions/source/bibliography/framectr.cxx |   13 +++---
 extensions/source/bibliography/general.cxx  |4 +-
 extensions/source/config/ldap/ldapuserprofilebe.cxx |3 -
 extensions/source/logging/loggerconfig.cxx  |   10 +
 extensions/source/ole/oleobjw.cxx   |   14 ---
 extensions/source/ole/unoconversionutilities.hxx|5 +-
 extensions/source/ole/unoobjw.cxx   |9 ++--
 extensions/source/propctrlr/browserline.cxx |5 +-
 extensions/source/propctrlr/buttonnavigationhandler.cxx |4 --
 extensions/source/propctrlr/cellbindinghandler.cxx  |7 +--
 extensions/source/propctrlr/cellbindinghelper.cxx   |8 
 extensions/source/propctrlr/controlfontdialog.cxx   |9 ++--
 extensions/source/propctrlr/eventhandler.cxx|   10 ++---
 extensions/source/propctrlr/formcontroller.cxx  |   32 
 extensions/source/propctrlr/genericpropertyhandler.cxx  |5 +-
 extensions/source/propctrlr/objectinspectormodel.cxx|3 -
 extensions/source/propctrlr/pcrunodialogs.cxx   |   27 +++--
 extensions/source/propctrlr/sqlcommanddesign.cxx|   22 ---
 extensions/source/propctrlr/stringrepresentation.cxx|2 -
 extensions/source/propctrlr/submissionhandler.cxx   |7 +--
 extensions/source/scanner/scanunx.cxx   |4 --
 extensions/source/update/check/download.cxx |3 -
 extensions/source/update/check/updatecheckconfig.cxx|7 +--
 extensions/source/update/check/updatehdl.cxx|3 -
 extensions/source/update/check/updateprotocol.cxx   |3 -
 extensions/source/update/feed/updatefeed.cxx|   14 +++
 extensions/source/update/ui/updatecheckui.cxx   |7 +--
 30 files changed, 113 insertions(+), 137 deletions(-)

New commits:
commit 9265b53978e1ed5a61db9941b5661b88d0efd31b
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 09:37:07 2021 +0300
Commit: Mike Kaganski 
CommitDate: Sat Oct 30 08:02:23 2021 +0200

Prepare for removal of non-const operator[] from Sequence in extensions

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

diff --git a/extensions/qa/update/test_update.cxx 
b/extensions/qa/update/test_update.cxx
index f99855dc6198..27d634b3b374 100644
--- a/extensions/qa/update/test_update.cxx
+++ b/extensions/qa/update/test_update.cxx
@@ -37,8 +37,7 @@ public:
 m_xProvider = deployment::UpdateInformationProvider::create( 
m_xContext );
 
 // repositories that we will be checking
-m_aRepositoryList.realloc( 1 );
-m_aRepositoryList[0] = m_directories.getURLFromSrc( 
u"/extensions/qa/update/simple.xml" );
+m_aRepositoryList = { m_directories.getURLFromSrc( 
u"/extensions/qa/update/simple.xml" ) };
 }
 
 virtual void tearDown() override
diff --git a/extensions/source/abpilot/unodialogabp.cxx 
b/extensions/source/abpilot/unodialogabp.cxx
index a9836d910535..dd878f03e5c3 100644
--- a/extensions/source/abpilot/unodialogabp.cxx
+++ b/extensions/source/abpilot/unodialogabp.cxx
@@ -105,8 +105,8 @@ namespace abp
 {
 Reference xParentWindow;
 if (aArguments.getLength() == 1 && (aArguments[0] >>= xParentWindow) ) 
{
-Sequence< Any > aNewArgs(1);
-aNewArgs[0] <<= PropertyValue( "ParentWindow", 0, 
makeAny(xParentWindow), PropertyState_DIRECT_VALUE );
+Sequence< Any > aNewArgs{ Any(PropertyValue(
+"ParentWindow", 0, makeAny(xParentWindow), 
PropertyState_DIRECT_VALUE )) };
 OGenericUnoDialog::initialize(aNewArgs);
 } else {
 OGenericUnoDialog::initialize(aArguments);
diff --git a/extensions/source/bibliography/framectr.cxx 
b/extensions/source/bibliography/framectr.cxx
index 8c1d6eefddc3..1c5f85c03f35 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -263,19 +263,18 @@ uno::Reference< frame::XDispatch >  
BibFrameController_Impl::queryDispatch( cons
 uno::Sequence > 
BibFrameController_Impl::queryDispatches( const 
uno::Sequence& aDescripts )
 {
 uno::Sequence< uno::Reference< XDispatch > > aDispatches( 
aDescripts.getLength() );
+auto aDispatchesRange = asNonConstRange(aDispatches);
 for ( sal_Int32 i=0; i SAL_CALL 
BibFrameController_Impl::getSupportedCommandGroups()
 {
-uno::Sequence< ::sal_Int16 > aDispatchInfo( 4 );
-
-aDispatchInfo[0] = frame::CommandGroup::EDIT;
-aDispatchInfo[1] = frame::CommandGroup::DOCUMENT;
-aDispatchInfo[2] = frame::CommandGroup::DATA;
-  

[Libreoffice-commits] core.git: 2 commits - filter/qa filter/source formula/source

2021-10-29 Thread Mike Kaganski (via logerrit)
 filter/qa/cppunit/xslt-test.cxx  |   43 -
 filter/source/config/cache/filtercache.cxx   |2 
 filter/source/graphic/GraphicExportFilter.cxx|2 
 filter/source/msfilter/escherex.cxx  |6 -
 filter/source/msfilter/msdffimp.cxx  |   84 ++-
 filter/source/msfilter/msoleexp.cxx  |   19 ++--
 filter/source/msfilter/mstoolbar.cxx |   24 ++---
 filter/source/msfilter/msvbahelper.cxx   |3 
 filter/source/pdf/pdfdialog.cxx  |5 -
 filter/source/pdf/pdfexport.cxx  |   40 +++--
 filter/source/pdf/pdffilter.cxx  |5 -
 filter/source/svg/svgexport.cxx  |   13 +-
 filter/source/svg/svgfilter.cxx  |2 
 filter/source/t602/t602filter.cxx|3 
 filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx  |8 -
 filter/source/xmlfilterdetect/filterdetect.cxx   |4 
 filter/source/xsltdialog/xmlfilterjar.cxx|   20 +---
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx |   72 ++--
 filter/source/xsltdialog/xmlfiltertestdialog.cxx |   49 ---
 filter/source/xsltfilter/OleHandler.cxx  |   24 ++---
 filter/source/xsltfilter/XSLTFilter.cxx  |   51 ++-
 formula/source/ui/dlg/formula.cxx|2 
 22 files changed, 206 insertions(+), 275 deletions(-)

New commits:
commit 8565e4ef18e96b9a68a4b75d551a80ce52128bd5
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 09:41:26 2021 +0300
Commit: Mike Kaganski 
CommitDate: Sat Oct 30 08:02:43 2021 +0200

Prepare for removal of non-const operator[] from Sequence in formula

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

diff --git a/formula/source/ui/dlg/formula.cxx 
b/formula/source/ui/dlg/formula.cxx
index 36b59d5eb0ec..d5510e92346d 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -419,7 +419,7 @@ sal_Int32 FormulaDlg_Impl::GetFunctionPos(sal_Int32 nPos)
 }
 if ( pNextToken != pEnd )
 {
-aArgs[0] = *pNextToken;
+aArgs.getArray()[0] = *pNextToken;
 const OUString a2String = xParser->printFormula( aArgs, 
aRefPos);
 const sal_Int32 n3 = nXXX < 0 ? -1 : aFormString.indexOf( 
a2String, nXXX);
 if (n3 < nTokPos && n3 != -1)
commit 7233e65db1a78f4764a05d4eb53c1df9e9bc9da6
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 09:37:53 2021 +0300
Commit: Mike Kaganski 
CommitDate: Sat Oct 30 08:02:32 2021 +0200

Prepare for removal of non-const operator[] from Sequence in filter

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

diff --git a/filter/qa/cppunit/xslt-test.cxx b/filter/qa/cppunit/xslt-test.cxx
index c3b27b2dbc24..de0e9e71f07a 100644
--- a/filter/qa/cppunit/xslt-test.cxx
+++ b/filter/qa/cppunit/xslt-test.cxx
@@ -96,16 +96,17 @@ void XsltFilterTest::testXsltCopyNew()
 
 OUString source(
 
m_directories.getURLFromSrc(u"/filter/source/xsltfilter/xsltfilter.component"));
-uno::Sequence args(7);
-args[0] <<= beans::NamedValue("StylesheetURL",
-
uno::makeAny(m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/xslt/copy.xslt")));
-args[1] <<= beans::NamedValue("SourceURL", uno::makeAny(source));
-args[2] <<= beans::NamedValue("TargetURL", uno::makeAny(tempURL));
-args[3] <<= beans::NamedValue("SourceBaseURL",
-
uno::makeAny(m_directories.getURLFromSrc(u"/filter/source/xsltfilter/")));
-args[4] <<= beans::NamedValue("TargetBaseURL", uno::makeAny(tempDirURL));
-args[5] <<= beans::NamedValue("SystemType", uno::makeAny(OUString()));
-args[6] <<= beans::NamedValue("PublicType", uno::makeAny(OUString()));
+uno::Sequence args{
+uno::Any(beans::NamedValue("StylesheetURL",
+
uno::makeAny(m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/xslt/copy.xslt",
+uno::Any(beans::NamedValue("SourceURL", uno::makeAny(source))),
+uno::Any(beans::NamedValue("TargetURL", uno::makeAny(tempURL))),
+uno::Any(beans::NamedValue("SourceBaseURL",
+
uno::makeAny(m_directories.getURLFromSrc(u"/filter/source/xsltfilter/",
+uno::Any(beans::NamedValue("TargetBaseURL", uno::makeAny(tempDirURL))),
+uno::Any(beans::NamedValue("SystemType", uno::makeAny(OUString(,
+uno::Any(beans::NamedValue("PublicType", uno::makeAny(OUString(
+};
 
 uno::Reference xSFA =
 ucb::SimpleFileAccess::create(getComponentContext());
@@ -150,17 +1

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

2021-10-29 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/writer_tests6/save_readonly_with_password.py |   48 +++---
 1 file changed, 41 insertions(+), 7 deletions(-)

New commits:
commit 3797007c2fe143dc3c83c72eeb5cc6d1cb401792
Author: Xisco Fauli 
AuthorDate: Fri Oct 29 17:53:10 2021 +0200
Commit: Xisco Fauli 
CommitDate: Sat Oct 30 08:41:07 2021 +0200

sw: uitest: test "save to ODT as read-only with password protection"

Similar to the UItest added in 1b53c1dfc76f08ca7df40a0673aa50eca700d072
< tdf#144374 DOCX: export the password for editing > for the DOCX format

Change-Id: Ifceab6bfb683a42db28e1836b173a850a342515a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/12
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/uitest/writer_tests6/tdf144374.py 
b/sw/qa/uitest/writer_tests6/save_readonly_with_password.py
similarity index 56%
rename from sw/qa/uitest/writer_tests6/tdf144374.py
rename to sw/qa/uitest/writer_tests6/save_readonly_with_password.py
index bdd0e59f05b2..c61e7d7b0c19 100644
--- a/sw/qa/uitest/writer_tests6/tdf144374.py
+++ b/sw/qa/uitest/writer_tests6/save_readonly_with_password.py
@@ -11,11 +11,11 @@ from uitest.uihelper.common import select_by_text
 from tempfile import TemporaryDirectory
 import os.path
 
-#Bug 144374 - Writer: FILESAVE to DOCX as read-only with additional password 
protection for editing not working
 
-class tdf144374(UITestCase):
+class save_readonly_with_password(UITestCase):
 
-   def test_tdf144374_DOCX(self):
+#Bug 144374 - Writer: FILESAVE to DOCX as read-only with additional 
password protection for editing not working
+   def test_save_to_docx(self):
 with TemporaryDirectory() as tempdir:
 xFilePath = os.path.join(tempdir, "tdf144374-tmp.docx")
 
@@ -45,14 +45,48 @@ class tdf144374(UITestCase):
 xSave = xWarnDialog.getChild("save")
 self.ui_test.close_dialog_through_button(xSave)
 
-with self.ui_test.load_file(systemPathToFileUrl(xFilePath)):
-xWriterEdit = 
self.xUITest.getTopFocusWindow().getChild("writer_edit")
-document = self.ui_test.get_component()
+with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as 
document:
 
 self.assertTrue(document.isReadonly())
 
 #Without the fix in place, this dialog wouldn't have been 
displayed
-with self.ui_test.execute_dialog_through_action(xWriterEdit, 
"TYPE", mkPropertyValues({"KEYCODE": "CTRL+SHIFT+M"})) as xDialog:
+with 
self.ui_test.execute_dialog_through_command(".uno:EditDoc") as xDialog:
+xPassword = xDialog.getChild("newpassEntry")
+xPassword.executeAction("TYPE", mkPropertyValues({"TEXT": 
"password"}))
+
+self.assertFalse(document.isReadonly())
+
+   def test_save_to_odt(self):
+
+with TemporaryDirectory() as tempdir:
+xFilePath = os.path.join(tempdir, "readonly_with_password_tmp.odt")
+
+with self.ui_test.create_doc_in_start_center("writer"):
+# Save the document
+with self.ui_test.execute_dialog_through_command(".uno:Save", 
close_button="") as xSaveDialog:
+xFileName = xSaveDialog.getChild("file_name")
+xFileName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
+xFileName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": 
xFilePath}))
+xPasswordCheckButton = xSaveDialog.getChild("password")
+xPasswordCheckButton.executeAction("CLICK", tuple())
+xOpen = xSaveDialog.getChild("open")
+
+with self.ui_test.execute_dialog_through_action(xOpen, 
"CLICK") as xPasswordDialog:
+xReadonly = xPasswordDialog.getChild("readonly")
+xReadonly.executeAction("CLICK", tuple())
+xNewPassword = 
xPasswordDialog.getChild("newpassroEntry")
+xNewPassword.executeAction("TYPE", 
mkPropertyValues({"TEXT": "password"}))
+xConfirmPassword = 
xPasswordDialog.getChild("confirmropassEntry")
+xConfirmPassword.executeAction("TYPE", 
mkPropertyValues({"TEXT": "password"}))
+
+with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as 
document:
+
+xWriterEdit = 
self.xUITest.getTopFocusWindow().getChild("writer_edit")
+
+self.assertTrue(document.isReadonly())
+
+with 
self.ui_test.execute_dialog_through_command(".uno:EditDoc") as xDialog:
 xPassword = xDialog.getChild("newpassEntry")
 xPassword.executeAction("TYPE", mkPropertyValues({"TEXT": 
"password"}))