[Libreoffice-commits] core.git: Branch 'feature/cib_contract6721c' - bin/symstore.sh

2021-11-16 Thread Thorsten Behrens (via logerrit)
 bin/symstore.sh |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 7d8060e9f19eed809eb6b8b7f83b0967a8da
Author: Thorsten Behrens 
AuthorDate: Wed Aug 18 22:48:46 2021 +0200
Commit: Vasily Melenchuk 
CommitDate: Wed Nov 17 10:40:38 2021 +0300

Teach symstore more duplicated DLLs

Amending commit b4dfba947768834ffecc09056992019878711c8b with
adding the copied DLLs here, too (symstore complains otherwise)

Change-Id: If5cc155cf2fe11b0f97cd152993609fd2c835316
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120686
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/bin/symstore.sh b/bin/symstore.sh
index c4e9870c9aa5..2734f1b22a58 100755
--- a/bin/symstore.sh
+++ b/bin/symstore.sh
@@ -16,6 +16,8 @@ EXCLUDE_LIST="python.exe"
 #
 # Same format as for EXCLUDE_LIST above
 MOREPDBS_OKLIST="libcurl.dll
+libcrypto-1_1.dll
+libssl-1_1.dll
 freebl3.dll
 libeay32.dll
 nspr4.dll


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

2021-11-16 Thread Stephan Bergmann (via logerrit)
 vcl/skia/gdiimpl.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 8ab30014e4e098e202b3bee571aa9d6bcdfa1c70
Author: Stephan Bergmann 
AuthorDate: Wed Nov 17 07:32:47 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Nov 17 08:38:34 2021 +0100

loplugin:simplifybool

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

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index ac6f33ea7398..6a01601662a4 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1728,8 +1728,7 @@ sk_sp 
SkiaSalGraphicsImpl::mergeCacheBitmaps(const SkiaSalBitmap& bitma
 // that they are the same size, or that one prefers a shader or doesn't 
exist
 // (i.e. avoid two images of different size).
 bitmapReady = bitmap.GetSkImage(DirectImage::Yes) != nullptr;
-alphaBitmapReady
-= alphaBitmap ? alphaBitmap->GetAlphaSkImage(DirectImage::Yes) != 
nullptr : false;
+alphaBitmapReady = alphaBitmap && 
alphaBitmap->GetAlphaSkImage(DirectImage::Yes) != nullptr;
 if (bitmapReady && alphaBitmap && !alphaBitmapReady && 
!alphaBitmap->PreferSkShader())
 bitmapReady = false;
 if (alphaBitmapReady && !bitmapReady && bitmap.PreferSkShader())


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

2021-11-16 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport15.cxx |   47 ++---
 1 file changed, 30 insertions(+), 17 deletions(-)

New commits:
commit a36a2c33c60d5d379d4db5c1727c8c47504cc828
Author: Miklos Vajna 
AuthorDate: Tue Nov 16 20:00:26 2021 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 17 08:09:25 2021 +0100

CppunitTest_sw_ooxmlexport15: avoid DECLARE_OOXMLEXPORT_EXPORTONLY_TEST()

See commit a226cec52e536c46e03f57a5f1f7931abbeb0cdd
(CppunitTest_sw_rtfimport: convert one testcase to use
CPPUNIT_TEST_FIXTURE(), 2019-11-05) for motivation.

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index d5da1882eb35..90bec94421f1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -38,8 +38,9 @@ protected:
 }
 };
 
-DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123621, "tdf123621.docx")
+CPPUNIT_TEST_FIXTURE(Test, testTdf123621)
 {
+loadAndSave("tdf123621.docx");
 xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
 
 assertXPathContent(pXmlDocument, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
@@ -132,8 +133,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf137850_compat15ZOrder, 
"tdf137850_compat15ZOrder
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox is in the foreground", true, 
getProperty(xShape, "Opaque"));
 }
 
-DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf118701, "tdf118701.docx")
+CPPUNIT_TEST_FIXTURE(Test, testTdf118701)
 {
+loadAndSave("tdf118701.docx");
 // This was 6, related to moving inline images after the page breaks
 CPPUNIT_ASSERT_EQUAL(4, getPages());
 
@@ -721,15 +723,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf131561_necessaryBorder, 
"tdf131561_necessaryBord
 CPPUNIT_ASSERT_MESSAGE("Border between A3 and B3", (aBorderR.LineWidth + 
aBorderL.LineWidth) > 0);
 }
 
-DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf135655, "tdf135655.odt")
+CPPUNIT_TEST_FIXTURE(Test, testTdf135655)
 {
+loadAndSave("tdf135655.odt");
 const xmlDocUniquePtr pExpDoc = parseExport();
 const OUString sXFillColVal = getXPath(pExpDoc, 
"/w:document/w:body/w:p/w:r/w:object/v:shape", "fillcolor");
 CPPUNIT_ASSERT_EQUAL(OUString("#00A933"), sXFillColVal);
 }
 
-DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf138374, "tdf138374.odt")
+CPPUNIT_TEST_FIXTURE(Test, testTdf138374)
 {
+loadAndSave("tdf138374.odt");
 xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
 assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:pict/v:shape", 
"fillcolor", "#ffd320");
 assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:pict/v:shape", 
"coordsize", "1315,6116");
@@ -764,8 +768,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf135329_lostImage, 
"tdf135329_lostImage.odt")
 uno::Reference xImageProps(getShape(2), 
uno::UNO_QUERY_THROW);
 }
 
-DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf136441_commentInFootnote, 
"tdf136441_commentInFootnote.odt")
+CPPUNIT_TEST_FIXTURE(Test, testTdf136441_commentInFootnote)
 {
+loadAndSave("tdf136441_commentInFootnote.odt");
 // failed to load without error if footnote contained a comment.
 // (MS Word's UI doesn't allow adding comments to a footnote.)
 }
@@ -802,8 +807,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf125268, "tdf125268.odt")
 CPPUNIT_ASSERT_EQUAL(static_cast(COL_BLACK), 
getProperty(xRun,"CharBackColor"));
 }
 
-DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf138345_numberingHighlight, 
"tdf138345_numberingHighlight.docx")
+CPPUNIT_TEST_FIXTURE(Test, testTdf138345_numberingHighlight)
 {
+loadAndSave("tdf138345_numberingHighlight.docx");
 // Before the fix, the highlight was completely lost.
 xmlDocUniquePtr pXmlStyles = parseExport("word/numbering.xml");
 if (pXmlStyles)
@@ -852,8 +858,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf135665, "tdf135665.docx")
 CPPUNIT_ASSERT_EQUAL_MESSAGE("OLE tight wrap setting not imported 
correctly", false, bSurroundContour2);
 }
 
-DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAtPageShapeRelOrientation, 
"rotated_shape.fodt")
+CPPUNIT_TEST_FIXTURE(Test, testAtPageShapeRelOrientation)
 {
+loadAndSave("rotated_shape.fodt");
 // invalid combination of at-page anchor and horizontal-rel="paragraph"
 // caused relativeFrom="column" instead of relativeFrom="page"
 
@@ -887,8 +894,9 @@ 
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAtPageShapeRelOrientation, "rotated_shap
 CPPUNIT_ASSERT(style.indexOf("v-text-anchor:middle") != -1);
 }
 
-DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testVMLallowincell, 
"shape-atpage-in-table.fodt")
+CPPUNIT_TEST_FIXTURE(Test, testVMLallowincell)
 {
+loadAndSave("shape-atpage-in-table.fodt");
 xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
 
 // VML o:allowincell, apparently the defa

[Libreoffice-commits] core.git: 2 commits - icon-themes/sifr icon-themes/sifr_dark icon-themes/sifr_dark_svg icon-themes/sifr_svg sc/source

2021-11-16 Thread Rizal Muttaqin (via logerrit)
 icon-themes/sifr/cmd/32/developmenttoolsdockingwindow.png  |binary
 icon-themes/sifr/cmd/lc_developmenttoolsdockingwindow.png  |binary
 icon-themes/sifr/cmd/sc_developmenttoolsdockingwindow.png  |binary
 icon-themes/sifr_dark/cmd/32/developmenttoolsdockingwindow.png |binary
 icon-themes/sifr_dark/cmd/lc_developmenttoolsdockingwindow.png |binary
 icon-themes/sifr_dark/cmd/sc_developmenttoolsdockingwindow.png |binary
 icon-themes/sifr_dark_svg/cmd/32/developmenttoolsdockingwindow.svg |1 
 icon-themes/sifr_dark_svg/cmd/lc_developmenttoolsdockingwindow.svg |1 
 icon-themes/sifr_dark_svg/cmd/sc_developmenttoolsdockingwindow.svg |1 
 icon-themes/sifr_svg/cmd/32/developmenttoolsdockingwindow.svg  |1 
 icon-themes/sifr_svg/cmd/lc_developmenttoolsdockingwindow.svg  |1 
 icon-themes/sifr_svg/cmd/sc_developmenttoolsdockingwindow.svg  |1 
 sc/source/ui/view/cellsh3.cxx  |   12 
++
 13 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 8a323e6904beba41dfdf054fcbaeac1d44fabc1e
Author: Rizal Muttaqin 
AuthorDate: Wed Nov 17 11:16:54 2021 +0700
Commit: Rizal Muttaqin 
CommitDate: Wed Nov 17 07:11:56 2021 +0100

Sifr: tdf#144036 add UNO Object Inspector

Change-Id: Ibfdf0572c20e1ada6a8e09e1303fb14c13bd0089
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125343
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin 

diff --git a/icon-themes/sifr/cmd/32/developmenttoolsdockingwindow.png 
b/icon-themes/sifr/cmd/32/developmenttoolsdockingwindow.png
new file mode 100644
index ..fa45401ac60b
Binary files /dev/null and 
b/icon-themes/sifr/cmd/32/developmenttoolsdockingwindow.png differ
diff --git a/icon-themes/sifr/cmd/lc_developmenttoolsdockingwindow.png 
b/icon-themes/sifr/cmd/lc_developmenttoolsdockingwindow.png
new file mode 100644
index ..a5dd3230ce63
Binary files /dev/null and 
b/icon-themes/sifr/cmd/lc_developmenttoolsdockingwindow.png differ
diff --git a/icon-themes/sifr/cmd/sc_developmenttoolsdockingwindow.png 
b/icon-themes/sifr/cmd/sc_developmenttoolsdockingwindow.png
new file mode 100644
index ..b1e1e1730946
Binary files /dev/null and 
b/icon-themes/sifr/cmd/sc_developmenttoolsdockingwindow.png differ
diff --git a/icon-themes/sifr_dark/cmd/32/developmenttoolsdockingwindow.png 
b/icon-themes/sifr_dark/cmd/32/developmenttoolsdockingwindow.png
new file mode 100644
index ..2124a9d58d88
Binary files /dev/null and 
b/icon-themes/sifr_dark/cmd/32/developmenttoolsdockingwindow.png differ
diff --git a/icon-themes/sifr_dark/cmd/lc_developmenttoolsdockingwindow.png 
b/icon-themes/sifr_dark/cmd/lc_developmenttoolsdockingwindow.png
new file mode 100644
index ..62b353268e52
Binary files /dev/null and 
b/icon-themes/sifr_dark/cmd/lc_developmenttoolsdockingwindow.png differ
diff --git a/icon-themes/sifr_dark/cmd/sc_developmenttoolsdockingwindow.png 
b/icon-themes/sifr_dark/cmd/sc_developmenttoolsdockingwindow.png
new file mode 100644
index ..3e7ceaaa91ee
Binary files /dev/null and 
b/icon-themes/sifr_dark/cmd/sc_developmenttoolsdockingwindow.png differ
diff --git a/icon-themes/sifr_dark_svg/cmd/32/developmenttoolsdockingwindow.svg 
b/icon-themes/sifr_dark_svg/cmd/32/developmenttoolsdockingwindow.svg
new file mode 100644
index ..e65d7439d9d7
--- /dev/null
+++ b/icon-themes/sifr_dark_svg/cmd/32/developmenttoolsdockingwindow.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/icon-themes/sifr_dark_svg/cmd/lc_developmenttoolsdockingwindow.svg 
b/icon-themes/sifr_dark_svg/cmd/lc_developmenttoolsdockingwindow.svg
new file mode 100644
index ..659f74db4156
--- /dev/null
+++ b/icon-themes/sifr_dark_svg/cmd/lc_developmenttoolsdockingwindow.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/icon-themes/sifr_dark_svg/cmd/sc_developmenttoolsdockingwindow.svg 
b/icon-themes/sifr_dark_svg/cmd/sc_developmenttoolsdockingwindow.svg
new file mode 100644
index ..dcd293238ead
--- /dev/null
+++ b/icon-themes/sifr_dark_svg/cmd/sc_developmenttoolsdockingwindow.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/icon-themes/sifr_svg/cmd/32/developmenttoolsdockingwindow.svg 
b/icon-themes/sifr_svg/cmd/32/developmenttoolsdockingwindow.svg
new file mode 100644
index ..d0fd50749e57
--- /dev/null
+++ b/icon-themes/sifr_svg/cmd/32/developmenttoolsdockingwindow.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/icon-themes/sifr_svg/cmd/lc_developmenttoolsdockingwindow.svg 
b/icon-themes/sifr_svg/cmd/lc_developmenttoolsdockingwindow.svg
new file mode 100644
index ..11eb0d30640c
--- /dev/null
+++ b/icon-themes/sifr_svg/cmd/lc_developmenttoolsdockingwindow.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end o

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

2021-11-16 Thread Julien Nabet (via logerrit)
 dbaccess/source/ui/misc/WCopyTable.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8ee18d0bb587a30d53e2f1e3cf277d9b18da24ae
Author: Julien Nabet 
AuthorDate: Mon Nov 15 21:43:39 2021 +0100
Commit: Julien Nabet 
CommitDate: Wed Nov 17 07:05:40 2021 +0100

Clear also m_aDestTypeInfo in dtor like m_aTypeInfo (dbaccess/WCopyTable)

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

diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx 
b/dbaccess/source/ui/misc/WCopyTable.cxx
index 376c882d373f..03458111fc73 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -671,6 +671,7 @@ OCopyTableWizard::~OCopyTableWizard()
 m_aTypeInfoIndex.clear();
 m_aTypeInfo.clear();
 m_aDestTypeInfoIndex.clear();
+m_aDestTypeInfo.clear();
 }
 
 IMPL_LINK_NOARG(OCopyTableWizard, ImplPrevHdl, weld::Button&, void)


[Libreoffice-commits] core.git: solenv/bin

2021-11-16 Thread Mike Kaganski (via logerrit)
 solenv/bin/modules/installer/pathanalyzer.pm |4 ++--
 solenv/bin/modules/pre2par/pathanalyzer.pm   |5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit f007f32958a7c875db6cb2e79c09ab0965477a2a
Author: Mike Kaganski 
AuthorDate: Wed Nov 17 01:17:17 2021 +0300
Commit: Mike Kaganski 
CommitDate: Wed Nov 17 06:15:17 2021 +0100

tdf#145711: filename may be 1-character, and must not contain path separator

Surfaced after 6ea7ca45782a7e1b46e18e994534ec0a7c71951b

Change-Id: I4975f51a7a0ca73eccfd17338abc122254b57113
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125338
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/solenv/bin/modules/installer/pathanalyzer.pm 
b/solenv/bin/modules/installer/pathanalyzer.pm
index 7f3f68a4edb2..312042acb1a0 100644
--- a/solenv/bin/modules/installer/pathanalyzer.pm
+++ b/solenv/bin/modules/installer/pathanalyzer.pm
@@ -47,7 +47,7 @@ sub make_absolute_filename_to_relative_filename
 
 if ( $installer::globals::isunix )
 {
-if ( $$longfilenameref =~ /^.*\/(\S.+\S?)/ )
+if ( $$longfilenameref =~ /^.*\/(?=\S)([^\/]+)(?<=\S)/ )
 {
 $$longfilenameref = $1;
 }
@@ -56,7 +56,7 @@ sub make_absolute_filename_to_relative_filename
 if ( $installer::globals::iswin )
 {
 # Either '/' or '\'. It would be possible to use 
$installer::globals::separator.
-if ( $$longfilenameref =~ /^.*[\/\\](\S.+\S?)/ )
+if ( $$longfilenameref =~ /^.*[\/\\](?=\S)([^\/\\]+)(?<=\S)/ )
 {
 $$longfilenameref = $1;
 }
diff --git a/solenv/bin/modules/pre2par/pathanalyzer.pm 
b/solenv/bin/modules/pre2par/pathanalyzer.pm
index 0aefcd1b43c8..4d2eb31ae073 100644
--- a/solenv/bin/modules/pre2par/pathanalyzer.pm
+++ b/solenv/bin/modules/pre2par/pathanalyzer.pm
@@ -48,7 +48,7 @@ sub make_absolute_filename_to_relative_filename
 
 if ( $pre2par::globals::isunix )
 {
-if ( $$longfilenameref =~ /^.*\/(\S.+\S?)/ )
+if ( $$longfilenameref =~ /^.*\/(?=\S)([^\/]+)(?<=\S)/ )
 {
 $$longfilenameref = $1;
 }
@@ -56,7 +56,8 @@ sub make_absolute_filename_to_relative_filename
 
 if ( $pre2par::globals::iswin )
 {
-if ( $$longfilenameref =~ /^.*\\(\S.+\S?)/ )
+# Either '/' or '\'.
+if ( $$longfilenameref =~ /^.*[\/\\](?=\S)([^\/\\]+)(?<=\S)/ )
 {
 $$longfilenameref = $1;
 }


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

2021-11-16 Thread Eike Rathke (via logerrit)
 i18nutil/source/utility/unicode.cxx |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit eec32be26d5d5805c1cb8cb53ce9702c04829819
Author: Eike Rathke 
AuthorDate: Wed Nov 17 00:07:39 2021 +0100
Commit: Eike Rathke 
CommitDate: Wed Nov 17 01:51:05 2021 +0100

Add script codes to standalone {mis} tags

Also, mis-Medf is dmf-Medf.

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

diff --git a/i18nutil/source/utility/unicode.cxx 
b/i18nutil/source/utility/unicode.cxx
index 49a0f4dafc1e..b4e3640d3d71 100644
--- a/i18nutil/source/utility/unicode.cxx
+++ b/i18nutil/source/utility/unicode.cxx
@@ -572,11 +572,11 @@ OString 
unicode::getExemplarLanguageForUScriptCode(UScriptCode eScript)
 case USCRIPT_MANDAEAN: /* Aliased to USCRIPT_MANDAIC in icu 4.6. */
 sRet = "mic";
 break;
-case USCRIPT_NABATAEAN: //no language with an assigned code yet
-sRet = "mis";
+case USCRIPT_NABATAEAN:
+sRet = "mis-Nbat";  // Uncoded with script
 break;
-case USCRIPT_PALMYRENE: //no language with an assigned code yet
-sRet = "mis";
+case USCRIPT_PALMYRENE:
+sRet = "mis-Palm";  // Uncoded with script
 break;
 case USCRIPT_BAMUM:
 sRet = "bax";
@@ -633,8 +633,8 @@ OString 
unicode::getExemplarLanguageForUScriptCode(UScriptCode eScript)
 case USCRIPT_MRO:
 sRet = "cmr";
 break;
-case USCRIPT_NUSHU: //no language with an assigned code yet
-sRet = "mis";
+case USCRIPT_NUSHU:
+sRet = "mis-Nshu";  // Uncoded with script
 break;
 case USCRIPT_SHARADA:
 sRet = "sa";
@@ -693,10 +693,10 @@ OString 
unicode::getExemplarLanguageForUScriptCode(UScriptCode eScript)
 #endif
 #if (U_ICU_VERSION_MAJOR_NUM >= 58)
 case USCRIPT_ADLAM:
-sRet = "mis";   // Adlm - Adlam for Fulani, no language code
+sRet = "mis-Adlm";   // Adlam for Fulani, no language code
 break;
 case USCRIPT_BHAIKSUKI:
-sRet = "mis";   // Bhks - Bhaiksuki for some Buddhist texts, no 
language code
+sRet = "mis-Bhks";   // Bhaiksuki for some Buddhist texts, no 
language code
 break;
 case USCRIPT_MARCHEN:
 sRet = "bo-Marc";
@@ -708,13 +708,13 @@ OString 
unicode::getExemplarLanguageForUScriptCode(UScriptCode eScript)
 sRet = "osa-Osge";
 break;
 case USCRIPT_HAN_WITH_BOPOMOFO:
-sRet = "mis";   // Hanb - Han with Bopomofo, zh-Hanb ?
+sRet = "mis-Hanb";   // Han with Bopomofo, zh-Hanb ?
 break;
 case USCRIPT_JAMO:
 sRet = "ko";   // Jamo - elements of Hangul Syllables
 break;
 case USCRIPT_SYMBOLS_EMOJI:
-sRet = "mis";   // Zsye - Emoji variant
+sRet = "mis-Zsye";   // Emoji variant
 break;
 #endif
 #if (U_ICU_VERSION_MAJOR_NUM >= 60)
@@ -739,7 +739,7 @@ OString 
unicode::getExemplarLanguageForUScriptCode(UScriptCode eScript)
 sRet = "mak";
 break;
 case USCRIPT_MEDEFAIDRIN:
-sRet = "mis-Medf";  // Uncoded with script
+sRet = "dmf-Medf";
 break;
 case USCRIPT_HANIFI_ROHINGYA:
 sRet = "rhg";


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

2021-11-16 Thread Stephan Bergmann (via logerrit)
 vcl/inc/skia/osx/gdiimpl.hxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 696e60427e6c355cfaca35f7b93d2001f0a12604
Author: Stephan Bergmann 
AuthorDate: Tue Nov 16 15:57:55 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 16 22:40:44 2021 +0100

loplugin:finalprotected

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

diff --git a/vcl/inc/skia/osx/gdiimpl.hxx b/vcl/inc/skia/osx/gdiimpl.hxx
index 42a8257f8b8f..e59aa60f56df 100644
--- a/vcl/inc/skia/osx/gdiimpl.hxx
+++ b/vcl/inc/skia/osx/gdiimpl.hxx
@@ -43,10 +43,8 @@ public:
 virtual void Flush() override;
 virtual void Flush(const tools::Rectangle&) override;
 
-protected:
-virtual int getWindowScaling() const override;
-
 private:
+virtual int getWindowScaling() const override;
 virtual void createWindowSurfaceInternal(bool forceRaster = false) 
override;
 virtual void flushSurfaceToWindowContext() override;
 void flushSurfaceToScreenCG();


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

2021-11-16 Thread Caolán McNamara (via logerrit)
 editeng/source/misc/svxacorr.cxx |2 +-
 include/editeng/svxacorr.hxx |2 +-
 sw/source/core/edit/acorrect.cxx |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d5811039430e5a76643491c68fed75691969afbd
Author: Caolán McNamara 
AuthorDate: Tue Nov 16 14:54:07 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 16 22:14:33 2021 +0100

WrtStt->WrdStt for consistency with the other word start abbrevs

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

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 6dfe778f2631..16d443dce4b5 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1680,7 +1680,7 @@ bool SvxAutoCorrect::AddCplSttException( const OUString& 
rNew,
 }
 
 // Adds a single word. The list will immediately be written to the file!
-bool SvxAutoCorrect::AddWrtSttException( const OUString& rNew,
+bool SvxAutoCorrect::AddWrdSttException( const OUString& rNew,
  LanguageType eLang )
 {
 SvxAutoCorrectLanguageLists* pLists = nullptr;
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index 4d21049a9d3c..a0d85002d01a 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -392,7 +392,7 @@ public:
 const SvStringsISortDtor* GetWrdSttExceptList( LanguageType eLang )
 {   return GetLanguageList_( eLang ).GetWrdSttExceptList(); }
 // Adds a single word. The list will be immediately written to the file!
-bool AddWrtSttException( const OUString& rNew, LanguageType eLang);
+bool AddWrdSttException( const OUString& rNew, LanguageType eLang);
 
 // Search through the Languages for the entry
 bool FindInWrdSttExceptList( LanguageType eLang, const OUString& sWord );
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 1ad211fa4354..d937bf6b1798 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -624,7 +624,7 @@ void SwAutoCorrExceptWord::CheckChar( const SwPosition& 
rPos, sal_Unicode cChr )
 
 // then add to the list:
 if (ACFlags::CapitalStartWord & m_nFlags)
-pACorr->AddWrtSttException(m_sWord, m_eLanguage);
+pACorr->AddWrdSttException(m_sWord, m_eLanguage);
 else if (ACFlags::CapitalStartSentence & m_nFlags)
 pACorr->AddCplSttException(m_sWord, m_eLanguage);
 }


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

2021-11-16 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/writer_dialogs/openDialogs.py |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e36fddde8ab87fae6f3428d58a8e890c2b2c798c
Author: Xisco Fauli 
AuthorDate: Tue Nov 16 18:33:36 2021 +0100
Commit: Xisco Fauli 
CommitDate: Tue Nov 16 21:19:16 2021 +0100

uitest: sw: ExportToEPUB is already tested

Change-Id: I3c125a9193f7d38d30c0c0ab76296c80c46e4245
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125323
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/uitest/writer_dialogs/openDialogs.py 
b/sw/qa/uitest/writer_dialogs/openDialogs.py
index 3579956f1256..3572cfda85b6 100644
--- a/sw/qa/uitest/writer_dialogs/openDialogs.py
+++ b/sw/qa/uitest/writer_dialogs/openDialogs.py
@@ -15,8 +15,8 @@ dialogs = [
 {"command": ".uno:SaveAsTemplate", "closeButton": "cancel"},
 #{"command": ".uno:ExportToPDF", "closeButton": "cancel", "skipTestOK": 
True},
 # tested in sw/qa/uitest/writer_tests4/exportToPDF.py
-{"command": ".uno:ExportToEPUB", "closeButton": "cancel", "skipTestOK": 
True},
-# export needs filesystem
+#{"command": ".uno:ExportToEPUB", "closeButton": "cancel", "skipTestOK": 
True},
+# tested in writerperfect/qa/uitest/epubexport/epubexport.py
 {"command": ".uno:Print", "closeButton": "cancel", "skipTestOK": True},
 # no printer in CI
 # tested in sw/qa/uitest/writer_tests5/tdf123378.py


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

2021-11-16 Thread Caolán McNamara (via logerrit)
 sw/qa/core/data/ww8/pass/ofz34749-1.doc |binary
 sw/source/filter/ww8/ww8par.hxx |8 
 sw/source/filter/ww8/ww8par6.cxx|3 +++
 3 files changed, 11 insertions(+)

New commits:
commit 7bbd2a6455df39218de4dd3ae918fd4ab9082a7c
Author: Caolán McNamara 
AuthorDate: Thu Jul 1 14:56:45 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 20:31:54 2021 +0100

ofz#34749 don't remove trailing paragraph if something got anchored to it

Change-Id: Ic6eec2f9829c415abd4f2628bc51efbf98f918fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118228
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit e803875fbb86b24b39fcd9adcf7df40ed255ea8f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125289
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/sw/qa/core/data/ww8/pass/ofz34749-1.doc 
b/sw/qa/core/data/ww8/pass/ofz34749-1.doc
new file mode 100644
index ..d657a71b5245
Binary files /dev/null and b/sw/qa/core/data/ww8/pass/ofz34749-1.doc differ
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index c15c07afb7fa..a0d500a6eb81 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -916,6 +916,14 @@ public:
 explicit wwExtraneousParas(SwDoc &rDoc) : m_rDoc(rDoc) {}
 ~wwExtraneousParas() { delete_all_from_doc(); }
 void insert(SwTextNode *pTextNode) { m_aTextNodes.insert(pTextNode); }
+void check_anchor_destination(SwTextNode *pTextNode)
+{
+auto it = m_aTextNodes.find(pTextNode);
+if (it == m_aTextNodes.end())
+return;
+SAL_WARN("sw.ww8", "It is unexpected to anchor something in a para 
scheduled for removal");
+m_aTextNodes.erase(it);
+}
 void delete_all_from_doc();
 };
 
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index c7dc9724a4b3..9f12bcce353e 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2359,6 +2359,9 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults 
&rApo, const WW8_TablePos *p
 }
 else
 {
+// ofz#34749 we shouldn't anchor anything into an 'extra' 
paragraph scheduled for
+// removal at end of import, but check if that scenario is 
happening
+
m_aExtraneousParas.check_anchor_destination(m_pPaM->GetNode().GetTextNode());
 m_xSFlyPara->pFlyFormat = 
m_rDoc.MakeFlySection(WW8SwFlyPara::eAnchor,
 m_pPaM->GetPoint(), &aFlySet);
 OSL_ENSURE(m_xSFlyPara->pFlyFormat->GetAnchor().GetAnchorId() ==


[Libreoffice-commits] core.git: configure.ac download.lst external/icu i18npool/qa i18nutil/source include/svx svx/source

2021-11-16 Thread Eike Rathke (via logerrit)
 configure.ac  |2 
 download.lst  |8 
 external/icu/UnpackedTarball_icu.mk   |3 
 external/icu/c++20-comparison.patch   |  171 --
 external/icu/c++20-comparison.patch.1 |   82 
 external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2 |  106 --
 external/icu/icu4c-aix.patch.1|   16 
 external/icu/icu4c-android.patch.1|   24 -
 external/icu/icu4c-khmerbreakengine.patch.1   |   89 ++---
 i18npool/qa/cppunit/test_breakiterator.cxx|   12 
 i18nutil/source/utility/unicode.cxx   |   17 
 include/svx/strings.hrc   |   12 
 svx/source/dialog/charmap.cxx |   40 ++
 13 files changed, 230 insertions(+), 352 deletions(-)

New commits:
commit 263961306ede0656ebb7904034a2172615ce81d0
Author: Eike Rathke 
AuthorDate: Tue Nov 16 14:53:14 2021 +0100
Commit: Eike Rathke 
CommitDate: Tue Nov 16 20:23:45 2021 +0100

Update to ICU 70.1

Unicode 14, 5 new scripts, 12 new Unicode blocks.

In i18npool/qa/cppunit/test_breakiterator.cxx
TestBreakIterator::testLao() had to be disabled/adapted.
Needs to be investigated, see comments there.
As is, Lao script word break has regressions.

Correct UBLOCK_TANGUT_SUPPLEMENT Unicode range endpoint to
0x18D7F, see
https://www.unicode.org/versions/Unicode14.0.0/erratafixed.html
for which ublock_getCode(0x18D8F) now returned UBLOCK_NO_BLOCK and
thus luckily the assert in svx/source/dialog/charmap.cxx hit.

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

diff --git a/configure.ac b/configure.ac
index 4ef19213c15d..1872faaafbd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10476,7 +10476,7 @@ SYSTEM_GENBRK=
 SYSTEM_GENCCODE=
 SYSTEM_GENCMN=
 
-ICU_MAJOR=69
+ICU_MAJOR=70
 ICU_MINOR=1
 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE"
 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE"
diff --git a/download.lst b/download.lst
index d70e256a2c26..df1aab85fc23 100644
--- a/download.lst
+++ b/download.lst
@@ -112,10 +112,10 @@ export HUNSPELL_SHA256SUM := 
57be4e03ae9dd62c3471f667a0d81a14513e314d4d92081292b
 export HUNSPELL_TARBALL := hunspell-1.7.0.tar.gz
 export HYPHEN_SHA256SUM := 
304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705
 export HYPHEN_TARBALL := 5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz
-export ICU_SHA256SUM := 
4cba7b7acd1d3c42c44bb0c14be6637098c7faf2b330ce876bc5f3b915d09745
-export ICU_TARBALL := icu4c-69_1-src.tgz
-export ICU_DATA_SHA256SUM := 
4fc2d8cfc3343673123586fca3967404abd4e346fba5515829204533b3bae4bf
-export ICU_DATA_TARBALL := icu4c-69_1-data.zip
+export ICU_SHA256SUM := 
8d205428c17bf13bb535300669ed28b338a157b1c01ae66d31d0d3e2d47c3fd5
+export ICU_TARBALL := icu4c-70_1-src.tgz
+export ICU_DATA_SHA256SUM := 
c72723ddba3300ffb231d6b09e2a728ea6e89de10ed5927f74bacbd77042336e
+export ICU_DATA_TARBALL := icu4c-70_1-data.zip
 export JFREEREPORT_FLOW_ENGINE_SHA256SUM := 
233f66e8d25c5dd971716d4200203a612a407649686ef3b52075d04b4c9df0dd
 export JFREEREPORT_FLOW_ENGINE_TARBALL := 
ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
 export JFREEREPORT_FLUTE_SHA256SUM := 
1b5b24f7bc543c0362b667692f78db8bab4ed6dafc6172f104d0bd3757d8a133
diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index b47d519b1ae2..c0ffe47dad3e 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -33,7 +33,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-rtti.patch.1 \
external/icu/icu4c-clang-cl.patch.1 \
external/icu/gcc9.patch \
-   external/icu/c++20-comparison.patch \
+   external/icu/c++20-comparison.patch.1 \
external/icu/ubsan.patch.1 \
external/icu/Wdeprecated-copy-dtor.patch \
external/icu/strict_ansi.patch \
@@ -42,7 +42,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-khmerbreakengine.patch.1 \
external/icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch.1 \
$(if $(filter-out 
ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.patch.1) \
-   external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/c++20-comparison.patch 
b/external/icu/c++20-comparison.patch
deleted file mode 100644
index 44053e6719ca..
--- a/external/icu/c++20-comparison.patch
+++ /dev/null
@@ -1,171 +0,0 @@
 source/common/uvector.cpp
-+++ source/common/u

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

2021-11-16 Thread Szymon Kłos (via logerrit)
 desktop/source/lib/init.cxx  |   14 +++--
 include/vcl/jsdialog/executor.hxx|5 ++-
 sc/source/ui/cctrl/checklistmenu.cxx |2 -
 sfx2/source/sidebar/DeckLayouter.cxx |5 ++-
 vcl/inc/jsdialog/jsdialogbuilder.hxx |   19 +++--
 vcl/jsdialog/executor.cxx|4 +-
 vcl/jsdialog/jsdialogbuilder.cxx |   51 ---
 7 files changed, 62 insertions(+), 38 deletions(-)

New commits:
commit f43f08133f6004043ab4a0fb0fd0f51cd8b871fb
Author: Szymon Kłos 
AuthorDate: Mon Nov 15 09:13:35 2021 +0100
Commit: Szymon Kłos 
CommitDate: Tue Nov 16 19:55:04 2021 +0100

jsdialog: use string identifiers

Thanks to that it is easier to debug and find widgets in maps.
Sidebar and notebookbar are now in different map entries.
This fixes the issue when destroying notebookbar deleted sidebar's
widgets.
After this patch sidebar works correctly when using notebookbar mode in
lok.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index e71e62929903..feed3452dcf1 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4101,15 +4101,23 @@ static void lcl_sendDialogEvent(unsigned long long int 
nWindowId, const char* pA
 OString sControlId = OUStringToOString(aMap["id"], 
RTL_TEXTENCODING_ASCII_US);
 
 // dialogs send own id but notebookbar and sidebar controls are 
remembered by SfxViewShell id
-bool bFoundWeldedControl = jsdialog::ExecuteAction(nWindowId, 
sControlId, aMap);
+bool bFoundWeldedControl = 
jsdialog::ExecuteAction(std::to_string(nWindowId), sControlId, aMap);
 if (!bFoundWeldedControl)
-bFoundWeldedControl = jsdialog::ExecuteAction(nCurrentShellId, 
sControlId, aMap);
+bFoundWeldedControl = 
jsdialog::ExecuteAction(std::to_string(nCurrentShellId) + "sidebar", 
sControlId, aMap);
+if (!bFoundWeldedControl)
+bFoundWeldedControl = 
jsdialog::ExecuteAction(std::to_string(nCurrentShellId) + "notebookbar", 
sControlId, aMap);
+if (!bFoundWeldedControl && !SfxViewShell::Current())
+{
+// this is needed for dialogs shown before document is loaded: 
MacroWarning dialog, etc...
+// these dialogs are created with WindowId "0"
+bFoundWeldedControl = jsdialog::ExecuteAction("0", sControlId, 
aMap);
+}
 
 if (bFoundWeldedControl)
 return;
 
 // force resend - used in mobile-wizard
-jsdialog::SendFullUpdate(nCurrentShellId, "Panel");
+jsdialog::SendFullUpdate(std::to_string(nCurrentShellId) + "sidebar", 
"Panel");
 
 } catch(...) {}
 }
diff --git a/include/vcl/jsdialog/executor.hxx 
b/include/vcl/jsdialog/executor.hxx
index 46455e985735..39c8c77f3a24 100644
--- a/include/vcl/jsdialog/executor.hxx
+++ b/include/vcl/jsdialog/executor.hxx
@@ -60,8 +60,9 @@ public:
 
 namespace jsdialog
 {
-VCL_DLLPUBLIC bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, 
StringMap& rData);
-VCL_DLLPUBLIC void SendFullUpdate(sal_uInt64 nWindowId, const OString& 
rWidget);
+VCL_DLLPUBLIC bool ExecuteAction(const std::string& nWindowId, const OString& 
rWidget,
+ StringMap& rData);
+VCL_DLLPUBLIC void SendFullUpdate(const std::string& nWindowId, const OString& 
rWidget);
 VCL_DLLPUBLIC StringMap jsonToStringMap(const char* pJSON);
 };
 
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 54c87adad219..efd8688dc649 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -300,7 +300,7 @@ void ScCheckListMenuControl::launchSubMenu(bool bSetMenuPos)
 rSubMenuControl.GrabFocus();
 
 if (comphelper::LibreOfficeKit::isActive())
-jsdialog::SendFullUpdate(pSubMenu->GetLOKWindowId(), "toggle_all");
+jsdialog::SendFullUpdate(std::to_string(pSubMenu->GetLOKWindowId()), 
"toggle_all");
 }
 
 IMPL_LINK_NOARG(ScCheckListMenuControl, PostPopdownHdl, void*, void)
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx 
b/sfx2/source/sidebar/DeckLayouter.cxx
index 9a758f1f7215..b1ae79129d13 100644
--- a/sfx2/source/sidebar/DeckLayouter.cxx
+++ b/sfx2/source/sidebar/DeckLayouter.cxx
@@ -312,7 +312,10 @@ sal_Int32 PlacePanels (
 }
 
 if (comphelper::LibreOfficeKit::isActive())
-
jsdialog::SendFullUpdate(reinterpret_cast(SfxViewShell::Current()), 
"Panel");
+{
+sal_uInt64 nShellId = 
reinterpret_cast(SfxViewShell::Current());
+jsdialog::SendFullUpdate(std::to_string(nShellId) + "sidebar", 
"Panel");
+}
 
 return nY;
 }
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 9f52846206d7..ccd2489d797b 100644
--- a/vcl

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

2021-11-16 Thread Noel Grandin (via logerrit)
 salhelper/source/timer.cxx   |1 -
 sc/source/ui/vba/vbaapplication.cxx  |   11 +++
 sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx |   14 --
 sd/source/ui/tools/SdGlobalResourceContainer.cxx |9 ++---
 4 files changed, 21 insertions(+), 14 deletions(-)

New commits:
commit a2bb4fc9174637c065364f9740f164b27172d1f3
Author: Noel Grandin 
AuthorDate: Tue Nov 16 19:46:05 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Nov 16 19:53:51 2021 +0100

rtl::Static->thread-safe static

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

diff --git a/salhelper/source/timer.cxx b/salhelper/source/timer.cxx
index 430cdfe9138c..c0fba72ed68f 100644
--- a/salhelper/source/timer.cxx
+++ b/salhelper/source/timer.cxx
@@ -21,7 +21,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
diff --git a/sc/source/ui/vba/vbaapplication.cxx 
b/sc/source/ui/vba/vbaapplication.cxx
index 7c6e56dbf529..01885a36f0e3 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -57,7 +57,6 @@
 #include "vbafiledialog.hxx"
 
 #include 
-#include 
 
 #include 
 #include 
@@ -117,7 +116,11 @@ ScVbaAppSettings::ScVbaAppSettings() :
 
 namespace {
 
-struct ScVbaStaticAppSettings : public ::rtl::Static< ScVbaAppSettings, 
ScVbaStaticAppSettings > {};
+ScVbaAppSettings& ScVbaStaticAppSettings()
+{
+static ScVbaAppSettings SINGLETON;
+return SINGLETON;
+}
 
 class ScVbaApplicationOutgoingConnectionPoint : public 
cppu::WeakImplHelper
 {
@@ -158,7 +161,7 @@ ScVbaApplication::RemoveSink( sal_uInt32 nNumber )
 
 ScVbaApplication::ScVbaApplication( const 
uno::Reference& xContext ) :
 ScVbaApplication_BASE( xContext ),
-mrAppSettings( ScVbaStaticAppSettings::get() ),
+mrAppSettings( ScVbaStaticAppSettings() ),
 m_nDialogType(0)
 {
 }
@@ -169,7 +172,7 @@ ScVbaApplication::~ScVbaApplication()
 
 /*static*/ bool ScVbaApplication::getDocumentEventsEnabled()
 {
-return ScVbaStaticAppSettings::get().mbEnableEvents;
+return ScVbaStaticAppSettings().mbEnableEvents;
 }
 
 OUString SAL_CALL
diff --git a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx 
b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
index e3a4de5e3a06..d8117d5db145 100644
--- a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
@@ -18,7 +18,6 @@
  */
 
 #include "SlsCacheConfiguration.hxx"
-#include 
 #include 
 
 #include 
@@ -36,8 +35,11 @@ namespace sd::slidesorter::cache {
 namespace
 {
 typedef std::shared_ptr CacheConfigSharedPtr;
-class theInstance :
-public rtl::Static {};
+CacheConfigSharedPtr& theInstance()
+{
+static CacheConfigSharedPtr SINGLETON;
+return SINGLETON;
+}
 }
 
 std::weak_ptr CacheConfiguration::mpWeakInstance;
@@ -45,7 +47,7 @@ std::weak_ptr 
CacheConfiguration::mpWeakInstance;
 std::shared_ptr CacheConfiguration::Instance()
 {
 SolarMutexGuard aSolarGuard;
-CacheConfigSharedPtr &rInstancePtr = theInstance::get();
+CacheConfigSharedPtr &rInstancePtr = theInstance();
 if (!rInstancePtr)
 {
 // Maybe somebody else kept a previously created instance alive.
@@ -123,7 +125,7 @@ Any CacheConfiguration::GetValue (const OUString& rName)
 
 IMPL_STATIC_LINK_NOARG(CacheConfiguration, TimerCallback, Timer *, void)
 {
-CacheConfigSharedPtr &rInstancePtr = theInstance::get();
+CacheConfigSharedPtr &rInstancePtr = theInstance();
 // Release our reference to the instance.
 rInstancePtr.reset();
 // note: if there are no other references to the instance, m_ReleaseTimer
@@ -132,7 +134,7 @@ IMPL_STATIC_LINK_NOARG(CacheConfiguration, TimerCallback, 
Timer *, void)
 
 void CacheConfiguration::Shutdown()
 {
-CacheConfigSharedPtr &rInstancePtr = theInstance::get();
+CacheConfigSharedPtr &rInstancePtr = theInstance();
 rInstancePtr.reset();
 assert(mpWeakInstance.expired()); // ensure m_ReleaseTimer is destroyed
 }
diff --git a/sd/source/ui/tools/SdGlobalResourceContainer.cxx 
b/sd/source/ui/tools/SdGlobalResourceContainer.cxx
index da46c1d98672..a7dbc5f25920 100644
--- a/sd/source/ui/tools/SdGlobalResourceContainer.cxx
+++ b/sd/source/ui/tools/SdGlobalResourceContainer.cxx
@@ -26,7 +26,6 @@
 
 #include 
 
-#include 
 #include 
 #include 
 
@@ -53,7 +52,11 @@ public:
 
 namespace {
 
-struct theSdGlobalResourceContainerInstance : public 
rtl::Static {};
+SdGlobalResourceContainerInstance& theSdGlobalResourceContainerInstance()
+{
+static SdGlobalResourceContainerInstance SINGLETON;
+return SINGLETON;
+}
 
 } // namespace
 
@@ -81,7 +84,7 @@ private:
 // static
 SdGlobalResourceContainer& SdGlobalResourceContainer::Instance()
 {
-SdGlobalResourceContainer *const 
pRet(theSdGlobalResou

[Libreoffice-commits] core.git: avmedia/source include/editeng sw/inc

2021-11-16 Thread Mike Kaganski (via logerrit)
 avmedia/source/framework/MediaControlBase.cxx |2 --
 include/editeng/overflowingtxt.hxx|5 -
 sw/inc/IDocumentFieldsAccess.hxx  |5 +++--
 sw/inc/IDocumentLinksAdministration.hxx   |5 +++--
 4 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit ae8802cef10c40a40df8f783e724d70618539126
Author: Mike Kaganski 
AuthorDate: Tue Nov 16 12:20:19 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue Nov 16 19:48:15 2021 +0100

Drop redundant 'using rtl::OUString'

obsoleted by 6080259862ee9886d1dabcb7c06132268a398cc6

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

diff --git a/avmedia/source/framework/MediaControlBase.cxx 
b/avmedia/source/framework/MediaControlBase.cxx
index 4e8800186ae4..c572bed7d0e6 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -25,8 +25,6 @@
 #include 
 #include 
 
-using ::rtl::OUString;
-
 constexpr sal_Int32 AVMEDIA_DB_RANGE = -40;
 #define AVMEDIA_LINEINCREMENT   1.0
 #define AVMEDIA_PAGEINCREMENT   10.0
diff --git a/include/editeng/overflowingtxt.hxx 
b/include/editeng/overflowingtxt.hxx
index 043b8ebd21f4..1c11c7797d00 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -31,11 +31,6 @@
 namespace com::sun::star {
   namespace datatransfer { class XTransferable; }
 }
-namespace rtl {
-class OUString;
-};
-using ::rtl::OUString;
-
 
 class OutlinerParaObject;
 class Outliner;
diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx
index fb8af7657132..5f866a361228 100644
--- a/sw/inc/IDocumentFieldsAccess.hxx
+++ b/sw/inc/IDocumentFieldsAccess.hxx
@@ -20,6 +20,9 @@
 #ifndef INCLUDED_SW_INC_IDOCUMENTFIELDSACCESS_HXX
 #define INCLUDED_SW_INC_IDOCUMENTFIELDSACCESS_HXX
 
+#include 
+
+#include 
 #include 
 #include 
 #include "nodeoffset.hxx"
@@ -42,8 +45,6 @@ struct HashStr;
 class SwRootFrame;
 class IDocumentRedlineAccess;
 
-namespace rtl { class OUString; }
-using rtl::OUString;
 namespace com::sun::star::uno { class Any; }
 
  /** Document fields related interfaces
diff --git a/sw/inc/IDocumentLinksAdministration.hxx 
b/sw/inc/IDocumentLinksAdministration.hxx
index 43bc0298c878..26133d9c57da 100644
--- a/sw/inc/IDocumentLinksAdministration.hxx
+++ b/sw/inc/IDocumentLinksAdministration.hxx
@@ -20,12 +20,13 @@
 #ifndef INCLUDED_SW_INC_IDOCUMENTLINKSADMINISTRATION_HXX
 #define INCLUDED_SW_INC_IDOCUMENTLINKSADMINISTRATION_HXX
 
+#include 
+
+#include 
 #include 
 
 namespace com::sun::star::uno { class Any; }
 namespace sfx2 { class SvLinkSource;  class LinkManager; }
-namespace rtl { class OUString; }
-using rtl::OUString;
 
 
  /** Document links administration interface


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

2021-11-16 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/uiwriter/uiwriter3.cxx |   27 +++
 1 file changed, 27 insertions(+)

New commits:
commit 837bb7370b702399562a3b0b4e444237c66879a8
Author: Xisco Fauli 
AuthorDate: Tue Nov 16 16:39:26 2021 +0100
Commit: Xisco Fauli 
CommitDate: Tue Nov 16 19:40:51 2021 +0100

tdf#139922: sw_uiwriter3: Add unittest

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

diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index b90e5d18ee56..b2d65f2f7233 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -837,6 +837,33 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf139922)
+{
+SwDoc* const pDoc = createSwDoc();
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+
+pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+Scheduler::ProcessEventsToIdle();
+
+SwWrtShell* const pWrtSh = pDoc->GetDocShell()->GetWrtShell();
+CPPUNIT_ASSERT(pWrtSh);
+
+pWrtSh->Insert("this _is_ a SEntence. this _is_ a SEntence.");
+
+CPPUNIT_ASSERT_EQUAL(OUString("this _is_ a SEntence. this _is_ a 
SEntence."),
+ getParagraph(2)->getString());
+
+//apply autocorrect StartAutoCorrect
+dispatchCommand(mxComponent, ".uno:AutoFormatApply", {});
+Scheduler::ProcessEventsToIdle();
+
+// Without the fix in place, this test would have failed with
+// - Expected: This is a Sentence. This is a Sentence.
+// - Actual  : this is a Sentence. This is a Sentence.
+CPPUNIT_ASSERT_EQUAL(OUString("This is a Sentence. This is a Sentence."),
+ getParagraph(2)->getString());
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf125261)
 {
 createSwDoc(DATA_DIRECTORY, "tdf125261.odt");


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - 2 commits - sc/source tools/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 sc/source/core/tool/compiler.cxx |9 -
 tools/source/generic/poly.cxx|2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 367ea0236340fa0b4ce69ab7df89aba4f2c720be
Author: Caolán McNamara 
AuthorDate: Sun Jun 27 19:08:36 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 19:39:58 2021 +0100

ofz#35504 Integer-overflow

Change-Id: I7a462b821f286411d759b5259461fcdbf1741859
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117955
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 228cb26a6a1afe668dd17471bedf0ab52f133d5a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125288
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 1c5717e8ec86..9b09b5a2972b 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -251,7 +251,7 @@ ImplPolygon::ImplPolygon( const tools::Rectangle& rBound, 
const Point& rStart, c
 }
 
 
-if( ( nRadX > 32 ) && ( nRadY > 32 ) && ( nRadX + nRadY ) < 8192 )
+if (nRadX > 32 && nRadY > 32 && o3tl::saturating_add(nRadX, nRadY) < 
8192)
 nPoints >>= 1;
 
 // compute threshold
commit 577fb26e8b6242a099fb80e730c1efeb9dfed524
Author: Caolán McNamara 
AuthorDate: Fri Apr 2 14:28:37 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 19:39:47 2021 +0100

ofz: Segv on unknown address

Change-Id: I6c69375a89781fc0b87230203335c861efb562f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113518
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 8de38977838d5a044271cb170730e3d557659f17)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125287
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 70554ae93861..b307bc6dea12 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2532,7 +2532,14 @@ Label_MaskStateMachine:
 if (eState != ssSkipReference)
 {
 *pSym++ = c;
-*pSym++ = *pSrc++;
+
+if( pSym == &cSymbol[ MAXSTRLEN ] )
+{
+SetError( 
FormulaError::StringOverflow);
+eState = ssStop;
+}
+else
+*pSym++ = *pSrc++;
 }
 bAddToSymbol = false;
 }


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

2021-11-16 Thread Justin Luth (via logerrit)
 sw/source/core/edit/acorrect.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 133fe29d06445daadc556cff013d5194a883ea9b
Author: Justin Luth 
AuthorDate: Thu Nov 11 12:28:21 2021 +0200
Commit: Michael Stahl 
CommitDate: Tue Nov 16 19:15:31 2021 +0100

tdf#139922 sw autocorr: don't return GetPrevPara if isEmpty

This fixes a LO 6.2 regression caused by
commit 4cf5a46f16dec8ce16c6662ce5c17903e28b8fa3.

Change-Id: I4aee8f4e79a40a8b8f82faa3e62dead80a952510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125037
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Michael Stahl 
(cherry picked from commit 59dc5d00b04927d07df2dcc3c17acfdc760d8765)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125144

diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 9a8e45cb137c..5a7946d66885 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -356,8 +356,11 @@ OUString const* SwAutoCorrDoc::GetPrevPara(bool const 
bAtNormalPos)
 }
 sw::GotoPrevLayoutTextFrame(*m_pIndex, m_rEditSh.GetLayout());
 }
-if (pFrame && 0 == 
pFrame->GetTextNodeForParaProps()->GetAttrOutlineLevel())
+if (pFrame && !pFrame->GetText().isEmpty() &&
+0 == pFrame->GetTextNodeForParaProps()->GetAttrOutlineLevel())
+{
 pStr = & pFrame->GetText();
+}
 
 if( m_bUndoIdInitialized )
 m_bUndoIdInitialized = true;


Re: Ubuntu build problem: ld whining about undefined references

2021-11-16 Thread Eike Rathke
Hi Ilmari,

On Tuesday, 2021-11-16 19:19:08 +0200, Ilmari Lauhakangas wrote:
> On 16.11.2021 17.49, Ilmari Lauhakangas wrote:
> > /usr/bin/ld: 
> > /home/ubuntu/OpenSource/LibreOffice/core/workdir/CxxObject/sc/source/ui/attrdlg/tabpages.o:
> > in function `ScTabPageProtection::FillItemSet(SfxItemSet*)':
> > tabpages.cxx:(.text+0xb33): undefined reference to
> > `ScProtectionAttr::ScProtectionAttr()'
> > ...
> > What could be the issue?
> 
> This was in a virtual machine and reportedly the problem is gone now with a
> bare metal install of Ubuntu.

Apart from that, I'd suspect a truncated
workdir/CxxObject/sc/source/core/data/attrib.o file maybe due to
(virtual) disk full or otherwise interrupted build.

  Eike

-- 
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A


signature.asc
Description: PGP signature


Re: Test failed `TestBreakIterator::testLao` with icu 70

2021-11-16 Thread Eike Rathke
Hi,

On Saturday, 2021-11-13 19:56:31 +, oxalica wrote:

> I'm on NixOS and we recently updated a libreoffice dependency `icu` to 70.
> When building libreoffice 7.2.2.2 with `--with-system-libs`, it builds 
> successfully but fails exact one unit test.

I just encountered the same while updating the bundled ICU to 70.1

(btw, you'd encounter more build breakage in a debug build with
--enable-werror because of missing handling of new script and block
values)

> I can confirm that downgrading `icu` back to 69.0 fixes the test 
> failure. But I'm not sure what is this test doing and I cannot read Lao. 

Me neither..

> Does the test need updating, or there it's an issue of the new `icu` 70.0?

Not sure yet. I temporarily adapted that one check failing (the other
passes) now in the change https://gerrit.libreoffice.org/c/core/+/125322
with
https://gerrit.libreoffice.org/c/core/+/125322/1/i18npool/qa/cppunit/test_breakiterator.cxx

> I also notice that the `testLao` is currently guarded and only be 
> enabled if icu >51. Does it depends on some icu behaviors and we should 
> also exclude it for icu >=70?

The handling of Lao script word break likely wasn't implemented in
earlier ICUs, or the test was implemented when ICU 51 was current,
I didn't chase it down. I excluded the one check *only* for 70
(not >=70) so if it doesn't get fixed (either on our or ICU's side)
we'll get slapped again with the next major update.

  Eike

-- 
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A


signature.asc
Description: PGP signature


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

2021-11-16 Thread Luboš Luňák (via logerrit)
 vcl/inc/skia/gdiimpl.hxx |4 +
 vcl/inc/skia/salbmp.hxx  |   21 --
 vcl/inc/skia/utils.hxx   |8 ++
 vcl/qa/cppunit/skia/skia.cxx |   37 +++
 vcl/skia/gdiimpl.cxx |  144 ++-
 vcl/skia/salbmp.cxx  |   49 +++---
 6 files changed, 214 insertions(+), 49 deletions(-)

New commits:
commit 09dfad9565b37353acc0b31054639134f1a85ab9
Author: Luboš Luňák 
AuthorDate: Tue Nov 16 14:01:04 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Nov 16 18:37:36 2021 +0100

fix drawBitmap() unittests with Skia/HiDPI

Force non-smooth scaling to get exact pixel values. Introduced
in 6792e6e5e49d11a54256b75c4c5a476bb2f10b4a.

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

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 13925700f31d..ac6f33ea7398 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1769,7 +1769,8 @@ sk_sp 
SkiaSalGraphicsImpl::mergeCacheBitmaps(const SkiaSalBitmap& bitma
 matrix.set(SkMatrix::kMScaleX, 1.0 * targetSize.Width() / 
sourceSize.Width());
 matrix.set(SkMatrix::kMScaleY, 1.0 * targetSize.Height() / 
sourceSize.Height());
 canvas->concat(matrix);
-samplingOptions = makeSamplingOptions(BmpScaleFlag::BestQuality, 
matrix, 1);
+if (!isUnitTestRunning()) // unittests want exact pixel values
+samplingOptions = makeSamplingOptions(BmpScaleFlag::BestQuality, 
matrix, 1);
 }
 if (alphaBitmap != nullptr)
 {
commit a0a4709eb4226ae15931999fc17afe5b5b9f8081
Author: Luboš Luňák 
AuthorDate: Tue Nov 16 13:34:37 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Nov 16 18:37:21 2021 +0100

try to avoid scaling bitmaps twice in Skia when drawing

The scenario is that something scales a bitmap and then asks for it
to be drawn (possibly drawn scaled again). One example is
OutputDevice::DrawBitmap() subsampling the bitmap that according
to c0ce7ca4884f7f6d1 is supposed to improve quality with headless(?)
backend, but with Skia it's pointless and it breaks things like
caching during repeated drawing, because then GetSkImage() will need
to generate a new SkImage each time.
Since Skia backend uses delayed scaling, these cases can be sorted
out by checking the stored SkImage and using it if suitable, as
the original image is as good as the rescaled one, but often
it's better - it may be cached, sometimes the scaling operations
cancel each other out (often the case in HiDPI mode).

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

diff --git a/vcl/inc/skia/gdiimpl.hxx b/vcl/inc/skia/gdiimpl.hxx
index abfa89ca8bfa..9cf14f176185 100644
--- a/vcl/inc/skia/gdiimpl.hxx
+++ b/vcl/inc/skia/gdiimpl.hxx
@@ -284,6 +284,10 @@ protected:
 static void setCanvasClipRegion(SkCanvas* canvas, const vcl::Region& 
region);
 sk_sp mergeCacheBitmaps(const SkiaSalBitmap& bitmap, const 
SkiaSalBitmap* alphaBitmap,
  const Size& targetSize);
+using DirectImage = SkiaHelper::DirectImage;
+static OString makeCachedImageKey(const SkiaSalBitmap& bitmap, const 
SkiaSalBitmap* alphaBitmap,
+  const Size& targetSize, DirectImage 
bitmapType,
+  DirectImage alphaBitmapType);
 
 // Skia uses floating point coordinates, so when we use integer 
coordinates, sometimes
 // rounding results in off-by-one errors (down), especially when drawing 
using GPU,
diff --git a/vcl/inc/skia/salbmp.hxx b/vcl/inc/skia/salbmp.hxx
index aa8d245ce741..2959952a3442 100644
--- a/vcl/inc/skia/salbmp.hxx
+++ b/vcl/inc/skia/salbmp.hxx
@@ -70,17 +70,21 @@ public:
 // True if GetSkShader() should be preferred to GetSkImage() (or the Alpha 
variants).
 bool PreferSkShader() const;
 
+// Direct image means direct access to the stored SkImage, without checking
+// if its size is up to date. This should be used only in special cases 
with care.
+using DirectImage = SkiaHelper::DirectImage;
 // Returns the contents as SkImage (possibly GPU-backed).
-const sk_sp& GetSkImage() const;
-sk_sp GetSkShader(const SkSamplingOptions& samplingOptions) 
const;
-
+const sk_sp& GetSkImage(DirectImage direct = DirectImage::No) 
const;
+sk_sp GetSkShader(const SkSamplingOptions& samplingOptions,
+DirectImage direct = DirectImage::No) const;
 // Returns the contents as alpha SkImage (possibly GPU-backed)
-const sk_sp& GetAlphaSkImage() const;
-sk_sp GetAlphaSkShader(const SkSamplingOptions& samplingOptions) 
const;
+const sk_sp& GetAlphaSkImage(DirectImage direct = 
DirectI

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

2021-11-16 Thread Luboš Luňák (via logerrit)
 vcl/inc/skia/gdiimpl.hxx |3 +--
 vcl/inc/skia/salbmp.hxx  |3 +--
 vcl/inc/skia/utils.hxx   |3 ++-
 vcl/skia/README  |3 ++-
 vcl/skia/SkiaHelper.cxx  |   31 +++
 vcl/skia/gdiimpl.cxx |2 --
 vcl/skia/salbmp.cxx  |3 +--
 7 files changed, 22 insertions(+), 26 deletions(-)

New commits:
commit f33b76b4e675818deae244427cef84c576a1a1f8
Author: Luboš Luňák 
AuthorDate: Sat Nov 13 08:30:36 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Nov 16 18:37:06 2021 +0100

make SkiaHelper::dump() available also in non-dbgutil builds

They are just a set of small functions, and I sometimes need
to debug optimized builds too.

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

diff --git a/vcl/inc/skia/gdiimpl.hxx b/vcl/inc/skia/gdiimpl.hxx
index 942567fec0f6..abfa89ca8bfa 100644
--- a/vcl/inc/skia/gdiimpl.hxx
+++ b/vcl/inc/skia/gdiimpl.hxx
@@ -198,9 +198,8 @@ public:
 
 virtual bool supportsOperation(OutDevSupportType eType) const override;
 
-#ifdef DBG_UTIL
+// Dump contents to a file for debugging.
 void dump(const char* file) const;
-#endif
 
 // Default blend mode for SkPaint is SkBlendMode::kSrcOver
 void drawBitmap(const SalTwoRect& rPosAry, const SkiaSalBitmap& bitmap,
diff --git a/vcl/inc/skia/salbmp.hxx b/vcl/inc/skia/salbmp.hxx
index b2f452c82979..aa8d245ce741 100644
--- a/vcl/inc/skia/salbmp.hxx
+++ b/vcl/inc/skia/salbmp.hxx
@@ -88,9 +88,8 @@ public:
 // Alpha type best suitable for the content.
 SkAlphaType alphaType() const;
 
-#ifdef DBG_UTIL
+// Dump contents to a file for debugging.
 void dump(const char* file) const;
-#endif
 
 // These are to be used only by unittests.
 bool unittestHasBuffer() const { return mBuffer.get(); }
diff --git a/vcl/inc/skia/utils.hxx b/vcl/inc/skia/utils.hxx
index ed404f7cc3eb..0a17ee81bc4d 100644
--- a/vcl/inc/skia/utils.hxx
+++ b/vcl/inc/skia/utils.hxx
@@ -194,10 +194,11 @@ inline SkIRect scaleRect(const SkIRect& rect, int scaling)
 
 #ifdef DBG_UTIL
 void prefillSurface(const sk_sp& surface);
+#endif
+
 VCL_DLLPUBLIC void dump(const SkBitmap& bitmap, const char* file);
 VCL_DLLPUBLIC void dump(const sk_sp& image, const char* file);
 VCL_DLLPUBLIC void dump(const sk_sp& surface, const char* file);
-#endif
 
 VCL_DLLPUBLIC extern uint32_t vendorId;
 
diff --git a/vcl/skia/README b/vcl/skia/README
index f2903d97fdd7..63f6073bac87 100644
--- a/vcl/skia/README
+++ b/vcl/skia/README
@@ -31,7 +31,8 @@ Debugging:
 
 Both SkiaSalBitmap and SkiaSalGraphicsImpl have a dump() method that writes a 
PNG
 with the current contents. There is also SkiaHelper::dump() for dumping 
contents
-of SkBitmap, SkImage and SkSurface.
+of SkBitmap, SkImage and SkSurface. You can use these in a debugger too, for 
example
+'p SkiaHelper::dump(image, "/tmp/a.png")'.
 
 If there is a drawing problem, you can use something like the following piece 
of code
 to dump an image after each relevant operation (or do it in postDraw() if you 
don't
diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx
index 57bde5abf919..cc9303af39f5 100644
--- a/vcl/skia/SkiaHelper.cxx
+++ b/vcl/skia/SkiaHelper.cxx
@@ -704,6 +704,21 @@ void prepareSkia(std::unique_ptr 
(*createGpuWindowContext
 skiaSupportedByBackend = true;
 }
 
+void dump(const SkBitmap& bitmap, const char* file) { 
dump(SkImage::MakeFromBitmap(bitmap), file); }
+
+void dump(const sk_sp& surface, const char* file)
+{
+surface->getCanvas()->flush();
+dump(makeCheckedImageSnapshot(surface), file);
+}
+
+void dump(const sk_sp& image, const char* file)
+{
+sk_sp data = image->encodeToData(SkEncodedImageFormat::kPNG, 1);
+std::ofstream ostream(file, std::ios::binary);
+ostream.write(static_cast(data->data()), data->size());
+}
+
 #ifdef DBG_UTIL
 void prefillSurface(const sk_sp& surface)
 {
@@ -724,22 +739,6 @@ void prefillSurface(const sk_sp& surface)
 bitmap.makeShader(SkTileMode::kRepeat, SkTileMode::kRepeat, 
SkSamplingOptions()));
 surface->getCanvas()->drawPaint(paint);
 }
-
-void dump(const SkBitmap& bitmap, const char* file) { 
dump(SkImage::MakeFromBitmap(bitmap), file); }
-
-void dump(const sk_sp& surface, const char* file)
-{
-surface->getCanvas()->flush();
-dump(makeCheckedImageSnapshot(surface), file);
-}
-
-void dump(const sk_sp& image, const char* file)
-{
-sk_sp data = image->encodeToData(SkEncodedImageFormat::kPNG, 1);
-std::ofstream ostream(file, std::ios::binary);
-ostream.write(static_cast(data->data()), data->size());
-}
-
 #endif
 
 } // namespace
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 4019c436d51d..f532e48528a9 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -2213,12 +2213,10 @@ int SkiaSalGraphicsImpl::getWindowScaling() const
 return scaling;
 }
 
-#ifdef DBG_UTIL
 void SkiaSa

[Libreoffice-commits] core.git: solenv/gbuild

2021-11-16 Thread Luboš Luňák (via logerrit)
 solenv/gbuild/PrecompiledHeaders.mk|3 ++-
 solenv/gbuild/platform/com_GCC_defs.mk |2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit f22e5078cfac93c50ae5169f65450918b34b0e99
Author: Luboš Luňák 
AuthorDate: Tue Nov 16 15:03:27 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Nov 16 18:36:23 2021 +0100

do not rebuild PCHs on icecream/ccache change, take #2

It turns out $(gb_SPACE) is not just one space.

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

diff --git a/solenv/gbuild/PrecompiledHeaders.mk 
b/solenv/gbuild/PrecompiledHeaders.mk
index 73cc86c88ee7..be0ae7950c4d 100644
--- a/solenv/gbuild/PrecompiledHeaders.mk
+++ b/solenv/gbuild/PrecompiledHeaders.mk
@@ -39,8 +39,9 @@ ifneq ($(gb_ENABLE_PCH),)
 # all cxxflags to use for compilation
 gb_PrecompiledHeader_cxxflags_includes := $$(PCH_DEFS) $$(PCH_CXXFLAGS) 
$$(gb_PrecompiledHeader_EXCEPTIONFLAGS)
 # flags to save to the .flags file to check if they are the same as last time
+# (note: the leading space in sed is important, to remove the option and its 
separating space)
 gb_PrecompiledHeader_flags_for_flags_file := $$(sort 
$(gb_PrecompiledHeader_cxxflags_includes)) \
-$(if $(gb_PrecompiledHeader_ignore_flags_for_flags_file),| sed 
's/$(gb_PrecompiledHeader_ignore_flags_for_flags_file)//')
+$(if $(gb_PrecompiledHeader_ignore_flags_for_flags_file),| sed 's/ 
$(gb_PrecompiledHeader_ignore_flags_for_flags_file)//')
 
 # $(call 
gb_PrecompiledHeader_generate_rules,pchtarget,linktarget,linktargetmakefilename,pchcxxfile,compiler)
 define gb_PrecompiledHeader_generate_rules
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index 4e82b607d8b9..c8f81ff15dc7 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -218,7 +218,7 @@ gb_PrecompiledHeader_EXCEPTIONFLAGS := 
$(gb_LinkTarget_EXCEPTIONFLAGS)
 # We turn on and off this one depending on whether icecream and/or ccache are 
used,
 # and changing cxxflags cause PCH rebuilds, so e.g. a plain temporary 
'CCACHE_DISABLE=1'
 # would cause a rebuild. Ignore the flag there, it's irrelevant for PCH use 
anyway.
-gb_PrecompiledHeader_ignore_flags_for_flags_file := $(gb_SPACE)-Wunused-macros
+gb_PrecompiledHeader_ignore_flags_for_flags_file := -Wunused-macros
 
 # optimization level
 gb_COMPILERNOOPTFLAGS := -O0 -fstrict-aliasing -fstrict-overflow


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - vcl/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 vcl/source/graphic/Manager.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 3a16f3db8a490ae304cf393b29ae17f85567d46b
Author: Caolán McNamara 
AuthorDate: Fri Apr 3 16:35:36 2020 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 18:32:10 2021 +0100

crashtesting: crash on reexport of tdf118346-1.odg to odg

make a copy of m_pImpGraphicList because if we swap out a svg, the svg 
filter
may create more temp Graphics which are auto-added to m_pImpGraphicList
invalidating a loop over m_pImpGraphicList

 #0  0x70d25ae5 in vcl::graphic::Manager::reduceGraphicMemory() 
(this=0x71bc4760 )
at vcl/source/graphic/Manager.cxx:88
 #1  0x70d25ee9 in 
vcl::graphic::Manager::registerGraphic(std::shared_ptr const&, 
rtl::OUString const&)
(this=0x71bc4760 , 
pImpGraphic=std::shared_ptr (use count 1, weak count 0) = {...})
at vcl/source/graphic/Manager.cxx:139
 #2  0x70d26406 in vcl::graphic::Manager::newInstance() 
(this=0x71bc4760 )
at vcl/source/graphic/Manager.cxx:184
 #3  0x70b6735c in Graphic::Graphic() (this=0x7fff84f0) at 
vcl/source/gdi/graph.cxx:182
 #4  0x7fffdc526600 in 
svgio::svgreader::SvgImageNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x56817940, rTarget=...) at 
svgio/source/svgreader/svgimagenode.cxx:219
 #5  0x7fffdc52e75d in 
svgio::svgreader::SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a6a93d0, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svgnode.cxx:529
 #6  0x7fffdc522339 in 
svgio::svgreader::SvgGNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a6a93d0, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svggnode.cxx:106
 #7  0x7fffdc52e75d in 
svgio::svgreader::SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a6a9070, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svgnode.cxx:529
 #8  0x7fffdc522339 in 
svgio::svgreader::SvgGNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a6a9070, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svggnode.cxx:106
 #9  0x7fffdc52e75d in 
svgio::svgreader::SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a5f9150, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svgnode.cxx:529
 #10 0x7fffdc54d19f in 
svgio::svgreader::SvgSvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a5f9150, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svgsvgnode.cxx:304
 #11 0x7fffdc571373 in svgio::svgreader::(anonymous 
namespace)::XSvgParser::getDecomposition(com::sun::star::uno::Reference
 const&, rtl::OUString const&) (this=0x5a69c6d0, xSVGStream=uno::Reference 
to (comphelper::SequenceInputStream *) 0x57480668, aAbsolutePath="")
at svgio/source/svguno/xsvgparser.cxx:160
 #12 0x70cf849b in VectorGraphicData::ensureSequenceAndRange() 
(this=0x56ea7540)
at vcl/source/gdi/vectorgraphicdata.cxx:196
 #13 0x70cf9124 in VectorGraphicData::getRange() const 
(this=0x56ea7540)
at vcl/source/gdi/vectorgraphicdata.cxx:323
 #14 0x70b74da7 in ImpGraphic::ImplGetPrefSize() const 
(this=0x588b00f0) at vcl/source/gdi/impgraph.cxx:778
 #15 0x70b76623 in ImpGraphic::ImplWriteEmbedded(SvStream&) 
(this=0x588b00f0, rOStm=...)
at vcl/source/gdi/impgraph.cxx:1235
 #16 0x70b770a1 in ImpGraphic::ImplSwapOut(SvStream*) 
(this=0x588b00f0, xOStm=0x5826b7d0)
at vcl/source/gdi/impgraph.cxx:1377
 #17 0x70b76bdb in ImpGraphic::ImplSwapOut() (this=0x588b00f0) 
at vcl/source/gdi/impgraph.cxx:1328
 #18 0x70d25c88 in vcl::graphic::Manager::reduceGraphicMemory() 
(this=0x71bc4760 )
at vcl/source/graphic/Manager.cxx:107
 #19 0x70d25ee9 in 
vcl::graphic::Manager::registerGraphic(std::shared_ptr const&, 
rtl::OUString const&)
(this=0x71bc4760 , 
pImpGraphic=std::shared_ptr (use count 1, weak count 0) = {...})
at vcl/source/graphic/Manager.cxx:139
 #20 0x70d26406 in vcl::graphic::Manager::newInstance() 
(this=0x71bc4760 )
at vcl/source/graphic/Manager.cxx:184
 #21 0x70b6735c in Graphic::Graphic() (this=0x56d5ea68) at 
vcl/source/gdi/graph.cxx:182

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

Change-Id: I4e1ffcb12ead0d53b7ca2

Re: Ubuntu build problem: ld whining about undefined references

2021-11-16 Thread Ilmari Lauhakangas

On 16.11.2021 17.49, Ilmari Lauhakangas wrote:

An Ubuntu user is getting this on their first build

[CUS] postprocess/images
[BIN] scp2
[MOD] scp2
/usr/bin/ld: 
/home/ubuntu/OpenSource/LibreOffice/core/workdir/CxxObject/sc/source/ui/attrdlg/tabpages.o: 
in function `ScTabPageProtection::FillItemSet(SfxItemSet*)':
tabpages.cxx:(.text+0xb33): undefined reference to 
`ScProtectionAttr::ScProtectionAttr()'
/usr/bin/ld: tabpages.cxx:(.text+0xb4e): undefined reference to 
`ScProtectionAttr::~ScProtectionAttr()'
/usr/bin/ld: tabpages.cxx:(.text+0xb88): undefined reference to 
`ScProtectionAttr::SetProtection(bool)'
/usr/bin/ld: tabpages.cxx:(.text+0xb94): undefined reference to 
`ScProtectionAttr::SetHideCell(bool)'

...

What could be the issue?


This was in a virtual machine and reportedly the problem is gone now 
with a bare metal install of Ubuntu.


Ilmari


[Libreoffice-commits] core.git: download.lst

2021-11-16 Thread Michael Stahl (via logerrit)
 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 71b9369f1cc40143108e3f2189d96e402895e315
Author: Michael Stahl 
AuthorDate: Tue Nov 16 14:41:57 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 17:50:34 2021 +0100

postgresql: upgrade to release 13.5

Fixes CVE-2021-23222.

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

diff --git a/download.lst b/download.lst
index ac1d72e090d2..d70e256a2c26 100644
--- a/download.lst
+++ b/download.lst
@@ -218,8 +218,8 @@ export POPPLER_SHA256SUM := 
31b76b5cac0a48612fdd154c02d9eca01fd38fb8eaa77c119684
 export POPPLER_TARBALL := poppler-21.11.0.tar.xz
 export POPPLER_DATA_SHA256SUM := 
6e2fcef66ec8c44625f94292ccf8af9f1d918b410d5aa69c274ce67387967b30
 export POPPLER_DATA_TARBALL := poppler-data-0.4.10.tar.gz
-export POSTGRESQL_SHA256SUM := 
12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f
-export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2
+export POSTGRESQL_SHA256SUM := 
9b81067a55edbaabc418aacef457dd8477642827499560b00615a6ea6c13f6b3
+export POSTGRESQL_TARBALL := postgresql-13.5.tar.bz2
 export PYTHON_SHA256SUM := 
6af24a66093dd840bcccf371d4044a3027e655cf24591ce26e48022bc79219d9
 export PYTHON_TARBALL := Python-3.8.10.tar.xz
 export QXP_SHA256SUM := 
e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c


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

2021-11-16 Thread Michael Stahl (via logerrit)
 svtools/source/svhtml/parhtml.cxx |8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 0047e38da8bdfe09360cc2a658283ad5e18986e7
Author: Michael Stahl 
AuthorDate: Tue Nov 16 14:31:58 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 17:50:07 2021 +0100

svtools: HTMLParser: don't insert EOF into strings

It's not a valid Unicode code point.

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

diff --git a/svtools/source/svhtml/parhtml.cxx 
b/svtools/source/svhtml/parhtml.cxx
index e38afaa8ec2b..e96af0e732a7 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -651,11 +651,7 @@ HtmlTokenId HTMLParser::ScanText( const sal_Unicode cBreak 
)
 {
 bContinue = false;
 }
-else
-{
-sTmpBuffer.appendUtf32( nNextCh );
-}
-
+// else: ignore, not a valid code point
 break;
 
 case '<':
@@ -967,7 +963,7 @@ HtmlTokenId HTMLParser::GetNextRawToken()
 }
 break;
 }
-[[fallthrough]];
+break;
 default:
 if (!linguistic::IsControlChar(nNextCh) || nNextCh == '\t')
 {


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

2021-11-16 Thread Michael Stahl (via logerrit)
 svtools/source/svhtml/parhtml.cxx   |6 +-
 sw/source/core/doc/DocumentContentOperationsManager.cxx |6 ++
 2 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit a7116b890ccd6dd1721413b4de6591a8057668ef
Author: Michael Stahl 
AuthorDate: Tue Nov 16 14:28:15 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 17:49:12 2021 +0100

ofz#40766 svtools, sw: HTMLParser: really stop inserting control chars

35d248cab1f0d4800f72abb5cb6afb56f40d9083 forgot to fix one place where
control characters were in a presumed XML declaration.

Another place looks missing where comments are handled, but it's not
clear if these can be passed on to Writer.

Revert the previous fix from commit
b3325ef8cdfc2c82eec34e747106f75a9fccb7e4.

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

diff --git a/svtools/source/svhtml/parhtml.cxx 
b/svtools/source/svhtml/parhtml.cxx
index d9f64c4541d9..e38afaa8ec2b 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -1058,6 +1058,7 @@ HtmlTokenId HTMLParser::GetNextToken_()
 sTmpBuffer.appendUtf32( nNextCh );
 nNextCh = GetNextChar();
 } while( '>' != nNextCh && '/' != nNextCh && 
!rtl::isAsciiWhiteSpace( nNextCh ) &&
+!linguistic::IsControlChar(nNextCh) &&
  IsParserWorking() && !rInput.eof() );
 
 if( !sTmpBuffer.isEmpty() )
@@ -1135,8 +1136,11 @@ HtmlTokenId HTMLParser::GetNextToken_()
 if( !bDone )
 sTmpBuffer.appendUtf32(nNextCh);
 }
-else
+else if (!linguistic::IsControlChar(nNextCh)
+|| nNextCh == '\r' || nNextCh == '\n' || 
nNextCh == '\t')
+{
 sTmpBuffer.appendUtf32(nNextCh);
+}
 if( !bDone )
 nNextCh = GetNextChar();
 }
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 0b2b7b8647f6..7948768e4352 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -559,10 +559,8 @@ namespace sw
 }
 case CH_TXT_ATR_FIELDSTART:
 {
-if (auto const pFieldMark = 
rIDMA.getFieldmarkAt(SwPosition(rTextNode, i)))
-startedFields.emplace(pFieldMark, false, 0, 0);
-else
-SAL_WARN("sw.core", "CH_TXT_ATR_FIELDSTART 
field mark missing");
+auto const 
pFieldMark(rIDMA.getFieldmarkAt(SwPosition(rTextNode, i)));
+startedFields.emplace(pFieldMark, false, 0, 0);
 break;
 }
 case CH_TXT_ATR_FIELDSEP:


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

2021-11-16 Thread Caolán McNamara (via logerrit)
 editeng/source/misc/svxacorr.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 75a14a1e962793de1483ceea1bc36cc78144e386
Author: Caolán McNamara 
AuthorDate: Tue Nov 16 14:46:57 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 16 17:32:32 2021 +0100

Related: tdf#142719 first time undo adds an exception it gets lost

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

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 1d1735b5de28..6dfe778f2631 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2406,8 +2406,7 @@ bool 
SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const OUString& rNew)
 bool SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const OUString& rNew)
 {
 bool bRet = false;
-SvStringsISortDtor* pExceptList = LoadWrdSttExceptList();
-if( !rNew.isEmpty() && pExceptList && pExceptList->insert( rNew ).second )
+if( !rNew.isEmpty() && GetWrdSttExceptList()->insert( rNew ).second )
 {
 MakeUserStorage_Impl();
 tools::SvRef xStg = new SotStorage( sUserAutoCorrFile, 
StreamMode::READWRITE );


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - vcl/unx

2021-11-16 Thread Caolán McNamara (via logerrit)
 vcl/unx/generic/printer/cpdmgr.cxx |   49 ++---
 1 file changed, 25 insertions(+), 24 deletions(-)

New commits:
commit d6161741f0d01188bdf45eb67fca42804ef17f1d
Author: Caolán McNamara 
AuthorDate: Fri Mar 19 14:11:45 2021 +
Commit: Michael Stahl 
CommitDate: Tue Nov 16 17:24:50 2021 +0100

cid#1473818 Use after free

Change-Id: Idd74e0debd12e42ff97d79b56e76cde6fd98aa2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112745
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit 236f3a8e60e05147a37f294774b0c07d40aff36f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125285
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/generic/printer/cpdmgr.cxx 
b/vcl/unx/generic/printer/cpdmgr.cxx
index 1e221d9547cd..f093eb87f4b8 100644
--- a/vcl/unx/generic/printer/cpdmgr.cxx
+++ b/vcl/unx/generic/printer/cpdmgr.cxx
@@ -41,11 +41,11 @@ void CPDManager::onNameAcquired (GDBusConnection 
*connection,
  gpointer user_data)
 {
 gchar* contents;
-GDBusNodeInfo *introspection_data;
-
 // Get Interface for introspection
-g_file_get_contents (FRONTEND_INTERFACE, &contents, nullptr, nullptr);
-introspection_data = g_dbus_node_info_new_for_xml (contents, nullptr);
+if (!g_file_get_contents (FRONTEND_INTERFACE, &contents, nullptr, nullptr))
+return;
+
+GDBusNodeInfo *introspection_data = g_dbus_node_info_new_for_xml 
(contents, nullptr);
 
 g_dbus_connection_register_object (connection,
"/org/libreoffice/PrintDialog",
@@ -61,28 +61,29 @@ void CPDManager::onNameAcquired (GDBusConnection 
*connection,
 std::vector> backends = 
current->getTempBackends();
 for (auto const& backend : backends)
 {
-GDBusProxy *proxy;
 // Get Interface for introspection
-g_file_get_contents (BACKEND_INTERFACE, &contents, nullptr, nullptr);
-introspection_data = g_dbus_node_info_new_for_xml (contents, nullptr);
-proxy = g_dbus_proxy_new_sync (connection,
-   G_DBUS_PROXY_FLAGS_NONE,
-   introspection_data->interfaces[0],
-   backend.first.c_str(),
-   backend.second,
-   "org.openprinting.PrintBackend",
-   nullptr,
-   nullptr);
+if (g_file_get_contents(BACKEND_INTERFACE, &contents, nullptr, 
nullptr))
+{
+introspection_data = g_dbus_node_info_new_for_xml (contents, 
nullptr);
+GDBusProxy *proxy = g_dbus_proxy_new_sync (connection,
+   G_DBUS_PROXY_FLAGS_NONE,
+   introspection_data->interfaces[0],
+   backend.first.c_str(),
+   backend.second,
+   "org.openprinting.PrintBackend",
+   nullptr,
+   nullptr);
+g_assert (proxy != nullptr);
+g_dbus_proxy_call(proxy, "ActivateBackend",
+  nullptr,
+  G_DBUS_CALL_FLAGS_NONE,
+  -1, nullptr, nullptr, nullptr);
+
+g_free(contents);
+g_object_unref(proxy);
+g_dbus_node_info_unref(introspection_data);
+}
 g_free(backend.second);
-g_assert (proxy != nullptr);
-g_dbus_proxy_call(proxy, "ActivateBackend",
-  nullptr,
-  G_DBUS_CALL_FLAGS_NONE,
-  -1, nullptr, nullptr, nullptr);
-
-g_free(contents);
-g_object_unref(proxy);
-g_dbus_node_info_unref(introspection_data);
 }
 }
 


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

2021-11-16 Thread Andreas Heinisch (via logerrit)
 sw/qa/extras/htmlimport/data/tdf142781.html |3 +++
 sw/qa/extras/htmlimport/htmlimport.cxx  |   19 +++
 sw/source/filter/html/htmlgrin.cxx  |5 +
 3 files changed, 27 insertions(+)

New commits:
commit 7a2d8ee2b45b8dd0f614614368ae90878e51a645
Author: Andreas Heinisch 
AuthorDate: Sat Nov 13 20:35:50 2021 +0100
Commit: Andreas Heinisch 
CommitDate: Tue Nov 16 17:12:26 2021 +0100

tdf#142781 - Calculate width/height keeping aspect ratio

Importing an HTML file including an image conserves the aspect ratio in
Writer.

Change-Id: Ia31b36884daf2728b0989ae7c1e6ece683543d7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125170
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/sw/qa/extras/htmlimport/data/tdf142781.html 
b/sw/qa/extras/htmlimport/data/tdf142781.html
new file mode 100644
index ..e7d54594793a
--- /dev/null
+++ b/sw/qa/extras/htmlimport/data/tdf142781.html
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx 
b/sw/qa/extras/htmlimport/htmlimport.cxx
index 86ad0a7b5cfd..a8b9a4df65a4 100644
--- a/sw/qa/extras/htmlimport/htmlimport.cxx
+++ b/sw/qa/extras/htmlimport/htmlimport.cxx
@@ -377,6 +377,25 @@ CPPUNIT_TEST_FIXTURE(HtmlImportTest, testImageSize)
 CPPUNIT_ASSERT_EQUAL(static_cast(aExpected.getHeight()), 
aSize.Height);
 }
 
+CPPUNIT_TEST_FIXTURE(HtmlImportTest, testTdf142781)
+{
+load(mpTestDocumentPath, "tdf142781.html");
+OutputDevice* pDevice = Application::GetDefaultDevice();
+Size aPixelSize(672, 480);
+Size aExpected = pDevice->PixelToLogic(aPixelSize, 
MapMode(MapUnit::Map100thMM));
+awt::Size aSize = getShape(1)->getSize();
+// Without the fix in place, this test would have failed with
+// - Expected: 12700
+// - Actual: 25400
+   // CPPUNIT_ASSERT_EQUAL(static_cast(aExpected.getHeight()), 
aSize.Height);
+aSize = getShape(2)->getSize();
+// Without the fix in place, this test would have failed with
+// - Expected: 17780
+// - Actual: 35560
+CPPUNIT_ASSERT_EQUAL(static_cast(aExpected.getWidth()), 
aSize.Width);
+}
+
+
 CPPUNIT_TEST_FIXTURE(HtmlImportTest, testTdf122789)
 {
 load(mpTestDocumentPath, "tdf122789.html");
diff --git a/sw/source/filter/html/htmlgrin.cxx 
b/sw/source/filter/html/htmlgrin.cxx
index 5c47810c4c59..1d176945394d 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -525,6 +525,11 @@ IMAGE_SETEVENT:
 nWidth = aPixelSize.Width();
 if (!bHeightProvided)
 nHeight = aPixelSize.Height();
+// tdf#142781 - calculate the width/height keeping the aspect ratio
+if (!bPercentWidth && bWidthProvided && !bHeightProvided)
+nHeight = nWidth * aPixelSize.Height() / aPixelSize.Width();
+else if (!bPercentHeight && !bWidthProvided && bHeightProvided)
+nWidth = nHeight * aPixelSize.Width() / aPixelSize.Height();
 }
 
 SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );


Ubuntu build problem: ld whining about undefined references

2021-11-16 Thread Ilmari Lauhakangas

An Ubuntu user is getting this on their first build

[CUS] postprocess/images
[BIN] scp2
[MOD] scp2
/usr/bin/ld: 
/home/ubuntu/OpenSource/LibreOffice/core/workdir/CxxObject/sc/source/ui/attrdlg/tabpages.o: 
in function `ScTabPageProtection::FillItemSet(SfxItemSet*)':
tabpages.cxx:(.text+0xb33): undefined reference to 
`ScProtectionAttr::ScProtectionAttr()'
/usr/bin/ld: tabpages.cxx:(.text+0xb4e): undefined reference to 
`ScProtectionAttr::~ScProtectionAttr()'
/usr/bin/ld: tabpages.cxx:(.text+0xb88): undefined reference to 
`ScProtectionAttr::SetProtection(bool)'
/usr/bin/ld: tabpages.cxx:(.text+0xb94): undefined reference to 
`ScProtectionAttr::SetHideCell(bool)'

...

What could be the issue?

Ilmari


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

2021-11-16 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/uiwriter/uiwriter4.cxx |   40 
 1 file changed, 40 insertions(+)

New commits:
commit 2f5657ca8e54e2e49b6ad801a06d7d58fc725630
Author: Xisco Fauli 
AuthorDate: Tue Nov 16 12:33:49 2021 +0100
Commit: Xisco Fauli 
CommitDate: Tue Nov 16 16:38:32 2021 +0100

tdf#116640: sw_uiwriter4: Add unittest

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

diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx 
b/sw/qa/extras/uiwriter/uiwriter4.cxx
index 856281ea42e0..0b76f34ec616 100644
--- a/sw/qa/extras/uiwriter/uiwriter4.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter4.cxx
@@ -49,6 +49,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -224,6 +225,7 @@ public:
 void testCreateDocxAnnotation();
 void testTdf107976();
 void testTdf142157();
+void testTdf116640();
 void testTdf108524();
 void testRhbz1810732();
 void testTableInSection();
@@ -341,6 +343,7 @@ public:
 CPPUNIT_TEST(testCreateDocxAnnotation);
 CPPUNIT_TEST(testTdf107976);
 CPPUNIT_TEST(testTdf142157);
+CPPUNIT_TEST(testTdf116640);
 CPPUNIT_TEST(testTdf108524);
 CPPUNIT_TEST(testRhbz1810732);
 CPPUNIT_TEST(testTableInSection);
@@ -2079,6 +2082,43 @@ void SwUiWriterTest4::testTdf142157()
 CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
 }
 
+void SwUiWriterTest4::testTdf116640()
+{
+createSwDoc();
+
+uno::Sequence aArgs(
+comphelper::InitPropertySequence({ { "Columns", 
uno::makeAny(sal_Int32(2)) } }));
+
+dispatchCommand(mxComponent, ".uno:InsertSection", aArgs);
+Scheduler::ProcessEventsToIdle();
+
+uno::Reference 
xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference 
xSections(xTextSectionsSupplier->getTextSections(),
+  uno::UNO_QUERY);
+uno::Reference xTextSection(xSections->getByIndex(0), 
uno::UNO_QUERY);
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+
+uno::Reference xTextColumns
+= getProperty>(xTextSection, 
"TextColumns");
+CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+
+dispatchCommand(mxComponent, ".uno:Undo", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xSections->getCount());
+
+dispatchCommand(mxComponent, ".uno:Redo", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+
+dispatchCommand(mxComponent, ".uno:Undo", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xSections->getCount());
+}
+
 void SwUiWriterTest4::testTdf108524()
 {
 createSwDoc(DATA_DIRECTORY, "tdf108524.odt");


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - chart2/source

2021-11-16 Thread Stephan Bergmann (via logerrit)
 chart2/source/tools/InternalDataProvider.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 4067385d16d039ad81b587890b7a8f5a6a01b252
Author: Stephan Bergmann 
AuthorDate: Tue Mar 9 15:52:21 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 16:11:04 2021 +0100

Avoid signed-integer-overflow parsing table:cell-range-address="PivotChart"

...as happens during UITest_chart
UITEST_TEST_NAME=tdf107097.tdf107097.test_tdf107097 ever since
86b192965ee8d625092b723337f6a65bdf34dcb7 "tdf#107097: sc: Add UItest" added 
that
test (see ),

> /chart2/source/tools/XMLRangeHelper.cxx:136:52: runtime error: signed 
integer overflow: 15 * 308915776 cannot be represented in type 'int'
> #0 0x2ad74a554918 in (anonymous 
namespace)::lcl_getSingleCellAddressFromXMLString(rtl::OUString const&, int, 
int, chart::XMLRangeHelper::Cell&) 
/chart2/source/tools/XMLRangeHelper.cxx:136:52
> #1 0x2ad74a553482 in (anonymous 
namespace)::lcl_getCellAddressFromXMLString(rtl::OUString const&, int, int, 
chart::XMLRangeHelper::Cell&, rtl::OUString&) 
/chart2/source/tools/XMLRangeHelper.cxx:217:13
> #2 0x2ad74a5505da in (anonymous 
namespace)::lcl_getCellRangeAddressFromXMLString(rtl::OUString const&, int, 
int, chart::XMLRangeHelper::CellRange&) 
/chart2/source/tools/XMLRangeHelper.cxx:253:19
> #3 0x2ad74a54fde1 in 
chart::XMLRangeHelper::getCellRangeFromXMLString(rtl::OUString const&) 
/chart2/source/tools/XMLRangeHelper.cxx:328:15
> #4 0x2ad74a2aed4d in 
chart::InternalDataProvider::convertRangeFromXML(rtl::OUString const&) 
/chart2/source/tools/InternalDataProvider.cxx:1227:39
> #5 0x2ad74a2b0164 in non-virtual thunk to 
chart::InternalDataProvider::convertRangeFromXML(rtl::OUString const&) 
/chart2/source/tools/InternalDataProvider.cxx
> #6 0x2ad6c4784257 in (anonymous 
namespace)::lcl_ConvertRange(rtl::OUString const&, 
com::sun::star::uno::Reference const&) 
/xmloff/source/chart/SchXMLPlotAreaContext.cxx:76:32
> #7 0x2ad6c4779a67 in SchXMLPlotAreaContext::startFastElement(int, 
com::sun::star::uno::Reference 
const&) /xmloff/source/chart/SchXMLPlotAreaContext.cxx:233:34
> #8 0x2ad6c4c6328a in SvXMLImport::startFastElement(int, 
com::sun::star::uno::Reference 
const&) /xmloff/source/core/xmlimp.cxx:797:15
> #9 0x2ad704988b78 in (anonymous 
namespace)::Entity::startElement((anonymous namespace)::Event const*) 
/sax/source/fastparser/fastparser.cxx:468:27
> #10 0x2ad70496f681 in 
sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) 
/sax/source/fastparser/fastparser.cxx:1026:25
> #11 0x2ad70496c65f in 
sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource
 const&) /sax/source/fastparser/fastparser.cxx:870:22
> #12 0x2ad7049905d1 in 
sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource
 const&) /sax/source/fastparser/fastparser.cxx:1482:13
> #13 0x2ad6c4c52b80 in 
SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&) 
/xmloff/source/core/xmlimp.cxx:504:15
> #14 0x2ad749aafe1e in 
chart::XMLFilter::impl_ImportStream(rtl::OUString const&, rtl::OUString const&, 
com::sun::star::uno::Reference const&, 
com::sun::star::uno::Reference 
const&, 
com::sun::star::uno::Reference
 const&, com::sun::star::uno::Reference 
const&) /chart2/source/model/filter/XMLFilter.cxx:473:34
> #15 0x2ad749aa9f01 in 
chart::XMLFilter::impl_Import(com::sun::star::uno::Reference
 const&, com::sun::star::uno::Sequence 
const&) /chart2/source/model/filter/XMLFilter.cxx:375:35
> #16 0x2ad749aa0988 in 
chart::XMLFilter::filter(com::sun::star::uno::Sequence
 const&) /chart2/source/model/filter/XMLFilter.cxx:221:13
> #17 0x2ad749c2c76e in 
chart::ChartModel::impl_load(com::sun::star::uno::Sequence
 const&, com::sun::star::uno::Reference 
const&) /chart2/source/model/main/ChartModel_Persistence.cxx:567:18
> #18 0x2ad749c30eea in 
chart::ChartModel::loadFromStorage(com::sun::star::uno::Reference
 const&, com::sun::star::uno::Sequence 
const&) /chart2/source/model/main/ChartModel_Persistence.cxx:759:5
> #19 0x2ad74244b977 in 
OCommonEmbeddedObject::LoadDocumentFromStorage_Impl() 
/embeddedobj/source/commonembedding/persistence.cxx:535:19
> #20 0x2ad7423d7bde in OCommonEmbeddedObject::SwitchStateTo_Impl(int) 
/embeddedobj/source/commonembedding/embedobj.cxx:185:49
> #21 0x2ad7423e32ff in OCommonEmbeddedObject::changeState(int) 
/embeddedobj/source/commonembedding/embedobj.cxx:453:13
> #22 0x2ad7424b7057 in 
OCommonEmbeddedObject::getPreferredVisualRepresentation(long) 
/embeddedobj/source/commonembedding/visobj.cxx:168:9
> #23 0x2ad67e08fdb6 in 
comphelper::EmbeddedObjectContainer::GetGraphicReplacementStream(long, 
com::sun::star::uno::Reference const&, 
rtl::OUString*) /comphel

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - lotuswordpro/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 lotuswordpro/source/filter/lwpfribptr.cxx |   35 +++---
 lotuswordpro/source/filter/lwpfribptr.hxx |4 +--
 2 files changed, 20 insertions(+), 19 deletions(-)

New commits:
commit 8e1309cb294b3363b23673d39bc348c724afe637
Author: Caolán McNamara 
AuthorDate: Thu Jan 28 14:54:13 2021 +
Commit: Michael Stahl 
CommitDate: Tue Nov 16 16:10:18 2021 +0100

ofz#30005 crash in LwpFribPtr::XFConvert

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

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

diff --git a/lotuswordpro/source/filter/lwpfribptr.cxx 
b/lotuswordpro/source/filter/lwpfribptr.cxx
index 902727aef38c..f46cd409a900 100644
--- a/lotuswordpro/source/filter/lwpfribptr.cxx
+++ b/lotuswordpro/source/filter/lwpfribptr.cxx
@@ -85,7 +85,8 @@
 #include 
 
 LwpFribPtr::LwpFribPtr()
-: m_pFribs(nullptr),m_pXFPara(nullptr),m_pPara(nullptr)
+: m_pFribs(nullptr)
+, m_pPara(nullptr)
 {
 }
 
@@ -174,7 +175,7 @@ void LwpFribPtr::XFConvert()
 case FRIB_TAG_TEXT:
 {
 LwpFribText* textFrib= static_cast(pFrib);
-textFrib->XFConvert(m_pXFPara,m_pPara->GetStory());
+textFrib->XFConvert(m_pXFPara.get(),m_pPara->GetStory());
 }
 break;
 case FRIB_TAG_TAB:
@@ -246,7 +247,7 @@ void LwpFribPtr::XFConvert()
 case FRIB_TAG_UNICODE3: //fall through
 {
 LwpFribUnicode* unicodeFrib= static_cast(pFrib);
-unicodeFrib->XFConvert(m_pXFPara,m_pPara->GetStory());
+unicodeFrib->XFConvert(m_pXFPara.get(), m_pPara->GetStory());
 }
 break;
 case FRIB_TAG_HARDSPACE:
@@ -255,15 +256,15 @@ void LwpFribPtr::XFConvert()
 LwpStory *pStory = m_pPara->GetStory();
 LwpHyperlinkMgr* pHyperlink = pStory ? pStory->GetHyperlinkMgr() : 
nullptr;
 if (pHyperlink && pHyperlink->GetHyperlinkFlag())
-pFrib->ConvertHyperLink(m_pXFPara,pHyperlink,sHardSpace);
+pFrib->ConvertHyperLink(m_pXFPara.get(), 
pHyperlink,sHardSpace);
 else
-pFrib->ConvertChars(m_pXFPara,sHardSpace);
+pFrib->ConvertChars(m_pXFPara.get(), sHardSpace);
 }
 break;
 case FRIB_TAG_SOFTHYPHEN:
 {
 OUString sSoftHyphen(u'\x00ad');
-pFrib->ConvertChars(m_pXFPara,sSoftHyphen);
+pFrib->ConvertChars(m_pXFPara.get(), sSoftHyphen);
 }
 break;
 case FRIB_TAG_FRAME:
@@ -275,64 +276,64 @@ void LwpFribPtr::XFConvert()
 LwpFoundry* pFoundry = m_pPara->GetFoundry();
 LwpDropcapMgr* pMgr = pFoundry ? pFoundry->GetDropcapMgr() : 
nullptr;
 if (pMgr)
-pMgr->SetXFPara(m_pXFPara);
+pMgr->SetXFPara(m_pXFPara.get());
 }
-frameFrib->XFConvert(m_pXFPara);
+frameFrib->XFConvert(m_pXFPara.get());
 break;
 }
 case FRIB_TAG_CHBLOCK:
 {
 LwpFribCHBlock* chbFrib = static_cast(pFrib);
-chbFrib->XFConvert(m_pXFPara,m_pPara->GetStory());
+chbFrib->XFConvert(m_pXFPara.get(),m_pPara->GetStory());
 }
 break;
 case FRIB_TAG_TABLE:
 {
 LwpFribTable* tableFrib = static_cast(pFrib);
 //tableFrib->XFConvert(m_pPara->GetXFContainer());
-tableFrib->XFConvert(m_pXFPara);
+tableFrib->XFConvert(m_pXFPara.get());
 }
 break;
 case FRIB_TAG_BOOKMARK:
 {
 LwpFribBookMark* bookmarkFrib = 
static_cast(pFrib);
-bookmarkFrib->XFConvert(m_pXFPara);
+bookmarkFrib->XFConvert(m_pXFPara.get());
 }
 break;
 case FRIB_TAG_FOOTNOTE:
 {
 LwpFribFootnote* pFootnoteFrib = 
static_cast(pFrib);
-pFootnoteFrib->XFConvert(m_pXFPara);
+pFootnoteFrib->XFConvert(m_pXFPara.get());
 break;
 }
 case FRIB_TAG_FIELD:
 {
 LwpFribField* fieldFrib = static_cast(pFrib);
-fieldFrib->XFConvert(m_pXFPara);
+fieldFrib->XFConvert(m_pXFPara.get());
 break;
 }
 case FRIB_TAG_NOTE:
 {
 LwpFribNote* pNoteFrib = static_cast(pFrib);
-pNoteFrib->XFConvert(m_pXFPara);
+pNoteFrib->XFConvert(m_pXFPara.get());
 break;
 }
 case FRIB_TAG_PAGENUMBER:
 {
 LwpFribPageNumber* pagenumFrib = 
static_cast(pFrib);
-pagenumFrib->XFConvert(m_pXFPara);
+pagenumFrib->XFConvert(m

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - sc/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 sc/source/core/tool/interpr1.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 7e9a105fc0a849d63e9ce12a521c58648742afa6
Author: Caolán McNamara 
AuthorDate: Mon Jan 4 17:19:47 2021 +
Commit: Michael Stahl 
CommitDate: Tue Nov 16 16:09:28 2021 +0100

ofz#29234 Integer-overflow

sc/source/core/tool/interpr1.cxx:9578:39: runtime error: signed integer 
overflow: 1 + 2147483647 cannot be represented in type 'int'

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

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

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 3d08ccfca5de..c66f0ac9e0c7 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -9181,6 +9181,8 @@ void ScInterpreter::ScMid()
 OUString aStr = GetString().getString();
 if ( nStart < 1 || nSubLen < 0 )
 PushIllegalArgument();
+else if (nStart > SAL_MAX_UINT16 || nSubLen > SAL_MAX_UINT16)
+PushError(FormulaError::StringOverflow);
 else
 {
 sal_Int32 nLen = aStr.getLength();


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

2021-11-16 Thread Michael Stahl (via logerrit)
 include/svl/lngmisc.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3f54dc746936c5a4cc4aeba7e7a7ef1d95b62037
Author: Michael Stahl 
AuthorDate: Tue Nov 16 14:20:20 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 16:08:30 2021 +0100

svl: fix misleading comment

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

diff --git a/include/svl/lngmisc.hxx b/include/svl/lngmisc.hxx
index 7e5728d67a9a..46045c13fc2e 100644
--- a/include/svl/lngmisc.hxx
+++ b/include/svl/lngmisc.hxx
@@ -39,7 +39,7 @@ namespace linguistic
 
 inline bool IsControlChar(sal_Unicode cChar)
 {
-// TODO: why doesn't this include 0x0F DEL?
+// TODO: why doesn't this include 0x7F DEL?
 return cChar < u' ';
 }
 


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

2021-11-16 Thread Justin Luth (via logerrit)
 sw/source/core/edit/acorrect.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 59dc5d00b04927d07df2dcc3c17acfdc760d8765
Author: Justin Luth 
AuthorDate: Thu Nov 11 12:28:21 2021 +0200
Commit: Michael Stahl 
CommitDate: Tue Nov 16 16:07:07 2021 +0100

tdf#139922 sw autocorr: don't return GetPrevPara if isEmpty

This fixes a LO 6.2 regression caused by
commit 4cf5a46f16dec8ce16c6662ce5c17903e28b8fa3.

Change-Id: I4aee8f4e79a40a8b8f82faa3e62dead80a952510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125037
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 63f9229566c1..1ad211fa4354 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -357,8 +357,11 @@ OUString const* SwAutoCorrDoc::GetPrevPara(bool const 
bAtNormalPos)
 }
 sw::GotoPrevLayoutTextFrame(*m_pIndex, m_rEditSh.GetLayout());
 }
-if (pFrame && 0 == 
pFrame->GetTextNodeForParaProps()->GetAttrOutlineLevel())
+if (pFrame && !pFrame->GetText().isEmpty() &&
+0 == pFrame->GetTextNodeForParaProps()->GetAttrOutlineLevel())
+{
 pStr = & pFrame->GetText();
+}
 
 if( m_bUndoIdInitialized )
 m_bUndoIdInitialized = true;


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

2021-11-16 Thread Caolán McNamara (via logerrit)
 include/vcl/InterimItemWindow.hxx |7 +++
 sw/source/uibase/docvw/AnnotationWin2.cxx |5 +
 vcl/source/control/InterimItemWindow.cxx  |   20 
 3 files changed, 32 insertions(+)

New commits:
commit 0866a9e92ff0d301632d0600d6178c2fc2080f48
Author: Caolán McNamara 
AuthorDate: Mon Nov 15 17:27:58 2021 +
Commit: Michael Stahl 
CommitDate: Tue Nov 16 15:59:04 2021 +0100

Resolves: tdf#143511 SysObj is clipped out if the widget is out of view

so the sizes and relative positions are invalid under gtk, unclip
the SysObj when using get_extents_relative_to

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

diff --git a/include/vcl/InterimItemWindow.hxx 
b/include/vcl/InterimItemWindow.hxx
index 08860c50244a..8c5a6d4e418f 100644
--- a/include/vcl/InterimItemWindow.hxx
+++ b/include/vcl/InterimItemWindow.hxx
@@ -50,6 +50,13 @@ protected:
 
 virtual void Layout();
 
+// unclip a "SysObj" which is a native window element hosted in a 
vcl::Window
+// if the SysObj is logically "visible" in the vcl::Window::IsVisible 
sense but
+// is partially or wholly clipped out due to being overlapped or scrolled 
out
+// of view. The clip state is flagged as dirty after this and vcl will 
restore
+// the clip state the next time it evaluates the clip status
+void UnclipVisibleSysObj();
+
 std::unique_ptr m_xBuilder;
 VclPtr m_xVclContentArea;
 std::unique_ptr m_xContainer;
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 2ae806b5316b..606945672144 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -153,6 +153,10 @@ void SwAnnotationWin::SetCursorLogicPosition(const Point& 
rPosition, bool bPoint
 
 void SwAnnotationWin::DrawForPage(OutputDevice* pDev, const Point& rPt)
 {
+// tdf#143511 unclip SysObj so get_extents_relative_to of children
+// of the SysObj can provide meaningful results
+UnclipVisibleSysObj();
+
 pDev->Push();
 
 pDev->SetFillColor(mColorDark);
@@ -164,6 +168,7 @@ void SwAnnotationWin::DrawForPage(OutputDevice* pDev, const 
Point& rPt)
 pDev->SetFont(aFont);
 
 Size aSz = PixelToLogic(GetSizePixel());
+
 pDev->DrawRect(tools::Rectangle(rPt, aSz));
 
 if (mxMetadataAuthor->get_visible())
diff --git a/vcl/source/control/InterimItemWindow.cxx 
b/vcl/source/control/InterimItemWindow.cxx
index 3817e01893f1..33c508cd7dad 100644
--- a/vcl/source/control/InterimItemWindow.cxx
+++ b/vcl/source/control/InterimItemWindow.cxx
@@ -9,6 +9,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 InterimItemWindow::InterimItemWindow(vcl::Window* pParent, const OUString& 
rUIXMLDescription,
  const OString& rID, bool 
bAllowCycleFocusOut,
@@ -69,6 +71,24 @@ void InterimItemWindow::queue_resize(StateChangedType 
eReason)
 
 void InterimItemWindow::Resize() { Layout(); }
 
+void InterimItemWindow::UnclipVisibleSysObj()
+{
+if (!IsVisible())
+return;
+vcl::Window* pChild = 
m_xVclContentArea->GetWindow(GetWindowType::FirstChild);
+if (!pChild)
+return;
+WindowImpl* pWindowImpl = pChild->ImplGetWindowImpl();
+if (!pWindowImpl)
+return;
+if (!pWindowImpl->mpSysObj)
+return;
+pWindowImpl->mpSysObj->Show(true);
+pWindowImpl->mpSysObj->ResetClipRegion();
+// flag that sysobj clip is dirty and needs to be recalculated on next use
+pWindowImpl->mbInitWinClipRegion = true;
+}
+
 IMPL_LINK_NOARG(InterimItemWindow, DoLayout, Timer*, void) { Layout(); }
 
 void InterimItemWindow::Layout()


[Libreoffice-commits] core.git: filter/source i18npool/inc i18npool/source include/svx sd/source svx/source

2021-11-16 Thread Hossein (via logerrit)
 filter/source/graphicfilter/icgm/bitmap.cxx |2 +-
 i18npool/inc/calendar_hijri.hxx |3 ---
 i18npool/source/calendar/calendar_hijri.cxx |   12 +---
 include/svx/def3d.hxx   |4 
 sd/source/ui/func/fucon3d.cxx   |6 +++---
 svx/source/dialog/dlgctl3d.cxx  |4 ++--
 svx/source/engine3d/view3d.cxx  |2 +-
 7 files changed, 12 insertions(+), 21 deletions(-)

New commits:
commit b0ce4e848f786a2f452a6a6e426df4b95af4da3c
Author: Hossein 
AuthorDate: Tue Nov 16 12:56:49 2021 +0100
Commit: Mike Kaganski 
CommitDate: Tue Nov 16 15:54:30 2021 +0100

Use basegfx::deg2rad instead of *0.01745329251994

* Replaced multiplying by magic number 0.01745329251994 with
basegfx::deg2rad() which is equal to M_PI/180.0
* Instances of this could be found using:

   git grep 0.01745329251994 *.cxx *.hxx

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

diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx 
b/filter/source/graphicfilter/icgm/bitmap.cxx
index 897d2d57e753..cb319cb038e0 100644
--- a/filter/source/graphicfilter/icgm/bitmap.cxx
+++ b/filter/source/graphicfilter/icgm/bitmap.cxx
@@ -234,7 +234,7 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
 nX = rDesc.mnQ.X - rDesc.mnR.X;
 nY = rDesc.mnQ.Y - rDesc.mnR.Y;
 
-double fAngle = 0.01745329251994 * ( 360 - rDesc.mnOrientation );
+double fAngle = basegfx::deg2rad( 360 - rDesc.mnOrientation );
 double fSin = sin(fAngle);
 double fCos = cos(fAngle);
 nX = fCos * nX + fSin * nY;
diff --git a/i18npool/inc/calendar_hijri.hxx b/i18npool/inc/calendar_hijri.hxx
index f8511842d6a7..9732ca373155 100644
--- a/i18npool/inc/calendar_hijri.hxx
+++ b/i18npool/inc/calendar_hijri.hxx
@@ -37,9 +37,6 @@ private:
 void mapToGregorian() override;
 void mapFromGregorian() override;
 
-// radians per degree (pi/180)
-static const double RadPerDeg;
-
 // Synodic Period (mean time between 2 successive new moon: 29d, 12 hr, 
44min, 3sec
 static const double SynPeriod;
 
diff --git a/i18npool/source/calendar/calendar_hijri.cxx 
b/i18npool/source/calendar/calendar_hijri.cxx
index 75a155104cbb..3bc6ccfa841d 100644
--- a/i18npool/source/calendar/calendar_hijri.cxx
+++ b/i18npool/source/calendar/calendar_hijri.cxx
@@ -24,6 +24,7 @@
 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -36,9 +37,6 @@ namespace i18npool {
 // not used
 //static UErrorCode status; // status is shared in all calls to Calendar, it 
has to be reset for each call.
 
-// radians per degree (pi/180)
-const double Calendar_hijri::RadPerDeg  = 0.01745329251994329577;
-
 // Synodic Period (mean time between 2 successive new moon: 29d, 12 hr, 44min, 
3sec
 const double Calendar_hijri::SynPeriod  = 29.53058868;
 const double Calendar_hijri::SynMonth   = 365.25/29.53058868;   // Solar 
days in a year/SynPeriod
@@ -128,22 +126,22 @@ Calendar_hijri::NewMoon(sal_Int32 n)
 + SynPeriod * k
 - 0.0001178 * t2
 - 0.00155 * t3
-+ 0.00033 * sin(RadPerDeg * (166.56 + 132.87 * t - 0.009173 * t2));
++ 0.00033 * sin(basegfx::deg2rad(166.56 + 132.87 * t - 0.009173 * t2));
 
 // Sun's mean anomaly in radian
-sa =  RadPerDeg * (359.2242
+sa =  basegfx::deg2rad(359.2242
 + 29.10535608 * k
 - 0.333 * t2
 - 0.0347 * t3);
 
 // Moon's mean anomaly
-ma =  RadPerDeg * (306.0253
+ma =  basegfx::deg2rad(306.0253
 + 385.81691806 * k
 + 0.0107306 * t2
 + 0.1236 * t3);
 
 // Moon's argument of latitude
-tf = RadPerDeg * 2.0 * (21.2964
+tf = 2.0 * basegfx::deg2rad(21.2964
 + 390.67050646 * k
 - 0.0016528 * t2
 - 0.0239 * t3);
diff --git a/include/svx/def3d.hxx b/include/svx/def3d.hxx
index 41537519af50..37770602d5ff 100644
--- a/include/svx/def3d.hxx
+++ b/include/svx/def3d.hxx
@@ -22,10 +22,6 @@
 
 #include 
 
-const double fPiDiv180 = 0.01745329251994;
-
-#define DEG2RAD(fAngle) (fPiDiv180 * (fAngle))
-
 // 3D helper functions
 
 enum class E3dDragConstraint
diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx
index eb0f35b84eae..ddbe1f238bfe 100644
--- a/sd/source/ui/func/fucon3d.cxx
+++ b/sd/source/ui/func/fucon3d.cxx
@@ -275,7 +275,7 @@ void 
FuConstruct3dObject::ImpPrepareBasic3DShape(E3dCompoundObject const * p3DOb
 {
 case SID_3D_CUBE:
 {
-aTransformation.rotate(DEG2RAD(20), 0.0, 0.0);
+aTransformation.rotate(basegfx::deg2rad(20), 0.0, 0.0);
 }
 break;
 
@@ -287,7 +287,7 @@ void 
FuConstruct3dObject::Im

[Libreoffice-commits] core.git: Branch 'feature/wasm' - android/default-document chart2/source oox/Library_oox.mk oox/source postprocess/Rdb_services.mk RepositoryModule_host.mk solenv/bin static/Cust

2021-11-16 Thread Armin Le Grand (Allotropia) (via logerrit)
 RepositoryModule_host.mk   |3 
 android/default-document/example3.odt  |binary
 chart2/source/controller/main/ChartController.cxx  |   12 
 chart2/source/controller/main/ChartController_TextEdit.cxx |6 
 chart2/source/controller/main/ChartWindow.cxx  |5 
 oox/Library_oox.mk |3 
 oox/source/drawingml/shape.cxx |   10 
 oox/source/export/shapes.cxx   |5 
 oox/source/ppt/pptimport.cxx   |5 
 oox/source/shape/ShapeFilterBase.cxx   |5 
 postprocess/Rdb_services.mk|3 
 solenv/bin/native-code.py  |  182 ++---
 static/CustomTarget_wasm_fs_image.mk   |2 
 static/soffice_args.js |2 
 sw/source/filter/ww8/docxexport.cxx|7 
 xmloff/Library_xo.mk   |7 
 xmloff/Library_xof.mk  |6 
 xmloff/source/core/xmlexp.cxx  |7 
 xmloff/source/core/xmlimp.cxx  |   11 
 xmloff/source/draw/shapeexport.cxx |7 
 xmloff/source/draw/ximpshap.cxx|6 
 xmloff/source/style/xmlstyle.cxx   |6 
 xmloff/source/transform/OOo2Oasis.cxx  |2 
 23 files changed, 118 insertions(+), 184 deletions(-)

New commits:
commit ed9b0dca4edf7ee2e29ec1732582ed07d956145f
Author: Armin Le Grand (Allotropia) 
AuthorDate: Tue Nov 16 15:53:50 2021 +0100
Commit: Armin Le Grand (Allotropia) 
CommitDate: Tue Nov 16 15:53:50 2021 +0100

WASM: Re-activate Chart, disable involved accessibility (using WASM flag)

Change-Id: I339ae931d10e48a14a119f70488a963629709c02

diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index b26979a4b225..502a869b7c06 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -20,12 +20,9 @@ $(eval $(call gb_Module_add_targets,libreoffice,\
 ))
 endif
 
-# WASM_CHART change
-ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE)
 $(eval $(call gb_Module_add_moduledirs,libreoffice,\
chart2 \
 ))
-endif
 
 # WASM_CANVAS change
 ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
diff --git a/android/default-document/example3.odt 
b/android/default-document/example3.odt
new file mode 100644
index ..8810417b0a16
Binary files /dev/null and b/android/default-document/example3.odt differ
diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index 19c314da2635..856ddcdd7dc7 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -41,7 +42,9 @@
 #include "ChartDropTargetHelper.hxx"
 
 #include 
+#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY
 #include 
+#endif
 #include "DrawCommandDispatch.hxx"
 #include "ShapeController.hxx"
 #include "UndoActions.hxx"
@@ -1431,8 +1434,13 @@ uno::Reference< uno::XInterface > SAL_CALL
 {
 uno::Reference< uno::XInterface > xResult;
 
+#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY
 if( aServiceSpecifier == CHART_ACCESSIBLE_TEXT_SERVICE_NAME )
 xResult.set( impl_createAccessibleTextContext());
+#else
+(void)aServiceSpecifier;
+#endif
+
 return xResult;
 }
 
@@ -1546,9 +1554,13 @@ void ChartController::SetAndApplySelection(const 
Reference& rxS
 
 uno::Reference< XAccessible > ChartController::CreateAccessible()
 {
+#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY
 uno::Reference< XAccessible > xResult = new AccessibleChartView( 
GetDrawViewWrapper() );
 impl_initializeAccessible( uno::Reference< lang::XInitialization >( 
xResult, uno::UNO_QUERY ) );
 return xResult;
+#else
+return uno::Reference< XAccessible >();
+#endif
 }
 
 void ChartController::impl_invalidateAccessible()
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx 
b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 23b590907f67..2559a93af86b 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -26,7 +26,9 @@
 #include 
 #include 
 #include 
+#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY
 #include 
+#endif
 #include 
 #include 
 
@@ -214,10 +216,14 @@ void 
ChartController::executeDispatch_InsertSpecialCharacter()
 uno::Reference< css::accessibility::XAccessibleContext >
 ChartController::impl_createAccessibleTextContext()
 {
+#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY
 uno::Reference< css::accessibility::XAccessibleContext > xResult(
 new AccessibleTextHelper( m_pDrawViewWrapper.get() ));
 
 return xResult;

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

2021-11-16 Thread Tomaž Vajngerl (via logerrit)
 include/editeng/unoprnms.hxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 84b817130a1b19591c3add9af5db0f42af64be68
Author: Tomaž Vajngerl 
AuthorDate: Sun Sep 20 19:27:09 2015 +0200
Commit: Miklos Vajna 
CommitDate: Tue Nov 16 15:40:36 2021 +0100

Support reading back theme color from an ooxml document

ooxml supports theme colors and tint/shade value that additionally
changed the theme color. Read back which theme color + tint/shade
value was applied in the resulting color and add this attributes
as properties to be used by writer.
In sidebar theme panel the changing the theme colors now doesn't
takes this into account and changes the colors correctly.

[ Miklos: left out the Wrtier bits for now, focusing on Impress first. ]

(cherry picked from commit 16a0a2089e8572a35a36a7e649703893ecd06299,
from the feature/themesupport2 branch)

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

diff --git a/include/editeng/unoprnms.hxx b/include/editeng/unoprnms.hxx
index 4f1d4ad4b0e1..97aaa77dd86a 100644
--- a/include/editeng/unoprnms.hxx
+++ b/include/editeng/unoprnms.hxx
@@ -22,6 +22,8 @@
 
 
 #define UNO_NAME_CHAR_COLOR "CharColor"
+#define UNO_NAME_CHAR_COLOR_THEME   "CharColorTheme"
+#define UNO_NAME_CHAR_COLOR_TINT_OR_SHADE   "CharColorTintOrShade"
 #define UNO_NAME_CHAR_HEIGHT"CharHeight"
 #define UNO_NAME_CHAR_POSTURE   "CharPosture"
 #define UNO_NAME_CHAR_SHADOWED  "CharShadowed"


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

2021-11-16 Thread Stephan Bergmann (via logerrit)
 include/oox/drawingml/shape.hxx |2 ++
 include/oox/drawingml/theme.hxx |3 ---
 oox/source/drawingml/theme.cxx  |8 
 3 files changed, 2 insertions(+), 11 deletions(-)

New commits:
commit e9ac9830328df833311a3ff703c165234965e2cb
Author: Stephan Bergmann 
AuthorDate: Mon Nov 15 12:22:11 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Nov 16 15:15:50 2021 +0100

Avoid some -Werror,-Wdeprecated-copy-with-user-provided-dtor

...after e6968f0485cfb2f6c941d11c438386e14a47095d "PPTX import: fix 
handling of
theme overrides in the chart import" introduced a use of 
std::make_shared

Change-Id: I5f6384b81e02034b6b2fdf3a3bad0148de4eb584
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125228
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 
(cherry picked from commit 829ea811e19fead7ad35049342136b592077674b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125303
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index 53401d18a1c1..64b1d6fb7611 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -107,7 +107,9 @@ public:
 
 explicit Shape( const char* pServiceType = nullptr, bool bDefaultHeight = 
true );
 explicit Shape( const ShapePtr& pSourceShape );
+Shape(Shape const &) = default;
 virtual ~Shape();
+Shape & operator =(Shape const &) = default;
 
 OUString&  getServiceName(){ return msServiceName; }
 voidsetServiceName( const char* pServiceName );
diff --git a/include/oox/drawingml/theme.hxx b/include/oox/drawingml/theme.hxx
index 6d64649f3a69..944e58b6e79c 100644
--- a/include/oox/drawingml/theme.hxx
+++ b/include/oox/drawingml/theme.hxx
@@ -56,9 +56,6 @@ class TextFont;
 class OOX_DLLPUBLIC Theme
 {
 public:
-Theme();
-~Theme();
-
 void setStyleName( const OUString& rStyleName ) { 
maStyleName = rStyleName; }
 
 ClrScheme&   getClrScheme() { return maClrScheme; }
diff --git a/oox/source/drawingml/theme.cxx b/oox/source/drawingml/theme.cxx
index ca26f389904e..036779d21711 100644
--- a/oox/source/drawingml/theme.cxx
+++ b/oox/source/drawingml/theme.cxx
@@ -23,14 +23,6 @@
 
 namespace oox::drawingml {
 
-Theme::Theme()
-{
-}
-
-Theme::~Theme()
-{
-}
-
 namespace {
 
 template< typename Type >


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

2021-11-16 Thread Ilmari Lauhakangas (via logerrit)
 cui/uiconfig/ui/connpooloptions.ui|2 +-
 filter/uiconfig/ui/pdfgeneralpage.ui  |2 +-
 svx/uiconfig/ui/compressgraphicdialog.ui  |2 +-
 sw/uiconfig/swriter/ui/optcomparison.ui   |2 +-
 sw/uiconfig/swriter/ui/viewoptionspage.ui |6 +++---
 5 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit fcbf3841c534aa7a96e0ff893ecc1c1c4af961e5
Author: Ilmari Lauhakangas 
AuthorDate: Sat Nov 13 14:31:05 2021 +0200
Commit: Ilmari Lauhakangas 
CommitDate: Tue Nov 16 14:51:50 2021 +0100

Related tdf#139031: add missing colons

Reporter mentioned a bunch of missing colons across the UI.

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

diff --git a/cui/uiconfig/ui/connpooloptions.ui 
b/cui/uiconfig/ui/connpooloptions.ui
index e95aa845f60d..83487e9c9d37 100644
--- a/cui/uiconfig/ui/connpooloptions.ui
+++ b/cui/uiconfig/ui/connpooloptions.ui
@@ -155,7 +155,7 @@
   
 True
 False
-_Timeout (seconds)
+_Timeout (seconds):
 True
 timeout
 0
diff --git a/filter/uiconfig/ui/pdfgeneralpage.ui 
b/filter/uiconfig/ui/pdfgeneralpage.ui
index ebfa097c0358..862b4bf56b11 100644
--- a/filter/uiconfig/ui/pdfgeneralpage.ui
+++ b/filter/uiconfig/ui/pdfgeneralpage.ui
@@ -230,7 +230,7 @@
 
 
   
-Reduce ima_ge resolution
+Reduce ima_ge resolution 
to:
 True
 True
 False
diff --git a/svx/uiconfig/ui/compressgraphicdialog.ui 
b/svx/uiconfig/ui/compressgraphicdialog.ui
index e86d6f476e7d..727191ecb9c0 100644
--- a/svx/uiconfig/ui/compressgraphicdialog.ui
+++ b/svx/uiconfig/ui/compressgraphicdialog.ui
@@ -314,7 +314,7 @@
 6
 
   
-Reduce image 
resolution
+Reduce image 
resolution to:
 True
 True
 False
diff --git a/sw/uiconfig/swriter/ui/optcomparison.ui 
b/sw/uiconfig/swriter/ui/optcomparison.ui
index 7f52143f119b..62d228c252e3 100644
--- a/sw/uiconfig/swriter/ui/optcomparison.ui
+++ b/sw/uiconfig/swriter/ui/optcomparison.ui
@@ -110,7 +110,7 @@
 6
 
   
-Ignore _pieces of length
+Ignore _pieces of length:
 True
 True
 False
diff --git a/sw/uiconfig/swriter/ui/viewoptionspage.ui 
b/sw/uiconfig/swriter/ui/viewoptionspage.ui
index a4e56ac930d9..69dd85ed86ab 100644
--- a/sw/uiconfig/swriter/ui/viewoptionspage.ui
+++ b/sw/uiconfig/swriter/ui/viewoptionspage.ui
@@ -393,7 +393,7 @@
 12
 
   
-Verti_cal ruler
+Verti_cal ruler:
 True
 True
 False
@@ -467,7 +467,7 @@
   
 True
 False
-Hori_zontal ruler
+Hori_zontal ruler:
 True
 hrulercombobox
 end
@@ -541,7 +541,7 @@
   
 True
 False
-Measurement unit
+Measurement unit:
   
   
 0


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

2021-11-16 Thread Luboš Luňák (via logerrit)
 include/vcl/test/GraphicsRenderTests.hxx |1 
 vcl/backendtest/GraphicsRenderTests.cxx  |   22 
 vcl/backendtest/VisualBackendTest.cxx|7 ++
 vcl/backendtest/outputdevice/bitmap.cxx  |   73 ---
 vcl/backendtest/outputdevice/common.cxx  |   81 +++
 vcl/inc/test/outputdevice.hxx|3 +
 vcl/qa/cppunit/BackendTest.cxx   |   19 ++-
 7 files changed, 152 insertions(+), 54 deletions(-)

New commits:
commit ae4a9d5cc50d94f3180ce3e5d3793c0a403074cd
Author: Luboš Luňák 
AuthorDate: Tue Nov 16 12:57:52 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Nov 16 14:36:13 2021 +0100

add a vcl backend test that draws a sheared bitmap

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

diff --git a/include/vcl/test/GraphicsRenderTests.hxx 
b/include/vcl/test/GraphicsRenderTests.hxx
index 86266eebe317..480cd73f5358 100644
--- a/include/vcl/test/GraphicsRenderTests.hxx
+++ b/include/vcl/test/GraphicsRenderTests.hxx
@@ -83,6 +83,7 @@ class VCL_PLUGIN_PUBLIC GraphicsRenderTests
 void testDrawDropShapeAAWithPolygon();
 void testDrawBitmap24bpp();
 void testDrawTransformedBitmap24bpp();
+void testComplexDrawTransformedBitmap24bpp();
 void testDrawBitmapExWithAlpha24bpp();
 void testDrawMask24bpp();
 void testDrawBlend24bpp();
diff --git a/vcl/backendtest/GraphicsRenderTests.cxx 
b/vcl/backendtest/GraphicsRenderTests.cxx
index 794910b0f045..1c794b246669 100644
--- a/vcl/backendtest/GraphicsRenderTests.cxx
+++ b/vcl/backendtest/GraphicsRenderTests.cxx
@@ -804,6 +804,27 @@ void GraphicsRenderTests::testDrawTransformedBitmap24bpp()
 }
 }
 
+void GraphicsRenderTests::testComplexDrawTransformedBitmap24bpp()
+{
+vcl::test::OutputDeviceTestBitmap aOutDevTest;
+Bitmap aBitmap = 
aOutDevTest.setupComplexDrawTransformedBitmap(vcl::PixelFormat::N24_BPP);
+OUString aTestName = "testComplexDrawTransformedBitmap24bpp";
+if (!SHOULD_ASSERT)
+{
+appendTestResult(aTestName, "SKIPPED");
+return;
+}
+vcl::test::TestResult eResult
+= 
vcl::test::OutputDeviceTestBitmap::checkComplexTransformedBitmap(aBitmap);
+appendTestResult(aTestName, returnTestStatus(eResult),
+ (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+if (m_aStoreResultantBitmap)
+{
+BitmapEx aBitmapEx(aBitmap);
+exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", 
aBitmapEx);
+}
+}
+
 void GraphicsRenderTests::testDrawBitmapExWithAlpha24bpp()
 {
 vcl::test::OutputDeviceTestBitmap aOutDevTest;
@@ -2230,6 +2251,7 @@ void GraphicsRenderTests::runALLTests()
 testDrawBezierAAWithPolylineB2D();
 testDrawBitmap24bpp();
 testDrawTransformedBitmap24bpp();
+testComplexDrawTransformedBitmap24bpp();
 testDrawBitmapExWithAlpha24bpp();
 testDrawMask24bpp();
 testDrawBlend24bpp();
diff --git a/vcl/backendtest/VisualBackendTest.cxx 
b/vcl/backendtest/VisualBackendTest.cxx
index 4ba2cf63897b..f7da5e182d57 100644
--- a/vcl/backendtest/VisualBackendTest.cxx
+++ b/vcl/backendtest/VisualBackendTest.cxx
@@ -490,6 +490,13 @@ public:
 drawBitmapScaledAndCentered(aRectangle, aBitmap, rRenderContext);
 }
 aRectangle = aRegions[index++];
+{
+vcl::test::OutputDeviceTestBitmap aOutDevTest;
+Bitmap aBitmap = 
aOutDevTest.setupComplexDrawTransformedBitmap(vcl::PixelFormat::N24_BPP);
+
assertAndSetBackground(vcl::test::OutputDeviceTestBitmap::checkComplexTransformedBitmap(aBitmap),
 aRectangle, rRenderContext);
+drawBitmapScaledAndCentered(aRectangle, aBitmap, rRenderContext);
+}
+aRectangle = aRegions[index++];
 {
 vcl::test::OutputDeviceTestBitmap aOutDevTest;
 Bitmap aBitmap = 
aOutDevTest.setupDrawBitmapExWithAlpha(vcl::PixelFormat::N24_BPP);
diff --git a/vcl/backendtest/outputdevice/bitmap.cxx 
b/vcl/backendtest/outputdevice/bitmap.cxx
index 066355c53f14..5b491badf587 100644
--- a/vcl/backendtest/outputdevice/bitmap.cxx
+++ b/vcl/backendtest/outputdevice/bitmap.cxx
@@ -43,6 +43,28 @@ Bitmap 
OutputDeviceTestBitmap::setupDrawTransformedBitmap(vcl::PixelFormat aBitm
 }
 
 
+Bitmap 
OutputDeviceTestBitmap::setupComplexDrawTransformedBitmap(vcl::PixelFormat 
aBitmapFormat,bool isBitmapGreyScale)
+{
+Size aBitmapSize(6, 6);
+Bitmap aBitmap(aBitmapSize, aBitmapFormat);
+aBitmap.Erase(constFillColor);
+
+if (isBitmapGreyScale)
+aBitmap.Convert(BmpConversion::N8BitGreys);
+
+initialSetup(17, 14, constBackgroundColor);
+
+basegfx::B2DHomMatrix aTransform;
+aTransform.shearX(0.25);
+aTransform.scale(aBitmapSize.Width() * 2, aBitmapSize.Height() * 2);
+aTransform.translate(1, 1);
+
+mpVirtualDevice->DrawTransformedBitmapEx(aTransform, Bitma

[Libreoffice-commits] core.git: editeng/source include/editeng offapi/com

2021-11-16 Thread Tomaž Vajngerl (via logerrit)
 editeng/source/items/textitem.cxx |   43 +++---
 include/editeng/colritem.hxx  |   22 +++
 include/editeng/memberids.h   |8 +++-
 offapi/com/sun/star/style/CharacterProperties.idl |   12 ++
 4 files changed, 79 insertions(+), 6 deletions(-)

New commits:
commit 5006dfcbc370e80bd159a9e957254b0ce09a6cdd
Author: Tomaž Vajngerl 
AuthorDate: Sun Sep 20 19:20:59 2015 +0200
Commit: Miklos Vajna 
CommitDate: Tue Nov 16 14:19:40 2021 +0100

Theme color and tint/shade attribute for SvxColorItem

To support theme colors the SvxColorItem must be extended with
an optional attribute theme index to define the index to which
theme color current color belongs and an optional tint/shade
attribute define how much the color ha been additionally tinted
or shaded.

[ Miklos: left out the potentially breaking svx/sdi/svxitems.sdi
changes. ]

(cherry picked from commit ccdbf815e00dbe2ba21f7e86b6743df100b7401f,
from the feature/themesupport2 branch)

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

diff --git a/editeng/source/items/textitem.cxx 
b/editeng/source/items/textitem.cxx
index 75470ff20e4a..8ecfa67584aa 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1354,14 +1354,18 @@ bool SvxContourItem::GetPresentation
 
 // class SvxColorItem 
 SvxColorItem::SvxColorItem( const sal_uInt16 nId ) :
-SfxPoolItem( nId ),
-mColor( COL_BLACK )
+SfxPoolItem(nId),
+mColor( COL_BLACK ),
+maThemeIndex(-1),
+maTintShade(0)
 {
 }
 
 SvxColorItem::SvxColorItem( const Color& rCol, const sal_uInt16 nId ) :
 SfxPoolItem( nId ),
-mColor( rCol )
+mColor( rCol ),
+maThemeIndex(-1),
+maTintShade(0)
 {
 }
 
@@ -1372,8 +1376,11 @@ SvxColorItem::~SvxColorItem()
 bool SvxColorItem::operator==( const SfxPoolItem& rAttr ) const
 {
 assert(SfxPoolItem::operator==(rAttr));
+const SvxColorItem& rColorItem = static_cast(rAttr);
 
-return  mColor == static_cast( rAttr ).mColor;
+return mColor == rColorItem.mColor &&
+   maThemeIndex == rColorItem.maThemeIndex &&
+   maTintShade == rColorItem.maTintShade;
 }
 
 bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -1392,6 +1399,16 @@ bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 
nMemberId ) const
 rVal <<= mColor.GetAlpha() == 0;
 break;
 }
+case MID_COLOR_THEME_INDEX:
+{
+rVal <<= maThemeIndex;
+break;
+}
+case MID_COLOR_TINT_OR_SHADE:
+{
+rVal <<= maTintShade;
+break;
+}
 default:
 {
 rVal <<= mColor;
@@ -1422,11 +1439,29 @@ bool SvxColorItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
 mColor.SetAlpha( Any2Bool( rVal ) ? 0 : 255 );
 return true;
 }
+case MID_COLOR_THEME_INDEX:
+{
+sal_Int16 nIndex = -1;
+if (!(rVal >>= nIndex))
+return false;
+maThemeIndex = nIndex;
+}
+break;
+case MID_COLOR_TINT_OR_SHADE:
+{
+sal_Int16 nTintShade = -1;
+if (!(rVal >>= nTintShade))
+return false;
+maTintShade = nTintShade;
+}
+break;
 default:
 {
 return rVal >>= mColor;
 }
+break;
 }
+return true;
 }
 
 SvxColorItem* SvxColorItem::Clone( SfxItemPool * ) const
diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx
index afb1d9d15c18..ce51be7f3e30 100644
--- a/include/editeng/colritem.hxx
+++ b/include/editeng/colritem.hxx
@@ -31,6 +31,8 @@ class EDITENG_DLLPUBLIC SvxColorItem final : public 
SfxPoolItem
 {
 private:
 Color mColor;
+sal_Int16 maThemeIndex;
+sal_Int16 maTintShade;
 
 public:
 static SfxPoolItem* CreateDefault();
@@ -57,6 +59,26 @@ public:
 }
 void SetValue(const Color& rNewColor);
 
+sal_Int16 GetThemeIndex() const
+{
+return maThemeIndex;
+}
+
+void SetThemeIndex(sal_Int16 nIndex)
+{
+maThemeIndex = nIndex;
+}
+
+sal_Int16 GetTintOrShade() const
+{
+return maTintShade;
+}
+
+void SetTintOrShade(sal_Int16 nTintOrShade)
+{
+maTintShade = nTintOrShade;
+}
+
 void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
diff --git a/include/editeng/memberids.h b/include/editeng/memberids.h
index 8a6c9d0e7769..c6d781da568a 100644
--- a/include/editeng/memberids.h
+++ b/include/editeng/memberids.h
@@ -178,8 +178,12 @@
 #define MID_SHADOW_TRANSPARENCE 1
 
 // SvxColorItem
-#define MID_COLOR_RGB 0
-#defin

[Libreoffice-commits] core.git: helpcontent2

2021-11-16 Thread Alain Romedenne (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e73e45e0ff14f4b0fe443d95937cc5f5a166feb4
Author: Alain Romedenne 
AuthorDate: Tue Nov 16 15:15:02 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Nov 16 14:15:02 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to eb45e7df8aeeab7791876038c16345d5321e49b1
  - tdf#141474 Asc, AscW function signatures

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

diff --git a/helpcontent2 b/helpcontent2
index bcc3ccc059f4..eb45e7df8aee 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit bcc3ccc059f426ef2d79295338e50bb7b7a6642a
+Subproject commit eb45e7df8aeeab7791876038c16345d5321e49b1


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

2021-11-16 Thread Alain Romedenne (via logerrit)
 source/text/sbasic/shared/03120101.xhp |   25 +
 source/text/sbasic/shared/03120102.xhp |   15 ---
 source/text/sbasic/shared/03120111.xhp |   18 +-
 source/text/sbasic/shared/03120112.xhp |   14 +++---
 4 files changed, 37 insertions(+), 35 deletions(-)

New commits:
commit eb45e7df8aeeab7791876038c16345d5321e49b1
Author: Alain Romedenne 
AuthorDate: Mon Nov 8 17:13:13 2021 +0200
Commit: Olivier Hallot 
CommitDate: Tue Nov 16 14:14:59 2021 +0100

tdf#141474 Asc, AscW function signatures

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

diff --git a/source/text/sbasic/shared/03120101.xhp 
b/source/text/sbasic/shared/03120101.xhp
index d5e7a7eaf..f2f403e08 100644
--- a/source/text/sbasic/shared/03120101.xhp
+++ b/source/text/sbasic/shared/03120101.xhp
@@ -33,36 +33,37 @@
   Asc function
 
 
-
-Asc 
Function
-Returns the 
ASCII (American Standard Code for Information Interchange) value of the first 
character in a string expression.
+Asc 
Function
+Returns the ASCII (American 
Standard Code for Information Interchange) value of the first character in a 
string expression.
 
 
-Syntax:
+
 
-Asc (Text As 
String)
+Asc(string) As 
Long
 
 
-Return 
value:
-Integer
+
+Long
 
-Parameters:
- 
Text: Any valid string expression. Only the first character in the 
string is relevant.
+
+string: Any valid string expression. Only the 
first character in the string is relevant.
 Use the Asc 
function to replace keys with values. If the Asc function encounters a blank 
string, $[officename] Basic reports a run-time error. In addition to 7 bit 
ASCII characters (Codes 0-127), the ASCII function can also detect 
non-printable key codes in ASCII code. This function can also handle 16 bit 
unicode characters.
 
 
 
-Example:
+
 
 Sub ExampleASC
 Print 
ASC("A") ' returns 65
-Print 
ASC("Z") ' returns 90
+Print 
ASC(string:="Z") ' returns 90
 Print 
ASC("Las Vegas") ' returns 76, since only the first character is taken into 
account
 End Sub
 
 
 
-CHR
+  
+  
+  
 
 
 
diff --git a/source/text/sbasic/shared/03120102.xhp 
b/source/text/sbasic/shared/03120102.xhp
index a9d73261e..5f3a8f359 100644
--- a/source/text/sbasic/shared/03120102.xhp
+++ b/source/text/sbasic/shared/03120102.xhp
@@ -30,19 +30,18 @@
 
   Chr function
 
-Chr Function
-Returns 
the character that corresponds to the specified character code.
+Chr 
Function
+Returns the character that 
corresponds to the specified character code.
   
 
 
-
-Chr(Expression 
As Integer)
+Chr[$](expression As Integer) As String
 
 
 String
 
 
- 
Expression: a numeric expression that represents a valid 8-bit 
ASCII value (0-255) or a 16-bit Unicode value. (To support expressions with a 
nominally negative argument like Chr(&H8000) in a 
backwards-compatible way, values in the range −32768 to −1 are internally 
mapped to the range 32768 to 65535.)
+Expression: a numeric expression that represents 
a valid 8-bit ASCII value (0-255) or a 16-bit Unicode value. (To support 
expressions with a nominally negative argument like 
Chr(&H8000) in a backwards-compatible way, values in the range 
−32768 to −1 are internally mapped to the range 32768 to 65535.)
 
 When VBA compatibility mode is enabled 
(OPTION 
VBASUPPORT 1), Expression is a numeric expression 
that represents a valid 8-bit ASCII value (0-255) only.
 
@@ -56,13 +55,15 @@
 
 Sub ExampleChr
 ' 
This example inserts quotation marks (ASCII value 34) in a string.
-
MsgBox "A "+ Chr$(34)+"short" + Chr$(34)+" trip."
+
MsgBox "A "+ Chr$(34)+"short" + Chr(34)+" trip."
 ' 
The printout appears in the dialog as: A "short" trip.
 End Sub
 
 
 
-ASC
+  
+  
+  
 
 
 
diff --git a/source/text/sbasic/shared/03120111.xhp 
b/source/text/sbasic/shared/03120111.xhp
index 4ee05ef53..96d211f72 100644
--- a/source/text/sbasic/shared/03120111.xhp
+++ b/source/text/sbasic/shared/03120111.xhp
@@ -34,18 +34,18 @@
 
 
 
-AscW Function 
[VBA]
-Returns the 
Unicode value of the first character in a string expression.
+AscW Function 
[VBA]
+Returns the Unicode value of 
the first character in a string expression.
 
 
 
 
-AscW (Text As String)
+AscW (string) As Long
 
 
-Integer
+Long
 
- 
Text: Any valid string expression. Only the first character in the 
string is relevant.
+ 
string: Any valid string expression. Only the first character in 
the string is relevant.
 Use the AscW 
function to replace keys with Unicode values. If the AscW function encounters a 
blank string, %PRODUCTNAME Basic reports a run-time error. Returned values are 
between 0 and 65535.
 
 
@@ -53,15 +53,15 @@
 
 Sub ExampleAscW
  Print AscW("A") 
' returns 65
- Print AscW("Ω") 
' returns 937

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - vcl/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 vcl/source/gdi/jobset.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 9c1f3718d193badaba271a46800ffde8051baf57
Author: Caolán McNamara 
AuthorDate: Wed Dec 30 21:19:15 2020 +
Commit: Michael Stahl 
CommitDate: Tue Nov 16 14:13:23 2021 +0100

ofz#29113 short read

Change-Id: I107d8abeac419ba4e70a5880054c9195c60464ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108527
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit ab3829bf74667044d9b0f5b96903bbafda5171f6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125281
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 95c8669a7f97..6ef1d51b3ff0 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -261,6 +261,13 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& 
rJobSetup )
 if ( nSystem == JOBSET_FILE364_SYSTEM ||
  nSystem == JOBSET_FILE605_SYSTEM )
 {
+if (nRead < sizeof(ImplOldJobSetupData) + 
sizeof(Impl364JobSetupData))
+{
+SAL_WARN("vcl", "Parsing error: " << 
sizeof(ImplOldJobSetupData) + sizeof(Impl364JobSetupData) <<
+ " required, but " << nRead << " available");
+return rIStream;
+}
+
 Impl364JobSetupData* pOldJobData= 
reinterpret_cast(pTempBuf.get() + sizeof( 
ImplOldJobSetupData ));
 sal_uInt16 nOldJobDataSize  = SVBT16ToShort( 
pOldJobData->nSize );
 rJobData.SetSystem( SVBT16ToShort( pOldJobData->nSystem ) );


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - external/graphite

2021-11-16 Thread Stephan Bergmann (via logerrit)
 external/graphite/UnpackedTarball_graphite.mk |6 ++
 external/graphite/ubsan.patch |   11 +++
 2 files changed, 17 insertions(+)

New commits:
commit 1ee3a04228e8440e7e669a08d658d1f28e31cf7c
Author: Stephan Bergmann 
AuthorDate: Sun Dec 16 20:25:59 2018 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 14:12:58 2021 +0100

Add back still-relevant part of external/graphite/ubsan.patch

...which had been removed completely with
6b84708914f9c026776b28a300ac6d278272881f "graphite: update to 1.3.12".  See
:

> /workdir/UnpackedTarball/graphite/src/gr_face.cpp:98:16: runtime error: 
downcast of address 0x60f8c3b0 which does not point to an object of type 
'gr_face'
> 0x60f8c3b0: note: object is of type 'graphite2::Face'
>  2a 00 00 61  d0 17 e7 ff 99 2b 00 00  36 00 be be be be be be  88 d8 0e 
00 d0 61 00 00  80 38 05 00
>   ^~~
>   vptr for 'graphite2::Face'
> #0 0x2b99fdaae105 in gr_make_face_with_ops 
/workdir/UnpackedTarball/graphite/src/gr_face.cpp:98:16
> #1 0x2b99fdaaeabe in gr_make_face 
/workdir/UnpackedTarball/graphite/src/gr_face.cpp:107:12
> #2 0x2b99fdfd6dc7 in _hb_graphite2_shaper_face_data_create 
/workdir/UnpackedTarball/harfbuzz/src/hb-graphite2.cc:114:18
> #3 0x2b99fdfd62f0 in hb_graphite2_shaper_face_data_ensure 
/workdir/UnpackedTarball/harfbuzz/src/hb-graphite2.cc:37:1
> #4 0x2b99fddb6a10 in hb_shape_plan_create_cached2 
/workdir/UnpackedTarball/harfbuzz/src/./hb-shaper-list.hh:35:1
> #5 0x2b99fddb1478 in hb_shape_full 
/workdir/UnpackedTarball/harfbuzz/src/hb-shape.cc:133:33
> #6 0x2b99fc5867df in GenericSalLayout::LayoutText(ImplLayoutArgs&, 
SalLayoutGlyphs const*) /vcl/source/gdi/CommonSalLayout.cxx:440:23
> #7 0x2b99fb2345e4 in OutputDevice::ImplLayout(rtl::OUString const&, 
int, int, Point const&, long, long const*, SalLayoutFlags, vcl::TextLayoutCache 
const*, SalLayoutGlyphs const*) const /vcl/source/outdev/text.cxx:1310:36
> #8 0x2b99fb236220 in OutputDevice::GetTextArray(rtl::OUString const&, 
long*, int, int, vcl::TextLayoutCache const*, SalLayoutGlyphs const*) const 
/vcl/source/outdev/text.cxx:960:45
> #9 0x2b99fb235c56 in OutputDevice::GetTextWidth(rtl::OUString const&, 
int, int, vcl::TextLayoutCache const*, SalLayoutGlyphs const*) const 
/vcl/source/outdev/text.cxx:881:19
> #10 0x2b99fd105281 in 
ImplFontMetricData::ImplInitTextLineSize(OutputDevice const*) 
/vcl/source/font/fontmetric.cxx:325:30
> #11 0x2b99fb1c128c in OutputDevice::ImplNewFont() const 
/vcl/source/outdev/font.cxx:1062:38
> #12 0x2b99fb1bd46c in 
OutputDevice::GetFontFeatures(std::__debug::vector >&) const /vcl/source/outdev/font.cxx:171:10
> #13 0x2b9a1a3c8607 in FontFeatureTest::testGetFontFeatures() 
/vcl/qa/cppunit/FontFeatureTest.cxx:58:5
> #14 0x2b9a1a401f2c in void std::__invoke_impl(std::__invoke_memfun_deref, void 
(FontFeatureTest::*&)(), FontFeatureTest*&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:73:14
> #15 0x2b9a1a401b0f in std::__invoke_result::type std::__invoke(void (FontFeatureTest::*&)(), 
FontFeatureTest*&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95:14
> #16 0x2b9a1a40195c in void std::_Bind::__call(std::tuple<>&&, 
std::_Index_tuple<0ul>) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:467:11
> #17 0x2b9a1a401533 in void std::_Bind::operator()() 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:549:17
> #18 0x2b9a1a400340 in std::_Function_handler >::_M_invoke(std::_Any_data const&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316:2
> #19 0x2b9a1a40259c in std::function::operator()() const 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706:14
> #20 0x2b9a1a3ff580 in CppUnit::TestCaller::runTest() 
/workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7
> #21 0x2b99d930dab8 in CppUnit::TestCaseMethodFunctor::operator()() 
const /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5
> #22 0x2b99f39cf332 in (anonymous 
namespace)::Protector::protect(CppUnit::Functor const&, 
CppUnit::ProtectorContext const&) /test/source/vclbootstrapprotector.cxx:49:14
> #23 0x2b99d92de5fa in 
CppUnit::ProtectorChain::ProtectFunctor::operator()() const 
/workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
> #24 0x2b99e850d672 in (anonymous 
namespace)::Prot::protect(Cpp

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

2021-11-16 Thread Tor Lillqvist (via logerrit)
 configure.ac |   17 +
 1 file changed, 13 insertions(+), 4 deletions(-)

New commits:
commit ad37a2938c11a5e40fca0ce8ea7a10b5b24d9998
Author: Tor Lillqvist 
AuthorDate: Tue Nov 16 14:08:58 2021 +0200
Commit: Tor Lillqvist 
CommitDate: Tue Nov 16 14:01:38 2021 +0100

Accept macOS SDK 12.0

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

diff --git a/configure.ac b/configure.ac
index 3920842e71aa..b9807525b793 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2850,7 +2850,7 @@ if test $_os = Darwin; then
 # higher than or equal to the minimum required should be found.
 
 AC_MSG_CHECKING([what macOS SDK to use])
-for _macosx_sdk in ${with_macosx_sdk-11.3 11.1 11.0 10.15 10.14 10.13 
10.12}; do
+for _macosx_sdk in ${with_macosx_sdk-12.0 11.3 11.1 11.0 10.15 10.14 10.13 
10.12}; do
 MACOSX_SDK_PATH=`xcrun --sdk macosx${_macosx_sdk} --show-sdk-path 2> 
/dev/null`
 if test -d "$MACOSX_SDK_PATH"; then
 with_macosx_sdk="${_macosx_sdk}"
@@ -2891,8 +2891,11 @@ if test $_os = Darwin; then
 11.3)
 MACOSX_SDK_VERSION=110300
 ;;
+12.0)
+MACOSX_SDK_VERSION=12
+;;
 *)
-AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported 
value, supported values are 10.12--11.3])
+AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported 
value, supported values are 10.12--12.0])
 ;;
 esac
 
@@ -2960,8 +2963,11 @@ if test $_os = Darwin; then
 11.3)
 MAC_OS_X_VERSION_MIN_REQUIRED="110300"
 ;;
+12.0)
+MAC_OS_X_VERSION_MIN_REQUIRED="12"
+;;
 *)
-AC_MSG_ERROR([with-macosx-version-min-required 
$with_macosx_version_min_required is not a supported value, supported values 
are 10.10--11.3])
+AC_MSG_ERROR([with-macosx-version-min-required 
$with_macosx_version_min_required is not a supported value, supported values 
are 10.10--12.0])
 ;;
 esac
 MAC_OS_X_VERSION_MIN_REQUIRED_DOTS=$with_macosx_version_min_required
@@ -3032,8 +3038,11 @@ if test $_os = Darwin; then
 11.3)
 MAC_OS_X_VERSION_MAX_ALLOWED="110100"
 ;;
+12.0)
+MAC_OS_X_VERSION_MAX_ALLOWED="12"
+;;
 *)
-AC_MSG_ERROR([with-macosx-version-max-allowed 
$with_macosx_version_max_allowed is not a supported value, supported values are 
10.10--11.3])
+AC_MSG_ERROR([with-macosx-version-max-allowed 
$with_macosx_version_max_allowed is not a supported value, supported values are 
10.10--12.0])
 ;;
 esac
 


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

2021-11-16 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7fdcc2d3f218def3b3166cdbfa83154e68e00b4b
Author: Caolán McNamara 
AuthorDate: Tue Nov 16 10:57:14 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 16 13:59:09 2021 +0100

Related: tdf#142706 mask with GDK_MODIFIER_MASK to ignore unwanted bits

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 3a7b2f86fd72..93035fd27cbb 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -17687,7 +17687,8 @@ void 
GtkInstanceDrawingArea::im_context_set_cursor_location(const tools::Rectang
 #if !GTK_CHECK_VERSION(4, 0, 0)
 static gboolean signalEntryInsertSpecialCharKeyPress(GtkEntry* pEntry, 
GdkEventKey* pEvent, gpointer)
 {
-if ((pEvent->keyval == GDK_KEY_S || pEvent->keyval == GDK_KEY_s) && 
pEvent->state == static_cast(GDK_SHIFT_MASK|GDK_CONTROL_MASK))
+if ((pEvent->keyval == GDK_KEY_S || pEvent->keyval == GDK_KEY_s) &&
+(pEvent->state & GDK_MODIFIER_MASK) == 
static_cast(GDK_SHIFT_MASK|GDK_CONTROL_MASK))
 {
 if (auto pImplFncGetSpecialChars = vcl::GetGetSpecialCharsFunction())
 {


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

2021-11-16 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk4/convert3to4.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit af1b9bf6e1a5d9622faa81ae2e2ddb1cf26153f8
Author: Caolán McNamara 
AuthorDate: Tue Nov 16 10:41:05 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 16 13:58:50 2021 +0100

avoid using always-show-arrow in gtk4 < 4.4

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

diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx
index 29b51a747ff7..d6f1e7e0fa29 100644
--- a/vcl/unx/gtk4/convert3to4.cxx
+++ b/vcl/unx/gtk4/convert3to4.cxx
@@ -731,7 +731,7 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 if (sName == "draw-indicator")
 {
 assert(toBool(xChild->getFirstChild()->getNodeValue()));
-if (GetParentObjectType(xChild) == "GtkMenuButton")
+if (GetParentObjectType(xChild) == "GtkMenuButton" && 
gtk_get_minor_version() >= 4)
 {
 auto xDoc = xChild->getOwnerDocument();
 auto xAlwaysShowArrow = CreateProperty(xDoc, 
"always-show-arrow", "True");
@@ -1140,8 +1140,11 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 else if (sClass == "GtkMenuToolButton")
 {
 xClass->setNodeValue("GtkMenuButton");
-auto xAlwaysShowArrow = CreateProperty(xDoc, 
"always-show-arrow", "True");
-insertAsFirstChild(xChild, xAlwaysShowArrow);
+if (gtk_get_minor_version() >= 4)
+{
+auto xAlwaysShowArrow = CreateProperty(xDoc, 
"always-show-arrow", "True");
+insertAsFirstChild(xChild, xAlwaysShowArrow);
+}
 }
 else if (sClass == "GtkRadioToolButton")
 {


[Libreoffice-commits] core.git: translations

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

New commits:
commit eda22714fd83a8b2ace0369b0a71825f11fbf85a
Author: Christian Lohmaier 
AuthorDate: Tue Nov 16 13:09:52 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Nov 16 13:09:52 2021 +0100

Update git submodules

* Update translations from branch 'master'
  to a692f49808bffb7f402cd88cbf48e32b2044d111
  - update translations for master

and force-fix errors using pocheck

Change-Id: I93c02cdd542eb2c42765f65e9e78f2dc8f339005

diff --git a/translations b/translations
index 327c876f4c35..a692f49808bf 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 327c876f4c35127cff03b26303acd4831252ce66
+Subproject commit a692f49808bffb7f402cd88cbf48e32b2044d111


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

2021-11-16 Thread Luboš Luňák (via logerrit)
 configure.ac |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a0f35cd270fa486deb75e1c2c0516d55723cd04a
Author: Luboš Luňák 
AuthorDate: Mon Sep 20 00:26:29 2021 +
Commit: Luboš Luňák 
CommitDate: Tue Nov 16 13:00:02 2021 +0100

hard-require Clang for Skia also on Mac

Since Skia is now the default on Mac too. Clang on Mac should
be the given, but check for consistency.

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

diff --git a/configure.ac b/configure.ac
index f0a4b641edab..4ef19213c15d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12048,10 +12048,10 @@ if test "$ENABLE_SKIA" = TRUE -a "$COM_IS_CLANG" != 
TRUE; then
 fi
 fi
 if test -z "$LO_CLANG_CC" -o -z "$LO_CLANG_CXX"; then
-# Skia is the default on Windows, so hard-require Clang.
+# Skia is the default on Windows and Mac, so hard-require Clang.
 # Elsewhere it's used just by the 'gen' VCL backend which is rarely 
used.
-if test "$_os" = "WINNT"; then
-AC_MSG_ERROR([Clang compiler not found. The Skia library needs to 
be built using Clang.])
+if test "$_os" = "WINNT" -o "$_os" = "Darwin"; then
+AC_MSG_ERROR([Clang compiler not found. The Skia library needs to 
be built using Clang, or use --disable-skia.])
 else
 AC_MSG_WARN([Clang compiler not found.])
 fi


[Libreoffice-commits] core.git: officecfg/registry

2021-11-16 Thread Luboš Luňák (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Common.xcu |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7ee24b7358295bf9be323ad177ea00aa8b1588a7
Author: Luboš Luňák 
AuthorDate: Mon Aug 30 11:35:41 2021 +0200
Commit: Luboš Luňák 
CommitDate: Tue Nov 16 12:59:44 2021 +0100

make Skia the default now on Mac too (again)

This is a re-land of commit 2489edcbe0f5dc77649fc2e801c1bbffb71692b8,
now that HiDPI support (tdf#144214) has been implemented properly.
Originally coming from the ESC decision from Aug 26th.

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

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu 
b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index b00c5f3d1c18..f543b6ebb3c9 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -51,7 +51,7 @@
   
   
 
-  false
+  true
   false
   true
 


Re: Contribution to LibreOffice Open-source

2021-11-16 Thread Ilmari Lauhakangas

On 16.11.2021 4.20, Akash U.N wrote:

Respected Sir/Madam,
I am a second-year BTech student from Vellore Institute of Technology, 
pursuing my BTech in the Computer Science domain. I have always been 
waiting for a perfect chance to contribute to an open-source of my 
interest, which was when I have come to know about LibreOffice. Also, I 
am new to open-source contributions, but am well acquainted with c++, 
python, and Java.


I would wish to contribute to your community, but could you please help 
me on how do I get started with the contributions?

Hoping to hear from you soon.


I have invited you to an interview.

Ilmari


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

2021-11-16 Thread Noel Grandin (via logerrit)
 jvmfwk/inc/fwkutil.hxx  |   20 +---
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |6 +--
 jvmfwk/source/elements.cxx  |2 -
 jvmfwk/source/framework.cxx |   32 ++--
 jvmfwk/source/fwkbase.cxx   |   18 +--
 jvmfwk/source/fwkutil.cxx   |   28 +
 6 files changed, 59 insertions(+), 47 deletions(-)

New commits:
commit 1170db278db9f1067c05d5df95faf81c1ce861bc
Author: Noel Grandin 
AuthorDate: Mon Nov 15 21:44:42 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Nov 16 12:29:38 2021 +0100

rtl::Static->thread-safe static in jvmfwk

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

diff --git a/jvmfwk/inc/fwkutil.hxx b/jvmfwk/inc/fwkutil.hxx
index fdef421f664f..e76a92769fc1 100644
--- a/jvmfwk/inc/fwkutil.hxx
+++ b/jvmfwk/inc/fwkutil.hxx
@@ -24,8 +24,8 @@
 #include 
 #include 
 #include 
-#include 
 #include 
+#include 
 
 namespace osl { class Mutex; }
 
@@ -40,23 +40,9 @@ OUString getLibraryLocation();
 /** provides a bootstrap class which already knows the values from the
 jvmfkwrc file.
 */
-struct Bootstrap :
-public ::rtl::StaticWithInit< const rtl::Bootstrap *, Bootstrap > {
-const rtl::Bootstrap * operator () () {
-OUString sIni = getLibraryLocation() +
-#ifdef MACOSX
-// For some reason the jvmfwk3rc file is traditionally in
-// LIBO_URE_ETC_FOLDER
-"/../" LIBO_URE_ETC_FOLDER
-#endif
-SAL_CONFIGFILE("/jvmfwk3");
-::rtl::Bootstrap *  bootstrap = new ::rtl::Bootstrap(sIni);
-SAL_INFO("jfw.level2", "Using configuration file " << sIni);
-return bootstrap;
-}
-};
+const rtl::Bootstrap * Bootstrap();
 
-struct FwkMutex: public ::rtl::Static {};
+osl::Mutex& FwkMutex();
 
 rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData);
 rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data);
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 70d6e7888097..29de226211f1 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -48,7 +48,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -100,8 +99,6 @@ using namespace jfw_plugin;
 
 namespace {
 
-struct PluginMutex: public ::rtl::Static {};
-
 #if defined(UNX) && !defined(ANDROID)
 OString getPluginJarPath(
 std::u16string_view sVendor,
@@ -616,10 +613,11 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
 JavaVM ** ppVm,
 JNIEnv ** ppEnv)
 {
+static osl::Mutex aPluginMutex;
 assert(pInfo != nullptr);
 assert(ppVm != nullptr);
 assert(ppEnv != nullptr);
-osl::MutexGuard guard(PluginMutex::get());
+osl::MutexGuard guard(aPluginMutex);
 javaPluginError errorcode = javaPluginError::NONE;
 #ifdef MACOSX
 rtl::Reference aVendorInfo = getJREInfoByPath( 
pInfo->sLocation );
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index f5bdce32696d..c48f942ef8e8 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -961,7 +961,7 @@ void 
MergedSettings::getVmParametersArray(std::vector * parParams)
 const
 {
 assert(parParams != nullptr);
-osl::MutexGuard guard(FwkMutex::get());
+osl::MutexGuard guard(FwkMutex());
 
 *parParams = m_vmParams;
 }
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index ad1f636f00d0..40bbf629a36f 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -58,7 +58,7 @@ javaFrameworkError 
jfw_findAllJREs(std::vector> *pparI
 assert(pparInfo != nullptr);
 try
 {
-osl::MutexGuard guard(jfw::FwkMutex::get());
+osl::MutexGuard guard(jfw::FwkMutex());
 
 jfw::VendorSettings aVendorSettings;
 std::vector> vecInfo;
@@ -137,7 +137,7 @@ javaFrameworkError jfw_startVM(
 
 try
 {
-osl::MutexGuard guard(jfw::FwkMutex::get());
+osl::MutexGuard guard(jfw::FwkMutex());
 
 //We keep this pointer so we can determine if a VM has already
 //been created.
@@ -298,7 +298,7 @@ javaFrameworkError 
jfw_findAndSelectJRE(std::unique_ptr *pInfo)
 javaFrameworkError errcode = JFW_E_NONE;
 try
 {
-osl::MutexGuard guard(jfw::FwkMutex::get());
+osl::MutexGuard guard(jfw::FwkMutex());
 if (jfw::getMode() == jfw::JFW_MODE_DIRECT)
 return JFW_E_DIRECT_MODE;
 std::unique_ptr aCurrentInfo;
@@ -436,7 +436,7 @@ javaFrameworkError 
jfw_getSelectedJRE(std::unique_ptr *ppInfo)
 javaFrameworkError errcode = JFW_E_NONE;
 try
 {
-osl::MutexGuard gua

Contribution to LibreOffice Open-source

2021-11-16 Thread Akash U.N
Respected Sir/Madam,
I am a second-year BTech student from Vellore Institute of Technology,
pursuing my BTech in the Computer Science domain. I have always been
waiting for a perfect chance to contribute to an open-source of my
interest, which was when I have come to know about LibreOffice. Also, I am
new to open-source contributions, but am well acquainted with c++, python,
and Java.

I would wish to contribute to your community, but could you please help me
on how do I get started with the contributions?
Hoping to hear from you soon.

Akash


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

2021-11-16 Thread Noel Grandin (via logerrit)
 oox/source/core/filterbase.cxx|   11 +++
 oox/source/core/xmlfilterbase.cxx |   16 ++--
 2 files changed, 13 insertions(+), 14 deletions(-)

New commits:
commit 2d2dc141f6d0eaa1e4737450fac707c67c05387c
Author: Noel Grandin 
AuthorDate: Mon Nov 15 21:51:18 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Nov 16 11:54:10 2021 +0100

rtl::Static->thread-safe static in oox

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

diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index 95545374e8a4..6ae55238c3eb 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -33,7 +33,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -72,7 +71,11 @@ struct UrlPool
 ::std::set< OUString > maUrls;
 };
 
-struct StaticUrlPool : public ::rtl::Static< UrlPool, StaticUrlPool > {};
+UrlPool& StaticUrlPool()
+{
+static UrlPool SINGLETON;
+return SINGLETON;
+}
 
 /** This guard prevents recursive loading/saving of the same document. */
 class DocumentOpenedGuard
@@ -92,7 +95,7 @@ private:
 
 DocumentOpenedGuard::DocumentOpenedGuard( const OUString& rUrl )
 {
-UrlPool& rUrlPool = StaticUrlPool::get();
+UrlPool& rUrlPool = StaticUrlPool();
 std::scoped_lock aGuard( rUrlPool.maMutex );
 mbValid = rUrl.isEmpty() || (rUrlPool.maUrls.count( rUrl ) == 0);
 if( mbValid && !rUrl.isEmpty() )
@@ -104,7 +107,7 @@ DocumentOpenedGuard::DocumentOpenedGuard( const OUString& 
rUrl )
 
 DocumentOpenedGuard::~DocumentOpenedGuard()
 {
-UrlPool& rUrlPool = StaticUrlPool::get();
+UrlPool& rUrlPool = StaticUrlPool();
 std::scoped_lock aGuard( rUrlPool.maMutex );
 if( !maUrl.isEmpty() )
 rUrlPool.maUrls.erase( maUrl );
diff --git a/oox/source/core/xmlfilterbase.cxx 
b/oox/source/core/xmlfilterbase.cxx
index 7a9728e88f32..daea0ad49962 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -36,7 +36,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -92,13 +91,10 @@ using ::sax_fastparser::FastSerializerHelper;
 
 namespace {
 
-struct NamespaceIds: public rtl::StaticWithInit<
-Sequence< beans::Pair< OUString, sal_Int32 > >,
-NamespaceIds>
+const Sequence< beans::Pair< OUString, sal_Int32 > >& NamespaceIds()
 {
-Sequence< beans::Pair< OUString, sal_Int32 > > operator()()
-{
-return css::uno::Sequence>{
+static const Sequence< beans::Pair< OUString, sal_Int32 > > SINGLETON
+{
 {"http://www.w3.org/XML/1998/namespace";, NMSP_xml},
 {"http://schemas.openxmlformats.org/package/2006/relationships";,
  NMSP_packageRel},
@@ -151,12 +147,12 @@ struct NamespaceIds: public rtl::StaticWithInit<
 {"http://schemas.microsoft.com/office/drawing/2012/chart";,
  NMSP_c15},
 };
-}
+return SINGLETON;
 };
 
 void registerNamespaces( FastParser& rParser )
 {
-const Sequence< beans::Pair >& ids = 
NamespaceIds::get();
+const Sequence< beans::Pair >& ids = NamespaceIds();
 
 // Filter out duplicates: a namespace can have multiple URLs, think of
 // strict vs transitional.
@@ -467,7 +463,7 @@ bool XmlFilterBase::importFragment( const ::rtl::Reference< 
FragmentHandler >& r
 rxSerializer->fastSerialize( rxHandler,
  mxImpl->maFastParser.getTokenHandler(),
  Sequence< StringPair >(),
- NamespaceIds::get() );
+ NamespaceIds() );
 return true;
 }
 catch( Exception& )


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/uiconfig svtools/uiconfig svx/uiconfig

2021-11-16 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/breaknumberoption.ui |   18 --
 cui/uiconfig/ui/calloutpage.ui   |   14 --
 svtools/uiconfig/ui/graphicexport.ui |   18 --
 svx/uiconfig/ui/compressgraphicdialog.ui |   26 --
 svx/uiconfig/ui/sidebareffect.ui |7 ++-
 5 files changed, 70 insertions(+), 13 deletions(-)

New commits:
commit 482aa3d22834b246cae7bc88e3bdaba968739884
Author: Caolán McNamara 
AuthorDate: Sun Nov 14 14:59:38 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 16 11:34:26 2021 +0100

Resolves: tdf#140250 don't share adjustments between differerent spinbuttons

Change-Id: Ib684c746ff3176cf45ea9364efc12f2d6dde1f70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125131
Reviewed-by: Michael Stahl 
Tested-by: Caolán McNamara 

diff --git a/cui/uiconfig/ui/breaknumberoption.ui 
b/cui/uiconfig/ui/breaknumberoption.ui
index 9400ddfac773..71fa24cb7c5b 100644
--- a/cui/uiconfig/ui/breaknumberoption.ui
+++ b/cui/uiconfig/ui/breaknumberoption.ui
@@ -9,6 +9,20 @@
 1
 10
   
+  
+2
+9
+1
+1
+10
+  
+  
+2
+9
+1
+1
+10
+  
   
 False
 6
@@ -122,7 +136,7 @@
 True
 start
 True
-adjustment1
+adjustment2
 12
 6
 True
@@ -161,7 +175,7 @@
 True
 start
 True
-adjustment1
+adjustment3
 12
 6
 True
diff --git a/cui/uiconfig/ui/calloutpage.ui b/cui/uiconfig/ui/calloutpage.ui
index 62c393d9ef01..d1e6f3e801ea 100644
--- a/cui/uiconfig/ui/calloutpage.ui
+++ b/cui/uiconfig/ui/calloutpage.ui
@@ -7,6 +7,16 @@
 0.5
 10
   
+  
+2400
+0.5
+10
+  
+  
+2400
+0.5
+10
+  
   
 True
 False
@@ -230,7 +240,7 @@
 True
 True
 0.00
-adjustment1
+adjustment2
 2
 True
 
@@ -276,7 +286,7 @@
 True
 True
 0.00
-adjustment1
+adjustment3
 2
 True
 
diff --git a/svtools/uiconfig/ui/graphicexport.ui 
b/svtools/uiconfig/ui/graphicexport.ui
index 2a860a9a6f36..8c5042b18932 100644
--- a/svtools/uiconfig/ui/graphicexport.ui
+++ b/svtools/uiconfig/ui/graphicexport.ui
@@ -31,6 +31,20 @@
 1
 10
   
+  
+1
+100
+75
+1
+10
+  
+  
+1
+9
+9
+1
+10
+  
   
 False
 6
@@ -392,7 +406,7 @@
 True
 center
 True
-adjustment1
+adjustment6
 0
   
   
@@ -457,7 +471,7 @@
 True
 center
 True
-adjustment2
+adjustment7
 0
   
   
diff --git a/svx/uiconfig/ui/compressgraphicdialog.ui 
b/svx/uiconfig/ui/compressgraphicdialog.ui
index 3ecab9735f41..e86d6f476e7d 100644
--- a/svx/uiconfig/ui/compressgraphicdialog.ui
+++ b/svx/uiconfig/ui/compressgraphicdialog.ui
@@ -2,7 +2,14 @@
 
 
   
-  
+  
+1
+9
+6
+1
+1
+  
+  
 1
 9
 6
@@ -16,7 +23,14 @@
 100
 100
   
-  
+  
+1
+99
+80
+1
+5
+  
+  
 1
 99
 80
@@ -178,7 +192,7 @@
 True
 True
 True
-quality-adjustment
+quality-adjustment-scale
 0
 False
 right
@@ -196,7 +210,7 @@
 True
 True
 True
-quality-adjustment
+quality-adjustment-spin
 True
 True
 
@@ -226,7 +240,7 @@
 150
 True
 True
-compression-adjustment
+compression-adjustment-scale
 0
 False
 right
@@ -245,7 +259,7 @@
 True
 True
 6
-compression-adjustment
+compression-adjustment-spin
  

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

2021-11-16 Thread Michael Stahl (via logerrit)
 sw/source/core/docnode/ndnum.cxx |2 ++
 sw/source/core/docnode/nodes.cxx |   18 --
 2 files changed, 14 insertions(+), 6 deletions(-)

New commits:
commit 74ff78e1e21dc83099d0dfcedba780c176c8fb3f
Author: Michael Stahl 
AuthorDate: Mon Nov 15 17:29:59 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Nov 16 11:27:03 2021 +0100

tdf#121546 sw: don't use undo array's m_pOutlineNodes

It's pointless.

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

diff --git a/sw/source/core/docnode/ndnum.cxx b/sw/source/core/docnode/ndnum.cxx
index b3d66affa66e..a7b898ee5f0a 100644
--- a/sw/source/core/docnode/ndnum.cxx
+++ b/sw/source/core/docnode/ndnum.cxx
@@ -38,6 +38,8 @@ bool SwOutlineNodes::Seek_Entry(SwNode* rP, size_type* pnPos) 
const
 
 void SwNodes::UpdateOutlineNode(SwNode & rNd)
 {
+assert(IsDocNodes()); // no point in m_pOutlineNodes for undo nodes
+
 SwTextNode * pTextNd = rNd.GetTextNode();
 
 if (!(pTextNd && pTextNd->IsOutlineStateChanged()))
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index da593261074b..e7af18a1c16a 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -110,6 +110,16 @@ SwNodes::~SwNodes()
 m_pEndOfContent.reset();
 }
 
+static bool IsInsertOutline(SwNodes const& rNodes, sal_uLong const nIndex)
+{
+if (!rNodes.IsDocNodes())
+{
+return false;
+}
+return nIndex < rNodes.GetEndOfRedlines().StartOfSectionNode()->GetIndex()
+|| rNodes.GetEndOfRedlines().GetIndex() < nIndex;
+}
+
 void SwNodes::ChgNode( SwNodeIndex const & rDelPos, sal_uLong nSz,
 SwNodeIndex& rInsPos, bool bNewFrames )
 {
@@ -125,9 +135,7 @@ void SwNodes::ChgNode( SwNodeIndex const & rDelPos, 
sal_uLong nSz,
 
 // NEVER include nodes from the RedLineArea
 sal_uLong nNd = rInsPos.GetIndex();
-bool bInsOutlineIdx = (
-rNds.GetEndOfRedlines().StartOfSectionNode()->GetIndex() >= nNd ||
-nNd >= rNds.GetEndOfRedlines().GetIndex() );
+bool const bInsOutlineIdx = IsInsertOutline(rNds, nNd);
 
 if( &rNds == this ) // if in the same node array -> move
 {
@@ -484,9 +492,7 @@ bool SwNodes::MoveNodes( const SwNodeRange& aRange, SwNodes 
& rNodes,
 
 // NEVER include nodes from the RedLineArea
 sal_uLong nNd = aIdx.GetIndex();
-bool bInsOutlineIdx = ( rNodes.GetEndOfRedlines().
-StartOfSectionNode()->GetIndex() >= nNd ||
-nNd >= rNodes.GetEndOfRedlines().GetIndex() );
+bool const bInsOutlineIdx = IsInsertOutline(rNodes, nNd);
 
 if( bNewFrames )
 // delete all frames


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

2021-11-16 Thread Caolán McNamara (via logerrit)
 include/vcl/InterimItemWindow.hxx |7 +++
 sw/source/uibase/docvw/AnnotationWin2.cxx |5 +
 vcl/source/control/InterimItemWindow.cxx  |   20 
 3 files changed, 32 insertions(+)

New commits:
commit 0659c488efb00e2a87fa98edf498288470688a9a
Author: Caolán McNamara 
AuthorDate: Mon Nov 15 17:27:58 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 16 11:26:33 2021 +0100

Resolves: tdf#143511 SysObj is clipped out if the widget is out of view

so the sizes and relative positions are invalid under gtk, unclip
the SysObj when using get_extents_relative_to

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

diff --git a/include/vcl/InterimItemWindow.hxx 
b/include/vcl/InterimItemWindow.hxx
index 3fc0903b110f..4cf4dd4ebeca 100644
--- a/include/vcl/InterimItemWindow.hxx
+++ b/include/vcl/InterimItemWindow.hxx
@@ -51,6 +51,13 @@ protected:
 
 virtual void Layout();
 
+// unclip a "SysObj" which is a native window element hosted in a 
vcl::Window
+// if the SysObj is logically "visible" in the vcl::Window::IsVisible 
sense but
+// is partially or wholly clipped out due to being overlapped or scrolled 
out
+// of view. The clip state is flagged as dirty after this and vcl will 
restore
+// the clip state the next time it evaluates the clip status
+void UnclipVisibleSysObj();
+
 std::unique_ptr m_xBuilder;
 VclPtr m_xVclContentArea;
 std::unique_ptr m_xContainer;
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 47d0cdd7bb6f..33dc2cb54b5b 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -152,6 +152,10 @@ void SwAnnotationWin::SetCursorLogicPosition(const Point& 
rPosition, bool bPoint
 
 void SwAnnotationWin::DrawForPage(OutputDevice* pDev, const Point& rPt)
 {
+// tdf#143511 unclip SysObj so get_extents_relative_to of children
+// of the SysObj can provide meaningful results
+UnclipVisibleSysObj();
+
 pDev->Push();
 
 pDev->SetFillColor(mColorDark);
@@ -163,6 +167,7 @@ void SwAnnotationWin::DrawForPage(OutputDevice* pDev, const 
Point& rPt)
 pDev->SetFont(aFont);
 
 Size aSz = PixelToLogic(GetSizePixel());
+
 pDev->DrawRect(tools::Rectangle(rPt, aSz));
 
 if (mxMetadataAuthor->get_visible())
diff --git a/vcl/source/control/InterimItemWindow.cxx 
b/vcl/source/control/InterimItemWindow.cxx
index d47da4a02d19..0017065d7ddb 100644
--- a/vcl/source/control/InterimItemWindow.cxx
+++ b/vcl/source/control/InterimItemWindow.cxx
@@ -9,6 +9,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 InterimItemWindow::InterimItemWindow(vcl::Window* pParent, const OUString& 
rUIXMLDescription,
  const OString& rID, bool 
bAllowCycleFocusOut,
@@ -69,6 +71,24 @@ void InterimItemWindow::queue_resize(StateChangedType 
eReason)
 
 void InterimItemWindow::Resize() { Layout(); }
 
+void InterimItemWindow::UnclipVisibleSysObj()
+{
+if (!IsVisible())
+return;
+vcl::Window* pChild = 
m_xVclContentArea->GetWindow(GetWindowType::FirstChild);
+if (!pChild)
+return;
+WindowImpl* pWindowImpl = pChild->ImplGetWindowImpl();
+if (!pWindowImpl)
+return;
+if (!pWindowImpl->mpSysObj)
+return;
+pWindowImpl->mpSysObj->Show(true);
+pWindowImpl->mpSysObj->ResetClipRegion();
+// flag that sysobj clip is dirty and needs to be recalculated on next use
+pWindowImpl->mbInitWinClipRegion = true;
+}
+
 IMPL_LINK_NOARG(InterimItemWindow, DoLayout, Timer*, void) { Layout(); }
 
 void InterimItemWindow::Layout()


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

2021-11-16 Thread Katarina Behrens (via logerrit)
 sd/source/ui/animations/CustomAnimationPane.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 71a186aedc6060bb4fb834c847f74c657d700f1e
Author: Katarina Behrens 
AuthorDate: Fri Nov 12 14:32:34 2021 +0100
Commit: Katarina Behrens 
CommitDate: Tue Nov 16 11:09:42 2021 +0100

tdf#135033: Make undo of adding and editing animations possible

weird this somehow sneaked out when converting custom animation
pane to sidebar when undoing other operations (delete etc.) stayed
in place

Change-Id: I6287682839d0e0401cc60bf82257d86765f3a858
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125110
Tested-by: Jenkins
Reviewed-by: Katarina Behrens 

diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx 
b/sd/source/ui/animations/CustomAnimationPane.cxx
index b604824f694f..3fe62f843f15 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1833,6 +1833,7 @@ void CustomAnimationPane::onAdd()
 updateMotionPathTags();
 }
 
+addUndo();
 mrBase.GetDocShell()->SetModified();
 
 updateControls();
@@ -2134,6 +2135,7 @@ IMPL_LINK_NOARG(CustomAnimationPane, SelectionHandler, 
Timer*, void)
 pEffectSequence->replace( pEffect, pDescriptor, fDuration );
 }
 
+addUndo();
 onPreview(false);
 }
 


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

2021-11-16 Thread Miklos Vajna (via logerrit)
 oox/qa/unit/data/chart-theme-override.pptx |binary
 oox/qa/unit/drawingml.cxx  |   29 +
 oox/source/drawingml/shape.cxx |   22 ++
 3 files changed, 47 insertions(+), 4 deletions(-)

New commits:
commit b95adc80a01b9caf97ade47a4cdb15a210ddd5eb
Author: Miklos Vajna 
AuthorDate: Mon Nov 15 09:23:20 2021 +0100
Commit: Mike Kaganski 
CommitDate: Tue Nov 16 10:55:04 2021 +0100

tdf#127512: PPTX import: fix handling of theme overrides in the chart import

A problem since commit 08818d8a45e034ad825c7fafbb76766f106f1d1d
(bnc#882383: Do not ignore themeOverride for charts in .pptx,
2014-07-04), an override for one chart should not affect later drawingML
objects.

(cherry picked from commit e6968f0485cfb2f6c941d11c438386e14a47095d)

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

diff --git a/oox/qa/unit/data/chart-theme-override.pptx 
b/oox/qa/unit/data/chart-theme-override.pptx
new file mode 100644
index ..85243b678bdf
Binary files /dev/null and b/oox/qa/unit/data/chart-theme-override.pptx differ
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index e1c665e22e86..a72f84d76b32 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -345,6 +346,34 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testGroupShapeSmartArt)
 CPPUNIT_ASSERT_GREATER(static_cast(0), xSmartArt->getCount());
 }
 
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartThemeOverride)
+{
+// Given a document with 2 slides, slide1 has a chart with a theme 
override and slide2 has a
+// shape:
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"chart-theme-override.pptx";
+
+// When loading that document:
+load(aURL);
+
+// Then make sure that the slide 2 shape's text color is blue, not red:
+uno::Reference 
xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(1),
+ uno::UNO_QUERY);
+uno::Reference xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xText(xShape->getText(), 
uno::UNO_QUERY);
+uno::Reference 
xPara(xText->createEnumeration()->nextElement(),
+uno::UNO_QUERY);
+uno::Reference 
xPortion(xPara->createEnumeration()->nextElement(),
+ uno::UNO_QUERY);
+sal_Int32 nActual{ 0 };
+xPortion->getPropertyValue("CharColor") >>= nActual;
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 4485828 (0x4472c4)
+// - Actual  : 16711680 (0xff)
+// i.e. the text color was red, not blue.
+CPPUNIT_ASSERT_EQUAL(static_cast(0x4472C4), nActual);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 6e8ae072af56..c2e97c5b947b 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1919,14 +1919,22 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, 
const Reference< XShapes >&
 rFilter.importFragment( pChartSpaceFragment );
 ::oox::ppt::PowerPointImport *pPowerPointImport =
 dynamic_cast< ::oox::ppt::PowerPointImport* >(&rFilter);
+
+// The original theme.
+ThemePtr pTheme;
+
 if (!aThemeOverrideFragmentPath.isEmpty() && pPowerPointImport)
 {
+// Handle theme override.
 uno::Reference< xml::sax::XFastSAXSerializable > xDoc(
 
rFilter.importFragment(aThemeOverrideFragmentPath), uno::UNO_QUERY_THROW);
-ThemePtr pTheme = 
pPowerPointImport->getActualSlidePersist()->getTheme();
-rFilter.importFragment(new ThemeOverrideFragmentHandler(
-rFilter, aThemeOverrideFragmentPath, *pTheme), 
xDoc);
-
pPowerPointImport->getActualSlidePersist()->setTheme(pTheme);
+pTheme = 
pPowerPointImport->getActualSlidePersist()->getTheme();
+auto pThemeOverride = std::make_shared(*pTheme);
+rFilter.importFragment(
+new ThemeOverrideFragmentHandler(rFilter, 
aThemeOverrideFragmentPath,
+ *pThemeOverride),
+xDoc);
+
pPowerPointImport->getActualSlidePersist()->setTheme(pThemeOverride);
 }
 
 // convert impo

[Libreoffice-commits] core.git: officecfg/registry

2021-11-16 Thread Szymon Kłos (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 1430d7670070606de41bd954835e55a71d88875b
Author: Szymon Kłos 
AuthorDate: Tue Nov 16 10:08:17 2021 +0100
Commit: Szymon Kłos 
CommitDate: Tue Nov 16 10:53:49 2021 +0100

tdf#145694 sidebar: add glow and soft edge panel for fontwork

Change-Id: Ia501a0f1084e4b6d5ca2052a0241ee7675cd2f12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125270
Reviewed-by: Szymon Kłos 
Tested-by: Szymon Kłos 

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 8a5c37223c92..c47b1c739d5a 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -630,6 +630,9 @@
 DrawImpress,Draw,   hidden  ;
 DrawImpress,Graphic,hidden  ;
 WriterVariants, Draw,   hidden  ;
+Calc,DrawFontwork, visible ;
+DrawImpress,DrawFontwork, visible ;
+WriterVariants,DrawFontwork, visible ;
   
 
 


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 sw/source/core/inc/layact.hxx|8 +-
 sw/source/core/layout/layact.cxx |   51 +++
 2 files changed, 58 insertions(+), 1 deletion(-)

New commits:
commit 55f07410ed109acd01b29fdc72dbeb95c661ed50
Author: Caolán McNamara 
AuthorDate: Fri Jul 16 12:45:21 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 10:44:57 2021 +0100

crashtesting: UaF on layout of fdo53985-1.docx

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

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

diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx
index 37fc4a9aae9e..75a0523fda7f 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -68,6 +68,9 @@ class SwLayAction
 
 std::unique_ptr m_pWait;
 
+std::vector m_aFrameStack;
+std::vector> m_aFrameDeleteGuards;
+
 // If a paragraph (or anything else) moved more than one page when
 // formatting, it adds its new page number here.
 // The InternalAction can then take the appropriate steps.
@@ -124,6 +127,9 @@ class SwLayAction
 
 bool RemoveEmptyBrowserPages();
 
+void PushFormatLayout(SwFrame* pLow);
+void PopFormatLayout();
+
 public:
 SwLayAction(SwRootFrame *pRt, SwViewShellImp *pImp, TaskStopwatch* pWatch 
= nullptr);
 ~SwLayAction();
@@ -148,7 +154,7 @@ public:
 void SetReschedule  ( bool bNew )   { m_bReschedule = bNew; }
 void SetWaitAllowed ( bool bNew )   { m_bWaitAllowed = bNew; }
 
-void SetAgain(bool bAgain) { m_bAgain = bAgain; }
+void SetAgain(bool bAgain);
 void SetUpdateExpFields() {m_bUpdateExpFields = true; }
 
 inline void SetCheckPageNum( sal_uInt16 nNew );
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index d677bccbdb22..1600f556e32a 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -321,6 +321,53 @@ bool SwLayAction::RemoveEmptyBrowserPages()
 return bRet;
 }
 
+void SwLayAction::SetAgain(bool bAgain)
+{
+if (bAgain == m_bAgain)
+return;
+
+m_bAgain = bAgain;
+
+assert(m_aFrameStack.size() == m_aFrameDeleteGuards.size());
+size_t nCount = m_aFrameStack.size();
+if (m_bAgain)
+{
+// LayAction::FormatLayout is now flagged to exit early and will avoid
+// dereferencing any SwFrames in the stack of FormatLayouts so allow
+// their deletion
+for (size_t i = 0; i < nCount; ++i)
+m_aFrameDeleteGuards[i].reset();
+}
+else
+{
+// LayAction::FormatLayout is now continue normally and will
+// dereference the top SwFrame in the stack of m_aFrameStack as each
+// FormatLevel returns so disallow their deletion
+for (size_t i = 0; i < nCount; ++i)
+m_aFrameDeleteGuards[i] = 
std::make_unique(m_aFrameStack[i]);
+}
+}
+
+void SwLayAction::PushFormatLayout(SwFrame* pLow)
+{
+/* Workaround crash seen in crashtesting with fdo53985-1.docx
+
+   Lock pLow against getting deleted when it will be dereferenced
+   after FormatLayout
+
+   If SetAgain is called to make SwLayAction exit early to avoid that
+   dereference, then it clears these guards
+*/
+m_aFrameStack.push_back(pLow);
+m_aFrameDeleteGuards.push_back(std::make_unique(pLow));
+}
+
+void SwLayAction::PopFormatLayout()
+{
+m_aFrameDeleteGuards.pop_back();
+m_aFrameStack.pop_back();
+}
+
 void SwLayAction::Action(OutputDevice* pRenderContext)
 {
 m_bActionInProgress = true;
@@ -1380,7 +1427,11 @@ bool SwLayAction::FormatLayout( OutputDevice 
*pRenderContext, SwLayoutFrame *pLa
 }
 // Skip the ones already registered for deletion
 else if( !pLow->IsSctFrame() || 
static_cast(pLow)->GetSection() )
+{
+PushFormatLayout(pLow);
 bChanged |= FormatLayout( pRenderContext, 
static_cast(pLow), bAddRect );
+PopFormatLayout();
+}
 }
 else if ( m_pImp->GetShell()->IsPaintLocked() )
 // Shortcut to minimize the cycles. With Lock, the


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 sw/source/core/inc/layact.hxx   |2 +-
 sw/source/core/layout/layact.cxx|   14 +-
 sw/source/core/layout/objectformattertxtfrm.cxx |2 +-
 sw/source/core/layout/pagechg.cxx   |2 +-
 4 files changed, 12 insertions(+), 8 deletions(-)

New commits:
commit a485769c98a92dfa1da1be60d2f85a2343b1ca42
Author: Caolán McNamara 
AuthorDate: Thu Jul 15 14:13:35 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 10:44:31 2021 +0100

Only change SwLayAction::m_bAgain via SetAgain

no logic change intended

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

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

diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx
index c212b40f1516..37fc4a9aae9e 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -148,7 +148,7 @@ public:
 void SetReschedule  ( bool bNew )   { m_bReschedule = bNew; }
 void SetWaitAllowed ( bool bNew )   { m_bWaitAllowed = bNew; }
 
-void SetAgain() { m_bAgain = true; }
+void SetAgain(bool bAgain) { m_bAgain = bAgain; }
 void SetUpdateExpFields() {m_bUpdateExpFields = true; }
 
 inline void SetCheckPageNum( sal_uInt16 nNew );
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index e5267fff5fb7..d677bccbdb22 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -284,11 +284,12 @@ bool SwLayAction::IsInterrupt()
 
 void SwLayAction::Reset()
 {
+SetAgain(false);
 m_pOptTab = nullptr;
 m_nStartTicks = std::clock();
 m_nEndPage = m_nPreInvaPage = m_nCheckPageNum = USHRT_MAX;
 m_bPaint = m_bComplete = m_bWaitAllowed = m_bCheckPages = true;
-m_bInterrupt = m_bAgain = m_bNextCycle = m_bCalcLayout = m_bReschedule =
+m_bInterrupt = m_bNextCycle = m_bCalcLayout = m_bReschedule =
 m_bUpdateExpFields = m_bBrowseActionStop = false;
 m_pCurPage = nullptr;
 }
@@ -346,12 +347,15 @@ void SwLayAction::Action(OutputDevice* pRenderContext)
 SetCheckPages( false );
 
 InternalAction(pRenderContext);
-m_bAgain |= RemoveEmptyBrowserPages();
+if (RemoveEmptyBrowserPages())
+SetAgain(true);
 while ( IsAgain() )
 {
-m_bAgain = m_bNextCycle = false;
+SetAgain(false);
+m_bNextCycle = false;
 InternalAction(pRenderContext);
-m_bAgain |= RemoveEmptyBrowserPages();
+if (RemoveEmptyBrowserPages())
+SetAgain(true);
 }
 m_pRoot->DeleteEmptySct();
 
@@ -643,7 +647,7 @@ void SwLayAction::InternalAction(OutputDevice* 
pRenderContext)
 {
 bool bOld = IsAgain();
 m_pRoot->RemoveSuperfluous();
-m_bAgain = bOld;
+SetAgain(bOld);
 }
 if ( IsAgain() )
 {
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx 
b/sw/source/core/layout/objectformattertxtfrm.cxx
index 2a072d5f97a5..45608c13c651 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -307,7 +307,7 @@ bool SwObjectFormatterTextFrame::DoFormatObjs()
 {
 // notify layout action, thus is can restart the layout process on
 // a previous page.
-GetLayAction()->SetAgain();
+GetLayAction()->SetAgain(true);
 }
 else
 {
diff --git a/sw/source/core/layout/pagechg.cxx 
b/sw/source/core/layout/pagechg.cxx
index 02d8ec499e3f..75eacea7c95a 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -284,7 +284,7 @@ void SwPageFrame::DestroyImpl()
 SwViewShellImp *pImp = pSh->Imp();
 pImp->SetFirstVisPageInvalid();
 if ( pImp->IsAction() )
-pImp->GetLayAction().SetAgain();
+pImp->GetLayAction().SetAgain(true);
 // #i9719# - retouche area of page
 // including border and shadow area.
 const bool bRightSidebar = (SidebarPosition() == 
sw::sidebarwindows::SidebarPosition::RIGHT);


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

2021-11-16 Thread Luboš Luňák (via logerrit)
 vcl/skia/gdiimpl.cxx |   27 +--
 1 file changed, 21 insertions(+), 6 deletions(-)

New commits:
commit 621430208d29e40ab95509a4e94da6e8313ed389
Author: Luboš Luňák 
AuthorDate: Tue Nov 16 08:03:06 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Nov 16 10:41:36 2021 +0100

optimize Skia's copyArea() to copy less data

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

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index b97d2f28c428..4019c436d51d 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1347,17 +1347,32 @@ void SkiaSalGraphicsImpl::privateCopyBits(const 
SalTwoRect& rPosAry, SkiaSalGrap
  rPosAry.mnDestHeight));
 SkPaint paint;
 paint.setBlendMode(SkBlendMode::kSrc); // copy as is, including alpha
-SkRect srcRect
-= SkRect::MakeXYWH(rPosAry.mnSrcX, rPosAry.mnSrcY, rPosAry.mnSrcWidth, 
rPosAry.mnSrcHeight);
+SkIRect srcRect = SkIRect::MakeXYWH(rPosAry.mnSrcX, rPosAry.mnSrcY, 
rPosAry.mnSrcWidth,
+rPosAry.mnSrcHeight);
 SkRect destRect = SkRect::MakeXYWH(rPosAry.mnDestX, rPosAry.mnDestY, 
rPosAry.mnDestWidth,
rPosAry.mnDestHeight);
 // Scaling for source coordinates must be done manually.
 if (src->mScaling != 1)
 srcRect = scaleRect(srcRect, src->mScaling);
-// Do not use makeImageSnapshot(rect), as that one may make a needless 
data copy.
-getDrawCanvas()->drawImageRect(makeCheckedImageSnapshot(src->mSurface), 
srcRect, destRect,
-   makeSamplingOptions(rPosAry, mScaling, 
src->mScaling), &paint,
-   SkCanvas::kFast_SrcRectConstraint);
+if (src == this)
+{
+// Copy-to-self means that we'd take a snapshot, which would refcount 
the data,
+// and then drawing would result in copy in write, copying the entire 
surface.
+// Try to copy less by making a snapshot of only what is needed.
+sk_sp image = makeCheckedImageSnapshot(src->mSurface, 
srcRect);
+srcRect.offset(-srcRect.x(), -srcRect.y());
+getDrawCanvas()->drawImageRect(image, SkRect::Make(srcRect), destRect,
+   makeSamplingOptions(rPosAry, mScaling, 
src->mScaling),
+   &paint, 
SkCanvas::kFast_SrcRectConstraint);
+}
+else
+{
+// Do not use makeImageSnapshot(rect), as that one may make a needless 
data copy.
+getDrawCanvas()->drawImageRect(makeCheckedImageSnapshot(src->mSurface),
+   SkRect::Make(srcRect), destRect,
+   makeSamplingOptions(rPosAry, mScaling, 
src->mScaling),
+   &paint, 
SkCanvas::kFast_SrcRectConstraint);
+}
 }
 
 bool SkiaSalGraphicsImpl::blendBitmap(const SalTwoRect& rPosAry, const 
SalBitmap& rBitmap)


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

2021-11-16 Thread Luboš Luňák (via logerrit)
 vcl/inc/skia/salbmp.hxx |   24 +++-
 1 file changed, 19 insertions(+), 5 deletions(-)

New commits:
commit adba50494e11ca799ce6a794195ff844dfac7cd3
Author: Luboš Luňák 
AuthorDate: Mon Nov 15 22:18:46 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Nov 16 10:40:19 2021 +0100

log also whether SkiaSalBitmap has any pending scaling

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

diff --git a/vcl/inc/skia/salbmp.hxx b/vcl/inc/skia/salbmp.hxx
index 455414fdd7fa..b2f452c82979 100644
--- a/vcl/inc/skia/salbmp.hxx
+++ b/vcl/inc/skia/salbmp.hxx
@@ -21,12 +21,13 @@
 #define INCLUDED_VCL_INC_SKIA_SALBMP_H
 
 #include 
-
-#include 
+#include 
 
 #include 
 
-#include 
+#include 
+
+#include 
 
 class VCL_PLUGIN_PUBLIC SkiaSalBitmap final : public SalBitmap
 {
@@ -139,8 +140,8 @@ private:
 #endif
 
 template 
-friend inline std::basic_ostream&
-operator<<(std::basic_ostream& stream, const SkiaSalBitmap* 
bitmap)
+friend std::basic_ostream& 
operator<<(std::basic_ostream& stream,
+ const SkiaSalBitmap* 
bitmap)
 {
 if (bitmap == nullptr)
 return stream << "(null)";
@@ -149,19 +150,32 @@ private:
 // A/a - has alpha SkImage (on GPU/CPU)
 // E - has erase color
 // B - has pixel buffer
+// (wxh) - has pending scaling (after each item)
 stream << static_cast(bitmap) << " " << bitmap->GetSize() 
<< "x"
<< bitmap->GetBitCount();
 if (bitmap->GetBitCount() <= 8 && 
!bitmap->Palette().IsGreyPalette8Bit())
 stream << "p";
 stream << "/";
 if (bitmap->mImage)
+{
 stream << (bitmap->mImage->isTextureBacked() ? "I" : "i");
+if (SkiaHelper::imageSize(bitmap->mImage) != bitmap->mSize)
+stream << "(" << SkiaHelper::imageSize(bitmap->mImage) << ")";
+}
 if (bitmap->mAlphaImage)
+{
 stream << (bitmap->mAlphaImage->isTextureBacked() ? "A" : "a");
+if (SkiaHelper::imageSize(bitmap->mAlphaImage) != bitmap->mSize)
+stream << "(" << SkiaHelper::imageSize(bitmap->mAlphaImage) << 
")";
+}
 if (bitmap->mEraseColorSet)
 stream << "E" << bitmap->mEraseColor;
 if (bitmap->mBuffer)
+{
 stream << "B";
+if (bitmap->mSize != bitmap->mPixelsSize)
+stream << "(" << bitmap->mPixelsSize << ")";
+}
 return stream;
 }
 


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

2021-11-16 Thread Luboš Luňák (via logerrit)
 vcl/skia/gdiimpl.cxx |   13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 07e5e9f4c4318c19dd553459132efa71d456eaef
Author: Luboš Luňák 
AuthorDate: Mon Nov 15 20:07:51 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Nov 16 10:40:00 2021 +0100

don't bother caching bitmaps that prefer shaders

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

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index de1e8c47cb12..b97d2f28c428 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1611,6 +1611,9 @@ sk_sp 
SkiaSalGraphicsImpl::mergeCacheBitmaps(const SkiaSalBitmap& bitma
 return image;
 if (alphaBitmap && alphaBitmap->IsFullyOpaqueAsAlpha())
 alphaBitmap = nullptr; // the alpha can be ignored
+if (bitmap.PreferSkShader() && (!alphaBitmap || 
alphaBitmap->PreferSkShader()))
+return image;
+
 // Probably not much point in caching of just doing a copy.
 if (alphaBitmap == nullptr && targetSize == bitmap.GetSize())
 return image;
@@ -1730,7 +1733,8 @@ bool SkiaSalGraphicsImpl::drawAlphaBitmap(const 
SalTwoRect& rPosAry, const SalBi
 = mergeCacheBitmaps(rSkiaSourceBitmap, &rSkiaAlphaBitmap, imageSize * 
mScaling);
 if (image)
 drawImage(imagePosAry, image, mScaling);
-else if (rSkiaAlphaBitmap.IsFullyOpaqueAsAlpha()) // alpha can be ignored
+else if (rSkiaAlphaBitmap.IsFullyOpaqueAsAlpha()
+ && !rSkiaSourceBitmap.PreferSkShader()) // alpha can be ignored
 drawBitmap(rPosAry, rSkiaSourceBitmap);
 else
 drawShader(rPosAry,
@@ -1744,11 +1748,6 @@ bool SkiaSalGraphicsImpl::drawAlphaBitmap(const 
SalTwoRect& rPosAry, const SalBi
 void SkiaSalGraphicsImpl::drawBitmap(const SalTwoRect& rPosAry, const 
SkiaSalBitmap& bitmap,
  SkBlendMode blendMode)
 {
-if (bitmap.PreferSkShader())
-{
-drawShader(rPosAry, bitmap.GetSkShader(makeSamplingOptions(rPosAry, 
mScaling)), blendMode);
-return;
-}
 // Use mergeCacheBitmaps(), which may decide to cache the result, avoiding 
repeated
 // scaling.
 SalTwoRect imagePosAry(rPosAry);
@@ -1766,6 +1765,8 @@ void SkiaSalGraphicsImpl::drawBitmap(const SalTwoRect& 
rPosAry, const SkiaSalBit
 sk_sp image = mergeCacheBitmaps(bitmap, nullptr, imageSize * 
mScaling);
 if (image)
 drawImage(imagePosAry, image, mScaling, blendMode);
+else if (bitmap.PreferSkShader())
+drawShader(rPosAry, bitmap.GetSkShader(makeSamplingOptions(rPosAry, 
mScaling)), blendMode);
 else
 drawImage(rPosAry, bitmap.GetSkImage(), 1, blendMode);
 }


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

2021-11-16 Thread Luboš Luňák (via logerrit)
 vcl/inc/skia/gdiimpl.hxx |4 +--
 vcl/skia/gdiimpl.cxx |   61 +--
 2 files changed, 40 insertions(+), 25 deletions(-)

New commits:
commit 6792e6e5e49d11a54256b75c4c5a476bb2f10b4a
Author: Luboš Luňák 
AuthorDate: Mon Nov 15 18:19:27 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Nov 16 10:39:43 2021 +0100

when caching bitmaps in skia, take into account HiDPI

Since the image will be actually eventually drawn twice as big,
cache an image that is twice as big.

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

diff --git a/vcl/inc/skia/gdiimpl.hxx b/vcl/inc/skia/gdiimpl.hxx
index 70bbcf5c4dcc..942567fec0f6 100644
--- a/vcl/inc/skia/gdiimpl.hxx
+++ b/vcl/inc/skia/gdiimpl.hxx
@@ -206,7 +206,7 @@ public:
 void drawBitmap(const SalTwoRect& rPosAry, const SkiaSalBitmap& bitmap,
 SkBlendMode blendMode = SkBlendMode::kSrcOver);
 
-void drawImage(const SalTwoRect& rPosAry, const sk_sp& aImage,
+void drawImage(const SalTwoRect& rPosAry, const sk_sp& aImage, 
int srcScaling = 1,
SkBlendMode eBlendMode = SkBlendMode::kSrcOver);
 
 void drawShader(const SalTwoRect& rPosAry, const sk_sp& shader,
@@ -284,7 +284,7 @@ protected:
 void resetCanvasScalingAndClipping();
 static void setCanvasClipRegion(SkCanvas* canvas, const vcl::Region& 
region);
 sk_sp mergeCacheBitmaps(const SkiaSalBitmap& bitmap, const 
SkiaSalBitmap* alphaBitmap,
- const Size targetSize);
+ const Size& targetSize);
 
 // Skia uses floating point coordinates, so when we use integer 
coordinates, sometimes
 // rounding results in off-by-one errors (down), especially when drawing 
using GPU,
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index ebd1389c5970..de1e8c47cb12 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1604,9 +1604,8 @@ bool SkiaSalGraphicsImpl::drawEPS(tools::Long, 
tools::Long, tools::Long, tools::
 // Especially in raster mode scaling and alpha blending may be expensive if 
done repeatedly.
 sk_sp SkiaSalGraphicsImpl::mergeCacheBitmaps(const SkiaSalBitmap& 
bitmap,
   const SkiaSalBitmap* 
alphaBitmap,
-  const Size targetSize)
+  const Size& targetSize)
 {
-// TODO This should take into account mScaling!=1, and callers should use 
that too.
 sk_sp image;
 if (targetSize.IsEmpty())
 return image;
@@ -1631,7 +1630,7 @@ sk_sp 
SkiaSalGraphicsImpl::mergeCacheBitmaps(const SkiaSalBitmap& bitma
 // In some cases (tdf#134237) the target size may be very large. In that 
case it's
 // better to rely on Skia to clip and draw only the necessary, rather than 
prepare
 // a very large image only to not use most of it.
-const Size drawAreaSize = mClipRegion.GetBoundRect().GetSize();
+const Size drawAreaSize = mClipRegion.GetBoundRect().GetSize() * mScaling;
 if (targetSize.Width() > drawAreaSize.Width() || targetSize.Height() > 
drawAreaSize.Height())
 {
 // This is a bit tricky. The condition above just checks that at least 
a part of the resulting
@@ -1727,9 +1726,10 @@ bool SkiaSalGraphicsImpl::drawAlphaBitmap(const 
SalTwoRect& rPosAry, const SalBi
 imagePosAry.mnSrcHeight = imagePosAry.mnDestHeight;
 imageSize = Size(imagePosAry.mnSrcWidth, imagePosAry.mnSrcHeight);
 }
-sk_sp image = mergeCacheBitmaps(rSkiaSourceBitmap, 
&rSkiaAlphaBitmap, imageSize);
+sk_sp image
+= mergeCacheBitmaps(rSkiaSourceBitmap, &rSkiaAlphaBitmap, imageSize * 
mScaling);
 if (image)
-drawImage(imagePosAry, image);
+drawImage(imagePosAry, image, mScaling);
 else if (rSkiaAlphaBitmap.IsFullyOpaqueAsAlpha()) // alpha can be ignored
 drawBitmap(rPosAry, rSkiaSourceBitmap);
 else
@@ -1763,18 +1763,20 @@ void SkiaSalGraphicsImpl::drawBitmap(const SalTwoRect& 
rPosAry, const SkiaSalBit
 imagePosAry.mnSrcHeight = imagePosAry.mnDestHeight;
 imageSize = Size(imagePosAry.mnSrcWidth, imagePosAry.mnSrcHeight);
 }
-sk_sp image = mergeCacheBitmaps(bitmap, nullptr, imageSize);
+sk_sp image = mergeCacheBitmaps(bitmap, nullptr, imageSize * 
mScaling);
 if (image)
-drawImage(imagePosAry, image, blendMode);
+drawImage(imagePosAry, image, mScaling, blendMode);
 else
-drawImage(rPosAry, bitmap.GetSkImage(), blendMode);
+drawImage(rPosAry, bitmap.GetSkImage(), 1, blendMode);
 }
 
 void SkiaSalGraphicsImpl::drawImage(const SalTwoRect& rPosAry, const 
sk_sp& aImage,
-SkBlendMode eBlendMode)
+int srcScaling,

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

2021-11-16 Thread Luboš Luňák (via logerrit)
 vcl/skia/x11/gdiimpl.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 29a2120fcf56ef7fcdb5c95e896e4366454b63bf
Author: Luboš Luňák 
AuthorDate: Mon Nov 15 18:17:57 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Nov 16 10:39:27 2021 +0100

apply SAL_FORCE_HIDPI_SCALING on X11 even while drawing

It'll draw double-sized 1/4 of the content in the topleft corner
of windows, but it's still useful for some tests.

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

diff --git a/vcl/skia/x11/gdiimpl.cxx b/vcl/skia/x11/gdiimpl.cxx
index 03211d8050dd..fa0f81176a5d 100644
--- a/vcl/skia/x11/gdiimpl.cxx
+++ b/vcl/skia/x11/gdiimpl.cxx
@@ -46,9 +46,10 @@ void 
X11SkiaSalGraphicsImpl::createWindowSurfaceInternal(bool forceRaster)
 assert(!mSurface);
 assert(mX11Parent.GetDrawable() != None);
 RenderMethod renderMethod = forceRaster ? RenderRaster : 
renderMethodToUse();
+mScaling = getWindowScaling();
 mWindowContext = createWindowContext(mX11Parent.GetXDisplay(), 
mX11Parent.GetDrawable(),
- &mX11Parent.GetVisual(), GetWidth(), 
GetHeight(),
- renderMethod, false);
+ &mX11Parent.GetVisual(), GetWidth() * 
mScaling,
+ GetHeight() * mScaling, renderMethod, 
false);
 if (mWindowContext)
 {
 // See flushSurfaceToWindowContext().


[Libreoffice-commits] core.git: vcl/backendtest vcl/inc vcl/osx vcl/README.vars.md vcl/skia

2021-11-16 Thread Luboš Luňák (via logerrit)
 vcl/README.vars.md  |4 
 vcl/backendtest/outputdevice/common.cxx |2 
 vcl/inc/skia/gdiimpl.hxx|   20 ++
 vcl/inc/skia/osx/gdiimpl.hxx|3 
 vcl/inc/skia/utils.hxx  |   61 +++-
 vcl/osx/salgdiutils.cxx |5 
 vcl/skia/gdiimpl.cxx|  235 
 vcl/skia/osx/gdiimpl.cxx|   65 ++--
 vcl/skia/salbmp.cxx |   11 +
 9 files changed, 312 insertions(+), 94 deletions(-)

New commits:
commit b5983dbe2c41f38e653201574cf20cd4bd76e950
Author: Luboš Luňák 
AuthorDate: Thu Nov 11 14:01:55 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Nov 16 10:38:54 2021 +0100

implement HiDPI support for Skia/Mac (tdf#144214)

The basic idea is the same as the 'aqua' backend, simply set up
a scaling matrix for all drawing. That will take care of the basic
drawing everything twice as large, which is twice the resolution.
And then blit this data to the window, which expects data this way.

Converting back from backing surface needs explicit coordinate
conversions, and when converting to a bitmap the bitmap needs
to be scaled down in order to appear normally sized. Fortunately
I've already implemented delayed scaling, which means that if
the bitmap is drawn later again without any modifications, no
data would be lost (to be done in a follow-up commit).

Unittests occassionally need special handling, as such scaling
down to bitmap not being smoothed, because they expect exact
color values.

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

diff --git a/vcl/README.vars.md b/vcl/README.vars.md
index cdf356f6a2e0..7e0c3c2db0ad 100644
--- a/vcl/README.vars.md
+++ b/vcl/README.vars.md
@@ -64,3 +64,7 @@ will be used to write the log under `instdir/uitest/`.
 ## Kf5
 
 * `SAL_VCL_KF5_USE_QFONT` - use `QFont` for text rendering (default for qt5, 
but not kf5)
+
+## Mac
+
+* `SAL_FORCE_HIDPI_SCALING` - set to 2 to fake HiDPI drawing (useful for 
unittests, windows may draw only top-left 1/4 of the content scaled)
diff --git a/vcl/backendtest/outputdevice/common.cxx 
b/vcl/backendtest/outputdevice/common.cxx
index 21a32635ab85..80408fac70fe 100644
--- a/vcl/backendtest/outputdevice/common.cxx
+++ b/vcl/backendtest/outputdevice/common.cxx
@@ -1370,7 +1370,7 @@ TestResult 
OutputDeviceTestCommon::checkRadialGradient(Bitmap& bitmap)
 int nNumberOfErrors = 0;
 // The default VCL implementation is off-center in the direction to the 
top-left.
 // This means not all corners will be pure white => quirks.
-checkValue(pAccess, 1, 1, COL_WHITE, nNumberOfQuirks, nNumberOfErrors, 255 
/ 10, 255 / 3);
+checkValue(pAccess, 1, 1, COL_WHITE, nNumberOfQuirks, nNumberOfErrors, 255 
/ 10, 255 / 2);
 checkValue(pAccess, 1, 10, COL_WHITE, nNumberOfQuirks, nNumberOfErrors, 
255 / 10, 255 / 5);
 checkValue(pAccess, 10, 1, COL_WHITE, nNumberOfQuirks, nNumberOfErrors, 
255 / 10, 255 / 5);
 checkValue(pAccess, 10, 10, COL_WHITE, nNumberOfQuirks, nNumberOfErrors, 
255 / 10, 255 / 5);
diff --git a/vcl/inc/skia/gdiimpl.hxx b/vcl/inc/skia/gdiimpl.hxx
index 03a4d5cf0413..70bbcf5c4dcc 100644
--- a/vcl/inc/skia/gdiimpl.hxx
+++ b/vcl/inc/skia/gdiimpl.hxx
@@ -239,6 +239,7 @@ protected:
 
 void privateDrawAlphaRect(tools::Long nX, tools::Long nY, tools::Long 
nWidth,
   tools::Long nHeight, double nTransparency, bool 
blockAA = false);
+void privateCopyBits(const SalTwoRect& rPosAry, SkiaSalGraphicsImpl* src);
 
 void setProvider(SalGeometryProvider* provider) { mProvider = provider; }
 
@@ -256,6 +257,8 @@ protected:
 int GetWidth() const { return mProvider ? mProvider->GetWidth() : 1; }
 // get the height of the device
 int GetHeight() const { return mProvider ? mProvider->GetHeight() : 1; }
+// Get the global HiDPI scaling factor.
+virtual int getWindowScaling() const;
 
 SkCanvas* getXorCanvas();
 void applyXor();
@@ -277,6 +280,8 @@ protected:
 // and swapping to the screen is not _that_slow.
 mDirtyRect.join(addedRect);
 }
+void setCanvasScalingAndClipping();
+void resetCanvasScalingAndClipping();
 static void setCanvasClipRegion(SkCanvas* canvas, const vcl::Region& 
region);
 sk_sp mergeCacheBitmaps(const SkiaSalBitmap& bitmap, const 
SkiaSalBitmap* alphaBitmap,
  const Size targetSize);
@@ -305,9 +310,12 @@ protected:
 if (graphics == nullptr)
 return stream << "(null)";
 // O - offscreen, G - GPU-based, R - raster
-return stream << static_cast(graphics) << " "
-  << Size(graphics->GetWidth(), graphics->GetHeight())
-  << (graphics->isGPU() ? "G" : "R") 

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 sw/source/core/text/itrform2.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit a69808752ba49a861c135ba4e6bf3b1a7d021d72
Author: Caolán McNamara 
AuthorDate: Mon Jul 12 16:21:04 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 10:36:15 2021 +0100

crashtesting: UaF on layout of ooo98566-1.odt

in:
sw/source/core/text/itrform2.cxx:2643 SwTextFormatter::NewFlyCntPortion
at: pFly = static_cast(pHint)->GetFlyFrame(pFrame)

(gdb) print m_pCurr
$2 = (SwLineLayout *) 0x55ea220a0020

after calling GetFlyFrame m_pCurr is unchanged and we will call
m_pCurr->MaxAscentDescent
on it.

But m_pCurr is deleted during GetFlyFrame by...

 #18 0x7f98c5cd337f in SwLineLayout::~SwLineLayout() 
(this=this@entry=0x55ea220a0020, __in_chrg=)
 at source/libo-core/sw/source/core/text/portxt.hxx:26
 #19 0x7f98c5cd347a in SwParaPortion::~SwParaPortion() 
(this=0x55ea220a0020, __in_chrg=)
 at source/libo-core/sw/source/core/text/porlay.cxx:2491
 #20 0x7f98c5cd3485 in SwParaPortion::~SwParaPortion() 
(this=0x55ea220a0020, __in_chrg=)
 at source/libo-core/sw/source/core/text/porlay.cxx:2491
 #21 0x7f98c5d05e70 in 
std::default_delete::operator()(SwParaPortion*) const 
(__ptr=, this=)
 at /usr/include/c++/8/bits/unique_ptr.h:75
 #22 0x7f98c5d05e70 in std::unique_ptr >::reset(SwParaPortion*)
 (__p=, this=) at 
/usr/include/c++/8/bits/unique_ptr.h:382
 #23 0x7f98c5d05e70 in SwTextLine::SetPara(SwParaPortion*, bool) 
(bDelete=true, pNew=0x0, this=)
 at source/libo-core/sw/source/core/text/txtcache.hxx:45
 #24 0x7f98c5d05e70 in SwTextFrame::ClearPara() 
(this=this@entry=0x55ea21302b60) at 
source/libo-core/sw/source/core/text/txtcache.cxx:113
 #25 0x7f98c5d1be89 in SwTextFrame::Init() 
(this=this@entry=0x55ea21302b60) at 
source/libo-core/sw/source/core/text/txtfrm.cxx:757
 #26 0x7f98c5d2630c in SwTextFrame::Prepare(PrepareHint, void const*, 
bool)
 (this=0x55ea21302b60, ePrep=PrepareHint::FlyFrameArrive, 
pVoid=, bNotify=)
 at source/libo-core/sw/source/core/text/txtfrm.cxx:3086
 #27 0x7f98c5b1edb8 in 
SwFlyInContentFrame::NotifyBackground(SwPageFrame*, SwRect const&, PrepareHint)
 (this=, rRect=..., eHint=) at 
source/libo-core/sw/inc/anchoredobject.hxx:205
 #28 0x7f98c5b261a6 in Notify(SwFlyFrame*, SwPageFrame*, SwRect const&, 
SwRect const*)
 (pFly=pFly@entry=0x55ea21a18d60, pOld=0x0, rOld=SwRect = {...}, 
pOldPrt=pOldPrt@entry=0x7ffeb50390f8)
 at source/libo-core/sw/source/core/inc/frame.hxx:1177
 #29 0x7f98c5b2ceca in SwFlyNotify::~SwFlyNotify() 
(this=0x7ffeb50390d0, __in_chrg=)
 at source/libo-core/sw/source/core/layout/frmtool.cxx:648
 #30 0x7f98c5b1fa25 in SwFlyInContentFrame::MakeAll(OutputDevice*) 
(this=0x55ea21a18d60)
 at source/libo-core/sw/source/core/inc/frmtool.hxx:419
 #31 0x7f98c5aec3a9 in SwFrame::PrepareMake(OutputDevice*) 
(this=0x55ea21a18d60, pRenderContext=0x55ea212bc4c0)
 at source/libo-core/sw/source/core/layout/calcmove.cxx:375
 #32 0x7f98c5b17ad2 in SwFlyFrame::Calc(OutputDevice*) const 
(this=, pRenderContext=)
 at source/libo-core/sw/source/core/layout/fly.cxx:2890
 #33 0x7f98c5b636c5 in SwObjectFormatter::FormatLayout_(SwLayoutFrame&) 
(this=this@entry=0x55ea2244d150, _rLayoutFrame=...)
 at source/libo-core/include/rtl/ref.hxx:206
 #34 0x7f98c5b6413e in SwObjectFormatter::FormatObj_(SwAnchoredObject&) 
(this=this@entry=0x55ea2244d150, _rAnchoredObj=...)
 at source/libo-core/sw/source/core/layout/objectformatter.cxx:296
 #35 0x7f98c5b6705b in 
SwObjectFormatterTextFrame::DoFormatObj(SwAnchoredObject&, bool)
 (this=0x55ea2244d150, _rAnchoredObj=..., _bCheckForMovedFwd=)
 at source/libo-core/sw/source/core/layout/objectformattertxtfrm.cxx:136
 #36 0x7f98c5b6359f in SwObjectFormatter::FormatObj(SwAnchoredObject&, 
SwFrame*, SwPageFrame const*)
 (_rAnchoredObj=..., _pAnchorFrame=, 
_pPageFrame=)
 at source/libo-core/sw/source/core/layout/objectformatter.cxx:190
 #37 0x7f98c5d717aa in SwTextFlyCnt::GetFlyFrame_(SwFrame const*) 
(this=this@entry=0x55ea214d8810, pCurrFrame=pCurrFrame@entry=0x55ea21302b60)
 at source/libo-core/sw/source/core/inc/frame.hxx:1177
 #38 0x7f98c5cb511b in SwTextFlyCnt::GetFlyFrame(SwFrame const*) 
(pCurrFrame=0x55ea21302b60, this=0x55ea214d8810)
 at source/libo-core/sw/inc/txtflcnt.hxx:48
 #39 0x7f98c5cb511b in 
SwTextFormatter::NewFlyCntPortion(SwTextFormatInfo&, SwTextAttr*) const
 (this=this@entry=0x7ffeb503a6b0, rInf=..., pHint=0x55ea214d8810) at 
source/libo-core/sw/source/core/text/itrform2.cxx:2643

(gdb) print this
(SwLinePortion * const) 0x55ea220a0020

The SwTextFrame of SwTextFrame::ClearPara is the same p

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

2021-11-16 Thread Caolán McNamara (via logerrit)
 sw/qa/core/data/ww8/pass/ofz34749-1.doc |binary
 sw/source/filter/ww8/ww8par.hxx |8 
 sw/source/filter/ww8/ww8par6.cxx|3 +++
 3 files changed, 11 insertions(+)

New commits:
commit 7546d708461fb80d682c5890dc54321ed1996564
Author: Caolán McNamara 
AuthorDate: Thu Jul 1 14:56:45 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 10:35:48 2021 +0100

ofz#34749 don't remove trailing paragraph if something got anchored to it

Change-Id: Ic6eec2f9829c415abd4f2628bc51efbf98f918fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118228
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit e803875fbb86b24b39fcd9adcf7df40ed255ea8f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125238
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/sw/qa/core/data/ww8/pass/ofz34749-1.doc 
b/sw/qa/core/data/ww8/pass/ofz34749-1.doc
new file mode 100644
index ..d657a71b5245
Binary files /dev/null and b/sw/qa/core/data/ww8/pass/ofz34749-1.doc differ
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 74953aa2016c..9f19f48d463b 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -922,6 +922,14 @@ public:
 explicit wwExtraneousParas(SwDoc &rDoc) : m_rDoc(rDoc) {}
 ~wwExtraneousParas() { delete_all_from_doc(); }
 void insert(SwTextNode *pTextNode) { m_aTextNodes.insert(pTextNode); }
+void check_anchor_destination(SwTextNode *pTextNode)
+{
+auto it = m_aTextNodes.find(pTextNode);
+if (it == m_aTextNodes.end())
+return;
+SAL_WARN("sw.ww8", "It is unexpected to anchor something in a para 
scheduled for removal");
+m_aTextNodes.erase(it);
+}
 void delete_all_from_doc();
 };
 
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 1e68d7a592b4..ca2ddc28fd1f 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2451,6 +2451,9 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults 
&rApo, const WW8_TablePos *p
 }
 else
 {
+// ofz#34749 we shouldn't anchor anything into an 'extra' 
paragraph scheduled for
+// removal at end of import, but check if that scenario is 
happening
+
m_aExtraneousParas.check_anchor_destination(m_pPaM->GetNode().GetTextNode());
 m_xSFlyPara->pFlyFormat = 
m_rDoc.MakeFlySection(WW8SwFlyPara::eAnchor,
 m_pPaM->GetPoint(), &aFlySet);
 OSL_ENSURE(m_xSFlyPara->pFlyFormat->GetAnchor().GetAnchorId() ==


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - tools/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 tools/source/generic/poly.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a32e7a00b52dc6d570a27748e1fd7d6d5e7ee593
Author: Caolán McNamara 
AuthorDate: Sun Jun 27 19:08:36 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 10:35:10 2021 +0100

ofz#35504 Integer-overflow

Change-Id: I7a462b821f286411d759b5259461fcdbf1741859
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117955
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 228cb26a6a1afe668dd17471bedf0ab52f133d5a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125237
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 0a597fdff1fc..b549f1cd65c1 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -251,7 +251,7 @@ ImplPolygon::ImplPolygon( const tools::Rectangle& rBound, 
const Point& rStart, c
 }
 
 
-if( ( nRadX > 32 ) && ( nRadY > 32 ) && ( nRadX + nRadY ) < 8192 )
+if (nRadX > 32 && nRadY > 32 && o3tl::saturating_add(nRadX, nRadY) < 
8192)
 nPoints >>= 1;
 
 // compute threshold


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sc/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 sc/source/core/tool/compiler.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 2712cb94f6c25ea974ee10c503deba25061a7a6a
Author: Caolán McNamara 
AuthorDate: Fri Apr 2 14:28:37 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 10:34:36 2021 +0100

ofz: Segv on unknown address

Change-Id: I6c69375a89781fc0b87230203335c861efb562f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113518
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 8de38977838d5a044271cb170730e3d557659f17)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125236
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index e26dd00177f9..84a0d64e155b 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2588,7 +2588,14 @@ Label_MaskStateMachine:
 if (eState != ssSkipReference)
 {
 *pSym++ = c;
-*pSym++ = *pSrc++;
+
+if( pSym == &cSymbol[ MAXSTRLEN ] )
+{
+SetError( 
FormulaError::StringOverflow);
+eState = ssStop;
+}
+else
+*pSym++ = *pSrc++;
 }
 bAddToSymbol = false;
 }


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - vcl/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 vcl/source/graphic/Manager.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 2ec3e4e916e8818a7ca3d69180d973bbdff6386b
Author: Caolán McNamara 
AuthorDate: Fri Apr 3 16:35:36 2020 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 10:34:13 2021 +0100

crashtesting: crash on reexport of tdf118346-1.odg to odg

make a copy of m_pImpGraphicList because if we swap out a svg, the svg 
filter
may create more temp Graphics which are auto-added to m_pImpGraphicList
invalidating a loop over m_pImpGraphicList

 #0  0x70d25ae5 in vcl::graphic::Manager::reduceGraphicMemory() 
(this=0x71bc4760 )
at vcl/source/graphic/Manager.cxx:88
 #1  0x70d25ee9 in 
vcl::graphic::Manager::registerGraphic(std::shared_ptr const&, 
rtl::OUString const&)
(this=0x71bc4760 , 
pImpGraphic=std::shared_ptr (use count 1, weak count 0) = {...})
at vcl/source/graphic/Manager.cxx:139
 #2  0x70d26406 in vcl::graphic::Manager::newInstance() 
(this=0x71bc4760 )
at vcl/source/graphic/Manager.cxx:184
 #3  0x70b6735c in Graphic::Graphic() (this=0x7fff84f0) at 
vcl/source/gdi/graph.cxx:182
 #4  0x7fffdc526600 in 
svgio::svgreader::SvgImageNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x56817940, rTarget=...) at 
svgio/source/svgreader/svgimagenode.cxx:219
 #5  0x7fffdc52e75d in 
svgio::svgreader::SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a6a93d0, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svgnode.cxx:529
 #6  0x7fffdc522339 in 
svgio::svgreader::SvgGNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a6a93d0, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svggnode.cxx:106
 #7  0x7fffdc52e75d in 
svgio::svgreader::SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a6a9070, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svgnode.cxx:529
 #8  0x7fffdc522339 in 
svgio::svgreader::SvgGNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a6a9070, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svggnode.cxx:106
 #9  0x7fffdc52e75d in 
svgio::svgreader::SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a5f9150, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svgnode.cxx:529
 #10 0x7fffdc54d19f in 
svgio::svgreader::SvgSvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&,
 bool) const
(this=0x5a5f9150, rTarget=..., bReferenced=false) at 
svgio/source/svgreader/svgsvgnode.cxx:304
 #11 0x7fffdc571373 in svgio::svgreader::(anonymous 
namespace)::XSvgParser::getDecomposition(com::sun::star::uno::Reference
 const&, rtl::OUString const&) (this=0x5a69c6d0, xSVGStream=uno::Reference 
to (comphelper::SequenceInputStream *) 0x57480668, aAbsolutePath="")
at svgio/source/svguno/xsvgparser.cxx:160
 #12 0x70cf849b in VectorGraphicData::ensureSequenceAndRange() 
(this=0x56ea7540)
at vcl/source/gdi/vectorgraphicdata.cxx:196
 #13 0x70cf9124 in VectorGraphicData::getRange() const 
(this=0x56ea7540)
at vcl/source/gdi/vectorgraphicdata.cxx:323
 #14 0x70b74da7 in ImpGraphic::ImplGetPrefSize() const 
(this=0x588b00f0) at vcl/source/gdi/impgraph.cxx:778
 #15 0x70b76623 in ImpGraphic::ImplWriteEmbedded(SvStream&) 
(this=0x588b00f0, rOStm=...)
at vcl/source/gdi/impgraph.cxx:1235
 #16 0x70b770a1 in ImpGraphic::ImplSwapOut(SvStream*) 
(this=0x588b00f0, xOStm=0x5826b7d0)
at vcl/source/gdi/impgraph.cxx:1377
 #17 0x70b76bdb in ImpGraphic::ImplSwapOut() (this=0x588b00f0) 
at vcl/source/gdi/impgraph.cxx:1328
 #18 0x70d25c88 in vcl::graphic::Manager::reduceGraphicMemory() 
(this=0x71bc4760 )
at vcl/source/graphic/Manager.cxx:107
 #19 0x70d25ee9 in 
vcl::graphic::Manager::registerGraphic(std::shared_ptr const&, 
rtl::OUString const&)
(this=0x71bc4760 , 
pImpGraphic=std::shared_ptr (use count 1, weak count 0) = {...})
at vcl/source/graphic/Manager.cxx:139
 #20 0x70d26406 in vcl::graphic::Manager::newInstance() 
(this=0x71bc4760 )
at vcl/source/graphic/Manager.cxx:184
 #21 0x70b6735c in Graphic::Graphic() (this=0x56d5ea68) at 
vcl/source/gdi/graph.cxx:182

Change-Id: I4e1ffcb12ead0d53b7ca2f369154e9c753af77d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91650
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 6fa2891da4852716fe62d925ffd

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

2021-11-16 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 01ffc179461d6c53371855ba5894eb7f26fa4e8c
Author: Caolán McNamara 
AuthorDate: Sun Nov 14 19:46:47 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 16 10:31:46 2021 +0100

Resolves: tdf#145663 nL is the index of the light to set to the model

don't reuse the variable in another loop before its finally set to the
model

Change-Id: I336d8c0f3ce612448dd639e939e65fb434da1513
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125132
Reviewed-by: Michael Stahl 
Tested-by: Caolán McNamara 

diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx 
b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index c4b28162d08c..9991c5e6b4cc 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -434,20 +434,20 @@ IMPL_LINK(ThreeD_SceneIllumination_TabPage, 
ClickLightSourceButtonHdl, weld::But
 bool bIsChecked = pInfo->pButton->get_prev_active();
 
 ControllerLockGuardUNO aGuard( m_xChartModel );
-for( nL=0; nL<8; nL++)
+for (sal_Int32 i = 0; i < 8; ++i)
 {
-LightButton* pLightButton = m_pLightSourceInfoList[nL].pButton;
+LightButton* pLightButton = m_pLightSourceInfoList[i].pButton;
 if (pLightButton == pButton)
 {
 pLightButton->set_active(true);
 if (!pLightButton->get_widget()->has_focus())
 pLightButton->get_widget()->grab_focus();
-m_pLightSourceInfoList[nL].pButton->set_prev_active(true);
+m_pLightSourceInfoList[i].pButton->set_prev_active(true);
 }
 else
 {
 pLightButton->set_active(false);
-m_pLightSourceInfoList[nL].pButton->set_prev_active(false);
+m_pLightSourceInfoList[i].pButton->set_prev_active(false);
 }
 }
 


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - vcl/unx

2021-11-16 Thread Caolán McNamara (via logerrit)
 vcl/unx/generic/printer/cpdmgr.cxx |   49 ++---
 1 file changed, 25 insertions(+), 24 deletions(-)

New commits:
commit ee712f960647bcf55d3eaba048213aca932cf2cf
Author: Caolán McNamara 
AuthorDate: Fri Mar 19 14:11:45 2021 +
Commit: Michael Stahl 
CommitDate: Tue Nov 16 10:30:39 2021 +0100

cid#1473818 Use after free

Change-Id: Idd74e0debd12e42ff97d79b56e76cde6fd98aa2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112745
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit 236f3a8e60e05147a37f294774b0c07d40aff36f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125234
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/generic/printer/cpdmgr.cxx 
b/vcl/unx/generic/printer/cpdmgr.cxx
index cae2a4e1ab03..d114dd71accd 100644
--- a/vcl/unx/generic/printer/cpdmgr.cxx
+++ b/vcl/unx/generic/printer/cpdmgr.cxx
@@ -40,11 +40,11 @@ void CPDManager::onNameAcquired (GDBusConnection 
*connection,
  gpointer user_data)
 {
 gchar* contents;
-GDBusNodeInfo *introspection_data;
-
 // Get Interface for introspection
-g_file_get_contents (FRONTEND_INTERFACE, &contents, nullptr, nullptr);
-introspection_data = g_dbus_node_info_new_for_xml (contents, nullptr);
+if (!g_file_get_contents (FRONTEND_INTERFACE, &contents, nullptr, nullptr))
+return;
+
+GDBusNodeInfo *introspection_data = g_dbus_node_info_new_for_xml 
(contents, nullptr);
 
 g_dbus_connection_register_object (connection,
"/org/libreoffice/PrintDialog",
@@ -60,28 +60,29 @@ void CPDManager::onNameAcquired (GDBusConnection 
*connection,
 std::vector> backends = 
current->getTempBackends();
 for (auto const& backend : backends)
 {
-GDBusProxy *proxy;
 // Get Interface for introspection
-g_file_get_contents (BACKEND_INTERFACE, &contents, nullptr, nullptr);
-introspection_data = g_dbus_node_info_new_for_xml (contents, nullptr);
-proxy = g_dbus_proxy_new_sync (connection,
-   G_DBUS_PROXY_FLAGS_NONE,
-   introspection_data->interfaces[0],
-   backend.first.c_str(),
-   backend.second,
-   "org.openprinting.PrintBackend",
-   nullptr,
-   nullptr);
+if (g_file_get_contents(BACKEND_INTERFACE, &contents, nullptr, 
nullptr))
+{
+introspection_data = g_dbus_node_info_new_for_xml (contents, 
nullptr);
+GDBusProxy *proxy = g_dbus_proxy_new_sync (connection,
+   G_DBUS_PROXY_FLAGS_NONE,
+   introspection_data->interfaces[0],
+   backend.first.c_str(),
+   backend.second,
+   "org.openprinting.PrintBackend",
+   nullptr,
+   nullptr);
+g_assert (proxy != nullptr);
+g_dbus_proxy_call(proxy, "ActivateBackend",
+  nullptr,
+  G_DBUS_CALL_FLAGS_NONE,
+  -1, nullptr, nullptr, nullptr);
+
+g_free(contents);
+g_object_unref(proxy);
+g_dbus_node_info_unref(introspection_data);
+}
 g_free(backend.second);
-g_assert (proxy != nullptr);
-g_dbus_proxy_call(proxy, "ActivateBackend",
-  nullptr,
-  G_DBUS_CALL_FLAGS_NONE,
-  -1, nullptr, nullptr, nullptr);
-
-g_free(contents);
-g_object_unref(proxy);
-g_dbus_node_info_unref(introspection_data);
 }
 }
 


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - chart2/source

2021-11-16 Thread Stephan Bergmann (via logerrit)
 chart2/source/tools/InternalDataProvider.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit c0a25f340d6e0bd3e5441965cea3240a6ca9ace4
Author: Stephan Bergmann 
AuthorDate: Tue Mar 9 15:52:21 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 16 10:29:55 2021 +0100

Avoid signed-integer-overflow parsing table:cell-range-address="PivotChart"

...as happens during UITest_chart
UITEST_TEST_NAME=tdf107097.tdf107097.test_tdf107097 ever since
86b192965ee8d625092b723337f6a65bdf34dcb7 "tdf#107097: sc: Add UItest" added 
that
test (see ),

> /chart2/source/tools/XMLRangeHelper.cxx:136:52: runtime error: signed 
integer overflow: 15 * 308915776 cannot be represented in type 'int'
> #0 0x2ad74a554918 in (anonymous 
namespace)::lcl_getSingleCellAddressFromXMLString(rtl::OUString const&, int, 
int, chart::XMLRangeHelper::Cell&) 
/chart2/source/tools/XMLRangeHelper.cxx:136:52
> #1 0x2ad74a553482 in (anonymous 
namespace)::lcl_getCellAddressFromXMLString(rtl::OUString const&, int, int, 
chart::XMLRangeHelper::Cell&, rtl::OUString&) 
/chart2/source/tools/XMLRangeHelper.cxx:217:13
> #2 0x2ad74a5505da in (anonymous 
namespace)::lcl_getCellRangeAddressFromXMLString(rtl::OUString const&, int, 
int, chart::XMLRangeHelper::CellRange&) 
/chart2/source/tools/XMLRangeHelper.cxx:253:19
> #3 0x2ad74a54fde1 in 
chart::XMLRangeHelper::getCellRangeFromXMLString(rtl::OUString const&) 
/chart2/source/tools/XMLRangeHelper.cxx:328:15
> #4 0x2ad74a2aed4d in 
chart::InternalDataProvider::convertRangeFromXML(rtl::OUString const&) 
/chart2/source/tools/InternalDataProvider.cxx:1227:39
> #5 0x2ad74a2b0164 in non-virtual thunk to 
chart::InternalDataProvider::convertRangeFromXML(rtl::OUString const&) 
/chart2/source/tools/InternalDataProvider.cxx
> #6 0x2ad6c4784257 in (anonymous 
namespace)::lcl_ConvertRange(rtl::OUString const&, 
com::sun::star::uno::Reference const&) 
/xmloff/source/chart/SchXMLPlotAreaContext.cxx:76:32
> #7 0x2ad6c4779a67 in SchXMLPlotAreaContext::startFastElement(int, 
com::sun::star::uno::Reference 
const&) /xmloff/source/chart/SchXMLPlotAreaContext.cxx:233:34
> #8 0x2ad6c4c6328a in SvXMLImport::startFastElement(int, 
com::sun::star::uno::Reference 
const&) /xmloff/source/core/xmlimp.cxx:797:15
> #9 0x2ad704988b78 in (anonymous 
namespace)::Entity::startElement((anonymous namespace)::Event const*) 
/sax/source/fastparser/fastparser.cxx:468:27
> #10 0x2ad70496f681 in 
sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) 
/sax/source/fastparser/fastparser.cxx:1026:25
> #11 0x2ad70496c65f in 
sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource
 const&) /sax/source/fastparser/fastparser.cxx:870:22
> #12 0x2ad7049905d1 in 
sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource
 const&) /sax/source/fastparser/fastparser.cxx:1482:13
> #13 0x2ad6c4c52b80 in 
SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&) 
/xmloff/source/core/xmlimp.cxx:504:15
> #14 0x2ad749aafe1e in 
chart::XMLFilter::impl_ImportStream(rtl::OUString const&, rtl::OUString const&, 
com::sun::star::uno::Reference const&, 
com::sun::star::uno::Reference 
const&, 
com::sun::star::uno::Reference
 const&, com::sun::star::uno::Reference 
const&) /chart2/source/model/filter/XMLFilter.cxx:473:34
> #15 0x2ad749aa9f01 in 
chart::XMLFilter::impl_Import(com::sun::star::uno::Reference
 const&, com::sun::star::uno::Sequence 
const&) /chart2/source/model/filter/XMLFilter.cxx:375:35
> #16 0x2ad749aa0988 in 
chart::XMLFilter::filter(com::sun::star::uno::Sequence
 const&) /chart2/source/model/filter/XMLFilter.cxx:221:13
> #17 0x2ad749c2c76e in 
chart::ChartModel::impl_load(com::sun::star::uno::Sequence
 const&, com::sun::star::uno::Reference 
const&) /chart2/source/model/main/ChartModel_Persistence.cxx:567:18
> #18 0x2ad749c30eea in 
chart::ChartModel::loadFromStorage(com::sun::star::uno::Reference
 const&, com::sun::star::uno::Sequence 
const&) /chart2/source/model/main/ChartModel_Persistence.cxx:759:5
> #19 0x2ad74244b977 in 
OCommonEmbeddedObject::LoadDocumentFromStorage_Impl() 
/embeddedobj/source/commonembedding/persistence.cxx:535:19
> #20 0x2ad7423d7bde in OCommonEmbeddedObject::SwitchStateTo_Impl(int) 
/embeddedobj/source/commonembedding/embedobj.cxx:185:49
> #21 0x2ad7423e32ff in OCommonEmbeddedObject::changeState(int) 
/embeddedobj/source/commonembedding/embedobj.cxx:453:13
> #22 0x2ad7424b7057 in 
OCommonEmbeddedObject::getPreferredVisualRepresentation(long) 
/embeddedobj/source/commonembedding/visobj.cxx:168:9
> #23 0x2ad67e08fdb6 in 
comphelper::EmbeddedObjectContainer::GetGraphicReplacementStream(long, 
com::sun::star::uno::Reference const&, 
rtl::OUString*) /comphel

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 sw/source/core/undo/undobj.cxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 0fec76e0301c839f7fe3a5ba3052038d2ca611c7
Author: Caolán McNamara 
AuthorDate: Sun Feb 28 18:53:55 2021 +
Commit: Michael Stahl 
CommitDate: Tue Nov 16 10:27:11 2021 +0100

ofz#31538 null-deref

Change-Id: I3264c0fd509e16cf4727847199f0be316d03d0e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111713
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 58f5c3b07701a14a61dc6b11f959faaf8aa98b9b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125232
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index fa86072a3008..3b1860ecc7c1 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1558,9 +1558,14 @@ static bool IsNotBackspaceHeuristic(
 SwPosition const& rStart, SwPosition const& rEnd)
 {
 // check if the selection is backspace/delete created by DelLeft/DelRight
-return rStart.nNode.GetIndex() + 1 != rEnd.nNode.GetIndex()
-|| rEnd.nContent != 0
-|| rStart.nContent != rStart.nNode.GetNode().GetTextNode()->Len();
+if (rStart.nNode.GetIndex() + 1 != rEnd.nNode.GetIndex())
+return true;
+if (rEnd.nContent != 0)
+return true;
+const SwTextNode* pTextNode = rStart.nNode.GetNode().GetTextNode();
+if (!pTextNode || rStart.nContent != pTextNode->Len())
+return true;
+return false;
 }
 
 bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos,


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - lotuswordpro/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 lotuswordpro/source/filter/lwpfribptr.cxx |   35 +++---
 lotuswordpro/source/filter/lwpfribptr.hxx |4 +--
 2 files changed, 20 insertions(+), 19 deletions(-)

New commits:
commit 6aa00a3d271f37f51e2f2559a6730a219616e4d0
Author: Caolán McNamara 
AuthorDate: Thu Jan 28 14:54:13 2021 +
Commit: Michael Stahl 
CommitDate: Tue Nov 16 10:26:23 2021 +0100

ofz#30005 crash in LwpFribPtr::XFConvert

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

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

diff --git a/lotuswordpro/source/filter/lwpfribptr.cxx 
b/lotuswordpro/source/filter/lwpfribptr.cxx
index f1d9917de8bf..8eabe7099883 100644
--- a/lotuswordpro/source/filter/lwpfribptr.cxx
+++ b/lotuswordpro/source/filter/lwpfribptr.cxx
@@ -85,7 +85,8 @@
 #include 
 
 LwpFribPtr::LwpFribPtr()
-: m_pFribs(nullptr),m_pXFPara(nullptr),m_pPara(nullptr)
+: m_pFribs(nullptr)
+, m_pPara(nullptr)
 {
 }
 
@@ -174,7 +175,7 @@ void LwpFribPtr::XFConvert()
 case FRIB_TAG_TEXT:
 {
 LwpFribText* textFrib= static_cast(pFrib);
-textFrib->XFConvert(m_pXFPara,m_pPara->GetStory());
+textFrib->XFConvert(m_pXFPara.get(),m_pPara->GetStory());
 }
 break;
 case FRIB_TAG_TAB:
@@ -246,7 +247,7 @@ void LwpFribPtr::XFConvert()
 case FRIB_TAG_UNICODE3: //fall through
 {
 LwpFribUnicode* unicodeFrib= static_cast(pFrib);
-unicodeFrib->XFConvert(m_pXFPara,m_pPara->GetStory());
+unicodeFrib->XFConvert(m_pXFPara.get(), m_pPara->GetStory());
 }
 break;
 case FRIB_TAG_HARDSPACE:
@@ -255,15 +256,15 @@ void LwpFribPtr::XFConvert()
 LwpStory *pStory = m_pPara->GetStory();
 LwpHyperlinkMgr* pHyperlink = pStory ? pStory->GetHyperlinkMgr() : 
nullptr;
 if (pHyperlink && pHyperlink->GetHyperlinkFlag())
-pFrib->ConvertHyperLink(m_pXFPara,pHyperlink,sHardSpace);
+pFrib->ConvertHyperLink(m_pXFPara.get(), 
pHyperlink,sHardSpace);
 else
-pFrib->ConvertChars(m_pXFPara,sHardSpace);
+pFrib->ConvertChars(m_pXFPara.get(), sHardSpace);
 }
 break;
 case FRIB_TAG_SOFTHYPHEN:
 {
 OUString sSoftHyphen(u'\x00ad');
-pFrib->ConvertChars(m_pXFPara,sSoftHyphen);
+pFrib->ConvertChars(m_pXFPara.get(), sSoftHyphen);
 }
 break;
 case FRIB_TAG_FRAME:
@@ -275,64 +276,64 @@ void LwpFribPtr::XFConvert()
 LwpFoundry* pFoundry = m_pPara->GetFoundry();
 LwpDropcapMgr* pMgr = pFoundry ? pFoundry->GetDropcapMgr() : 
nullptr;
 if (pMgr)
-pMgr->SetXFPara(m_pXFPara);
+pMgr->SetXFPara(m_pXFPara.get());
 }
-frameFrib->XFConvert(m_pXFPara);
+frameFrib->XFConvert(m_pXFPara.get());
 break;
 }
 case FRIB_TAG_CHBLOCK:
 {
 LwpFribCHBlock* chbFrib = static_cast(pFrib);
-chbFrib->XFConvert(m_pXFPara,m_pPara->GetStory());
+chbFrib->XFConvert(m_pXFPara.get(),m_pPara->GetStory());
 }
 break;
 case FRIB_TAG_TABLE:
 {
 LwpFribTable* tableFrib = static_cast(pFrib);
 //tableFrib->XFConvert(m_pPara->GetXFContainer());
-tableFrib->XFConvert(m_pXFPara);
+tableFrib->XFConvert(m_pXFPara.get());
 }
 break;
 case FRIB_TAG_BOOKMARK:
 {
 LwpFribBookMark* bookmarkFrib = 
static_cast(pFrib);
-bookmarkFrib->XFConvert(m_pXFPara);
+bookmarkFrib->XFConvert(m_pXFPara.get());
 }
 break;
 case FRIB_TAG_FOOTNOTE:
 {
 LwpFribFootnote* pFootnoteFrib = 
static_cast(pFrib);
-pFootnoteFrib->XFConvert(m_pXFPara);
+pFootnoteFrib->XFConvert(m_pXFPara.get());
 break;
 }
 case FRIB_TAG_FIELD:
 {
 LwpFribField* fieldFrib = static_cast(pFrib);
-fieldFrib->XFConvert(m_pXFPara);
+fieldFrib->XFConvert(m_pXFPara.get());
 break;
 }
 case FRIB_TAG_NOTE:
 {
 LwpFribNote* pNoteFrib = static_cast(pFrib);
-pNoteFrib->XFConvert(m_pXFPara);
+pNoteFrib->XFConvert(m_pXFPara.get());
 break;
 }
 case FRIB_TAG_PAGENUMBER:
 {
 LwpFribPageNumber* pagenumFrib = 
static_cast(pFrib);
-pagenumFrib->XFConvert(m_pXFPara);
+pagenumFrib->XFConvert(m

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - 2 commits - sc/source vcl/source

2021-11-16 Thread Caolán McNamara (via logerrit)
 sc/source/core/tool/interpr1.cxx |2 ++
 vcl/source/gdi/jobset.cxx|7 +++
 2 files changed, 9 insertions(+)

New commits:
commit 2b38ebfbbd8d6d702bb4f17837ddc458d18f00b3
Author: Caolán McNamara 
AuthorDate: Mon Jan 4 17:19:47 2021 +
Commit: Michael Stahl 
CommitDate: Tue Nov 16 10:25:03 2021 +0100

ofz#29234 Integer-overflow

sc/source/core/tool/interpr1.cxx:9578:39: runtime error: signed integer 
overflow: 1 + 2147483647 cannot be represented in type 'int'

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

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

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index e375f1626ec5..0f37b4f9f35e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -9505,6 +9505,8 @@ void ScInterpreter::ScMid()
 OUString aStr = GetString().getString();
 if ( nStart < 1 || nSubLen < 0 )
 PushIllegalArgument();
+else if (nStart > kScInterpreterMaxStrLen || nSubLen > 
kScInterpreterMaxStrLen)
+PushError(FormulaError::StringOverflow);
 else
 {
 sal_Int32 nLen = aStr.getLength();
commit eaa833d053eda675fc49f1d59ba326b9e31e8155
Author: Caolán McNamara 
AuthorDate: Wed Dec 30 21:19:15 2020 +
Commit: Michael Stahl 
CommitDate: Tue Nov 16 10:24:50 2021 +0100

ofz#29113 short read

Change-Id: I107d8abeac419ba4e70a5880054c9195c60464ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108527
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit ab3829bf74667044d9b0f5b96903bbafda5171f6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125229
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index b1ca8e3f80f7..c6641c14ef03 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -262,6 +262,13 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& 
rJobSetup )
 if ( nSystem == JOBSET_FILE364_SYSTEM ||
  nSystem == JOBSET_FILE605_SYSTEM )
 {
+if (nRead < sizeof(ImplOldJobSetupData) + 
sizeof(Impl364JobSetupData))
+{
+SAL_WARN("vcl", "Parsing error: " << 
sizeof(ImplOldJobSetupData) + sizeof(Impl364JobSetupData) <<
+ " required, but " << nRead << " available");
+return rIStream;
+}
+
 Impl364JobSetupData* pOldJobData= 
reinterpret_cast(pTempBuf.get() + sizeof( 
ImplOldJobSetupData ));
 sal_uInt16 nOldJobDataSize  = SVBT16ToUInt16( 
pOldJobData->nSize );
 rJobData.SetSystem( SVBT16ToUInt16( pOldJobData->nSystem ) );


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

2021-11-16 Thread Miklos Vajna (via logerrit)
 oox/qa/unit/data/chart-theme-override.pptx |binary
 oox/qa/unit/drawingml.cxx  |   29 +
 oox/source/drawingml/shape.cxx |   22 ++
 3 files changed, 47 insertions(+), 4 deletions(-)

New commits:
commit 7046830506bd51db897289bf59f48342015ad7df
Author: Miklos Vajna 
AuthorDate: Mon Nov 15 09:23:20 2021 +0100
Commit: Xisco Fauli 
CommitDate: Tue Nov 16 10:08:58 2021 +0100

tdf#127512: PPTX import: fix handling of theme overrides in the chart import

A problem since commit 08818d8a45e034ad825c7fafbb76766f106f1d1d
(bnc#882383: Do not ignore themeOverride for charts in .pptx,
2014-07-04), an override for one chart should not affect later drawingML
objects.

Change-Id: I22b70c8c82e8e8520179c628f566d7f6663c887f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125218
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125223

diff --git a/oox/qa/unit/data/chart-theme-override.pptx 
b/oox/qa/unit/data/chart-theme-override.pptx
new file mode 100644
index ..85243b678bdf
Binary files /dev/null and b/oox/qa/unit/data/chart-theme-override.pptx differ
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index c8dc0d9cc1fb..b909204778b2 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -345,6 +346,34 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testGroupShapeSmartArt)
 CPPUNIT_ASSERT_GREATER(static_cast(0), xSmartArt->getCount());
 }
 
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartThemeOverride)
+{
+// Given a document with 2 slides, slide1 has a chart with a theme 
override and slide2 has a
+// shape:
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"chart-theme-override.pptx";
+
+// When loading that document:
+load(aURL);
+
+// Then make sure that the slide 2 shape's text color is blue, not red:
+uno::Reference 
xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(1),
+ uno::UNO_QUERY);
+uno::Reference xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xText(xShape->getText(), 
uno::UNO_QUERY);
+uno::Reference 
xPara(xText->createEnumeration()->nextElement(),
+uno::UNO_QUERY);
+uno::Reference 
xPortion(xPara->createEnumeration()->nextElement(),
+ uno::UNO_QUERY);
+sal_Int32 nActual{ 0 };
+xPortion->getPropertyValue("CharColor") >>= nActual;
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 4485828 (0x4472c4)
+// - Actual  : 16711680 (0xff)
+// i.e. the text color was red, not blue.
+CPPUNIT_ASSERT_EQUAL(static_cast(0x4472C4), nActual);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index d9ee434dcb79..8ec9eb43a691 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1929,14 +1929,22 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, 
const Reference< XShapes >&
 rFilter.importFragment( pChartSpaceFragment );
 ::oox::ppt::PowerPointImport *pPowerPointImport =
 dynamic_cast< ::oox::ppt::PowerPointImport* >(&rFilter);
+
+// The original theme.
+ThemePtr pTheme;
+
 if (!aThemeOverrideFragmentPath.isEmpty() && pPowerPointImport)
 {
+// Handle theme override.
 uno::Reference< xml::sax::XFastSAXSerializable > xDoc(
 
rFilter.importFragment(aThemeOverrideFragmentPath), uno::UNO_QUERY_THROW);
-ThemePtr pTheme = 
pPowerPointImport->getActualSlidePersist()->getTheme();
-rFilter.importFragment(new ThemeOverrideFragmentHandler(
-rFilter, aThemeOverrideFragmentPath, *pTheme), 
xDoc);
-
pPowerPointImport->getActualSlidePersist()->setTheme(pTheme);
+pTheme = 
pPowerPointImport->getActualSlidePersist()->getTheme();
+auto pThemeOverride = std::make_shared(*pTheme);
+rFilter.importFragment(
+new ThemeOverrideFragmentHandler(rFilter, 
aThemeOverrideFragmentPath,
+ *pThemeOverride),
+xDoc);
+
pPowerPointImport->getActualSlidePersist()->setTheme(pThemeOverride);
 }
 
 // convert import

[Libreoffice-commits] core.git: helpcontent2

2021-11-16 Thread Johnny_M (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 67669707e0c6c8a390d352e7060ad5862d727433
Author: Johnny_M 
AuthorDate: Tue Nov 16 09:58:37 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Nov 16 09:58:37 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to bcc3ccc059f426ef2d79295338e50bb7b7a6642a
  - tdf#132643 Translate German section IDs

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

diff --git a/helpcontent2 b/helpcontent2
index 6ecaae4914ab..bcc3ccc059f4 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6ecaae4914ab0d7cea926c64407637ea6b05723d
+Subproject commit bcc3ccc059f426ef2d79295338e50bb7b7a6642a


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

2021-11-16 Thread Johnny_M (via logerrit)
 source/text/scalc/01/0502.xhp|2 +-
 source/text/scalc/01/05020600.xhp|2 +-
 source/text/scalc/01/cell_styles.xhp |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit bcc3ccc059f426ef2d79295338e50bb7b7a6642a
Author: Johnny_M 
AuthorDate: Sun Nov 14 11:54:50 2021 +0100
Commit: Olivier Hallot 
CommitDate: Tue Nov 16 09:58:35 2021 +0100

tdf#132643 Translate German section IDs

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

diff --git a/source/text/scalc/01/0502.xhp 
b/source/text/scalc/01/0502.xhp
index 174ec5342..2d79bfcab 100644
--- a/source/text/scalc/01/0502.xhp
+++ b/source/text/scalc/01/0502.xhp
@@ -51,7 +51,7 @@
 
 
 
-
+
 
 
 
diff --git a/source/text/scalc/01/05020600.xhp 
b/source/text/scalc/01/05020600.xhp
index eda20fe3e..011b07e9c 100644
--- a/source/text/scalc/01/05020600.xhp
+++ b/source/text/scalc/01/05020600.xhp
@@ -30,7 +30,7 @@
 
 
 
-
+
 
 
 Cell 
Protection
diff --git a/source/text/scalc/01/cell_styles.xhp 
b/source/text/scalc/01/cell_styles.xhp
index 4a621801a..eb5780668 100644
--- a/source/text/scalc/01/cell_styles.xhp
+++ b/source/text/scalc/01/cell_styles.xhp
@@ -31,7 +31,7 @@
 
 
 
-
+
 
 
 


[Libreoffice-commits] core.git: helpcontent2

2021-11-16 Thread Johnny_M (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0dbc6368695198f01d2a19fc934f2365f7d45a92
Author: Johnny_M 
AuthorDate: Tue Nov 16 09:58:06 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Nov 16 09:58:06 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 6ecaae4914ab0d7cea926c64407637ea6b05723d
  - tdf#132643 Translate German section IDs

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

diff --git a/helpcontent2 b/helpcontent2
index 88f6c6a5b870..6ecaae4914ab 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 88f6c6a5b87012345a2b5a06cfce640513a57106
+Subproject commit 6ecaae4914ab0d7cea926c64407637ea6b05723d


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

2021-11-16 Thread Johnny_M (via logerrit)
 source/text/scalc/01/1208.xhp |2 +-
 source/text/scalc/01/12080500.xhp |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6ecaae4914ab0d7cea926c64407637ea6b05723d
Author: Johnny_M 
AuthorDate: Sun Nov 14 11:46:59 2021 +0100
Commit: Olivier Hallot 
CommitDate: Tue Nov 16 09:58:04 2021 +0100

tdf#132643 Translate German section IDs

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

diff --git a/source/text/scalc/01/1208.xhp 
b/source/text/scalc/01/1208.xhp
index 4ecbd8c96..286f91e17 100644
--- a/source/text/scalc/01/1208.xhp
+++ b/source/text/scalc/01/1208.xhp
@@ -49,7 +49,7 @@
 
 Ungroup
 
-
+
 
 
 
diff --git a/source/text/scalc/01/12080500.xhp 
b/source/text/scalc/01/12080500.xhp
index a460400a5..f6dfedc58 100644
--- a/source/text/scalc/01/12080500.xhp
+++ b/source/text/scalc/01/12080500.xhp
@@ -28,7 +28,7 @@
 
 
 
-
+
 
 AutoOutline
 If the selected cell range contains formulas or 
references, $[officename] automatically outlines the 
selection.


[Libreoffice-commits] core.git: helpcontent2

2021-11-16 Thread Johnny_M (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f7d02c3a66a83c1d9af392374d67b8258e175e89
Author: Johnny_M 
AuthorDate: Tue Nov 16 09:57:19 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Nov 16 09:57:19 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 88f6c6a5b87012345a2b5a06cfce640513a57106
  - tdf#132643 Translate German section IDs

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

diff --git a/helpcontent2 b/helpcontent2
index 1aa8bf640c89..88f6c6a5b870 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 1aa8bf640c894799bfd3c1ece4df34cbb5c29a6d
+Subproject commit 88f6c6a5b87012345a2b5a06cfce640513a57106


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

2021-11-16 Thread Johnny_M (via logerrit)
 source/text/scalc/00/0406.xhp |2 +-
 source/text/scalc/01/0603.xhp |2 +-
 source/text/scalc/01/06030100.xhp |4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 88f6c6a5b87012345a2b5a06cfce640513a57106
Author: Johnny_M 
AuthorDate: Sun Nov 14 11:51:37 2021 +0100
Commit: Olivier Hallot 
CommitDate: Tue Nov 16 09:57:17 2021 +0100

tdf#132643 Translate German section IDs

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

diff --git a/source/text/scalc/00/0406.xhp 
b/source/text/scalc/00/0406.xhp
index 1f68e705f..c77b03557 100644
--- a/source/text/scalc/00/0406.xhp
+++ b/source/text/scalc/00/0406.xhp
@@ -28,7 +28,7 @@
 Tools 
Menu
 Choose Tools - Detective.
 
-
+
 Choose 
Tools - Detective - Trace Precedents.
 Shift+F9
 
diff --git a/source/text/scalc/01/0603.xhp 
b/source/text/scalc/01/0603.xhp
index c0caa7cbd..8750fd833 100644
--- a/source/text/scalc/01/0603.xhp
+++ b/source/text/scalc/01/0603.xhp
@@ -41,7 +41,7 @@
  
   
   Once you 
have defined a trace, you can point with the mouse cursor to the trace. The 
mouse cursor will change its shape. Double-click the trace with this cursor to 
select the referenced cell at the end of the trace. If you define an 
icon in the spreadsheet, you can put your cursor on it. It will change into a 
magnifying glass with reference arrows. Double-click the visible icon to select 
the cell at the furthest end of the icon.
-  
+  
   
   
   
diff --git a/source/text/scalc/01/06030100.xhp 
b/source/text/scalc/01/06030100.xhp
index 811a440ec..a301cb6c4 100644
--- a/source/text/scalc/01/06030100.xhp
+++ b/source/text/scalc/01/06030100.xhp
@@ -30,7 +30,7 @@
 
 
 
-
+
 cells; tracing precedents
 formula cells;tracing precedents
 
@@ -40,7 +40,7 @@
 
 Traces are 
displayed in the sheet with marking arrows. At the same time, the range of all 
the cells contained in the formula of the current cell is highlighted with a 
blue frame.
 
-  
+  
 
 This function is 
based on a principle of layers. For example, if the precedent cell to a formula 
is already indicated with a tracer arrow, when you repeat this command, the 
tracer arrows are drawn to the precedent cells of this cell.
 


[Libreoffice-commits] core.git: helpcontent2

2021-11-16 Thread Johnny_M (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e8b667f7ec28d28ed228b25dbf77cb161abe
Author: Johnny_M 
AuthorDate: Tue Nov 16 09:56:39 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Nov 16 09:56:39 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 1aa8bf640c894799bfd3c1ece4df34cbb5c29a6d
  - tdf#132643 Translate German section IDs

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

diff --git a/helpcontent2 b/helpcontent2
index e713d1e606f3..1aa8bf640c89 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit e713d1e606f3e87692bcbe629a6427a706859152
+Subproject commit 1aa8bf640c894799bfd3c1ece4df34cbb5c29a6d


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

2021-11-16 Thread Johnny_M (via logerrit)
 source/text/scalc/01/0219.xhp |2 +-
 source/text/scalc/01/02190100.xhp |2 +-
 source/text/scalc/01/0401.xhp |2 +-
 source/text/scalc/01/04010100.xhp |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1aa8bf640c894799bfd3c1ece4df34cbb5c29a6d
Author: Johnny_M 
AuthorDate: Sun Nov 14 11:42:30 2021 +0100
Commit: Olivier Hallot 
CommitDate: Tue Nov 16 09:56:35 2021 +0100

tdf#132643 Translate German section IDs

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

diff --git a/source/text/scalc/01/0219.xhp 
b/source/text/scalc/01/0219.xhp
index 58bae2276..ec229948a 100644
--- a/source/text/scalc/01/0219.xhp
+++ b/source/text/scalc/01/0219.xhp
@@ -37,7 +37,7 @@
 
 
 
-
+
 
 
 
diff --git a/source/text/scalc/01/02190100.xhp 
b/source/text/scalc/01/02190100.xhp
index a0c43cbe2..7c62fa602 100644
--- a/source/text/scalc/01/02190100.xhp
+++ b/source/text/scalc/01/02190100.xhp
@@ -30,7 +30,7 @@
 
 
 
-
+
 spreadsheets; deleting row 
breaks
 deleting;manual row breaks
 row breaks; deleting
diff --git a/source/text/scalc/01/0401.xhp 
b/source/text/scalc/01/0401.xhp
index 231578860..552988bc0 100644
--- a/source/text/scalc/01/0401.xhp
+++ b/source/text/scalc/01/0401.xhp
@@ -43,7 +43,7 @@
 
   
 
-
+
 
 
 
diff --git a/source/text/scalc/01/04010100.xhp 
b/source/text/scalc/01/04010100.xhp
index e5b68f117..c6c8824b6 100644
--- a/source/text/scalc/01/04010100.xhp
+++ b/source/text/scalc/01/04010100.xhp
@@ -30,7 +30,7 @@
 
 
 
-
+
 sheets; inserting row breaks
 row breaks; inserting
 inserting; manual row breaks


[Libreoffice-commits] core.git: helpcontent2

2021-11-16 Thread Johnny_M (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 09cfd99b85029d9e348a3dad012cb2e739431d31
Author: Johnny_M 
AuthorDate: Tue Nov 16 09:55:50 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Nov 16 09:55:50 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to e713d1e606f3e87692bcbe629a6427a706859152
  - tdf#132643 Translate German section IDs

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

diff --git a/helpcontent2 b/helpcontent2
index 2ee280bfb365..e713d1e606f3 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 2ee280bfb365d3cee940f96a93957360a6025eec
+Subproject commit e713d1e606f3e87692bcbe629a6427a706859152


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

2021-11-16 Thread Johnny_M (via logerrit)
 source/text/scalc/01/0603.xhp |2 +-
 source/text/scalc/01/06030600.xhp |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e713d1e606f3e87692bcbe629a6427a706859152
Author: Johnny_M 
AuthorDate: Sun Nov 14 11:36:52 2021 +0100
Commit: Olivier Hallot 
CommitDate: Tue Nov 16 09:55:48 2021 +0100

tdf#132643 Translate German section IDs

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

diff --git a/source/text/scalc/01/0603.xhp 
b/source/text/scalc/01/0603.xhp
index 59c5daa23..c0caa7cbd 100644
--- a/source/text/scalc/01/0603.xhp
+++ b/source/text/scalc/01/0603.xhp
@@ -46,7 +46,7 @@
   
   
   
-  
+  
   
   
   
diff --git a/source/text/scalc/01/06030600.xhp 
b/source/text/scalc/01/06030600.xhp
index 00f77630c..7b112100d 100644
--- a/source/text/scalc/01/06030600.xhp
+++ b/source/text/scalc/01/06030600.xhp
@@ -32,7 +32,7 @@
 
   
   
-  
+  
   cells; tracing 
errorstracing 
errorserror tracing
 
 Trace 
Error


[Libreoffice-commits] core.git: helpcontent2

2021-11-16 Thread Johnny_M (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0abf9d62c2f12c87e746a5d63d1c6d67d82d2bb6
Author: Johnny_M 
AuthorDate: Tue Nov 16 09:55:12 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Nov 16 09:55:12 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 2ee280bfb365d3cee940f96a93957360a6025eec
  - tdf#132643 Translate German section IDs

Remove unused.

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

diff --git a/helpcontent2 b/helpcontent2
index 940b048a9561..2ee280bfb365 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 940b048a9561b5919348a98dabbc3335119557a2
+Subproject commit 2ee280bfb365d3cee940f96a93957360a6025eec


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

2021-11-16 Thread Johnny_M (via logerrit)
 source/text/scalc/01/0214.xhp |2 --
 source/text/scalc/01/0613.xhp |2 --
 2 files changed, 4 deletions(-)

New commits:
commit 2ee280bfb365d3cee940f96a93957360a6025eec
Author: Johnny_M 
AuthorDate: Sun Nov 14 11:39:09 2021 +0100
Commit: Olivier Hallot 
CommitDate: Tue Nov 16 09:55:11 2021 +0100

tdf#132643 Translate German section IDs

Remove unused.

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

diff --git a/source/text/scalc/01/0214.xhp 
b/source/text/scalc/01/0214.xhp
index 3a9f248d7..50893fb3b 100644
--- a/source/text/scalc/01/0214.xhp
+++ b/source/text/scalc/01/0214.xhp
@@ -28,7 +28,6 @@


   
-  
 
 filling;selection lists
  selection lists;filling cells
@@ -36,7 +35,6 @@
 Fill
  Automatically fills cells with 
content.
   
-  
   
  
   
diff --git a/source/text/scalc/01/0613.xhp 
b/source/text/scalc/01/0613.xhp
index a0add0bfe..40462661a 100644
--- a/source/text/scalc/01/0613.xhp
+++ b/source/text/scalc/01/0613.xhp
@@ -30,14 +30,12 @@
 
 
 
-
 entering entries with AutoInput 
function
 capital letters;AutoInput function
 mw made "entering..." a one level entry
 
 AutoInput
 Switches the AutoInput function on and off, which 
automatically completes entries, based on other entries in the same 
column. The column is scanned up to a maximum of 2000 cells or 200 
different strings.
-
 
 
   


[Libreoffice-commits] core.git: helpcontent2

2021-11-16 Thread Johnny_M (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3aa7b95e8e5865d4aea465cf48dbff87f337aff2
Author: Johnny_M 
AuthorDate: Tue Nov 16 09:54:40 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Nov 16 09:54:40 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 940b048a9561b5919348a98dabbc3335119557a2
  - tdf#132643 Translate German section IDs

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

diff --git a/helpcontent2 b/helpcontent2
index 2d633cea28e9..940b048a9561 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 2d633cea28e9f266cd9c9a712c97eb9e2b83c8eb
+Subproject commit 940b048a9561b5919348a98dabbc3335119557a2


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

2021-11-16 Thread Johnny_M (via logerrit)
 source/text/scalc/01/0112.xhp   |2 --
 source/text/shared/main0201.xhp |4 ++--
 source/text/swriter/01/0112.xhp |3 ---
 source/text/swriter/main0200.xhp|2 +-
 source/text/swriter/main0210.xhp|2 +-
 5 files changed, 4 insertions(+), 9 deletions(-)

New commits:
commit 940b048a9561b5919348a98dabbc3335119557a2
Author: Johnny_M 
AuthorDate: Sun Nov 14 11:33:19 2021 +0100
Commit: Olivier Hallot 
CommitDate: Tue Nov 16 09:54:38 2021 +0100

tdf#132643 Translate German section IDs

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

diff --git a/source/text/scalc/01/0112.xhp 
b/source/text/scalc/01/0112.xhp
index 6d41f10ed..058adc0fb 100644
--- a/source/text/scalc/01/0112.xhp
+++ b/source/text/scalc/01/0112.xhp
@@ -30,12 +30,10 @@
 
 
 
-
 
 Print Preview
 Displays a preview of the printed page or closes the 
preview.
 
-
 
   
 
diff --git a/source/text/shared/main0201.xhp b/source/text/shared/main0201.xhp
index 32b5710e0..26b928a1b 100644
--- a/source/text/shared/main0201.xhp
+++ b/source/text/shared/main0201.xhp
@@ -50,10 +50,10 @@
 
 
 
-
+
 
 
-
+
 
 
 
diff --git a/source/text/swriter/01/0112.xhp 
b/source/text/swriter/01/0112.xhp
index a139bead5..72ebe640d 100644
--- a/source/text/swriter/01/0112.xhp
+++ b/source/text/swriter/01/0112.xhp
@@ -29,14 +29,11 @@
 
 
 
-
-
 
 
 Print Preview
 Displays a preview of the printed page or closes the 
preview.
 
-
 
 
 
diff --git a/source/text/swriter/main0200.xhp b/source/text/swriter/main0200.xhp
index 878b089ca..b058c5007 100644
--- a/source/text/swriter/main0200.xhp
+++ b/source/text/swriter/main0200.xhp
@@ -64,7 +64,7 @@
 
 
 
-
+
 
 
 
diff --git a/source/text/swriter/main0210.xhp b/source/text/swriter/main0210.xhp
index 4dc141917..25d0cb5f0 100644
--- a/source/text/swriter/main0210.xhp
+++ b/source/text/swriter/main0210.xhp
@@ -27,7 +27,7 @@
 
 
 
-
+
 
 
 Print 
Preview


  1   2   >