[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - 51 commits - configure.ac desktop/source download.lst drawinglayer/source external/curl external/libxml2 external/libxsl

2022-10-28 Thread Michael Stahl (via logerrit)
 configure.ac  |6 
 desktop/source/app/cmdlineargs.cxx|   10 
 download.lst  |   32 
 drawinglayer/source/tools/emfphelperdata.cxx  |   31 
 external/curl/ExternalPackage_curl.mk |2 
 external/curl/ExternalProject_curl.mk |4 
 external/curl/clang-cl.patch.0|2 
 external/curl/curl-7.26.0_win-proxy.patch |   20 
 external/curl/curl-msvc-disable-protocols.patch.1 |4 
 external/curl/curl-msvc.patch.1   |4 
 external/curl/curl-nss.patch.1|   11 
 external/curl/zlib.patch.0|   20 
 external/libxml2/ExternalPackage_libxml2.mk   |2 
 external/libxml2/libxml2-android.patch|6 
 external/libxslt/UnpackedTarball_libxslt.mk   |1 
 external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 |   69 -
 external/libxslt/rpath.patch.0|2 
 external/nss/ExternalProject_nss.mk   |3 
 external/nss/asan.patch.1 |4 
 external/nss/nss.patch|6 
 external/poppler/StaticLibrary_poppler.mk |5 
 external/poppler/UnpackedTarball_poppler.mk   |2 
 external/poppler/disable-freetype.patch.1 |   41 +
 external/poppler/gcc7-EntityInfo.patch.1  |   48 +
 external/poppler/poppler-c++11.patch.1|   13 
 external/poppler/poppler-config.patch.1   |   27 
 external/zlib/1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d.patch  |   29 
 external/zlib/UnpackedTarball_zlib.mk |7 
 external/zlib/eff308af425b67093bab25f80f1ae950166bece1.patch  |   32 
 hwpfilter/source/htags.cxx|   26 
 hwpfilter/source/hwpfile.cxx  |2 
 hwpfilter/source/hwpfile.h|4 
 hwpfilter/source/hwpreader.cxx|   64 -
 include/sfx2/strings.hrc  |2 
 include/sfx2/viewfrm.hxx  |1 
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx   |   16 
 jvmfwk/source/framework.cxx   |8 
 jvmfwk/source/fwkbase.cxx |6 
 lotuswordpro/source/filter/lwpdrawobj.cxx |  123 +--
 officecfg/registry/schema/org/openoffice/Office/Common.xcs|   16 
 sc/inc/documentimport.hxx |2 
 sc/inc/mtvelements.hxx|1 
 sc/inc/table.hxx  |2 
 sc/source/core/data/document.cxx  |9 
 sc/source/core/data/documentimport.cxx|   14 
 sc/source/core/data/mtvelements.cxx   |5 
 sc/source/core/data/table2.cxx|   17 
 sc/source/core/data/table3.cxx|4 
 sc/source/core/tool/interpr7.cxx  |3 
 sc/source/filter/lotus/op.cxx |   11 
 sc/source/filter/oox/sheetdatabuffer.cxx  |   13 
 sdext/Executable_xpdfimport.mk|4 
 sfx2/source/appl/macroloader.cxx  |9 
 sfx2/source/doc/iframe.cxx|   20 
 sfx2/source/inc/macroloader.hxx   |2 
 sfx2/source/view/viewfrm.cxx  |   40 +
 shell/source/win32/SysShExec.cxx  |8 
 svl/source/passwordcontainer/passwordcontainer.cxx|  199 -
 svl/source/passwordcontainer/passwordcontainer.hxx|   69 +
 sw/qa/core/data/ooxml/fail/LIBREOFFICE-DBDAZAEC.docx  |binary
 sw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf |  347 
++
 sw/qa/extras/layout/layout.cxx|5 
 sw/source/core/layout/tabfrm.cxx  |1 
 sw/source/core/unocore/unodraw.cxx|2 
 sw/source/filter/html/htmlplug.cxx|7 
 sw/source/filter/ww8/wrtw8sty.cxx |   28 
 sw/source/filter/ww8/wr

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

2022-10-28 Thread Justin Luth (via logerrit)
 sc/source/ui/view/gridwin.cxx |   16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

New commits:
commit 4c8b1fa44d4f49510d3910981e649dcb08bceb36
Author: Justin Luth 
AuthorDate: Fri Oct 28 13:15:00 2022 -0400
Commit: Justin Luth 
CommitDate: Sat Oct 29 00:11:38 2022 +0200

tdf#151794 sc validate: honor NO_BLANK in Cell range dropdown

This fixes LO 6.0 regression 3567d00b5e1168affd067330037e062e10b05b2d

Not really a regression - it never let any blanks before then,
regardless of the "Allow empty cells" setting in the
Data - Validity rule.

The default in LO is to allow empty cells.

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

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 4e620c2c4f12..69a1daf6f9ce 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1376,12 +1376,12 @@ void ScGridWindow::DoScenarioMenu( const ScRange& 
rScenRange )
 mpFilterBox->EndInit();
 }
 
-void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow )
+void ScGridWindow::LaunchDataSelectMenu(const SCCOL nCol, const SCROW nRow)
 {
 mpFilterBox.reset();
 
 ScDocument& rDoc = mrViewData.GetDocument();
-SCTAB nTab = mrViewData.GetTabNo();
+const SCTAB nTab = mrViewData.GetTabNo();
 bool bLayoutRTL = rDoc.IsLayoutRTL( nTab );
 
 tools::Long nSizeX  = 0;
@@ -1417,6 +1417,9 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, 
SCROW nRow )
 
 // SetSize later
 
+const sal_uInt32 nIndex = rDoc.GetAttr(nCol, nRow, nTab, 
ATTR_VALIDDATA)->GetValue();
+const ScValidationData* pData = nIndex ? rDoc.GetValidationEntry(nIndex) : 
nullptr;
+
 bool bEmpty = false;
 std::vector aStrings; // case sensitive
 // Fill List
@@ -1435,7 +1438,12 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, 
SCROW nRow )
 EnterWait();
 
 for (const auto& rString : aStrings)
-rFilterBox.append_text(rString.GetString());
+{
+// IsIgnoreBlank allows blank values. Don't add empty string 
unless "Allow Empty Cells"
+const OUString& rFilterString = rString.GetString();
+if (!rFilterString.isEmpty() || !pData || pData->IsIgnoreBlank())
+rFilterBox.append_text(rFilterString);
+}
 
 if (bWait)
 LeaveWait();
@@ -1447,10 +1455,8 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, 
SCROW nRow )
 
 sal_Int32 nSelPos = -1;
 
-sal_uInt32 nIndex = rDoc.GetAttr( nCol, nRow, nTab, ATTR_VALIDDATA 
)->GetValue();
 if ( nIndex )
 {
-const ScValidationData* pData = rDoc.GetValidationEntry( nIndex );
 if (pData)
 {
 std::unique_ptr pNew;


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

2022-10-28 Thread Xisco Fauli (via logerrit)
 sd/qa/unit/export-tests.cxx |  820 +---
 solenv/clang-format/excludelist |1 
 2 files changed, 520 insertions(+), 301 deletions(-)

New commits:
commit 57b88487295bfbae056361d3614e477491c34055
Author: Xisco Fauli 
AuthorDate: Fri Oct 28 17:13:12 2022 +0200
Commit: Xisco Fauli 
CommitDate: Fri Oct 28 23:04:14 2022 +0200

CppunitTest_sd_export_tests: use clang-format

Do it before changing the inheritance

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

diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index a040438fb103..1a4060731387 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -149,7 +149,6 @@ public:
 {
 XmlTestTools::registerODFNamespaces(pXmlXPathCtx);
 }
-
 };
 
 namespace
@@ -159,24 +158,25 @@ uno::Reference getBitmapFromTable(const 
sd::DrawDocShellRef& xDocS
 {
 uno::Reference xBitmap;
 
-uno::Reference 
xFactory(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY);
+uno::Reference 
xFactory(xDocShRef->GetDoc()->getUnoModel(),
+uno::UNO_QUERY);
 
 try
 {
-uno::Reference 
xBitmapTable(xFactory->createInstance("com.sun.star.drawing.BitmapTable"), 
uno::UNO_QUERY);
+uno::Reference xBitmapTable(
+xFactory->createInstance("com.sun.star.drawing.BitmapTable"), 
uno::UNO_QUERY);
 uno::Any rValue = xBitmapTable->getByName(rName);
 if (rValue.has>())
 {
 return rValue.get>();
 }
 }
-catch (const uno::Exception & /*rEx*/)
+catch (const uno::Exception& /*rEx*/)
 {
 }
 
 return xBitmap;
 }
-
 }
 
 void SdExportTest::testBackgroundImage()
@@ -186,12 +186,15 @@ void SdExportTest::testBackgroundImage()
 // Check if Slide background image is imported from PPTX and exported to 
PPTX, PPT and ODP correctly
 
 OUString bgImageName;
-sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/n821567.pptx"), 
PPTX);
+sd::DrawDocShellRef xDocShRef
+= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/n821567.pptx"), 
PPTX);
 
 // Check that imported background image from PPTX exists
 {
-uno::Reference 
xDoc(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("not exactly one page", 
static_cast(1), xDoc->getDrawPages()->getCount());
+uno::Reference 
xDoc(xDocShRef->GetDoc()->getUnoModel(),
+ uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("not exactly one page", 
static_cast(1),
+ xDoc->getDrawPages()->getCount());
 uno::Reference xPage(getPage(0, xDocShRef));
 
 uno::Reference xPropertySet(xPage, 
uno::UNO_QUERY);
@@ -203,17 +206,21 @@ void SdExportTest::testBackgroundImage()
 aAny = xBackgroundPropSet->getPropertyValue("FillBitmapName");
 aAny >>= bgImageName;
 }
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Slide Background is not imported from 
PPTX correctly", OUString("msFillBitmap 1"), bgImageName);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Slide Background is not imported from 
PPTX correctly",
+ OUString("msFillBitmap 1"), bgImageName);
 
 uno::Reference xBitmap = getBitmapFromTable(xDocShRef, 
bgImageName);
-CPPUNIT_ASSERT_MESSAGE("Slide Background Bitmap is missing when 
imported from PPTX", xBitmap.is());
+CPPUNIT_ASSERT_MESSAGE("Slide Background Bitmap is missing when 
imported from PPTX",
+   xBitmap.is());
 }
 
 // Save as PPTX, reload and check again so we make sure exporting to PPTX 
is working correctly
 {
 xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
-uno::Reference 
xDoc(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("not exactly one page", 
static_cast(1), xDoc->getDrawPages()->getCount());
+uno::Reference 
xDoc(xDocShRef->GetDoc()->getUnoModel(),
+ uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("not exactly one page", 
static_cast(1),
+ xDoc->getDrawPages()->getCount());
 uno::Reference xPage(getPage(0, xDocShRef));
 
 uno::Reference xPropertySet(xPage, 
uno::UNO_QUERY);
@@ -225,17 +232,21 @@ void SdExportTest::testBackgroundImage()
 aAny = xBackgroundPropSet->getPropertyValue("FillBitmapName");
 aAny >>= bgImageName;
 }
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Slide Background is not exported from 
PPTX correctly", OUString("msFillBitmap 1"), bgImageName);
+CPPUNI

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

2022-10-28 Thread Xisco Fauli (via logerrit)
 sd/qa/unit/export-tests-ooxml3.cxx |  799 +
 1 file changed, 285 insertions(+), 514 deletions(-)

New commits:
commit 615d7d5b98e972c985f0db786a161250b23a4cee
Author: Xisco Fauli 
AuthorDate: Fri Oct 28 17:08:23 2022 +0200
Commit: Xisco Fauli 
CommitDate: Fri Oct 28 22:11:03 2022 +0200

CppunitTest_sd_export_tests-ooxml3: inherit from UnoApiTest

Adapt code in testTdf115005_FallBack_Images to ignore
Thumbnails/thumbnail.png. Now they are generated when saving

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

diff --git a/sd/qa/unit/export-tests-ooxml3.cxx 
b/sd/qa/unit/export-tests-ooxml3.cxx
index aa0249a56d7d..9f4aec9ad41d 100644
--- a/sd/qa/unit/export-tests-ooxml3.cxx
+++ b/sd/qa/unit/export-tests-ooxml3.cxx
@@ -33,9 +33,14 @@
 
 #include 
 
-class SdOOXMLExportTest3 : public SdModelTestBaseXML
+class SdOOXMLExportTest3 : public SdUnoApiTestXml
 {
 public:
+SdOOXMLExportTest3()
+: SdUnoApiTestXml("/sd/qa/unit/data/")
+{
+}
+
 void testTdf129430();
 void testTdf114848();
 void testTdf147586();
@@ -224,11 +229,8 @@ public:
 
 void SdOOXMLExportTest3::testTdf129430()
 {
-sd::DrawDocShellRef xDocShRef
-= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf129430.odp"), 
ODP);
-utl::TempFileNamed tempFile;
-xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
-xDocShRef->DoClose();
+loadFromURL(u"odp/tdf129430.odp");
+utl::TempFileNamed tempFile = save("Impress Office Open XML");
 
 xmlDocUniquePtr pXmlDoc1 = parseExport(tempFile, "ppt/slides/slide1.xml");
 assertXPath(pXmlDoc1, 
"/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[2]/a:pPr/a:lnSpc/a:spcPct",
@@ -237,11 +239,8 @@ void SdOOXMLExportTest3::testTdf129430()
 
 void SdOOXMLExportTest3::testTdf114848()
 {
-::sd::DrawDocShellRef xDocShRef
-= 
loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf114848.pptx"), 
PPTX);
-utl::TempFileNamed tempFile;
-xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
-xDocShRef->DoClose();
+loadFromURL(u"pptx/tdf114848.pptx");
+utl::TempFileNamed tempFile = save("Impress Office Open XML");
 
 xmlDocUniquePtr pXmlDocTheme1 = parseExport(tempFile, 
"ppt/theme/theme1.xml");
 assertXPath(pXmlDocTheme1, 
"/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr", "val",
@@ -253,11 +252,8 @@ void SdOOXMLExportTest3::testTdf114848()
 
 void SdOOXMLExportTest3::testTdf147586()
 {
-::sd::DrawDocShellRef xDocShRef
-= 
loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf147586.pptx"), 
PPTX);
-utl::TempFileNamed tempFile;
-xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
-xDocShRef->DoClose();
+loadFromURL(u"pptx/tdf147586.pptx");
+utl::TempFileNamed tempFile = save("Impress Office Open XML");
 
 xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, 
"ppt/slides/slide1.xml");
 // Without the fix in place, this test would have failed with
@@ -273,11 +269,8 @@ void SdOOXMLExportTest3::testTdf147586()
 
 void SdOOXMLExportTest3::testTdf68759()
 {
-::sd::DrawDocShellRef xDocShRef
-= 
loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf68759.odp"), ODP);
-utl::TempFileNamed tempFile;
-xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
-xDocShRef->DoClose();
+loadFromURL(u"odp/tdf68759.odp");
+utl::TempFileNamed tempFile = save("Impress Office Open XML");
 
 xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, 
"ppt/slides/slide1.xml");
 assertXPath(pXmlDocContent, 
"/p:sld/p:cSld/p:spTree/p:pic[1]/p:spPr/a:xfrm/a:off", "x",
@@ -299,11 +292,8 @@ void SdOOXMLExportTest3::testTdf68759()
 
 void SdOOXMLExportTest3::testTdf127901()
 {
-::sd::DrawDocShellRef xDocShRef
-= 
loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf127901.odp"), ODP);
-utl::TempFileNamed tempFile;
-xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
-xDocShRef->DoClose();
+loadFromURL(u"odp/tdf127901.odp");
+utl::TempFileNamed tempFile = save("Impress Office Open XML");
 
 xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile, 
"ppt/slides/slide1.xml");
 assertXPath(pXmlDocContent1, 
"/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip/a:lum", "bright",
@@ -321,11 +311,8 @@ void SdOOXMLExportTest3::testTdf127901()
 
 void SdOOXMLExportTest3::testTdf48735()
 {
-::sd::DrawDocShellRef xDocShRef
-= 
loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf48735.odp"), ODP);
-utl::TempFileNamed tempFile;
-xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
-xDocShRef->DoClose();
+loadFromURL(u"odp/tdf48735.odp");
+utl::TempFileNamed tempFile = save("Impress Office Open XML");
 
 xmlDocUniquePtr pXmlDocContent1 = parseExport(te

[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - 13 commits - configure.ac desktop/source download.lst external/libxml2 external/nss external/zlib sc/source sfx2/source sw/source tes

2022-10-28 Thread Thorsten Behrens (via logerrit)
 configure.ac |8 +-
 desktop/source/app/cmdlineargs.cxx   |   10 ++
 download.lst |   14 +--
 external/libxml2/ExternalPackage_libxml2.mk  |2 
 external/libxml2/UnpackedTarball_libxml2.mk  |3 
 external/libxml2/libxml2-android.patch   |6 -
 external/libxml2/libxml2-config.patch.1  |   43 ---
 external/libxml2/xml2-config.in  |   28 +++
 external/nss/ExternalProject_nss.mk  |3 
 external/zlib/1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d.patch |   29 +++
 external/zlib/UnpackedTarball_zlib.mk|7 +
 external/zlib/eff308af425b67093bab25f80f1ae950166bece1.patch |   32 
 external/zlib/ubsan.patch|   11 --
 sc/source/core/tool/interpr7.cxx |3 
 sfx2/source/appl/macroloader.cxx |9 +-
 sfx2/source/doc/iframe.cxx   |   20 +++--
 sfx2/source/inc/macroloader.hxx  |2 
 sw/source/filter/html/htmlplug.cxx   |7 +
 sw/source/filter/xml/xmltexti.cxx|9 +-
 test/source/xmltesttools.cxx |8 +-
 unoxml/source/xpath/xpathobject.cxx  |2 
 wizards/source/access2base/DoCmd.xba |2 
 xmloff/source/draw/ximpshap.cxx  |4 +
 23 files changed, 176 insertions(+), 86 deletions(-)

New commits:
commit 5139365bbeee3689079585acc0dedae9bc7022c0
Author: Thorsten Behrens 
AuthorDate: Fri Oct 28 21:18:58 2022 +0200
Commit: Thorsten Behrens 
CommitDate: Fri Oct 28 21:18:58 2022 +0200

Release 6.3.6.19

Change-Id: Ia8b83a8b467fac661c7ae58ae2f06f8d13fcc41a

diff --git a/configure.ac b/configure.ac
index b96ca9052b61..64ed87fda8a5 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],[6.3.6.18],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.3.6.19],[],[],[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 ffbc3772305020ed325290e56928f4afa1d24858
Author: Jan-Marek Glogowski 
AuthorDate: Sun May 30 13:23:16 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Fri Oct 28 21:17:02 2022 +0200

libxml2: use xml2-config dummy for internal build

When building a static LO with --disable-dynloading on Linux,
--without-system-libs failed for me. And it left me really puzzled:
raptor configure failed and claimed it couldn't link libxml2.

raptor's config.log showed missing math functions. xml2-config of
LO's build is patched and it includes a -lm. The xml2-config in my
chroot doesn't. But we explicitly pass the xml2-config for
non-system-libxml2 build. Reading the configure from raptor didn't
reveal a way, that it could somehow pick up the xml2-config from
the chroot, but that code is autoconf-complex...

When running "sh -x configure", it turned out the configure script
actually picks up the LIBXML_* flags from the environment, which
are set by LO's config_host.mk. These just add -lm for Android.

So this adds a xml2-config.in "dummy", which overwrites the one
from the libxml2 source and just echos LO's LIBXML_* values and
it adds -lm for all DISABLE_DYNLOADING targets.

Change-Id: Ia713cf80c8e7dc989cf23c224e7a0f7ea1210a87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116409
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 8b9f8f0f9d38cc64f742fe5358fce88d0f82391a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139965
Reviewed-by: Michael Stahl 
(cherry picked from commit 5c044ae7a3246bddbd0513bd5ed3efef10cb1503)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140006
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/external/libxml2/UnpackedTarball_libxml2.mk 
b/external/libxml2/UnpackedTarball_libxml2.mk
index 00398f16af56..4ec3fa074dea 100644
--- a/external/libxml2/UnpackedTarball_libxml2.mk
+++ b/external/libxml2/UnpackedTarball_libxml2.mk
@@ -14,11 +14,12 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,libxml2,$(LIBXML_TARBALL),,libxml2)
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxml2))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libxml

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

2022-10-28 Thread Caolán McNamara (via logerrit)
 vcl/osx/salframe.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit be9c80322db80d7cd59145bf77541ab3361022cc
Author: Caolán McNamara 
AuthorDate: Fri Oct 28 17:15:33 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 28 21:17:40 2022 +0200

macos: set tooltext colors from something from the theme

e.g. the "Find All" label in the find toolbar

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

diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 08d6339db062..b820ef338136 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -1346,6 +1346,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 
 aStyleSettings.SetHelpColor(aControlBackgroundColor);
 aStyleSettings.SetHelpTextColor(aControlTextColor);
+aStyleSettings.SetToolTextColor(aControlTextColor);
 
 // Set text colors for tabs according to OS settings
 


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

2022-10-28 Thread Regina Henschel (via logerrit)
 include/oox/shape/ShapeContextHandler.hxx |5 +
 oox/qa/unit/data/tdf54095_SmartArtThemeTextColor.docx |binary
 oox/qa/unit/shape.cxx |   54 ++
 oox/source/shape/ShapeContextHandler.cxx  |   13 
 4 files changed, 71 insertions(+), 1 deletion(-)

New commits:
commit 2406ba67c8c03b0d6a4adb81f1efc1609c8dfe8c
Author: Regina Henschel 
AuthorDate: Fri Oct 28 15:39:38 2022 +0200
Commit: Regina Henschel 
CommitDate: Fri Oct 28 19:49:00 2022 +0200

tdf#54095 docx SmartArt import, apply theme text color

PPTShapeGroupContext uses method applyFontRefColor in importExtDrawings
to bring the theme text color to the shape text. The patch copies this
way to ShapeContextHandler, which is used for SmartArt in docx.

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

diff --git a/include/oox/shape/ShapeContextHandler.hxx 
b/include/oox/shape/ShapeContextHandler.hxx
index 239ff8ec63b8..42e884f27daa 100644
--- a/include/oox/shape/ShapeContextHandler.hxx
+++ b/include/oox/shape/ShapeContextHandler.hxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -151,8 +152,10 @@ private:
 css::uno::Reference const & getWpsContext(sal_Int32 
nStartElement, sal_Int32 nElement);
 css::uno::Reference const & getWpgContext(sal_Int32 
nElement);
 css::uno::Reference getContextHandler(sal_Int32 
nElement = 0);
-};
 
+void applyFontRefColor(const oox::drawingml::ShapePtr& pShape,
+   const oox::drawingml::Color& rFontRefColor);
+};
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/qa/unit/data/tdf54095_SmartArtThemeTextColor.docx 
b/oox/qa/unit/data/tdf54095_SmartArtThemeTextColor.docx
new file mode 100644
index ..8aff8469bb41
Binary files /dev/null and 
b/oox/qa/unit/data/tdf54095_SmartArtThemeTextColor.docx differ
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
index 06d7eba9dffd..9a85db9f3894 100644
--- a/oox/qa/unit/shape.cxx
+++ b/oox/qa/unit/shape.cxx
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -260,6 +261,59 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf151518VertAnchor)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf54095_SmartArtThemeTextColor)
+{
+// The document contains a SmartArt where the color for the texts in the 
shapes is given by
+// the theme.
+// Error was, that the theme was not considered and therefore the text was 
white.
+
+// Make sure it is not loaded as metafile but with single shapes.
+bool bUseGroup = 
officecfg::Office::Common::Filter::Microsoft::Import::SmartArtToShapes::get();
+if (!bUseGroup)
+{
+std::shared_ptr pChange(
+comphelper::ConfigurationChanges::create());
+
officecfg::Office::Common::Filter::Microsoft::Import::SmartArtToShapes::set(true,
 pChange);
+pChange->commit();
+}
+
+// get SmartArt
+loadFromURL(u"tdf54095_SmartArtThemeTextColor.docx");
+uno::Reference 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+uno::Reference xSmartArt(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+// shape 0 is the background shape without text
+uno::Reference xShape(xSmartArt->getByIndex(1), 
uno::UNO_QUERY);
+
+// text color
+uno::Reference xText(xShape->getText(), 
uno::UNO_QUERY);
+uno::Reference 
xPara(xText->createEnumeration()->nextElement(),
+uno::UNO_QUERY);
+uno::Reference 
xPortion(xPara->createEnumeration()->nextElement(),
+ uno::UNO_QUERY);
+sal_Int32 nActualColor{ 0 };
+xPortion->getPropertyValue("CharColor") >>= nActualColor;
+// Without fix the test would have failed with:
+// - Expected:  2050429 (0x1F497D)
+// - Actual  : 16777215 (0xFF), that is text was white
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0x1F497D), nActualColor);
+
+// clrScheme. For map between name in docx and index from CharColorTheme 
see
+// oox::drawingml::Color::getSchemeColorIndex()
+// Without fix the color scheme was "lt1" (1) but should be "dk2" (2).
+CPPUNIT_ASSERT_EQUAL(sal_Int16(2),
+ 
xPortion->getPropertyValue("CharColorTheme").get());
+
+if (!bUseGroup)
+{
+std::shared_ptr pChange(
+comphelper::ConfigurationChanges::create());
+
officecfg::Office::Common::Filter::Microsoft::Import::SmartArtToShapes::set(false,
 pChange);
+pChange->commit();
+}
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/o

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

2022-10-28 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/data/number-portion-format.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport18.cxx  |   20 
 sw/source/filter/ww8/docxattributeoutput.cxx|2 -
 sw/source/filter/ww8/wrtw8nds.cxx   |   15 ++--
 4 files changed, 34 insertions(+), 3 deletions(-)

New commits:
commit f546f7573158e52359bbeae6194a83a1ff8ac52c
Author: Miklos Vajna 
AuthorDate: Fri Oct 28 16:39:31 2022 +0200
Commit: Miklos Vajna 
CommitDate: Fri Oct 28 17:19:19 2022 +0200

DOCX export, numbering portion format: consider full-para char formats as 
well

The bugdoc had a single paragraph with direct formatting (24pt font
size), numbering enabled and a bookmark covering half of the paragraph.
The numbering had default font size in the DOCX export result, not
inheriting from the paragraph.

In case the bookmark is removed, then the custom font size is not an
autoformat set on the whole text of the paragraph but rather a format on
the paragraph level, which does influence the formatting of the
numbering portion via the paragraph marker formatting, as expected.

Fix the problem in a way similar to what was done in commit
cb0e1b52d68aa6d5b505f91cb4ce577f7f3b2a8f (sw, numbering portion format:
consider full-para char formats as well, 2022-10-20), except that was
for the rendering and this is for the DOCX export.

This also required filtering out grab-bags in
lcl_writeParagraphMarkerProperties(), otherwise citation SDTs show up in
the export result at unexpected places, as shown by
CppunitTest_sw_ooxmlexport14's testTdf129353.

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

diff --git a/sw/qa/extras/ooxmlexport/data/number-portion-format.odt 
b/sw/qa/extras/ooxmlexport/data/number-portion-format.odt
new file mode 100644
index ..3047153b63af
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/number-portion-format.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
index b9932f7c199d..75094f441cd6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
@@ -117,6 +117,26 @@ DECLARE_OOXMLEXPORT_TEST(testTdf147724, "tdf147724.docx")
 CPPUNIT_ASSERT(sFieldResult == "Placeholder -> *HERUNTERLADEN*" || 
sFieldResult == "Placeholder -> *ABC*");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testNumberPortionFormatFromODT)
+{
+// Given a document with a single paragraph, direct formatting asks 24pt 
font size for the
+// numbering and the text portion:
+load(DATA_DIRECTORY, "number-portion-format.odt");
+
+// When saving to DOCX:
+save("Office Open XML Text", maTempFile);
+mbExported = true;
+
+// Then make sure that the paragraph marker's char format has that custom 
font size:
+xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1
+// - Actual  : 0
+// - XPath '//w:pPr/w:rPr/w:sz' number of nodes is incorrect
+// i.e.  was missing under 's .
+assertXPath(pXmlDoc, "//w:pPr/w:rPr/w:sz", "val", "48");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index dd6210566bfa..a88049e31c09 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1369,7 +1369,7 @@ void 
lcl_writeParagraphMarkerProperties(DocxAttributeOutput& rAttributeOutput, c
 bool bFontSizeWritten = false;
 while (nWhichId)
 {
-if (aIter.GetItemState(true, &pItem) == SfxItemState::SET)
+if (aIter.GetItemState(true, &pItem) == SfxItemState::SET && nWhichId 
!= RES_CHRATR_GRABBAG)
 {
 if (isCHRATR(nWhichId) || nWhichId == RES_TXTATR_CHARFMT)
 {
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index a9ff9a6b9b56..927ed91bf876 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -3164,6 +3164,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
 }
 else if (const SwpHints* pTextAttrs = rNode.GetpSwpHints())
 {
+bool bFoundAtEnd = false;
 for( size_t i = 0; i < pTextAttrs->Count(); ++i )
 {
 const SwTextAttr* pHt = pTextAttrs->Get(i);
@@ -3172,13 +3173,23 @@ void MSWordExportBase::OutputTextNode( SwTextNode& 
rNode )
 // Check if these attributes are for the last character in the 
paragraph
 // - which means the paragraph marker. If a paragraph has 7 
characters,
   

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

2022-10-28 Thread Xisco Fauli (via logerrit)
 sd/CppunitTest_sd_misc_tests.mk |   58 --
 sd/qa/unit/misc-tests.cxx   |  337 +++-
 2 files changed, 130 insertions(+), 265 deletions(-)

New commits:
commit ab24b70ca0ea80a4655c71762f628e86a76fefa0
Author: Xisco Fauli 
AuthorDate: Fri Oct 28 14:06:11 2022 +0200
Commit: Xisco Fauli 
CommitDate: Fri Oct 28 17:05:15 2022 +0200

CppunitTest_sd_misc_tests: inherit from UnoApiTest

also simplify CppunitTest_sd_misc_tests.mk a bit

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

diff --git a/sd/CppunitTest_sd_misc_tests.mk b/sd/CppunitTest_sd_misc_tests.mk
index b80c46681303..5a382b8c2df0 100644
--- a/sd/CppunitTest_sd_misc_tests.mk
+++ b/sd/CppunitTest_sd_misc_tests.mk
@@ -25,9 +25,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sd_misc_tests, \
 $(eval $(call gb_CppunitTest_use_libraries,sd_misc_tests, \
 $(call gb_Helper_optional,AVMEDIA,avmedia) \
 basegfx \
-canvastools \
 comphelper \
-cppcanvas \
 cppu \
 cppuhelper \
 drawinglayer \
@@ -35,16 +33,15 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_misc_tests, \
 for \
 forui \
 i18nlangtag \
-i18nutil \
 msfilter \
 oox \
 sal \
 salhelper \
 sax \
-sb \
 sd \
 sfx \
 sot \
+subsequenttest \
 svl \
 svt \
 svx \
@@ -60,64 +57,17 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_misc_tests, \
 ))
 
 $(eval $(call gb_CppunitTest_set_include,sd_misc_tests,\
--I$(SRCDIR)/sd/inc \
 -I$(SRCDIR)/sd/source/ui/inc \
--I$(SRCDIR)/sd/source/ui/slidesorter/inc \
+-I$(SRCDIR)/sd/inc \
 $$(INCLUDE) \
 ))
 
 $(eval $(call gb_CppunitTest_use_sdk_api,sd_misc_tests))
 
-$(eval $(call gb_CppunitTest_use_externals,sd_misc_tests,\
-boost_headers \
-))
-
 $(eval $(call gb_CppunitTest_use_ure,sd_misc_tests))
 $(eval $(call gb_CppunitTest_use_vcl,sd_misc_tests))
 
-$(eval $(call gb_CppunitTest_use_components,sd_misc_tests,\
-animations/source/animcore/animcore \
-basic/util/sb \
-chart2/source/chartcore \
-chart2/source/controller/chartcontroller \
-comphelper/util/comphelp \
-configmgr/source/configmgr \
-dbaccess/util/dba \
-desktop/source/deployment/deployment \
-embeddedobj/util/embobj \
-filter/source/config/cache/filterconfig1 \
-filter/source/odfflatxml/odfflatxml \
-filter/source/svg/svgfilter \
-filter/source/xmlfilteradaptor/xmlfa \
-filter/source/xmlfilterdetect/xmlfd \
-forms/util/frm \
-framework/util/fwk \
-i18npool/util/i18npool \
-linguistic/source/lng \
-oox/util/oox \
-package/source/xstor/xstor \
-package/util/package2 \
-sax/source/expatwrap/expwrap \
-sd/util/sd \
-sd/util/sdd \
-sfx2/util/sfx \
-sot/util/sot \
-svl/source/fsstor/fsstorage \
-svtools/util/svt \
-toolkit/util/tk \
-ucb/source/core/ucb1 \
-ucb/source/ucp/expand/ucpexpand1 \
-ucb/source/ucp/file/ucpfile1 \
-ucb/source/ucp/package/ucppkg1 \
-ucb/source/ucp/tdoc/ucptdoc1 \
-unotools/util/utl \
-unoxml/source/rdf/unordf \
-unoxml/source/service/unoxml \
-uui/util/uui \
-vcl/vcl.common \
-xmloff/util/xo \
-xmlsecurity/util/xmlsecurity \
-))
+$(eval $(call gb_CppunitTest_use_rdb,sd_misc_tests,services))
 
 $(eval $(call gb_CppunitTest_use_custom_headers,sd_misc_tests,\
officecfg/registry \
@@ -125,8 +75,6 @@ $(eval $(call 
gb_CppunitTest_use_custom_headers,sd_misc_tests,\
 
 $(eval $(call gb_CppunitTest_use_configuration,sd_misc_tests))
 
-$(call gb_CppunitTest_get_target,sd_misc_tests): $(call 
gb_Package_get_target,postprocess_images)
-
 $(eval $(call gb_CppunitTest_add_arguments,sd_misc_tests, \
 
-env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"{$(gb_Helper_LIBRARY_PATH_VAR)+=$(gb_Helper_LIBRARY_PATH_VAR)}"
 \
 ))
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index aec8dafd75ed..5a14354ae8e1 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -58,9 +58,14 @@
 using namespace ::com::sun::star;
 
 /// Impress miscellaneous tests.
-class SdMiscTest : public SdModelTestBaseXML
+class SdMiscTest : public SdUnoApiTestXml
 {
 public:
+SdMiscTest()
+: SdUnoApiTestXml("/sd/qa/unit/data/")
+{
+}
+
 void testTdf99396();
 void testTableObjectUndoTest();
 void testFillGradient();
@@ -107,61 +112,25 @@ public:
 {
 XmlTestTools::registerODFNamespaces(pXmlXPathCtx);
 }
-
-private:
-sd::DrawDocShellRef Load(const OUString& rURL, sal_Int32 nFormat);
 };
 
-sd::DrawDocShellRef SdMiscTest::Load(const OUString& rURL, sal_Int32 nFormat)
-{
-uno::Reference xDesktop
-= frame::Desktop::create(::comphelper::getProcessComponentContext());
-CPPUNIT_ASSERT(xDesktop.is());
-
-// create a frame
-uno::Reference x

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

2022-10-28 Thread Xisco Fauli (via logerrit)
 sd/CppunitTest_sd_shape_import_export_tests.mk |1 
 sd/qa/unit/ShapeImportExportTest.cxx   |   29 ++---
 2 files changed, 13 insertions(+), 17 deletions(-)

New commits:
commit 3c83a90f5873cc046d5b73c9fa8c968641f19325
Author: Xisco Fauli 
AuthorDate: Fri Oct 28 14:11:33 2022 +0200
Commit: Xisco Fauli 
CommitDate: Fri Oct 28 16:18:47 2022 +0200

CppunitTest_sd_shape_import_export_tests: inherit from UnoApiTest

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

diff --git a/sd/CppunitTest_sd_shape_import_export_tests.mk 
b/sd/CppunitTest_sd_shape_import_export_tests.mk
index 7209eba11c66..1172a82906ab 100644
--- a/sd/CppunitTest_sd_shape_import_export_tests.mk
+++ b/sd/CppunitTest_sd_shape_import_export_tests.mk
@@ -52,6 +52,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,sd_shape_import_export_tests, \
 sd \
 sfx \
 sot \
+subsequenttest \
 svl \
 svt \
 svx \
diff --git a/sd/qa/unit/ShapeImportExportTest.cxx 
b/sd/qa/unit/ShapeImportExportTest.cxx
index 186aafa4a267..1b5ff45ca859 100644
--- a/sd/qa/unit/ShapeImportExportTest.cxx
+++ b/sd/qa/unit/ShapeImportExportTest.cxx
@@ -19,9 +19,14 @@
 using namespace css;
 
 /// Shape / SdrObject import and export tests
-class ShapeImportExportTest : public SdModelTestBaseXML
+class ShapeImportExportTest : public SdUnoApiTestXml
 {
 public:
+ShapeImportExportTest()
+: SdUnoApiTestXml("/sd/qa/unit/data/")
+{
+}
+
 void testTextDistancesOOXML();
 void testTextDistancesOOXML_LargerThanTextAreaSpecialCase();
 void testTextDistancesOOXML_Export();
@@ -56,10 +61,9 @@ SdrObject* searchObject(SdrPage const* pPage, 
std::u16string_view rName)
 /* Test text distances (insets) */
 void ShapeImportExportTest::testTextDistancesOOXML()
 {
-::sd::DrawDocShellRef xDocShell
-= 
loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/TextDistancesInsets1.pptx"),
 PPTX);
+loadFromURL(u"TextDistancesInsets1.pptx");
 
-SdrPage const* pPage = GetPage(1, xDocShell);
+SdrPage const* pPage = GetPage(1);
 // Bottom Margin = 4cm
 {
 std::array aObjectDesc = {
@@ -161,17 +165,14 @@ void ShapeImportExportTest::testTextDistancesOOXML()
 CPPUNIT_ASSERT_EQUAL(tools::Long(-1292), 
pTextObj->GetTextLowerDistance());
 }
 }
-
-xDocShell->DoClose();
 }
 
 /* Test text distances (insets) variants where top+bottom margin > text area*/
 void 
ShapeImportExportTest::testTextDistancesOOXML_LargerThanTextAreaSpecialCase()
 {
-::sd::DrawDocShellRef xDocShell
-= 
loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/TextDistancesInsets2.pptx"),
 PPTX);
+loadFromURL(u"TextDistancesInsets2.pptx");
 
-SdrPage const* pPage = GetPage(1, xDocShell);
+SdrPage const* pPage = GetPage(1);
 
 // Top/Bottom 0cm/3cm, 1cm/4cm, 4cm/7cm - all should be converted to the 
same value in LO
 {
@@ -252,20 +253,14 @@ void 
ShapeImportExportTest::testTextDistancesOOXML_LargerThanTextAreaSpecialCase
 CPPUNIT_ASSERT_EQUAL(tools::Long(-792), 
pTextObj->GetTextLowerDistance());
 }
 }
-
-xDocShell->DoClose();
 }
 
 /* Test export of text distances (insets) - conversion back of special case */
 void ShapeImportExportTest::testTextDistancesOOXML_Export()
 {
-::sd::DrawDocShellRef xDocShell
-= 
loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/TextDistancesInsets3.pptx"),
 PPTX);
-
-utl::TempFileNamed aTempFile;
-xDocShell = saveAndReload(xDocShell.get(), PPTX, &aTempFile);
-xDocShell->DoClose();
+loadFromURL(u"TextDistancesInsets3.pptx");
 
+utl::TempFileNamed aTempFile = save("Impress Office Open XML");
 xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "ppt/slides/slide1.xml");
 CPPUNIT_ASSERT(pXmlDoc);
 


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

2022-10-28 Thread Xisco Fauli (via logerrit)
 sd/qa/unit/misc-tests.cxx |   84 --
 sd/qa/unit/uiimpress.cxx  |   47 +
 2 files changed, 48 insertions(+), 83 deletions(-)

New commits:
commit 8c0117a5abd03026d8ea2a06fc4f6fc534e04f48
Author: Xisco Fauli 
AuthorDate: Fri Oct 28 12:53:06 2022 +0200
Commit: Xisco Fauli 
CommitDate: Fri Oct 28 16:15:05 2022 +0200

sd: get rid of duplicated code...

... by moving a couple of tests to a place with
similar tests
Surprisingly, testTdf96708 fails now with

sd/qa/unit/uiimpress.cxx:372:testTdf96708::TestBody
equality assertion failed
- Expected: 4
- Actual  : 5

which also fails when tested manually, so it seems
the tests didn't work properly before.
Issue reported in tdf#151802

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

diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 3ea3ec4a9064..aec8dafd75ed 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -40,11 +40,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -66,8 +61,6 @@ using namespace ::com::sun::star;
 class SdMiscTest : public SdModelTestBaseXML
 {
 public:
-void testTdf96206();
-void testTdf96708();
 void testTdf99396();
 void testTableObjectUndoTest();
 void testFillGradient();
@@ -89,8 +82,6 @@ public:
 void testTdf136956();
 
 CPPUNIT_TEST_SUITE(SdMiscTest);
-CPPUNIT_TEST(testTdf96206);
-CPPUNIT_TEST(testTdf96708);
 CPPUNIT_TEST(testTdf99396);
 CPPUNIT_TEST(testTableObjectUndoTest);
 CPPUNIT_TEST(testFillGradient);
@@ -154,83 +145,9 @@ sd::DrawDocShellRef SdMiscTest::Load(const OUString& rURL, 
sal_Int32 nFormat)
 // introduce model/view/controller to each other
 utl::ConnectFrameControllerModel(xTargetFrame, xController, xModel2);
 
-sd::ViewShell* pViewShell = xDocSh->GetViewShell();
-CPPUNIT_ASSERT(pViewShell);
-
-// Draw has no slidesorter, Impress never shows a LayerTabBar
-if (sd::ViewShell::ST_DRAW == pViewShell->GetShellType())
-{
-sd::LayerTabBar* pLayerTabBar
-= 
static_cast(pViewShell)->GetLayerTabControl();
-CPPUNIT_ASSERT(pLayerTabBar);
-pLayerTabBar->StateChanged(StateChangedType::InitShow);
-}
-else
-{
-sd::slidesorter::SlideSorterViewShell* pSSVS = nullptr;
-for (int i = 0; i < 1000; i++)
-{
-// Process all Tasks - slide sorter is created here
-Scheduler::ProcessEventsToIdle();
-if ((pSSVS = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(
- pViewShell->GetViewShellBase()))
-!= nullptr)
-break;
-osl::Thread::wait(std::chrono::milliseconds(100));
-}
-CPPUNIT_ASSERT(pSSVS);
-}
-
 return xDocSh;
 }
 
-void SdMiscTest::testTdf96206()
-{
-// Copying/pasting slide referring to a non-default master with a text 
duplicated the master
-
-sd::DrawDocShellRef xDocSh
-= 
Load(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf96206.odp"), ODP);
-sd::ViewShell* pViewShell = xDocSh->GetViewShell();
-auto pSSVS
-= 
sd::slidesorter::SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase());
-auto& rSSController = pSSVS->GetSlideSorter().GetController();
-
-const sal_uInt16 nMasterPageCnt1 = 
xDocSh->GetDoc()->GetMasterSdPageCount(PageKind::Standard);
-CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), nMasterPageCnt1);
-rSSController.GetClipboard().DoCopy();
-rSSController.GetClipboard().DoPaste();
-const sal_uInt16 nMasterPageCnt2 = 
xDocSh->GetDoc()->GetMasterSdPageCount(PageKind::Standard);
-CPPUNIT_ASSERT_EQUAL(nMasterPageCnt1, nMasterPageCnt2);
-
-xDocSh->DoClose();
-}
-
-void SdMiscTest::testTdf96708()
-{
-sd::DrawDocShellRef xDocSh
-= 
Load(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf96708.odp"), ODP);
-sd::ViewShell* pViewShell = xDocSh->GetViewShell();
-auto pSSVS
-= 
sd::slidesorter::SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase());
-auto& rSSController = pSSVS->GetSlideSorter().GetController();
-auto& rPageSelector = rSSController.GetPageSelector();
-
-const sal_uInt16 nMasterPageCnt1 = 
xDocSh->GetDoc()->GetMasterSdPageCount(PageKind::Standard);
-CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), nMasterPageCnt1);
-rPageSelector.SelectAllPages();
-rSSController.GetClipboard().DoCopy();
-
-// Now wait for timers to trigger creation of auto-layout
-osl::Thread::wait(std::chrono::milliseconds(100));
-Scheduler::ProcessEventsToIdle();
-
-rSSController.GetClipboard().DoPaste();
-const sal_uInt16 nMasterPageCnt2 = 
xDocSh->GetDoc()->GetMaster

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

2022-10-28 Thread Miklos Vajna (via logerrit)
 external/xmlsec/UnpackedTarball_xmlsec.mk |1 +
 external/xmlsec/old-nss.patch.1   |   13 +
 2 files changed, 14 insertions(+)

New commits:
commit fc4c0722095f7fd2232997fae6a8f61c4a482edc
Author: Miklos Vajna 
AuthorDate: Fri Oct 28 11:50:34 2022 +0200
Commit: Miklos Vajna 
CommitDate: Fri Oct 28 16:12:21 2022 +0200

xmlsec: blind fix to lower the possibly pointless NSS requirement

this was changed upstream for
https://github.com/lsh123/xmlsec/issues/308
and the hope is that only the test suite requires newer NSS

Change-Id: Ibb4128ed98476f129470fac1f9b8cde181bb7bb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141962
Reviewed-by: Jean-Baptiste Faure 
Tested-by: Miklos Vajna 
Reviewed-by: Miklos Vajna 

diff --git a/external/xmlsec/UnpackedTarball_xmlsec.mk 
b/external/xmlsec/UnpackedTarball_xmlsec.mk
index 7b4f082bf931..b64fe48e6161 100644
--- a/external/xmlsec/UnpackedTarball_xmlsec.mk
+++ b/external/xmlsec/UnpackedTarball_xmlsec.mk
@@ -10,6 +10,7 @@
 xmlsec_patches :=
 xmlsec_patches += remove-unnecessary-macro-417.patch.1
 xmlsec_patches += fix-size_max-412.patch.1
+xmlsec_patches += old-nss.patch.1
 
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,xmlsec))
 
diff --git a/external/xmlsec/old-nss.patch.1 b/external/xmlsec/old-nss.patch.1
new file mode 100644
index ..2fc16f30f2ae
--- /dev/null
+++ b/external/xmlsec/old-nss.patch.1
@@ -0,0 +1,13 @@
+--- xmlsec/configure.ac.orig   2022-10-28 11:49:10.461643631 +0200
 xmlsec/configure.ac2022-10-28 11:49:23.637626991 +0200
+@@ -948,8 +948,8 @@
+ dnl   2 overrides 1
+ dnl
+ dnl ==
+-NSS_MIN_VERSION="3.50.1"
+-NSPR_MIN_VERSION="4.25.1"
++NSS_MIN_VERSION="3.49"
++NSPR_MIN_VERSION="4.25.0"
+ SEAMONKEY_MIN_VERSION="1.0"
+ MOZILLA_MIN_VERSION="1.4"
+ NSS_CRYPTO_LIB="$XMLSEC_PACKAGE-nss"


[Libreoffice-commits] dev-tools.git: test-bugzilla-files/execute.sh

2022-10-28 Thread Gabor Kelemen (via logerrit)
 test-bugzilla-files/execute.sh |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit e1f689f4564a43605b90f9fe412c78d5d4a47adc
Author: Gabor Kelemen 
AuthorDate: Fri Oct 28 14:33:00 2022 +0200
Commit: Caolán McNamara 
CommitDate: Fri Oct 28 15:53:21 2022 +0200

Try sourcing $HOME/.config/crashtesting.config here too

This caused some breakage later when result files were at the
default location and searched at the customized one

Change-Id: Ieb05704b80f6719180961aae03385d9dd3d3a112
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/141979
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/test-bugzilla-files/execute.sh b/test-bugzilla-files/execute.sh
index e6dcde4..0b05658 100755
--- a/test-bugzilla-files/execute.sh
+++ b/test-bugzilla-files/execute.sh
@@ -2,7 +2,11 @@
 ulimit -c unlimited
 dir_name=$(basename $1)
 dir=${PWD}
-source ${dir}/config
+if [ -f $HOME/.config/crashtesting.config ] ; then
+source $HOME/.config/crashtesting.config
+else
+source ${dir}/config
+fi
 mkdir -p ${CRASHTESTDATA}/control/$dir_name
 cd ${CRASHTESTDATA}/control/$dir_name
 TMPDIR=${CRASHTESTDATA}/tmpdir ${INSTDIR}/program/python 
${dir}/test-bugzilla-files.py --soffice=path:${INSTDIR}/program/soffice 
--userdir=file://${USERDIR}/libreoffice_$dir_name/4 $1 >> 
${CRASHTESTDATA}/console_$dir_name.log 2>&1


[Libreoffice-commits] dev-tools.git: test-bugzilla-files/execute.sh

2022-10-28 Thread Gabor Kelemen (via logerrit)
 test-bugzilla-files/execute.sh |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8b51e240a8033f9a6728d2cd8ccee651fb6fb501
Author: Gabor Kelemen 
AuthorDate: Fri Oct 28 14:30:19 2022 +0200
Commit: Caolán McNamara 
CommitDate: Fri Oct 28 15:53:04 2022 +0200

Hide debug output from screen

In a Jenkins-based setup this would be saved for each job, eating
lots of disk space for no good reason.
Having it on disk for the current run should be enough.

Change-Id: I3aef6d5a72207a4591775089acbcb82c224251cc
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/141978
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/test-bugzilla-files/execute.sh b/test-bugzilla-files/execute.sh
index 158e641..e6dcde4 100755
--- a/test-bugzilla-files/execute.sh
+++ b/test-bugzilla-files/execute.sh
@@ -5,5 +5,5 @@ dir=${PWD}
 source ${dir}/config
 mkdir -p ${CRASHTESTDATA}/control/$dir_name
 cd ${CRASHTESTDATA}/control/$dir_name
-TMPDIR=${CRASHTESTDATA}/tmpdir ${INSTDIR}/program/python 
${dir}/test-bugzilla-files.py --soffice=path:${INSTDIR}/program/soffice 
--userdir=file://${USERDIR}/libreoffice_$dir_name/4 $1 2>&1 | tee 
${CRASHTESTDATA}/console_$dir_name.log
+TMPDIR=${CRASHTESTDATA}/tmpdir ${INSTDIR}/program/python 
${dir}/test-bugzilla-files.py --soffice=path:${INSTDIR}/program/soffice 
--userdir=file://${USERDIR}/libreoffice_$dir_name/4 $1 >> 
${CRASHTESTDATA}/console_$dir_name.log 2>&1
 rm -r ${USERDIR}/libreoffice_$dir_name


[Libreoffice-commits] core.git: configure.ac external/curl

2022-10-28 Thread Caolán McNamara (via logerrit)
 configure.ac  |   11 +--
 external/curl/ExternalProject_curl.mk |   24 ++--
 2 files changed, 23 insertions(+), 12 deletions(-)

New commits:
commit 2c0997900d35e54466d479c9c5437d447ba9b165
Author: Caolán McNamara 
AuthorDate: Fri Oct 28 09:07:29 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 28 15:52:10 2022 +0200

ofz: build-failure use with-tls result for curl

otherwise with (default due to --disable-dynamic-loading) --disable-nss

we get:

configure: error: select TLS backend(s) or disable TLS with --without-ssl.

Select from these:

  --with-amissl
  --with-bearssl
  --with-gnutls
  --with-mbedtls
  --with-nss
  --with-openssl (also works for BoringSSL and libressl)
  --with-rustls
  --with-schannel
  --with-secure-transport
  --with-wolfssl

alternative we could --without-ssl entirely without nss

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

diff --git a/configure.ac b/configure.ac
index df1d03a14488..8446105fceac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2163,12 +2163,11 @@ AC_ARG_WITH(package-format,
 AC_ARG_WITH(tls,
 AS_HELP_STRING([--with-tls],
 [Decides which TLS/SSL and cryptographic implementations to use for
- LibreOffice's code. Notice that this doesn't apply for depending
- libraries like "curl", for example. Default is to use NSS
- although OpenSSL is also possible. Notice that selecting NSS restricts
- the usage of OpenSSL in LO's code but selecting OpenSSL doesn't
- restrict by now the usage of NSS in LO's code. Possible values:
- openssl, nss. Example: --with-tls="nss"]),
+ LibreOffice's code. Default is to use NSS although OpenSSL is also
+ possible. Notice that selecting NSS restricts the usage of OpenSSL
+ in LO's code but selecting OpenSSL doesn't restrict by now the
+ usage of NSS in LO's code. Possible values: openssl, nss.
+ Example: --with-tls="nss"]),
 ,)
 
 AC_ARG_WITH(system-libs,
diff --git a/external/curl/ExternalProject_curl.mk 
b/external/curl/ExternalProject_curl.mk
index 32e14ed35403..087ea2c44b39 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -10,10 +10,21 @@
 $(eval $(call gb_ExternalProject_ExternalProject,curl))
 
 $(eval $(call gb_ExternalProject_use_externals,curl,\
-   $(if $(ENABLE_NSS),nss3) \
zlib \
 ))
 
+ifeq ($(TLS),NSS)
+$(eval $(call gb_ExternalProject_use_externals,curl,\
+   nss3 \
+))
+else
+ifeq ($(TLS),OPENSSL)
+$(eval $(call gb_ExternalProject_use_externals,curl,\
+   openssl \
+))
+endif
+endif
+
 $(eval $(call gb_ExternalProject_register_targets,curl,\
build \
 ))
@@ -36,15 +47,12 @@ curl_CPPFLAGS += -I$(call 
gb_UnpackedTarball_get_dir,nss)/dist/public/nss
 endif
 
 # use --with-secure-transport on macOS >10.5 and iOS to get a native UI for 
SSL certs for CMIS usage
-# use --with-nss only on platforms other than macOS and iOS
+# use --with-nss/--with-openssl only on platforms other than macOS and iOS
 $(call gb_ExternalProject_get_state_target,curl,build):
$(call gb_Trace_StartRange,curl,EXTERNAL)
$(call gb_ExternalProject_run,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") 
--with-nss-deprecated,--without-nss)) \
-   --without-openssl --without-gnutls --without-mbedtls \
+   --without-nss --without-openssl --without-gnutls 
--without-mbedtls \
--enable-ftp --enable-http --enable-ipv6 \
--without-libidn2 --without-libpsl --without-librtmp \
--without-libssh2 --without-nghttp2 \
@@ -56,6 +64,10 @@ $(call gb_ExternalProject_get_state_target,curl,build):
--disable-ldap --disable-ldaps --disable-manual 
--disable-pop3 \
--disable-rtsp --disable-smb --disable-smtp 
--disable-telnet  \
--disable-tftp  \
+   $(if $(filter iOS MACOSX,$(OS)),\
+   --with-secure-transport,\
+   $(if $(filter NSS,$(TLS)),--with-nss$(if 
$(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out") 
--with-nss-deprecated)) \
+   $(if $(filter 
OPENSSL,$(TLS)),--with-openssl$(if $(SYSTEM_OPENSSL),,="$(call 
gb_UnpackedTarball_get_dir,openssl)")) \
$(if $(filter LINUX,$(OS)),--without-ca-bundle 
--without-ca-path) \

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

2022-10-28 Thread Xisco Fauli (via logerrit)
 sd/qa/unit/misc-tests.cxx   |  379 +---
 solenv/clang-format/excludelist |1 
 2 files changed, 240 insertions(+), 140 deletions(-)

New commits:
commit 2fce155c8939c83d80cacc4ead8110ff75ce1b4c
Author: Xisco Fauli 
AuthorDate: Thu Oct 27 19:39:47 2022 +0200
Commit: Xisco Fauli 
CommitDate: Fri Oct 28 15:50:01 2022 +0200

CppunitTest_sd_misc_tests: use clang-format

Do it before changing the inheritance

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

diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 275ee32dbb12..3ea3ec4a9064 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -112,7 +112,7 @@ public:
 CPPUNIT_TEST(testTdf136956);
 CPPUNIT_TEST_SUITE_END();
 
-virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override
+virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override
 {
 XmlTestTools::registerODFNamespaces(pXmlXPathCtx);
 }
@@ -123,11 +123,12 @@ private:
 
 sd::DrawDocShellRef SdMiscTest::Load(const OUString& rURL, sal_Int32 nFormat)
 {
-uno::Reference< frame::XDesktop2 > xDesktop = 
frame::Desktop::create(::comphelper::getProcessComponentContext());
+uno::Reference xDesktop
+= frame::Desktop::create(::comphelper::getProcessComponentContext());
 CPPUNIT_ASSERT(xDesktop.is());
 
 // create a frame
-uno::Reference< frame::XFrame > xTargetFrame = 
xDesktop->findFrame("_blank", 0);
+uno::Reference xTargetFrame = xDesktop->findFrame("_blank", 
0);
 CPPUNIT_ASSERT(xTargetFrame.is());
 
 // This ContainerWindow corresponds to the outermost window of a running 
LibreOffice.
@@ -143,22 +144,24 @@ sd::DrawDocShellRef SdMiscTest::Load(const OUString& 
rURL, sal_Int32 nFormat)
 sd::DrawDocShellRef xDocSh = loadURL(rURL, nFormat);
 CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocSh.is());
 
-uno::Reference< frame::XModel2 > xModel2 = xDocSh->GetModel();
+uno::Reference xModel2 = xDocSh->GetModel();
 CPPUNIT_ASSERT(xModel2.is());
 
-uno::Reference< frame::XController2 > xController = 
xModel2->createDefaultViewController(xTargetFrame);
+uno::Reference xController
+= xModel2->createDefaultViewController(xTargetFrame);
 CPPUNIT_ASSERT(xController.is());
 
 // introduce model/view/controller to each other
 utl::ConnectFrameControllerModel(xTargetFrame, xController, xModel2);
 
-sd::ViewShell *pViewShell = xDocSh->GetViewShell();
+sd::ViewShell* pViewShell = xDocSh->GetViewShell();
 CPPUNIT_ASSERT(pViewShell);
 
 // Draw has no slidesorter, Impress never shows a LayerTabBar
 if (sd::ViewShell::ST_DRAW == pViewShell->GetShellType())
 {
-sd::LayerTabBar* pLayerTabBar = 
static_cast(pViewShell)->GetLayerTabControl();
+sd::LayerTabBar* pLayerTabBar
+= 
static_cast(pViewShell)->GetLayerTabControl();
 CPPUNIT_ASSERT(pLayerTabBar);
 pLayerTabBar->StateChanged(StateChangedType::InitShow);
 }
@@ -169,7 +172,9 @@ sd::DrawDocShellRef SdMiscTest::Load(const OUString& rURL, 
sal_Int32 nFormat)
 {
 // Process all Tasks - slide sorter is created here
 Scheduler::ProcessEventsToIdle();
-if ((pSSVS = 
sd::slidesorter::SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase()))
 != nullptr)
+if ((pSSVS = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(
+ pViewShell->GetViewShellBase()))
+!= nullptr)
 break;
 osl::Thread::wait(std::chrono::milliseconds(100));
 }
@@ -183,9 +188,11 @@ void SdMiscTest::testTdf96206()
 {
 // Copying/pasting slide referring to a non-default master with a text 
duplicated the master
 
-sd::DrawDocShellRef xDocSh = 
Load(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf96206.odp"), ODP);
-sd::ViewShell *pViewShell = xDocSh->GetViewShell();
-auto pSSVS = 
sd::slidesorter::SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase());
+sd::DrawDocShellRef xDocSh
+= 
Load(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf96206.odp"), ODP);
+sd::ViewShell* pViewShell = xDocSh->GetViewShell();
+auto pSSVS
+= 
sd::slidesorter::SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase());
 auto& rSSController = pSSVS->GetSlideSorter().GetController();
 
 const sal_uInt16 nMasterPageCnt1 = 
xDocSh->GetDoc()->GetMasterSdPageCount(PageKind::Standard);
@@ -200,9 +207,11 @@ void SdMiscTest::testTdf96206()
 
 void SdMiscTest::testTdf96708()
 {
-sd::DrawDocShellRef xDocSh = 
Load(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf96708.odp"), ODP);
-sd::ViewShell *pViewShell = xDocSh->GetViewShell();
-auto pSSVS = 
sd::slidesorter::Sli

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

2022-10-28 Thread Julien Nabet (via logerrit)
 dbaccess/inc/strings.hxx   |2 +-
 dbaccess/source/core/api/preparedstatement.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f02701d55d81961161c686e433c4980b0072e939
Author: Julien Nabet 
AuthorDate: Fri Oct 28 13:53:03 2022 +0200
Commit: Julien Nabet 
CommitDate: Fri Oct 28 14:52:51 2022 +0200

Typo: SERVICE_SDB_PREPAREDSTATMENT->SERVICE_SDB_PREPAREDSTATEMENT (dbaccess)

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

diff --git a/dbaccess/inc/strings.hxx b/dbaccess/inc/strings.hxx
index f4c6cb664934..eb90a6c04d82 100644
--- a/dbaccess/inc/strings.hxx
+++ b/dbaccess/inc/strings.hxx
@@ -176,7 +176,7 @@ inline constexpr OUStringLiteral SERVICE_SDB_DATACOLUMN = 
u"com.sun.star.sdb.Dat
 inline constexpr OUStringLiteral SERVICE_SDB_DATASOURCE = 
u"com.sun.star.sdb.DataSource";
 inline constexpr OUStringLiteral SERVICE_SDB_RESULTSET = 
u"com.sun.star.sdb.ResultSet";
 inline constexpr OUStringLiteral SERVICE_SDB_ROWSET = 
u"com.sun.star.sdb.RowSet";
-inline constexpr OUStringLiteral SERVICE_SDB_PREPAREDSTATMENT
+inline constexpr OUStringLiteral SERVICE_SDB_PREPAREDSTATEMENT
 = u"com.sun.star.sdb.PreparedStatement";
 inline constexpr OUStringLiteral SERVICE_SDB_CALLABLESTATEMENT
 = u"com.sun.star.sdb.CallableStatement";
diff --git a/dbaccess/source/core/api/preparedstatement.cxx 
b/dbaccess/source/core/api/preparedstatement.cxx
index 20d3111efb75..4714f8781778 100644
--- a/dbaccess/source/core/api/preparedstatement.cxx
+++ b/dbaccess/source/core/api/preparedstatement.cxx
@@ -117,7 +117,7 @@ sal_Bool OPreparedStatement::supportsService( const 
OUString& _rServiceName )
 
 Sequence< OUString > OPreparedStatement::getSupportedServiceNames(  )
 {
-return { SERVICE_SDBC_PREPAREDSTATEMENT, SERVICE_SDB_PREPAREDSTATMENT };
+return { SERVICE_SDBC_PREPAREDSTATEMENT, SERVICE_SDB_PREPAREDSTATEMENT };
 }
 
 // OComponentHelper


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

2022-10-28 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/uno/copytablewizard.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit 0325be6f3de622be6af9b2f686e3c7afae0405b1
Author: Noel Grandin 
AuthorDate: Fri Oct 28 12:26:00 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 28 14:46:24 2022 +0200

Fix bug in copying table where we need to create a primary key

The problem seems to be that

commit fa177231cd20bf3c3f4bb9b50f6646da139c6766
Author: Tamas Bunth 
Date:   Fri Aug 30 14:57:31 2019 +0200
tdf#127093, tdf#127092 Fix pasting autoincremented

was reverted in commit d783017c1ccb4e62e99f26b42250ac4e15780cff.

But the follow-on commit
commit 376cc3ea0fc2e0f209763a2a27c5852136332c86
Author: Tamas Bunth 
Date:   Sat Aug 31 18:27:44 2019 +0200
dbaccess: delete old paste autoincrement logic

was not reverted.

This is not a straight revert of the second commit, because
autoincrement has since been improved with

commit 2a8e120db1c3175ff937cdbe6d0ade23dc380c01
Author: Oleksii Makhotin 
Date:   Tue Apr 6 16:03:41 2021 +0300
tdf#119962 Fix autoincrement for copied table

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

diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx 
b/dbaccess/source/ui/uno/copytablewizard.cxx
index 49cbb81d5c9f..995ca99ed022 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1065,6 +1065,7 @@ void CopyTableWizard::impl_copyRows_throw( const 
Reference< XResultSet >& _rxSou
 
 const OCopyTableWizard& rWizard = impl_getDialog_throw();
 ODatabaseExport::TPositions aColumnPositions = 
rWizard.GetColumnPositions();
+const bool bShouldCreatePrimaryKey = rWizard.shouldCreatePrimaryKey();
 
 Reference< XRow > xRow  ( _rxSourceResultSet, UNO_QUERY_THROW 
);
 Reference< XRowLocate > xRowLocate  ( _rxSourceResultSet, UNO_QUERY_THROW 
);
@@ -1096,6 +1097,7 @@ void CopyTableWizard::impl_copyRows_throw( const 
Reference< XResultSet >& _rxSou
 const Any* pSelectedRow = m_aSourceSelection.getConstArray();
 const Any* pSelEnd  = pSelectedRow + 
m_aSourceSelection.getLength();
 
+sal_Int32 nRowCount = 0;
 bool bContinue = false;
 
 CopyTableRowEvent aCopyEvent;
@@ -1130,9 +1132,12 @@ void CopyTableWizard::impl_copyRows_throw( const 
Reference< XResultSet >& _rxSou
 break;
 }
 
+++nRowCount;
+
 aCopyEvent.Error.clear();
 try
 {
+bool bInsertedPrimaryKey = false;
 // notify listeners
 m_aCopyTableListeners.notifyEach( &XCopyTableListener::copyingRow, 
aCopyEvent );
 
@@ -1149,6 +1154,14 @@ void CopyTableWizard::impl_copyRows_throw( const 
Reference< XResultSet >& _rxSou
 continue;
 }
 
+if ( bShouldCreatePrimaryKey && !bInsertedPrimaryKey )
+{
+xStatementParams->setInt( 1, nRowCount );
+++nSourceColumn;
+bInsertedPrimaryKey = true;
+continue;
+}
+
 if ( ( nSourceColumn < 1 ) || ( 
o3tl::make_unsigned(nSourceColumn) >= aSourceColTypes.size() ) )
 {   // ( we have to check here against 1 because the 
parameters are 1 based)
 ::dbtools::throwSQLException("Internal error: invalid 
column type index.",
@@ -1250,6 +1263,7 @@ void CopyTableWizard::impl_copyRows_throw( const 
Reference< XResultSet >& _rxSou
 }
 catch( const Exception& )
 {
+TOOLS_WARN_EXCEPTION("dbaccess", "");
 aCopyEvent.Error = ::cppu::getCaughtException();
 }
 


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

2022-10-28 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/uno/copytablewizard.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f27bf3e888c6e98c4a723eb0a00c57f0197f1ed2
Author: Noel Grandin 
AuthorDate: Fri Oct 28 11:48:56 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 28 14:43:08 2022 +0200

add TOOLS_WARN

to make future debugging easier

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

diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx 
b/dbaccess/source/ui/uno/copytablewizard.cxx
index 9a77d4ed7f22..49cbb81d5c9f 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1400,6 +1400,7 @@ void CopyTableWizard::impl_doCopy_nothrow()
 }
 catch( const Exception& )
 {
+TOOLS_WARN_EXCEPTION("dbaccess", "");
 aError = ::cppu::getCaughtException();
 
 // silence the error of the user cancelling the parameter's dialog


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

2022-10-28 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/uno/copytablewizard.cxx |   68 ++---
 1 file changed, 33 insertions(+), 35 deletions(-)

New commits:
commit ca82061c2cad00aeddb17b766063776fee0ee41a
Author: Noel Grandin 
AuthorDate: Fri Oct 28 11:28:58 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 28 14:42:51 2022 +0200

make ValueTransfer easier to understand

storing references to local variables makes it harder to figure out what
the control flow is doing.

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

diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx 
b/dbaccess/source/ui/uno/copytablewizard.cxx
index 95a94a57aadf..9a77d4ed7f22 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -941,40 +941,39 @@ namespace
 class ValueTransfer
 {
 public:
-ValueTransfer( const sal_Int32& _rSourcePos, const sal_Int32& 
_rDestPos, std::vector< sal_Int32 >&& _rColTypes,
+ValueTransfer( std::vector< sal_Int32 > _rColTypes,
 const Reference< XRow >& _rxSource, const Reference< XParameters 
>& _rxDest )
-:m_rSourcePos( _rSourcePos )
-,m_rDestPos( _rDestPos )
-,m_rColTypes( std::move(_rColTypes) )
+:m_ColTypes( std::move(_rColTypes) )
 ,m_xSource( _rxSource )
 ,m_xDest( _rxDest )
 {
 }
 
 template< typename VALUE_TYPE >
-void transferValue( VALUE_TYPE ( SAL_CALL XRow::*_pGetter )( sal_Int32 ),
+void transferValue( sal_Int32 _nSourcePos, sal_Int32 _nDestPos,
+VALUE_TYPE ( SAL_CALL XRow::*_pGetter )( sal_Int32 ),
 void (SAL_CALL XParameters::*_pSetter)( sal_Int32, VALUE_TYPE ) )
 {
-VALUE_TYPE value( (m_xSource.get()->*_pGetter)( m_rSourcePos ) );
+VALUE_TYPE value( (m_xSource.get()->*_pGetter)( _nSourcePos ) );
 if ( m_xSource->wasNull() )
-m_xDest->setNull( m_rDestPos, m_rColTypes[ m_rSourcePos ] );
+m_xDest->setNull( _nDestPos, m_ColTypes[ _nSourcePos ] );
 else
-(m_xDest.get()->*_pSetter)( m_rDestPos, value );
+(m_xDest.get()->*_pSetter)( _nDestPos, value );
 }
- template< typename VALUE_TYPE >
-void transferComplexValue( VALUE_TYPE ( SAL_CALL XRow::*_pGetter )( 
sal_Int32 ),
+
+template< typename VALUE_TYPE >
+void transferComplexValue( sal_Int32 _nSourcePos, sal_Int32 _nDestPos,
+VALUE_TYPE ( SAL_CALL XRow::*_pGetter )( sal_Int32 ),
 void (SAL_CALL XParameters::*_pSetter)( sal_Int32, const VALUE_TYPE& ) 
)
 {
-const VALUE_TYPE value( (m_xSource.get()->*_pGetter)( m_rSourcePos ) );
+const VALUE_TYPE value( (m_xSource.get()->*_pGetter)( _nSourcePos ) );
 if ( m_xSource->wasNull() )
-m_xDest->setNull( m_rDestPos, m_rColTypes[ m_rSourcePos ] );
+m_xDest->setNull( _nDestPos, m_ColTypes[ _nSourcePos ] );
 else
-(m_xDest.get()->*_pSetter)( m_rDestPos, value );
+(m_xDest.get()->*_pSetter)( _nDestPos, value );
 }
 private:
-const sal_Int32&m_rSourcePos;
-const sal_Int32&m_rDestPos;
-const std::vector< sal_Int32 >m_rColTypes;
+const std::vector< sal_Int32 >  m_ColTypes;
 const Reference< XRow > m_xSource;
 const Reference< XParameters >  m_xDest;
 };
@@ -1137,13 +1136,12 @@ void CopyTableWizard::impl_copyRows_throw( const 
Reference< XResultSet >& _rxSou
 // notify listeners
 m_aCopyTableListeners.notifyEach( &XCopyTableListener::copyingRow, 
aCopyEvent );
 
-sal_Int32 nDestColumn( 0 );
-sal_Int32 nSourceColumn( 1 );
-ValueTransfer aTransfer( nSourceColumn, nDestColumn, 
std::vector(aSourceColTypes), xRow, xStatementParams );
+sal_Int32 nSourceColumn( 0 );
+ValueTransfer aTransfer( aSourceColTypes, xRow, xStatementParams );
 
 for ( auto const& rColumnPos : aColumnPositions )
 {
-nDestColumn = rColumnPos.first;
+sal_Int32 nDestColumn = rColumnPos.first;
 if ( nDestColumn == COLUMN_POSITION_NOT_FOUND )
 {
 ++nSourceColumn;
@@ -1161,7 +1159,7 @@ void CopyTableWizard::impl_copyRows_throw( const 
Reference< XResultSet >& _rxSou
 {
 case DataType::DOUBLE:
 case DataType::REAL:
-aTransfer.transferValue( &XRow::getDouble, 
&XParameters::setDouble );
+aTransfer.transferValue( nSourceColumn, nDestColumn, 
&XRow::getDouble, &XParameters::setDouble );
 break;
 
 case DataType::CHAR:
@@ -1169,64 +1167,64 @@ void CopyTabl

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

2022-10-28 Thread Mike Kaganski (via logerrit)
 libreofficekit/source/gtk/lokdocview.cxx |   16 ++--
 vcl/source/app/svapp.cxx |2 ++
 2 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 616e95c7044e8ea4fe3396dfa22c4ef7e9d4cd32
Author: Mike Kaganski 
AuthorDate: Fri Oct 28 13:04:00 2022 +0300
Commit: Mike Kaganski 
CommitDate: Fri Oct 28 13:59:36 2022 +0200

lok: You can't assume that destroyView would only destroy one view

In case you have some in-place clients (e.g., Math in-place editing
is active), destroying the parent view would also destroy children,
and then both numberOfViewsChanged (called from doc_destroyView)
must tolerate 0 as a valid input, and lok_doc_view_destroy must
make sure to destroy the document after the last views had gone.

Change-Id: I32370fea49da0969e1fbbf971a397c4d657ec8f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141963
Reviewed-by: Michael Meeks 
Tested-by: Jenkins

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index f52330bcbd56..451a373d416b 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -2771,17 +2771,13 @@ static void lok_doc_view_destroy (GtkWidget* widget)
 
 if (priv->m_pDocument)
 {
-if (priv->m_pDocument->pClass->getViewsCount(priv->m_pDocument) > 1)
+// This call may drop several views - e.g., embedded OLE in-place 
clients
+priv->m_pDocument->pClass->destroyView(priv->m_pDocument, 
priv->m_nViewId);
+if (priv->m_pDocument->pClass->getViewsCount(priv->m_pDocument) == 0)
 {
-priv->m_pDocument->pClass->destroyView(priv->m_pDocument, 
priv->m_nViewId);
-}
-else
-{
-if (priv->m_pDocument)
-{
-priv->m_pDocument->pClass->destroy (priv->m_pDocument);
-priv->m_pDocument = nullptr;
-}
+// Last view(s) gone
+priv->m_pDocument->pClass->destroy (priv->m_pDocument);
+priv->m_pDocument = nullptr;
 if (priv->m_pOffice)
 {
 priv->m_pOffice->pClass->destroy (priv->m_pOffice);
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 6fb299f82a0f..6dfa35c61551 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1830,6 +1830,8 @@ bool isUnipoll()
 
 void numberOfViewsChanged(int count)
 {
+if (count == 0)
+return;
 ImplSVData * pSVData = ImplGetSVData();
 auto& rCache = pSVData->maGDIData.maScaleCache;
 // Normally the cache size is set to 10, scale according to the number of 
users.


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

2022-10-28 Thread Andrea Gelmini (via logerrit)
 sw/source/uibase/uiview/view2.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 8db9337f35829d8592545055d03718ba0a204950
Author: Andrea Gelmini 
AuthorDate: Fri Oct 28 11:39:43 2022 +0200
Commit: Julien Nabet 
CommitDate: Fri Oct 28 13:55:41 2022 +0200

Removed duplicated include

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

diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index 0c56882e5eac..05b340459e58 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -156,8 +156,6 @@
 #include 
 #include 
 
-#include 
-
 const char sStatusDelim[] = " : ";
 
 using namespace sfx2;


[Libreoffice-commits] core.git: 2 commits - external/curl vcl/source

2022-10-28 Thread Caolán McNamara (via logerrit)
 external/curl/ExternalProject_curl.mk |6 +++---
 vcl/source/control/slider.cxx |3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 6f00aef4fe3242a1ff3a7f9fa31e8a6663162ca3
Author: Caolán McNamara 
AuthorDate: Fri Oct 28 09:04:27 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 28 13:54:15 2022 +0200

remove configure arguments to curl that no longer exist

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

diff --git a/external/curl/ExternalProject_curl.mk 
b/external/curl/ExternalProject_curl.mk
index 8d8bd13aefab..32e14ed35403 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -44,13 +44,13 @@ $(call gb_ExternalProject_get_state_target,curl,build):
$(if $(filter iOS MACOSX,$(OS)),\
--with-secure-transport,\
$(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 --without-axtls --without-mbedtls \
+   --without-openssl --without-gnutls --without-mbedtls \
--enable-ftp --enable-http --enable-ipv6 \
--without-libidn2 --without-libpsl --without-librtmp \
-   --without-libssh2 --without-metalink --without-nghttp2 \
+   --without-libssh2 --without-nghttp2 \
--without-libssh --without-brotli \
--without-ngtcp2 --without-quiche \
-   --without-zstd --without-hyper --without-gsasl 
--without-gssapi \
+   --without-zstd --without-hyper --without-libgsasl 
--without-gssapi \
--disable-mqtt --disable-ares \
--disable-dict --disable-file --disable-gopher 
--disable-imap \
--disable-ldap --disable-ldaps --disable-manual 
--disable-pop3 \
commit 50ce65655d8ed834971f7b8d727ac966a841ea12
Author: Caolán McNamara 
AuthorDate: Fri Oct 28 12:09:11 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 28 13:53:59 2022 +0200

invalidate slider on gaining/losing focus so could show a macOS focus ring

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

diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index ca3903b37091..3a119ea4f5e5 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -792,7 +792,8 @@ void Slider::StateChanged( StateChangedType nType )
 Invalidate();
 }
 }
-else if ( nType == StateChangedType::Enable )
+else if ( nType == StateChangedType::Enable ||
+  nType == StateChangedType::ControlFocus )
 {
 if ( IsReallyVisible() && IsUpdateMode() )
 {


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

2022-10-28 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/inc/DExport.hxx |2 +-
 dbaccess/source/ui/misc/DExport.cxx|4 ++--
 dbaccess/source/ui/uno/copytablewizard.cxx |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 7c754a226e63415a4f95be47ba30bde5029fee21
Author: Noel Grandin 
AuthorDate: Fri Oct 28 11:15:45 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 28 13:41:03 2022 +0200

rename createPreparedStatment->createPreparedStatement

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

diff --git a/dbaccess/source/ui/inc/DExport.hxx 
b/dbaccess/source/ui/inc/DExport.hxx
index ab7c85811778..a7647077 100644
--- a/dbaccess/source/ui/inc/DExport.hxx
+++ b/dbaccess/source/ui/inc/DExport.hxx
@@ -153,7 +153,7 @@ namespace dbaui
 void enableCheckOnly() { m_bCheckOnly = true; }
 bool isCheckEnabled() const { return m_bCheckOnly; }
 
-static css::uno::Reference< css::sdbc::XPreparedStatement > 
createPreparedStatment( const css::uno::Reference< 
css::sdbc::XDatabaseMetaData>& _xMetaData
+static css::uno::Reference< css::sdbc::XPreparedStatement > 
createPreparedStatement( const css::uno::Reference< 
css::sdbc::XDatabaseMetaData>& _xMetaData
,const 
css::uno::Reference< css::beans::XPropertySet>& _xDestTable
,const TPositions& 
_rvColumnPositions);
 };
diff --git a/dbaccess/source/ui/misc/DExport.cxx 
b/dbaccess/source/ui/misc/DExport.cxx
index 46a53788429d..d45b791af1af 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -655,7 +655,7 @@ void ODatabaseExport::CreateDefaultColumn(const OUString& 
_rColumnName)
 
 void ODatabaseExport::createRowSet()
 {
-m_pUpdateHelper = 
std::make_shared(createPreparedStatment(m_xConnection->getMetaData(),m_xTable,m_vColumnPositions));
+m_pUpdateHelper = 
std::make_shared(createPreparedStatement(m_xConnection->getMetaData(),m_xTable,m_vColumnPositions));
 }
 
 bool ODatabaseExport::executeWizard(const OUString& _rTableName, const Any& 
_aTextColor, const FontDescriptor& _rFont)
@@ -778,7 +778,7 @@ void ODatabaseExport::ensureFormatter()
 }
 }
 
-Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const 
Reference& _xMetaData
+Reference< XPreparedStatement > ODatabaseExport::createPreparedStatement( 
const Reference& _xMetaData
,const 
Reference& _xDestTable
,const TPositions& 
_rvColumns)
 {
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx 
b/dbaccess/source/ui/uno/copytablewizard.cxx
index 640fed998318..95a94a57aadf 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1090,7 +1090,7 @@ void CopyTableWizard::impl_copyRows_throw( const 
Reference< XResultSet >& _rxSou
 }
 
 // now create, fill and execute the prepared statement
-Reference< XPreparedStatement > xStatement( 
ODatabaseExport::createPreparedStatment( xDestMetaData, _rxDestTable, 
aColumnPositions ), UNO_SET_THROW );
+Reference< XPreparedStatement > xStatement( 
ODatabaseExport::createPreparedStatement( xDestMetaData, _rxDestTable, 
aColumnPositions ), UNO_SET_THROW );
 Reference< XParameters > xStatementParams( xStatement, UNO_QUERY_THROW );
 
 const bool bSelectedRecordsOnly = m_aSourceSelection.hasElements();


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - download.lst external/curl

2022-10-28 Thread Michael Stahl (via logerrit)
 download.lst  |4 ++--
 external/curl/ExternalProject_curl.mk |2 +-
 external/curl/curl-nss.patch.1|7 ++-
 3 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit a2d13341db6177adbb808d8ff450bdcc85a55325
Author: Michael Stahl 
AuthorDate: Wed Oct 26 11:07:49 2022 +0200
Commit: Andras Timar 
CommitDate: Fri Oct 28 12:36:37 2022 +0200

curl: upgrade to release 7.86.0

Fixes CVE-2022-32221 which could affect libcmis, CVE-2022-42915,
and 2 more CVEs that probably don't affect LO.

* remove --without-ssl:
  On the one hand, on GNU/Linux this now results in:

configure: error: --without-ssl has been set together with an explicit 
option to use an ssl library

  On the other hand, using the more obvious --without-openssl yields a link
  failure on Android on the nss check in configure:

  configure:28220: checking for SSL_VersionRangeSet in -lnss
  
/home/cl/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld:
 warning: liblog.so, needed by 
/home/cl/rpmbuild/BUILD/lo-android2/workdir/UnpackedTarball/nss/dist/out/lib/libnss3.so,
 not found (try using -rpath or -rpath-link)
  
/home/cl/rpmbuild/BUILD/lo-android2/workdir/UnpackedTarball/nss/dist/out/lib/libnspr4.so:
 undefined reference to `__android_log_write'
  
/home/cl/rpmbuild/BUILD/lo-android2/workdir/UnpackedTarball/nss/dist/out/lib/libnspr4.so:
 undefined reference to `__android_log_assert'

  ... so add the -llog for android in curl-nss.patch.1

Change-Id: I3931a1eec2d681c2ce0e5695039492772e9fcc81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141866
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit a76a88203d8508f38b10d9bbb94c3bba2485fcaf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141846
Reviewed-by: Xisco Fauli 

diff --git a/download.lst b/download.lst
index f16d5c197cea..29bbd3d3c266 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 := 
88b54a6d4b9a48cb4d873c7056dcba997ddd5b7be5a2d537a4acb55c20b04be6
-export CURL_TARBALL := curl-7.85.0.tar.xz
+export CURL_SHA256SUM := 
2d61116e5f485581f6d59865377df4463f2e788677ac43222b496d4e49fb627b
+export CURL_TARBALL := curl-7.86.0.tar.xz
 export EBOOK_SHA256SUM := 
7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9
 export EBOOK_TARBALL := libe-book-0.1.3.tar.xz
 export EPOXY_SHA256SUM := 
a7ced37f4102b745ac86d6a70a9da399cc139ff168ba6b8002b4d8d43c900c15
diff --git a/external/curl/ExternalProject_curl.mk 
b/external/curl/ExternalProject_curl.mk
index eac5cf211224..5a516651c608 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -44,7 +44,7 @@ $(call gb_ExternalProject_get_state_target,curl,build):
$(if $(filter iOS MACOSX,$(OS)),\
--with-secure-transport,\
$(if $(ENABLE_NSS),--with-nss$(if 
$(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out") 
--with-nss-deprecated,--without-nss)) \
-   --without-ssl --without-gnutls --without-polarssl 
--without-cyassl --without-axtls --without-mbedtls \
+   --without-openssl --without-gnutls --without-polarssl 
--without-cyassl --without-axtls --without-mbedtls \
--enable-ftp --enable-http --enable-ipv6 \
--without-libidn2 --without-libpsl --without-librtmp \
--without-libssh2 --without-metalink --without-nghttp2 \
diff --git a/external/curl/curl-nss.patch.1 b/external/curl/curl-nss.patch.1
index 016cd109c7a2..5ef25748d7eb 100644
--- a/external/curl/curl-nss.patch.1
+++ b/external/curl/curl-nss.patch.1
@@ -1,12 +1,17 @@
 diff -ur curl.org/configure curl/configure
 --- curl.org/configure 2016-03-13 15:14:07.17776 +0100
 +++ curl/configure 2016-03-13 15:16:44.13276 +0100
-@@ -27985,7 +27985,7 @@
+@@ -27985,7 +27985,12 @@
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Using hard-wired 
libraries and compilation flags for NSS." >&5
  printf "%s\n" "$as_me: WARNING: Using hard-wired libraries and compilation 
flags for NSS." >&2;}
addld="-L$OPT_NSS/lib"
 -  addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4"
 +  addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lnssutil3"
++  case $host_os in
++*android*)
++  addlib="${addlib} -llog"
++  ;;
++  esac
addcflags="-I$OPT_NSS

[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - include/oox oox/source sd/qa

2022-10-28 Thread Sarper Akdemir (via logerrit)
 include/oox/export/drawingml.hxx  |2 -
 oox/source/export/drawingml.cxx   |   26 ++
 sd/qa/unit/data/odp/autofitted-textbox-indent.odp |binary
 sd/qa/unit/export-tests-ooxml3.cxx|   22 ++
 4 files changed, 45 insertions(+), 5 deletions(-)

New commits:
commit f2aba4e0f9bd11962739fed69bd5c99a56a6f5ed
Author: Sarper Akdemir 
AuthorDate: Mon Oct 24 14:16:16 2022 +0300
Commit: Andras Timar 
CommitDate: Fri Oct 28 12:06:44 2022 +0200

related tdf#149961 pptx export: scale indents for autofitted textboxes

For autofitted textboxes, Impress scales the indents with
the text size while PowerPoint doesn't.

Try to compensate for this by scaling exported indents
proportionally to the font scale on autofitted textboxes.

Change-Id: Ib0f967e923d23553b4cdbd1bbe2e137d97b1b2e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141758
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141940
Reviewed-by: Andras Timar 

diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index c80024ea1fdd..674457b3c6e4 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -302,7 +302,7 @@ public:
 
 @returns true if any paragraph properties were written
 */
-bool WriteParagraphProperties(const css::uno::Reference< 
css::text::XTextContent >& rParagraph, float fFirstCharHeight, sal_Int32 
nElement);
+bool WriteParagraphProperties(const css::uno::Reference< 
css::text::XTextContent >& rParagraph, const 
css::uno::Reference& rXShapePropSet, float 
fFirstCharHeight, sal_Int32 nElement);
 void WriteParagraphNumbering(const css::uno::Reference< 
css::beans::XPropertySet >& rXPropSet, float fFirstCharHeight,
   sal_Int16 nLevel );
 void WriteParagraphTabStops(const 
css::uno::Reference& rXPropSet);
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 0ab497a4fed3..5ee48ff6e338 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3020,7 +3020,7 @@ void DrawingML::WriteLinespacing(const LineSpacing& 
rSpacing, float fFirstCharHe
 }
 }
 
-bool DrawingML::WriteParagraphProperties( const Reference< XTextContent >& 
rParagraph, float fFirstCharHeight, sal_Int32 nElement)
+bool DrawingML::WriteParagraphProperties(const Reference& 
rParagraph, const Reference& rXShapePropSet, float 
fFirstCharHeight, sal_Int32 nElement)
 {
 Reference< XPropertySet > rXPropSet( rParagraph, UNO_QUERY );
 Reference< XPropertyState > rXPropState( rParagraph, UNO_QUERY );
@@ -3110,6 +3110,24 @@ bool DrawingML::WriteParagraphProperties( const 
Reference< XTextContent >& rPara
 return false;
 }
 
+// for autofitted textboxes, scale the indents
+if (GetProperty(rXShapePropSet, "TextFitToSize") && 
mAny.get() == TextFitToSizeType_AUTOFIT)
+{
+SvxShapeText* pTextShape = 
dynamic_cast(rXShapePropSet.get());
+if (pTextShape)
+{
+SdrTextObj* pTextObject = 
dynamic_cast(pTextShape->GetSdrObject());
+if (pTextObject)
+{
+const auto nFontScaleY = pTextObject->GetFontScaleY();
+nLeftMargin = nLeftMargin * nFontScaleY / 100;
+nLineIndentation = nLineIndentation * nFontScaleY / 100;
+nParaLeftMargin = nParaLeftMargin * nFontScaleY / 100;
+nParaFirstLineIndent = nParaFirstLineIndent * nFontScaleY / 
100;
+}
+}
+}
+
 if (nParaLeftMargin) // For Paragraph
 mpFS->startElementNS( XML_a, nElement,
XML_lvl, 
sax_fastparser::UseIf(OString::number(nLevel), nLevel > 0),
@@ -3197,7 +3215,7 @@ void DrawingML::WriteLstStyles(const 
css::uno::ReferencegetPropertyValue("CharHeight").get();
 
 mpFS->startElementNS(XML_a, XML_lstStyle);
-if( !WriteParagraphProperties(rParagraph, fFirstCharHeight, 
XML_lvl1pPr) )
+if( !WriteParagraphProperties(rParagraph, rXShapePropSet, 
fFirstCharHeight, XML_lvl1pPr) )
 mpFS->startElementNS(XML_a, XML_lvl1pPr);
 WriteRunProperties(xFirstRunPropSet, false, XML_defRPr, true, 
rbOverridingCharHeight,
rnCharHeight, GetScriptType(rRun->getString()), 
rXShapePropSet);
@@ -3239,7 +3257,7 @@ void DrawingML::WriteParagraph( const Reference< 
XTextContent >& rParagraph,
 rnCharHeight = 100 * fFirstCharHeight;
 rbOverridingCharHeight = true;
 }
-WriteParagraphProperties(rParagraph, fFirstCharHeight, 
XML_pPr);
+WriteParagraphProperties(rParagraph, rXShapePropSet, 
fFirstCharHeight, XML_pPr);
 bPropertiesWritten = true;
 }
 WriteRun

Theppitak Karoonboonyanan license statement

2022-10-28 Thread Theppitak Karoonboonyanan
All of my past & future contributions to LibreOffice may be
licensed under the MPLv2/LGPLv3+ dual license.

-- 
Theppitak Karoonboonyanan
http://linux.thai.net/~thep/


[Libreoffice-commits] core.git: chart2/source dbaccess/source framework/source include/unotools sd/qa sfx2/source

2022-10-28 Thread Mike Kaganski (via logerrit)
 chart2/source/controller/main/ChartFrameloader.cxx |4 ++--
 dbaccess/source/filter/xml/dbloader2.cxx   |4 ++--
 dbaccess/source/ui/browser/dbloader.cxx|2 +-
 framework/source/services/autorecovery.cxx |4 ++--
 include/unotools/fcm.hxx   |8 
 sd/qa/unit/misc-tests.cxx  |4 ++--
 sfx2/source/view/frmload.cxx   |4 ++--
 7 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 1e1f739f649a9a36c18425209a6d47c5f7b23eac
Author: Mike Kaganski 
AuthorDate: Fri Oct 28 11:25:59 2022 +0300
Commit: Mike Kaganski 
CommitDate: Fri Oct 28 11:20:37 2022 +0200

It's Frame-Controller-Model, not Model-View-Controller

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

diff --git a/chart2/source/controller/main/ChartFrameloader.cxx 
b/chart2/source/controller/main/ChartFrameloader.cxx
index 1a3fa8641a6c..2ff45588002b 100644
--- a/chart2/source/controller/main/ChartFrameloader.cxx
+++ b/chart2/source/controller/main/ChartFrameloader.cxx
@@ -22,8 +22,8 @@
 #include 
 #include 
 #include 
+#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -111,7 +111,7 @@ sal_Bool SAL_CALL ChartFrameLoader::load( const 
uno::Sequence< beans::PropertyVa
 //connect frame, controller and model one to each other:
 if(xModel.is())
 {
-utl::ConnectModelViewController(xModel, xFrame, xController);
+utl::ConnectFrameControllerModel(xFrame, xController, xModel);
 }
 
 // call initNew() or load() at XLoadable
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx 
b/dbaccess/source/filter/xml/dbloader2.cxx
index bfcdfc074026..7b10bf2b523f 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -52,8 +52,8 @@
 #include 
 #include 
 #include 
+#include 
 #include 
-#include 
 #include 
 #include 
 
@@ -449,7 +449,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame 
> & rFrame, const OU
 Reference< XController2 > xController( 
xModel2->createViewController( sViewName, Sequence< PropertyValue >(), rFrame 
), UNO_SET_THROW );
 
 // introduce model/view/controller to each other
-utl::ConnectModelViewController(xModel, rFrame, xController);
+utl::ConnectFrameControllerModel(rFrame, xController, xModel);
 
 bSuccess = true;
 }
diff --git a/dbaccess/source/ui/browser/dbloader.cxx 
b/dbaccess/source/ui/browser/dbloader.cxx
index d5c4395efe3a..f2dfd2a497f9 100644
--- a/dbaccess/source/ui/browser/dbloader.cxx
+++ b/dbaccess/source/ui/browser/dbloader.cxx
@@ -38,7 +38,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 using namespace ::com::sun::star;
diff --git a/framework/source/services/autorecovery.cxx 
b/framework/source/services/autorecovery.cxx
index d59a36b5bb09..c9e7d62cc5f9 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -76,8 +76,8 @@
 #include 
 #include 
 #include 
+#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -3423,7 +3423,7 @@ void AutoRecovery::implts_openOneDoc(const OUString&  
 sURL   ,
 }
 
 // introduce model/view/controller to each other
-utl::ConnectModelViewController(xModel, xTargetFrame, xController);
+utl::ConnectFrameControllerModel(xTargetFrame, xController, 
xModel);
 }
 
 rInfo.Document = xModel.get();
diff --git a/include/unotools/mvc.hxx b/include/unotools/fcm.hxx
similarity index 85%
rename from include/unotools/mvc.hxx
rename to include/unotools/fcm.hxx
index 6c9d65a778d3..30df362884ba 100644
--- a/include/unotools/mvc.hxx
+++ b/include/unotools/fcm.hxx
@@ -34,11 +34,11 @@ inline void ConnectModelController(const 
css::uno::Reference
 xModel->setCurrentController(xController);
 }
 
-// Introduce model/view/controller to each other
+// Introduce frame/controller/model to each other
 inline void
-ConnectModelViewController(const css::uno::Reference& 
xModel,
-   const css::uno::Reference& 
xFrame,
-   const 
css::uno::Reference& xController)
+ConnectFrameControllerModel(const css::uno::Reference& 
xFrame,
+const 
css::uno::Reference& xController,
+const css::uno::Reference& 
xModel)
 {
 ConnectModelController(xModel, xController);
 if (xFrame)
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index eb33a7e1e5a1..275ee32dbb12 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -58,7 +58,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -150,7 +150,7 @@ sd::DrawDocShellRef SdMiscTest::Load(c

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

2022-10-28 Thread Chris Sherlock (via logerrit)
 include/vcl/animate/Animation.hxx |1 
 vcl/source/animate/Animation.cxx  |   92 ++
 2 files changed, 46 insertions(+), 47 deletions(-)

New commits:
commit 91bc1e6a8c92a7c895f0ba9dcad9ac4d35f3f791
Author: Chris Sherlock 
AuthorDate: Sat Jun 25 10:21:17 2022 +1000
Commit: Tomaž Vajngerl 
CommitDate: Fri Oct 28 11:09:32 2022 +0200

vcl: extract function Animation::RenderNextFrameInAllRenderers()

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

diff --git a/include/vcl/animate/Animation.hxx 
b/include/vcl/animate/Animation.hxx
index b9d9d69e401f..307fed73c222 100644
--- a/include/vcl/animate/Animation.hxx
+++ b/include/vcl/animate/Animation.hxx
@@ -112,6 +112,7 @@ private:
 
 SAL_DLLPRIVATE std::vector> 
CreateAnimationDataItems();
 SAL_DLLPRIVATE void PopulateRenderers();
+SAL_DLLPRIVATE void RenderNextFrameInAllRenderers();
 
 SAL_DLLPRIVATE void ImplRestartTimer(sal_uLong nTimeout);
 DECL_DLLPRIVATE_LINK(ImplTimeoutHdl, Timer*, void);
diff --git a/vcl/source/animate/Animation.cxx b/vcl/source/animate/Animation.cxx
index 4ae010c54332..c6547f9e7852 100644
--- a/vcl/source/animate/Animation.cxx
+++ b/vcl/source/animate/Animation.cxx
@@ -317,6 +317,50 @@ void Animation::PopulateRenderers()
 }
 }
 
+void Animation::RenderNextFrameInAllRenderers()
+{
+AnimationFrame* pCurrentFrameBmp
+= (++mnFrameIndex < maFrames.size()) ? maFrames[mnFrameIndex].get() : 
nullptr;
+
+if (!pCurrentFrameBmp)
+{
+if (mnLoops == 1)
+{
+Stop();
+mbLoopTerminated = true;
+mnFrameIndex = mnAnimCount - 1;
+maBitmapEx = maFrames[mnFrameIndex]->maBitmapEx;
+return;
+}
+else
+{
+if (mnLoops)
+mnLoops--;
+
+mnFrameIndex = 0;
+pCurrentFrameBmp = maFrames[mnFrameIndex].get();
+}
+}
+
+// Paint all views.
+std::for_each(maRenderers.cbegin(), maRenderers.cend(),
+  [this](const auto& pRenderer) { 
pRenderer->draw(mnFrameIndex); });
+/*
+ * If a view is marked, remove the view, because
+ * area of output lies out of display area of window.
+ * Mark state is set from view itself.
+ */
+auto removeStart = std::remove_if(maRenderers.begin(), maRenderers.end(),
+  [](const auto& pRenderer) { return 
pRenderer->isMarked(); });
+maRenderers.erase(removeStart, maRenderers.cend());
+
+// stop or restart timer
+if (maRenderers.empty())
+Stop();
+else
+ImplRestartTimer(pCurrentFrameBmp->mnWait);
+}
+
 IMPL_LINK_NOARG(Animation, ImplTimeoutHdl, Timer*, void)
 {
 const size_t nAnimCount = maFrames.size();
@@ -346,57 +390,11 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl, Timer*, void)
 }
 
 if (maRenderers.empty())
-{
 Stop();
-}
 else if (bGlobalPause)
-{
 ImplRestartTimer(10);
-}
 else
-{
-AnimationFrame* pCurrentFrameBmp
-= (++mnFrameIndex < maFrames.size()) ? 
maFrames[mnFrameIndex].get() : nullptr;
-
-if (!pCurrentFrameBmp)
-{
-if (mnLoops == 1)
-{
-Stop();
-mbLoopTerminated = true;
-mnFrameIndex = nAnimCount - 1;
-maBitmapEx = maFrames[mnFrameIndex]->maBitmapEx;
-return;
-}
-else
-{
-if (mnLoops)
-mnLoops--;
-
-mnFrameIndex = 0;
-pCurrentFrameBmp = maFrames[mnFrameIndex].get();
-}
-}
-
-// Paint all views.
-std::for_each(maRenderers.cbegin(), maRenderers.cend(),
-  [this](const auto& pRenderer) { 
pRenderer->draw(mnFrameIndex); });
-/*
- * If a view is marked, remove the view, because
- * area of output lies out of display area of window.
- * Mark state is set from view itself.
- */
-auto removeStart
-= std::remove_if(maRenderers.begin(), maRenderers.end(),
- [](const auto& pRenderer) { return 
pRenderer->isMarked(); });
-maRenderers.erase(removeStart, maRenderers.cend());
-
-// stop or restart timer
-if (maRenderers.empty())
-Stop();
-else
-ImplRestartTimer(pCurrentFrameBmp->mnWait);
-}
+RenderNextFrameInAllRenderers();
 }
 else
 Stop();


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - comphelper/source

2022-10-28 Thread Noel Grandin (via logerrit)
 comphelper/source/misc/configuration.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 0d1eefda2a89d0dfb313c1f8fb388d95780ad126
Author: Noel Grandin 
AuthorDate: Thu Oct 27 18:24:51 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 28 11:08:33 2022 +0200

try to fix some shutdown crashes

seen in 7.4 crash reports

Change-Id: I4c88d485e2e1925895f23861232823ebe97c0c8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141936
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit b4b63d0c46979ad6b6aae5d6a4ea6672ea248e10)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141915

diff --git a/comphelper/source/misc/configuration.cxx 
b/comphelper/source/misc/configuration.cxx
index 097eabb6a345..1d6517fbb26d 100644
--- a/comphelper/source/misc/configuration.cxx
+++ b/comphelper/source/misc/configuration.cxx
@@ -128,7 +128,11 @@ public:
 std::scoped_lock aGuard(gMutex);
 gPropertyCache.clear();
 }
-virtual void SAL_CALL disposing(const css::lang::EventObject&) override {}
+virtual void SAL_CALL disposing(const css::lang::EventObject&) override
+{
+std::scoped_lock aGuard(gMutex);
+gPropertyCache.clear();
+}
 };
 
 } // namespace


Re: Master build fails since Update libxmlsec to 1.2.35

2022-10-28 Thread Miklos Vajna
Hi Jean-Baptiste,

On Fri, Oct 28, 2022 at 10:29:59AM +0200, Jean-Baptiste Faure 
 wrote:
> I have instead:
> 
> checking for nspr library >= 4.25.1... no
> checking for nss library >= 3.50.1... no
> checking for libgcrypt library >= 1.4.0... disabled
> checking for libgnutls library >= 2.8.0... disabled
> checking for mscrypto... disabled
> checking for mscng... disabled
> checking for default crypto library... configure: error: At least one crypto
> library should exist for xmlsec1

Yes, it *sounds like* Ubuntu is shipping an NSS with known security
problems or something like that. Which sounds scary, but perhaps I
mis-interpret the situation. :-)

There is now also feedback from Armin and Gabor, I would suggest to
continue the discussion at
 to keep everything at a
single place.

And sorry for the problem, I was not aware that Ubuntu is shipping an
old NSS which is so old that even RHEL7 counts as "new".

Thanks,

Miklos


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - oox/inc oox/source sd/qa

2022-10-28 Thread Sarper Akdemir (via logerrit)
 oox/inc/drawingml/textparagraph.hxx|3 -
 oox/inc/drawingml/textparagraphproperties.hxx  |1 
 oox/source/drawingml/textbody.cxx  |5 +-
 oox/source/drawingml/textparagraph.cxx |5 +-
 oox/source/drawingml/textparagraphproperties.cxx   |   10 +++-
 sd/qa/unit/data/pptx/tdf149961-autofitIndentation.pptx |binary
 sd/qa/unit/import-tests2.cxx   |   40 +
 7 files changed, 58 insertions(+), 6 deletions(-)

New commits:
commit b05c289cf0278ff9737dd928c5a97611e69219a8
Author: Sarper Akdemir 
AuthorDate: Mon Oct 24 01:50:36 2022 +0300
Commit: Andras Timar 
CommitDate: Fri Oct 28 10:57:20 2022 +0200

tdf#149961 pptx import: fix indents for autofitted texboxes

For autofitted textboxes, Impress scales the indents with the
text size while PowerPoint doesn't.

Scale the indents inversely propotional to autofit font
scale so that the visual appearance on import is similar to
PowerPoint.

Change-Id: I7876b35a1f4221789564fcf23ccbe3fe21db3d48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141717
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141939
Reviewed-by: Andras Timar 

diff --git a/oox/inc/drawingml/textparagraph.hxx 
b/oox/inc/drawingml/textparagraph.hxx
index 1f43249372a5..4920c99da7c5 100644
--- a/oox/inc/drawingml/textparagraph.hxx
+++ b/oox/inc/drawingml/textparagraph.hxx
@@ -77,7 +77,8 @@ public:
 const TextListStyle& rMasterTextListStyle,
 const TextListStyle& rTextListStyle,
 bool bFirst,
-float nDefaultCharHeight) const;
+float nDefaultCharHeight,
+sal_Int32 nAutofitFontScale) const;
 
 bool HasMathXml() const
 {
diff --git a/oox/inc/drawingml/textparagraphproperties.hxx 
b/oox/inc/drawingml/textparagraphproperties.hxx
index 8ea56a7b0736..083b61e37da7 100644
--- a/oox/inc/drawingml/textparagraphproperties.hxx
+++ b/oox/inc/drawingml/textparagraphproperties.hxx
@@ -103,6 +103,7 @@ public:
 const BulletList* 
pMasterBuList,
 bool bApplyBulletList,
 float fFontSize,
+sal_Int32 nAutofitFontScale = 
10,
 bool bPushDefaultValues = 
false ) const;
 
 /** Returns the largest character size of this paragraph. If possible the
diff --git a/oox/source/drawingml/textbody.cxx 
b/oox/source/drawingml/textbody.cxx
index 0f053ab6ad74..1be15c4f885d 100644
--- a/oox/source/drawingml/textbody.cxx
+++ b/oox/source/drawingml/textbody.cxx
@@ -65,7 +65,7 @@ void TextBody::insertAt(
 for (auto const& paragraph : maParagraphs)
 {
 paragraph->insertAt(rFilterBase, xText, xAt, rTextStyleProperties, 
aMasterTextStyle,
-maTextListStyle, (nIndex == 0), nCharHeight);
+maTextListStyle, (nIndex == 0), nCharHeight, 
getTextProperties().mnFontScale);
 ++nIndex;
 }
 }
@@ -148,7 +148,8 @@ void TextBody::ApplyStyleEmpty(
 float nCharHeight = 
xProps->getPropertyValue("CharHeight").get();
 TextParagraphProperties aParaProp;
 aParaProp.apply(*pTextParagraphStyle);
-aParaProp.pushToPropSet(&rFilterBase, xProps, aioBulletList, 
&pTextParagraphStyle->getBulletList(), true, nCharHeight, true);
+aParaProp.pushToPropSet(&rFilterBase, xProps, aioBulletList, 
&pTextParagraphStyle->getBulletList(),
+true, nCharHeight, 
getTextProperties().mnFontScale, true);
 }
 }
 
diff --git a/oox/source/drawingml/textparagraph.cxx 
b/oox/source/drawingml/textparagraph.cxx
index f91ee279bb3b..80f9fd3739b3 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -87,7 +87,8 @@ void TextParagraph::insertAt(
 const Reference < XTextCursor > &xAt,
 const TextCharacterProperties& rTextStyleProperties,
 const TextListStyle& rMasterTextListStyle,
-const TextListStyle& rTextListStyle, bool bFirst, float 
nDefaultCharHeight) const
+const TextListStyle& rTextListStyle, bool bFirst,
+float nDefaultCharHeight, sal_Int32 nAutofitFontScale) const
 {
 try {
 sal_Int32 nParagraphSize = 0;
@@ -175,7 +176,7 @@ void TextParagraph::insertAt(
 }
 
 float fCharacterSize = nCharHeight > 0 ? GetFontHeight ( 
nCharHeight ) : pTextParagraphStyle->getCharHeightPoints( 12 );
-aParaProp.pushToPropSet( &rFilterBase, xProps, aioBulletList, 
&pTextParagraphStyle->getBulle

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

2022-10-28 Thread Armin Le Grand (allotropia) (via logerrit)
 xmloff/source/draw/shapeexport.cxx |   42 +
 1 file changed, 20 insertions(+), 22 deletions(-)

New commits:
commit 470201f392a019ef6f2b9e70377e66e47e839494
Author: Armin Le Grand (allotropia) 
AuthorDate: Thu Oct 27 15:08:50 2022 +0200
Commit: Armin Le Grand 
CommitDate: Fri Oct 28 10:47:36 2022 +0200

tdf#145240 add flexibility to receiving PolyPolygons over UNO API

Make XMLShapeExport aware and use that PolyPolygons can be not
only in Bezier format, but also a sequence of Points

Change-Id: Ie00e87d35d4f8aa9d481b2800585c5a770bbbc0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141935
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/xmloff/source/draw/shapeexport.cxx 
b/xmloff/source/draw/shapeexport.cxx
index f975e4d1d1b2..f12958a9f650 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2321,37 +2321,35 @@ void XMLShapeExport::ImpExportPolygonShape(
 // prepare name (with most used)
 enum ::xmloff::token::XMLTokenEnum eName(XML_PATH);
 
-if(bBezier)
+uno::Any aAny( xPropSet->getPropertyValue("Geometry") );
+basegfx::B2DPolyPolygon aPolyPolygon;
+
+// tdf#145240 the Any can contain PolyPolygonBezierCoords or 
PointSequenceSequence
+// (see OWN_ATTR_BASE_GEOMETRY in 
SvxShapePolyPolygon::getPropertyValueImpl),
+// so be more flexible in interpreting it. Try to access bezier first:
 {
-// get PolygonBezier
-uno::Any aAny( xPropSet->getPropertyValue("Geometry") );
 auto pSourcePolyPolygon = 
o3tl::tryAccess(aAny);
+
 if(pSourcePolyPolygon && pSourcePolyPolygon->Coordinates.getLength())
 {
-const basegfx::B2DPolyPolygon aPolyPolygon(
-basegfx::utils::UnoPolyPolygonBezierCoordsToB2DPolyPolygon(
-*pSourcePolyPolygon));
+aPolyPolygon = 
basegfx::utils::UnoPolyPolygonBezierCoordsToB2DPolyPolygon(*pSourcePolyPolygon);
+}
+}
 
-// complex polygon shape, write as svg:d
-const OUString aPolygonString(
-basegfx::utils::exportToSvgD(
-aPolyPolygon,
-true,   // bUseRelativeCoordinates
-false,  // bDetectQuadraticBeziers: not used in old, 
but maybe activated now
-true)); // bHandleRelativeNextPointCompatible
+// if received no data, try to access point sequence second:
+if(0 == aPolyPolygon.count())
+{
+auto pSourcePolyPolygon = 
o3tl::tryAccess(aAny);
 
-// write point array
-mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_D, aPolygonString);
+if(pSourcePolyPolygon)
+{
+aPolyPolygon = 
basegfx::utils::UnoPointSequenceSequenceToB2DPolyPolygon(*pSourcePolyPolygon);
 }
 }
-else
-{
-// get non-bezier polygon
-uno::Any aAny( xPropSet->getPropertyValue("Geometry") );
-const basegfx::B2DPolyPolygon aPolyPolygon(
-
basegfx::utils::UnoPointSequenceSequenceToB2DPolyPolygon(*o3tl::doAccess(aAny)));
 
-if(!aPolyPolygon.areControlPointsUsed() && 1 == aPolyPolygon.count())
+if(aPolyPolygon.count())
+{
+if(!bBezier && !aPolyPolygon.areControlPointsUsed() && 1 == 
aPolyPolygon.count())
 {
 // simple polygon shape, can be written as svg:points sequence
 const basegfx::B2DPolygon& aPolygon(aPolyPolygon.getB2DPolygon(0));


Re: Master build fails since Update libxmlsec to 1.2.35

2022-10-28 Thread Jean-Baptiste Faure

Hi Miklos,

Le 28/10/2022 à 08:20, Miklos Vajna a écrit :

Hi Jean-Baptiste,

On Thu, Oct 27, 2022 at 09:31:46PM +0200, Jean-Baptiste Faure 
 wrote:

Since the commit "Update libxmlsec to 1.2.35"
https://git.libreoffice.org/core/+/19e998aa98d966cffca98bed9408d5758d91d9be
my master build fails with the following error message:


checking for default crypto library... configure: error: At least one crypto 
library should exist for xmlsec1
make[1]: *** [.../libo/master/external/xmlsec/ExternalProject_xmlsec.mk:47 : 
.../libo/master/workdir/ExternalProject/xmlsec/build] Erreur 1
make[1]: *** Attente des tâches non terminées
make: *** [Makefile:289 : build] Erreur 2


Could you please post your entire
workdir/UnpackedTarball/xmlsec/build.log?

It should have a section like this:

checking for nspr library >= 4.4.1... yes
checking for nss library >= 3.11.1... yes
checking for libgcrypt library >= 1.4.0... disabled
checking for libgnutls library >= 2.8.0... disabled
checking for mscrypto... not found
checking for mscng... not found
checking for default crypto library... yes ("nss")


I have instead:

checking for nspr library >= 4.25.1... no
checking for nss library >= 3.50.1... no
checking for libgcrypt library >= 1.4.0... disabled
checking for libgnutls library >= 2.8.0... disabled
checking for mscrypto... disabled
checking for mscng... disabled
checking for default crypto library... configure: error: At least one crypto library 
should exist for xmlsec1




which also means you should not hit the "no crypto library" error.

Potentially attaching your autogen.input and
workdir/UnpackedTarball/xmlsec/config.log would be useful as well.
Something must be special about your build, since my local build and
Jenkins is happy, but we don't know what that speciality is. :-)


Attached an 7z archive with the three files.

Thank you for your help.

Best regards.
JBF


--
Seuls des formats ouverts peuvent assurer la pérennité de vos documents.



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

2022-10-28 Thread Mike Kaganski (via logerrit)
 sfx2/source/view/viewsh.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit fb53e83372f139bceb5ebfaaae633875efeec240
Author: Mike Kaganski 
AuthorDate: Fri Oct 28 09:51:13 2022 +0300
Commit: Mike Kaganski 
CommitDate: Fri Oct 28 10:28:08 2022 +0200

Small simplification

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

diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index fe7991553afc..1363d07c1eb5 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -845,8 +845,8 @@ void SfxViewShell::Activate( bool bMDI )
 if ( bMDI )
 {
 SfxObjectShell *pSh = GetViewFrame()->GetObjectShell();
-if ( pSh->GetModel().is() )
-pSh->GetModel()->setCurrentController( 
GetViewFrame()->GetFrame().GetController() );
+if (const auto xModel = pSh->GetModel())
+xModel->setCurrentController(GetController());
 
 SetCurrentDocument();
 }


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

2022-10-28 Thread Caolán McNamara (via logerrit)
 vcl/osx/salframe.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit a19177768ce4b57d8b11f50785cf4ba6faf093a5
Author: Caolán McNamara 
AuthorDate: Thu Oct 27 20:48:50 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 28 10:05:23 2022 +0200

macos: set tooltip colors from something from the theme

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

diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 14d3b8314012..08d6339db062 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -1344,6 +1344,9 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 aStyleSettings.SetDialogColor(aWindowBackgroundColor);
 aStyleSettings.SetDialogTextColor(aControlTextColor);
 
+aStyleSettings.SetHelpColor(aControlBackgroundColor);
+aStyleSettings.SetHelpTextColor(aControlTextColor);
+
 // Set text colors for tabs according to OS settings
 
 aStyleSettings.SetTabTextColor(aControlTextColor);
commit 90c1a0ca864a686ca1d0846d9656415e94baf410
Author: Caolán McNamara 
AuthorDate: Thu Oct 27 20:19:11 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 28 10:05:08 2022 +0200

macos: use system linkColor for hyperlinks

so there is something readable under dark mode, use purpleColor like
gecko does for visited links as there isn't something available

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

diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 3af750df4c7a..14d3b8314012 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -1266,6 +1266,11 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
  
aStyleSettings.GetHighlightTextColor(), mpNSWindow ) );
 aStyleSettings.SetHighlightTextColor( aHighlightTextColor );
 
+aStyleSettings.SetLinkColor(getColor( [NSColor linkColor],
+   aStyleSettings.GetLinkColor(), 
mpNSWindow ) );
+aStyleSettings.SetVisitedLinkColor(getColor( [NSColor purpleColor],
+  
aStyleSettings.GetVisitedLinkColor(), mpNSWindow ) );
+
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
 Color aMenuHighlightColor( getColor( [NSColor selectedMenuItemColor],