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

2022-11-07 Thread Kevin Suo (via logerrit)
 sdext/source/pdfimport/test/testdocs/testSpace.pdf |binary
 sdext/source/pdfimport/test/tests.cxx  |   38 +
 sdext/source/pdfimport/tree/writertreevisiting.cxx |   28 +--
 3 files changed, 63 insertions(+), 3 deletions(-)

New commits:
commit c2e2997f452b93b400d541c2d0b2ee396a889007
Author: Kevin Suo 
AuthorDate: Wed Oct 19 19:08:27 2022 +0800
Commit: Noel Grandin 
CommitDate: Tue Nov 8 08:40:29 2022 +0100

sdext.pdfimport - Wirter: add handling for continuous space characters

This was done for Draw in sdext/source/pdfimport/tree/drawtreevisiting.cxx,
but was not done for Writer. Without this, continuous spaces in PDF will
show only one space on pdfimport using the Writer pdfimport filter.

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

diff --git a/sdext/source/pdfimport/test/testdocs/testSpace.pdf 
b/sdext/source/pdfimport/test/testdocs/testSpace.pdf
new file mode 100644
index ..3c94f31ea15b
Binary files /dev/null and b/sdext/source/pdfimport/test/testdocs/testSpace.pdf 
differ
diff --git a/sdext/source/pdfimport/test/tests.cxx 
b/sdext/source/pdfimport/test/tests.cxx
index 71661ae9e6d5..786815941445 100644
--- a/sdext/source/pdfimport/test/tests.cxx
+++ b/sdext/source/pdfimport/test/tests.cxx
@@ -841,6 +841,43 @@ namespace
 #endif
 }
 
+void testSpaces()
+{
+#if HAVE_FEATURE_POPPLER
+rtl::Reference xAdaptor(new 
pdfi::PDFIRawAdaptor(OUString(), getComponentContext()));
+xAdaptor->setTreeVisitorFactory(createWriterTreeVisitorFactory());
+
+OString aOutput;
+
xAdaptor->odfConvert(m_directories.getURLFromSrc(u"/sdext/source/pdfimport/test/testdocs/testSpace.pdf"),
+new OutputWrapString(aOutput),
+nullptr);
+xmlDocUniquePtr pXmlDoc(xmlParseDoc(reinterpret_cast(aOutput.getStr(;
+
+// Space test: there are 10 spaces, each space is expressed as a 
,
+// thus the 10th text:s should exist and the attribute "text:c" 
should be "1".
+OString xpath = 
"//draw:frame[@draw:z-index='1'][1]/draw:text-box/text:p/text:span/text:s[10]";
+OUString  sContent = getXPath(pXmlDoc, xpath, "c");
+CPPUNIT_ASSERT_EQUAL_MESSAGE(aOutput.getStr(), OUString("1"), 
sContent);
+
+// Tab test: there are 10 tabs. Text before and after the tabs are 
shown in different draw frames.
+// With the Liberation Serif font, the horizontal position of the 
first frame is 20.03mm and the
+// second frame is 94.12mm.
+xpath = "//draw:frame[@draw:z-index='2'][1]";
+sContent = getXPath(pXmlDoc, xpath, "transform");
+CPPUNIT_ASSERT_EQUAL_MESSAGE(aOutput.getStr(), 
OUString("translate( 20.03mm 25.05mm )"), sContent);
+xpath = "//draw:frame[@draw:z-index='3'][1]";
+sContent = getXPath(pXmlDoc, xpath, "transform");
+CPPUNIT_ASSERT_EQUAL_MESSAGE(aOutput.getStr(), 
OUString("translate( 94.12mm 25.05mm )"), sContent);
+
+// Non-breaking space test: there are 10 NBSpaces, which are 
treated as the same as normal space in PDF,
+// thus each is expressed as a .
+// The 10th text:s should exist and the attribute "text:c" should 
be "1".
+xpath = 
"//draw:frame[@draw:z-index='4'][1]/draw:text-box/text:p/text:span/text:s[10]";
+sContent = getXPath(pXmlDoc, xpath, "c");
+CPPUNIT_ASSERT_EQUAL_MESSAGE(aOutput.getStr(), OUString("1"), 
sContent);
+#endif
+}
+
 CPPUNIT_TEST_SUITE(PDFITest);
 CPPUNIT_TEST(testXPDFParser);
 CPPUNIT_TEST(testOdfWriterExport);
@@ -853,6 +890,7 @@ namespace
 CPPUNIT_TEST(testTdf78427_FontWeight_MyraidProSemibold);
 CPPUNIT_TEST(testTdf143959_nameFromFontFile);
 CPPUNIT_TEST(testTdf104597_textrun);
+CPPUNIT_TEST(testSpaces);
 CPPUNIT_TEST_SUITE_END();
 };
 
diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx 
b/sdext/source/pdfimport/tree/writertreevisiting.cxx
index deabf365088b..510689be1588 100644
--- a/sdext/source/pdfimport/tree/writertreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx
@@ -81,7 +81,11 @@ void WriterXmlEmitter::visit( TextElement& elem, const 
std::list< std::unique_pt
 if( elem.Text.isEmpty() )
 return;
 
-PropertyMap aProps;
+PropertyMap aProps = {};
+const sal_Unicode strSpace = 0x0020;
+const sal_Unicode strNbSpace = 0x00A0;
+const sal_Unicode tabSpace = 0x0009;
+
 if( elem.StyleId != -1 )
 {
 aProps[ OUString( "text:style-name" ) ] =
@@ -111,8 +115,26 @@ void WriterXmlEmitter::visit( TextElement& elem, const 
std::list< std::unique_pt
 str = ::comphelper::string::reverseString(s

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

2022-11-07 Thread Miklos Vajna (via logerrit)
 download.lst |4 +-
 external/xmlsec/UnpackedTarball_xmlsec.mk|3 -
 external/xmlsec/fix-size_max-412.patch.1 |   31 ---
 external/xmlsec/old-nss.patch.1  |   13 ---
 external/xmlsec/remove-unnecessary-macro-417.patch.1 |   24 --
 5 files changed, 2 insertions(+), 73 deletions(-)

New commits:
commit 34c7d169a248578d953661217144f2dda9831cb4
Author: Miklos Vajna 
AuthorDate: Mon Nov 7 20:14:26 2022 +0100
Commit: Miklos Vajna 
CommitDate: Tue Nov 8 08:06:44 2022 +0100

Update libxmlsec to 1.2.36

- remove the fix-size_max-412.patch.1 and
  remove-unnecessary-macro-417.patch.1 backports
- drop old-nss.patch.1, which is now upstream

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

diff --git a/download.lst b/download.lst
index 71ee55b138c4..98b46b17eb59 100644
--- a/download.lst
+++ b/download.lst
@@ -158,8 +158,8 @@ export LIBTOMMATH_SHA256SUM := 
083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304
 export LIBTOMMATH_TARBALL := ltm-1.0.zip
 export LIBWEBP_SHA256SUM := 
7bf5a8a28cc69bcfa8cb214f2c3095703c6b73ac5fba4d5480c205331d9494df
 export LIBWEBP_TARBALL := libwebp-1.2.4.tar.gz
-export XMLSEC_SHA256SUM := 
a39f86f6fe8e8cdc998b9a911ef1fae03f57a9ef99c2b704cd492007a52ac223
-export XMLSEC_TARBALL := xmlsec1-1.2.35.tar.gz
+export XMLSEC_SHA256SUM := 
f0d97e008b211d85808f038326d42e7f5cf46648e176f07406a323e7e8d41c80
+export XMLSEC_TARBALL := xmlsec1-1.2.36.tar.gz
 export LIBXML_SHA256SUM := 
5d2cc3d78bec3dbe212a9d7fa629ada25a7da928af432c93060ff5c17ee28a9c
 export LIBXML_VERSION_MICRO := 3
 export LIBXML_TARBALL := libxml2-2.10.$(LIBXML_VERSION_MICRO).tar.xz
diff --git a/external/xmlsec/UnpackedTarball_xmlsec.mk 
b/external/xmlsec/UnpackedTarball_xmlsec.mk
index b64fe48e6161..3ad978cdb829 100644
--- a/external/xmlsec/UnpackedTarball_xmlsec.mk
+++ b/external/xmlsec/UnpackedTarball_xmlsec.mk
@@ -8,9 +8,6 @@
 #
 
 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/fix-size_max-412.patch.1 
b/external/xmlsec/fix-size_max-412.patch.1
deleted file mode 100644
index 5b4e2b69d960..
--- a/external/xmlsec/fix-size_max-412.patch.1
+++ /dev/null
@@ -1,31 +0,0 @@
-From 3445fbfe1aceb88a255b90ee1c06df2d05c188b0 Mon Sep 17 00:00:00 2001
-From: lsh123 
-Date: Mon, 24 Oct 2022 17:38:59 -0700
-Subject: [PATCH] fix size_max (#412)
-

- src/cast_helpers.h | 6 +-
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/src/cast_helpers.h b/src/cast_helpers.h
-index 67330822..2b670ad1 100644
 a/src/cast_helpers.h
-+++ b/src/cast_helpers.h
-@@ -17,13 +17,9 @@
- #endif /* XMLSEC_PRIVATE */
- 
- #include 
-+#include 
- #include "errors_helpers.h"
- 
--/* if it is missing */
--#ifndef SIZE_MAX
--#define SIZE_MAX (~(size_t)0)
--#endif /* SIZE_MAX */
--
- /**
-  * Helpers for printing out enum values (mostly debugging).
-  */
--- 
-2.38.0.rc2
-
diff --git a/external/xmlsec/old-nss.patch.1 b/external/xmlsec/old-nss.patch.1
deleted file mode 100644
index 2fc16f30f2ae..
--- a/external/xmlsec/old-nss.patch.1
+++ /dev/null
@@ -1,13 +0,0 @@
 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"
diff --git a/external/xmlsec/remove-unnecessary-macro-417.patch.1 
b/external/xmlsec/remove-unnecessary-macro-417.patch.1
deleted file mode 100644
index 18cd5252b68e..
--- a/external/xmlsec/remove-unnecessary-macro-417.patch.1
+++ /dev/null
@@ -1,24 +0,0 @@
-From 3da1d53fce229d8a72d41b68aacbc115574012e0 Mon Sep 17 00:00:00 2001
-From: lsh123 
-Date: Tue, 25 Oct 2022 05:47:51 -0700
-Subject: [PATCH] remove unnecessary macro (#417)
-

- configure.ac | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 67c8e50b..bb5d3e4b 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -65,7 +65,6 @@ AM_CONDITIONAL(HAS_XSLTPROC, [test x"$XSLTPROC" != x])
- 
- dnl Checks for header files.
- AC_HEADER_DIRENT
--AC_CHECK_INCLUDES_DEFAULT
- 
- 
- dnl ==
--- 
-2.38.0.rc2
-


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

2022-11-07 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/htmlexport/htmlexport.cxx|4 ++--
 sw/qa/extras/odfexport/odfexport.cxx  |4 ++--
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx  |4 ++--
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx|4 ++--
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx|   26 +-
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx|6 +++---
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx|6 +++---
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx|4 ++--
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx|4 ++--
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx |2 +-
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx |6 +++---
 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx |   14 +++---
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx |2 +-
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx |4 ++--
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |6 +++---
 sw/qa/extras/rtfexport/rtfexport.cxx  |2 +-
 sw/qa/extras/rtfexport/rtfexport3.cxx |6 +++---
 sw/qa/extras/rtfexport/rtfexport4.cxx |6 +++---
 sw/qa/extras/ww8export/ww8export2.cxx |   14 +++---
 sw/qa/extras/ww8export/ww8export3.cxx |   10 +-
 sw/qa/inc/swmodeltestbase.hxx |7 +++
 sw/qa/unit/swmodeltestbase.cxx|2 +-
 22 files changed, 71 insertions(+), 72 deletions(-)

New commits:
commit 24c49a6e2b9f2609b060d87a4a3253803c62cc5a
Author: Xisco Fauli 
AuthorDate: Tue Nov 8 02:01:15 2022 +0100
Commit: Xisco Fauli 
CommitDate: Tue Nov 8 07:37:09 2022 +0100

swmodeltestbase: make mbExported private

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

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 9900f4886011..3ccf3e487252 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -709,7 +709,7 @@ DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testReqIfOleImg, 
"reqif-ole-img.xhtml")
 // Check alternate text (it was empty, for export the 'alt' attribute was 
used).
 CPPUNIT_ASSERT_EQUAL(OUString("OLE Object"), 
getProperty(xObject, "Title").trim());
 
-if (!mbExported)
+if (!isExported())
 return;
 
 // "type" attribute was missing for the inner  element.
@@ -877,7 +877,7 @@ DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testReqIfOle2, 
"reqif-ole2.xhtml")
 // document storage, but the embedded object already opened it, so an
 // exception of type com.sun.star.io.IOException was thrown.
 
-if (mbExported)
+if (isExported())
 {
 // Check that the replacement graphic is exported at RTF level.
 SvMemoryStream aStream;
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index ec034b7f95b7..b1df8b80f0e5 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1813,7 +1813,7 @@ DECLARE_ODFEXPORT_TEST(testBtlrFrame, "btlr-frame.odt")
 CPPUNIT_ASSERT(pFlyFrame);
 CPPUNIT_ASSERT(pFlyFrame->IsVertLRBT());
 
-if (!mbExported)
+if (!isExported())
 // Not yet exported, don't modify the doc model for test purposes.
 return;
 
@@ -2321,7 +2321,7 @@ DECLARE_ODFEXPORT_TEST(testEmbeddedPdf, 
"embedded-pdf.odt")
 // This was image/x-vclgraphic, not exposing the info that the image is a 
PDF one.
 CPPUNIT_ASSERT_EQUAL(OUString("application/pdf"), 
getProperty(xGraphic, "MimeType"));
 
-if (mbExported)
+if (isExported())
 {
 uno::Sequence aArgs{ uno::Any(maTempFile.GetURL()) };
 uno::Reference 
xNameAccess(m_xSFactory->createInstanceWithArguments("com.sun.star.packages.zip.ZipFileAccess",
 aArgs), uno::UNO_QUERY);
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 468b60dee8c1..bf3bf059e8fc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -295,7 +295,7 @@ DECLARE_OOXMLEXPORT_TEST(testDropdownInCell, 
"dropdown-in-cell.docx")
 uno::Reference xTextRangeCompare(xCell, 
uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(sal_Int16(0), 
xTextRangeCompare->compareRegionStarts(xAnchor, xCell));
 }
-else if (!mbExported)
+else if (!isExported())
 {
 // ComboBox was imported as DropDown text field
 uno::Reference 
xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
@@ -925,7 +925,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf97090, "tdf97090.docx")
 
 DECLARE_OOXMLEXPORT_TEST(testTdf89791, "tdf89791.docx")
 {
-if (mbExported)
+if (isExported())
 {
 uno::Reference xNameAccess = 
packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
 maTempFile.GetURL());
 CPPUNIT_ASSERT_EQUAL(false, 
bool(xNameAccess->hasByName("docProps/cust

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

2022-11-07 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/globalfilter/globalfilter.cxx|   12 ++--
 sw/qa/extras/mailmerge/mailmerge.cxx  |4 +
 sw/qa/extras/odfimport/odfimport.cxx  |1 
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx|5 -
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx|6 --
 sw/qa/extras/ooxmlexport/ooxmlexport18.cxx|3 -
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |1 
 sw/qa/extras/uiwriter/uiwriter4.cxx   |   75 +++---
 sw/qa/extras/uiwriter/uiwriter6.cxx   |   44 ++-
 sw/qa/extras/uiwriter/uiwriter7.cxx   |   27 ++---
 sw/qa/filter/ww8/ww8.cxx  |2 
 sw/qa/inc/swmodeltestbase.hxx |2 
 sw/qa/uibase/uiview/uiview.cxx|7 --
 sw/qa/unit/swmodeltestbase.cxx|   17 +
 14 files changed, 73 insertions(+), 133 deletions(-)

New commits:
commit cf1cd2659f08f7c16a6f32142d424b8df9fab393
Author: Xisco Fauli 
AuthorDate: Mon Nov 7 17:57:05 2022 +0100
Commit: Xisco Fauli 
CommitDate: Tue Nov 8 07:34:25 2022 +0100

swmodeltestbase: remove duplicated method

save needs to set mbExported to true, otherwise
parseExport returns nullptr
Change-Id: I1ba779e0ac0f20663fb722df16210ca144717479

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

diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx 
b/sw/qa/extras/globalfilter/globalfilter.cxx
index ef58560b49f3..c50e31f499b2 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -978,7 +978,7 @@ void Test::testODF13()
 reload("writer8", nullptr);
 
 // check XML
-xmlDocUniquePtr pContentXml = parseExportInternal(maTempFile.GetURL(), 
"content.xml");
+xmlDocUniquePtr pContentXml = parseExport("content.xml");
 assertXPath(pContentXml, 
"/office:document-content/office:automatic-styles/style:style/style:paragraph-properties[@style:contextual-spacing='true']");
 assertXPath(pContentXml, 
"/office:document-content/office:body/office:text/text:p/office:annotation/meta:creator-initials");
 assertXPath(pContentXml, 
"/office:document-content/office:body/office:text/text:p/office:annotation/loext:sender-initials",
 0);
@@ -986,7 +986,7 @@ void Test::testODF13()
 assertXPath(pContentXml, 
"/office:document-content/office:body/office:text/text:illustration-index/text:illustration-index-source/text:illustration-index-entry-template/loext:index-entry-link-start",
 0);
 assertXPath(pContentXml, 
"/office:document-content/office:body/office:text/text:illustration-index/text:illustration-index-source/text:illustration-index-entry-template/text:index-entry-link-end");
 assertXPath(pContentXml, 
"/office:document-content/office:body/office:text/text:illustration-index/text:illustration-index-source/text:illustration-index-entry-template/loext:index-entry-link-end",
 0);
-xmlDocUniquePtr pStylesXml = parseExportInternal(maTempFile.GetURL(), 
"styles.xml");
+xmlDocUniquePtr pStylesXml = parseExport("styles.xml");
 assertXPath(pStylesXml, 
"/office:document-styles/office:master-styles/style:master-page/style:header-first");
 assertXPath(pStylesXml, 
"/office:document-styles/office:master-styles/style:master-page/loext:header-first",
 0);
 assertXPath(pStylesXml, 
"/office:document-styles/office:master-styles/style:master-page/style:footer-first");
@@ -1011,7 +1011,7 @@ void Test::testODF13()
 xStorable->storeToURL(maTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
 
 // check XML
-xmlDocUniquePtr pContentXml = parseExportInternal(maTempFile.GetURL(), 
"content.xml");
+xmlDocUniquePtr pContentXml = parseExport("content.xml");
 assertXPath(pContentXml, 
"/office:document-content/office:automatic-styles/style:style/style:paragraph-properties[@loext:contextual-spacing='true']");
 assertXPath(pContentXml, 
"/office:document-content/office:body/office:text/text:p/office:annotation/loext:sender-initials");
 assertXPath(pContentXml, 
"/office:document-content/office:body/office:text/text:p/office:annotation/meta:creator-initials",
 0);
@@ -1019,7 +1019,7 @@ void Test::testODF13()
 assertXPath(pContentXml, 
"/office:document-content/office:body/office:text/text:illustration-index/text:illustration-index-source/text:illustration-index-entry-template/text:index-entry-link-start",
 0);
 assertXPath(pContentXml, 
"/office:document-content/office:body/office:text/text:illustration-index/text:illustration-index-source/text:illustration-index-entry-template/loext:index-entry-link-end");
 assertXPath(pContentXml, 
"/office:document-content/office:body/office:text/text:illustration-index/text:illustration-index-source/text:illustratio

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

2022-11-07 Thread Stephan Bergmann (via logerrit)
 include/rtl/ustring.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c8eaebecd3af29c031c26142c9d3f7d7abf75b0d
Author: Stephan Bergmann 
AuthorDate: Mon Nov 7 15:11:07 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 8 07:15:28 2022 +0100

Avoid an explicit static_cast

...when shoehorning a std::size_t value into sal_Int32, to not suppress
potential warnings from tools like 
-fsanitize=implicit-signed-integer-truncation
and -fsanitize=implicit-integer-sign-change

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

diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index d7d529f55e3f..16ccecedd7a9 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -163,7 +163,7 @@ public:
 /**
   make it easier to pass to OUStringBuffer and similar without 
casting/converting
 */
-constexpr std::u16string_view asView() const { return {pData->buffer, 
static_cast(pData->length)}; }
+constexpr std::u16string_view asView() const { return 
std::u16string_view(pData->buffer, pData->length); }
 
 inline operator const OUString&() const;
 


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

2022-11-07 Thread Stephan Bergmann (via logerrit)
 include/rtl/ustring.hxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 1ec337b100755f7ad8cd5cb2c8acb072c6f18964
Author: Stephan Bergmann 
AuthorDate: Mon Nov 7 15:06:03 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 8 07:15:08 2022 +0100

Remove some trailing whitespace noise

...from ustring.hxx, in preparation of using its OUStringConstExpr as a
blueprint for a corresponding OStringConstExpr in string.hxx

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

diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 69575289f6f5..d7d529f55e3f 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -152,7 +152,7 @@ class OUStringConstExpr
 public:
 template constexpr OUStringConstExpr(OUStringLiteral 
const & literal):
 pData(const_cast(&literal.str)) {}
-
+
 // prevent mis-use
 template constexpr OUStringConstExpr(OUStringLiteral && 
literal)
 = delete;
@@ -3388,7 +3388,6 @@ inline std::basic_ostream & operator <<(
 return stream << OUString( std::move(concat) );
 }
 
-
 /// @endcond
 #endif
 


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

2022-11-07 Thread Stephan Bergmann (via logerrit)
 vcl/source/fontsubset/cff.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e0dca3d96cdbbc265f5014b4b9344740c6a72cf3
Author: Stephan Bergmann 
AuthorDate: Mon Nov 7 14:27:05 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 8 07:14:47 2022 +0100

Fix string comparisons

As discussed in the comments at


"tdf#123234: Fix subsetting CFF deprecated endchar", this probably happened 
to
work most of the time "because pGlyphName presumably /does/ point at 
elements of
the pStringIds array (or the ".notdef" literal near the top of
CffSubsetterContext:getGlyphName body), and compilers generally /do/ 
deduplicate
string literals at least per TU."  But at least the "sterling" literal in
pStandardEncoding does not have a matching literal in pStringIds, so that 
could
never have matched pGlyphName via ==.

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

diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index c398ccb18b98..371c3bbc0682 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -1694,12 +1694,12 @@ bool CffSubsetterContext::getBaseAccent(ValType aBase, 
ValType aAccent, int* nBa
 for (int i = 0; i < mnCharStrCount; i++)
 {
 const char* pGlyphName = getGlyphName(i);
-if (pGlyphName == pStandardEncoding[int(aBase)])
+if (std::strcmp(pGlyphName, pStandardEncoding[int(aBase)]) == 0)
 {
 *nBase = i;
 bBase = true;
 }
-if (pGlyphName == pStandardEncoding[int(aAccent)])
+if (std::strcmp(pGlyphName, pStandardEncoding[int(aAccent)]) == 0)
 {
 *nAccent = i;
 bAccent = true;


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

2022-11-07 Thread Stephan Bergmann (via logerrit)
 include/o3tl/restoreguard.hxx |   40 
 vcl/source/fontsubset/cff.cxx |7 +++
 2 files changed, 43 insertions(+), 4 deletions(-)

New commits:
commit 2469c623d7985e9e5db54ed8f96df02219def74d
Author: Stephan Bergmann 
AuthorDate: Mon Nov 7 10:58:08 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 8 07:14:21 2022 +0100

Introduce o3tl::RestoreGuard

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

diff --git a/include/o3tl/restoreguard.hxx b/include/o3tl/restoreguard.hxx
new file mode 100644
index ..19075be3dcea
--- /dev/null
+++ b/include/o3tl/restoreguard.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+
+// A convenience guard class that captures a given object's value on guard 
construction and restores
+// it on guard destruction:
+namespace o3tl
+{
+template  class RestoreGuard
+{
+public:
+RestoreGuard(T& object)
+: object_(object)
+, value_(object)
+{
+}
+
+~RestoreGuard() { object_ = value_; }
+
+private:
+RestoreGuard(RestoreGuard&) = delete;
+RestoreGuard(RestoreGuard&&) = delete;
+void operator=(RestoreGuard&) = delete;
+void operator=(RestoreGuard&&) = delete;
+
+T& object_;
+T value_;
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 6d1cac5040b5..c398ccb18b98 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -24,6 +24,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -1541,8 +1542,8 @@ const char* CffSubsetterContext::getString( int nStringID)
 return pStringIds[ nStringID];
 
 // else get the string from the StringIndex table
-const U8* pReadPtr = mpReadPtr;
-const U8* pReadEnd = mpReadEnd;
+o3tl::RestoreGuard pReadPtr(mpReadPtr);
+o3tl::RestoreGuard pReadEnd(mpReadEnd);
 nStringID -= nStdStrings;
 int nLen = seekIndexData( mnStringIdxBase, nStringID);
 // assert( nLen >= 0);
@@ -1559,8 +1560,6 @@ const char* CffSubsetterContext::getString( int nStringID)
 aNameBuf[i] = *(mpReadPtr++);
 aNameBuf[ nLen] = '\0';
 }
-mpReadPtr = pReadPtr;
-mpReadEnd = pReadEnd;
 return aNameBuf;
 }
 


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

2022-11-07 Thread Stephan Bergmann (via logerrit)
 vcl/source/app/svmain.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 7f8bca6b9144cf820aaeae0fe9a15c6becfd1ddc
Author: Stephan Bergmann 
AuthorDate: Mon Nov 7 23:12:03 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 8 07:13:59 2022 +0100

Revert "give main thread a name"

This reverts commit 4668bfe4f64acfb17da5efbb759407664b407d81.  As it called
osl_setThreadName on the main thread, it caused tools like pstree on Linux 
to
confusingly report soffice.bin as VCL Main instead.

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

diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 6f76c99b6a36..7c5505f364cb 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -302,8 +302,6 @@ bool InitVCL()
 return true;
 }
 
-osl_setThreadName("VCL Main");
-
 if( pExceptionHandler != nullptr )
 return false;
 


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

2022-11-07 Thread Stephan Bergmann (via logerrit)
 vcl/source/fontsubset/cff.cxx |   10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit bd63364abe775d1e71ad93fb69b577f019c3a257
Author: Stephan Bergmann 
AuthorDate: Mon Nov 7 11:00:17 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 8 07:13:34 2022 +0100

CffSubsetterContext::getString never returns null

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

diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index bd63eafc21fe..6d1cac5040b5 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -1677,12 +1677,10 @@ const char* CffSubsetterContext::getGlyphName( int 
nGlyphIndex)
 else {  // glyph name from string table
 const char* pSidName = getString( nSID);
 // check validity of glyph name
-if( pSidName) {
-const char* p = pSidName;
-while( (*p >= '0') && (*p <= 'z')) ++p;
-if( (p >= pSidName+1) && (*p == '\0'))
-pGlyphName = pSidName;
-}
+const char* p = pSidName;
+while( (*p >= '0') && (*p <= 'z')) ++p;
+if( (p >= pSidName+1) && (*p == '\0'))
+pGlyphName = pSidName;
 // if needed invent a fallback name
 if( pGlyphName != pSidName)
  sprintf( aDefaultGlyphName, "bad%03d", nSID);


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

2022-11-07 Thread Balazs Varga (via logerrit)
 sc/source/filter/xml/xmlrowi.cxx |   30 +++---
 1 file changed, 19 insertions(+), 11 deletions(-)

New commits:
commit b57307e8f3553fcb292c9c11fcf58bcef3a6cb3c
Author: Balazs Varga 
AuthorDate: Mon Nov 7 12:44:38 2022 +0100
Commit: Eike Rathke 
CommitDate: Tue Nov 8 00:11:32 2022 +0100

Related: tdf#124098: sc import, more optimization for row heights

follow-up for: e8fae4d0fb2994a7b4ac00e9da35e1deccb296dd
(tdf#124098: sc, ods import: do not recalculate row heights)

Change-Id: Id80c0c6bfbc437f8b2a480c590e407e84b5d7b64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142376
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index cf4f41d682d9..d510d5557eed 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -168,7 +168,7 @@ void SAL_CALL 
ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/)
 if (!xRowProperties.is())
 return;
 
-bool bHasRowOptimalHeight = false;
+XMLTableStyleContext* ptmpStyle = nullptr;
 
 if (!sStyleName.isEmpty())
 {
@@ -188,13 +188,8 @@ void SAL_CALL 
ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/)
 pStyle->SetLastSheet(nSheet);
 }
 
-// check that, we already have valid optimal row heights
-XMLPropertyState* pHeight = 
pStyle->FindProperty(CTF_SC_ROWHEIGHT);
-XMLPropertyState* pOptimalHeight = 
pStyle->FindProperty(CTF_SC_ROWOPTIMALHEIGHT);
-if (!pHeight && pOptimalHeight && 
::cppu::any2bool(pOptimalHeight->maValue))
-{
-bHasRowOptimalHeight = true;
-}
+// for later checking of optimal row height
+ptmpStyle = pStyle;
 }
 }
 }
@@ -229,9 +224,22 @@ void SAL_CALL 
ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/)
 rRecalcRanges.emplace_back(0, pDoc->MaxRow());
 }
 rRecalcRanges.at(nSheet).mnTab = nSheet;
-if (bHasRowOptimalHeight && nCurrentRow > 200) {
-rRecalcRanges.at(nSheet).maRanges.setFalse(nFirstRow, nCurrentRow);
-} else {
+
+// check that, we already have valid optimal row heights
+if (nCurrentRow > 200 && ptmpStyle && 
!ptmpStyle->FindProperty(CTF_SC_ROWHEIGHT))
+{
+XMLPropertyState* pOptimalHeight = 
ptmpStyle->FindProperty(CTF_SC_ROWOPTIMALHEIGHT);
+if (pOptimalHeight && ::cppu::any2bool(pOptimalHeight->maValue))
+{
+rRecalcRanges.at(nSheet).maRanges.setFalse(nFirstRow, 
nCurrentRow);
+}
+else
+{
+rRecalcRanges.at(nSheet).maRanges.setTrue(nFirstRow, 
nCurrentRow);
+}
+}
+else
+{
 rRecalcRanges.at(nSheet).maRanges.setTrue(nFirstRow, nCurrentRow);
 }
 }


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

2022-11-07 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/xlstyle.cxx |8 
 sc/source/filter/inc/xlstyle.hxx   |4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit f8ad054de38a6592b60ab850e938e6e81ec4cc0d
Author: Caolán McNamara 
AuthorDate: Mon Nov 7 12:55:33 2022 +
Commit: Eike Rathke 
CommitDate: Tue Nov 8 00:05:53 2022 +0100

tdf#151610 chart colors should be the same regardless of the desktop theme

Change-Id: I47ae80f744401bd13452ec8879cb8f420e35b9ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142383
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/sc/source/filter/excel/xlstyle.cxx 
b/sc/source/filter/excel/xlstyle.cxx
index b5de24df06a4..886a3a657617 100644
--- a/sc/source/filter/excel/xlstyle.cxx
+++ b/sc/source/filter/excel/xlstyle.cxx
@@ -147,12 +147,12 @@ Color XclDefaultPalette::GetDefColor( sal_uInt16 
nXclIndex ) const
 else switch( nXclIndex )
 {
 case EXC_COLOR_WINDOWTEXT3:
-case EXC_COLOR_WINDOWTEXT:
-case EXC_COLOR_CHWINDOWTEXT:nColor = mnWindowText;  break;
+case EXC_COLOR_WINDOWTEXT:  nColor = mnWindowText;  break;
 case EXC_COLOR_WINDOWBACK3:
-case EXC_COLOR_WINDOWBACK:
-case EXC_COLOR_CHWINDOWBACK:nColor = mnWindowBack;  break;
+case EXC_COLOR_WINDOWBACK:  nColor = mnWindowBack;  break;
 case EXC_COLOR_BUTTONBACK:  nColor = mnFaceColor;   break;
+case EXC_COLOR_CHWINDOWTEXT:nColor = COL_BLACK; break;
+case EXC_COLOR_CHWINDOWBACK:nColor = COL_WHITE; break;
 case EXC_COLOR_CHBORDERAUTO:nColor = COL_BLACK; break;  // 
TODO: really always black?
 case EXC_COLOR_NOTEBACK:nColor = mnNoteBack;break;
 case EXC_COLOR_NOTETEXT:nColor = mnNoteText;break;
diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx
index 3581f77f0162..69f4f9dabc15 100644
--- a/sc/source/filter/inc/xlstyle.hxx
+++ b/sc/source/filter/inc/xlstyle.hxx
@@ -207,8 +207,8 @@ const sal_uInt16 EXC_COLOR_WINDOWBACK3  = 25;   /// 
System window backgr
 const sal_uInt16 EXC_COLOR_WINDOWTEXT   = 64;   /// System window text 
color (>=BIFF5).
 const sal_uInt16 EXC_COLOR_WINDOWBACK   = 65;   /// System window 
background color (>=BIFF5).
 const sal_uInt16 EXC_COLOR_BUTTONBACK   = 67;   /// System button 
background color (face color).
-const sal_uInt16 EXC_COLOR_CHWINDOWTEXT = 77;   /// System window text 
color (BIFF8 charts).
-const sal_uInt16 EXC_COLOR_CHWINDOWBACK = 78;   /// System window 
background color (BIFF8 charts).
+const sal_uInt16 EXC_COLOR_CHWINDOWTEXT = 77;   /// Chart window text 
color (BIFF8 charts).
+const sal_uInt16 EXC_COLOR_CHWINDOWBACK = 78;   /// Chart window 
background color (BIFF8 charts).
 const sal_uInt16 EXC_COLOR_CHBORDERAUTO = 79;   /// Automatic frame 
border for series (BIFF8 charts).
 const sal_uInt16 EXC_COLOR_NOTEBACK = 80;   /// Note background 
color.
 const sal_uInt16 EXC_COLOR_NOTETEXT = 81;   /// Note text color.


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

2022-11-07 Thread Justin Luth (via logerrit)
 sc/source/ui/view/tabview.cxx |   22 +-
 1 file changed, 21 insertions(+), 1 deletion(-)

New commits:
commit e6bc90aa8a959e08abf4b5c10d793ff9a549efe4
Author: Justin Luth 
AuthorDate: Tue Nov 1 19:33:33 2022 -0400
Commit: Eike Rathke 
CommitDate: Mon Nov 7 22:22:33 2022 +0100

tdf#112641 sc: always allow freezing at cell A1

For some good reasons, freezing rows and columns
doesn't work unless that cell is currently visible,
and that is almost guaranteed anyway since the
hisorical way of doing it was at the cursor.

However, since LO 5.2 there are menu and UNO commands
to freeze the first row and the first column.
It would be nice if these would work regardless
of where you are in the spreadsheet
(and keep you at that position too).

[If there is already a SPLIT (not freeze),
 then the bottom right quadrant is still
 the "position" that is maintained.]

[This "works" if the first row/column is hidden.
 When unhidden, the freeze will be in effect.
 I assume that is reasonable and doesn't need
 to be avoided for any reason.]

Change-Id: Iddc5d63adaad7ecfe6b5fb9b60ff3ec6274b0756
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142128
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Eike Rathke 

diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 0371b9f40940..94a9aa144ad6 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1932,6 +1932,7 @@ void ScTabView::FreezeSplitters( bool bFreeze, 
SplitMethod eSplitMethod, SCCOLRO
 vcl::Window* pWin = pGridWin[ePos];
 
 bool bLayoutRTL = aViewData.GetDocument().IsLayoutRTL( 
aViewData.GetTabNo() );
+bool bUpdateFix = false;
 
 if ( bFreeze )
 {
@@ -2015,6 +2016,15 @@ void ScTabView::FreezeSplitters( bool bFreeze, 
SplitMethod eSplitMethod, SCCOLRO
 aViewData.SetPosY(SC_SPLIT_TOP, nTopPos);
 aViewData.SetPosY(SC_SPLIT_BOTTOM, nBottomPos);
 }
+else if (nPosY == 1 && eSplitMethod == SC_SPLIT_METHOD_ROW)
+{
+// Freeze first row, but row 1 is not visible on screen now == 
special handling
+aViewData.SetVSplitMode(SC_SPLIT_FIX);
+aViewData.SetFixPosY(nPosY);
+
+aViewData.SetPosY(SC_SPLIT_TOP, 0);
+bUpdateFix = true;
+}
 else
 aViewData.SetVSplitMode(SC_SPLIT_NONE);
 }
@@ -2040,6 +2050,16 @@ void ScTabView::FreezeSplitters( bool bFreeze, 
SplitMethod eSplitMethod, SCCOLRO
 aViewData.SetPosX(SC_SPLIT_LEFT, nLeftPos);
 aViewData.SetPosX(SC_SPLIT_RIGHT, nRightPos);
 }
+else if (nPosX == 1 && eSplitMethod == SC_SPLIT_METHOD_COL)
+{
+// Freeze first column, but col A is not visible on screen now 
== special handling
+aViewData.SetHSplitMode(SC_SPLIT_FIX);
+aViewData.SetFixPosX(nPosX);
+
+aViewData.SetPosX(SC_SPLIT_RIGHT, 
aViewData.GetPosX(SC_SPLIT_LEFT));
+aViewData.SetPosX(SC_SPLIT_LEFT, 0);
+bUpdateFix = true;
+}
 else
 aViewData.SetHSplitMode( SC_SPLIT_NONE );
 }
@@ -2059,7 +2079,7 @@ void ScTabView::FreezeSplitters( bool bFreeze, 
SplitMethod eSplitMethod, SCCOLRO
 p->SetMapMode( p->GetDrawMapMode() );
 SetNewVisArea();
 
-RepeatResize(false);
+RepeatResize(bUpdateFix);
 
 UpdateShow();
 PaintLeft();


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - vcl/unx

2022-11-07 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkframe.cxx |   31 ---
 1 file changed, 16 insertions(+), 15 deletions(-)

New commits:
commit 2d0e324eb9deaf113d63c9ff10d3d017befa665b
Author: Caolán McNamara 
AuthorDate: Fri Nov 4 10:13:58 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Nov 7 20:50:16 2022 +0100

Resolves: tdf#151509 don't overwrite geometry for system childs

Change-Id: I5ad73d0bd138b2ba1b99d63bca97773f43e39606
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142277
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 3684dd560593..0a8b8021c127 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -3149,7 +3149,7 @@ gboolean GtkSalFrame::signalButton(GtkWidget*, 
GdkEventButton* pEvent, gpointer
 if (bDifferentEventWindow)
 translate_coords(pEvent->window, pEventWidget, nEventX, nEventY);
 
-if (!aDel.isDeleted())
+if (!aDel.isDeleted() && !(pThis->m_nStyle & 
SalFrameStyleFlags::SYSTEMCHILD))
 {
 int frame_x = static_cast(pEvent->x_root - nEventX);
 int frame_y = static_cast(pEvent->y_root - nEventY);
@@ -3168,8 +3168,8 @@ gboolean GtkSalFrame::signalButton(GtkWidget*, 
GdkEventButton* pEvent, gpointer
 if (!aDel.isDeleted())
 {
 bRet = pThis->DrawingAreaButton(nEventType,
-pEvent->x_root - pThis->maGeometry.nX,
-pEvent->y_root - pThis->maGeometry.nY,
+nEventX,
+nEventY,
 pEvent->button,
 pEvent->time,
 pEvent->state);
@@ -3463,21 +3463,22 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, 
GdkEventMotion* pEvent, gpointer
 int frame_x = static_cast(pEvent->x_root - nEventX);
 int frame_y = static_cast(pEvent->y_root - nEventY);
 
-if (pThis->m_bGeometryIsProvisional || frame_x != pThis->maGeometry.nX || 
frame_y != pThis->maGeometry.nY)
+if (!aDel.isDeleted() && !(pThis->m_nStyle & 
SalFrameStyleFlags::SYSTEMCHILD))
 {
-pThis->m_bGeometryIsProvisional = false;
-pThis->maGeometry.nX = frame_x;
-pThis->maGeometry.nY = frame_y;
-ImplSVData* pSVData = ImplGetSVData();
-if (pSVData->maNWFData.mbCanDetermineWindowPosition)
-pThis->CallCallbackExc(SalEvent::Move, nullptr);
+if (pThis->m_bGeometryIsProvisional || frame_x != pThis->maGeometry.nX 
|| frame_y != pThis->maGeometry.nY)
+{
+pThis->m_bGeometryIsProvisional = false;
+pThis->maGeometry.nX = frame_x;
+pThis->maGeometry.nY = frame_y;
+ImplSVData* pSVData = ImplGetSVData();
+if (pSVData->maNWFData.mbCanDetermineWindowPosition)
+pThis->CallCallbackExc(SalEvent::Move, nullptr);
+}
 }
 
 if (!aDel.isDeleted())
 {
-pThis->DrawingAreaMotion(pEvent->x_root - pThis->maGeometry.nX,
- pEvent->y_root - pThis->maGeometry.nY,
- pEvent->time, pEvent->state);
+pThis->DrawingAreaMotion(nEventX, nEventY, pEvent->time, 
pEvent->state);
 }
 
 if (!aDel.isDeleted())
@@ -3530,8 +3531,8 @@ gboolean GtkSalFrame::signalCrossing( GtkWidget*, 
GdkEventCrossing* pEvent, gpoi
 {
 GtkSalFrame* pThis = static_cast(frame);
 pThis->DrawingAreaCrossing((pEvent->type == GDK_ENTER_NOTIFY) ? 
SalEvent::MouseMove : SalEvent::MouseLeave,
-   pEvent->x_root - pThis->maGeometry.nX,
-   pEvent->y_root - pThis->maGeometry.nY,
+   pEvent->x,
+   pEvent->y,
pEvent->time,
pEvent->state);
 return true;


[Libreoffice-commits] core.git: config_host/config_buildconfig.h.in configure.ac desktop/source

2022-11-07 Thread Andras Timar (via logerrit)
 config_host/config_buildconfig.h.in |8 
 configure.ac|4 
 desktop/source/lib/init.cxx |4 +++-
 3 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit cbfac11330882c7d0a817b6c37a08b2ace2b66f4
Author: Andras Timar 
AuthorDate: Mon Oct 10 23:38:56 2022 +0200
Commit: Andras Timar 
CommitDate: Mon Nov 7 20:35:46 2022 +0100

Send build config (configure options) in LOKit version info JSON

Change-Id: I29a6cca467e5f1e9ba59528edefbb397ceb81780
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141197
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141494
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/config_host/config_buildconfig.h.in 
b/config_host/config_buildconfig.h.in
new file mode 100644
index ..0c93d6e02f84
--- /dev/null
+++ b/config_host/config_buildconfig.h.in
@@ -0,0 +1,8 @@
+/* Options passed to configure script */
+
+#ifndef CONFIG_BUILDCONFIG_H
+#define CONFIG_BUILDCONFIG_H
+
+#define BUILDCONFIG ""
+
+#endif
diff --git a/configure.ac b/configure.ac
index b4b9a7a24eb7..9a445fefabc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -522,6 +522,8 @@ AC_DEFINE_UNQUOTED(LIBO_VERSION_PATCH,$LIBO_VERSION_PATCH)
 LIBO_THIS_YEAR=`date +%Y`
 AC_DEFINE_UNQUOTED(LIBO_THIS_YEAR,$LIBO_THIS_YEAR)
 
+AC_DEFINE_UNQUOTED([BUILDCONFIG],[["$ac_configure_args"]],[Options passed to 
configure script])
+
 dnl ===
 dnl Product version
 dnl ===
@@ -14830,6 +14832,8 @@ AC_CONFIG_FILES([config_host.mk
  instsetoo_native/util/openoffice.lst
  sysui/desktop/macosx/Info.plist
  
vs-code.code-workspace.template:.vscode/vs-code-template.code-workspace.in])
+
+AC_CONFIG_HEADERS([config_host/config_buildconfig.h])
 AC_CONFIG_HEADERS([config_host/config_buildid.h])
 AC_CONFIG_HEADERS([config_host/config_box2d.h])
 AC_CONFIG_HEADERS([config_host/config_clang.h])
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6414a3fe1ca9..6008820da1bb 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7,6 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
 #include 
 
 #include 
@@ -6539,7 +6540,8 @@ static char* lo_getVersionInfo(SAL_UNUSED_PARAMETER 
LibreOfficeKit* /*pThis*/)
 "\"ProductName\": \"%PRODUCTNAME\", "
 "\"ProductVersion\": \"%PRODUCTVERSION\", "
 "\"ProductExtension\": \"%PRODUCTEXTENSION\", "
-"\"BuildId\": \"%BUILDID\" "
+"\"BuildId\": \"%BUILDID\", "
+"\"BuildConfig\": \""  BUILDCONFIG  "\" "
 "}"));
 }
 


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

2022-11-07 Thread Mike Kaganski (via logerrit)
 starmath/source/view.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 5b2a5a8543e544b1e0f5cee112232e2e67434942
Author: Mike Kaganski 
AuthorDate: Sun Nov 6 22:07:04 2022 +0300
Commit: Mike Kaganski 
CommitDate: Mon Nov 7 20:12:11 2022 +0100

Use o3tl::convert instead of temporary Fractions

Change-Id: I7e1f68e579e6520d17e0a058e6e0a8056e082c2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142360
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 75395e0ccaeae2761a6b58bc36c8a5e32d49566f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142303
Tested-by: Jenkins CollaboraOffice 

diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 6cecfc941adf..4afb9a68a33c 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -2295,8 +2295,10 @@ void SmViewShell::ZoomByItemSet(const SfxItemSet *pSet)
 Size   
OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(),
   
OutputRect.GetHeight()), aMap));
 Size   GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), 
aMap));
-sal_uInt16 nZ = 
sal::static_int_cast(std::min(tools::Long(Fraction(OutputSize.Width()
  * 100, GraphicSize.Width())),
-  
tools::Long(Fraction(OutputSize.Height() * 100, GraphicSize.Height();
+if (GraphicSize.Width() <= 0 || GraphicSize.Height() <= 0)
+break;
+sal_uInt16 nZ = std::min(o3tl::convert(OutputSize.Width(), 100, 
GraphicSize.Width()),
+ o3tl::convert(OutputSize.Height(), 100, 
GraphicSize.Height()));
 mxGraphicWindow->SetZoom(nZ);
 break;
 }


[Libreoffice-commits] core.git: helpcontent2

2022-11-07 Thread Bogdan B (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ff5783bf669c1ee0832e3b6f57b96f015d029ae9
Author: Bogdan B 
AuthorDate: Mon Nov 7 20:53:03 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Mon Nov 7 19:53:03 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 0e8131128326f9a2f8476bf3b72f9a7b45476750
  - tdf#150369 IsMissing Function explanation

Change-Id: I10a25151109d4048fdbf8eca596f0f1e334092a2
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142300
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index b310c2a8fb3c..0e8131128326 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b310c2a8fb3c21429a755b318a1b4be31a5496d0
+Subproject commit 0e8131128326f9a2f8476bf3b72f9a7b45476750


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

2022-11-07 Thread Bogdan B (via logerrit)
 source/text/sbasic/shared/03104000.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0e8131128326f9a2f8476bf3b72f9a7b45476750
Author: Bogdan B 
AuthorDate: Sun Nov 6 20:58:03 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Nov 7 19:53:01 2022 +0100

tdf#150369 IsMissing Function explanation

Change-Id: I10a25151109d4048fdbf8eca596f0f1e334092a2
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142300
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/sbasic/shared/03104000.xhp 
b/source/text/sbasic/shared/03104000.xhp
index f12213c9f0..47a8ecae8f 100644
--- a/source/text/sbasic/shared/03104000.xhp
+++ b/source/text/sbasic/shared/03104000.xhp
@@ -43,7 +43,7 @@
 Parameters:
 
 ArgumentName: the name of an optional argument.
-If the 
IsMissing function is called by the ArgumentName, then True is 
returned.
+IsMissing 
returns True if no value has been passed for the ArgumentName; otherwise, it 
returns False.
 See also Examples.
 
 


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - download.lst external/expat

2022-11-07 Thread Taichi Haradaguchi (via logerrit)
 download.lst  |4 ++--
 external/expat/expat-winapi.patch |   13 +++--
 2 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 6a2c128a55997a576cd5bc0692d6bf67426a45db
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Mon Oct 31 00:20:55 2022 +0900
Commit: Michael Stahl 
CommitDate: Mon Nov 7 19:45:08 2022 +0100

upgrade Expat to 2.5.0

Fixes CVE-2022-43680

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142205
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 74eea44c685e108fab44c85ce81609091c7be1ec)

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

diff --git a/download.lst b/download.lst
index 7768b59b306e..2e885689c375 100644
--- a/download.lst
+++ b/download.lst
@@ -42,8 +42,8 @@ export EPUBGEN_TARBALL := libepubgen-0.1.1.tar.xz
 export ETONYEK_SHA256SUM := 
e61677e8799ce6e55b25afc11aa5339113f6a49cff031f336e32fa58635b1a4a
 export ETONYEK_VERSION_MICRO := 9
 export ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.xz
-export EXPAT_SHA256SUM := 
6e8c0728fe5c7cd3f93a6acce43046c5e4736c7b4b68e032e9350daa0efc0354
-export EXPAT_TARBALL := expat-2.4.9.tar.xz
+export EXPAT_SHA256SUM := 
ef2420f0232c087801abf705e89ae65f6257df6b7931d37846a193ef2e8cdcbe
+export EXPAT_TARBALL := expat-2.5.0.tar.xz
 export FIREBIRD_SHA256SUM := 
6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5860
 export FIREBIRD_TARBALL := Firebird-3.0.0.32483-0.tar.bz2
 export FONTCONFIG_SHA256SUM := 
cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017
diff --git a/external/expat/expat-winapi.patch 
b/external/expat/expat-winapi.patch
index 7eae7d5d6139..fed65644a732 100644
--- a/external/expat/expat-winapi.patch
+++ b/external/expat/expat-winapi.patch
@@ -1,6 +1,6 @@
 misc/expat-2.1.0/lib/expat_external.h  2009-11-16 08:53:17.37500 
+
-+++ misc/build/expat-2.1.0/lib/expat_external.h2009-11-16 
08:53:34.703125000 +
-@@ -81,10 +81,6 @@
+--- misc/expat-2.5.0/lib/expat_external.h  2022-10-25 01:32:54.0 
+0900
 misc/build/expat-2.5.0/lib/expat_external.h2022-10-30 
23:09:47.339459134 +0900
+@@ -88,10 +88,6 @@
  #  ifndef XML_BUILDING_EXPAT
  /* using Expat from an application */
  
@@ -11,12 +11,13 @@
  #  endif
  #endif /* not defined XML_STATIC */
  
 misc/expat-2.1.0/lib/xmlparse.c2021-05-23 16:56:25.0 +0100
-+++ misc/build/expat-2.1.0/lib/xmlparse.c  2021-05-25 12:42:11.997173600 
+0100
-@@ -64,6 +64,8 @@
+--- misc/expat-2.5.0/lib/xmlparse.c2022-10-26 00:09:08.0 +0900
 misc/build/expat-2.5.0/lib/xmlparse.c  2022-10-30 23:09:01.843006341 
+0900
+@@ -67,6 +67,9 @@
  #endif
  
  #ifdef _WIN32
++#  undef HAVE_ARC4RANDOM_BUF
 +#  undef HAVE_GETRANDOM
 +#  undef HAVE_SYSCALL_GETRANDOM
  /* force stdlib to define rand_s() */


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

2022-11-07 Thread Mike Kaganski (via logerrit)
 starmath/inc/cursor.hxx  |3 ++-
 starmath/inc/visitors.hxx|   25 +
 starmath/source/cursor.cxx   |8 +++-
 starmath/source/view.cxx |   24 +++-
 starmath/source/visitors.cxx |   42 +++---
 5 files changed, 68 insertions(+), 34 deletions(-)

New commits:
commit 7a5a7ce4e39ac57433c09980efb4dc2c0c40ee37
Author: Mike Kaganski 
AuthorDate: Sat Nov 5 21:16:29 2022 +0300
Commit: Mike Kaganski 
CommitDate: Mon Nov 7 19:08:24 2022 +0100

lok: show Math selection

Change-Id: I950ae3e5fb000d6acec4c26ff143b918a4e48a27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142342
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 1b1a066b935158dc029939520c8fe70b029cb311)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142297
Tested-by: Jenkins CollaboraOffice 

diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx
index 24b52e54af4f..cd6128ba8e05 100644
--- a/starmath/inc/cursor.hxx
+++ b/starmath/inc/cursor.hxx
@@ -185,6 +185,7 @@ public:
 void Draw(OutputDevice& pDev, Point Offset, bool isCaretVisible);
 
 tools::Rectangle GetCaretRectangle(OutputDevice& rOutDev) const;
+tools::Rectangle GetSelectionRectangle(OutputDevice& rOutDev) const;
 
 bool IsAtTailOfBracket(SmBracketType eBracketType) const;
 
@@ -273,7 +274,7 @@ private:
 bool SetCaretPosition(SmCaretPos pos);
 
 /** Set selected on nodes of the tree */
-void AnnotateSelection();
+void AnnotateSelection() const;
 
 /** Clone list of nodes in a clipboard (creates a deep clone) */
 static std::unique_ptr CloneList(SmClipboard& rClipboard);
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
index e6ac83085aa1..534635dcf6b8 100644
--- a/starmath/inc/visitors.hxx
+++ b/starmath/inc/visitors.hxx
@@ -424,31 +424,40 @@ private:
 };
 
 
-// SmSelectionDrawingVisitor
+// SmSelectionRectanglesVisitor: collect selection
 
-class SmSelectionDrawingVisitor final : public SmDefaultingVisitor
+class SmSelectionRectanglesVisitor : public SmDefaultingVisitor
 {
 public:
-/** Draws a selection on rDevice for the selection on pTree */
-SmSelectionDrawingVisitor( OutputDevice& rDevice, SmNode* pTree, const 
Point& rOffset );
-virtual ~SmSelectionDrawingVisitor() {}
+SmSelectionRectanglesVisitor(OutputDevice& rDevice, SmNode* pTree);
+virtual ~SmSelectionRectanglesVisitor() = default;
 void Visit( SmTextNode* pNode ) override;
 using SmDefaultingVisitor::Visit;
+
+const tools::Rectangle& GetSelection() { return maSelectionArea; }
+
 private:
 /** Reference to drawing device */
 OutputDevice& mrDev;
-/** True if  aSelectionArea have been initialized */
-bool mbHasSelectionArea;
 /** The current area that is selected */
 tools::Rectangle maSelectionArea;
 /** Extend the area that must be selected  */
-void ExtendSelectionArea(const tools::Rectangle& rArea);
+void ExtendSelectionArea(const tools::Rectangle& rArea) { 
maSelectionArea.Union(rArea); }
 /** Default visiting method */
 void DefaultVisit( SmNode* pNode ) override;
 /** Visit the children of a given pNode */
 void VisitChildren( SmNode* pNode );
 };
 
+// SmSelectionDrawingVisitor
+
+class SmSelectionDrawingVisitor final : public SmSelectionRectanglesVisitor
+{
+public:
+/** Draws a selection on rDevice for the selection on pTree */
+SmSelectionDrawingVisitor( OutputDevice& rDevice, SmNode* pTree, const 
Point& rOffset );
+};
+
 // SmNodeToTextVisitor
 
 /** Extract command text from pNodes */
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index edeca3f59540..12836a048a60 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -165,7 +165,7 @@ bool SmCursor::SetCaretPosition(SmCaretPos pos){
 return false;
 }
 
-void SmCursor::AnnotateSelection(){
+void SmCursor::AnnotateSelection() const {
 //TODO: Manage a state, reset it upon modification and optimize this call
 SmSetSelectionVisitor(mpAnchor->CaretPos, mpPosition->CaretPos, mpTree);
 }
@@ -179,6 +179,12 @@ tools::Rectangle SmCursor::GetCaretRectangle(OutputDevice& 
rOutDev) const
 return SmCaretRectanglesVisitor(rOutDev, GetPosition()).getCaret();
 }
 
+tools::Rectangle SmCursor::GetSelectionRectangle(OutputDevice& rOutDev) const
+{
+AnnotateSelection();
+return SmSelectionRectanglesVisitor(rOutDev, mpTree).GetSelection();
+}
+
 void SmCursor::DeletePrev(OutputDevice* pDev){
 //Delete only a selection if there's a selection
 if(HasSelection()){
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 727c320f7027..6cecfc941adf 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -2324,10 +2324,28 @@ std::optional SmViewShell::getLOKPayload(int 
nType, int nViewId) const
 }
 return SfxLokHelper::makeVisCursorInvalidat

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

2022-11-07 Thread Caolán McNamara (via logerrit)
 vcl/source/outdev/text.cxx |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 495922fd4ac07d4b7c16127b222f1d06a2718399
Author: Caolán McNamara 
AuthorDate: Fri Nov 4 21:15:53 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 7 18:37:46 2022 +0100

use ResolutionIndependentLayout if there is any MapMode set on the device

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

diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index d5969c7a0092..3e86ab61d19f 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1377,7 +1377,6 @@ std::unique_ptr OutputDevice::ImplLayout(const 
OUString& rOrigStr,
 vcl::text::ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStr, 
nMinIndex, nLen,
 nPixelWidth, flags, pLayoutCache);
 
-bool bHasScaledDXArray(false);
 DeviceCoordinate nEndGlyphCoord(0);
 std::unique_ptr xNaturalDXPixelArray;
 if( !pDXArray.empty() )
@@ -1388,7 +1387,6 @@ std::unique_ptr OutputDevice::ImplLayout(const 
OUString& rOrigStr,
 {
 // convert from logical units to font units without rounding,
 // keeping accuracy for lower levels
-bHasScaledDXArray = true;
 for (int i = 0; i < nLen; ++i)
 xNaturalDXPixelArray[i] = 
ImplLogicWidthToDeviceSubPixel(pDXArray[i]);
 }
@@ -1417,7 +1415,7 @@ std::unique_ptr OutputDevice::ImplLayout(const 
OUString& rOrigStr,
 if( !pSalLayout )
 return nullptr;
 
-
pSalLayout->SetTextRenderModeForResolutionIndependentLayout(bHasScaledDXArray);
+pSalLayout->SetTextRenderModeForResolutionIndependentLayout(mbMap);
 
 // do glyph fallback if needed
 // #105768# avoid fallback for very small font sizes
@@ -1432,10 +1430,9 @@ std::unique_ptr 
OutputDevice::ImplLayout(const OUString& rOrigStr,
 // position, justify, etc. the layout
 pSalLayout->AdjustLayout( aLayoutArgs );
 
-// default to on for pdf export which uses SubPixelToLogic to convert back 
to
-// the logical coord space, default off for everything else for now unless
-// a dxarray is provided which has to be scaled
-if (bHasScaledDXArray || meOutDevType == OUTDEV_PDF)
+// default to on for pdf export, which uses SubPixelToLogic to convert 
back to
+// the logical coord space, of if we are scaling/mapping
+if (mbMap || meOutDevType == OUTDEV_PDF)
 pSalLayout->DrawBase() = ImplLogicToDeviceSubPixel(rLogicalPos);
 else
 {


[Libreoffice-commits] core.git: sc/common_unoapi_tests.mk sc/CppunitTest_sc_annotationobj.mk sc/CppunitTest_sc_annotationshapeobj.mk sc/CppunitTest_sc_annotationsobj.mk sc/CppunitTest_sc_arealinkobj.m

2022-11-07 Thread Xisco Fauli (via logerrit)
 sc/CppunitTest_sc_annotationobj.mk |   33 
---
 sc/CppunitTest_sc_annotationshapeobj.mk|   33 
---
 sc/CppunitTest_sc_annotationsobj.mk|   33 
---
 sc/CppunitTest_sc_arealinkobj.mk   |   33 
---
 sc/CppunitTest_sc_arealinksobj.mk  |   33 
---
 sc/CppunitTest_sc_autoformatobj.mk |   33 
---
 sc/CppunitTest_sc_autoformatsobj.mk|   33 
---
 sc/CppunitTest_sc_cellcursorobj.mk |   33 
---
 sc/CppunitTest_sc_cellfieldsobj.mk |   33 
---
 sc/CppunitTest_sc_cellformatsenumeration.mk|   33 
---
 sc/CppunitTest_sc_cellformatsobj.mk|   33 
---
 sc/CppunitTest_sc_cellobj.mk   |   33 
---
 sc/CppunitTest_sc_cellrangeobj.mk  |   34 
---
 sc/CppunitTest_sc_cellrangesobj.mk |   33 
---
 sc/CppunitTest_sc_cellsearchobj.mk |   33 
---
 sc/CppunitTest_sc_cellsenumeration.mk  |   33 
---
 sc/CppunitTest_sc_cellsobj.mk  |   33 
---
 sc/CppunitTest_sc_chartobj.mk  |   34 
---
 sc/CppunitTest_sc_chartsobj.mk |   34 
---
 sc/CppunitTest_sc_check_data_pilot_field.mk|   37 
---
 sc/CppunitTest_sc_check_data_pilot_table.mk|   37 
---
 sc/CppunitTest_sc_check_xcell_ranges_query.mk  |   33 
---
 sc/CppunitTest_sc_consolidationdescriptorobj.mk|   33 
---
 sc/CppunitTest_sc_core.mk  |4 
 sc/CppunitTest_sc_databaserangeobj.mk  |   33 
---
 sc/CppunitTest_sc_databaserangesobj.mk |   33 
---
 sc/CppunitTest_sc_datapilotfieldgroupitemobj.mk|   37 
---
 sc/CppunitTest_sc_datapilotfieldgroupobj.mk|   37 
---
 sc/CppunitTest_sc_datapilotfieldgroupsobj.mk   |   37 
---
 sc/CppunitTest_sc_datapilotfieldobj.mk |   33 
---
 sc/CppunitTest_sc_datapilotfieldsobj.mk|   33 
---
 sc/CppunitTest_sc_datapilotitemobj.mk  |   64 
--
 sc/CppunitTest_sc_datapilotitemsobj.mk |   37 
---
 sc/CppunitTest_sc_datapilottableobj.mk |   33 
---
 sc/CppunitTest_sc_datapilottablesobj.mk|   98 
--
 sc/CppunitTest_sc_ddelinkobj.mk|   35 
---
 sc/CppunitTest_sc_ddelinksobj.mk   |   34 
---
 sc/CppunitTest_sc_documentconfigurationobj.mk  |   33 
---
 sc/CppunitTest_sc_drawpageobj.mk   |   33 
---
 sc/CppunitTest_sc_drawpagesobj.mk  |   34 
---
 sc/CppunitTest_sc_editfieldobj_cell.mk |   33 
---
 sc/CppunitTest_sc_editfieldobj_header.mk   |   33 
---
 sc/CppunitTest_sc_filterdescriptorbase.mk  |   33 
---
 sc/CppunitTest_sc_functiondescriptionobj.mk|   33 
---
 sc/CppunitTest_sc_functionlistobj.mk   |   36 
+++
 sc/CppunitTest_sc_headerfieldsobj.mk   |   33 
---
 sc/CppunitTest_sc_headerfootercontentobj.mk|   33 
---
 sc/CppunitTest_sc_html_export_test.mk  |   45 

 sc/CppunitTest_sc_importdescriptorbaseobj.mk   |   33 
---
 sc/CppunitTest_sc_indexenumeration_cellannotationsenumeration.mk   |   33 
---
 sc/CppunitTest_sc_indexenumeration_cellarealinksenumeration.mk |   33 
---
 sc/CppunitTest_sc_indexenumeration_databaserangesenumeration.mk|   33 
---
 sc/CppunitTest_sc_indexenumeration_datapilotfieldsenumeration.mk   |   33 
---
 sc/CppunitTest_sc_indexenumeration_datapilotitemsenumeration.mk|   33 
---
 sc/CppunitTest_sc_indexenumeration_datapilottablesenumeration.mk   |   33 
---
 sc/CppunitTest_sc_indexenumeration_ddelinksenumeration.mk  |   33 
---
 sc/CppunitTest_sc_indexenumeration_functiondescriptionenumeration.mk   |   33 
---
 sc/CppunitTest_sc_indexenumeration_labelrangesenumeration.mk   |   33 
---
 sc/CppunitTest_sc_indexenumeration_namedrangesenumeration.mk   |   33 
---
 sc/CppunitTest_sc_indexenumeration_

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

2022-11-07 Thread Andrea Gelmini (via logerrit)
 sw/source/core/layout/paintfrm.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit ae372725fedcd688aa3535b243a0c93af33d4689
Author: Andrea Gelmini 
AuthorDate: Mon Nov 7 13:29:05 2022 +0100
Commit: Julien Nabet 
CommitDate: Mon Nov 7 17:26:04 2022 +0100

Removed duplicated include

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

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 6348fb14bc59..b42fc48acb37 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -84,7 +84,6 @@
 #include 
 
 #include 
-#include 
 
 #include 
 


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

2022-11-07 Thread Mike Kaganski (via logerrit)
 include/sfx2/lokcomponenthelpers.hxx   |2 +-
 sfx2/source/view/lokstarmathhelper.cxx |   13 -
 2 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 6594e826d9f02670579feec84f65dcf6e98eb8cc
Author: Mike Kaganski 
AuthorDate: Sat Nov 5 15:17:00 2022 +0300
Commit: Mike Kaganski 
CommitDate: Mon Nov 7 17:15:06 2022 +0100

lok: properly treat zoom in LokStarMathHelper::postMouseEvent

Previous naive implementation was dropped in commit
033a342a630dbb6329962156727e621866b77b48 (lok: use twips in Math,
Wed Nov 02 11:03:08 2022 +0300). Unlike chart, Math expects twips,
so PPT (pixel per twip) factor must be converted into percentage.

Change-Id: Icd936e004d961c0abc25c241391d4e24c44e8c14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142319
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit f0a88a6d214ebdcc3617d24beb4bb5148f72c3a4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142295
Tested-by: Jenkins CollaboraOffice 

diff --git a/include/sfx2/lokcomponenthelpers.hxx 
b/include/sfx2/lokcomponenthelpers.hxx
index e659b6c91e43..a58e154e36d6 100644
--- a/include/sfx2/lokcomponenthelpers.hxx
+++ b/include/sfx2/lokcomponenthelpers.hxx
@@ -79,7 +79,7 @@ public:
 void Dispatch(const rtl::OUString& cmd, const 
css::uno::Sequence& rArguments) const;
 
 bool postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, 
int nModifier,
-double fScaleX = 1.0, double fScaleY = 1.0);
+double fPPTScaleX, double fPPTScaleY);
 
 private:
 const SfxViewShell* mpViewShell;
diff --git a/sfx2/source/view/lokstarmathhelper.cxx 
b/sfx2/source/view/lokstarmathhelper.cxx
index 8ec65c45a274..a1ee4c2ccacb 100644
--- a/sfx2/source/view/lokstarmathhelper.cxx
+++ b/sfx2/source/view/lokstarmathhelper.cxx
@@ -139,7 +139,7 @@ tools::Rectangle LokStarMathHelper::GetBoundingBox() const
 }
 
 bool LokStarMathHelper::postMouseEvent(int nType, int nX, int nY, int nCount, 
int nButtons,
-   int nModifier, double /*fScaleX*/, 
double /*fScaleY*/)
+   int nModifier, double fPPTScaleX, 
double fPPTScaleY)
 {
 const tools::Rectangle rBBox = GetBoundingBox();
 if (Point aMousePos(nX, nY); rBBox.Contains(aMousePos))
@@ -147,6 +147,17 @@ bool LokStarMathHelper::postMouseEvent(int nType, int nX, 
int nY, int nCount, in
 if (vcl::Window* pWindow = GetWidgetWindow())
 {
 aMousePos -= rBBox.TopLeft();
+
+// In lok, Math does not convert coordinates (see 
SmGraphicWidget::SetDrawingArea,
+// which disables MapMode), and uses twips internally (see 
SmDocShell ctor and
+// SmMapUnit), but the conversion factor can depend on the client 
zoom.
+// 1. Remove the twip->pixel factor in the passed scales
+double fScaleX = o3tl::convert(fPPTScaleX, o3tl::Length::px, 
o3tl::Length::twip);
+double fScaleY = o3tl::convert(fPPTScaleY, o3tl::Length::px, 
o3tl::Length::twip);
+// 2. Adjust the position according to the scales
+aMousePos
+= Point(std::round(aMousePos.X() * fScaleX), 
std::round(aMousePos.Y() * fScaleY));
+
 LokMouseEventData aMouseEventData(
 nType, aMousePos, nCount, MouseEventModifiers::SIMPLECLICK, 
nButtons, nModifier);
 SfxLokHelper::postMouseEventAsync(pWindow, aMouseEventData);


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

2022-11-07 Thread László Németh (via logerrit)
 xmloff/source/style/xmlnumfe.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 90ed967f28f705743bacedd82410221dfe38eb6e
Author: László Németh 
AuthorDate: Mon Nov 7 12:26:41 2022 +0100
Commit: László Németh 
CommitDate: Mon Nov 7 16:59:44 2022 +0100

xmloff: write transliteration-spellout only in extended ODF

Follow-up to commit 7c20c3c2a9fc85c66dad9d09908b257beeedd78d
"xmloff: ODF export: adapt all checks of ODFSVER_012 etc.".

Reported by Eike Rathke.

See also b7d53247eb2fab04f5f6d82d405f1ac0c73542b2
"tdf#115007 i18npool: add NatNum12 formats to locales" and
2a1d2d42af7f365330479f4032ddfdd9eeba7c1d
"tdf#115007 add NatNum12 number format list items, fix title case".

Change-Id: Idb25a37ffcad0a0fb05276b972561abf929cd81b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142373
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 0a93f33a2ec5bdbda446d35dfbeca1b7b8a3b8cb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142307
Reviewed-by: Michael Stahl 
Tested-by: Jenkins

diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index b41149490d01..6deeca6881d3 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -1204,12 +1204,12 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt
 const bool bWriteSpellout = aAttr.Format.isEmpty();
 assert(bWriteSpellout); // mutually exclusive
 
-// Export only for 1.2 with extensions or 1.3 and later.
+// Export only for 1.2 and later with extensions
 SvtSaveOptions::ODFSaneDefaultVersion eVersion = 
rExport.getSaneDefaultVersion();
 // Also ensure that duplicated transliteration-language and
 // transliteration-country attributes never escape into the wild with
 // releases.
-if (eVersion > SvtSaveOptions::ODFSVER_012 && bWriteSpellout)
+if ( (eVersion & SvtSaveOptions::ODFSVER_EXTENDED) && bWriteSpellout )
 {
 /* FIXME-BCP47: ODF defines no transliteration-script or
  * transliteration-rfc-language-tag */


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

2022-11-07 Thread László Németh (via logerrit)
 sw/inc/swtable.hxx  |   12 ---
 sw/qa/extras/uiwriter/uiwriter5.cxx |   19 +
 sw/source/core/table/swtable.cxx|   39 +---
 3 files changed, 60 insertions(+), 10 deletions(-)

New commits:
commit 0d295ee0c34ed505a9673580b40ade3ce6947d99
Author: László Németh 
AuthorDate: Mon Nov 7 13:06:56 2022 +0100
Commit: László Németh 
CommitDate: Mon Nov 7 16:50:32 2022 +0100

tdf#151658 sw: accept of row deletions with nested tables

Accepting tracked row deletion didn't delete the table row,
only its row content, if the table row contained cell
starting nested tables.

Extend SwTableBox::IsEmpty() to detect a table cell as empty,
if it contains only a cell starting empty table.

Note: Without change tracking, deleting content of a selected
table cell leaves the cell starting nested table in
the cell, but deleting row removed the row with nested table,
too.

Follow-up to commit 6383362999b72160eab6abdfc6ea6bdbd231b100
"tdf#151657 sw: delete row with nested table in Hide Changes" and
commit c809867f3ee92a8eb36cbab840bd6d6c5b3b1c26
"tdf#150976 sw: fix tracked deletion of row with nested table".

Change-Id: I9c9bc3b97653b63e797e1e9dd545809b77a02c76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142384
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 49f5bf8418af..0ad1deffb42e 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -354,6 +354,9 @@ public:
 bool IsDeleted() const;
 // is it a table with deleted row(s)
 bool HasDeletedRow() const;
+// it doesn't contain box content (except single empty nested tables of 
the boxes
+// which could remain after deletion of text content of the selected table)
+bool IsEmpty() const;
 };
 
 /// SwTableLine is one table row in the document model.
@@ -397,7 +400,8 @@ public:
 
 bool hasSoftPageBreak() const;
 
-// it doesn't contain box content
+// it doesn't contain box content (except single empty nested tables of 
the boxes
+// which could remain after deletion of text content of the selected table 
row)
 bool IsEmpty() const;
 
 // Update TextChangesOnly property based on the redlines of the table row.
@@ -473,8 +477,10 @@ public:
 void RemoveFromTable();
 const SwStartNode *GetSttNd() const { return m_pStartNode; }
 SwNodeOffset GetSttIdx() const;
-// it doesn't contain box content
-bool IsEmpty() const;
+// it doesn't contain box content or if bWithRemainingNestedTable = true,
+// it contains only an empty nested table as box content (which
+// could remain after deletion of the text content of the selected box).
+bool IsEmpty( bool bWithRemainingNestedTable = true ) const;
 
 // Search next/previous box with content.
 SwTableBox* FindNextBox( const SwTable&, const SwTableBox*,
diff --git a/sw/qa/extras/uiwriter/uiwriter5.cxx 
b/sw/qa/extras/uiwriter/uiwriter5.cxx
index 3aaedff5f662..4fd84528ba11 100644
--- a/sw/qa/extras/uiwriter/uiwriter5.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter5.cxx
@@ -1895,6 +1895,15 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf150976)
 
 // This was false (not deleted row)
 CPPUNIT_ASSERT(pTabFrame->GetTable()->HasDeletedRow());
+
+// accept all tracked changes
+dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+
+discardDumpedLayout();
+pXmlDoc = parseLayoutDump();
+
+// tdf#151658 This was 1: not deleted table row (and table)
+assertXPath(pXmlDoc, "//page[1]//body/tab", 0);
 }
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf151657)
@@ -1938,6 +1947,16 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf151657)
 
 // This was false (not deleted row)
 CPPUNIT_ASSERT(pTabFrame->GetTable()->HasDeletedRow());
+
+// accept all tracked changes
+dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+Scheduler::ProcessEventsToIdle();
+
+discardDumpedLayout();
+pXmlDoc = parseLayoutDump();
+
+// tdf#151658 This was 1: not deleted table row (and table)
+assertXPath(pXmlDoc, "//page[1]//body/tab", 0);
 }
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testSelectRowWithNestedTable)
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 9e4c1b066a5d..7fa3c3caea4d 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1570,6 +1570,16 @@ bool SwTableLine::IsEmpty() const
 return true;
 }
 
+bool SwTable::IsEmpty() const
+{
+for (size_t i = 0; i < m_aLines.size(); ++i)
+{
+if ( !m_aLines[i]->IsEmpty() )
+return false;
+}
+return true;
+}
+
 bool SwTable::HasDeletedRow() const
 {
 const SwRedlineTable& aRedlineTable = 
GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetRedlineTable();
@@ -1626,7 +1636,7 @@ SwRedlineTable::size_t

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - download.lst external/expat

2022-11-07 Thread Taichi Haradaguchi (via logerrit)
 download.lst  |4 ++--
 external/expat/expat-winapi.patch |   13 +++--
 2 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 31e396ab0f6a4aa8529fb391603bd0347660ea1b
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Mon Oct 31 00:20:55 2022 +0900
Commit: Michael Stahl 
CommitDate: Mon Nov 7 16:33:23 2022 +0100

upgrade Expat to 2.5.0

Fixes CVE-2022-43680

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142205
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 74eea44c685e108fab44c85ce81609091c7be1ec)

Change-Id: I5bf8d1ab0ac352833c76a7edfc1d8eb78dd03e10

diff --git a/download.lst b/download.lst
index 42dcf2002246..b40e877ddd15 100644
--- a/download.lst
+++ b/download.lst
@@ -40,8 +40,8 @@ export EPUBGEN_TARBALL := libepubgen-0.1.1.tar.xz
 export ETONYEK_SHA256SUM := 
e61677e8799ce6e55b25afc11aa5339113f6a49cff031f336e32fa58635b1a4a
 export ETONYEK_VERSION_MICRO := 9
 export ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.xz
-export EXPAT_SHA256SUM := 
6e8c0728fe5c7cd3f93a6acce43046c5e4736c7b4b68e032e9350daa0efc0354
-export EXPAT_TARBALL := expat-2.4.9.tar.xz
+export EXPAT_SHA256SUM := 
ef2420f0232c087801abf705e89ae65f6257df6b7931d37846a193ef2e8cdcbe
+export EXPAT_TARBALL := expat-2.5.0.tar.xz
 export FIREBIRD_SHA256SUM := 
6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5860
 export FIREBIRD_TARBALL := Firebird-3.0.0.32483-0.tar.bz2
 export FONTCONFIG_SHA256SUM := 
cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017
diff --git a/external/expat/expat-winapi.patch 
b/external/expat/expat-winapi.patch
index 7eae7d5d6139..fed65644a732 100644
--- a/external/expat/expat-winapi.patch
+++ b/external/expat/expat-winapi.patch
@@ -1,6 +1,6 @@
 misc/expat-2.1.0/lib/expat_external.h  2009-11-16 08:53:17.37500 
+
-+++ misc/build/expat-2.1.0/lib/expat_external.h2009-11-16 
08:53:34.703125000 +
-@@ -81,10 +81,6 @@
+--- misc/expat-2.5.0/lib/expat_external.h  2022-10-25 01:32:54.0 
+0900
 misc/build/expat-2.5.0/lib/expat_external.h2022-10-30 
23:09:47.339459134 +0900
+@@ -88,10 +88,6 @@
  #  ifndef XML_BUILDING_EXPAT
  /* using Expat from an application */
  
@@ -11,12 +11,13 @@
  #  endif
  #endif /* not defined XML_STATIC */
  
 misc/expat-2.1.0/lib/xmlparse.c2021-05-23 16:56:25.0 +0100
-+++ misc/build/expat-2.1.0/lib/xmlparse.c  2021-05-25 12:42:11.997173600 
+0100
-@@ -64,6 +64,8 @@
+--- misc/expat-2.5.0/lib/xmlparse.c2022-10-26 00:09:08.0 +0900
 misc/build/expat-2.5.0/lib/xmlparse.c  2022-10-30 23:09:01.843006341 
+0900
+@@ -67,6 +67,9 @@
  #endif
  
  #ifdef _WIN32
++#  undef HAVE_ARC4RANDOM_BUF
 +#  undef HAVE_GETRANDOM
 +#  undef HAVE_SYSCALL_GETRANDOM
  /* force stdlib to define rand_s() */


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - download.lst external/expat

2022-11-07 Thread Taichi Haradaguchi (via logerrit)
 download.lst  |4 ++--
 external/expat/expat-winapi.patch |   13 +++--
 2 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 4ec86677c0c8cf48dd5ebfc1777b8c3f50d2d1ca
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Mon Oct 31 00:20:55 2022 +0900
Commit: Michael Stahl 
CommitDate: Mon Nov 7 16:31:44 2022 +0100

upgrade Expat to 2.5.0

Fixes CVE-2022-43680

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142205
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 74eea44c685e108fab44c85ce81609091c7be1ec)

Change-Id: I5bf8d1ab0ac352833c76a7edfc1d8eb78dd03e10

diff --git a/download.lst b/download.lst
index 972bbc2e57e7..0ded93555e43 100644
--- a/download.lst
+++ b/download.lst
@@ -40,8 +40,8 @@ export EPUBGEN_TARBALL := libepubgen-0.1.1.tar.xz
 export ETONYEK_SHA256SUM := 
e61677e8799ce6e55b25afc11aa5339113f6a49cff031f336e32fa58635b1a4a
 export ETONYEK_VERSION_MICRO := 9
 export ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.xz
-export EXPAT_SHA256SUM := 
6e8c0728fe5c7cd3f93a6acce43046c5e4736c7b4b68e032e9350daa0efc0354
-export EXPAT_TARBALL := expat-2.4.9.tar.xz
+export EXPAT_SHA256SUM := 
ef2420f0232c087801abf705e89ae65f6257df6b7931d37846a193ef2e8cdcbe
+export EXPAT_TARBALL := expat-2.5.0.tar.xz
 export FIREBIRD_SHA256SUM := 
6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5860
 export FIREBIRD_TARBALL := Firebird-3.0.0.32483-0.tar.bz2
 export FONTCONFIG_SHA256SUM := 
cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017
diff --git a/external/expat/expat-winapi.patch 
b/external/expat/expat-winapi.patch
index 7eae7d5d6139..fed65644a732 100644
--- a/external/expat/expat-winapi.patch
+++ b/external/expat/expat-winapi.patch
@@ -1,6 +1,6 @@
 misc/expat-2.1.0/lib/expat_external.h  2009-11-16 08:53:17.37500 
+
-+++ misc/build/expat-2.1.0/lib/expat_external.h2009-11-16 
08:53:34.703125000 +
-@@ -81,10 +81,6 @@
+--- misc/expat-2.5.0/lib/expat_external.h  2022-10-25 01:32:54.0 
+0900
 misc/build/expat-2.5.0/lib/expat_external.h2022-10-30 
23:09:47.339459134 +0900
+@@ -88,10 +88,6 @@
  #  ifndef XML_BUILDING_EXPAT
  /* using Expat from an application */
  
@@ -11,12 +11,13 @@
  #  endif
  #endif /* not defined XML_STATIC */
  
 misc/expat-2.1.0/lib/xmlparse.c2021-05-23 16:56:25.0 +0100
-+++ misc/build/expat-2.1.0/lib/xmlparse.c  2021-05-25 12:42:11.997173600 
+0100
-@@ -64,6 +64,8 @@
+--- misc/expat-2.5.0/lib/xmlparse.c2022-10-26 00:09:08.0 +0900
 misc/build/expat-2.5.0/lib/xmlparse.c  2022-10-30 23:09:01.843006341 
+0900
+@@ -67,6 +67,9 @@
  #endif
  
  #ifdef _WIN32
++#  undef HAVE_ARC4RANDOM_BUF
 +#  undef HAVE_GETRANDOM
 +#  undef HAVE_SYSCALL_GETRANDOM
  /* force stdlib to define rand_s() */


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - desktop/qa desktop/source include/LibreOfficeKit include/vcl sc/inc sc/source

2022-11-07 Thread Szymon Kłos (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |3 ++-
 desktop/source/lib/init.cxx |   28 
 include/LibreOfficeKit/LibreOfficeKit.h |6 ++
 include/LibreOfficeKit/LibreOfficeKit.hxx   |6 ++
 include/vcl/ITiledRenderable.hxx|8 
 sc/inc/docuno.hxx   |3 +++
 sc/source/ui/unoobj/docuno.cxx  |   22 ++
 7 files changed, 75 insertions(+), 1 deletion(-)

New commits:
commit 83955c0ca0cdd816a2aeac202a2f3b14ea11bdf5
Author: Szymon Kłos 
AuthorDate: Fri Sep 2 11:35:42 2022 +0200
Commit: Szymon Kłos 
CommitDate: Mon Nov 7 16:45:24 2022 +0100

lok: Introudce getDataArea for Calc

It will share information about real size of a data inside
spreadsheet so we can easily check where data ends in online
side.

Change-Id: I376187a33c5c82d409f559d5cc826a4f36d4252e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139472
Reviewed-by: Gökay ŞATIR 
Tested-by: Jenkins CollaboraOffice 

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index d14030c2f376..2855e7b06162 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3658,10 +3658,11 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(64),
  offsetof(struct _LibreOfficeKitDocumentClass, 
sendContentControlEvent));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(65), offsetof(struct 
_LibreOfficeKitDocumentClass, getSelectionTypeAndText));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(66), offsetof(struct 
_LibreOfficeKitDocumentClass, getDataArea));
 
 // Extending is fine, update this, and add new assert for the offsetof the
 // new method
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(66), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 86e12adf0878..13fef313aec4 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1028,6 +1028,10 @@ static int doc_getTileMode(LibreOfficeKitDocument* 
pThis);
 static void doc_getDocumentSize(LibreOfficeKitDocument* pThis,
 long* pWidth,
 long* pHeight);
+static void doc_getDataArea(LibreOfficeKitDocument* pThis,
+long nTab,
+long* pCol,
+long* pRow);
 static void doc_initializeForRendering(LibreOfficeKitDocument* pThis,
const char* pArguments);
 
@@ -1280,6 +1284,7 @@ LibLODocument_Impl::LibLODocument_Impl(const 
uno::Reference paintPartTile = doc_paintPartTile;
 m_pDocumentClass->getTileMode = doc_getTileMode;
 m_pDocumentClass->getDocumentSize = doc_getDocumentSize;
+m_pDocumentClass->getDataArea = doc_getDataArea;
 m_pDocumentClass->initializeForRendering = doc_initializeForRendering;
 m_pDocumentClass->registerCallback = doc_registerCallback;
 m_pDocumentClass->postKeyEvent = doc_postKeyEvent;
@@ -3928,6 +3933,29 @@ static void doc_getDocumentSize(LibreOfficeKitDocument* 
pThis,
 }
 }
 
+static void doc_getDataArea(LibreOfficeKitDocument* pThis,
+long nTab,
+long* pCol,
+long* pRow)
+{
+comphelper::ProfileZone aZone("doc_getDataArea");
+
+SolarMutexGuard aGuard;
+SetLastExceptionMsg();
+
+ITiledRenderable* pDoc = getTiledRenderable(pThis);
+if (pDoc)
+{
+Size aDocumentSize = pDoc->getDataArea(nTab);
+*pCol = aDocumentSize.Width();
+*pRow = aDocumentSize.Height();
+}
+else
+{
+SetLastExceptionMsg("Document doesn't support tiled rendering");
+}
+}
+
 static void doc_initializeForRendering(LibreOfficeKitDocument* pThis,
const char* pArguments)
 {
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 3a706ba47091..2f57f744e1d4 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -483,6 +483,12 @@ struct _LibreOfficeKitDocumentClass
 char** pText,
 char** pUsedMimeType);
 
+/// @see lok::Document::getDataArea().
+void (*getDataArea) (LibreOfficeKitDocument* pThis,
+ long nPart,
+ long* pCol,
+ long* pRow);
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKi

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

2022-11-07 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/ipdf/pdfdocument.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e8d9e0cf6bff43d07749d98e5922ecc8b3cf3ef6
Author: Caolán McNamara 
AuthorDate: Mon Nov 7 11:42:19 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 7 16:35:01 2022 +0100

cid#1516751 Improper use of negative value

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

diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx 
b/vcl/source/filter/ipdf/pdfdocument.cxx
index de3b4124f5cc..ed868b193292 100644
--- a/vcl/source/filter/ipdf/pdfdocument.cxx
+++ b/vcl/source/filter/ipdf/pdfdocument.cxx
@@ -349,7 +349,7 @@ sal_Int32 PDFDocument::WriteAnnotObject(PDFObjectElement 
const& rFirstPage, sal_
 m_aEditBuffer.WriteUInt32AsString(nSignatureId);
 m_aEditBuffer.WriteCharPtr(" 0 R\n");
 m_aEditBuffer.WriteCharPtr("/AP<<\n/N ");
-m_aEditBuffer.WriteUInt32AsString(nAppearanceId);
+m_aEditBuffer.WriteInt32AsString(nAppearanceId);
 m_aEditBuffer.WriteCharPtr(" 0 R\n>>\n");
 m_aEditBuffer.WriteCharPtr(">>\nendobj\n\n");
 


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

2022-11-07 Thread Samuel Mehrbrodt (via logerrit)
 sd/source/ui/view/drviews4.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 429f3d8e3eddedb7ab183b6530220bc7491302e7
Author: Samuel Mehrbrodt 
AuthorDate: Mon Nov 7 13:43:48 2022 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Nov 7 15:23:22 2022 +0100

tdf#144399 Don't allow editing in r/o mode

Fallout from ea9fff260129ccfa4755e96c08432252efbe5621

Change-Id: I0c73d13b79389db13bb04046731bdf18b4cf6005
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142382
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index e3181ba50d03..b21789c80137 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -256,11 +256,12 @@ bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, 
::sd::Window* pWin)
FreshNavigatrTree();
 }
 }
+if (!bRet && !mbReadOnly) // tdf#139804
+{
+bRet = GetView()->KeyInput(rKEvt, pWin);
+}
 }
 
-if (!bRet)
-bRet = GetView()->KeyInput(rKEvt, pWin);
-
 return bRet;
 }
 


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

2022-11-07 Thread Gabor Kelemen (via logerrit)
 test-bugzilla-files/execute.sh |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 913195167789c3006208416f7d4d2722a7b802d1
Author: Gabor Kelemen 
AuthorDate: Mon Nov 7 12:20:05 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Nov 7 14:50:23 2022 +0100

Echo a bit of status report after each task

So we can see in Jenkins log whether there is progress
Change-Id: I4370a717ca0715d7674ad72107f92944dcf9d880

Change-Id: I5309a9621a24abf9e54c5f025898e1938142ba2c
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/142377
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 0b05658..5ed91e2 100755
--- a/test-bugzilla-files/execute.sh
+++ b/test-bugzilla-files/execute.sh
@@ -10,4 +10,5 @@ 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
+echo "$(date): Task finished: $dir_name"
 rm -r ${USERDIR}/libreoffice_$dir_name


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

2022-11-07 Thread Henner Drewes (via logerrit)
 vcl/source/control/PriorityMergedHBox.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 801e6272dc299d4468ec094ce11b66494eb5018b
Author: Henner Drewes 
AuthorDate: Fri Oct 21 10:07:45 2022 +0200
Commit: Heiko Tietze 
CommitDate: Mon Nov 7 14:45:05 2022 +0100

tdf#141684 fix disappearance of icons in Groupedbar and Groupedbar compact 
UI

Change-Id: I3f0e5edd196420c8c51b19cd1ceee8caba7f7fd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141612
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/vcl/source/control/PriorityMergedHBox.cxx 
b/vcl/source/control/PriorityMergedHBox.cxx
index 75a26daa52c1..c5e21c7c002c 100644
--- a/vcl/source/control/PriorityMergedHBox.cxx
+++ b/vcl/source/control/PriorityMergedHBox.cxx
@@ -27,6 +27,7 @@
 
 #define DUMMY_WIDTH 50
 #define BUTTON_WIDTH 30
+#define TEMP_WIDTH 200
 
 /*
 * PriorityMergedHBox is a VclHBox which hides its own children if there is no 
sufficient space.
@@ -57,6 +58,9 @@ void PriorityMergedHBox::Resize()
 }
 
 tools::Long nWidth = GetSizePixel().Width();
+if (nWidth <= 1 || nWidth == TEMP_WIDTH || nWidth == TEMP_WIDTH + 6)
+return VclHBox::Resize();
+
 tools::Long nCurrentWidth = VclHBox::calculateRequisition().getWidth() + 
BUTTON_WIDTH;
 
 // Hide lower priority controls
@@ -155,7 +159,7 @@ Size PriorityMergedHBox::calculateRequisition() const
 accumulateMaxes(aChildSize, aSize);
 }
 
-setPrimaryDimension(aSize, 200);
+setPrimaryDimension(aSize, TEMP_WIDTH);
 return finalizeMaxes(aSize, nVisibleChildren);
 }
 


[Libreoffice-commits] core.git: 2 commits - include/o3tl sc/source sw/inc

2022-11-07 Thread Andrea Gelmini (via logerrit)
 include/o3tl/sprintf.hxx   |2 +-
 sc/source/ui/dbgui/csvgrid.cxx |2 +-
 sw/inc/fmtmeta.hxx |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit cfd49dc149896925c641181b8d710a32d8ebc2da
Author: Andrea Gelmini 
AuthorDate: Mon Nov 7 13:28:29 2022 +0100
Commit: Julien Nabet 
CommitDate: Mon Nov 7 14:33:51 2022 +0100

Fix typos

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

diff --git a/include/o3tl/sprintf.hxx b/include/o3tl/sprintf.hxx
index 6491f4ad14d6..373fff744c91 100644
--- a/include/o3tl/sprintf.hxx
+++ b/include/o3tl/sprintf.hxx
@@ -22,7 +22,7 @@ namespace o3tl
 {
 // A drop-in replacement for safe uses of std::sprintf where it is statically 
known that the
 // provided buffer is large enough.  Compared to a plain use of std::sprintf, 
using o3tl::sprintf
-// for one makes it explicit that the call is considerd safe and for another 
avoids deprecation
+// for one makes it explicit that the call is considered safe and for another 
avoids deprecation
 // warnings on platforms like the macOS 13 SDK that mark std::sprintf as 
deprecated.  Many simple
 // uses of std::sprintf across the code base can be replaced with alternative 
code using e.g.
 // OString::number.  This is for the remaining formatting-rich cases for which 
there is no easy
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 27d76e2ac30b..b44cca04dee7 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -252,7 +252,7 @@ void ScCsvGrid::InitColors()
 maAppBackColor = mpColorConfig->GetColorValue( ::svtools::APPBACKGROUND 
).nColor;
 maTextColor = mpColorConfig->GetColorValue( ::svtools::FONTCOLOR, false 
).nColor;
 
-// tdf#147386 If Automatic font color is used, then check backgroud color 
and use Black/White as font color
+// tdf#147386 If Automatic font color is used, then check background color 
and use Black/White as font color
 if ( maTextColor == COL_AUTO )
 {
 if ( maBackColor.IsDark() )
commit deba3bdc70bae4297b26f67a2d5581a9f822debf
Author: Miklos Vajna 
AuthorDate: Mon Nov 7 11:16:26 2022 +0100
Commit: Miklos Vajna 
CommitDate: Mon Nov 7 14:33:12 2022 +0100

sw: make fmtmeta.hxx self-contained

sw/inc/fmtmeta.hxx:134:5: error: use of undeclared identifier 'unotools'
unotools::WeakReference m_wXMeta;
^

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

diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index ac94d120008d..6fba3bac2aa5 100644
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -22,7 +22,7 @@
 
 #include "calbck.hxx"
 
-#include 
+#include 
 
 #include 
 #include 


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

2022-11-07 Thread Andrea Gelmini (via logerrit)
 vcl/unx/gtk3/gtkframe.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5d94ca60781342fd8335d152a59c0fff89f0
Author: Andrea Gelmini 
AuthorDate: Mon Nov 7 13:28:34 2022 +0100
Commit: Julien Nabet 
CommitDate: Mon Nov 7 14:32:17 2022 +0100

Fix typo

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

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index b73304a78ddb..214262c6db11 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -3133,7 +3133,7 @@ bool GtkSalFrame::DrawingAreaButton(SalEvent nEventType, 
int nEventX, int nEvent
 
 void GtkSalFrame::UpdateGeometryFromEvent(int x_root, int y_root, int nEventX, 
int nEventY)
 {
-//tdf#151509 don't overwrite geometry for system childs
+//tdf#151509 don't overwrite geometry for system children
 if (m_nStyle & SalFrameStyleFlags::SYSTEMCHILD)
 return;
 


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

2022-11-07 Thread László Németh (via logerrit)
 xmloff/source/style/xmlnumfe.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0a93f33a2ec5bdbda446d35dfbeca1b7b8a3b8cb
Author: László Németh 
AuthorDate: Mon Nov 7 12:26:41 2022 +0100
Commit: László Németh 
CommitDate: Mon Nov 7 13:53:48 2022 +0100

xmloff: write transliteration-spellout only in extended ODF

Follow-up to commit 7c20c3c2a9fc85c66dad9d09908b257beeedd78d
"xmloff: ODF export: adapt all checks of ODFSVER_012 etc.".

Reported by Eike Rathke.

See also b7d53247eb2fab04f5f6d82d405f1ac0c73542b2
"tdf#115007 i18npool: add NatNum12 formats to locales" and
2a1d2d42af7f365330479f4032ddfdd9eeba7c1d
"tdf#115007 add NatNum12 number format list items, fix title case".

Change-Id: Idb25a37ffcad0a0fb05276b972561abf929cd81b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142373
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index abf03285f818..a2938b1d998d 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -1205,12 +1205,12 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt
 const bool bWriteSpellout = aAttr.Format.isEmpty();
 assert(bWriteSpellout); // mutually exclusive
 
-// Export only for 1.2 with extensions or 1.3 and later.
+// Export only for 1.2 and later with extensions
 SvtSaveOptions::ODFSaneDefaultVersion eVersion = 
rExport.getSaneDefaultVersion();
 // Also ensure that duplicated transliteration-language and
 // transliteration-country attributes never escape into the wild with
 // releases.
-if (eVersion > SvtSaveOptions::ODFSVER_012 && bWriteSpellout)
+if ( (eVersion & SvtSaveOptions::ODFSVER_EXTENDED) && bWriteSpellout )
 {
 /* FIXME-BCP47: ODF defines no transliteration-script or
  * transliteration-rfc-language-tag */


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

2022-11-07 Thread Noel Grandin (via logerrit)
 sw/source/core/undo/unattr.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 24122c202149761121ffde6788d1b28b6f3ca8f1
Author: Noel Grandin 
AuthorDate: Mon Nov 7 13:18:35 2022 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 7 13:52:48 2022 +0100

tdf#148719 Moving caption frame & undoing is shrinking caption frame

So the problem here is that when we call SwDoc::FindFormatByName we can
have the situation that there are two formats with the same name.

Those formats appear to have which ids
   159   RES_DRAWFRMFMT
   156   RES_FLYFRMFMT

Previously, the index was sorted by
   ... which ... name

which meant that the lower-valued which was always been returned.

After my path, the index is sorted by
   ...namewhich

The problem is call path is
   sw/source/core/undo/unattr.cxx:252 in SwUndoFormatAttr::GetFormat
where it calls
   rDoc.GetSpzFrameFormats()->FindFormatByName()

To fix it, use the findByTypeAndName method to explicitly specify which
which-id we are interested in.

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

diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 50e4670bfbfc..4813b4e269d0 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -248,10 +248,10 @@ SwFormat* SwUndoFormatAttr::GetFormat( const SwDoc& rDoc )
 case RES_DRAWFRMFMT:
 case RES_FLYFRMFMT:
 {
-SwFormat * pFormat = 
rDoc.GetSpzFrameFormats()->FindFormatByName(m_sFormatName);
-if (pFormat)
-return pFormat;
-pFormat = rDoc.GetFrameFormats()->FindFormatByName(m_sFormatName);
+auto it = rDoc.GetSpzFrameFormats()->findByTypeAndName( 
m_nFormatWhich, m_sFormatName );
+if( it != rDoc.GetSpzFrameFormats()->typeAndNameEnd() )
+return *it;
+SwFormat* pFormat = 
rDoc.GetFrameFormats()->FindFormatByName(m_sFormatName);
 if (pFormat)
 return pFormat;
 }


Re: Comparion of LogicalFontInstance::ImplGetGlyphBoundRect() between platforms

2022-11-07 Thread Caolán McNamara
On Mon, 2022-11-07 at 16:23 +1100, Chris Sherlock wrote:
> 
> A polite ping to the mailing list as people are now asking me for the
> rationale behind the patch, could someone please advise the way
> forward?

It's the output I was curious about. Is it the case you don't have a
mac locally? in which case I presume a one-time build using SAL_DEBUG
would capture the results in the build log of one of the macos builders



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

2022-11-07 Thread Rafael Lima (via logerrit)
 sw/uiconfig/swriter/ui/privateuserpage.ui |   35 ++
 1 file changed, 17 insertions(+), 18 deletions(-)

New commits:
commit 548bb942ca1aded0e5fd95230556a67639cad7d7
Author: Rafael Lima 
AuthorDate: Tue Sep 20 14:08:58 2022 +0200
Commit: Rafael Lima 
CommitDate: Mon Nov 7 13:38:58 2022 +0100

tdf#151061 Fix string inconsistencies in privateuserpage.ui

This patch fixes string inconsistencies pointed out by translators in the 
bug report.

Change-Id: I6d053f0aa9d6c45477598f8f5903cf0fc40f69f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140168
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sw/uiconfig/swriter/ui/privateuserpage.ui 
b/sw/uiconfig/swriter/ui/privateuserpage.ui
index 7d3d7eb5c20d..b247df536c7b 100644
--- a/sw/uiconfig/swriter/ui/privateuserpage.ui
+++ b/sw/uiconfig/swriter/ui/privateuserpage.ui
@@ -76,18 +76,13 @@
   
 
 
-  
+  
 True
 False
-Fa_x:
+Fa_x:
 True
 fax
 0
-
-  
-Home telephone 
number
-  
-
   
   
 0
@@ -95,10 +90,10 @@
   
 
 
-  
+  
 True
 False
-Homepage/email:
+Homepage/email:
 True
 url
 0
@@ -243,7 +238,7 @@
 True
 
   
-Home telephone 
number
+Fax number
 Type your fax number in this 
field.
   
 
@@ -276,7 +271,7 @@
 True
 
   
-Fax number
+Homepage
 Enter your home page
   
 
@@ -295,7 +290,7 @@
 True
 
   
-email 
address
+Email 
address
 Type your email 
address.
   
 
@@ -340,7 +335,7 @@
 True
 
   
-Last 
name
+First 
name
 Type your first 
name
   
 
@@ -359,7 +354,7 @@
 True
 
   
-First 
name
+Last 
name
 Type your last name 

   
 
@@ -473,6 +468,7 @@
 True
 
   
+Street
 Type the name of your street 
in this field.
   
 
@@ -504,6 +500,7 @@
 True
 
   
+Country
 Type the country 
name
   
 
@@ -522,6 +519,7 @@
 True
 
   
+State
 Type your state.
   
 
@@ -538,10 +536,10 @@
   
 
 
-  
+  
 True
 False
-Phone/mobile:
+Phone/mobile:
 True
 phone
 0
@@ -567,7 +565,7 @@
 True
 
   
-Title
+Phone 
number
 Type your phone 
number
   
 
@@ -586,7 +584,7 @@
 True
 
   
-Position
+Mobile phone 
number
 Type your mobile phone 
number
   
 
@@ -616,6 +614,7 @@
 
 
   
+Private data
 Contains personal 
contact information for business cards. Business card layouts are selected on 
the Business Cards tab.
   
 


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

2022-11-07 Thread Rafael Lima (via logerrit)
 sc/source/ui/dbgui/csvgrid.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit de387e611df7668fb86a409255de6d49eeef3e90
Author: Rafael Lima 
AuthorDate: Mon Oct 10 21:20:22 2022 +0200
Commit: Rafael Lima 
CommitDate: Mon Nov 7 13:16:24 2022 +0100

tdf#147386 Fix text color in CSV import dialog (dark mode)

If FONTCOLOR is set to Automatic, then check the background color and 
adjust the font color to Black or White depending whether the background is 
dark.

Change-Id: I3c277291f8aa3a3e63a050c28c8f17b05f4dbf2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141177
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 82e2909cc195..27d76e2ac30b 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -250,7 +250,16 @@ void ScCsvGrid::InitColors()
 maGridColor = mpColorConfig->GetColorValue( ::svtools::CALCGRID ).nColor;
 maGridPBColor = mpColorConfig->GetColorValue( ::svtools::CALCPAGEBREAK 
).nColor;
 maAppBackColor = mpColorConfig->GetColorValue( ::svtools::APPBACKGROUND 
).nColor;
-maTextColor = mpColorConfig->GetColorValue( ::svtools::FONTCOLOR ).nColor;
+maTextColor = mpColorConfig->GetColorValue( ::svtools::FONTCOLOR, false 
).nColor;
+
+// tdf#147386 If Automatic font color is used, then check backgroud color 
and use Black/White as font color
+if ( maTextColor == COL_AUTO )
+{
+if ( maBackColor.IsDark() )
+maTextColor = COL_WHITE;
+else
+maTextColor = COL_BLACK;
+}
 
 const StyleSettings& rSett = Application::GetSettings().GetStyleSettings();
 maHeaderBackColor = rSett.GetFaceColor();


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

2022-11-07 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   23 ---
 1 file changed, 23 deletions(-)

New commits:
commit 628efead20066f5ec4e3d2bf2bcc9e9513c6d04b
Author: Caolán McNamara 
AuthorDate: Mon Nov 7 09:18:44 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 7 12:37:01 2022 +0100

Revert recalcuting m_nTextCol when setting a cell editable

Revert: "vcl: allow editing a column other than the first one in 
GtkInstanceTreeView"

This reverts commit be11a3573a21e83dfb6a473d98bc8ba9bf57057c.

both basctl watchwindow and writer insert bookmark work as expected
without this.

.git/COMMIT_EDITMSG.save

Revert "vcl: allow editing a column other than the first one in 
GtkInstanceTreeView"

This reverts commit be11a3573a21e83dfb6a473d98bc8ba9bf57057c.

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 3ba69b9fdb53..82bd0e724483 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -14374,12 +14374,6 @@ private:
 {
 nCol = to_internal_model(nCol);
 
-// recompute these 2 based on new 1st editable column
-m_nTextCol = -1;
-m_nTextView = -1;
-int nIndex(0);
-int nViewColumn(0);
-bool isSet(false);
 for (GList* pEntry = g_list_first(m_pColumns); pEntry; pEntry = 
g_list_next(pEntry))
 {
 GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(pEntry->data);
@@ -14391,27 +14385,10 @@ private:
 if (reinterpret_cast(pData) == nCol)
 {
 g_object_set(G_OBJECT(pCellRenderer), "editable", 
bEditable, "editable-set", true, nullptr);
-isSet = true;
-}
-if (GTK_IS_CELL_RENDERER_TEXT(pCellRenderer))
-{
-gboolean is_editable(false);
-g_object_get(pCellRenderer, "editable", &is_editable, 
nullptr);
-if (is_editable && m_nTextCol == -1)
-{
-assert(m_nTextView == -1);
-m_nTextCol = nIndex;
-m_nTextView = nViewColumn;
-}
-}
-if (isSet && m_nTextCol != -1) // both tasks done?
-{
 break;
 }
-++nIndex;
 }
 g_list_free(pRenderers);
-++nViewColumn;
 }
 }
 


New Defects reported by Coverity Scan for LibreOffice

2022-11-07 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
2 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1516751:  Integer handling issues  (NEGATIVE_RETURNS)



*** CID 1516751:  Integer handling issues  (NEGATIVE_RETURNS)
/vcl/source/filter/ipdf/pdfdocument.cxx: 897 in 
vcl::filter::PDFDocument::Sign(const 
com::sun::star::uno::Reference &, const 
rtl::OUString &, bool)()
891 {
892 SAL_WARN("vcl.filter", "PDFDocument::Sign: failed to find page 
#" << nPage);
893 return false;
894 }
895 
896 PDFObjectElement& rPage = *aPages[nPage];
>>> CID 1516751:  Integer handling issues  (NEGATIVE_RETURNS)
>>> "nAppearanceId" is passed to a parameter that cannot be negative.
897 sal_Int32 nAnnotId = WriteAnnotObject(rPage, nSignatureId, 
nAppearanceId, aSignatureRectangle);
898 
899 if (!WritePageObject(rPage, nAnnotId))
900 {
901 SAL_WARN("vcl.filter", "PDFDocument::Sign: failed to write the 
updated Page object");
902 return false;



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D5uri_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJinhxSAlPR0k0-2FuRlgdpMWW3n-2BETs5D12sNdxcWsnbWXRmWNoWtdnvOKJ-2B875jj40SIci86FnRC4g89rl0m0HfbMtwBQLtZSeH9pPpUYKCvp9Z76UUOQ3lQSoYGCBzU3u30rSxRvPCgOrbnMWBdaMNaGz9A5rdvXsgRTZDzxohypo-3D



[Libreoffice-commits] core.git: chart2/qa oox/CppunitTest_oox_drawingml.mk oox/qa sc/qa sw/qa

2022-11-07 Thread Nalini Prasad Dash (via logerrit)
 chart2/qa/extras/chart2import.cxx |2 +-
 oox/CppunitTest_oox_drawingml.mk  |1 +
 oox/qa/unit/drawingml.cxx |4 ++--
 sc/qa/unit/SparklineImportExportTest.cxx  |6 +++---
 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx |2 +-
 5 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit aa5e2b24ebca3b36becf77e466eb1702e1f97301
Author: Nalini Prasad Dash 
AuthorDate: Sun Oct 23 22:18:40 2022 +0530
Commit: Ilmari Lauhakangas 
CommitDate: Mon Nov 7 09:58:04 2022 +0100

tdf#141908 - CppUnittests: replace usage of sal_Int32 with colors

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

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index 57c8837df36b..b707b91d8c6d 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -801,7 +801,7 @@ void Chart2ImportTest::testBnc889755()
 awt::Gradient aTransparence;
 xShapeProps->getPropertyValue("FillTransparenceGradient") >>= 
aTransparence;
 CPPUNIT_ASSERT(aTransparence.StartColor != aTransparence.EndColor);
-CPPUNIT_ASSERT_EQUAL(static_cast(0xff), 
aTransparence.StartColor);
+CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(ColorTransparency, 
aTransparence.StartColor));
 }
 
 void Chart2ImportTest::testBnc882383()
diff --git a/oox/CppunitTest_oox_drawingml.mk b/oox/CppunitTest_oox_drawingml.mk
index 4523acc4aa3d..1e47063cc3b6 100644
--- a/oox/CppunitTest_oox_drawingml.mk
+++ b/oox/CppunitTest_oox_drawingml.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_CppunitTest_use_libraries,oox_drawingml, \
 sal \
 subsequenttest \
 test \
+tl \
 unotest \
 utl \
 ))
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index 6150e4499eed..5c0b17e192f6 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -183,11 +183,11 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testGradientMultiStepTransparency)
 xShapeProps->getPropertyValue("FillTransparenceGradient") >>= 
aTransparence;
 
 // Without the accompanying fix in place, this test would have failed with:
-// - Expected: 16777215 (0xff)
+// - Expected: 16777215 (COL_WHITE)
 // - Actual  : 3487029 (0x353535)
 // i.e. the end transparency was not 100%, but was 21%, leading to an 
unexpected visible line on
 // the right of this shape.
-CPPUNIT_ASSERT_EQUAL(static_cast(0xff), 
aTransparence.EndColor);
+CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(ColorTransparency, 
aTransparence.EndColor));
 }
 
 CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAlignment)
diff --git a/sc/qa/unit/SparklineImportExportTest.cxx 
b/sc/qa/unit/SparklineImportExportTest.cxx
index 63302f79f361..e659a5af217a 100644
--- a/sc/qa/unit/SparklineImportExportTest.cxx
+++ b/sc/qa/unit/SparklineImportExportTest.cxx
@@ -60,8 +60,8 @@ void checkSparklines(ScDocument& rDocument)
 
 CPPUNIT_ASSERT_EQUAL(Color(0x376092), rAttributes.getColorSeries());
 CPPUNIT_ASSERT_EQUAL(Color(0x00b050), rAttributes.getColorNegative());
-CPPUNIT_ASSERT_EQUAL(Color(0x00), rAttributes.getColorAxis());
-CPPUNIT_ASSERT_EQUAL(Color(0x00), rAttributes.getColorMarkers());
+CPPUNIT_ASSERT_EQUAL(COL_BLACK, rAttributes.getColorAxis());
+CPPUNIT_ASSERT_EQUAL(COL_BLACK, rAttributes.getColorMarkers());
 CPPUNIT_ASSERT_EQUAL(Color(0x7030a0), rAttributes.getColorFirst());
 CPPUNIT_ASSERT_EQUAL(Color(0xff), rAttributes.getColorLast());
 CPPUNIT_ASSERT_EQUAL(Color(0x92d050), rAttributes.getColorHigh());
@@ -93,7 +93,7 @@ void checkSparklines(ScDocument& rDocument)
 
 CPPUNIT_ASSERT_EQUAL(Color(0x376092), rAttributes.getColorSeries());
 CPPUNIT_ASSERT_EQUAL(Color(0xff), rAttributes.getColorNegative());
-CPPUNIT_ASSERT_EQUAL(Color(0x00), rAttributes.getColorAxis());
+CPPUNIT_ASSERT_EQUAL(COL_BLACK, rAttributes.getColorAxis());
 CPPUNIT_ASSERT_EQUAL(Color(0xd0), rAttributes.getColorMarkers());
 CPPUNIT_ASSERT_EQUAL(Color(0x92d050), rAttributes.getColorFirst());
 CPPUNIT_ASSERT_EQUAL(Color(0x00b0f0), rAttributes.getColorLast());
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
index aa6fc8406b96..bd1c93cafedd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
@@ -586,7 +586,7 @@ DECLARE_OOXMLEXPORT_TEST(testTextframeGradient, 
"textframe-gradient.docx")
 xFrame.set(getShape(2), uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, 
getProperty(xFrame, "FillStyle"));
 aGradient = getProperty(xFrame, "FillGradient");
-CPPUNIT_ASSERT_EQUAL(Color(0x00), Color(ColorTransparency, 
aGradient.StartColor));
+CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTr

MacUpdate - your app listing has been updated

2022-11-07 Thread MacUpdate
Title: Untitled Document








  




  




  




  

  
  

  
  

  

  

   App Listing Updated
  Hi The Document Foundation, We have updated your application listing for LibreOffice 7.4.2.3 on MacUpdate.com. Please take a moment to review your application's information to make sure that everything is correct. 
 	
  
  

  
View your updated app listing 
  

  
  
You can login to your Developer Account to reply to comments and view stats, or submit new updates and changes to your app listing.
  

  

  
  

  

		
		
  

		
		
 
		
		
  
  
Desktop Install Compatibility
  MacUpdate Desktop 6 is helping developers  make it easier for users to fully install and use their apps. Download Desktop 6 and to ensure your app works with the “Install” link on our download pages.
		  
		  
   
		  
		  
		  
  
	  
	  
	  

  

  
  

  

Advertise With MacUpdate
The best Mac devs advertise their apps on MacUpdate.com because it’s the most targeted, highly performing Mac app advertising you can find on the web. Contact a...@macupdate.com to guarantee your annual ad campaigns get booked and expand your app’s audience.

  
  



  
Learn more

  



  

  
  

  
Questions? Contact our Content Update Team upda...@macupdate.com.
  

  
  

  
  

  
You are receiving this offer because you have an app listed on MacUpdate.com. Add us to your address book or white list to ensure reliable delivery.
	
  © 2018 MacUpdate  - All Rights Reserved
  526 W. 14th St. #100 • Traverse City, MI 49684
  

  




  




  




  










[Libreoffice-commits] core.git: sal/osl

2022-11-07 Thread Dr. David Alan Gilbert (via logerrit)
 sal/osl/unx/file.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 503195ad4df320da568fe089b4d0de2f761be660
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Nov 5 18:50:15 2022 +
Commit: Noel Grandin 
CommitDate: Mon Nov 7 09:11:30 2022 +0100

file: Use calloc

Current code does, malloc->memset,  that's what calloc is for.

Change-Id: Ie3a4872249f78442b96f98c9dad9d7170afe784c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142345
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index ac93ffacd13f..a39365b9b115 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -202,9 +202,7 @@ FileHandle_Impl::FileHandle_Impl(int fd, enum Kind kind, 
OString path)
 if (pagesize != size_t(-1))
 {
 m_bufsiz = pagesize;
-m_buffer = static_cast(malloc(m_bufsiz));
-if (m_buffer)
-memset(m_buffer, 0, m_bufsiz);
+m_buffer = static_cast(calloc(1, m_bufsiz));
 }
 }
 }


[Libreoffice-commits] core.git: sal/osl

2022-11-07 Thread Dr. David Alan Gilbert (via logerrit)
 sal/osl/unx/tempfile.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 0d9613b77fc653c6144b5e4f0136c0536300c0db
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Nov 5 18:44:05 2022 +
Commit: Noel Grandin 
CommitDate: Mon Nov 7 09:11:04 2022 +0100

TempFile: clear handle on close

If we close the file on error, then clear the handle we returned to
the caller so it doesn't try and close it again or do anything else
with it.

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

diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx
index 29a4d453f80c..3a7138b5218d 100644
--- a/sal/osl/unx/tempfile.cxx
+++ b/sal/osl/unx/tempfile.cxx
@@ -330,7 +330,13 @@ oslFileError SAL_CALL osl_createTempFile(
 }
 
 if (temp_file_handle)
+{
 osl_closeFile(temp_file_handle);
+if (pHandle)
+{
+*pHandle = nullptr;
+}
+}
 
 rtl_uString_release(base_directory);
 


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

2022-11-07 Thread Dr. David Alan Gilbert (via logerrit)
 comphelper/source/misc/backupfilehelper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fa40ea19dbea5f0618d86da8626c35e734bb5220
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Nov 5 18:33:07 2022 +
Commit: Noel Grandin 
CommitDate: Mon Nov 7 09:09:14 2022 +0100

TempFile: Initialise handle

If the tempfile creation fails, the handle is left uninitialised
but we still try and close it, and we explode with various
pthread locking corruptions.

I think this could be the cause of a bunch of the:
https://crashreport.libreoffice.org/stats/signature/osl_closeFile

I can trigger it on Linux by setting TMPDIR to a bogus value,
but I don't think that's all the cases that we see in the crash reports.

Initialising it to null makes the close take a safe path.

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

diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index d225b9f301d9..e9b173a47369 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -1244,7 +1244,7 @@ namespace
 {
 // need to create a new pack file, do this in a temp file to 
which data
 // will be copied from local file (so keep it here until this 
is done)
-oslFileHandle aHandle;
+oslFileHandle aHandle = nullptr;
 OUString aTempURL;
 
 // open target temp file - it exists until deleted