[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-2' - 2 commits - configure.ac download.lst external/curl RepositoryExternal.mk

2023-01-29 Thread Andras Timar (via logerrit)
Rebased ref, commits from common ancestor:
commit 1289b4bee0a5ca9e1569cc2990c0024bfc7df991
Author: Andras Timar 
AuthorDate: Sun Jan 29 19:25:51 2023 +0100
Commit: Andras Timar 
CommitDate: Mon Jan 30 08:28:58 2023 +0100

Bump version to 7.2.7.2.M10

Change-Id: Ia66c67e938b7b18062d822bcd5409be5be1f6997

diff --git a/configure.ac b/configure.ac
index 731bcd4fb0d3..f8ae44a0c56f 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.2.7.2.M9],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[7.2.7.2.M10],[],[],[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
commit d4b92a8e723e2d793eed20c4a5235370e7c5163f
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Fri Dec 30 21:29:58 2022 +0900
Commit: Andras Timar 
CommitDate: Mon Jan 30 08:28:58 2023 +0100

curl: upgrade to release 7.87.0

Fixes CVE-2022-43551 and CVE-2022-43552.

https://curl.se/docs/CVE-2022-43551.html
https://curl.se/docs/CVE-2022-43552.html

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

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index b43773812ef4..82584d157ccc 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -2805,7 +2805,7 @@ $(call gb_LinkTarget_set_include,$(1),\
 
 ifeq ($(COM),MSC)
 $(call gb_LinkTarget_add_libs,$(1),\
-   $(call 
gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-ipv6-sspi-schannel/lib/libcurl$(if
 $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
+   $(call 
gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-zlib-static-ipv6-sspi-schannel/lib/libcurl$(if
 $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
 )
 else
 $(call gb_LinkTarget_add_libs,$(1),\
diff --git a/download.lst b/download.lst
index cd96bcd09506..909f93b8d5a8 100644
--- a/download.lst
+++ b/download.lst
@@ -37,8 +37,8 @@ export CPPUNIT_SHA256SUM := 
89c5c6665337f56fd2db36bc3805a5619709d51fb136e5193707
 export CPPUNIT_TARBALL := cppunit-1.15.1.tar.gz
 export CT2N_SHA256SUM := 
71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e6453f4d85de3
 export CT2N_TARBALL := 
1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt
-export CURL_SHA256SUM := 
0606f74b1182ab732a17c11613cbbaf7084f2e6cca432642d0e3ad7c224c3689
-export CURL_TARBALL := curl-7.79.1.tar.xz
+export CURL_SHA256SUM := 
ee5f1a1955b0ed413435ef79db28b834ea5f0fb7c8cfb1ce47175cc3bee08fff
+export CURL_TARBALL := curl-7.87.0.tar.xz
 export EBOOK_SHA256SUM := 
7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9
 export EBOOK_TARBALL := libe-book-0.1.3.tar.xz
 export EPOXY_SHA256SUM := 
002958c5528321edd53440235d3c44e71b5b1e09b9177e8daf677450b6c4433d
diff --git a/external/curl/ExternalPackage_curl.mk 
b/external/curl/ExternalPackage_curl.mk
index 924fc53ebd62..ee0cf4501478 100644
--- a/external/curl/ExternalPackage_curl.mk
+++ b/external/curl/ExternalPackage_curl.mk
@@ -14,13 +14,13 @@ $(eval $(call 
gb_ExternalPackage_use_external_project,curl,curl))
 ifneq ($(DISABLE_DYNLOADING),TRUE)
 
 ifeq ($(COM),MSC)
-$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if 
$(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-ipv6-sspi-schannel/bin/libcurl$(if
 $(MSVC_USE_DEBUG_RUNTIME),_debug).dll))
+$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if 
$(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-zlib-static-ipv6-sspi-schannel/bin/libcurl$(if
 $(MSVC_USE_DEBUG_RUNTIME),_debug).dll))
 else ifeq ($(OS),MACOSX)
 $(eval $(call 
gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.4.dylib,lib/.libs/libcurl.4.dylib))
 else ifeq ($(OS),AIX)
 $(eval $(call 
gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so,lib/.libs/libcurl.so.4))
 else
-$(eval $(call 
gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.7.0))
+$(eval $(call 
gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.8.0))
 endif
 
 endif # $(DISABLE_DYNLOADING)
diff --git a/external/curl/ExternalProject_curl.mk 
b/external/curl/ExternalProject_curl.mk
index 11beda8c7c5c..5a516651c608 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -43,8 +43,8 @@ $(call gb_ExternalProject_get_state_target,curl,build):
 

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

2023-01-29 Thread Noel Grandin (via logerrit)
 linguistic/source/lngsvcmgr.cxx |   23 +--
 1 file changed, 9 insertions(+), 14 deletions(-)

New commits:
commit d33dbd8d3bee4dfd614ae0153ebca3db3948e9f8
Author: Noel Grandin 
AuthorDate: Sun Jan 29 21:07:45 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Jan 30 06:41:57 2023 +

no need to take SolarMutex when calling Idle::Start

but it is wise to hold our own mutex while accessing our own field

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

diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index f38ee262099c..73abcf92abd5 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -439,22 +439,17 @@ LngSvcMgr::LngSvcMgr()
 // css::util::XModifyListener
 void LngSvcMgr::modified(const lang::EventObject&)
 {
-{
-osl::MutexGuard aGuard(GetLinguMutex());
-//assume that if an extension has been added/removed that
-//it might be a dictionary extension, so drop our cache
+osl::MutexGuard aGuard(GetLinguMutex());
+//assume that if an extension has been added/removed that
+//it might be a dictionary extension, so drop our cache
 
-pAvailSpellSvcs.reset();
-pAvailGrammarSvcs.reset();
-pAvailHyphSvcs.reset();
-pAvailThesSvcs.reset();
-}
+pAvailSpellSvcs.reset();
+pAvailGrammarSvcs.reset();
+pAvailHyphSvcs.reset();
+pAvailThesSvcs.reset();
 
-{
-SolarMutexGuard aGuard;
-//schedule in an update to execute in the main thread
-aUpdateIdle.Start();
-}
+//schedule in an update to execute in the main thread
+aUpdateIdle.Start();
 }
 
 //run update, and inform everyone that dictionaries (may) have changed, this


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - docmodel/Library_docmodel.mk docmodel/source include/docmodel include/oox include/svx oox/inc oox/source sd/source svx/qa svx/sourc

2023-01-29 Thread Tomaž Vajngerl (via logerrit)
 docmodel/Library_docmodel.mk |1 
 docmodel/source/theme/Theme.cxx  |  158 ++
 include/docmodel/theme/Theme.hxx |  163 +++
 include/oox/drawingml/theme.hxx  |4 
 include/oox/export/ThemeExport.hxx   |8 -
 include/svx/ColorSets.hxx|  186 ---
 include/svx/dialog/ThemeDialog.hxx   |5 
 include/svx/svdmodel.hxx |6 
 include/svx/svdpage.hxx  |8 -
 oox/inc/drawingml/textfont.hxx   |4 
 oox/source/drawingml/textfont.cxx|4 
 oox/source/drawingml/theme.cxx   |   30 ++--
 oox/source/export/ThemeExport.cxx|   10 -
 sd/source/filter/eppt/epptooxml.hxx  |6 
 sd/source/filter/eppt/pptx-epptooxml.cxx |6 
 sd/source/ui/docshell/docshell.cxx   |2 
 sd/source/ui/func/fuconstr.cxx   |2 
 sd/source/ui/func/fupage.cxx |4 
 sd/source/ui/unoidl/unomodel.cxx |4 
 sd/source/ui/unoidl/unopage.cxx  |4 
 svx/qa/unit/ThemeTest.cxx|4 
 svx/source/dialog/ThemeDialog.cxx|3 
 svx/source/styles/ColorSets.cxx  |  136 ---
 svx/source/svdraw/svdmodel.cxx   |8 -
 svx/source/svdraw/svdpage.cxx|4 
 sw/qa/core/theme/ThemeTest.cxx   |4 
 sw/source/core/model/ThemeColorChanger.cxx   |4 
 sw/source/filter/xml/xmlfmte.cxx |2 
 sw/source/uibase/app/docst.cxx   |4 
 sw/source/uibase/shells/basesh.cxx   |4 
 sw/source/uibase/sidebar/ThemePanel.cxx  |4 
 writerfilter/source/dmapper/ThemeHandler.cxx |8 -
 xmloff/source/draw/sdxmlexp.cxx  |2 
 33 files changed, 403 insertions(+), 399 deletions(-)

New commits:
commit a5f8ca45ccd6dc4f8f245a461f4ba5a2f902209d
Author: Tomaž Vajngerl 
AuthorDate: Fri Jan 27 08:41:16 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Jan 30 05:54:59 2023 +

move Theme class to own file inside docmodel

Also move Theme from svx to model namespace so it is consistent
with other classes in docmodel.

Theme header also includes ThemeSupplementalFont, ThemeFont,
FontScheme classes that are used by the Theme and were also moved
to docmodel. These may be moved to its own file in the future when
they are used in more places.

Change-Id: Ic409bea8e5298adc2b039b529c4f7b01cf64f03e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146221
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit c9fb441c55d03f55877ed3bb2f5c39310d1ec44b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146230
Tested-by: Tomaž Vajngerl 

diff --git a/docmodel/Library_docmodel.mk b/docmodel/Library_docmodel.mk
index 22ecdfa59ac4..7974027a7a9e 100644
--- a/docmodel/Library_docmodel.mk
+++ b/docmodel/Library_docmodel.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_Library_Library,docmodel))
 $(eval $(call gb_Library_add_exception_objects,docmodel,\
 docmodel/source/uno/UnoThemeColor \
 docmodel/source/theme/ColorSet \
+docmodel/source/theme/Theme \
 ))
 
 $(eval $(call gb_Library_set_include,docmodel,\
diff --git a/docmodel/source/theme/Theme.cxx b/docmodel/source/theme/Theme.cxx
new file mode 100644
index ..0f8ff8002870
--- /dev/null
+++ b/docmodel/source/theme/Theme.cxx
@@ -0,0 +1,158 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+using namespace com::sun::star;
+
+namespace model
+{
+Theme::Theme(OUString const& rName)
+: maName(rName)
+{
+}
+
+void Theme::SetColorSet(std::unique_ptr pColorSet)
+{
+mpColorSet = std::move(pColorSet);
+}
+
+const model::ColorSet* Theme::GetColorSet() const { return mpColorSet.get(); }
+
+model::ColorSet* Theme::GetColorSet() { return mpColorSet.get(); }
+
+void Theme::SetName(const OUString& rName) { maName = rName; }
+
+const OUString& Theme::GetName() const { return maName; }
+
+void Theme::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+(void)xmlTextWriterStartElement(pWriter, BAD_CAST("Theme"));
+(void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", 
this);
+(void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("maName"),
+  BAD_CAST(maName.toUtf8().getStr()));
+
+if (mpColorSet)
+{
+mpColorSet->dumpAsXml(pWriter);
+}
+
+(void)xmlTextWriterE

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - 2 commits - docmodel/Library_docmodel.mk docmodel/source include/docmodel include/oox include/svx oox/source sd/source svx/Library_

2023-01-29 Thread Tomaž Vajngerl (via logerrit)
 docmodel/Library_docmodel.mk |5 
 docmodel/source/theme/ColorSet.cxx   |   74 ++
 include/docmodel/theme/ColorSet.hxx  |   45 ++
 include/oox/drawingml/clrscheme.hxx  |4 
 include/svx/ColorSets.hxx|   43 +-
 include/svx/dialog/ThemeColorValueSet.hxx|6 
 include/svx/theme/IThemeColorChanger.hxx |6 
 include/svx/theme/ThemeColorChanger.hxx  |   39 +
 oox/source/drawingml/clrscheme.cxx   |2 
 oox/source/drawingml/theme.cxx   |3 
 oox/source/export/ThemeExport.cxx|4 
 sd/source/filter/eppt/pptx-epptooxml.cxx |4 
 svx/Library_svx.mk   |1 
 svx/Library_svxcore.mk   |1 
 svx/source/dialog/ThemeColorValueSet.cxx |4 
 svx/source/dialog/ThemeDialog.cxx|3 
 svx/source/styles/ColorSets.cxx  |  188 ++-
 svx/source/svdraw/svdpage.cxx|6 
 svx/source/theme/ThemeColorChanger.cxx   |  162 +++
 sw/qa/core/theme/ThemeTest.cxx   |2 
 sw/source/core/inc/ThemeColorChanger.hxx |   12 -
 sw/source/core/model/ThemeColorChanger.cxx   |  118 ++--
 sw/source/uibase/sidebar/ThemePanel.cxx  |6 
 writerfilter/source/dmapper/ThemeHandler.cxx |1 
 24 files changed, 401 insertions(+), 338 deletions(-)

New commits:
commit a745ca096e100a4d2cbff3665112f7cba7291876
Author: Tomaž Vajngerl 
AuthorDate: Thu Jan 26 23:43:00 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Jan 30 05:54:41 2023 +

move ColorSet class to own file inside docmodel

Also move ColorSet from svx to model namespace so it is consistent
with other classes in docmodel.

Change-Id: Iacbdbdf5ece4015c628a0e45adf6a732b2d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146220
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 69c6f7bccec838b7288a25a29a83b7f782ba7586)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146229
Tested-by: Tomaž Vajngerl 

diff --git a/docmodel/Library_docmodel.mk b/docmodel/Library_docmodel.mk
index 3e0d28dfda28..22ecdfa59ac4 100644
--- a/docmodel/Library_docmodel.mk
+++ b/docmodel/Library_docmodel.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_Library_Library,docmodel))
 
 $(eval $(call gb_Library_add_exception_objects,docmodel,\
 docmodel/source/uno/UnoThemeColor \
+docmodel/source/theme/ColorSet \
 ))
 
 $(eval $(call gb_Library_set_include,docmodel,\
@@ -18,6 +19,10 @@ $(eval $(call gb_Library_set_include,docmodel,\
 -I$(SRCDIR)/docmodel/inc \
 ))
 
+$(eval $(call gb_Library_use_externals,docmodel,\
+   libxml2 \
+))
+
 $(eval $(call gb_Library_add_defs,docmodel,\
 -DDOCMODEL_DLLIMPLEMENTATION \
 ))
diff --git a/docmodel/source/theme/ColorSet.cxx 
b/docmodel/source/theme/ColorSet.cxx
new file mode 100644
index ..55c03dadba8c
--- /dev/null
+++ b/docmodel/source/theme/ColorSet.cxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace model
+{
+ColorSet::ColorSet(OUString const& rName)
+: maName(rName)
+{
+}
+
+void ColorSet::add(model::ThemeColorType eType, Color aColorData)
+{
+if (eType == model::ThemeColorType::Unknown)
+return;
+maColors[sal_Int16(eType)] = aColorData;
+}
+
+Color ColorSet::getColor(model::ThemeColorType eType) const
+{
+if (eType == model::ThemeColorType::Unknown)
+{
+SAL_WARN("svx", "ColorSet::getColor with ThemeColorType::Unknown");
+return COL_AUTO;
+}
+return maColors[size_t(eType)];
+}
+
+Color ColorSet::resolveColor(model::ThemeColor const& rThemeColor) const
+{
+auto eType = rThemeColor.getType();
+if (eType == model::ThemeColorType::Unknown)
+{
+SAL_WARN("svx", "ColorSet::resolveColor with ThemeColorType::Unknown");
+return COL_AUTO;
+}
+Color aColor = getColor(eType);
+return rThemeColor.applyTransformations(aColor);
+}
+
+void ColorSet::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+(void)xmlTextWriterStartElement(pWriter, BAD_CAST("ColorSet"));
+(void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", 
this);
+(void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("maName"),
+  BAD_CAST(maName.toUtf8().getStr()));
+
+for (const auto& rColor : maColors)
+{
+(void)xmlTextWriterStartElement(pWriter, BAD_CAST("Color"));
+std::stringstream ss;
+ss << rColor;
+(void)xmlTextWriterWrite

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

2023-01-29 Thread Tomaž Vajngerl (via logerrit)
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |8 +
 sw/source/filter/xml/xmlexp.hxx |3 
 sw/source/filter/xml/xmlfmte.cxx|   77 
 3 files changed, 88 insertions(+)

New commits:
commit 32a8095eb2c22f7de4bce14f1b5c08dc701deaea
Author: Tomaž Vajngerl 
AuthorDate: Thu Jan 26 18:09:06 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Jan 30 05:54:13 2023 +

xmloff: export Theme for ODT (Writer) documents

Exports the Theme set on the one and only SdrPage for ODT (Writer)
documents. The theme is exported as a sub-element of "style".
This differs to ODP (Impress) documents, which export the Theme
as part of the master-page element.

Currently the code is duplicated, because the theme can't yet be
accessed inside xmloff in a non-conflicting way (creating conflicts
between modules), which will be fixed in the future.

Change-Id: I0e440d14724b49e7d86e9deabc6615a91e8cd31a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146172
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 6d1413da02602992b42b62bda9a26ffeb774b603)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146227
Tested-by: Tomaž Vajngerl 

diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng 
b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index 0a8aadad1ba3..384b3cde05f3 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -3223,6 +3223,14 @@ 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
   
 
   
+
+  
+  
+  
+
+  
+  
+
   
 
   
diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx
index 86b919ac95a7..3ba34a5cced4 100644
--- a/sw/source/filter/xml/xmlexp.hxx
+++ b/sw/source/filter/xml/xmlexp.hxx
@@ -90,6 +90,9 @@ class SwXMLExport : public SvXMLExport
SwXMLTableInfo_Impl& rTableInfo,
sal_uInt32 nHeaderRows = 0 );
 
+void ExportThemeElement(const 
css::uno::Reference& xDrawPage);
+
+
 virtual void ExportMeta_() override;
 virtual void ExportFontDecls_() override;
 virtual void ExportStyles_( bool bUsed ) override;
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index f98e4ae3fb28..08cc588b2e75 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -35,9 +35,20 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include "xmlexp.hxx"
 #include 
 #include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
 
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::uno;
@@ -170,6 +181,72 @@ void SwXMLExport::ExportStyles_( bool bUsed )
 GetShapeExport()->GetShapeTableExport()->exportTableStyles();
 //page defaults
 GetPageExport()->exportDefaultStyle();
+
+// Theme
+uno::Reference xDrawPageSupplier(GetModel(), 
UNO_QUERY);
+if (xDrawPageSupplier.is())
+{
+uno::Reference xPage = 
xDrawPageSupplier->getDrawPage();
+if (xPage.is())
+ExportThemeElement(xPage);
+}
+}
+
+void SwXMLExport::ExportThemeElement(const uno::Reference& 
xDrawPage)
+{
+if ((getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED) == 0)
+{
+// Do not export in standard ODF 1.3 or older.
+return;
+}
+
+SdrPage* pPage = GetSdrPageFromXDrawPage(xDrawPage);
+SAL_WARN_IF(!pPage, "oox", "Can't get SdrPage from XDrawPage");
+
+if (!pPage)
+return;
+
+auto* pTheme = pPage->getSdrPageProperties().GetTheme();
+if (!pTheme)
+return;
+
+if (!pTheme->GetName().isEmpty())
+AddAttribute(XML_NAMESPACE_LO_EXT, XML_NAME, pTheme->GetName());
+SvXMLElementExport aTheme(*this, XML_NAMESPACE_LO_EXT, XML_THEME, true, 
true);
+
+auto* pColorSet = pTheme->GetColorSet();
+if (!pColorSet->getName().isEmpty())
+AddAttribute(XML_NAMESPACE_LO_EXT, XML_NAME, pColorSet->getName());
+SvXMLElementExport aColorTable(*this, XML_NAMESPACE_LO_EXT, 
XML_COLOR_TABLE, true, true);
+
+static const XMLTokenEnum aColorTokens[] =
+{
+XML_DK1, // Text 1
+XML_LT1, // Background 1
+XML_DK2, // Text 2
+XML_LT2, // Background 2
+XML_ACCENT1,
+XML_ACCENT2,
+XML_ACCENT3,
+XML_ACCENT4,
+XML_ACCENT5,
+XML_ACCENT6,
+XML_HLINK, // Hyperlink
+XML_FOLHLINK, // Followed hyperlink
+};
+
+for (auto eThemeColorType : o3tl::enumrange())
+{
+if (eThemeColorType == model::ThemeColorType::Unknown)
+continue;
+
+auto nColor = size_t(eThemeColorType);
+AddAttribute(XML_NAMESPACE_LO_EXT, XML_NAME, 
GetXMLToken(aColorTokens[nColor]));
+  

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

2023-01-29 Thread Adoche Onaji (via logerrit)
 include/avmedia/MediaControlBase.hxx |4 +---
 include/avmedia/avmediadllapi.h  |5 +
 include/avmedia/mediaitem.hxx|5 +
 include/avmedia/mediaplayer.hxx  |5 +
 include/avmedia/mediatoolbox.hxx |5 +
 include/avmedia/mediawindow.hxx  |5 +
 6 files changed, 6 insertions(+), 23 deletions(-)

New commits:
commit fea79733c5b98554b4b092a82c30137437db1d7a
Author: Adoche Onaji 
AuthorDate: Mon Jan 30 04:17:56 2023 +0100
Commit: Ilmari Lauhakangas 
CommitDate: Mon Jan 30 05:33:33 2023 +

tdf#143148 Use pragma once instead of include guards

The headers in include/avmedia are changed to pragma once

Change-Id: Id32159a291cbe2f18199e0e5b7e63b4feb2e591f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146312
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/include/avmedia/MediaControlBase.hxx 
b/include/avmedia/MediaControlBase.hxx
index 1379a4364f33..38299e0faf60 100644
--- a/include/avmedia/MediaControlBase.hxx
+++ b/include/avmedia/MediaControlBase.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_AVMEDIA_MEDIACONTROLBASE_HXX
-#define INCLUDED_AVMEDIA_MEDIACONTROLBASE_HXX
+#pragma once
 
 #include 
 #include 
@@ -69,6 +68,5 @@ protected:
 };
 
 }
-#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/avmedia/avmediadllapi.h b/include/avmedia/avmediadllapi.h
index abe4fb48c844..f7f124d3dc93 100644
--- a/include/avmedia/avmediadllapi.h
+++ b/include/avmedia/avmediadllapi.h
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_AVMEDIA_AVMEDIADLLAPI_H
-#define INCLUDED_AVMEDIA_AVMEDIADLLAPI_H
+#pragma once
 
 #include 
 
@@ -29,6 +28,4 @@
 #endif
 #define AVMEDIA_DLLPRIVATE SAL_DLLPRIVATE
 
-#endif // INCLUDED_AVMEDIA_AVMEDIADLLAPI_H
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/avmedia/mediaitem.hxx b/include/avmedia/mediaitem.hxx
index bbb5e06e49b1..f8b3c7c689c3 100644
--- a/include/avmedia/mediaitem.hxx
+++ b/include/avmedia/mediaitem.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_AVMEDIA_MEDIAITEM_HXX
-#define INCLUDED_AVMEDIA_MEDIAITEM_HXX
+#pragma once
 
 #include 
 #include 
@@ -164,6 +163,4 @@ struct AVMEDIA_DLLPUBLIC MediaTempFile
 
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/avmedia/mediaplayer.hxx b/include/avmedia/mediaplayer.hxx
index 52ecd942e49a..f0da5b2d84d7 100644
--- a/include/avmedia/mediaplayer.hxx
+++ b/include/avmedia/mediaplayer.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_AVMEDIA_MEDIAPLAYER_HXX
-#define INCLUDED_AVMEDIA_MEDIAPLAYER_HXX
+#pragma once
 
 #include 
 #include 
@@ -73,6 +72,4 @@ inline MediaFloater * getMediaFloater() {
 
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/avmedia/mediatoolbox.hxx b/include/avmedia/mediatoolbox.hxx
index 434d202ca967..52ae7ad9b318 100644
--- a/include/avmedia/mediatoolbox.hxx
+++ b/include/avmedia/mediatoolbox.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_AVMEDIA_MEDIATOOLBOX_HXX
-#define INCLUDED_AVMEDIA_MEDIATOOLBOX_HXX
+#pragma once
 
 #include 
 #include 
@@ -50,6 +49,4 @@ private:
 
 }
 
-#endif // INCLUDED_AVMEDIA_MEDIATOOLBOX_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx
index e8515d77ffb4..e2938b608a24 100644
--- a/include/avmedia/mediawindow.hxx
+++ b/include/avmedia/mediawindow.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_AVMEDIA_MEDIAWINDOW_HXX
-#define INCLUDED_AVMEDIA_MEDIAWINDOW_HXX
+#pragma once
 
 #include 
 #include 
@@ -153,6 +152,4 @@ namespace avmedia
 
 }
 
-#endif // INCLUDED_AVMEDIA_MEDIAWINDOW_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 59 commits - basctl/source basegfx/CppunitTest_basegfx.mk basegfx/test basic/source chart2/source comphelper/source cui/source dbac

2023-01-29 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 022790dd017a9d6b40932c3afbf15fc08773424e
Author: Tomaž Vajngerl 
AuthorDate: Wed Nov 23 11:00:13 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Jan 30 12:20:33 2023 +0900

svx: convert SdrTextObj rotate and move to use gfx::Length

Change-Id: I82f10f82db8ac9d5653f4902276ee58fc18c52d6

diff --git a/include/basegfx/utils/RectangleWrapper.hxx 
b/include/basegfx/utils/RectangleWrapper.hxx
index 00586d6eae71..4f5dbe851f66 100644
--- a/include/basegfx/utils/RectangleWrapper.hxx
+++ b/include/basegfx/utils/RectangleWrapper.hxx
@@ -55,6 +55,11 @@ public:
 m_aRange.setSize(width, height);
 }
 
+void shift(gfx::Length const& rXDelta, gfx::Length const& rYDelta)
+{
+m_aRange.shift(rXDelta, rYDelta);
+}
+
 void move(sal_Int32 nXDelta, sal_Int32 nYDelta)
 {
 auto deltaX = gfx::Length::hmm(nXDelta);
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index 1055e5dbe3bb..9ccc69709abf 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -40,6 +40,35 @@
 
 using namespace com::sun::star;
 
+namespace
+{
+gfx::Tuple2DL rotatePoint(gfx::Tuple2DL const& rPoint, gfx::Tuple2DL const& 
rReference, double sinAngle, double cosAngle)
+{
+gfx::Length dx = rPoint.getX() - rReference.getX();
+gfx::Length dy = rPoint.getY() - rReference.getY();
+
+auto x = rReference.getX() + gfx::Length::emu(basegfx::fround(dx.raw() * 
cosAngle + dy.raw() * sinAngle));
+auto y = rReference.getY() + gfx::Length::emu(basegfx::fround(dy.raw() * 
cosAngle - dx.raw() * sinAngle));
+
+return gfx::Tuple2DL(x, y);
+}
+
+gfx::Tuple2DL toTuple(Point const& rPointHmm)
+{
+auto x = gfx::Length::hmm(rPointHmm.X());
+auto y = gfx::Length::hmm(rPointHmm.Y());
+return {x, y};
+}
+
+gfx::Size2DL toSize2D(Size const& rSizeHmm)
+{
+auto x = gfx::Length::hmm(rSizeHmm.Width());
+auto y = gfx::Length::hmm(rSizeHmm.Height());
+return {x, y};
+}
+
+} // end anonymous ns
+
 void SdrTextObj::NbcSetSnapRect(const tools::Rectangle& rRect)
 {
 if (maGeo.nRotationAngle || maGeo.nShearAngle)
@@ -92,7 +121,9 @@ Degree100 SdrTextObj::GetShearAngle(bool /*bVertical*/) const
 
 void SdrTextObj::NbcMove(const Size& rSize)
 {
-moveRectangle(rSize.Width(), rSize.Height());
+gfx::Size2DL aSize2D = toSize2D(rSize);
+maRectangle.shift(aSize2D.getWidth(), aSize2D.getHeight());
+
 moveOutRectangle(rSize.Width(), rSize.Height());
 maSnapRect.Move(rSize);
 SetBoundAndSnapRectsDirty(true);
@@ -183,27 +214,37 @@ void SdrTextObj::NbcResize(const Point& rRef, const 
Fraction& xFact, const Fract
 SetBoundAndSnapRectsDirty();
 }
 
-void SdrTextObj::NbcRotate(const Point& rRef, Degree100 nAngle, double sn, 
double cs)
+void SdrTextObj::NbcRotate(const Point& rRef, Degree100 nAngle, double 
sinAngle, double cosAngle)
 {
+auto aReference = toTuple(rRef);
+
 SetGlueReallyAbsolute(true);
-tools::Long dx = getRectangle().Right() - getRectangle().Left();
-tools::Long dy = getRectangle().Bottom() - getRectangle().Top();
-Point aPoint1(getRectangle().TopLeft());
-RotatePoint(aPoint1, rRef, sn, cs);
-Point aPoint2(aPoint1.X() + dx, aPoint1.Y() + dy);
-tools::Rectangle aRectangle(aPoint1, aPoint2);
-setRectangle(aRectangle);
+auto const& rRange = maRectangle.getRange();
+
+auto nWidth = rRange.getWidth();
+auto nHeight = rRange.getHeight();
+
+gfx::Tuple2DL aPoint1(rRange.getMinX(), rRange.getMinY());
+aPoint1 = rotatePoint(aPoint1, aReference, sinAngle, cosAngle);
 
-if (maGeo.nRotationAngle==0_deg100) {
-maGeo.nRotationAngle=NormAngle36000(nAngle);
-maGeo.mfSinRotationAngle=sn;
-maGeo.mfCosRotationAngle=cs;
-} else {
-maGeo.nRotationAngle=NormAngle36000(maGeo.nRotationAngle+nAngle);
+gfx::Tuple2DL aPoint2(aPoint1.getX() + nWidth, aPoint1.getY() + nHeight);
+
+gfx::Range2DL aRange{aPoint1, aPoint2};
+maRectangle.setRange(aRange);
+
+if (maGeo.nRotationAngle == 0_deg100)
+{
+maGeo.nRotationAngle = NormAngle36000(nAngle);
+maGeo.mfSinRotationAngle = sinAngle;
+maGeo.mfCosRotationAngle = cosAngle;
+}
+else
+{
+maGeo.nRotationAngle = NormAngle36000(maGeo.nRotationAngle + nAngle);
 maGeo.RecalcSinCos();
 }
 SetBoundAndSnapRectsDirty();
-NbcRotateGluePoints(rRef,nAngle,sn,cs);
+NbcRotateGluePoints(rRef, nAngle, sinAngle, cosAngle);
 SetGlueReallyAbsolute(false);
 }
 
commit a5a0e7cff143d3569fad107e5f2f41c96175f946
Author: Tomaž Vajngerl 
AuthorDate: Tue Nov 22 13:33:30 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Jan 30 12:20:33 2023 +0900

svx: use RectangleWrapper for maRectangle on SdrTextObj

This is needed so we can now transition to use gfx::Length and
gfx::Range2DL to define the object position and size.

Change-Id: Ie683a869ba061f53d437bd

Re: problem with vml-shape-types file

2023-01-29 Thread Regina Henschel

Hi Miklos, hi all,

Miklos Vajna schrieb am 09.01.2023 um 10:34:

Hi Regina,

On Sat, Jan 07, 2023 at 10:11:46PM +0100, Regina Henschel 
 wrote:

The vml-shape-types file is used, when a shape is exported to VML. If I
understand it correctly, then this file is generated from
presetShapeDefinitions.xml and presetTextWarpDefinitions.xml respectively by
preset-definitions-to-shape-types.pl script. The file itself is located in
/share/filter, not in repository (Why?).


preset-definitions-to-shape-types.pl generates vml-shape-types from XML
files which are part of the OOXML spec. It seems logical to generate
such data only once at build-time (as opposed to generating it every
time at runtime), but we tend to not add such generated data to git.


This file does not work for handles in Fontwork shapes. The problem is the
position attribute of a handle:
(A) The reference to the adjustment value is made by a reference to a
formula (@), but it needs to be a reference to the adjustment value itself
(#).
(B) The positions left, right, top, bottom, center are written with numbers
0, 10800 and 21600. But it need to be topLeft, center, bottomRight.


It turns out, that there are more problems with this file and Fontwork 
shapes:
(C) There exists 40 OOXML preset TextWarpDefinitions and 8 legacy 
WordArt files. From these 48 shape types 14 have no markup in the 
vml-shape-types file.
(D) Word does not accept the markup from this file as WordArt markup, 
likely because it is generated from the OOXML presets and has parts to 
simulate the OOXML constants. Word treats the  then as 
custom shapetype when it resaves it. The result is, that 
'id="_x_t172" o:spt="172"' written by LO becomes 'id="_x_m1027" 
o:spt="100"', for example, when resaved by Word. And having these 
attributes, LO cannot render the shapes at all.




VML is needed for export of Fontwork shapes with fill other than solid or
gradient, because such fill cannot be expressed with Words "abc Transform".
Therefore I need a way to get correct VML shapetype markup for Fontwork
shapes. There exist 40 types of Fontwork shapes in
presetTextWarpDefinitions.xml. All of them have handles.
There are 8 binary WordArt shapes, where the relationship to the shapes in
presetTextWarpDefinitions.xml is unclear.

I could manually make a file for the markup of the WordArt shapetypes and
use that. I'm not familiar with Perl scripts.

Better ideas or suggestions?


I'm not an expert in perl, either, but hopefully with a bit of
experimenting you can tweak
oox/source/export/preset-definitions-to-shape-types.pl so that when it's
invoked with the --vml-shape-types-data switch, then it outputs the
markup that you would want.

My expectation is that the tricky part is not perl but to find out how
the mapping from drawingML presets to VML markup goes wrong.


I have not investigated whether it is possible to generate a better 
vml-shape-types file. But I have now generated the needed markup 
manually. I have uploaded a first version with a map inside a method, 
see https://gerrit.libreoffice.org/c/core/+/146311


Content wise these markups work, i.e. Word recognizes the shapes as 
WordArt and the handles can be moved in Word.


But I'm unsure about the technical part. Please advise me, how I should 
write/use such map.





BTW, Word uses VML WordArt, when it opens a doc file with binary WordArt or
opens an odt file with custom-shape with textpath on. And it keeps it as
VML, when converting the file to docx, even if it would be possible to use
"abc Transform". But that is a -not jet fixed- import problem and not
effected by the above mentioned file.


I guess it affects the VML export all the time, just Word >= 2010
ignores VML if there is drawingML for a shape.


Yes, the Fallback is usually ignored by Word. I have replaced the wps 
namespace with "my" namespace in the docx file and then Word will use 
the VML from the Fallback.


In released LO the Fontwork shapes 'TextPlaintText' (136), 'TextSlantup' 
(172) and 'TextDeflateInflateDeflate' (167) do not generate DML but only 
VML.


I have committed already, that Fontwork with bitmap fill is exported as 
only VML.


When LO is able to import and export custom shapetype Fontwork shapes 
(bottom of my ToDo-list), that will be only VML too, because OOXML does 
not allow custom WordArt shapes.


Kind regards,
Regina




Re: Link error

2023-01-29 Thread Regina Henschel

Hi Mike, hi Julian,

I am comforted to know that I am not the only one affected by such problems.

Julien Nabet schrieb am 29.01.2023 um 09:58:
Indeed, the rare case when I build LO on Windows, first time is ok 
because I start with a "make clean", update Visual Studio, Windows, 
Cygwin, ... but once it's built if I want to update my local repo to 
retrieve a new patch it will fail in 99%.


It is not so often here. Most times even only building an effected 
module is enough.




Sometimes cleaning the module is enough but most of the times I must run 
a make clean. For me it's very annoying because I build LO for Windows 
on a laptop far less powerful than my Linux desktop.


I have done a clean build now and that has no problems. But making a 
clean build lasts more than five hours and always has the risk that the 
notebook overheats. Therefore, unattended compiling overnight is not a 
solution. I should really consider to buy a desktop.


Kind regards,
Regina



[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-2' - 6 commits - configure.ac download.lst external/curl external/gpgmepp external/nss external/python3

2023-01-29 Thread Andras Timar (via logerrit)
Rebased ref, commits from common ancestor:
commit ce43c7b40ad3b6513a71a06f399863bd9bf73533
Author: Andras Timar 
AuthorDate: Sun Jan 29 19:25:51 2023 +0100
Commit: Andras Timar 
CommitDate: Sun Jan 29 22:01:30 2023 +0100

Bump version to 7.2.7.2.M10

Change-Id: Ia66c67e938b7b18062d822bcd5409be5be1f6997

diff --git a/configure.ac b/configure.ac
index 731bcd4fb0d3..f8ae44a0c56f 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.2.7.2.M9],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[7.2.7.2.M10],[],[],[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
commit 7f8a94f5124d166b949d6d36bc107795ef766330
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Fri Dec 30 21:29:58 2022 +0900
Commit: Andras Timar 
CommitDate: Sun Jan 29 22:01:30 2023 +0100

curl: upgrade to release 7.87.0

Fixes CVE-2022-43551 and CVE-2022-43552.

https://curl.se/docs/CVE-2022-43551.html
https://curl.se/docs/CVE-2022-43552.html

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

diff --git a/download.lst b/download.lst
index cd96bcd09506..909f93b8d5a8 100644
--- a/download.lst
+++ b/download.lst
@@ -37,8 +37,8 @@ export CPPUNIT_SHA256SUM := 
89c5c6665337f56fd2db36bc3805a5619709d51fb136e5193707
 export CPPUNIT_TARBALL := cppunit-1.15.1.tar.gz
 export CT2N_SHA256SUM := 
71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e6453f4d85de3
 export CT2N_TARBALL := 
1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt
-export CURL_SHA256SUM := 
0606f74b1182ab732a17c11613cbbaf7084f2e6cca432642d0e3ad7c224c3689
-export CURL_TARBALL := curl-7.79.1.tar.xz
+export CURL_SHA256SUM := 
ee5f1a1955b0ed413435ef79db28b834ea5f0fb7c8cfb1ce47175cc3bee08fff
+export CURL_TARBALL := curl-7.87.0.tar.xz
 export EBOOK_SHA256SUM := 
7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9
 export EBOOK_TARBALL := libe-book-0.1.3.tar.xz
 export EPOXY_SHA256SUM := 
002958c5528321edd53440235d3c44e71b5b1e09b9177e8daf677450b6c4433d
diff --git a/external/curl/ExternalPackage_curl.mk 
b/external/curl/ExternalPackage_curl.mk
index 924fc53ebd62..ee0cf4501478 100644
--- a/external/curl/ExternalPackage_curl.mk
+++ b/external/curl/ExternalPackage_curl.mk
@@ -14,13 +14,13 @@ $(eval $(call 
gb_ExternalPackage_use_external_project,curl,curl))
 ifneq ($(DISABLE_DYNLOADING),TRUE)
 
 ifeq ($(COM),MSC)
-$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if 
$(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-ipv6-sspi-schannel/bin/libcurl$(if
 $(MSVC_USE_DEBUG_RUNTIME),_debug).dll))
+$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if 
$(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-zlib-static-ipv6-sspi-schannel/bin/libcurl$(if
 $(MSVC_USE_DEBUG_RUNTIME),_debug).dll))
 else ifeq ($(OS),MACOSX)
 $(eval $(call 
gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.4.dylib,lib/.libs/libcurl.4.dylib))
 else ifeq ($(OS),AIX)
 $(eval $(call 
gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so,lib/.libs/libcurl.so.4))
 else
-$(eval $(call 
gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.7.0))
+$(eval $(call 
gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.8.0))
 endif
 
 endif # $(DISABLE_DYNLOADING)
diff --git a/external/curl/ExternalProject_curl.mk 
b/external/curl/ExternalProject_curl.mk
index 11beda8c7c5c..5a516651c608 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -43,8 +43,8 @@ $(call gb_ExternalProject_get_state_target,curl,build):
$(gb_RUN_CONFIGURE) ./configure \
$(if $(filter iOS MACOSX,$(OS)),\
--with-secure-transport,\
-   $(if $(ENABLE_NSS),--with-nss$(if 
$(SYSTEM_NSS),,="$(call 
gb_UnpackedTarball_get_dir,nss)/dist/out"),--without-nss)) \
-   --without-ssl --without-gnutls --without-polarssl 
--without-cyassl --without-axtls --without-mbedtls \
+   $(if $(ENABLE_NSS),--with-nss$(if 
$(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out") 
--with-nss-deprecated,--without-nss)) \
+   --without-openssl --without-gnutls --without-polarssl 
--without-cyassl --withou

[Libreoffice-commits] core.git: Changes to 'refs/tags/mimo-7.3.7.2.M2'

2023-01-29 Thread Andras Timar (via logerrit)
Tag 'mimo-7.3.7.2.M2' created by Andras Timar  at 
2023-01-29 18:51 +

mimo-7.3.7.2.M2

Changes since mimo-7.3.7.2.M1-11:
---
 0 files changed
---


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-2' - 10 commits - compilerplugins/LICENSE.TXT configure.ac cui/inc download.lst external/curl external/expat external/freetype external/gpgme

2023-01-29 Thread Andras Timar (via logerrit)
 compilerplugins/LICENSE.TXT
|2 
 configure.ac   
|4 
 cui/inc/strings.hrc
|2 
 download.lst   
|   32 -
 external/curl/ExternalPackage_curl.mk  
|4 
 external/curl/ExternalProject_curl.mk  
|6 
 external/curl/UnpackedTarball_curl.mk  
|9 
 external/curl/asan-poison-nsspem.patch.0   
|   11 
 external/curl/clang-cl.patch.0 
|2 
 external/curl/configurable-z-option.patch.0
|   20 +
 external/curl/curl-7.26.0_win-proxy.patch  
|  121 --
 external/curl/curl-msvc-disable-protocols.patch.1  
|4 
 external/curl/curl-msvc-zlib.patch.1   
|   16 
 external/curl/curl-msvc.patch.1
|4 
 external/curl/curl-nss.patch.1 
|7 
 external/curl/zlib.patch.0 
|   12 
 external/expat/expat-winapi.patch  
|   13 
 external/freetype/ExternalProject_freetype.mk  
|9 
 external/freetype/UnpackedTarball_freetype.mk  
|3 
 external/freetype/freetype-2.6.5.patch.1   
|   47 +-
 external/freetype/ubsan.patch  
|   11 
 external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1   
|   72 
 external/gpgmepp/ExternalPackage_gpgmepp.mk
|4 
 external/gpgmepp/ExternalProject_gpgmepp.mk
|   17 
 external/gpgmepp/Library_gpgmepp.mk
|3 
 external/gpgmepp/UnpackedTarball_gpgmepp.mk
|7 
 external/gpgmepp/Wincompatible-function-pointer-types.patch
|   31 +
 external/gpgmepp/add-minimal-keyexport.patch   
|   68 ---
 external/gpgmepp/asan.patch
|2 
 external/gpgmepp/configure.patch   
|4 
 external/gpgmepp/find-libgpg-error-libassuan.patch 
|   35 --
 external/gpgmepp/fix-autoconf-macros.patch 
|8 
 external/gpgmepp/gcc9.patch
|2 
 external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1
|   32 -
 external/gpgmepp/gpgme.git-fe2892618c20cd40c342cce26ffb6ac4644fd3c3.patch.1
|   30 -
 external/gpgmepp/macos-include.patch   
|   10 
 external/gpgmepp/rpath.patch   
|2 
 external/gpgmepp/ubsan.patch   
|8 
 external/gpgmepp/w32-build-fixes.patch.1   
|   23 -
 external/gpgmepp/w32-disable-docs.patch.1  
|2 
 external/gpgmepp/w32-fix-libtool.patch.1   
|2 
 external/gpgmepp/w32-fix-win32-macro.patch.1   
|   21 -
 external/gpgmepp/w32-include.patch 
|   42 ++
 external/nss/ExternalProject_nss.mk
|1 
 external/nss/UnpackedTarball_nss.mk
|2 
 external/nss/asan.patch.1  
|6 
 external/nss/clang-cl.patch.0  
|   23 -
 external/nss/macos-dlopen.patch.0  
|2 
 external/nss/nss-android.patch.1   
|8 
 external/nss/nss-bz1646594.patch.1 
|2 
 external/nss/nss-ios.patch 
|   44 +-
 external/nss/nss-restore-manual-pre-dependencies.patch.1   
|2 
 external/nss/nss-win32-make.patch.1
|4 
 external/nss/nss.aix.patch  

[Libreoffice-commits] core.git: 2 commits - basic/source framework/inc framework/source

2023-01-29 Thread Noel Grandin (via logerrit)
 basic/source/classes/sbxmod.cxx  |2 +-
 framework/inc/helper/propertysetcontainer.hxx|3 ++-
 framework/source/fwe/helper/propertysetcontainer.cxx |   12 +++-
 3 files changed, 10 insertions(+), 7 deletions(-)

New commits:
commit ec4babad021218b75dfe8534985d7db525edde69
Author: Noel Grandin 
AuthorDate: Sun Jan 29 19:09:31 2023 +0200
Commit: Noel Grandin 
CommitDate: Sun Jan 29 18:03:48 2023 +

no need to lock SolarMutex over the whole method here

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

diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 00bfac58dd71..f38e729185db 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -2375,9 +2375,9 @@ public:
 virtual void SAL_CALL documentEventOccured( const document::DocumentEvent& 
rEvent ) override
 {
 // early disposing on document event "OnUnload", to be sure Basic 
still exists when calling VBA "UserForm_Terminate"
-SolarMutexGuard g;
 if( rEvent.EventName == GlobalEventConfig::GetEventName( 
GlobalEventId::CLOSEDOC ) )
 {
+SolarMutexGuard g;
 removeListener();
 mbDisposed = true;
 if ( mpUserForm )
commit 6a26d47a79615c6b91b298937cdfee2f5294a58b
Author: Noel Grandin 
AuthorDate: Sun Jan 29 19:01:17 2023 +0200
Commit: Noel Grandin 
CommitDate: Sun Jan 29 18:03:38 2023 +

use std:mutex in PropertySetContainer

instead of SolarMutex, we don't need to lock SolarMutex here,
we are not touching any UI stuff

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

diff --git a/framework/inc/helper/propertysetcontainer.hxx 
b/framework/inc/helper/propertysetcontainer.hxx
index 75c8414c3698..849899784c64 100644
--- a/framework/inc/helper/propertysetcontainer.hxx
+++ b/framework/inc/helper/propertysetcontainer.hxx
@@ -21,6 +21,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -65,7 +66,7 @@ class PropertySetContainer : public 
css::container::XIndexContainer,
 private:
 typedef std::vector< css::uno::Reference< css::beans::XPropertySet > > 
PropertySetVector;
 PropertySetVector  
 m_aPropertySetVector;
-
+std::mutex m_aMutex;
 };
 
 }
diff --git a/framework/source/fwe/helper/propertysetcontainer.cxx 
b/framework/source/fwe/helper/propertysetcontainer.cxx
index ad7d639539b7..2fcd07a53fde 100644
--- a/framework/source/fwe/helper/propertysetcontainer.cxx
+++ b/framework/source/fwe/helper/propertysetcontainer.cxx
@@ -73,7 +73,7 @@ Any SAL_CALL PropertySetContainer::queryInterface( const 
Type& rType )
 // XIndexContainer
 void SAL_CALL PropertySetContainer::insertByIndex( sal_Int32 Index, const 
css::uno::Any& Element )
 {
-SolarMutexGuard g;
+std::unique_lock g(m_aMutex);
 
 sal_Int32 nSize = m_aPropertySetVector.size();
 
@@ -101,7 +101,7 @@ void SAL_CALL PropertySetContainer::insertByIndex( 
sal_Int32 Index, const css::u
 
 void SAL_CALL PropertySetContainer::removeByIndex( sal_Int32 nIndex )
 {
-SolarMutexGuard g;
+std::unique_lock g(m_aMutex);
 
 if ( static_cast(m_aPropertySetVector.size()) <= nIndex )
 throw IndexOutOfBoundsException( OUString(), static_cast(this) );
@@ -112,6 +112,8 @@ void SAL_CALL PropertySetContainer::removeByIndex( 
sal_Int32 nIndex )
 // XIndexReplace
 void SAL_CALL PropertySetContainer::replaceByIndex( sal_Int32 Index, const 
css::uno::Any& Element )
 {
+std::unique_lock g(m_aMutex);
+
 if ( static_cast(m_aPropertySetVector.size()) <= Index )
 throw IndexOutOfBoundsException( OUString(), static_cast(this) );
 
@@ -130,14 +132,14 @@ void SAL_CALL PropertySetContainer::replaceByIndex( 
sal_Int32 Index, const css::
 // XIndexAccess
 sal_Int32 SAL_CALL PropertySetContainer::getCount()
 {
-SolarMutexGuard g;
+std::unique_lock g(m_aMutex);
 
 return m_aPropertySetVector.size();
 }
 
 Any SAL_CALL PropertySetContainer::getByIndex( sal_Int32 Index )
 {
-SolarMutexGuard g;
+std::unique_lock g(m_aMutex);
 
 if ( static_cast(m_aPropertySetVector.size()) <= Index )
 throw IndexOutOfBoundsException( OUString(), static_cast(this) );
@@ -148,7 +150,7 @@ Any SAL_CALL PropertySetContainer::getByIndex( sal_Int32 
Index )
 // XElementAccess
 sal_Bool SAL_CALL PropertySetContainer::hasElements()
 {
-SolarMutexGuard g;
+std::unique_lock g(m_aMutex);
 
 return !( m_aPropertySetVector.empty() );
 }


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

2023-01-29 Thread Caolán McNamara (via logerrit)
 oox/source/crypto/AgileEngine.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 5583d5c71495402eeba568b36588cba345f4a623
Author: Caolán McNamara 
AuthorDate: Sun Jan 29 14:31:08 2023 +
Commit: Caolán McNamara 
CommitDate: Sun Jan 29 15:23:12 2023 +

ofz#55499 output buffer has to at least be the same size as input buffer

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

diff --git a/oox/source/crypto/AgileEngine.cxx 
b/oox/source/crypto/AgileEngine.cxx
index 09748e9dfd7b..f7518498171d 100644
--- a/oox/source/crypto/AgileEngine.cxx
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -332,7 +332,9 @@ bool AgileEngine::decryptAndCheckVerifierHash(OUString 
const & rPassword)
 
 std::vector& encryptedHashInput = 
mInfo.encryptedVerifierHashInput;
 // SALT - needs to be a multiple of block size (?)
-sal_Int32 nSaltSize = roundUp(mInfo.saltSize, mInfo.blockSize);
+sal_uInt32 nSaltSize = roundUp(mInfo.saltSize, mInfo.blockSize);
+if (nSaltSize < encryptedHashInput.size())
+return false;
 std::vector hashInput(nSaltSize, 0);
 calculateBlock(constBlock1, hashFinal, encryptedHashInput, hashInput);
 


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-3' - 12 commits - compilerplugins/LICENSE.TXT configure.ac cui/inc download.lst external/cairo external/curl external/expat external/freetype

2023-01-29 Thread Andras Timar (via logerrit)
 compilerplugins/LICENSE.TXT |  
  2 
 configure.ac|  
  4 
 cui/inc/strings.hrc |  
  2 
 download.lst|  
 40 +--
 external/cairo/ExternalPackage_pixman.mk|  
  2 
 external/cairo/ExternalProject_pixman.mk|  
  6 
 external/cairo/pixman/pixman-0.24.4.patch   |  
  2 
 external/cairo/pixman/pixman-ubsan.patch|  
 41 +--
 external/curl/UnpackedTarball_curl.mk   |  
  6 
 external/curl/asan-poison-nsspem.patch.0|  
 11 
 external/curl/curl-msvc-disable-protocols.patch.1   |  
  2 
 external/curl/curl-nss.patch.1  |  
  2 
 external/curl/zlib.patch.0  |  
 12 
 external/expat/expat-winapi.patch   |  
 13 -
 external/freetype/ExternalProject_freetype.mk   |  
 10 
 external/freetype/UnpackedTarball_freetype.mk   |  
  3 
 external/freetype/freetype-2.6.5.patch.1|  
 45 +--
 external/freetype/ubsan.patch   |  
 11 
 external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1|  
 72 +
 external/gpgmepp/ExternalPackage_gpgmepp.mk |  
  4 
 external/gpgmepp/ExternalProject_gpgmepp.mk |  
 17 -
 external/gpgmepp/Library_gpgmepp.mk |  
  3 
 external/gpgmepp/UnpackedTarball_gpgmepp.mk |  
  5 
 external/gpgmepp/Wincompatible-function-pointer-types.patch |  
 31 ++
 external/gpgmepp/asan.patch |  
  2 
 external/gpgmepp/configure.patch|  
  4 
 external/gpgmepp/find-libgpg-error-libassuan.patch  |  
  6 
 external/gpgmepp/fix-autoconf-macros.patch  |  
  8 
 external/gpgmepp/gcc9.patch |  
  2 
 external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 |  
 32 --
 external/gpgmepp/macos-include.patch|  
 10 
 external/gpgmepp/rpath.patch|  
  2 
 external/gpgmepp/ubsan.patch|  
  8 
 external/gpgmepp/w32-build-fixes.patch.1|  
 16 -
 external/gpgmepp/w32-disable-docs.patch.1   |  
  2 
 external/gpgmepp/w32-fix-libtool.patch.1|  
  2 
 external/gpgmepp/w32-fix-win32-macro.patch.1|  
 20 -
 external/gpgmepp/w32-include.patch  |  
 42 +++
 external/nss/UnpackedTarball_nss.mk |  
  2 
 external/nss/asan.patch.1   |  
  2 
 external/nss/clang-cl.patch.0   |  
 12 
 external/nss/macos-dlopen.patch.0   |  
  2 
 external/nss/nss-android.patch.1|  
  6 
 external/nss/nss-ios.patch  |  
 36 +-
 external/nss/nss-restore-manual-pre-dependencies.patch.1|  
  2 
 external/nss/nss-win32-make.patch.1 |  
  4 
 external/nss/nss.aix.patch  |  
 10 
 external/nss/nss.bzmozilla1238154.patch |  
  2 
 external/nss/nss.cygwin64.in32bit.patch |  
  2 
 external/nss/nss.nowerror.patch |  
  2 
 external/nss/nss.utf8bom.patch.1|  
  4 
 external/nss/nss.vs2015.patch   |  
  2 
 external/nss/nss.vs2015.pdb.patch   |  
  2 
 external/nss/nss.windows.patch  |  
  6 
 external/nss/nss_macosx.patch   |  
 12 
 external/nss/ubsan.patch.0  |  
  2 
 external/poppler/disable-freetype.patch.1   |  
  4 
 external/poppler/sanitizer.patch 

[Libreoffice-commits] core.git: 2 commits - include/svx svx/source tools/qa

2023-01-29 Thread Tomaž Vajngerl (via logerrit)
 include/svx/svdpagv.hxx |   10 +--
 svx/source/svdraw/svdpagv.cxx   |   14 ++--
 tools/qa/cppunit/test_rectangle.cxx |  117 
 3 files changed, 92 insertions(+), 49 deletions(-)

New commits:
commit eff28a8a170759867916d7455b14e6a66a37daff
Author: Tomaž Vajngerl 
AuthorDate: Tue Nov 22 13:13:53 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sun Jan 29 14:23:48 2023 +

tools: rearrange Rectangle test, add construction test case

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

diff --git a/tools/qa/cppunit/test_rectangle.cxx 
b/tools/qa/cppunit/test_rectangle.cxx
index 02b355ad0576..12e46910bc2f 100644
--- a/tools/qa/cppunit/test_rectangle.cxx
+++ b/tools/qa/cppunit/test_rectangle.cxx
@@ -14,10 +14,13 @@
 
 namespace
 {
-class Test : public CppUnit::TestFixture
+class RectangleTest : public CppUnit::TestFixture
 {
 public:
-void test_rectangle();
+void testConstruction();
+void testOpenClosedSize();
+void testUnitConvesion();
+void testSetOperators();
 void test_rectnormalize_alreadynormal();
 void test_rectnormalize_zerorect();
 void test_rectnormalize_reverse_topleft_bottomright();
@@ -26,8 +29,11 @@ public:
 void test_rectnormalize_zerowidth_top_bottom_reversed();
 void test_rectnormalize_zeroheight_left_right_reversed();
 
-CPPUNIT_TEST_SUITE(Test);
-CPPUNIT_TEST(test_rectangle);
+CPPUNIT_TEST_SUITE(RectangleTest);
+CPPUNIT_TEST(testConstruction);
+CPPUNIT_TEST(testOpenClosedSize);
+CPPUNIT_TEST(testUnitConvesion);
+CPPUNIT_TEST(testSetOperators);
 CPPUNIT_TEST(test_rectnormalize_zerorect);
 CPPUNIT_TEST(test_rectnormalize_alreadynormal);
 CPPUNIT_TEST(test_rectnormalize_reverse_topleft_bottomright);
@@ -38,7 +44,49 @@ public:
 CPPUNIT_TEST_SUITE_END();
 };
 
-void Test::test_rectangle()
+void RectangleTest::testConstruction()
+{
+{
+tools::Rectangle aRect1(Point(), Size(0, 20));
+CPPUNIT_ASSERT_EQUAL(true, aRect1.IsEmpty());
+CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect1.getOpenWidth());
+
+tools::Rectangle aRect2{ Point(), Point(0, 20) };
+CPPUNIT_ASSERT_EQUAL(false, aRect2.IsEmpty());
+CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect2.getOpenWidth());
+
+tools::Rectangle aRect3(0, 0, 0, 20);
+CPPUNIT_ASSERT_EQUAL(false, aRect3.IsEmpty());
+CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect3.getOpenWidth());
+}
+{
+constexpr tools::Rectangle aRect(Point(), Size(-1, -2));
+static_assert(!aRect.IsEmpty());
+static_assert(aRect.Right() == 0);
+static_assert(aRect.Bottom() == -1);
+
+tools::Rectangle aRect2;
+aRect2.SetSize(Size(-1, -2));
+CPPUNIT_ASSERT_EQUAL(aRect, aRect2);
+
+constexpr tools::Rectangle aRect3(Point(), Size(0, 0));
+static_assert(aRect3.IsEmpty());
+static_assert(aRect3.Right() == 0);
+static_assert(aRect3.Bottom() == 0);
+
+constexpr tools::Rectangle aRect4(Point(), Size(1, 1));
+static_assert(!aRect4.IsEmpty());
+static_assert(aRect4.Right() == 0);
+static_assert(aRect4.Bottom() == 0);
+
+constexpr tools::Rectangle aRect5(Point(), Size(-1, -1));
+static_assert(!aRect5.IsEmpty());
+static_assert(aRect5.Right() == 0);
+static_assert(aRect5.Bottom() == 0);
+}
+}
+
+void RectangleTest::testOpenClosedSize()
 {
 {
 tools::Rectangle aRect(1, 1, 1, 1);
@@ -71,18 +119,10 @@ void Test::test_rectangle()
 aRect.SetPosY(12);
 CPPUNIT_ASSERT_EQUAL(tools::Long(1), aRect.GetWidth());
 }
+}
 
-{
-constexpr tools::Rectangle aRect(Point(), Size(-1, -2));
-static_assert(!aRect.IsEmpty());
-static_assert(aRect.Right() == 0);
-static_assert(aRect.Bottom() == -1);
-
-tools::Rectangle aRect2;
-aRect2.SetSize(Size(-1, -2));
-CPPUNIT_ASSERT_EQUAL(aRect, aRect2);
-}
-
+void RectangleTest::testUnitConvesion()
+{
 {
 constexpr tools::Rectangle aRectTwip(100, 100, 100, 100);
 constexpr tools::Rectangle aRectMm100(
@@ -106,24 +146,25 @@ void Test::test_rectangle()
 static_assert(aRectMm100.GetWidth() == 0);
 static_assert(aRectMm100.GetHeight() == 0);
 }
+}
 
-{
-constexpr tools::Rectangle rect(Point(0, 0), Size(20, 20));
-constexpr tools::Rectangle inside(Point(10, 10), Size(10, 10));
-constexpr tools::Rectangle overlap(Point(10, 10), Size(20, 20));
-constexpr tools::Rectangle outside(Point(20, 20), Size(10, 10));
-CPPUNIT_ASSERT(rect.Contains(inside));
-CPPUNIT_ASSERT(rect.Contains(rect));
-CPPUNIT_ASSERT(!rect.Contains(overlap));
-CPPUNIT_ASSERT(!rect.Contains(outside));
-CPPUNIT_ASSERT(rect.Overlaps(insi

[Libreoffice-commits] core.git: comphelper/source desktop/qa desktop/source include/comphelper include/LibreOfficeKit include/sfx2 sc/source sfx2/source

2023-01-29 Thread Ashod Nakashian (via logerrit)
 comphelper/source/misc/lok.cxx  |   19 ++
 desktop/qa/desktop_lib/test_desktop_lib.cxx |4 +-
 desktop/source/lib/init.cxx |   49 
 include/LibreOfficeKit/LibreOfficeKit.h |3 +
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   11 ++
 include/comphelper/lok.hxx  |3 +
 include/sfx2/lokhelper.hxx  |   11 ++
 include/sfx2/viewsh.hxx |   17 +
 sc/source/ui/view/viewfun6.cxx  |   19 ++
 sfx2/source/view/lokhelper.cxx  |   42 
 sfx2/source/view/viewsh.cxx |4 ++
 11 files changed, 181 insertions(+), 1 deletion(-)

New commits:
commit e2d646665c4cb4c7eeb0a73cb5f460838589bef0
Author: Ashod Nakashian 
AuthorDate: Fri Dec 23 13:02:57 2022 -0500
Commit: Andras Timar 
CommitDate: Sun Jan 29 13:22:28 2023 +

lok: support per-user timezone

This adds support for user-specific timezone.

When none is provided during loading, the
system default is used.

Signed-off-by: Ashod Nakashian 
Change-Id: Ie863450687eb82bc475268a09c9112e9fd50020f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144816
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 
(cherry picked from commit abaf8c0af1c6c7fe01276fdf2ae62419c7b0f654)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146211
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index b11bf4e83582..1f07cd2614eb 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 
@@ -255,6 +256,24 @@ bool isAllowlistedLanguage(const OUString& lang)
 #endif
 }
 
+void setTimezone(bool isSet, const OUString& rTimezone)
+{
+if (isSet)
+{
+// Set the given timezone, even if empty.
+osl_setEnvironment(OUString("TZ").pData, rTimezone.pData);
+}
+else
+{
+// Unset and empty aren't the same.
+// When unset, it means default to the system configured timezone.
+osl_clearEnvironment(OUString("TZ").pData);
+}
+
+// Update the timezone data.
+::tzset();
+}
+
 static void (*pStatusIndicatorCallback)(void *data, 
statusIndicatorCallbackType type, int percent, const char* pText)(nullptr);
 static void *pStatusIndicatorCallbackData(nullptr);
 
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 98c734c8190a..a5560dd6be8d 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3629,10 +3629,12 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(65), offsetof(struct 
_LibreOfficeKitDocumentClass, getSelectionTypeAndText));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(66), offsetof(struct 
_LibreOfficeKitDocumentClass, getDataArea));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), offsetof(struct 
_LibreOfficeKitDocumentClass, getEditMode));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(68),
+ offsetof(struct _LibreOfficeKitDocumentClass, 
setViewTimezone));
 
 // Extending is fine, update this, and add new assert for the offsetof the
 // new method
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(68), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 97d74bc4682d..db9a9632e4c3 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7,6 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
 #include 
 #include 
 
@@ -1203,6 +1204,8 @@ static bool 
doc_renderSearchResult(LibreOfficeKitDocument* pThis,
 
 static void doc_sendContentControlEvent(LibreOfficeKitDocument* pThis, const 
char* pArguments);
 
+static void doc_setViewTimezone(LibreOfficeKitDocument* pThis, int nId, const 
char* timezone);
+
 } // extern "C"
 
 namespace {
@@ -1353,6 +1356,8 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference 
 xC
 
 m_pDocumentClass->sendContentControlEvent = 
doc_sendContentControlEvent;
 
+m_pDocumentClass->setViewTimezone = doc_setViewTimezone;
+
 gDocumentClass = m_pDocumentClass;
 }
 pClass = m_pDocumentClass.get();
@@ -2600,6 +2605,27 @@ static LibreOfficeKitDocument* 
lo_documentLoadWithOptions(LibreOfficeKit* pThis,
 SvNumberFormatter::resetTheCurrencyTable();
 }
 
+// Set the timezone, if not empty.
+const OUString aTimezone = extractParameter(aOptions, u"Timezone");
+if (!aTimezone.isEmpty())
+{
+SfxLokHelper::setDefaultTime

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

2023-01-29 Thread Stephan Bergmann (via logerrit)
 basic/source/classes/sbxmod.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e3e259d551c0c8b7c106191f2c258e5929db1b29
Author: Stephan Bergmann 
AuthorDate: Sun Jan 29 11:51:10 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Jan 29 12:09:07 2023 +

UNO fn FormObjEventListenerImpl::documentEventOccured must lock SolarMutex

When trying to address a deadlock issue involving 
NotifySingleListenerIgnoreRE
(sfx2/source/doc/sfxbasemodel.cxx), I hit the DBG_TESTSOLARMUTEX at

> DbgTestSolarMutex
> SfxBroadcaster::RemoveListener
> SfxListener::EndListening
> CheckParentsOnDelete
> SbxObject::~SbxObject
> SbUnoObject::~SbUnoObject
> SvRefBase::ReleaseRef
> tools::SvRef::operator=
> SbUserFormModule::ResetApiObj
> FormObjEventListenerImpl::documentEventOccured
> (anonymous 
namespace)::NotifySingleListenerIgnoreRE::operator
> 
comphelper::OInterfaceContainerHelper2::forEach>
> SfxBaseModel::postEvent_Impl
> SfxBaseModel::Notify
> ScModelObj::Notify
> SfxBroadcaster::Broadcast
> SfxApplication::NotifyEvent
> SfxBaseController::dispose
> (anonymous namespace)::XFrameImpl::setComponent
> (anonymous namespace)::XFrameImpl::close
> SfxFrame::DoClose
> SfxViewFrame::Notify
> SfxBroadcaster::Broadcast
> (anonymous namespace)::SfxModelListener_Impl::notifyClosing
> SfxBaseModel::close
> SfxBaseModel::dispose
> UnoApiTest::load
> UnoApiTest::loadFromURL
> VBAMacroTest::testVba

during CppunitTest_sc_vba_macro_test, which this commit fixes.  (I commit 
this
independently of any commit addressing that deadlock, as that involves some
SolarMutexReleaser hackery and might eventually get reverted, while this 
change
here looks correct and worthwhile even on its own.)

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

diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 60bdc9171b48..00bfac58dd71 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -2375,6 +2375,7 @@ public:
 virtual void SAL_CALL documentEventOccured( const document::DocumentEvent& 
rEvent ) override
 {
 // early disposing on document event "OnUnload", to be sure Basic 
still exists when calling VBA "UserForm_Terminate"
+SolarMutexGuard g;
 if( rEvent.EventName == GlobalEventConfig::GetEventName( 
GlobalEventId::CLOSEDOC ) )
 {
 removeListener();


[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 11 commits - basctl/source basegfx/test chart2/source cui/source editeng/source filter/source include/basegfx include/editeng inclu

2023-01-29 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 38ffd042c8629636e680bdaa33dfcda72cd37a5a
Author: Tomaž Vajngerl 
AuthorDate: Tue Nov 22 13:13:53 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sun Jan 29 20:47:28 2023 +0900

tools: rearrange Rectangle test, add construction test case

Change-Id: I735600181665100e8540b6f5f14ffebfe6f33371

diff --git a/tools/qa/cppunit/test_rectangle.cxx 
b/tools/qa/cppunit/test_rectangle.cxx
index 02b355ad0576..12e46910bc2f 100644
--- a/tools/qa/cppunit/test_rectangle.cxx
+++ b/tools/qa/cppunit/test_rectangle.cxx
@@ -14,10 +14,13 @@
 
 namespace
 {
-class Test : public CppUnit::TestFixture
+class RectangleTest : public CppUnit::TestFixture
 {
 public:
-void test_rectangle();
+void testConstruction();
+void testOpenClosedSize();
+void testUnitConvesion();
+void testSetOperators();
 void test_rectnormalize_alreadynormal();
 void test_rectnormalize_zerorect();
 void test_rectnormalize_reverse_topleft_bottomright();
@@ -26,8 +29,11 @@ public:
 void test_rectnormalize_zerowidth_top_bottom_reversed();
 void test_rectnormalize_zeroheight_left_right_reversed();
 
-CPPUNIT_TEST_SUITE(Test);
-CPPUNIT_TEST(test_rectangle);
+CPPUNIT_TEST_SUITE(RectangleTest);
+CPPUNIT_TEST(testConstruction);
+CPPUNIT_TEST(testOpenClosedSize);
+CPPUNIT_TEST(testUnitConvesion);
+CPPUNIT_TEST(testSetOperators);
 CPPUNIT_TEST(test_rectnormalize_zerorect);
 CPPUNIT_TEST(test_rectnormalize_alreadynormal);
 CPPUNIT_TEST(test_rectnormalize_reverse_topleft_bottomright);
@@ -38,7 +44,49 @@ public:
 CPPUNIT_TEST_SUITE_END();
 };
 
-void Test::test_rectangle()
+void RectangleTest::testConstruction()
+{
+{
+tools::Rectangle aRect1(Point(), Size(0, 20));
+CPPUNIT_ASSERT_EQUAL(true, aRect1.IsEmpty());
+CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect1.getOpenWidth());
+
+tools::Rectangle aRect2{ Point(), Point(0, 20) };
+CPPUNIT_ASSERT_EQUAL(false, aRect2.IsEmpty());
+CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect2.getOpenWidth());
+
+tools::Rectangle aRect3(0, 0, 0, 20);
+CPPUNIT_ASSERT_EQUAL(false, aRect3.IsEmpty());
+CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect3.getOpenWidth());
+}
+{
+constexpr tools::Rectangle aRect(Point(), Size(-1, -2));
+static_assert(!aRect.IsEmpty());
+static_assert(aRect.Right() == 0);
+static_assert(aRect.Bottom() == -1);
+
+tools::Rectangle aRect2;
+aRect2.SetSize(Size(-1, -2));
+CPPUNIT_ASSERT_EQUAL(aRect, aRect2);
+
+constexpr tools::Rectangle aRect3(Point(), Size(0, 0));
+static_assert(aRect3.IsEmpty());
+static_assert(aRect3.Right() == 0);
+static_assert(aRect3.Bottom() == 0);
+
+constexpr tools::Rectangle aRect4(Point(), Size(1, 1));
+static_assert(!aRect4.IsEmpty());
+static_assert(aRect4.Right() == 0);
+static_assert(aRect4.Bottom() == 0);
+
+constexpr tools::Rectangle aRect5(Point(), Size(-1, -1));
+static_assert(!aRect5.IsEmpty());
+static_assert(aRect5.Right() == 0);
+static_assert(aRect5.Bottom() == 0);
+}
+}
+
+void RectangleTest::testOpenClosedSize()
 {
 {
 tools::Rectangle aRect(1, 1, 1, 1);
@@ -71,18 +119,10 @@ void Test::test_rectangle()
 aRect.SetPosY(12);
 CPPUNIT_ASSERT_EQUAL(tools::Long(1), aRect.GetWidth());
 }
+}
 
-{
-constexpr tools::Rectangle aRect(Point(), Size(-1, -2));
-static_assert(!aRect.IsEmpty());
-static_assert(aRect.Right() == 0);
-static_assert(aRect.Bottom() == -1);
-
-tools::Rectangle aRect2;
-aRect2.SetSize(Size(-1, -2));
-CPPUNIT_ASSERT_EQUAL(aRect, aRect2);
-}
-
+void RectangleTest::testUnitConvesion()
+{
 {
 constexpr tools::Rectangle aRectTwip(100, 100, 100, 100);
 constexpr tools::Rectangle aRectMm100(
@@ -106,24 +146,25 @@ void Test::test_rectangle()
 static_assert(aRectMm100.GetWidth() == 0);
 static_assert(aRectMm100.GetHeight() == 0);
 }
+}
 
-{
-constexpr tools::Rectangle rect(Point(0, 0), Size(20, 20));
-constexpr tools::Rectangle inside(Point(10, 10), Size(10, 10));
-constexpr tools::Rectangle overlap(Point(10, 10), Size(20, 20));
-constexpr tools::Rectangle outside(Point(20, 20), Size(10, 10));
-CPPUNIT_ASSERT(rect.Contains(inside));
-CPPUNIT_ASSERT(rect.Contains(rect));
-CPPUNIT_ASSERT(!rect.Contains(overlap));
-CPPUNIT_ASSERT(!rect.Contains(outside));
-CPPUNIT_ASSERT(rect.Overlaps(inside));
-CPPUNIT_ASSERT(rect.Overlaps(rect));
-CPPUNIT_ASSERT(rect.Overlaps(overlap));
-CPPUNIT_ASSERT(!rect.Overlaps(outside));
-}
+void RectangleTest::testSetOperators()
+{
+constexpr tools::Rectangle rect(Point(0, 0), Size(20, 20));
+constexpr tools::Rectangle inside(Point(10, 10), S

[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 12 commits - basctl/source basegfx/CppunitTest_basegfx.mk basegfx/test chart2/source cui/source editeng/source filter/source includ

2023-01-29 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 9108ff374e0a98a6fef3c59fd4732a71100206f8
Author: Tomaž Vajngerl 
AuthorDate: Tue Nov 22 13:13:53 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sun Jan 29 20:44:34 2023 +0900

tools: rearrange Rectangle test, add construction test case

Change-Id: I735600181665100e8540b6f5f14ffebfe6f33371

diff --git a/tools/qa/cppunit/test_rectangle.cxx 
b/tools/qa/cppunit/test_rectangle.cxx
index 02b355ad0576..12e46910bc2f 100644
--- a/tools/qa/cppunit/test_rectangle.cxx
+++ b/tools/qa/cppunit/test_rectangle.cxx
@@ -14,10 +14,13 @@
 
 namespace
 {
-class Test : public CppUnit::TestFixture
+class RectangleTest : public CppUnit::TestFixture
 {
 public:
-void test_rectangle();
+void testConstruction();
+void testOpenClosedSize();
+void testUnitConvesion();
+void testSetOperators();
 void test_rectnormalize_alreadynormal();
 void test_rectnormalize_zerorect();
 void test_rectnormalize_reverse_topleft_bottomright();
@@ -26,8 +29,11 @@ public:
 void test_rectnormalize_zerowidth_top_bottom_reversed();
 void test_rectnormalize_zeroheight_left_right_reversed();
 
-CPPUNIT_TEST_SUITE(Test);
-CPPUNIT_TEST(test_rectangle);
+CPPUNIT_TEST_SUITE(RectangleTest);
+CPPUNIT_TEST(testConstruction);
+CPPUNIT_TEST(testOpenClosedSize);
+CPPUNIT_TEST(testUnitConvesion);
+CPPUNIT_TEST(testSetOperators);
 CPPUNIT_TEST(test_rectnormalize_zerorect);
 CPPUNIT_TEST(test_rectnormalize_alreadynormal);
 CPPUNIT_TEST(test_rectnormalize_reverse_topleft_bottomright);
@@ -38,7 +44,49 @@ public:
 CPPUNIT_TEST_SUITE_END();
 };
 
-void Test::test_rectangle()
+void RectangleTest::testConstruction()
+{
+{
+tools::Rectangle aRect1(Point(), Size(0, 20));
+CPPUNIT_ASSERT_EQUAL(true, aRect1.IsEmpty());
+CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect1.getOpenWidth());
+
+tools::Rectangle aRect2{ Point(), Point(0, 20) };
+CPPUNIT_ASSERT_EQUAL(false, aRect2.IsEmpty());
+CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect2.getOpenWidth());
+
+tools::Rectangle aRect3(0, 0, 0, 20);
+CPPUNIT_ASSERT_EQUAL(false, aRect3.IsEmpty());
+CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect3.getOpenWidth());
+}
+{
+constexpr tools::Rectangle aRect(Point(), Size(-1, -2));
+static_assert(!aRect.IsEmpty());
+static_assert(aRect.Right() == 0);
+static_assert(aRect.Bottom() == -1);
+
+tools::Rectangle aRect2;
+aRect2.SetSize(Size(-1, -2));
+CPPUNIT_ASSERT_EQUAL(aRect, aRect2);
+
+constexpr tools::Rectangle aRect3(Point(), Size(0, 0));
+static_assert(aRect3.IsEmpty());
+static_assert(aRect3.Right() == 0);
+static_assert(aRect3.Bottom() == 0);
+
+constexpr tools::Rectangle aRect4(Point(), Size(1, 1));
+static_assert(!aRect4.IsEmpty());
+static_assert(aRect4.Right() == 0);
+static_assert(aRect4.Bottom() == 0);
+
+constexpr tools::Rectangle aRect5(Point(), Size(-1, -1));
+static_assert(!aRect5.IsEmpty());
+static_assert(aRect5.Right() == 0);
+static_assert(aRect5.Bottom() == 0);
+}
+}
+
+void RectangleTest::testOpenClosedSize()
 {
 {
 tools::Rectangle aRect(1, 1, 1, 1);
@@ -71,18 +119,10 @@ void Test::test_rectangle()
 aRect.SetPosY(12);
 CPPUNIT_ASSERT_EQUAL(tools::Long(1), aRect.GetWidth());
 }
+}
 
-{
-constexpr tools::Rectangle aRect(Point(), Size(-1, -2));
-static_assert(!aRect.IsEmpty());
-static_assert(aRect.Right() == 0);
-static_assert(aRect.Bottom() == -1);
-
-tools::Rectangle aRect2;
-aRect2.SetSize(Size(-1, -2));
-CPPUNIT_ASSERT_EQUAL(aRect, aRect2);
-}
-
+void RectangleTest::testUnitConvesion()
+{
 {
 constexpr tools::Rectangle aRectTwip(100, 100, 100, 100);
 constexpr tools::Rectangle aRectMm100(
@@ -106,24 +146,25 @@ void Test::test_rectangle()
 static_assert(aRectMm100.GetWidth() == 0);
 static_assert(aRectMm100.GetHeight() == 0);
 }
+}
 
-{
-constexpr tools::Rectangle rect(Point(0, 0), Size(20, 20));
-constexpr tools::Rectangle inside(Point(10, 10), Size(10, 10));
-constexpr tools::Rectangle overlap(Point(10, 10), Size(20, 20));
-constexpr tools::Rectangle outside(Point(20, 20), Size(10, 10));
-CPPUNIT_ASSERT(rect.Contains(inside));
-CPPUNIT_ASSERT(rect.Contains(rect));
-CPPUNIT_ASSERT(!rect.Contains(overlap));
-CPPUNIT_ASSERT(!rect.Contains(outside));
-CPPUNIT_ASSERT(rect.Overlaps(inside));
-CPPUNIT_ASSERT(rect.Overlaps(rect));
-CPPUNIT_ASSERT(rect.Overlaps(overlap));
-CPPUNIT_ASSERT(!rect.Overlaps(outside));
-}
+void RectangleTest::testSetOperators()
+{
+constexpr tools::Rectangle rect(Point(0, 0), Size(20, 20));
+constexpr tools::Rectangle inside(Point(10, 10), S

[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 14 commits - basctl/source basegfx/test chart2/source cui/source editeng/source filter/source include/basegfx include/editeng inclu

2023-01-29 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 41fd84cb3475bfc29c10814cdc1ee76b621991b6
Author: Tomaž Vajngerl 
AuthorDate: Tue Nov 22 13:13:53 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sun Jan 29 20:36:11 2023 +0900

tools: rearrange Rectangle test, add construction test case

Change-Id: I735600181665100e8540b6f5f14ffebfe6f33371

diff --git a/tools/qa/cppunit/test_rectangle.cxx 
b/tools/qa/cppunit/test_rectangle.cxx
index 02b355ad0576..12e46910bc2f 100644
--- a/tools/qa/cppunit/test_rectangle.cxx
+++ b/tools/qa/cppunit/test_rectangle.cxx
@@ -14,10 +14,13 @@
 
 namespace
 {
-class Test : public CppUnit::TestFixture
+class RectangleTest : public CppUnit::TestFixture
 {
 public:
-void test_rectangle();
+void testConstruction();
+void testOpenClosedSize();
+void testUnitConvesion();
+void testSetOperators();
 void test_rectnormalize_alreadynormal();
 void test_rectnormalize_zerorect();
 void test_rectnormalize_reverse_topleft_bottomright();
@@ -26,8 +29,11 @@ public:
 void test_rectnormalize_zerowidth_top_bottom_reversed();
 void test_rectnormalize_zeroheight_left_right_reversed();
 
-CPPUNIT_TEST_SUITE(Test);
-CPPUNIT_TEST(test_rectangle);
+CPPUNIT_TEST_SUITE(RectangleTest);
+CPPUNIT_TEST(testConstruction);
+CPPUNIT_TEST(testOpenClosedSize);
+CPPUNIT_TEST(testUnitConvesion);
+CPPUNIT_TEST(testSetOperators);
 CPPUNIT_TEST(test_rectnormalize_zerorect);
 CPPUNIT_TEST(test_rectnormalize_alreadynormal);
 CPPUNIT_TEST(test_rectnormalize_reverse_topleft_bottomright);
@@ -38,7 +44,49 @@ public:
 CPPUNIT_TEST_SUITE_END();
 };
 
-void Test::test_rectangle()
+void RectangleTest::testConstruction()
+{
+{
+tools::Rectangle aRect1(Point(), Size(0, 20));
+CPPUNIT_ASSERT_EQUAL(true, aRect1.IsEmpty());
+CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect1.getOpenWidth());
+
+tools::Rectangle aRect2{ Point(), Point(0, 20) };
+CPPUNIT_ASSERT_EQUAL(false, aRect2.IsEmpty());
+CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect2.getOpenWidth());
+
+tools::Rectangle aRect3(0, 0, 0, 20);
+CPPUNIT_ASSERT_EQUAL(false, aRect3.IsEmpty());
+CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect3.getOpenWidth());
+}
+{
+constexpr tools::Rectangle aRect(Point(), Size(-1, -2));
+static_assert(!aRect.IsEmpty());
+static_assert(aRect.Right() == 0);
+static_assert(aRect.Bottom() == -1);
+
+tools::Rectangle aRect2;
+aRect2.SetSize(Size(-1, -2));
+CPPUNIT_ASSERT_EQUAL(aRect, aRect2);
+
+constexpr tools::Rectangle aRect3(Point(), Size(0, 0));
+static_assert(aRect3.IsEmpty());
+static_assert(aRect3.Right() == 0);
+static_assert(aRect3.Bottom() == 0);
+
+constexpr tools::Rectangle aRect4(Point(), Size(1, 1));
+static_assert(!aRect4.IsEmpty());
+static_assert(aRect4.Right() == 0);
+static_assert(aRect4.Bottom() == 0);
+
+constexpr tools::Rectangle aRect5(Point(), Size(-1, -1));
+static_assert(!aRect5.IsEmpty());
+static_assert(aRect5.Right() == 0);
+static_assert(aRect5.Bottom() == 0);
+}
+}
+
+void RectangleTest::testOpenClosedSize()
 {
 {
 tools::Rectangle aRect(1, 1, 1, 1);
@@ -71,18 +119,10 @@ void Test::test_rectangle()
 aRect.SetPosY(12);
 CPPUNIT_ASSERT_EQUAL(tools::Long(1), aRect.GetWidth());
 }
+}
 
-{
-constexpr tools::Rectangle aRect(Point(), Size(-1, -2));
-static_assert(!aRect.IsEmpty());
-static_assert(aRect.Right() == 0);
-static_assert(aRect.Bottom() == -1);
-
-tools::Rectangle aRect2;
-aRect2.SetSize(Size(-1, -2));
-CPPUNIT_ASSERT_EQUAL(aRect, aRect2);
-}
-
+void RectangleTest::testUnitConvesion()
+{
 {
 constexpr tools::Rectangle aRectTwip(100, 100, 100, 100);
 constexpr tools::Rectangle aRectMm100(
@@ -106,24 +146,25 @@ void Test::test_rectangle()
 static_assert(aRectMm100.GetWidth() == 0);
 static_assert(aRectMm100.GetHeight() == 0);
 }
+}
 
-{
-constexpr tools::Rectangle rect(Point(0, 0), Size(20, 20));
-constexpr tools::Rectangle inside(Point(10, 10), Size(10, 10));
-constexpr tools::Rectangle overlap(Point(10, 10), Size(20, 20));
-constexpr tools::Rectangle outside(Point(20, 20), Size(10, 10));
-CPPUNIT_ASSERT(rect.Contains(inside));
-CPPUNIT_ASSERT(rect.Contains(rect));
-CPPUNIT_ASSERT(!rect.Contains(overlap));
-CPPUNIT_ASSERT(!rect.Contains(outside));
-CPPUNIT_ASSERT(rect.Overlaps(inside));
-CPPUNIT_ASSERT(rect.Overlaps(rect));
-CPPUNIT_ASSERT(rect.Overlaps(overlap));
-CPPUNIT_ASSERT(!rect.Overlaps(outside));
-}
+void RectangleTest::testSetOperators()
+{
+constexpr tools::Rectangle rect(Point(0, 0), Size(20, 20));
+constexpr tools::Rectangle inside(Point(10, 10), S

[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 20 commits - basctl/source basegfx/CppunitTest_basegfx.mk basegfx/test chart2/source cui/source download.lst drawinglayer/source ed

2023-01-29 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit aaec9eb96ef7a4067ddf2f0aaed92af5437d8184
Author: Tomaž Vajngerl 
AuthorDate: Wed Nov 23 11:00:13 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sun Jan 29 20:24:46 2023 +0900

svx: convert SdrTextObj rotate and move to use gfx::Length

Change-Id: I82f10f82db8ac9d5653f4902276ee58fc18c52d6

diff --git a/include/basegfx/utils/RectangleWrapper.hxx 
b/include/basegfx/utils/RectangleWrapper.hxx
index 00586d6eae71..4f5dbe851f66 100644
--- a/include/basegfx/utils/RectangleWrapper.hxx
+++ b/include/basegfx/utils/RectangleWrapper.hxx
@@ -55,6 +55,11 @@ public:
 m_aRange.setSize(width, height);
 }
 
+void shift(gfx::Length const& rXDelta, gfx::Length const& rYDelta)
+{
+m_aRange.shift(rXDelta, rYDelta);
+}
+
 void move(sal_Int32 nXDelta, sal_Int32 nYDelta)
 {
 auto deltaX = gfx::Length::hmm(nXDelta);
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index 1055e5dbe3bb..9ccc69709abf 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -40,6 +40,35 @@
 
 using namespace com::sun::star;
 
+namespace
+{
+gfx::Tuple2DL rotatePoint(gfx::Tuple2DL const& rPoint, gfx::Tuple2DL const& 
rReference, double sinAngle, double cosAngle)
+{
+gfx::Length dx = rPoint.getX() - rReference.getX();
+gfx::Length dy = rPoint.getY() - rReference.getY();
+
+auto x = rReference.getX() + gfx::Length::emu(basegfx::fround(dx.raw() * 
cosAngle + dy.raw() * sinAngle));
+auto y = rReference.getY() + gfx::Length::emu(basegfx::fround(dy.raw() * 
cosAngle - dx.raw() * sinAngle));
+
+return gfx::Tuple2DL(x, y);
+}
+
+gfx::Tuple2DL toTuple(Point const& rPointHmm)
+{
+auto x = gfx::Length::hmm(rPointHmm.X());
+auto y = gfx::Length::hmm(rPointHmm.Y());
+return {x, y};
+}
+
+gfx::Size2DL toSize2D(Size const& rSizeHmm)
+{
+auto x = gfx::Length::hmm(rSizeHmm.Width());
+auto y = gfx::Length::hmm(rSizeHmm.Height());
+return {x, y};
+}
+
+} // end anonymous ns
+
 void SdrTextObj::NbcSetSnapRect(const tools::Rectangle& rRect)
 {
 if (maGeo.nRotationAngle || maGeo.nShearAngle)
@@ -92,7 +121,9 @@ Degree100 SdrTextObj::GetShearAngle(bool /*bVertical*/) const
 
 void SdrTextObj::NbcMove(const Size& rSize)
 {
-moveRectangle(rSize.Width(), rSize.Height());
+gfx::Size2DL aSize2D = toSize2D(rSize);
+maRectangle.shift(aSize2D.getWidth(), aSize2D.getHeight());
+
 moveOutRectangle(rSize.Width(), rSize.Height());
 maSnapRect.Move(rSize);
 SetBoundAndSnapRectsDirty(true);
@@ -183,27 +214,37 @@ void SdrTextObj::NbcResize(const Point& rRef, const 
Fraction& xFact, const Fract
 SetBoundAndSnapRectsDirty();
 }
 
-void SdrTextObj::NbcRotate(const Point& rRef, Degree100 nAngle, double sn, 
double cs)
+void SdrTextObj::NbcRotate(const Point& rRef, Degree100 nAngle, double 
sinAngle, double cosAngle)
 {
+auto aReference = toTuple(rRef);
+
 SetGlueReallyAbsolute(true);
-tools::Long dx = getRectangle().Right() - getRectangle().Left();
-tools::Long dy = getRectangle().Bottom() - getRectangle().Top();
-Point aPoint1(getRectangle().TopLeft());
-RotatePoint(aPoint1, rRef, sn, cs);
-Point aPoint2(aPoint1.X() + dx, aPoint1.Y() + dy);
-tools::Rectangle aRectangle(aPoint1, aPoint2);
-setRectangle(aRectangle);
+auto const& rRange = maRectangle.getRange();
+
+auto nWidth = rRange.getWidth();
+auto nHeight = rRange.getHeight();
+
+gfx::Tuple2DL aPoint1(rRange.getMinX(), rRange.getMinY());
+aPoint1 = rotatePoint(aPoint1, aReference, sinAngle, cosAngle);
 
-if (maGeo.nRotationAngle==0_deg100) {
-maGeo.nRotationAngle=NormAngle36000(nAngle);
-maGeo.mfSinRotationAngle=sn;
-maGeo.mfCosRotationAngle=cs;
-} else {
-maGeo.nRotationAngle=NormAngle36000(maGeo.nRotationAngle+nAngle);
+gfx::Tuple2DL aPoint2(aPoint1.getX() + nWidth, aPoint1.getY() + nHeight);
+
+gfx::Range2DL aRange{aPoint1, aPoint2};
+maRectangle.setRange(aRange);
+
+if (maGeo.nRotationAngle == 0_deg100)
+{
+maGeo.nRotationAngle = NormAngle36000(nAngle);
+maGeo.mfSinRotationAngle = sinAngle;
+maGeo.mfCosRotationAngle = cosAngle;
+}
+else
+{
+maGeo.nRotationAngle = NormAngle36000(maGeo.nRotationAngle + nAngle);
 maGeo.RecalcSinCos();
 }
 SetBoundAndSnapRectsDirty();
-NbcRotateGluePoints(rRef,nAngle,sn,cs);
+NbcRotateGluePoints(rRef, nAngle, sinAngle, cosAngle);
 SetGlueReallyAbsolute(false);
 }
 
commit a8e2c1de970331b453ff42177be64862bbcced26
Author: Tomaž Vajngerl 
AuthorDate: Tue Nov 22 13:33:30 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sun Jan 29 20:24:46 2023 +0900

svx: use RectangleWrapper for maRectangle on SdrTextObj

This is needed so we can now transition to use gfx::Length and
gfx::Range2DL to define the object position and size.

Change-Id: Ie683a869ba061f53d437bd

[Libreoffice-commits] core.git: helpcontent2

2023-01-29 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 32f76ba4dc73586fa5c8237a71eddd2460d0fbe8
Author: Olivier Hallot 
AuthorDate: Sun Jan 29 06:53:31 2023 -0300
Commit: Gerrit Code Review 
CommitDate: Sun Jan 29 09:53:31 2023 +

Update git submodules

* Update helpcontent2 from branch 'master'
  to 7fc1be9c61cf8d19c7982dc6a407b7eca2ad5b93
  - Update Autofilter help page

+ Autofilter options were changed, the patch synchs with current menu
+ Missing bookmarks for filtering by color

Change-Id: I96d5af98dd9c70bfd4e8c376891b67dbd5853767
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/146299
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index f3f1a7bccd67..7fc1be9c61cf 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f3f1a7bccd67dbefd2135aca2426f52523673832
+Subproject commit 7fc1be9c61cf8d19c7982dc6a407b7eca2ad5b93


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

2023-01-29 Thread Olivier Hallot (via logerrit)
 source/text/scalc/01/12040100.xhp |   33 -
 1 file changed, 20 insertions(+), 13 deletions(-)

New commits:
commit 7fc1be9c61cf8d19c7982dc6a407b7eca2ad5b93
Author: Olivier Hallot 
AuthorDate: Sat Jan 28 14:28:09 2023 -0300
Commit: Olivier Hallot 
CommitDate: Sun Jan 29 09:53:30 2023 +

Update Autofilter help page

+ Autofilter options were changed, the patch synchs with current menu
+ Missing bookmarks for filtering by color

Change-Id: I96d5af98dd9c70bfd4e8c376891b67dbd5853767
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/146299
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/scalc/01/12040100.xhp 
b/source/text/scalc/01/12040100.xhp
index e613fea938..585994104c 100644
--- a/source/text/scalc/01/12040100.xhp
+++ b/source/text/scalc/01/12040100.xhp
@@ -36,31 +36,38 @@
 
 
 
-Sort Ascending
+Sort Ascending
 Displays the rows of the 
cell range in ascending order, based on the values in the cells of the current 
column.
-Sort Descending
+Sort Descending
 Displays the rows of 
the cell range in descending order, based on the values in the cells of the 
current column.
-Top 10
-Displays the 10 rows of 
the cell range that contain the largest values in the cells of the current 
column. If these values are unique then no more than 10 rows will be visible, 
but if the values are not unique then it is possible for more than 10 rows to 
be shown.
-Empty
-Displays only the rows 
of the cell range that have an empty cell in the current column.
-Not Empty
-Displays only the rows 
of the cell range that have a non-empty cell in the current column.
+
+Filter by Color
+
 Text color
 Displays only the rows 
of the cell range for which the text color of the cell in the current column 
matches the color selected.
+
 Background color
 Displays only the rows 
of the cell range for which the background color of the cell in the current 
column matches the color selected.
+Filter by Condition
+Empty
+Displays only the rows 
of the cell range that have an empty cell in the current column.
+Not Empty
+Displays only the rows 
of the cell range that have a non-empty cell in the current column.
+Top 10
+Displays the 10 rows of 
the cell range that contain the largest values in the cells of the current 
column. If these values are unique then no more than 10 rows will be visible, 
but if the values are not unique then it is possible for more than 10 rows to 
be shown.
+Bottom 10
+Displays the 10 rows of 
the cell range that contain the lowest values in the cells of the current 
column. If these values are unique then no more than 10 rows will be visible, 
but if the values are not unique then it is possible for more than 10 rows to 
be shown.
 Standard Filter
 Opens the Standard Filter dialog.
-Search text box
+Search text box
 Search for a specific 
entry in the list of values found in the current column. As characters are 
typed in the text box, this list is updated to show only matching 
entries.
-All
+All
 Click once to select to 
show all rows and click again to select to hide all rows.
-Show only current
+Show only current item
 Display only rows 
containing the value highlighted in the Value box.
-Hide only current
+Hide only current item
 Hide all rows 
containing the value highlighted in the Value box and display all 
other rows.
-Values
+Values
 List of unique values 
found in the current column.
 
 


Re: Link error

2023-01-29 Thread Julien Nabet
Indeed, the rare case when I build LO on Windows, first time is ok 
because I start with a "make clean", update Visual Studio, Windows, 
Cygwin, ... but once it's built if I want to update my local repo to 
retrieve a new patch it will fail in 99%.


Sometimes cleaning the module is enough but most of the times I must run 
a make clean. For me it's very annoying because I build LO for Windows 
on a laptop far less powerful than my Linux desktop.


Of course, on Linux, I don't encounter this problem.



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

2023-01-29 Thread Gökay Şatır (via logerrit)
 vcl/jsdialog/enabled.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5f489f84935b4f92415998bb7ba2d9ccd550b82d
Author: Gökay Şatır 
AuthorDate: Fri Jan 20 12:06:47 2023 +0300
Commit: Andras Timar 
CommitDate: Sun Jan 29 08:58:02 2023 +

Add dropdownfielddialog.ui to JSON dialogues.

Signed-off-by: Gökay Şatır 
Change-Id: I4cfc792f0b1269936723285cc5ff1324bc22c161
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145871
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 23e6f05a8ee80c33dd624dd6582f26b3dcf8f490)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146212
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 2dff20b7263d..e0791954d5f8 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -78,6 +78,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/splittable.ui"
 || rUIFile == u"modules/swriter/ui/translationdialog.ui"
 || rUIFile == u"modules/swriter/ui/pagenumberdlg.ui"
+|| rUIFile == u"modules/swriter/ui/dropdownfielddialog.ui"
 // sfx
 || rUIFile == u"sfx/ui/cmisinfopage.ui"
 || rUIFile == u"sfx/ui/custominfopage.ui"