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

2021-08-24 Thread László Németh (via logerrit)
 sw/qa/extras/uiwriter/uiwriter2.cxx |   68 
 1 file changed, 68 insertions(+)

New commits:
commit 400a44261c3891c1fb99b5339ada69cbc4777dd0
Author: László Németh 
AuthorDate: Mon Aug 23 14:02:35 2021 +0200
Commit: László Németh 
CommitDate: Wed Aug 25 08:43:16 2021 +0200

tdf#143938 sw test: track format changes of the paragraph

Character formatting changes of the wholly selected
paragraph weren't tracked before the following fix:
commit 5e891c2ee82f2d7566ddb4e15b9c03cecb9fc1f8
"tdf#143939 sw: track format changes of the actual word".
This is only an unit test to cover both fixed problems.

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

diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 8461ef96197a..70d63e36871a 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -13,6 +13,8 @@
 
 #include 
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -2892,6 +2894,72 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf143918)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf143938)
+{
+SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf54819.fodt");
+
+SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+// select first paragraph, add underline without change tracking
+pWrtShell->EndPara(/*bSelect=*/true);
+dispatchCommand(mxComponent, ".uno:Underline", {});
+
+auto xText = getParagraph(1)->getText();
+CPPUNIT_ASSERT(xText.is());
+{
+auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 
1)));
+CPPUNIT_ASSERT(xCursor.is());
+CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum"), xCursor->getString());
+CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::SINGLE),
+ getProperty(xCursor, "CharUnderline"));
+CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE,
+ getProperty(xCursor, 
"CharPosture"));
+}
+
+// turn on red-lining and show changes
+pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | 
RedlineFlags::ShowDelete
+  | 
RedlineFlags::ShowInsert);
+CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+   pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+CPPUNIT_ASSERT_MESSAGE(
+"redlines should be visible",
+
IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+// apply italic with change tracking
+pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 6, 
/*bBasicCall=*/false);
+dispatchCommand(mxComponent, ".uno:Italic", {});
+
+xText = getParagraph(1)->getText();
+CPPUNIT_ASSERT(xText.is());
+{
+// (first empty run is associated to the redline)
+auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 
2)));
+CPPUNIT_ASSERT(xCursor.is());
+CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum"), xCursor->getString());
+CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::SINGLE),
+ getProperty(xCursor, "CharUnderline"));
+CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC,
+ getProperty(xCursor, 
"CharPosture"));
+}
+
+// reject tracked changes
+dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+
+// no italic, but still underline direct formatting
+xText = getParagraph(1)->getText();
+CPPUNIT_ASSERT(xText.is());
+{
+auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 
1)));
+CPPUNIT_ASSERT(xCursor.is());
+CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum"), xCursor->getString());
+// This wasn't underlined (lost direct formatting)
+CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::SINGLE),
+ getProperty(xCursor, "CharUnderline"));
+CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE,
+ getProperty(xCursor, 
"CharPosture"));
+}
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf143939)
 {
 SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf126206.docx");


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 7bba59217430585c6cc7f88ce787b5024c6ab80f
Author: Rafael Lima 
AuthorDate: Wed Aug 25 07:35:42 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Aug 25 07:35:42 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to f801beeaf39c7e7f018b655f28ba8c215ae14763
  - tdf#100480 Clarify the use of "Match case"

As requested in the bug report, this patch clarifies "Match case" when 
there is more than one case match.

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

diff --git a/helpcontent2 b/helpcontent2
index 68a9210bb429..f801beeaf39c 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 68a9210bb429907a26f622209414e69df3d586d3
+Subproject commit f801beeaf39c7e7f018b655f28ba8c215ae14763


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

2021-08-24 Thread Rafael Lima (via logerrit)
 source/text/shared/01/0210.xhp |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit f801beeaf39c7e7f018b655f28ba8c215ae14763
Author: Rafael Lima 
AuthorDate: Wed Aug 25 00:19:24 2021 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Aug 25 07:35:42 2021 +0200

tdf#100480 Clarify the use of "Match case"

As requested in the bug report, this patch clarifies "Match case" when 
there is more than one case match.

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

diff --git a/source/text/shared/01/0210.xhp 
b/source/text/shared/01/0210.xhp
index 6ffb14464..46acfe4ac 100644
--- a/source/text/shared/01/0210.xhp
+++ b/source/text/shared/01/0210.xhp
@@ -25,6 +25,9 @@
   
   
 
+  
+Find & Replace dialog
+  
   
   
   
@@ -70,9 +73,11 @@
 
 
   
-Distinguishes between 
uppercase and lowercase characters.
+Matches the exact 
character provided in the Find box without considering any 
alternative case matches.
   
 
+Disable this option 
to consider all possible case matches. For example, entering "a" in the 
Find box matches both "a" and "A".
+Beware that some characters may have more 
than one match when Match case is disabled. For instance, "s" 
matches "s", "S" and "ß" (sharp S used in the German language).
 
 
   searching;formatted numbers


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

2021-08-24 Thread Vasily Melenchuk (via logerrit)
 svx/source/sidebar/nbdtmg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9eb836a1a5f0f4522337ff7b87c9a0a4c7e8ca57
Author: Vasily Melenchuk 
AuthorDate: Mon Aug 23 12:27:20 2021 +0300
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Aug 25 07:35:19 2021 +0200

tdf#143990: writer: default value for SetIncludeUpperLevels is 1

Same as in e08fba90 for tdf#143858: zero for SetIncludeUpperLevels
has no practical sense, since actually this value is amount of levels
to display. Default and minimal value is 1 (current level), zero
used only in cases when there should be no numbering.

Change-Id: I303386339a9e13944e11d0287c933523c7410b6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120863
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 1fd9116fbcd1a8d25f964087cd1d0eb15df8a2d1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120889
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index cddac0a5f823..fe3c664c7ebf 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -858,7 +858,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, 
sal_uInt16 nIndex, sal_uInt1
 }
 } else
 {
-aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != 
nUpperLevelOrChar ? aNum.GetLevelCount() : 0));
+aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != 
nUpperLevelOrChar ? aNum.GetLevelCount() : 1));
 aFmt.SetCharFormatName(GetNumCharFmtName());
 if (isResetSize) aFmt.SetBulletRelSize(100);
 }


[Libreoffice-commits] core.git: Changes to 'refs/tags/cib-6.4-0'

2021-08-24 Thread Samuel Mehrbrodt (via logerrit)
Tag 'cib-6.4-0' created by Thorsten Behrens  at 
2021-08-24 23:36 +

Release LibreOffice powered by CIB 6.4-0
-BEGIN PGP SIGNATURE-

iQKTBAABCgB9FiEEF13c36gxow74AXmeM3dpmHHuF/gFAmElgmpfFIAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDE3
NUREQ0RGQTgzMUEzMEVGODAxNzk5RTMzNzc2OTk4NzFFRTE3RjgACgkQM3dpmHHu
F/gnWBAAs+W1mFlntGI7g+JbIIGyRKaA3RWKRi3EHGCl38lrYI96nf9okZjGL4US
w7bI/y9etMpRLt6RXZ7+wEo4XFyZyOz1OlkQrxR0ClMxTi2mJonjVkui6yX0b8+5
42iozdPn4QmSbns8Kl73k83VA65WMIbDEtAXZoWUjLILen9IvjzUEAxJvg3QY5E+
PNNlB/U0KmERrWPt6k/F0HvpRcdANLFGIWm+0A86Nq+isXFo4kLgWXlbOM5kSBk7
CqHPbFTr8MWB39LLMJPhHlT2Q6eRu9R8395aL37DUTjCKY9jkCCaVXY1G7sWnJjT
Y/CrEtDYVe+SR4fhNjMtU+f6ZvKjq3TWpOfDqUF42sVtWWaNnpOofc8nVzH5ckDB
Wdtp6J05MGCvbOewRVX2Si8iwNoYbn+gAo3vKFE1gGtY84obRXFuWq21uQupexr7
Xla5ekDIzqEpolCMMwUNdNhdlnzYS+z58SE+Zodm3UOFXdiXhwzo8f9Q9Aex+5Fd
dJ144aEWaHXGpGtHz8cI7mc0FNGKIkeb27J3scDLTwOMcBKc8NSzu9jOYpdlFb3j
WgyzpoSbDq6qkU/+OEv50wvdxnk+ZyTU60G3ShIwr9UXS2NUuRqVInLbLuIm9ejR
acsNYW/pK4PQ0rB0Au1c1yJL1R37tmzST6XboXyr4R5riyzNduc=
=dqkk
-END PGP SIGNATURE-

Changes since cp-6.4-branch-point-523:
---
 0 files changed
---


[Libreoffice-commits] core.git: helpcontent2

2021-08-24 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4debb7e8cc12563f46d1aaa58afdcb831f21cc83
Author: Olivier Hallot 
AuthorDate: Tue Aug 24 20:19:56 2021 -0300
Commit: Gerrit Code Review 
CommitDate: Wed Aug 25 01:19:56 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 68a9210bb429907a26f622209414e69df3d586d3
  - tdf#113240 Fill missing entries in pdf general page Help

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

diff --git a/helpcontent2 b/helpcontent2
index 09301536eabd..68a9210bb429 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 09301536eabd098a2e6b42f06755c939278a9521
+Subproject commit 68a9210bb429907a26f622209414e69df3d586d3


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

2021-08-24 Thread Olivier Hallot (via logerrit)
 source/text/shared/01/ref_pdf_export_general.xhp |4 
 1 file changed, 4 insertions(+)

New commits:
commit 68a9210bb429907a26f622209414e69df3d586d3
Author: Olivier Hallot 
AuthorDate: Tue Aug 24 13:47:21 2021 -0300
Commit: Olivier Hallot 
CommitDate: Wed Aug 25 01:19:56 2021 +0200

tdf#113240 Fill missing entries in pdf general page Help

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

diff --git a/source/text/shared/01/ref_pdf_export_general.xhp 
b/source/text/shared/01/ref_pdf_export_general.xhp
index 2a8c3514b..1692a71c5 100644
--- a/source/text/shared/01/ref_pdf_export_general.xhp
+++ b/source/text/shared/01/ref_pdf_export_general.xhp
@@ -145,6 +145,10 @@
 
 Export only notes page
 Exports only 
the Notes page views.
+
+
+Export hidden pages
+Exports 
document hidden slides.
 
 
 


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

2021-08-24 Thread Olivier Hallot (via logerrit)
 filter/uiconfig/ui/pdfgeneralpage.ui |   50 +++
 1 file changed, 50 insertions(+)

New commits:
commit 3d8f6f5c0ba30da100efb4eede426d2fe1f72148
Author: Olivier Hallot 
AuthorDate: Tue Aug 24 13:41:20 2021 -0300
Commit: Olivier Hallot 
CommitDate: Wed Aug 25 01:19:02 2021 +0200

tdf#113240 Fill imissing pdfgeneralpage.ui extended tips

Address "Export pçaceholders".

Change-Id: I8cfea3ea8daea948c7b4bd269d976e223ff9222d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120960
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/filter/uiconfig/ui/pdfgeneralpage.ui 
b/filter/uiconfig/ui/pdfgeneralpage.ui
index 98c49ac0e47b..9773934d65ae 100644
--- a/filter/uiconfig/ui/pdfgeneralpage.ui
+++ b/filter/uiconfig/ui/pdfgeneralpage.ui
@@ -148,6 +148,11 @@
 start
 True
 True
+
+  
+Open the 
exported document in the system default PDF viewer.
+  
+
   
   
 0
@@ -400,6 +405,11 @@
 start
 True
 True
+
+  
+Add a 
centered, vertical, light green watermark text to the page background. The 
watermark is not part of the source document.
+  
+
   
   
 0
@@ -412,6 +422,11 @@
 True
 True
 True
+
+  
+Insert 
the text for the watermark signature.
+  
+
   
   
 1
@@ -732,6 +747,11 @@
 start
 True
 True
+
+  
+Creates a 
universal accessibility-complying PDF file that follows the requirements of 
PDF/UA (ISO 14289) specifications.
+  
+
   
   
 0
@@ -800,6 +820,11 @@
 start
 True
 True
+
+  
+Export the 
placeholders fields visual markings only. The exported placeholder is 
ineffective.
+  
+
   
   
 0
@@ -855,6 +880,11 @@
 start
 True
 True
+
+  
+When the option is 
enabled, then the reference XObject markup is used:  viewers have to support 
this markup to show vector images. Otherwise a fallback bitmap is shown in the 
viewer.
+  
+
   
   
 0
@@ -870,6 +900,11 @@
 start
 True
 True
+
+  
+Exports 
document hidden slides.
+  
+
   
   
 0
@@ -885,6 +920,11 @@
 start
 True
 True
+
+  
+Export also the 
Notes pages view at the end of the exported PDF presentation 
document.
+  
+
   
   
 0
@@ -901,6 +941,11 @@
 18
 True
 True
+
+  
+Exports only 
the Notes page views.
+  
+
   
   
 0
@@ -916,6 +961,11 @@
 start
 True
 True
+
+  
+Ignores each sheet’s 
paper size, print ranges and shown/hidden status and puts every sheet (even 
hidden sheets) on exactly one page, which is exactly as small or large as 
needed to fit the whole contents of the sheet.
+  
+
   
   
 0


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

2021-08-24 Thread Olivier Hallot (via logerrit)
 filter/uiconfig/ui/pdfgeneralpage.ui |  542 +--
 1 file changed, 271 insertions(+), 271 deletions(-)

New commits:
commit 0b570a5939af820f4ef36cb8bc99ebbe450b7ac3
Author: Olivier Hallot 
AuthorDate: Tue Aug 24 13:38:10 2021 -0300
Commit: Olivier Hallot 
CommitDate: Wed Aug 25 01:18:18 2021 +0200

Bump Glade release for pdfgeneralpage.ui

no changes in contents

Change-Id: I0adb61facad506ebfa7e0ab0bff81948d84007e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120959
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/filter/uiconfig/ui/pdfgeneralpage.ui 
b/filter/uiconfig/ui/pdfgeneralpage.ui
index 1c2ee3ebd0f0..98c49ac0e47b 100644
--- a/filter/uiconfig/ui/pdfgeneralpage.ui
+++ b/filter/uiconfig/ui/pdfgeneralpage.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -7,46 +7,46 @@
 1
 100
 90
-1
-10
+1
+10
   
-  
+  
   
 True
-False
-6
-24
+False
+6
+24
 
   
 True
-False
+False
 vertical
 12
 
   
 True
-False
-0
-none
+False
+0
+none
 
-  
+  
   
 True
-False
-6
-6
+False
 12
 6
+6
+6
 
   
 _All
 True
-True
-False
+True
+False
 start
-True
+True
 True
-True
+True
 
   
 Exports all 
defined print ranges. If no print range is defined, exports the entire 
document.
@@ -54,8 +54,8 @@
 
   
   
-0
-0
+0
+0
 2
   
 
@@ -63,12 +63,12 @@
   
 _Pages:
 True
-True
-False
+True
+False
 start
 center
-True
-True
+True
+True
 all
 
   
@@ -80,19 +80,19 @@
 
   
   
-0
-1
+0
+1
   
 
 
   
 _Selection
 True
-True
-False
+True
+False
 start
-True
-True
+True
+True
 all
 
   
@@ -101,21 +101,21 @@
 
   
   
-0
-3
+0
+3
 2
   
 
 
   
 True
-True
-True
-5
+True
+True
+5
+True
 
   
 
-True
 
   
 Exports the 
pages you type in the box.
@@ -123,48 +123,48 @@
 
   
   
-1
-1
+1
+1
   
 
 
   
-False
-True
+False
+True
 start
 Slides:
   
   
-0
-2
+0
+2
   
 
 
   
 _View PDF after export
 True
-True
-False
+True
+False
 start
-True
-True
+True
+True
   
   
-0
-4
+0
+ 

GSoC Integrating .ui dialogs with strings final report

2021-08-24 Thread sary nasser
Hello Libo,
Final report :
https://docs.google.com/document/d/13Q8kBGIF26RFDJMi8TsW17VFPQgGmmFIepJGZM1TwJY/edit#heading=h.b1phey7354li

I am very happy to learn and grow my skills with libreoffice and GSoC, it
was an amazing experience for me, I hope I don't stop contributing to
libreoffice as much as I can.

I want to thank everyone in the dev chat. You really helped me from the
first step till the last day in any question I asked, thanks to the amazing
mentor Cloph everyday he was there to help me,learn new things, explain the
documentation and the tasks to do and I wouldn't continue without him,
thanks to Ilmari for being always active and respond to everything was
asked and thanks to Olivier for being comentor to the project.

It was amazing and challenging and I would do it again if I had the chance.

Thanks all, Sary


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/impop.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4e86347d7ad76e16d8b0eaae5f12d1dfb763b531
Author: Caolán McNamara 
AuthorDate: Tue Aug 24 15:36:24 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 21:32:53 2021 +0200

ofz: Out-of-memory, reduce max row allowed for TableOp when fuzzing

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

diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index c8bae9ae8969..6ecde0fbdd4b 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -1106,7 +1106,7 @@ void ImportExcel::TableOp()
 if (utl::ConfigManager::IsFuzzing())
 {
 //shrink to smallish arbitrary value to not timeout
-nLastRow = std::min(nLastRow, MAXROW_30);
+nLastRow = std::min(nLastRow, MAXROW_30 / 2);
 }
 
 if( GetRoot().GetDoc().ValidColRow( nLastCol, nLastRow ) )


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 slideshow/source/engine/animationnodes/animationphysicsnode.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 27273c2c43875acda77b3262c6a4e6138d5dacf6
Author: Caolán McNamara 
AuthorDate: Tue Aug 24 17:03:25 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 21:32:35 2021 +0200

WaE: silence -Wmaybe-uninitialized

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

diff --git a/slideshow/source/engine/animationnodes/animationphysicsnode.cxx 
b/slideshow/source/engine/animationnodes/animationphysicsnode.cxx
index 6d2e5b756df1..0502f35c18d7 100644
--- a/slideshow/source/engine/animationnodes/animationphysicsnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationphysicsnode.cxx
@@ -35,7 +35,7 @@ void AnimationPhysicsNode::dispose()
 
 AnimationActivitySharedPtr AnimationPhysicsNode::createActivity() const
 {
-double fDuration;
+double fDuration(0.0);
 ENSURE_OR_THROW((mxPhysicsMotionNode->getDuration() >>= fDuration),
 "Couldn't get the animation duration.");
 


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/misc/TokenWriter.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit cc7c11323215705c3d49acde3f8e6099f2a0feeb
Author: Caolán McNamara 
AuthorDate: Tue Aug 24 15:29:46 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 21:31:52 2021 +0200

cid#1490801 Uninitialized pointer field

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

diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx 
b/dbaccess/source/ui/misc/TokenWriter.cxx
index 005ee1d03a70..bde1e9a138a5 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -78,6 +78,7 @@ ODatabaseImportExport::ODatabaseImportExport(const 
svx::ODataAccessDescriptor& _
  const Reference< 
XComponentContext >& _rM,
  const Reference< 
css::util::XNumberFormatter >& _rxNumberF)
 :m_bBookmarkSelection( false )
+,m_pStream(nullptr)
 ,m_xFormatter(_rxNumberF)
 ,m_xContext(_rM)
 ,m_nCommandType(CommandType::TABLE)


Fwd: Aucorrect pt-PT - sorting

2021-08-24 Thread Marco A.G. Pinto

  
  
Hello!

I sent this e-mail to Adolfo, Andras and Áron last week, but no one
replied.

buovjaga, on IRC, suggested sending it to the development mailing
list.

Thanks!

  
   Forwarded Message 
  

  
Subject:

Aucorrect pt-PT - sorting
  
  
Date: 
Thu, 19 Aug 2021 20:42:07 +0100
  
  
From: 
Marco A.G. Pinto 
  
  
To: 


  

  
  
  
  
  Hello!
  
  I wondered if I could sort the pt-PT autocorrect list with
  Proofing Tool GUI (PTG), except emojis, since PureBasic only
  accepts up to chr 65535.
  
  My idea is to leave the order of the emojis static and just sort
  all other words with PTG.
  
  This way it would make it easier to update the words there since
  instead of inserting them one by one manually, I could always just
  copy/paste over the current wordlist.
  
  So, I would like to ask if I do it, it will be approved by the
  reviewers (you three)?
  
  I would also like to ask what is the default number of spaces at
  the beginning of each line so that I can add such a setting to
  PTG.
  
  What is the URL to the full pt-PT autocorrect XML for me to
  download it?
  
  Next week I will work on it.
  
  Thanks!
  
  Kind regards,
     >Marco A.G.Pinto
      ---
  

  




OpenPGP_signature
Description: OpenPGP digital signature


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

2021-08-24 Thread Noel Grandin (via logerrit)
 include/sfx2/lnkbase.hxx  |   14 
 sfx2/source/appl/lnkbase2.cxx |   72 +-
 2 files changed, 38 insertions(+), 48 deletions(-)

New commits:
commit fa15b0e86a5e78a2cb56aa36f161e1b9769e3441
Author: Noel Grandin 
AuthorDate: Tue Aug 24 10:07:14 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Aug 24 21:25:41 2021 +0200

remove one of the pimpls in SvBaseLink

two pimpl's and some internal fields seems a little messy

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

diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx
index 332702b8893f..38b1ef57dfe2 100644
--- a/include/sfx2/lnkbase.hxx
+++ b/include/sfx2/lnkbase.hxx
@@ -69,21 +69,25 @@ constexpr bool isClientFileType(SvBaseLinkObjectType t)
 return (static_cast(t) & check) == check;
 }
 
-struct BaseLink_Impl;
-
 class SFX2_DLLPUBLIC SvBaseLink : public SvRefBase
 {
 private:
 friend class LinkManager;
 friend class SvLinkSource;
 
+Link  m_aEndEditLink;
+LinkManager*m_pLinkMgr;
+weld::Window*   m_pParentWin;
+std::unique_ptr
+m_pFileDlg;
 SvLinkSourceRef xObj;
 OUStringaLinkName;
-std::unique_ptr  pImpl;
+std::unique_ptr pImplData;
 SvBaseLinkObjectTypemnObjType;
 boolbVisible : 1;
 boolbSynchron : 1;
 boolbWasLastEditOK : 1;
+boolm_bIsConnect : 1;
 
 DECL_LINK( EndEditHdl, const OUString&, void );
 
@@ -95,8 +99,6 @@ protected:
 // Set LinkSourceName without action
 voidSetName( const OUString & rLn );
 
-std::unique_ptr pImplData;
-
 boolm_bIsReadOnly;
 css::uno::Reference
 m_xInputStreamToLoadFrom;
@@ -169,7 +171,7 @@ public:
 voidclearStreamToLoadFrom();
 
 bool WasLastEditOK() const   { return bWasLastEditOK; }
-FileDialogHelper & GetInsertFileDialog(const OUString& rFactory) const;
+FileDialogHelper & GetInsertFileDialog(const OUString& rFactory);
 };
 
 }
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 8df00b9bd788..7fd3b3d530d5 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -41,27 +41,9 @@ namespace sfx2
 {
 
 namespace {
-
-class  ImplDdeItem;
-
+class ImplDdeItem;
 }
 
-struct BaseLink_Impl
-{
-Link m_aEndEditLink;
-LinkManager*m_pLinkMgr;
-weld::Window*   m_pParentWin;
-std::unique_ptr
-m_pFileDlg;
-boolm_bIsConnect;
-
-BaseLink_Impl() :
-  m_pLinkMgr( nullptr )
-, m_pParentWin( nullptr )
-, m_bIsConnect( false )
-{}
-};
-
 // only for internal management
 struct ImplBaseLinkData
 {
@@ -126,8 +108,10 @@ public:
 }
 
 SvBaseLink::SvBaseLink()
-: pImpl ( new BaseLink_Impl ),
-  m_bIsReadOnly(false)
+: m_pLinkMgr( nullptr )
+, m_pParentWin( nullptr )
+, m_bIsConnect( false )
+, m_bIsReadOnly(false)
 {
 mnObjType = SvBaseLinkObjectType::ClientSo;
 pImplData.reset( new ImplBaseLinkData );
@@ -137,8 +121,10 @@ SvBaseLink::SvBaseLink()
 
 
 SvBaseLink::SvBaseLink( SfxLinkUpdateMode nUpdateMode, SotClipboardFormatId 
nContentType )
-   : pImpl( new BaseLink_Impl ),
- m_bIsReadOnly(false)
+: m_pLinkMgr( nullptr )
+, m_pParentWin( nullptr )
+, m_bIsConnect( false )
+, m_bIsReadOnly(false)
 {
 mnObjType = SvBaseLinkObjectType::ClientSo;
 pImplData.reset( new ImplBaseLinkData );
@@ -184,7 +170,9 @@ static DdeTopic* FindTopic( const OUString & rLinkName, 
sal_uInt16* pItemStt )
 }
 
 SvBaseLink::SvBaseLink( const OUString& rLinkName, SvBaseLinkObjectType 
nObjectType, SvLinkSource* pObj )
-: pImpl()
+: m_pLinkMgr( nullptr )
+, m_pParentWin( nullptr )
+, m_bIsConnect( false )
 , m_bIsReadOnly(false)
 {
 bVisible = bSynchron = true;
@@ -241,7 +229,7 @@ IMPL_LINK( SvBaseLink, EndEditHdl, const OUString&, 
_rNewName, void )
 if ( !ExecuteEdit( sNewName ) )
 sNewName.clear();
 bWasLastEditOK = !sNewName.isEmpty();
-pImpl->m_aEndEditLink.Call( *this );
+m_aEndEditLink.Call( *this );
 }
 
 
@@ -364,7 +352,7 @@ SfxLinkUpdateMode SvBaseLink::GetUpdateMode() const
 
 void SvBaseLink::GetRealObject_( bool bConnect)
 {
-if( !pImpl->m_pLinkMgr )
+if( !m_pLinkMgr )
 return;
 
 DBG_ASSERT( !xObj.is(), "object already exist" );
@@ -414,17 +402,17 @@ void SvBaseLink::SetContentType( SotClipboardFormatId 
nType )
 
 LinkManager* SvBaseLink::GetLinkManager()
 {
-return pImpl->m_pLinkMgr;
+return m_pLinkMgr;
 }
 
 const LinkManager* SvBaseLink::GetLinkManager() const
 {
-return pImpl->m_pLinkMgr;
+return m_pLinkMgr;
 }
 
 void SvBaseL

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

2021-08-24 Thread Andreas Heinisch (via logerrit)
 sw/source/uibase/utlui/glbltree.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit a558be2393cf05a4ccf8b4af546207e69669eba2
Author: Andreas Heinisch 
AuthorDate: Tue Aug 24 09:06:48 2021 +0200
Commit: Andreas Heinisch 
CommitDate: Tue Aug 24 20:51:02 2021 +0200

tdf#127978 - Don't URL encode filename for navigator's tooltip (D&D)

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

diff --git a/sw/source/uibase/utlui/glbltree.cxx 
b/sw/source/uibase/utlui/glbltree.cxx
index ab8beedabc41..8ea94f9680f8 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -522,7 +522,9 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* 
pCont, const OUString*
 aFileNames.realloc(1);
 INetURLObject aFileName;
 aFileName.SetSmartURL( *pFileName );
-aFileNames.getArray()[0] = aFileName.GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
+// tdf#127978 - don't URL encode filename for navigator's tooltip
+aFileNames.getArray()[0]
+= 
aFileName.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
 InsertRegion( pCont, aFileNames );
 }
 }


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

2021-08-24 Thread Noel Grandin (via logerrit)
 toolkit/source/awt/stylesettings.cxx |  539 ---
 toolkit/source/awt/stylesettings.hxx |   19 -
 2 files changed, 273 insertions(+), 285 deletions(-)

New commits:
commit 60e81b7ac33272a12e54c3d12dab8960ca8b071e
Author: Noel Grandin 
AuthorDate: Mon Aug 23 20:02:14 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Aug 24 20:22:53 2021 +0200

remove pimpl from WindowStyleSettings

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

diff --git a/toolkit/source/awt/stylesettings.cxx 
b/toolkit/source/awt/stylesettings.cxx
index 6d6419090c38..359e59077049 100644
--- a/toolkit/source/awt/stylesettings.cxx
+++ b/toolkit/source/awt/stylesettings.cxx
@@ -24,7 +24,6 @@
 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -35,8 +34,6 @@
 
 namespace toolkit
 {
-
-
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::RuntimeException;
 using ::com::sun::star::lang::DisposedException;
@@ -45,24 +42,7 @@ namespace toolkit
 using ::com::sun::star::awt::XStyleChangeListener;
 
 
-//= WindowStyleSettings_Data
-
-struct WindowStyleSettings_Data
-{
-VCLXWindow* pOwningWindow;
-::comphelper::OInterfaceContainerHelper2   aStyleChangeListeners;
-
-WindowStyleSettings_Data( ::osl::Mutex& i_rListenerMutex, VCLXWindow& 
i_rOwningWindow )
-: pOwningWindow( &i_rOwningWindow )
-,aStyleChangeListeners( i_rListenerMutex )
-{
-}
-
-DECL_LINK( OnWindowEvent, VclWindowEvent&, void );
-};
-
-
-IMPL_LINK( WindowStyleSettings_Data, OnWindowEvent, VclWindowEvent&, 
rEvent, void )
+IMPL_LINK( WindowStyleSettings, OnWindowEvent, VclWindowEvent&, rEvent, 
void )
 {
 if ( rEvent.GetId() != VclEventId::WindowDataChanged )
 return;
@@ -84,9 +64,9 @@ namespace toolkit
 class StyleMethodGuard
 {
 public:
-explicit StyleMethodGuard( WindowStyleSettings_Data const & i_rData )
+explicit StyleMethodGuard( VCLXWindow* pOwningWindow )
 {
-if ( i_rData.pOwningWindow == nullptr )
+if ( pOwningWindow == nullptr )
 throw DisposedException();
 }
 
@@ -100,12 +80,13 @@ namespace toolkit
 
 
 WindowStyleSettings::WindowStyleSettings(::osl::Mutex& i_rListenerMutex, 
VCLXWindow& i_rOwningWindow )
-:m_pData( new WindowStyleSettings_Data(i_rListenerMutex, 
i_rOwningWindow ) )
+: pOwningWindow( &i_rOwningWindow )
+,aStyleChangeListeners( i_rListenerMutex )
 {
 VclPtr pWindow = i_rOwningWindow.GetWindow();
 if ( !pWindow )
 throw RuntimeException();
-pWindow->AddEventListener( LINK( m_pData.get(), 
WindowStyleSettings_Data, OnWindowEvent ) );
+pWindow->AddEventListener( LINK( this, WindowStyleSettings, 
OnWindowEvent ) );
 }
 
 
@@ -116,289 +97,285 @@ namespace toolkit
 
 void WindowStyleSettings::dispose()
 {
-StyleMethodGuard aGuard( *m_pData );
+StyleMethodGuard aGuard( pOwningWindow );
 
-VclPtr pWindow = m_pData->pOwningWindow->GetWindow();
+VclPtr pWindow = pOwningWindow->GetWindow();
 OSL_ENSURE( pWindow, "WindowStyleSettings::dispose: window has been 
reset before we could revoke the listener!" );
 if ( pWindow )
-pWindow->RemoveEventListener( LINK( m_pData.get(), 
WindowStyleSettings_Data, OnWindowEvent ) );
+pWindow->RemoveEventListener( LINK( this, WindowStyleSettings, 
OnWindowEvent ) );
 
 EventObject aEvent( *this );
-m_pData->aStyleChangeListeners.disposeAndClear( aEvent );
+aStyleChangeListeners.disposeAndClear( aEvent );
 
-m_pData->pOwningWindow = nullptr;
+pOwningWindow = nullptr;
 }
 
 
-namespace
+sal_Int32 WindowStyleSettings::ImplGetStyleColor( Color const & 
(StyleSettings::*i_pGetter)() const )
 {
-sal_Int32 lcl_getStyleColor( WindowStyleSettings_Data const & i_rData, 
Color const & (StyleSettings::*i_pGetter)() const )
-{
-const VclPtr& pWindow = 
i_rData.pOwningWindow->GetWindow();
-const AllSettings aAllSettings = pWindow->GetSettings();
-const StyleSettings& aStyleSettings = 
aAllSettings.GetStyleSettings();
-return sal_Int32((aStyleSettings.*i_pGetter)());
-}
-
-void lcl_setStyleColor( WindowStyleSettings_Data const & i_rData, void 
(StyleSettings::*i_pSetter)( Color const & ), sal_Int32 i_nColor )
-{
-VclPtr pWindow = i_rData.pOwningWindow->GetWindow();
-AllSettings aAllSettings = pWindow->GetSettings();
-StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
-(aStyleSettings.*i_pSetter)( Color(ColorTransparency, i_nColor) );
-aAllSetting

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

2021-08-24 Thread Michael Stahl (via logerrit)
 test/source/bootstrapfixture.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ba8fe774a1cfc1cc5be05ecc5175a7d020e5bd7a
Author: Michael Stahl 
AuthorDate: Tue Aug 24 13:38:43 2021 +0200
Commit: Michael Stahl 
CommitDate: Tue Aug 24 18:58:32 2021 +0200

test: capture stderr of odfvalidator too

It will be used when https://github.com/tdf/odftoolkit/pull/121 is
merged.

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

diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index 78bdba431c77..4d933a3fc5d2 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -189,7 +189,7 @@ void test::BootstrapFixture::validate(const OUString& 
rPath, test::ValidationFor
 utl::TempFile aOutput;
 aOutput.EnableKillingFile();
 OUString aOutputFile = aOutput.GetFileName();
-OUString aCommand = aValidator + " " + rPath + " > " + aOutputFile;
+OUString aCommand = aValidator + " " + rPath + " > " + aOutputFile + " 
2>&1";
 
 #if !defined _WIN32
 // For now, this is only needed by some Linux ASan builds, so keep it 
simply and disable it on


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

2021-08-24 Thread Noel Grandin (via logerrit)
 comphelper/source/misc/instancelocker.cxx |   28 +---
 comphelper/source/misc/instancelocker.hxx |8 
 2 files changed, 17 insertions(+), 19 deletions(-)

New commits:
commit 84d87ae75f5d70bfcaa3e2b124c74a8f733980a3
Author: Noel Grandin 
AuthorDate: Sun Aug 22 18:20:58 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Aug 24 18:39:18 2021 +0200

osl::Mutex->std::mutex in OInstanceLocker

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

diff --git a/comphelper/source/misc/instancelocker.cxx 
b/comphelper/source/misc/instancelocker.cxx
index b942d7ec8329..ffb325bc40b2 100644
--- a/comphelper/source/misc/instancelocker.cxx
+++ b/comphelper/source/misc/instancelocker.cxx
@@ -66,19 +66,20 @@ OInstanceLocker::~OInstanceLocker()
 
 void SAL_CALL OInstanceLocker::dispose()
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( m_bDisposed )
 throw lang::DisposedException();
 
 lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
-if ( m_pListenersContainer )
-m_pListenersContainer->disposeAndClear( aSource );
-
+m_aListenersContainer.disposeAndClear( aGuard, aSource );
+aGuard.lock();
 if ( m_xLockListener.is() )
 {
-m_xLockListener->Dispose();
-m_xLockListener.clear();
+auto tmp = std::move(m_xLockListener);
+aGuard.unlock();
+tmp->Dispose();
+aGuard.lock();
 }
 
 m_bDisposed = true;
@@ -87,29 +88,25 @@ void SAL_CALL OInstanceLocker::dispose()
 
 void SAL_CALL OInstanceLocker::addEventListener( const uno::Reference< 
lang::XEventListener >& xListener )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::scoped_lock aGuard( m_aMutex );
 if ( m_bDisposed )
 throw lang::DisposedException(); // TODO
 
-if ( !m_pListenersContainer )
-m_pListenersContainer.reset( new 
::comphelper::OInterfaceContainerHelper2( m_aMutex ) );
-
-m_pListenersContainer->addInterface( xListener );
+m_aListenersContainer.addInterface( xListener );
 }
 
 
 void SAL_CALL OInstanceLocker::removeEventListener( const uno::Reference< 
lang::XEventListener >& xListener )
 {
-::osl::MutexGuard aGuard( m_aMutex );
-if ( m_pListenersContainer )
-m_pListenersContainer->removeInterface( xListener );
+std::scoped_lock aGuard( m_aMutex );
+m_aListenersContainer.removeInterface( xListener );
 }
 
 // XInitialization
 
 void SAL_CALL OInstanceLocker::initialize( const uno::Sequence< uno::Any >& 
aArguments )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 if ( m_bInitialized )
 throw frame::DoubleInitializationException();
 
@@ -166,6 +163,7 @@ void SAL_CALL OInstanceLocker::initialize( const 
uno::Sequence< uno::Any >& aArg
 }
 catch( uno::Exception& )
 {
+aGuard.unlock();
 dispose();
 throw;
 }
diff --git a/comphelper/source/misc/instancelocker.hxx 
b/comphelper/source/misc/instancelocker.hxx
index 02180e511c0f..a188e6e4614e 100644
--- a/comphelper/source/misc/instancelocker.hxx
+++ b/comphelper/source/misc/instancelocker.hxx
@@ -24,14 +24,14 @@
 #include 
 #include 
 #include 
+#include 
 #include 
-#include 
 #include 
 #include 
 #include 
+#include 
 
 namespace com::sun::star::embed { class XActionsApproval; }
-namespace comphelper { class OInterfaceContainerHelper2; }
 
 
 class OLockListener;
@@ -42,11 +42,11 @@ class OInstanceLocker : public ::cppu::WeakImplHelper< 
css::lang::XComponent,

css::lang::XInitialization,
css::lang::XServiceInfo 
>
 {
-::osl::Mutex m_aMutex;
+std::mutex m_aMutex;
 
 rtl::Reference< OLockListener > m_xLockListener;
 
-std::unique_ptr<::comphelper::OInterfaceContainerHelper2> 
m_pListenersContainer; // list of listeners
+comphelper::OInterfaceContainerHelper4 
m_aListenersContainer; // list of listeners
 
 bool m_bDisposed;
 bool m_bInitialized;


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

2021-08-24 Thread Andrea Gelmini (via logerrit)
 vcl/headless/svpgdi.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3fcf7643403b331bbbf60169ac20bbf322a294f1
Author: Andrea Gelmini 
AuthorDate: Sat Aug 21 18:11:41 2021 +0200
Commit: Julien Nabet 
CommitDate: Tue Aug 24 17:43:58 2021 +0200

Fix typo

Not so sure... anyway, just to spot it to smarter ones

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

diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 2a5d1ba350ad..a80a1317487f 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -2169,7 +2169,7 @@ void SvpSalGraphics::drawBitmap(const SalTwoRect& rTR, 
const SalBitmap& rSourceB
 }
 
 #if 0 // LO code is not yet bitmap32-ready.
-  // if m_bSupportsBitmap32 becomes trye for Svp revisit this
+  // if m_bSupportsBitmap32 becomes true for Svp revisit this
 copyWithOperator(rTR, source, CAIRO_OPERATOR_OVER);
 #else
 copyWithOperator(rTR, source, CAIRO_OPERATOR_SOURCE);


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/impop.cxx |   23 +--
 1 file changed, 9 insertions(+), 14 deletions(-)

New commits:
commit 0efa548a3f2f392581396db2c7292fdda3d954c7
Author: Caolán McNamara 
AuthorDate: Tue Aug 24 14:17:15 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 17:25:05 2021 +0200

move variables declaration to their use

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

diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index e23677e55d10..c8bae9ae8969 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -1093,20 +1093,15 @@ void ImportExcel::Defrowheight345()
 
 void ImportExcel::TableOp()
 {
-sal_uInt16 nFirstRow, nLastRow;
-sal_uInt8 nFirstCol, nLastCol;
-sal_uInt16 nGrbit;
-sal_uInt16 nInpRow, nInpCol, nInpRow2, nInpCol2;
-
-nFirstRow = aIn.ReaduInt16();
-nLastRow = aIn.ReaduInt16();
-nFirstCol = aIn.ReaduInt8();
-nLastCol = aIn.ReaduInt8();
-nGrbit = aIn.ReaduInt16();
-nInpRow = aIn.ReaduInt16();
-nInpCol = aIn.ReaduInt16();
-nInpRow2 = aIn.ReaduInt16();
-nInpCol2 = aIn.ReaduInt16();
+sal_uInt16 nFirstRow = aIn.ReaduInt16();
+sal_uInt16 nLastRow = aIn.ReaduInt16();
+sal_uInt8 nFirstCol = aIn.ReaduInt8();
+sal_uInt8 nLastCol = aIn.ReaduInt8();
+sal_uInt16 nGrbit = aIn.ReaduInt16();
+sal_uInt16 nInpRow = aIn.ReaduInt16();
+sal_uInt16 nInpCol = aIn.ReaduInt16();
+sal_uInt16 nInpRow2 = aIn.ReaduInt16();
+sal_uInt16 nInpCol2 = aIn.ReaduInt16();
 
 if (utl::ConfigManager::IsFuzzing())
 {


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 svx/source/svdraw/svdobj.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 566d5be0f26b83f38392a7da928ac6f6e63f0c16
Author: Caolán McNamara 
AuthorDate: Tue Aug 24 08:45:03 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 17:24:47 2021 +0200

tidy this a little

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

diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 75298438b77b..4364f858211c 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -268,9 +268,9 @@ void SdrObject::ActionChanged() const
 
 SdrPage* SdrObject::getSdrPageFromSdrObject() const
 {
-if(getParentSdrObjListFromSdrObject())
+if (SdrObjList* pParentList = getParentSdrObjListFromSdrObject())
 {
-return getParentSdrObjListFromSdrObject()->getSdrPageFromSdrObjList();
+return pParentList->getSdrPageFromSdrObjList();
 }
 
 return nullptr;
@@ -901,17 +901,16 @@ OUString SdrObject::GetDescription() const
 
 sal_uInt32 SdrObject::GetOrdNum() const
 {
-if (nullptr != getParentSdrObjListFromSdrObject())
+if (SdrObjList* pParentList = getParentSdrObjListFromSdrObject())
 {
-if (getParentSdrObjListFromSdrObject()->IsObjOrdNumsDirty())
+if (pParentList->IsObjOrdNumsDirty())
 {
-getParentSdrObjListFromSdrObject()->RecalcObjOrdNums();
+pParentList->RecalcObjOrdNums();
 }
 } else const_cast(this)->m_nOrdNum=0;
 return m_nOrdNum;
 }
 
-
 void SdrObject::SetOrdNum(sal_uInt32 nNum)
 {
 m_nOrdNum = nNum;


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit ca780ad8c3a38fbfabe5ae316671a8eb30ed698d
Author: Rafael Lima 
AuthorDate: Tue Aug 24 16:24:38 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Aug 24 16:24:38 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 09301536eabd098a2e6b42f06755c939278a9521
  - Refactor "0210.xhp" to fix indentation

This patch applies xmllint --format to fix identation of the XHP file.

This patch will be followed by a fix to bug tdf#100480

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

diff --git a/helpcontent2 b/helpcontent2
index 6f4f219c04d4..09301536eabd 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6f4f219c04d4bb914cd2a44e782f14ac69d0abc8
+Subproject commit 09301536eabd098a2e6b42f06755c939278a9521


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

2021-08-24 Thread Rafael Lima (via logerrit)
 source/text/shared/01/0210.xhp |  587 -
 1 file changed, 385 insertions(+), 202 deletions(-)

New commits:
commit 09301536eabd098a2e6b42f06755c939278a9521
Author: Rafael Lima 
AuthorDate: Tue Aug 24 16:10:15 2021 +0200
Commit: Olivier Hallot 
CommitDate: Tue Aug 24 16:24:38 2021 +0200

Refactor "0210.xhp" to fix indentation

This patch applies xmllint --format to fix identation of the XHP file.

This patch will be followed by a fix to bug tdf#100480

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

diff --git a/source/text/shared/01/0210.xhp 
b/source/text/shared/01/0210.xhp
index 54bd50359..6ffb14464 100644
--- a/source/text/shared/01/0210.xhp
+++ b/source/text/shared/01/0210.xhp
@@ -1,6 +1,6 @@
 
 
-
-
-
-  
-Find & Replace
-/text/shared/01/0210.xhp
-  
-
-
-
-
-
-
-
-Find & 
Replace
-  Finds or replaces text 
or formats in the current document.
-
-
-  
-
-Find Toolbar
-
-Type the text to search in the current document. Press 
Enter to search the text.
-
-Click to search the next occurrence in downward 
direction.
-
-Click to search the next occurrence in upward 
direction.
-
-
-Find
-  Enter the text that you want to find, 
or select a previous search from the list.
-Search options 
are listed under the Find box and in the Other 
options area of the dialog.
-
-Match case
-case sensitivity;searching
-
-Distinguishes 
between uppercase and lowercase characters.
-
-
-
-searching;formatted numbers
-searching;formatted display
-finding;formatted numbers
-finding;formatted display
-
-
-
+  
+
+  Find & Replace
+  /text/shared/01/0210.xhp
+
+  
+  
+
+  
+  
+  
+  
+  
+
+  Find & Replace
+
+  
+  
+
+  Finds or replaces text or formats in 
the current document.
+
+  
+
+
+  
+
+Find Toolbar
+
+
+  Type the text to search in the 
current document. Press Enter to search the text.
+
+
+
+  Click to search the next occurrence 
in downward direction.
+
+
+
+  Click to search the next occurrence 
in upward direction.
+
+
+
+Find
+
+  Enter the text that you 
want to find, or select a previous search from the list.
+
+Search 
options are listed under the Find box and in the Other 
options area of the dialog.
+
+Match case
+
+  case sensitivity;searching
+
+
+  
+Distinguishes between 
uppercase and lowercase characters.
+  
+
+
+
+  searching;formatted numbers
+  searching;formatted display
+  finding;formatted numbers
+  finding;formatted display
+
+
+  
 Formatted display
-Includes number formatting 
characters in the search.
-
-
-
-
-Entire CellsWhole words 
only
-Searches for whole 
words or cells that are identical to the search 
text.
-
-searching; all sheets
-finding; in all sheets
-sheets; searching all
-
-
-All sheets
-Searches through all of the sheets in 
the current spreadsheet file.
-Searches through all of the sheets in the current 
spreadsheet file.
-
-
-Replace
-  Enter the replacement text, or 
select a recent replacement text or style from the list.
-  Replacement 
options are listed under the Find box and in the Other 
options area of the dialog.
-
-
-
-
-Find All
-  Finds and 
selects all instances of the text or the format that you are searching for in 
the document (only in Writer and Calc documents).
-
-
-copied text as hidden help, see issue 115137
-
-Finds and selects all instances of the text or the 
format that you are searching for in the document (only in Writer and Calc 
documents).
-
-Find Previous
-  Finds and 
selects the previous occurrence of the text or format that you are searching 
for in the document.
-
-Find Next
-  Finds and selects the next occurrence of 
the text or format that you are searching for in the 
document.
-
-Replace
-  Replaces the selected text or format 
that you searched for, and then searches for the next 
occurrence.
-
-Replace All
-  Replaces all of the occurrences of the text or format that you want to 
replace. 
Repeat this command until all replacements on your slide have been 
made.
-Other options
-
-Shows more or fewer search options. Click this label again 
to hide the extended search options.
-finding; selections
-
-
-Current selection only
-Searches only the selected text or cells.
-
-Replace backwards
-  Search starts at the current 
cursor position and goes backwards to the beginning of the 
file.
-
-
-
-Comments
-In Writer, you can select to include the 
comment texts in your searches.
-
-
-
-
-
-
-Regular 
expressions
-
-
-Allows you to use regular expressions in your 
search.i72448
+

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

2021-08-24 Thread Mike Kaganski (via logerrit)
 offapi/com/sun/star/awt/XDialog.idl |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c3cd4863d4c693a92f0340264b893310851445f0
Author: Mike Kaganski 
AuthorDate: Tue Aug 24 10:06:32 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue Aug 24 16:03:36 2021 +0200

Clarify that css::awt::XDialog::execute is modal.

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

diff --git a/offapi/com/sun/star/awt/XDialog.idl 
b/offapi/com/sun/star/awt/XDialog.idl
index a20fdc053fde..7d6ac3c71fc9 100644
--- a/offapi/com/sun/star/awt/XDialog.idl
+++ b/offapi/com/sun/star/awt/XDialog.idl
@@ -42,7 +42,8 @@ published interface XDialog: com::sun::star::uno::XInterface
 string getTitle();
 
 
-/** shows the dialog.
+/** runs the dialog modally: shows it, and waits for the execution to end.
+Returns an exit code (e.g., indicatting the button that was used to 
end the execution).
  */
 short execute();
 


New Defects reported by Coverity Scan for LibreOffice

2021-08-24 Thread scan-admin
Hi,

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

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

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


** CID 1490801:  Uninitialized members  (UNINIT_CTOR)
/dbaccess/source/ui/misc/TokenWriter.cxx: 93 in 
dbaui::ODatabaseImportExport::ODatabaseImportExport(const 
svx::ODataAccessDescriptor &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &)()



*** CID 1490801:  Uninitialized members  (UNINIT_CTOR)
/dbaccess/source/ui/misc/TokenWriter.cxx: 93 in 
dbaui::ODatabaseImportExport::ODatabaseImportExport(const 
svx::ODataAccessDescriptor &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &)()
87 {
88 m_eDestEnc = osl_getThreadTextEncoding();
89 
90 osl_atomic_increment( &m_refCount );
91 impl_initFromDescriptor( _aDataDescriptor, false );
92 osl_atomic_decrement( &m_refCount );
>>> CID 1490801:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_pStream" is not initialized in this 
>>> constructor nor in any functions that it calls.
93 }
94 
95 // import data
96 ODatabaseImportExport::ODatabaseImportExport( const 
::dbtools::SharedConnection& _rxConnection,
97 const Reference< XNumberFormatter >& _rxNumberF, const 
Reference< XComponentContext >& _rM )
98 :m_bBookmarkSelection( false )



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DGLnI_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi-2Bl-2FHNGekJK0XIoSP6jkvK9QxLf75mDkoC0RXFzDCMvbzuhyQFnywnf-2FgnMkcOMMbVEcaH3f8Hz942CgkkRkLidsGI-2F1cSi27xJ7er6O642CElzU20Cpj5iQTjJrggPkXuDn9GBjN-2F01jHAg1uEloFSci-2BmA-2FLgjdOC0-2FcaoDg-2FQ-3D



[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 885bddd8055c292794d38ceb232bd98c8b373452
Author: Rafael Lima 
AuthorDate: Tue Aug 24 15:43:11 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Aug 24 15:43:11 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 6f4f219c04d4bb914cd2a44e782f14ac69d0abc8
  - tdf#112057 Clarify the use of F2 in Calc

In 0102.xhp I updated the information about the F2 shortcut as 
discussed in the bug report.

In 01060300.xhp I gave more details about the "Press Enter to switch to 
edit mode" option.

Change-Id: Ifd554af943fb0bd0f9939c46a9393c7cb87c914e
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/120880
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas 

diff --git a/helpcontent2 b/helpcontent2
index b7fa972bc76c..6f4f219c04d4 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b7fa972bc76c0954479bfd7f1b77c511372c4626
+Subproject commit 6f4f219c04d4bb914cd2a44e782f14ac69d0abc8


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

2021-08-24 Thread Rafael Lima (via logerrit)
 source/text/scalc/04/0102.xhp| 1526 +++
 source/text/shared/optionen/01060300.xhp |  151 +--
 2 files changed, 870 insertions(+), 807 deletions(-)

New commits:
commit 6f4f219c04d4bb914cd2a44e782f14ac69d0abc8
Author: Rafael Lima 
AuthorDate: Mon Aug 23 22:34:30 2021 +0200
Commit: Ilmari Lauhakangas 
CommitDate: Tue Aug 24 15:43:11 2021 +0200

tdf#112057 Clarify the use of F2 in Calc

In 0102.xhp I updated the information about the F2 shortcut as 
discussed in the bug report.

In 01060300.xhp I gave more details about the "Press Enter to switch to 
edit mode" option.

Change-Id: Ifd554af943fb0bd0f9939c46a9393c7cb87c914e
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/120880
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas 

diff --git a/source/text/scalc/04/0102.xhp 
b/source/text/scalc/04/0102.xhp
index d4cb27cf1..1a32dedc2 100644
--- a/source/text/scalc/04/0102.xhp
+++ b/source/text/scalc/04/0102.xhp
@@ -17,755 +17,793 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
 
-
-
-Shortcut Keys for Spreadsheets
-/text/scalc/04/0102.xhp
-
-
-
-
-spreadsheets; shortcut keys 
in
-shortcut keys; spreadsheets
-sheet ranges; filling
-mw deleted "matrices;..."Shortcut Keys for Spreadsheets
-
-
-
-To fill a 
selected cell range with the formula that you entered on the Input 
line, press Option
+  
+
+  Shortcut Keys for Spreadsheets
+  /text/scalc/04/0102.xhp
+
+  
+  
+
+  
+spreadsheets; shortcut keys in
+shortcut keys; spreadsheets
+sheet ranges; filling
+  
+  mw deleted "matrices;..."
+  Shortcut Keys for Spreadsheets
+  
+
+To fill a 
selected cell range with the formula that you entered on the Input 
line, press Option
 
Alt+Enter.
-To create a 
matrix in which all the cells contain the same information as what you entered 
on the Input line, press Shift+CommandCtrl+Enter.
 You cannot edit the components of the matrix.
-To select 
multiple cells in different areas of a sheet, hold down CommandCtrl
 and drag in the different areas.
-To select 
multiple sheets in a spreadsheet, hold down CommandCtrl,
 and then click the name tabs at the lower edge of the workspace. To select 
only one sheet in a selection, hold down Shift, and then click the name tab of 
the sheet.
-To insert a 
manual line break in a cell, click in the cell, and then press CommandCtrl+Enter.
-To delete the 
contents of selected cells, press Backspace. This opens the Delete Contents 
dialog, where you choose which contents of the cell you want to delete. To 
delete the contents of selected cells without a dialog, press the Delete 
key.
-Navigating in Spreadsheets
-
-
-
-Shortcut 
Keys
-
-
-
-Effect
-
-
-
-
-
-CommandCtrl+Home
-
-
-Moves the 
cursor to the first cell in the sheet (A1).
-
-
-
-
-CommandCtrl+End
-
-
-Moves the 
cursor to the last cell on the sheet that contains data.
-
-
-
-
-Home
-
-
-Moves the 
cursor to the first cell of the current row.
-
-
-
-
-End
-
-
-Moves the 
cursor to the last cell of the current row.
-
-
-
-
-Shift+Home
-
-
-Selects 
cells from the current cell to the first cell of the current row.
-
-
-
-
-Shift+End
-
-
-Selects 
cells from the current cell to the last cell of the current row.
-
-
-
-
-Shift+Page 
Up
-
-
-Selects 
cells from the current cell up to one page in the current column or extends the 
existing selection one page up.
-
-
-
-
-Shift+Page 
Down
-
-
-Selects 
cells from the current cell down to one page in the current column or extends 
the existing selection one page down.
-
-
-
-
-Shift+Space
-
-
-Selects the current row or extends the existing selection to 
all respective rows.
-
-
-
-
-CommandCtrl+Space
-
-
-Selects the current column or extends the existing selection 
to all respective columns.
-
-
-
-
-CommandCtrl+Shift+Space
-
-
-Selects all cells in the sheet.
-
-
-
-
-CommandCtrl+Left
 Arrow
-
-
-Moves 
the cursor leftward to the start and end of cell blocks with data. If the cell 
to the left of the cursor is empty or the cell with cursor is empty, cursor 
moves leftward in row to the next cell with contents. If the row on the left of 
the cursor is empty, the cursor moves to then first cell in the row.
-
-
-
-
-CommandCtrl+Right
 Arrow
-
-
-Moves 
the cursor rightward to the start and end of cell blocks with contents. If the 
cell to the right of the cursor is empty or the cursor is in an empty cell, the 
cursor moves rightward to the next cell that contains data. If the row on the 
right of the cursor is empty, the cursor moves to the last cell in the 
row.
-
-
-
-
-CommandCtrl+Up
 Arrow
-
-
-Moves 
the cursor upward to the start and end of cell blocks with data. If the cell 
above the cursor is empty or the cursor is in an empty cell, the cursor moves 
up to the end of next cell block with data. If the column above the cursor is 
empty, the cursor moves up t

Re: Why is PolyPolygonShape excluded from DML export?

2021-08-24 Thread Regina Henschel

Hi Miklos, hi all,

Excluding polygon shapes from DML export (done as fix for tdf#75254) is 
no longer needed. But I'm still unsure whether to remove this restriction.


Pro:
Polygon shapes are already exported as DML in Impress and Calc. So the 
behavior would become consistent.
Polygon shapes could use the same improvements in wrapping as made for 
Bézier curves.


Contra:
On reopening the polygon shape would be converted to a custom shape. 
That means, that the user can no longer edit the points. Having only VML 
in the file opens the shape as PolyPolygonShape which allows point editing.


So what to you suggest?

Kind regards
Regina



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

2021-08-24 Thread Stephan Bergmann (via logerrit)
 oox/source/vml/vmlformatting.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit b0ca5311972e90f7059f55b9026584a43de49211
Author: Stephan Bergmann 
AuthorDate: Tue Aug 24 12:21:29 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Aug 24 15:06:03 2021 +0200

Avoid overflowing floating-point -> integer conversion

...seen at  with recently-
introduced sw/qa/core/data/ooxml/fail/ofz37458-1.docx during
CppunitTest_sw_filters_test,

> /oox/source/vml/vmlformatting.cxx:202:38: runtime error: 6.40969e+23 is 
outside the range of representable values of type 'long'
> #0 0x2b40e7a68a1e in 
oox::vml::ConversionHelper::decodeMeasureToEmu(oox::GraphicHelper const&, 
rtl::OUString const&, int, bool, bool) /oox/source/vml/vmlformatting.cxx:202:38
> #1 0x2b40e7a68cf1 in 
oox::vml::ConversionHelper::decodeMeasureToHmm(oox::GraphicHelper const&, 
rtl::OUString const&, int, bool, bool) /oox/source/vml/vmlformatting.cxx:208:47
> #2 0x2b40e7bc3bb7 in 
oox::vml::TextBoxContext::TextBoxContext(oox::core::ContextHandler2Helper 
const&, oox::vml::TextBox&, oox::AttributeList const&, oox::GraphicHelper 
const&) /oox/source/vml/vmltextboxcontext.cxx:190:39
> #3 0x2b40e7b3190f in oox::vml::ShapeContext::onCreateContext(int, 
oox::AttributeList const&) /oox/source/vml/vmlshapecontext.cxx:526:24
> #4 0x2b40e7b34ee9 in 
oox::vml::RectangleShapeContext::onCreateContext(int, oox::AttributeList 
const&) /oox/source/vml/vmlshapecontext.cxx:639:26
> #5 0x2b40e7b34f42 in non-virtual thunk to 
oox::vml::RectangleShapeContext::onCreateContext(int, oox::AttributeList 
const&) /oox/source/vml/vmlshapecontext.cxx
> #6 0x2b40e5fdae26 in 
oox::core::ContextHandler2Helper::implCreateChildContext(int, 
com::sun::star::uno::Reference 
const&) /oox/source/core/contexthandler2.cxx:100:34
> #7 0x2b40e5fddffb in 
oox::core::ContextHandler2::createFastChildContext(int, 
com::sun::star::uno::Reference 
const&) /oox/source/core/contexthandler2.cxx:204:12
> #8 0x2b40e5fdfb32 in non-virtual thunk to 
oox::core::ContextHandler2::createFastChildContext(int, 
com::sun::star::uno::Reference 
const&) /oox/source/core/contexthandler2.cxx
> #9 0x2b40fe645540 in 
writerfilter::ooxml::OOXMLFastContextHandlerWrapper::lcl_createFastChildContext(int,
 com::sun::star::uno::Reference 
const&) /writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:2006:38
> #10 0x2b40fe60a6a4 in 
writerfilter::ooxml::OOXMLFastContextHandler::createFastChildContext(int, 
com::sun::star::uno::Reference 
const&) /writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:254:21
> #11 0x2b40fe60a942 in non-virtual thunk to 
writerfilter::ooxml::OOXMLFastContextHandler::createFastChildContext(int, 
com::sun::star::uno::Reference 
const&) /writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
> #12 0x2b40ca28e9de in (anonymous 
namespace)::Entity::startElement((anonymous namespace)::Event const*) 
/sax/source/fastparser/fastparser.cxx:465:44
> #13 0x2b40ca2899ed in 
sax_fastparser::FastSaxParserImpl::callbackStartElement(unsigned char const*, 
unsigned char const*, unsigned char const*, int, unsigned char const**, int, 
unsigned char const**) /sax/source/fastparser/fastparser.cxx:1306:21

Apparently lacking a general concept to report failure for too-large input
values here, just silently do a saturating conversation, as seems to be the
general approach for this kind of filter code.

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

diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 0fca9b06a017..b7dc37b5e940 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -20,6 +20,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 
@@ -29,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -199,7 +201,14 @@ sal_Int64 ConversionHelper::decodeMeasureToEmu( const 
GraphicHelper& rGraphicHel
 OSL_FAIL( "ConversionHelper::decodeMeasureToEmu - unknown measure 
unit" );
 fValue = nRefValue;
 }
-return static_cast< sal_Int64 >( fValue + 0.5 );
+fValue += 0.5;
+if (!o3tl::convertsToAtMost(fValue, 
std::numeric_limits::max())) {
+return std::numeric_limits::max();
+}
+if (!o3tl::convertsToAtLeast(fValue, 
std::numeric_limits::min())) {
+return std::numeric_limits::min();
+}
+return static_cast< sal_Int64 >( fValue );
 }
 
 sal_Int32 ConversionHelper::decodeMeasureToHmm( const GraphicHelper& 
rGraphicHelper,


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

2021-08-24 Thread Dennis Francis (via logerrit)
 sc/source/filter/oox/richstring.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 24dda8e7ac8b15baf51a7060dab4b3d8bcfa4f9f
Author: Dennis Francis 
AuthorDate: Mon Aug 23 10:40:09 2021 +0530
Commit: Andras Timar 
CommitDate: Tue Aug 24 14:52:44 2021 +0200

cid#1490403: fix wrong initial flag bFound

Change-Id: I502653985e54c82198034534bb878d06787f8c94
Signed-off-by: Dennis Francis 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120729
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sc/source/filter/oox/richstring.cxx 
b/sc/source/filter/oox/richstring.cxx
index 7f8809824caa..294fddfbc86a 100644
--- a/sc/source/filter/oox/richstring.cxx
+++ b/sc/source/filter/oox/richstring.cxx
@@ -85,7 +85,7 @@ OUString lcl_unEscapeUnicodeChars(const OUString& rSrc)
 return rSrc;
 
 sal_Int32 nStart = 0;
-bool bFound = true;
+bool bFound = false;
 const OUString aPrefix = "_x";
 sal_Int32 nPrefixStart = rSrc.indexOf(aPrefix, nStart);
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 15 commits - config_host/config_oauth2.h.in connectivity/source cui/source extensions/source extensions/uiconfig external/libcmis in

2021-08-24 Thread Caolán McNamara (via logerrit)
Rebased ref, commits from common ancestor:
commit ccc30eda6774eb99adc537f9747097e1e8a74b21
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 16:55:27 2021 +0100
Commit: Andras Timar 
CommitDate: Tue Aug 24 14:50:53 2021 +0200

rhbz#1996735 SwEditShell::GetCorrection can return null

Though the exact steps to reproduce are unknown. From the text seen in
the backtrace the language is possibly Finnish in which case voikko is
probably the spellchecking backend in use.

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

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 7fa40dba919e..7f000e1a59f1 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1490,7 +1490,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
 else if (sApplyText == "Spelling")
 {
 SwRect aToFill;
-uno::Reference< linguistic2::XSpellAlternatives >  xSpellAlt( 
rWrtSh.GetCorrection(nullptr, aToFill) );
+uno::Reference  
xSpellAlt(rWrtSh.GetCorrection(nullptr, aToFill));
+if (!xSpellAlt.is())
+return;
 uno::Reference< linguistic2::XDictionary > xDictionary = 
LinguMgr::GetIgnoreAllList();
 OUString sWord(xSpellAlt->getWord());
 linguistic::DictionaryError nAddRes = linguistic::AddEntryToDic( 
xDictionary,
commit a9d94a12d32f6e2a6bf9c459caa59c8327b64ff5
Author: Christian Lohmaier 
AuthorDate: Tue Aug 24 13:48:33 2021 +0200
Commit: Andras Timar 
CommitDate: Tue Aug 24 14:50:53 2021 +0200

Update git submodules

* Update translations from branch 'distro/collabora/co-2021'
  to 96ffb24921d7e554a3a353580b720915a95d2740
  - update translations for 7.1.6 rc1

and force-fix errors using pocheck

Change-Id: I01602df1c63103029e3c9198db5e7032addf89c2

  - update translations for 7.1.5 rc2

and force-fix errors using pocheck

Change-Id: I42501f3274956b38075932f254e33d4643a3040f

diff --git a/translations b/translations
index 5e70d5e11c07..96ffb24921d7 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 5e70d5e11c077090f4c8d43ca9816842bbdd6c6a
+Subproject commit 96ffb24921d7e554a3a353580b720915a95d2740
commit 16005bc2f2fa01e95d8a4863e336cac96a78433e
Author: Christian Lohmaier 
AuthorDate: Tue Feb 16 14:07:34 2021 +0100
Commit: Andras Timar 
CommitDate: Tue Aug 24 14:50:53 2021 +0200

tdf#101630 - gdrive support w/oAuth and Drive API v3

LibreOffice is only using drive.file scope, so can only see files it
owns/that were created by LibreOffice.

In addition, also store the refresh token in LO's password-store if the
user enabled persistent storage, removing the need to to the
copy'n'paste dance to grant access each time LO is launched.

related tdf#115643 also store the refresh token for onedrive
consolidate the fallback-auth provides for onedrive/gdrive into one,
they are all the same login in browser, then copy code method that
ultimately should be changed to having LO listen on local port for the
code

Change-Id: I97e3843682c302d2884e35ece6e72bc3a07e2539
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119572
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 73041de9563c9a973d1b5394c6e5520a7d799980)

fix install with  --disable-cmis

Change-Id: I51430a860a0b5047b566ed8184f0f563ec54f288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119661
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 299b72e4c9ad239d747e47eaf004400f5a590695)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120544

diff --git a/Repository.mk b/Repository.mk
index e056cbfce29f..2149816fe461 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -432,7 +432,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
ucpexpand1 \
ucpext \
ucpimage \
-   ucpcmis1 \
+   $(if $(ENABLE_LIBCMIS),ucpcmis1) \
ucptdoc1 \
unordf \
unoxml \
diff --git a/config_host/config_oauth2.h.in b/config_host/config_oauth2.h.in
index a95015b41f3e..9945dda3dda5 100644
--- a/config_host/config_oauth2.h.in
+++ b/config_host/config_oauth2.h.in
@@ -15,13 +15,13 @@
 
 
 /* Google Drive settings */
-#define GDRIVE_BASE_URL "https://www.googleapis.com/drive/v2";
+#define GDRIVE_BASE_URL "https://www.googleapis.com/drive/v3";
 #define GDRIVE_CLIENT_ID ""
 #define GDRIVE_CLIENT_SECRET ""
-#define GDRIVE_AUTH_URL "https://accounts.google.com/o/oauth2/auth";
-#define GDRIVE_TOKEN_URL "https://accounts.google.com/o/oauth2/token";
+#define GDRIVE_AUTH_URL "https://accounts.google.com/o/oauth2/v2/auth";
+#define G

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

2021-08-24 Thread Noel Grandin (via logerrit)
 sfx2/source/notify/globalevents.cxx |  134 ++--
 1 file changed, 68 insertions(+), 66 deletions(-)

New commits:
commit 8122c82d90117fc0c4c8ea87aa7f771d5e92bf36
Author: Noel Grandin 
AuthorDate: Sun Aug 22 21:11:08 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Aug 24 14:43:25 2021 +0200

osl::Mutex->std::mutex in SfxGlobalEvents_Impl

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

diff --git a/sfx2/source/notify/globalevents.cxx 
b/sfx2/source/notify/globalevents.cxx
index 2176c327243f..3982fbecdb33 100644
--- a/sfx2/source/notify/globalevents.cxx
+++ b/sfx2/source/notify/globalevents.cxx
@@ -32,7 +32,7 @@
 #include 
 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -41,6 +41,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -48,28 +49,22 @@ using namespace css;
 
 namespace {
 
-struct ModelCollectionMutexBase
-{
-public:
-osl::Mutex m_aLock;
-};
-
 typedef ::std::vector< css::uno::Reference< css::frame::XModel > > TModelList;
 
 
 //TODO: remove support of obsolete document::XEventBroadcaster/Listener
-class SfxGlobalEvents_Impl : public ModelCollectionMutexBase
-   , public ::cppu::WeakImplHelper< 
css::lang::XServiceInfo
+class SfxGlobalEvents_Impl : public ::cppu::WeakImplHelper< 
css::lang::XServiceInfo
, 
css::frame::XGlobalEventBroadcaster
, 
css::document::XEventBroadcaster
, 
css::document::XEventListener
, 
css::lang::XComponent
 >
 {
+std::mutex m_aLock;
 css::uno::Reference< css::container::XNameReplace > m_xEvents;
 css::uno::Reference< css::document::XEventListener > 
m_xJobExecutorListener;
-::comphelper::OInterfaceContainerHelper2 m_aLegacyListeners;
-::comphelper::OInterfaceContainerHelper2 m_aDocumentListeners;
+::comphelper::OInterfaceContainerHelper4 
m_aLegacyListeners;
+::comphelper::OInterfaceContainerHelper4 
m_aDocumentListeners;
 std::multiset> 
m_disposeListeners;
 TModelList m_lModels;
 bool m_disposed;
@@ -150,10 +145,7 @@ private:
 };
 
 SfxGlobalEvents_Impl::SfxGlobalEvents_Impl( const uno::Reference < 
uno::XComponentContext >& rxContext)
-: ModelCollectionMutexBase(   )
-, m_xJobExecutorListener( task::theJobExecutor::get( rxContext ), 
uno::UNO_QUERY_THROW )
-, m_aLegacyListeners  (m_aLock)
-, m_aDocumentListeners(m_aLock)
+: m_xJobExecutorListener( task::theJobExecutor::get( rxContext ), 
uno::UNO_QUERY_THROW )
 , m_disposed(false)
 {
 osl_atomic_increment(&m_refCount);
@@ -165,7 +157,7 @@ SfxGlobalEvents_Impl::SfxGlobalEvents_Impl( const 
uno::Reference < uno::XCompone
 uno::Reference< container::XNameReplace > SAL_CALL 
SfxGlobalEvents_Impl::getEvents()
 {
 // SAFE ->
-osl::MutexGuard aLock(m_aLock);
+std::scoped_lock aLock(m_aLock);
 if (m_disposed) {
 throw css::lang::DisposedException();
 }
@@ -176,55 +168,33 @@ uno::Reference< container::XNameReplace > SAL_CALL 
SfxGlobalEvents_Impl::getEven
 
 void SAL_CALL SfxGlobalEvents_Impl::addEventListener(const uno::Reference< 
document::XEventListener >& xListener)
 {
-{
-osl::MutexGuard g(m_aLock);
-if (m_disposed) {
-throw css::lang::DisposedException();
-}
-}
-// container is threadsafe
+std::scoped_lock g(m_aLock);
+if (m_disposed)
+throw css::lang::DisposedException();
 m_aLegacyListeners.addInterface(xListener);
-// Take care of an XComponent::dispose being processed in parallel with 
the above addInterface:
-{
-osl::MutexGuard g(m_aLock);
-if (!m_disposed) {
-return;
-}
-}
-m_aLegacyListeners.disposeAndClear({static_cast(this)});
 }
 
 
 void SAL_CALL SfxGlobalEvents_Impl::removeEventListener(const uno::Reference< 
document::XEventListener >& xListener)
 {
-// The below removeInterface will silently do nothing when m_disposed:
-// container is threadsafe
+std::scoped_lock g(m_aLock);
+// The below removeInterface will silently do nothing when m_disposed
 m_aLegacyListeners.removeInterface(xListener);
 }
 
 
 void SAL_CALL SfxGlobalEvents_Impl::addDocumentEventListener( const 
uno::Reference< document::XDocumentEventListener >& Listener )
 {
-{
-osl::MutexGuard g(m_aLock);
-if (m_disposed) {
-throw css::lang::DisposedException();
-}
-}
+std::scoped_lock g(m_aLock);
+if (m_disposed)
+throw css::lang::DisposedException();
 m_aDocumentListeners.addInterface( Listener );
-//

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

2021-08-24 Thread Noel Grandin (via logerrit)
 sfx2/source/view/viewimp.hxx |   10 ++
 sfx2/source/view/viewsh.cxx  |   14 +-
 2 files changed, 15 insertions(+), 9 deletions(-)

New commits:
commit d7453ed1d3ede8c34bdd5f3bf9b642a3734de0d2
Author: Noel Grandin 
AuthorDate: Mon Aug 23 17:03:21 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Aug 24 14:41:21 2021 +0200

osl::Mutex->std::mutex in SfxViewShell_Impl

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

diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index f4d3bb6b6f10..cf6892dec4e9 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -20,10 +20,11 @@
 #ifndef INCLUDED_SFX2_SOURCE_VIEW_VIEWIMP_HXX
 #define INCLUDED_SFX2_SOURCE_VIEW_VIEWIMP_HXX
 
+#include 
 #include 
 #include 
-#include 
-#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -35,8 +36,9 @@ class SfxClipboardChangeListener;
 
 struct SfxViewShell_Impl
 {
-::osl::Mutex aMutex;
-::comphelper::OInterfaceContainerHelper2 aInterceptorContainer;
+std::mutex aMutex;
+::comphelper::OInterfaceContainerHelper4
+aInterceptorContainer;
 SfxShellArr_Impl aArr;
 Size aMargin;
 bool m_bHasPrintOptions;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index c58f5b2fdbd8..920ffd6090a1 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -219,7 +219,7 @@ void SAL_CALL SfxClipboardChangeListener::changedContents( 
const datatransfer::c
 sal_uInt32 SfxViewShell_Impl::m_nLastViewShellId = 0;
 
 SfxViewShell_Impl::SfxViewShell_Impl(SfxViewShellFlags const nFlags, 
ViewShellDocId nDocId)
-: aInterceptorContainer( aMutex )
+: aInterceptorContainer()
 ,   m_bHasPrintOptions(nFlags & SfxViewShellFlags::HAS_PRINTOPTIONS)
 ,   m_nFamily(0x)   // undefined, default set by TemplateDialog
 ,   m_pLibreOfficeKitViewCallback(nullptr)
@@ -1846,7 +1846,9 @@ bool SfxViewShell::TryContextMenuInterception( Menu& rIn, 
const OUString& rMenuI
 aEvent.Selection.set( GetController(), uno::UNO_QUERY );
 
 // call interceptors
-::comphelper::OInterfaceIteratorHelper2 aIt( pImpl->aInterceptorContainer 
);
+std::unique_lock g(pImpl->aMutex);
+::comphelper::OInterfaceIteratorHelper4 aIt( pImpl->aInterceptorContainer 
);
+g.unlock();
 while( aIt.hasMoreElements() )
 {
 try
@@ -1854,7 +1856,7 @@ bool SfxViewShell::TryContextMenuInterception( Menu& rIn, 
const OUString& rMenuI
 ui::ContextMenuInterceptorAction eAction;
 {
 SolarMutexReleaser rel;
-eAction = 
static_cast(aIt.next())->notifyContextMenuExecute(
 aEvent );
+eAction = aIt.next()->notifyContextMenuExecute( aEvent );
 }
 switch ( eAction )
 {
@@ -1908,7 +1910,9 @@ bool SfxViewShell::TryContextMenuInterception( Menu& 
rMenu, const OUString& rMen
 aEvent.Selection = css::uno::Reference< css::view::XSelectionSupplier >( 
GetController(), css::uno::UNO_QUERY );
 
 // call interceptors
-::comphelper::OInterfaceIteratorHelper2 aIt( pImpl->aInterceptorContainer 
);
+std::unique_lock g(pImpl->aMutex);
+::comphelper::OInterfaceIteratorHelper4 aIt( pImpl->aInterceptorContainer 
);
+g.unlock();
 while( aIt.hasMoreElements() )
 {
 try
@@ -1916,7 +1920,7 @@ bool SfxViewShell::TryContextMenuInterception( Menu& 
rMenu, const OUString& rMen
 css::ui::ContextMenuInterceptorAction eAction;
 {
 SolarMutexReleaser rel;
-eAction = static_cast< css::ui::XContextMenuInterceptor* >( 
aIt.next() )->notifyContextMenuExecute( aEvent );
+eAction = aIt.next()->notifyContextMenuExecute( aEvent );
 }
 switch ( eAction )
 {


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

2021-08-24 Thread Anshu (via logerrit)
 sfx2/source/dialog/StyleList.cxx |   51 +--
 sfx2/source/dialog/templdlg.cxx  |   36 ---
 sfx2/source/dialog/tplcitem.cxx  |   10 +++
 sfx2/source/inc/StyleList.hxx|5 +++
 sfx2/source/inc/templdgi.hxx |   12 -
 5 files changed, 75 insertions(+), 39 deletions(-)

New commits:
commit ed31f9818d1c1e6ba44fa8695d215697ad27713c
Author: Anshu 
AuthorDate: Sun Aug 22 20:26:18 2021 +0530
Commit: Mike Kaganski 
CommitDate: Tue Aug 24 14:31:40 2021 +0200

Refactoring Patch

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

diff --git a/sfx2/source/dialog/StyleList.cxx b/sfx2/source/dialog/StyleList.cxx
index 88f251046d09..9899417ec9ef 100644
--- a/sfx2/source/dialog/StyleList.cxx
+++ b/sfx2/source/dialog/StyleList.cxx
@@ -393,7 +393,7 @@ void StyleList::UpdateFamily()
 
 m_bTreeDrag = true;
 m_bCanNew = m_xTreeBox->get_visible() || m_xFmtLb->count_selected_rows() 
<= 1;
-m_pParentDialog->EnableNew(m_bCanNew);
+m_pParentDialog->EnableNew(m_bCanNew, this);
 m_bTreeDrag = true;
 if (m_pStyleSheetPool)
 {
@@ -472,7 +472,8 @@ IMPL_LINK(StyleList, ExecuteDrop, const ExecuteDropEvent&, 
rEvt, sal_Int8)
 if (aDesc.maClassName == pDocShell->GetFactory().GetClassId())
 {
 Application::PostUserEvent(
-LINK(m_pParentDialog, SfxCommonTemplateDialog_Impl, 
OnAsyncExecuteDrop));
+LINK(m_pParentDialog, SfxCommonTemplateDialog_Impl, 
OnAsyncExecuteDrop),
+this);
 
 bFormatFound = true;
 nRet = rEvt.mnAction;
@@ -826,15 +827,15 @@ void StyleList::SelectStyle(const OUString& rStr, bool 
bIsCallback)
 if (pStyle)
 {
 bool bReadWrite = !(pStyle->GetMask() & SfxStyleSearchBits::ReadOnly);
-m_pParentDialog->EnableEdit(bReadWrite);
-m_pParentDialog->EnableHide(bReadWrite && !pStyle->IsHidden() && 
!pStyle->IsUsed());
-m_pParentDialog->EnableShow(bReadWrite && pStyle->IsHidden());
+m_pParentDialog->EnableEdit(bReadWrite, this);
+m_pParentDialog->EnableHide(bReadWrite && !pStyle->IsHidden() && 
!pStyle->IsUsed(), this);
+m_pParentDialog->EnableShow(bReadWrite && pStyle->IsHidden(), this);
 }
 else
 {
-m_pParentDialog->EnableEdit(false);
-m_pParentDialog->EnableHide(false);
-m_pParentDialog->EnableShow(false);
+m_pParentDialog->EnableEdit(false, this);
+m_pParentDialog->EnableHide(false, this);
+m_pParentDialog->EnableShow(false, this);
 }
 
 if (!bIsCallback)
@@ -893,9 +894,9 @@ void StyleList::SelectStyle(const OUString& rStr, bool 
bIsCallback)
 if (!bSelect)
 {
 m_xFmtLb->unselect_all();
-m_pParentDialog->EnableEdit(false);
-m_pParentDialog->EnableHide(false);
-m_pParentDialog->EnableShow(false);
+m_pParentDialog->EnableEdit(false, this);
+m_pParentDialog->EnableHide(false, this);
+m_pParentDialog->EnableShow(false, this);
 }
 }
 }
@@ -1352,7 +1353,7 @@ IMPL_LINK_NOARG(StyleList, EnableDelete, void*, void)
 }
 }
 }
-m_pParentDialog->EnableDel(bEnableDelete);
+m_pParentDialog->EnableDel(bEnableDelete, this);
 }
 
 IMPL_LINK_NOARG(StyleList, Clear, void*, void)
@@ -1418,16 +1419,16 @@ void StyleList::Notify(SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint)
 if (pStyle)
 {
 bool bReadWrite = !(pStyle->GetMask() & 
SfxStyleSearchBits::ReadOnly);
-m_pParentDialog->EnableEdit(bReadWrite);
-m_pParentDialog->EnableHide(bReadWrite && 
!pStyle->IsUsed()
-&& !pStyle->IsHidden());
-m_pParentDialog->EnableShow(bReadWrite && 
pStyle->IsHidden());
+m_pParentDialog->EnableEdit(bReadWrite, this);
+m_pParentDialog->EnableHide(
+bReadWrite && !pStyle->IsUsed() && 
!pStyle->IsHidden(), this);
+m_pParentDialog->EnableShow(bReadWrite && 
pStyle->IsHidden(), this);
 }
 else
 {
-m_pParentDialog->EnableEdit(false);
-m_pParentDialog->EnableHide(false);
-m_pParentDialog->EnableShow(false);
+m_pParentDialog->EnableEdit(false, this);
+m_pParentDialog->EnableHide(false, this);
+m_pParentDialog->EnableShow(false, this);
 }
 

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

2021-08-24 Thread Heiko Tietze (via logerrit)
 sw/uiconfig/swriter/ui/frmtypepage.ui |   28 
 1 file changed, 28 insertions(+)

New commits:
commit dd5039ceea319ebfc72a3e032753b22538add12e
Author: Heiko Tietze 
AuthorDate: Tue Aug 24 11:14:46 2021 +0200
Commit: Heiko Tietze 
CommitDate: Tue Aug 24 14:30:25 2021 +0200

Resolves tdf#143633 - Image size wrong after disabling relative image width

Adjustments added back, missing from 
3cbecf3d0d9d68de286589e153ee31f8f709be03

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

diff --git a/sw/uiconfig/swriter/ui/frmtypepage.ui 
b/sw/uiconfig/swriter/ui/frmtypepage.ui
index 8907287b4e64..46df71aa8685 100644
--- a/sw/uiconfig/swriter/ui/frmtypepage.ui
+++ b/sw/uiconfig/swriter/ui/frmtypepage.ui
@@ -2,6 +2,30 @@
 
 
   
+  
+0.05
+100
+1
+10
+  
+  
+-100
+100
+1
+10
+  
+  
+0.05
+100
+1
+10
+  
+  
+-100
+100
+1
+10
+  
   
   
 True
@@ -83,6 +107,7 @@
 start
 True
 True
+adjustment1
 2
 
   
@@ -199,6 +224,7 @@
 start
 True
 True
+adjustment2
 2
 
   
@@ -568,6 +594,7 @@
 True
 True
 True
+adjustment3
 2
 
   
@@ -645,6 +672,7 @@
 True
 True
 True
+adjustment4
 2
 
   


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/shells/textsh1.cxx |4 +++-
 translations|2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 5ca39a9bd3ad005495eaede1755e20ff3e1a699f
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 16:55:27 2021 +0100
Commit: Andras Timar 
CommitDate: Tue Aug 24 13:48:56 2021 +0200

rhbz#1996735 SwEditShell::GetCorrection can return null

Though the exact steps to reproduce are unknown. From the text seen in
the backtrace the language is possibly Finnish in which case voikko is
probably the spellchecking backend in use.

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

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 7fa40dba919e..7f000e1a59f1 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1490,7 +1490,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
 else if (sApplyText == "Spelling")
 {
 SwRect aToFill;
-uno::Reference< linguistic2::XSpellAlternatives >  xSpellAlt( 
rWrtSh.GetCorrection(nullptr, aToFill) );
+uno::Reference  
xSpellAlt(rWrtSh.GetCorrection(nullptr, aToFill));
+if (!xSpellAlt.is())
+return;
 uno::Reference< linguistic2::XDictionary > xDictionary = 
LinguMgr::GetIgnoreAllList();
 OUString sWord(xSpellAlt->getWord());
 linguistic::DictionaryError nAddRes = linguistic::AddEntryToDic( 
xDictionary,
commit 2f8285c3d4dd4f9430300c52c248edec4d799682
Author: Christian Lohmaier 
AuthorDate: Tue Aug 24 13:48:33 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Aug 24 13:48:33 2021 +0200

Update git submodules

* Update translations from branch 'distro/collabora/co-2021'
  to 96ffb24921d7e554a3a353580b720915a95d2740
  - update translations for 7.1.6 rc1

and force-fix errors using pocheck

Change-Id: I01602df1c63103029e3c9198db5e7032addf89c2

  - update translations for 7.1.5 rc2

and force-fix errors using pocheck

Change-Id: I42501f3274956b38075932f254e33d4643a3040f

diff --git a/translations b/translations
index 5e70d5e11c07..96ffb24921d7 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 5e70d5e11c077090f4c8d43ca9816842bbdd6c6a
+Subproject commit 96ffb24921d7e554a3a353580b720915a95d2740


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

2021-08-24 Thread Mike Kaganski (via logerrit)
 comphelper/source/misc/configuration.cxx |   24 +---
 include/comphelper/configuration.hxx |5 ++---
 2 files changed, 11 insertions(+), 18 deletions(-)

New commits:
commit 97b7511acfd9593051a611c71d307916097256dd
Author: Mike Kaganski 
AuthorDate: Tue Aug 24 09:49:56 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue Aug 24 13:41:17 2021 +0200

Simplify caching in ConfigurationWrapper

A follow-up to 48c2f0b4b157e133605c99549893521775ede4da
This allows to not call createInstanceWithArguments repeatedly.

Change-Id: I1893b9b1b0f952ae7c650bab4fb0dfe2f331a129
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120883
Reviewed-by: Noel Grandin 
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/comphelper/source/misc/configuration.cxx 
b/comphelper/source/misc/configuration.cxx
index 3e8bb31ebb8a..67009cd9f864 100644
--- a/comphelper/source/misc/configuration.cxx
+++ b/comphelper/source/misc/configuration.cxx
@@ -15,7 +15,6 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -131,8 +130,7 @@ bool 
comphelper::detail::ConfigurationWrapper::isReadOnly(OUString const & path)
 != 0;
 }
 
-css::uno::Any 
comphelper::detail::ConfigurationWrapper::getPropertyValue(css::uno::Reference< 
css::uno::XComponentContext >  const & context,
-OUString const & path)
+css::uno::Any 
comphelper::detail::ConfigurationWrapper::getPropertyValue(OUString const& 
path) const
 {
 // Cache the configuration access, since some of the keys are used in hot 
code.
 // Note that this cache is only used by the officecfg:: auto-generated 
code, using it for anything
@@ -149,18 +147,14 @@ css::uno::Any 
comphelper::detail::ConfigurationWrapper::getPropertyValue(css::un
 
 // check cache
 auto it = gAccessMap.find(parentPath);
-if (it != gAccessMap.end())
-return it->second->getByName(childName);
-
-// not in the cache, look it up
-css::uno::Reference< css::lang::XMultiServiceFactory > provider = 
css::configuration::theDefaultProvider::get(
-context );
-css::uno::Any arg(css::beans::NamedValue("nodepath", 
css::uno::Any(parentPath)));
-css::uno::Reference< css::container::XNameAccess > 
access(provider->createInstanceWithArguments(
-"com.sun.star.configuration.ConfigurationAccess",
-{ arg }), css::uno::UNO_QUERY_THROW);
-gAccessMap.emplace(parentPath, access);
-return access->getByName(childName);
+if (it == gAccessMap.end())
+{
+// not in the cache, look it up
+css::uno::Reference access(
+access_->getByHierarchicalName(parentPath), 
css::uno::UNO_QUERY_THROW);
+it = gAccessMap.emplace(parentPath, access).first;
+}
+return it->second->getByName(childName);
 }
 
 void comphelper::detail::ConfigurationWrapper::setPropertyValue(
diff --git a/include/comphelper/configuration.hxx 
b/include/comphelper/configuration.hxx
index 27344e7a3672..1ed37dcd45c3 100644
--- a/include/comphelper/configuration.hxx
+++ b/include/comphelper/configuration.hxx
@@ -97,8 +97,7 @@ public:
 
 bool isReadOnly(OUString const & path) const;
 
-static css::uno::Any getPropertyValue(css::uno::Reference< 
css::uno::XComponentContext >  const & context,
-OUString const & path);
+css::uno::Any getPropertyValue(OUString const & path) const;
 
 static void setPropertyValue(
 std::shared_ptr< ConfigurationChanges > const & batch,
@@ -211,7 +210,7 @@ template< typename T, typename U > struct 
ConfigurationProperty
 // Folding this into one statement causes a bogus error at least with
 // Red Hat GCC 4.6.2-1:
 css::uno::Any a(
-detail::ConfigurationWrapper::getPropertyValue(context,
+detail::ConfigurationWrapper::get(context).getPropertyValue(
 T::path()));
 return detail::Convert< U >::fromAny(a);
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 14 commits - config_host/config_oauth2.h.in connectivity/source cui/source extensions/source extensions/uiconfig external/libcmis in

2021-08-24 Thread Christian Lohmaier (via logerrit)
 Repository.mk |2 
 config_host/config_oauth2.h.in|8 
 connectivity/source/drivers/mysqlc/mysqlc_general.cxx |4 
 cui/source/tabpages/transfrm.cxx  |2 
 extensions/source/propctrlr/propcontroller.cxx|4 
 extensions/source/propctrlr/standardcontrol.cxx   |   54 -
 extensions/source/propctrlr/standardcontrol.hxx   |   23 
 extensions/uiconfig/spropctrlr/ui/colorlistbox.ui |1 
 extensions/uiconfig/spropctrlr/ui/datefield.ui|   42 
 extensions/uiconfig/spropctrlr/ui/datetimefield.ui|1 
 external/libcmis/UnpackedTarball_libcmis.mk   |2 
 external/libcmis/libcmis_gdrive.patch.1   |  702 ++
 external/libcmis/libcmis_oauth_pw_as_refreshtoken.patch.1 |  185 +++
 include/svtools/ctrlbox.hxx   |4 
 officecfg/registry/data/org/openoffice/Office/Common.xcu  |2 
 sc/inc/compiler.hxx   |1 
 sc/qa/unit/data/ods/tdf143619_validationCirclePos.ods |binary
 sc/qa/unit/scshapetest.cxx|   34 
 sc/source/core/data/drwlayer.cxx  |7 
 sc/source/core/tool/compiler.cxx  |   37 
 sc/source/ui/docshell/impex.cxx   |   11 
 solenv/sanitizers/ui/modules/spropctrlr.suppr |2 
 svtools/source/control/ctrlbox.cxx|7 
 svtools/uiconfig/ui/calendar.ui   |4 
 svx/source/accessibility/ChildrenManagerImpl.cxx  |  135 +-
 sw/source/filter/ww8/ww8par.cxx   |3 
 sw/source/filter/ww8/ww8par.hxx   |3 
 sw/source/filter/ww8/ww8par2.cxx  |1 
 sw/source/uibase/shells/drawdlg.cxx   |9 
 sw/source/uibase/shells/drwbassh.cxx  |2 
 sw/source/uibase/sidebar/PageStylesPanel.cxx  |6 
 ucb/source/ucp/cmis/auth_provider.cxx |  130 +-
 ucb/source/ucp/cmis/auth_provider.hxx |8 
 ucb/source/ucp/cmis/cmis_content.cxx  |   21 
 ucb/source/ucp/cmis/cmis_repo_content.cxx |4 
 35 files changed, 1303 insertions(+), 158 deletions(-)

New commits:
commit 65421492f332fc18814ae57a86f4deb384821474
Author: Christian Lohmaier 
AuthorDate: Tue Feb 16 14:07:34 2021 +0100
Commit: Andras Timar 
CommitDate: Tue Aug 24 13:36:33 2021 +0200

tdf#101630 - gdrive support w/oAuth and Drive API v3

LibreOffice is only using drive.file scope, so can only see files it
owns/that were created by LibreOffice.

In addition, also store the refresh token in LO's password-store if the
user enabled persistent storage, removing the need to to the
copy'n'paste dance to grant access each time LO is launched.

related tdf#115643 also store the refresh token for onedrive
consolidate the fallback-auth provides for onedrive/gdrive into one,
they are all the same login in browser, then copy code method that
ultimately should be changed to having LO listen on local port for the
code

Change-Id: I97e3843682c302d2884e35ece6e72bc3a07e2539
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119572
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 73041de9563c9a973d1b5394c6e5520a7d799980)

fix install with  --disable-cmis

Change-Id: I51430a860a0b5047b566ed8184f0f563ec54f288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119661
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 299b72e4c9ad239d747e47eaf004400f5a590695)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120544

diff --git a/Repository.mk b/Repository.mk
index e056cbfce29f..2149816fe461 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -432,7 +432,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
ucpexpand1 \
ucpext \
ucpimage \
-   ucpcmis1 \
+   $(if $(ENABLE_LIBCMIS),ucpcmis1) \
ucptdoc1 \
unordf \
unoxml \
diff --git a/config_host/config_oauth2.h.in b/config_host/config_oauth2.h.in
index a95015b41f3e..9945dda3dda5 100644
--- a/config_host/config_oauth2.h.in
+++ b/config_host/config_oauth2.h.in
@@ -15,13 +15,13 @@
 
 
 /* Google Drive settings */
-#define GDRIVE_BASE_URL "https://www.googleapis.com/drive/v2";
+#define GDRIVE_BASE_URL "https://www.googleapis.com/drive/v3";
 #define GDRIVE_CLIENT_ID ""
 #define GDRIVE_CLIENT_SECRET ""
-#define GDRIVE_AUTH_URL "https://accounts.google.com/o/oauth2/auth";
-#define GDRIVE_TOKEN_URL "https://accounts.google.com/o/oauth2/token";
+#define GDRIVE_AUTH_URL "https://accounts.google.com/o/oauth2/v2/auth";
+#define GDRIVE_TOKEN_

[Libreoffice-commits] core.git: 2 commits - config_host/config_skia.h.in external/skia include/vcl vcl/inc vcl/Library_vclplug_osx.mk vcl/osx vcl/quartz vcl/README.vars vcl/skia vcl/source

2021-08-24 Thread Luboš Luňák (via logerrit)
 config_host/config_skia.h.in|3 
 external/skia/Library_skia.mk   |   12 -
 external/skia/share-grcontext.patch.1   |  297 +---
 external/skia/swap-buffers-rect.patch.1 |   16 -
 include/vcl/skia/SkiaHelper.hxx |3 
 vcl/Library_vclplug_osx.mk  |1 
 vcl/README.vars |2 
 vcl/inc/quartz/salgdi.h |5 
 vcl/inc/skia/gdiimpl.hxx|5 
 vcl/inc/skia/osx/gdiimpl.hxx|   12 -
 vcl/inc/skia/osx/rastercontext.hxx  |   42 
 vcl/inc/skia/utils.hxx  |4 
 vcl/inc/skia/win/gdiimpl.hxx|6 
 vcl/inc/skia/x11/gdiimpl.hxx|4 
 vcl/inc/strings.hrc |1 
 vcl/osx/salframe.cxx|2 
 vcl/quartz/salgdi.cxx   |   10 +
 vcl/skia/README |1 
 vcl/skia/SkiaHelper.cxx |  203 ++---
 vcl/skia/gdiimpl.cxx|   20 --
 vcl/skia/osx/gdiimpl.cxx|  103 ---
 vcl/skia/osx/rastercontext.cxx  |   51 -
 vcl/skia/win/gdiimpl.cxx|   17 +
 vcl/skia/x11/gdiimpl.cxx|   17 +
 vcl/skia/zone.cxx   |7 
 vcl/source/app/svapp.cxx|3 
 26 files changed, 593 insertions(+), 254 deletions(-)

New commits:
commit baed91bab05546f7f5233701bd7aaed44f25a364
Author: Luboš Luňák 
AuthorDate: Mon Aug 23 18:45:12 2021 +0200
Commit: Luboš Luňák 
CommitDate: Tue Aug 24 13:17:37 2021 +0200

implement explicit screen flushing also for Skia/Mac

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

diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index 5316db0ac1a3..211708dfd576 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -297,6 +297,8 @@ public:
ControlState nState,
const ImplControlValue &aValue) = 0;
 virtual void drawTextLayout(const GenericSalLayout& layout) = 0;
+virtual void Flush() {}
+virtual void Flush( const tools::Rectangle& ) {}
 protected:
 static bool performDrawNativeControl(ControlType nType,
  ControlPart nPart,
@@ -487,6 +489,9 @@ public:
 voidRefreshRect( const CGRect& ) {}
 #endif
 
+voidFlush();
+voidFlush( const tools::Rectangle& );
+
 voidUnsetState();
 // InvalidateContext does an UnsetState and sets mrContext to 0
 voidInvalidateContext();
diff --git a/vcl/inc/skia/osx/gdiimpl.hxx b/vcl/inc/skia/osx/gdiimpl.hxx
index ef1928bb3a0a..b9adccb370ea 100644
--- a/vcl/inc/skia/osx/gdiimpl.hxx
+++ b/vcl/inc/skia/osx/gdiimpl.hxx
@@ -42,6 +42,9 @@ public:
 
 virtual void drawTextLayout(const GenericSalLayout& layout) override;
 
+virtual void Flush() override;
+virtual void Flush(const tools::Rectangle&) override;
+
 private:
 virtual void createWindowSurfaceInternal(bool forceRaster = false) 
override;
 virtual void destroyWindowSurfaceInternal() override;
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 18263fa5ea46..5b3a7e665ff5 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -988,6 +988,7 @@ void AquaSalFrame::Flush()
 // => fall back to synchronous painting
 if( ImplGetSVData()->maAppData.mnDispatchLevel <= 0 )
 {
+mpGraphics->Flush();
 [mpNSView display];
 }
 }
@@ -1008,6 +1009,7 @@ void AquaSalFrame::Flush( const tools::Rectangle& rRect )
 // => fall back to synchronous painting
 if( ImplGetSVData()->maAppData.mnDispatchLevel <= 0 )
 {
+mpGraphics->Flush( rRect );
 [mpNSView display];
 }
 }
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index 1480c0fda6ab..358ae3881983 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -780,6 +780,16 @@ void AquaSalGraphics::FreeEmbedFontData( const void* 
pData, tools::Long /*nDataL
 SAL_WARN_IF( (pData==nullptr), "vcl", 
"AquaSalGraphics::FreeEmbedFontData() is not implemented");
 }
 
+void AquaSalGraphics::Flush()
+{
+mpBackend->Flush();
+}
+
+void AquaSalGraphics::Flush( const tools::Rectangle& rRect )
+{
+mpBackend->Flush( rRect );
+}
+
 #ifdef IOS
 
 bool AquaSharedAttributes::checkContext()
diff --git a/vcl/skia/osx/gdiimpl.cxx b/vcl/skia/osx/gdiimpl.cxx
index 0014a98a404d..4b771ad372bb 100644
--- a/vcl/skia/osx/gdiimpl.cxx
+++ b/vcl/skia/osx/gdiimpl.cxx
@@ -93,7 +93,9 @@ void AquaSkiaSalGraphicsImpl::destroyWindowSurfaceInternal()
 mSurface.reset();
 }
 
-//void AquaSkiaSalGraphicsImpl::Flush() { performFlush(); }
+void AquaSkiaSalGraphicsImpl::Flush() { performFlush(); }
+
+void AquaSki

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

2021-08-24 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/shells/textsh1.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 16186a8bed2d241b1dd5711637b9d4c07ca0e1e4
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 16:55:27 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 12:52:49 2021 +0200

rhbz#1996735 SwEditShell::GetCorrection can return null

Though the exact steps to reproduce are unknown. From the text seen in
the backtrace the language is possibly Finnish in which case voikko is
probably the spellchecking backend in use.

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

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 7ebde86a383c..416982ada3a9 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1500,7 +1500,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
 else if (sApplyText == "Spelling")
 {
 SwRect aToFill;
-uno::Reference< linguistic2::XSpellAlternatives >  xSpellAlt( 
rWrtSh.GetCorrection(nullptr, aToFill) );
+uno::Reference  
xSpellAlt(rWrtSh.GetCorrection(nullptr, aToFill));
+if (!xSpellAlt.is())
+return;
 uno::Reference< linguistic2::XDictionary > xDictionary = 
LinguMgr::GetIgnoreAllList();
 OUString sWord(xSpellAlt->getWord());
 linguistic::DictionaryError nAddRes = linguistic::AddEntryToDic( 
xDictionary,


[Libreoffice-commits] core.git: 2 commits - config_host/config_skia.h.in config_host.mk.in configure.ac external/skia vcl/inc vcl/skia

2021-08-24 Thread Luboš Luňák (via logerrit)
 config_host.mk.in   |1 
 config_host/config_skia.h.in|9 ++--
 configure.ac|   12 +
 external/skia/Library_skia.mk   |   65 
 external/skia/make-api-visible.patch.1  |   13 ++
 external/skia/swap-buffers-rect.patch.1 |   26 
 vcl/inc/skia/gdiimpl.hxx|2 
 vcl/inc/skia/utils.hxx  |2 
 vcl/skia/gdiimpl.cxx|   22 --
 vcl/skia/salbmp.cxx |6 +-
 10 files changed, 123 insertions(+), 35 deletions(-)

New commits:
commit ddcdc2077fab2b6d9c4def4e4615185411cbe80a
Author: Luboš Luňák 
AuthorDate: Wed Aug 18 19:26:45 2021 +0200
Commit: Luboš Luňák 
CommitDate: Tue Aug 24 12:52:39 2021 +0200

build Skia with Metal support

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

diff --git a/config_host.mk.in b/config_host.mk.in
index 6810660067b0..abda7d688540 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -550,6 +550,7 @@ export SERF_LIBS=$(gb_SPACE)@SERF_LIBS@
 export SHA256SUM=@SHA256SUM@
 export SHOWINCLUDES_PREFIX=@SHOWINCLUDES_PREFIX@
 export 
SKIA_DISABLE_VMA_USE_STL_SHARED_MUTEX=@SKIA_DISABLE_VMA_USE_STL_SHARED_MUTEX@
+export SKIA_GPU=@SKIA_GPU@
 export SOLARINC=@SOLARINC@
 export SORT=@SORT@
 export SPLIT_APP_MODULES=@SPLIT_APP_MODULES@
diff --git a/config_host/config_skia.h.in b/config_host/config_skia.h.in
index 10fd4374b9c5..1e003179291b 100644
--- a/config_host/config_skia.h.in
+++ b/config_host/config_skia.h.in
@@ -30,10 +30,13 @@ are the same.
 #define SKIA_USE_BITMAP32 0
 
 
-
-#define SK_SUPPORT_GPU 1
-
+// GPU support (set by configure).
+#undef SK_SUPPORT_GPU
+// Vulkan support enabled (set by configure).
+// temporary override
 #define SK_VULKAN 1
+// Metal support enabled (set by configure).
+#undef SK_METAL
 
 // Memory allocator for Vulkan.
 #define SK_USE_VMA 1
diff --git a/configure.ac b/configure.ac
index bd2157edb00e..9e5708cd49d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11983,6 +11983,18 @@ if test "$enable_skia" != "no" -a "$build_skia" = 
"yes" -a -z "$DISABLE_GUI"; th
 AC_DEFINE(HAVE_FEATURE_SKIA)
 BUILD_TYPE="$BUILD_TYPE SKIA"
 
+if test "$OS" = "MACOSX"; then
+AC_DEFINE(SK_SUPPORT_GPU,1)
+AC_DEFINE(SK_METAL,1)
+SKIA_GPU=METAL
+AC_SUBST(SKIA_GPU)
+else
+AC_DEFINE(SK_SUPPORT_GPU,1)
+AC_DEFINE(SK_VULKAN,1)
+SKIA_GPU=VULKAN
+AC_SUBST(SKIA_GPU)
+fi
+
 if test -n "$MAC_OS_X_VERSION_MIN_REQUIRED" -a 
"$MAC_OS_X_VERSION_MIN_REQUIRED" -lt "101200"; then
 SKIA_DISABLE_VMA_USE_STL_SHARED_MUTEX=1
 AC_SUBST(SKIA_DISABLE_VMA_USE_STL_SHARED_MUTEX)
diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk
index 517b5585496e..65006ca5db61 100644
--- a/external/skia/Library_skia.mk
+++ b/external/skia/Library_skia.mk
@@ -63,6 +63,8 @@ else ifeq ($(OS),MACOSX)
 
 $(eval $(call gb_Library_use_system_darwin_frameworks,skia,\
 Cocoa \
+Metal \
+QuartzCore \
 ))
 
 ifneq ($(SKIA_DISABLE_VMA_USE_STL_SHARED_MUTEX),)
@@ -527,6 +529,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,skia,\
 UnpackedTarball/skia/src/xps/SkXPSDocument \
 ))
 
+ifneq ($(SKIA_GPU),)
 $(eval $(call gb_Library_add_generated_exception_objects,skia,\
 UnpackedTarball/skia/src/core/SkGpuBlurUtils \
 UnpackedTarball/skia/src/gpu/ccpr/GrCCAtlas \
@@ -791,6 +794,10 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,skia,\
 UnpackedTarball/skia/src/image/SkImage_Gpu \
 UnpackedTarball/skia/src/image/SkImage_GpuYUVA \
 UnpackedTarball/skia/src/image/SkSurface_Gpu \
+))
+
+#ifeq ($(SKIA_GPU),VULKAN)
+$(eval $(call gb_Library_add_generated_exception_objects,skia,\
 UnpackedTarball/skia/src/gpu/vk/GrVkAMDMemoryAllocator \
 UnpackedTarball/skia/src/gpu/vk/GrVkAttachment \
 UnpackedTarball/skia/src/gpu/vk/GrVkBuffer \
@@ -829,6 +836,15 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,skia,\
 UnpackedTarball/skia/src/gpu/vk/GrVkVaryingHandler \
 ))
 
+$(eval $(call gb_Library_add_generated_exception_objects,skia,\
+UnpackedTarball/skia/tools/gpu/vk/VkTestUtils \
+UnpackedTarball/skia/tools/sk_app/VulkanWindowContext \
+
UnpackedTarball/skia/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator \
+))
+
+#endif
+endif
+
 $(eval $(call gb_Library_add_generated_exception_objects,skia,\
 UnpackedTarball/skia/src/ports/SkGlobalInitialization_default \
 UnpackedTarball/skia/src/ports/SkImageGenerator_none \
@@ -861,8 +877,6 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,skia,\
 ))
 
 $(eval $(call gb_Library_add_generated_exception_objects,skia,\
-UnpackedTarball/skia/tools/gpu/vk/VkTestUtils \
-UnpackedTarball/skia/tools/sk_app/VulkanWindowC

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

2021-08-24 Thread Luboš Luňák (via logerrit)
 configure.ac |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit df54ee7361b3d4eb15e5365a7487049bf247dd7f
Author: Luboš Luňák 
AuthorDate: Mon Aug 23 19:56:38 2021 +0200
Commit: Luboš Luňák 
CommitDate: Tue Aug 24 12:51:53 2021 +0200

don't print empty "HOST config (config.warn)" at the end of configure

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

diff --git a/configure.ac b/configure.ac
index 6be3e031c348..bd2157edb00e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14480,13 +14480,13 @@ $GNUMAKE check
 _EOF
 fi
 
-if test -f "$WARNINGS_FILE_FOR_BUILD"; then
+if test -s "$WARNINGS_FILE_FOR_BUILD"; then
 echo "BUILD / cross-toolset config, repeated ($WARNINGS_FILE_FOR_BUILD)"
 cat "$WARNINGS_FILE_FOR_BUILD"
 echo
 fi
 
-if test -f "$WARNINGS_FILE"; then
+if test -s "$WARNINGS_FILE"; then
 echo "HOST config ($WARNINGS_FILE)"
 cat "$WARNINGS_FILE"
 fi


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

2021-08-24 Thread Noel Grandin (via logerrit)
 sw/inc/anchoredobject.hxx   |5 +-
 sw/qa/extras/uiwriter/uiwriter2.cxx |8 +--
 sw/source/core/access/accpara.cxx   |4 -
 sw/source/core/doc/doclay.cxx   |2 
 sw/source/core/draw/dview.cxx   |8 +--
 sw/source/core/frmedt/feshview.cxx  |4 -
 sw/source/core/frmedt/fetab.cxx |2 
 sw/source/core/inc/flyfrm.hxx   |3 +
 sw/source/core/inc/frame.hxx|1 
 sw/source/core/layout/anchoredobject.cxx|   10 
 sw/source/core/layout/atrfrm.cxx|2 
 sw/source/core/layout/calcmove.cxx  |4 -
 sw/source/core/layout/flowfrm.cxx   |2 
 sw/source/core/layout/fly.cxx   |   19 +++--
 sw/source/core/layout/flycnt.cxx|2 
 sw/source/core/layout/flylay.cxx|4 -
 sw/source/core/layout/frmtool.cxx   |   16 +++
 sw/source/core/layout/hffrm.cxx |2 
 sw/source/core/layout/layact.cxx|8 +--
 sw/source/core/layout/laycache.cxx  |4 -
 sw/source/core/layout/objectformatter.cxx   |4 -
 sw/source/core/layout/pagechg.cxx   |6 +-
 sw/source/core/layout/paintfrm.cxx  |   10 ++--
 sw/source/core/layout/ssfrm.cxx |8 +--
 sw/source/core/layout/tabfrm.cxx|8 +--
 sw/source/core/layout/trvlfrm.cxx   |4 -
 sw/source/core/layout/wsfrm.cxx |   16 +++
 sw/source/core/objectpositioning/anchoredobjectposition.cxx |2 
 sw/source/core/text/itrcrsr.cxx |2 
 sw/source/core/text/porfly.cxx  |2 
 sw/source/core/text/porlay.cxx  |2 
 sw/source/core/text/txtfly.cxx  |   25 +---
 sw/source/core/text/txtfrm.cxx  |2 
 sw/source/core/text/txtftn.cxx  |2 
 sw/source/core/text/xmldump.cxx |2 
 35 files changed, 116 insertions(+), 89 deletions(-)

New commits:
commit 35fa0a7369d6ba3a051923c4f813107c16d2c617
Author: Noel Grandin 
AuthorDate: Tue Aug 24 09:59:43 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Aug 24 12:47:52 2021 +0200

reduce cost of dynamic casting to SwFlyFrame

which is often hot on doing document layout

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

diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx
index 1db20eaf494c..2dd945e4cd5c 100644
--- a/sw/inc/anchoredobject.hxx
+++ b/sw/inc/anchoredobject.hxx
@@ -28,7 +28,7 @@ class SdrObject;
 class SwFrame;
 class SwLayoutFrame;
 class SwTextFrame;
-
+class SwFlyFrame;
 class SwPageFrame;
 
 class SwFrameFormat;
@@ -488,6 +488,9 @@ class SW_DLLPUBLIC SwAnchoredObject
 
 /** The element name to show in the XML dump. */
 virtual const char* getElementName( ) const { return 
"SwAnchoredObject"; }
+
+virtual const SwFlyFrame* DynCastFlyFrame() const;
+virtual SwFlyFrame* DynCastFlyFrame();
 };
 
 /// Helper class for notify that positioning of an anchored object is in 
progress.
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index a3f63a80d816..8461ef96197a 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -1804,7 +1804,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, 
testUnfloatButtonSmallTable)
 CPPUNIT_ASSERT_EQUAL(static_cast(1), pAnchored->size());
 SwAnchoredObject* pAnchoredObj = (*pAnchored)[0];
 
-SwFlyFrame* pFlyFrame = dynamic_cast(pAnchoredObj);
+SwFlyFrame* pFlyFrame = pAnchoredObj->DynCastFlyFrame();
 CPPUNIT_ASSERT(pFlyFrame);
 CPPUNIT_ASSERT(!pFlyFrame->IsShowUnfloatButton(pWrtShell));
 
@@ -1849,7 +1849,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testUnfloatButton)
 SwAnchoredObject* pAnchoredObj = (*pAnchored)[0];
 
 // The unfloat button is not visible until it gets selected
-SwFlyFrame* pFlyFrame = dynamic_cast(pAnchoredObj);
+SwFlyFrame* pFlyFrame = pAnchoredObj->DynCastFlyFrame();
 CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(), pFlyFrame);
 CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(),
!pFlyFrame->IsShowUnfloatButton(pWrtShell));
@@ -1875,7 +1875,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, 
test

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

2021-08-24 Thread Vasily Melenchuk (via logerrit)
 svx/source/sidebar/nbdtmg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1fd9116fbcd1a8d25f964087cd1d0eb15df8a2d1
Author: Vasily Melenchuk 
AuthorDate: Mon Aug 23 12:27:20 2021 +0300
Commit: Michael Stahl 
CommitDate: Tue Aug 24 12:16:44 2021 +0200

tdf#143990: writer: default value for SetIncludeUpperLevels is 1

Same as in e08fba90 for tdf#143858: zero for SetIncludeUpperLevels
has no practical sense, since actually this value is amount of levels
to display. Default and minimal value is 1 (current level), zero
used only in cases when there should be no numbering.

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

diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index a6325389c874..3870a634ccf7 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -848,7 +848,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, 
sal_uInt16 nIndex, sal_uInt1
 }
 } else
 {
-aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != 
nUpperLevelOrChar ? aNum.GetLevelCount() : 0));
+aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != 
nUpperLevelOrChar ? aNum.GetLevelCount() : 1));
 aFmt.SetCharFormatName(GetNumCharFmtName());
 if (isResetSize) aFmt.SetBulletRelSize(100);
 }


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/ipsd/ipsd.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 26adaed995097a160063b54a9d2a8d81b34f145d
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 17:33:10 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Aug 24 12:13:26 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/vcl/source/filter/ipsd/ipsd.cxx b/vcl/source/filter/ipsd/ipsd.cxx
index 08e520884754..623a2b14a84e 100644
--- a/vcl/source/filter/ipsd/ipsd.cxx
+++ b/vcl/source/filter/ipsd/ipsd.cxx
@@ -165,6 +165,9 @@ bool PSDReader::ImplReadHeader()
 
 m_rPSD.ReadUInt32( mpFileHeader->nSignature ).ReadUInt16( 
mpFileHeader->nVersion ).ReadUInt32( mpFileHeader->nPad1 ).ReadUInt16( 
mpFileHeader->nPad2 ).ReadUInt16( mpFileHeader->nChannels ).ReadUInt32( 
mpFileHeader->nRows ).ReadUInt32( mpFileHeader->nColumns 
).ReadUInt16( mpFileHeader->nDepth ).ReadUInt16( mpFileHeader->nMode );
 
+if (!m_rPSD.good())
+return false;
+
 if ( ( mpFileHeader->nSignature != 0x38425053 ) || ( 
mpFileHeader->nVersion != 1 ) )
 return false;
 


[Libreoffice-commits] core.git: include/vcl vcl/CppunitTest_vcl_drawmode.mk vcl/inc vcl/Library_vcl.mk vcl/Module_vcl.mk vcl/qa vcl/source

2021-08-24 Thread Chris Sherlock (via logerrit)
 include/vcl/outdev.hxx|5 
 vcl/CppunitTest_vcl_drawmode.mk   |   47 +++
 vcl/Library_vcl.mk|1 
 vcl/Module_vcl.mk |1 
 vcl/inc/drawmode.hxx  |   52 
 vcl/qa/cppunit/drawmode.cxx   |  401 ++
 vcl/source/outdev/bitmap.cxx  |   70 -
 vcl/source/outdev/hatch.cxx   |   25 --
 vcl/source/outdev/outdevstate.cxx |   92 ---
 vcl/source/outdev/pixel.cxx   |3 
 vcl/source/outdev/text.cxx|   52 
 vcl/source/outdev/textline.cxx|   53 
 vcl/source/outdev/transparent.cxx |   33 --
 vcl/source/rendercontext/drawmode.cxx |  275 +++
 14 files changed, 802 insertions(+), 308 deletions(-)

New commits:
commit 0901297902c29c041ae944973b369e8247716893
Author: Chris Sherlock 
AuthorDate: Wed May 5 18:01:43 2021 +1000
Commit: Tomaž Vajngerl 
CommitDate: Tue Aug 24 12:12:11 2021 +0200

vcl: create drawmode functions

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index fce10e1ef077..b529763099ca 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -478,7 +478,7 @@ public:
 AntialiasingFlags   GetAntialiasing() const { return 
mnAntialiasing; }
 
 voidSetDrawMode( DrawModeFlags nDrawMode );
-DrawModeFlags   GetDrawMode() const { return mnDrawMode; }
+DrawModeFlags   GetDrawMode() const;
 
 voidSetLayoutMode( ComplexTextLayoutFlags 
nTextLayoutMode );
 ComplexTextLayoutFlags   GetLayoutMode() const { return 
mnTextLayoutMode; }
@@ -1493,9 +1493,6 @@ public:
 bool bDownsampleBitmaps,
 const Color& rBackground = COL_TRANSPARENT 
);
 
-SAL_DLLPRIVATE ColorImplDrawModeToColor  ( const Color& rColor ) 
const;
-
-
 voidDrawTransparent( const tools::PolyPolygon& 
rPolyPoly, sal_uInt16 nTransparencePercent );
 
 voidDrawTransparent(
diff --git a/vcl/CppunitTest_vcl_drawmode.mk b/vcl/CppunitTest_vcl_drawmode.mk
new file mode 100644
index ..2a107c214a26
--- /dev/null
+++ b/vcl/CppunitTest_vcl_drawmode.mk
@@ -0,0 +1,47 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,vcl_drawmode))
+
+$(eval $(call gb_CppunitTest_set_include,vcl_drawmode,\
+$$(INCLUDE) \
+-I$(SRCDIR)/vcl/inc \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,vcl_drawmode, \
+   vcl/qa/cppunit/drawmode \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,vcl_drawmode, \
+   comphelper \
+   cppu \
+   cppuhelper \
+   sal \
+   svt \
+   test \
+   tl \
+   tk \
+   unotest \
+   vcl \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,vcl_drawmode))
+
+$(eval $(call gb_CppunitTest_use_ure,vcl_drawmode))
+$(eval $(call gb_CppunitTest_use_vcl,vcl_drawmode))
+
+$(eval $(call gb_CppunitTest_use_configuration,vcl_drawmode))
+
+$(eval $(call gb_CppunitTest_use_components,vcl_drawmode,\
+   configmgr/source/configmgr \
+   i18npool/util/i18npool \
+   ucb/source/core/ucb1 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index eb0af8aa8cc4..ec5445f2968c 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -94,6 +94,7 @@ $(eval $(call gb_Library_use_externals,vcl,\
 ))
 
 $(eval $(call gb_Library_add_exception_objects,vcl,\
+vcl/source/rendercontext/drawmode \
 vcl/skia/SkiaHelper \
 vcl/source/rendercontext/ImplMapRes \
 vcl/source/animate/Animation \
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 4a3eec15c119..41eb63456470 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -189,6 +189,7 @@ $(eval $(call gb_Module_add_targets,vcl,\
 endif
 
 $(eval $(call gb_Module_add_check_targets,vcl,\
+CppunitTest_vcl_drawmode \
 CppunitTest_vcl_lifecycle \
 CppunitTest_vcl_bitmap_test \
 CppunitTest_vcl_bitmapprocessor_test \
diff --git a/vcl/inc/drawmode.hxx b/vcl/inc/drawmode.hxx
new file mode 100644
index ..9234b180b4c6
--- /dev/null
+++ b/vcl/inc/drawmode.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * 

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

2021-08-24 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/shells/textsh1.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 33d589cde771df5f8b2916cf248cfc341286b559
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 16:55:27 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Aug 24 12:12:07 2021 +0200

rhbz#1996735 SwEditShell::GetCorrection can return null

Though the exact steps to reproduce are unknown. From the text seen in
the backtrace the language is possibly Finnish in which case voikko is
probably the spellchecking backend in use.

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

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index f8773b4d9938..44b1cc3caa2a 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1518,7 +1518,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
 else if (sApplyText == "Spelling")
 {
 SwRect aToFill;
-uno::Reference< linguistic2::XSpellAlternatives >  xSpellAlt( 
rWrtSh.GetCorrection(nullptr, aToFill) );
+uno::Reference  
xSpellAlt(rWrtSh.GetCorrection(nullptr, aToFill));
+if (!xSpellAlt.is())
+return;
 uno::Reference< linguistic2::XDictionary > xDictionary = 
LinguMgr::GetIgnoreAllList();
 OUString sWord(xSpellAlt->getWord());
 linguistic::DictionaryError nAddRes = linguistic::AddEntryToDic( 
xDictionary,


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

2021-08-24 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/uicalc/uicalc.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7f90260701afdbeae98b18263b299c283d2a2cca
Author: Xisco Fauli 
AuthorDate: Tue Aug 24 09:29:16 2021 +0200
Commit: Xisco Fauli 
CommitDate: Tue Aug 24 11:37:21 2021 +0200

tdf#144022: fix bug id in unittest

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

diff --git a/sc/qa/unit/uicalc/data/tdf143979.ods 
b/sc/qa/unit/uicalc/data/tdf144022.ods
similarity index 100%
rename from sc/qa/unit/uicalc/data/tdf143979.ods
rename to sc/qa/unit/uicalc/data/tdf144022.ods
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index b7f272883fe9..8a17d18b4f87 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -1739,9 +1739,9 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, 
testTdf126540_GridToggleModifiesTheDocument)
 CPPUNIT_ASSERT(pDocSh->IsModified());
 }
 
-CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf143979)
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf144022)
 {
-ScModelObj* pModelObj = createDoc("tdf143979.ods");
+ScModelObj* pModelObj = createDoc("tdf144022.ods");
 ScDocument* pDoc = pModelObj->GetDocument();
 CPPUNIT_ASSERT(pDoc);
 


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

2021-08-24 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/uibase/shells/drwbassh.cxx|   31 +---
 xmloff/source/text/XMLTextFrameHyperlinkContext.cxx |   17 --
 2 files changed, 40 insertions(+), 8 deletions(-)

New commits:
commit 96e106495a45fbb3d70e1266a95f5e31703abb83
Author: Samuel Mehrbrodt 
AuthorDate: Mon Aug 23 10:17:56 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Aug 24 11:28:37 2021 +0200

tdf#143736 Load hyperlink from more shapes

And limit the shape types which can have a hyperlink to those known to work.

Change-Id: I3d3522bea1e756dad8ddc2041e6588a367f42a7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120861
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 75cd2b0fa71c73ae815b80d8e42328024ea63555)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120935
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/source/uibase/shells/drwbassh.cxx 
b/sw/source/uibase/shells/drwbassh.cxx
index e5b4bb177ae0..924877a876a5 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -799,11 +799,34 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
 {
 if (pSdrView->GetMarkedObjectCount() != 1)
 rSet.DisableItem(nWhich);
-else if (nWhich == SID_OPEN_HYPERLINK || nWhich == 
SID_REMOVE_HYPERLINK
- || nWhich == SID_EDIT_HYPERLINK || nWhich == 
SID_COPY_HYPERLINK_LOCATION)
+
+const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
+SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+sal_uInt16 nObjType = pObj->GetObjIdentifier();
+
+// Only enable hyperlink for the following types
+switch (nObjType)
+{
+case OBJ_PATHFILL:
+case OBJ_SECT:
+case OBJ_LINE:
+case OBJ_CUSTOMSHAPE:
+case OBJ_TEXT:
+case OBJ_RECT:
+case OBJ_CAPTION:
+case OBJ_POLY:
+case OBJ_PLIN:
+case OBJ_MEASURE:
+case OBJ_EDGE:
+break;
+default:
+rSet.DisableItem(nWhich);
+break;
+}
+
+if (nWhich == SID_OPEN_HYPERLINK || nWhich == 
SID_REMOVE_HYPERLINK
+|| nWhich == SID_EDIT_HYPERLINK || nWhich == 
SID_COPY_HYPERLINK_LOCATION)
 {
-const SdrMarkList& rMarkList = 
pSdrView->GetMarkedObjectList();
-SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
 if (pObj->getHyperlink().isEmpty())
 rSet.DisableItem(nWhich);
 }
diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx 
b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
index 278d6d953205..3901a010fbd9 100644
--- a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
+++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
@@ -113,14 +113,23 @@ SvXMLImportContextRef 
XMLTextFrameHyperlinkContext::CreateChildContext(
 SvXMLImportContext *pContext = nullptr;
 XMLTextFrameContext *pTextFrameContext = nullptr;
 
-if( XML_NAMESPACE_DRAW == nPrefix )
+if( XML_NAMESPACE_DRAW == nPrefix || XML_NAMESPACE_DR3D == nPrefix)
 {
-if( IsXMLToken( rLocalName, XML_FRAME ) )
+if( XML_NAMESPACE_DRAW == nPrefix && IsXMLToken( rLocalName, XML_FRAME 
) )
 pTextFrameContext = new XMLTextFrameContext( GetImport(), nPrefix,
 rLocalName, xAttrList,
 eDefaultAnchorType );
-else if (IsXMLToken(rLocalName, XML_CUSTOM_SHAPE) || 
IsXMLToken(rLocalName, XML_PATH)
- || IsXMLToken(rLocalName, XML_ELLIPSE) || 
IsXMLToken(rLocalName, XML_LINE))
+else if ((XML_NAMESPACE_DRAW == nPrefix && (
+ IsXMLToken(rLocalName, XML_CUSTOM_SHAPE) || 
IsXMLToken(rLocalName, XML_PATH)
+ || IsXMLToken(rLocalName, XML_ELLIPSE) || 
IsXMLToken(rLocalName, XML_LINE)
+ || IsXMLToken(rLocalName, XML_RECT) || 
IsXMLToken(rLocalName, XML_CAPTION)
+ || IsXMLToken(rLocalName, XML_POLYGON) || 
IsXMLToken(rLocalName, XML_POLYLINE)
+ || IsXMLToken(rLocalName, XML_MEASURE) || 
IsXMLToken(rLocalName, XML_CIRCLE)
+ || IsXMLToken(rLocalName, XML_CONNECTOR) || 
IsXMLToken(rLocalName, XML_CONTROL)
+ || IsXMLToken(rLocalName, XML_PAGE_THUMBNAIL) || 
IsXMLToken(rLocalName, XML_G)
+ ))
+ || (XML_NAMESPACE_DR3D == nPrefix && IsXMLToken(rLocalName, 
XML_SCENE))
+ )
 {
  

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

2021-08-24 Thread Noel Grandin (via logerrit)
 vcl/skia/gdiimpl.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 6b2046b41719a391e758ea57055adb2e111f94c1
Author: Noel Grandin 
AuthorDate: Mon Aug 23 20:27:01 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Aug 24 11:28:07 2021 +0200

reduce skia realloc when drawing polygons

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

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index ef4809bc0288..f3122dc208e5 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -148,8 +148,8 @@ void addPolyPolygonToPath(const basegfx::B2DPolyPolygon& 
rPolyPolygon, SkPath& r
 
 sal_uInt32 nPointCount = 0;
 for (const auto& rPolygon : rPolyPolygon)
-nPointCount += rPolygon.count();
-rPath.incReserve(nPointCount * 2);
+nPointCount += rPolygon.count() * 3; // because cubicTo is 3 elements
+rPath.incReserve(nPointCount);
 
 for (const auto& rPolygon : rPolyPolygon)
 {
@@ -1142,7 +1142,7 @@ bool SkiaSalGraphicsImpl::drawPolyLine(const 
basegfx::B2DHomMatrix& rObjectToDev
 if (eLineJoin != basegfx::B2DLineJoin::NONE || fLineWidth <= 1.0)
 {
 SkPath aPath;
-aPath.incReserve(aPolyLine.count() + 2);
+aPath.incReserve(aPolyLine.count() * 3); // because cubicTo is 3 
elements
 aPath.setFillType(SkPathFillType::kEvenOdd);
 addPolygonToPath(aPolyLine, aPath);
 aPath.offset(toSkX(0) + posFix, toSkY(0) + posFix, nullptr);


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

2021-08-24 Thread Roman Kuznetsov (via logerrit)
 include/sfx2/strings.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6cf1db2907f48e8aff65f5249668ac1d44ef32f0
Author: Roman Kuznetsov 
AuthorDate: Tue Aug 24 08:57:35 2021 +0200
Commit: Roman Kuznetsov 
CommitDate: Tue Aug 24 11:20:38 2021 +0200

tdf#144025 Change LibreOffice to %PRODUCTNAME

Change-Id: Ia5bd44cb32818a71743f6a6e028cd9f0eba9aff1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120882
Tested-by: Jenkins
Reviewed-by: Roman Kuznetsov 

diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index 3367d368b2fa..2323d807c853 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -212,7 +212,7 @@
 #define STR_REDACTION_JSON_FILE_FILTER  
NC_("STR_REDACTION_JSON_FILE_FILTER", "Target Set (*.json)")
 #define STR_REDACTION_EDIT_TARGET   
NC_("STR_REDACTION_EDIT_TARGET", "Edit Target")
 #define STR_REDACTION_TARGET_ADD_ERROR  
NC_("STR_REDACTION_TARGET_ADD_ERROR", "An error occurred while adding new 
target. Please report this incident.")
-#define STR_REDACTION_NO_DRAW_WARNING   
NC_("STR_REDACTION_NO_DRAW_WARNING", "Draw module is needed for redaction. 
Please make sure you have LibreOffice Draw installed and working correctly.")
+#define STR_REDACTION_NO_DRAW_WARNING   
NC_("STR_REDACTION_NO_DRAW_WARNING", "Draw module is needed for redaction. 
Please make sure you have %PRODUCTNAME Draw installed and working correctly.")
 
 #define STR_SFX_FILEDLG_ACTUALVERSION   
NC_("STR_SFX_FILEDLG_ACTUALVERSION", "Current version")
 #define STR_SFX_EXPLORERFILE_EXPORT 
NC_("STR_SFX_EXPLORERFILE_EXPORT", "Export")


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

2021-08-24 Thread Balazs Varga (via logerrit)
 chart2/qa/extras/chart2export.cxx|   17 ++---
 chart2/qa/extras/data/xlsx/tdf142351.xlsx|binary
 oox/source/drawingml/chart/axisconverter.cxx |4 ++--
 3 files changed, 16 insertions(+), 5 deletions(-)

New commits:
commit e9fd6d94c3fe58ad6319daba5afca644e4e699a7
Author: Balazs Varga 
AuthorDate: Tue Aug 17 14:28:48 2021 +0200
Commit: Xisco Fauli 
CommitDate: Tue Aug 24 11:17:54 2021 +0200

tdf#142351 chart ooxml import: fix category axis cross position

Set PROP_CrossoverPosition value regardless of the mrModel.mbAuto
value, which is a different thing. This element specifies that
this axis is a date or text axis based on the data that is used for
the axis labels, not a specific choice.

Change-Id: Ifa291aac2f4bb3981d968de3489b23f1af485104
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120592
Tested-by: Jenkins
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit e701732725dd641741f39020d7dc965bc4db765d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120875
Reviewed-by: Xisco Fauli 

diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index 89dcdeb529fd..608905e59328 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -531,10 +531,21 @@ void Chart2ExportTest::testBarChart()
 
 void Chart2ExportTest::testCrosses()
 {
-load(u"/chart2/qa/extras/data/docx/", "Bar_horizontal_cone.docx");
-xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open 
XML Text");
+// test crosses val="autoZero" with DOCX
+{
+load(u"/chart2/qa/extras/data/docx/", "Bar_horizontal_cone.docx");
+xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office 
Open XML Text");
+
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses", "val", "autoZero");
+}
+// tdf#142351: test crossesAt val="-50" with XLSX
+{
+load(u"/chart2/qa/extras/data/xlsx/", "tdf142351.xlsx");
+xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office 
Open XML");
+CPPUNIT_ASSERT(pXmlDoc);
 
-assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses", 
"val", "autoZero");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crossesAt", "val", "-50");
+}
 }
 
 void Chart2ExportTest::testScatterChartTextXValues()
diff --git a/chart2/qa/extras/data/xlsx/tdf142351.xlsx 
b/chart2/qa/extras/data/xlsx/tdf142351.xlsx
new file mode 100644
index ..0414bb3f1625
Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf142351.xlsx differ
diff --git a/oox/source/drawingml/chart/axisconverter.cxx 
b/oox/source/drawingml/chart/axisconverter.cxx
index 7aa141c0f798..4620f5b5a15c 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -372,8 +372,8 @@ void AxisConverter::convertFromModel(const 
Reference& rxCoord
 case XML_max:   eAxisPos = cssc::ChartAxisPosition_END; 
break;
 case XML_autoZero:  eAxisPos = cssc::ChartAxisPosition_ZERO;   
break;
 }
-if( !mrModel.mbAuto )
-aAxisProp.setProperty( PROP_CrossoverPosition, eAxisPos );
+
+aAxisProp.setProperty( PROP_CrossoverPosition, eAxisPos );
 
 // calculate automatic origin depending on scaling mode of crossing 
axis
 bool bCrossingLogScale = pCrossingAxis && lclIsLogarithmicScale( 
*pCrossingAxis );


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

2021-08-24 Thread Michael Stahl (via logerrit)
 sw/qa/extras/mailmerge/data/bookmarkcondition.fodt |   91 +
 sw/qa/extras/mailmerge/data/bookmarkcondition.ods  |binary
 sw/qa/extras/mailmerge/mailmerge.cxx   |   30 ++
 sw/source/core/doc/DocumentFieldsManager.cxx   |   11 ++
 sw/source/core/doc/docfld.cxx  |   58 +++--
 sw/source/core/inc/docfld.hxx  |   12 ++
 sw/source/core/text/porlay.cxx |   22 -
 sw/source/ui/misc/bookmark.cxx |4 
 8 files changed, 195 insertions(+), 33 deletions(-)

New commits:
commit 51d82e3d9a44476bfb80cf48f165c602b4bc6708
Author: Michael Stahl 
AuthorDate: Fri Aug 20 17:09:28 2021 +0200
Commit: Michael Stahl 
CommitDate: Tue Aug 24 11:05:20 2021 +0200

sw: evaluate bookmark conditions differently

Conditions may refer to database rows in mail merge, which requires a
SwDBManager to evaluate.

So do it in DocumentFieldsManager::UpdateExpFieldsImpl() where the
similar conditions on sections and fields are evaluated.

Change the meaning of the m_bHidden flag to store the result of
evaluating the condition, instead of being always true when there is
a condition.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120793
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 43fc5f3aee4c06fb5983b625175d6991433945d4)

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

diff --git a/sw/qa/extras/mailmerge/data/bookmarkcondition.fodt 
b/sw/qa/extras/mailmerge/data/bookmarkcondition.fodt
new file mode 100644
index ..0f9d5a90b1dc
--- /dev/null
+++ b/sw/qa/extras/mailmerge/data/bookmarkcondition.fodt
@@ -0,0 +1,91 @@
+
+
+http://openoffice.org/2009/office"; 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns
 :config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="ur
 n:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:xforms="http://www.w3.org/2002/xforms"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+ 
+  
+  
+  
+ 
+ 
+  
+   
+   
+
+   
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+  
+   
+  
+
+  
+  
+  
+ 
+ 
+  
+   
+  
+  
+   
+  
+  
+   
+
+   
+  
+  
+   
+
+   
+   
+   
+  
+ 
+ 
+  
+ 
+ 
+  
+  
+  
+In den Bergen war es anstrengend.
+  
+  
+  
+In Barcelona war es schön.
+  
+  
+  
+In Paris war es erlebnisreich.
+  
+  
+  
+Mein Urlaub war 
+
+anstrengend
+
+
+schön
+
+
+erlebnisreich
+
+.
+  
+  
+
+  
+ 
+
diff --git a/sw/qa/extras/mailmerge/data/bookmarkcondition.ods 
b/sw/qa/extras/mailmerge/data/bookmarkcondition.ods
new file mode 100644
index ..463781ed5f6e
Binary files /dev/null and b/sw/qa/extras/mailmerge/data/bookmarkcondition.ods 
differ
diff --git a/sw/qa/extras/mailm

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

2021-08-24 Thread Serge Krot (via logerrit)
 sw/qa/extras/inc/swmodeltestbase.hxx |9 ++
 sw/qa/extras/mailmerge/data/tdf78611.odt |binary
 sw/qa/extras/mailmerge/mailmerge.cxx |   46 +++
 3 files changed, 50 insertions(+), 5 deletions(-)

New commits:
commit 54423d5c51cb7733cb8766733ceec21d128c3bff
Author: Serge Krot 
AuthorDate: Wed Dec 12 15:18:05 2018 +0100
Commit: Michael Stahl 
CommitDate: Tue Aug 24 11:04:05 2021 +0200

tdf#78611 mailmerge: new unit tests: numbering in headings

Change-Id: I8672376dabcdc0011c59bb9ac5c32b8dbb88396d
Reviewed-on: https://gerrit.libreoffice.org/65035
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 7bbc1fd443ff0b137206ad279eaed7bd4d5ec6ec)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120913
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx 
b/sw/qa/extras/inc/swmodeltestbase.hxx
index 5a11a088b9ba..df717abfb2d9 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -348,8 +348,8 @@ protected:
 return false;
 }
 
-private:
-void dumpLayout()
+protected:
+void dumpLayout(uno::Reference< lang::XComponent > & rComponent)
 {
 // create the xml writer
 mpXmlBuffer = xmlBufferCreate();
@@ -357,7 +357,7 @@ private:
 xmlTextWriterStartDocument(pXmlWriter, nullptr, nullptr, nullptr);
 
 // create the dump
-SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
+SwXTextDocument* pTextDoc = dynamic_cast(rComponent.get());
 CPPUNIT_ASSERT(pTextDoc);
 SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
 SwRootFrame* pLayout = 
pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
@@ -368,7 +368,6 @@ private:
 xmlFreeTextWriter(pXmlWriter);
 }
 
-protected:
 void discardDumpedLayout()
 {
 if (mpXmlBuffer)
@@ -428,7 +427,7 @@ protected:
 xmlDocPtr parseLayoutDump()
 {
 if (!mpXmlBuffer)
-dumpLayout();
+dumpLayout(mxComponent);
 
 return xmlParseMemory(reinterpret_cast(xmlBufferContent(mpXmlBuffer)), xmlBufferLength(mpXmlBuffer));
 }
diff --git a/sw/qa/extras/mailmerge/data/tdf78611.odt 
b/sw/qa/extras/mailmerge/data/tdf78611.odt
new file mode 100644
index ..577597654740
Binary files /dev/null and b/sw/qa/extras/mailmerge/data/tdf78611.odt differ
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx 
b/sw/qa/extras/mailmerge/mailmerge.cxx
index 5b6411c153c0..9c84c312ef1e 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -276,6 +276,17 @@ public:
 loadMailMergeDocument( name );
 }
 
+/**
+ Resets currently opened layout of the original template,
+ and creates the layout of the document with N mails inside
+ (result run with text::MailMergeType::SHELL)
+*/
+void dumpMMLayout()
+{
+mpXmlBuffer = xmlBufferPtr();
+dumpLayout(mxMMComponent);
+}
+
 protected:
 // Returns page number of the first page of a MM document inside the large 
MM document (used in the SHELL case).
 int documentStartPageNumber( int document ) const;
@@ -1041,5 +1052,40 @@ DECLARE_FILE_MAILMERGE_TEST(testTdf123057_file, 
"pagecounttest.ott", "db_pagecou
 }
 }
 
+DECLARE_SHELL_MAILMERGE_TEST(testTd78611_shell, "tdf78611.odt", 
"10-testing-addresses.ods", "testing-addresses")
+{
+// prepare unit test and run
+executeMailMerge();
+
+// reset currently opened layout of the original template,
+// and create the layout of the document with 10 mails inside
+dumpMMLayout();
+
+// check: each page (one page is one sub doc) has different paragraphs and 
header paragraphs.
+// All header paragraphs should have numbering.
+
+// check first page
+CPPUNIT_ASSERT_EQUAL( OUString("1"), 
parseDump("/root/page[1]/body/txt[6]/Special", "rText"));
+CPPUNIT_ASSERT_EQUAL( OUString("1.1"), 
parseDump("/root/page[1]/body/txt[8]/Special", "rText"));
+CPPUNIT_ASSERT_EQUAL( OUString("1.2"), 
parseDump("/root/page[1]/body/txt[10]/Special", "rText"));
+
+// check some other pages
+CPPUNIT_ASSERT_EQUAL( OUString("1"), 
parseDump("/root/page[3]/body/txt[6]/Special", "rText"));
+CPPUNIT_ASSERT_EQUAL( OUString("1.1"), 
parseDump("/root/page[5]/body/txt[8]/Special", "rText"));
+CPPUNIT_ASSERT_EQUAL( OUString("1.2"), 
parseDump("/root/page[7]/body/txt[10]/Special", "rText"));
+}
+
+DECLARE_FILE_MAILMERGE_TEST(testTd78611_file, "tdf78611.odt", 
"10-testing-addresses.ods", "testing-addresses")
+{
+executeMailMerge(true);
+for (int doc = 0; doc < 10; ++doc)
+{
+loadMailMergeDocument( doc );
+CPPUNIT_ASSERT_EQUAL( OUString("1"), 
parseDump("/root/page[1]/body/txt[6]/Special", "rText"));
+CPPUNIT_ASSERT_EQUAL( OUString("1.1"), 
parseDump("/root/page[1]/body/txt[8]/Special", "rText"));
+  

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

2021-08-24 Thread Michael Stahl (via logerrit)
 sw/qa/extras/mailmerge/data/bookmarkcondition.fodt |   91 +
 sw/qa/extras/mailmerge/data/bookmarkcondition.ods  |binary
 sw/qa/extras/mailmerge/mailmerge.cxx   |   27 ++
 sw/source/core/doc/DocumentFieldsManager.cxx   |   11 ++
 sw/source/core/doc/docfld.cxx  |   58 +++--
 sw/source/core/inc/docfld.hxx  |   12 ++
 sw/source/core/text/porlay.cxx |   22 -
 sw/source/ui/misc/bookmark.cxx |4 
 8 files changed, 192 insertions(+), 33 deletions(-)

New commits:
commit 3d81a3c586690fbeca551dcc1cf83b03b591ed22
Author: Michael Stahl 
AuthorDate: Fri Aug 20 17:09:28 2021 +0200
Commit: Michael Stahl 
CommitDate: Tue Aug 24 11:03:20 2021 +0200

sw: evaluate bookmark conditions differently

Conditions may refer to database rows in mail merge, which requires a
SwDBManager to evaluate.

So do it in DocumentFieldsManager::UpdateExpFieldsImpl() where the
similar conditions on sections and fields are evaluated.

Change the meaning of the m_bHidden flag to store the result of
evaluating the condition, instead of being always true when there is
a condition.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120793
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 43fc5f3aee4c06fb5983b625175d6991433945d4)

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

diff --git a/sw/qa/extras/mailmerge/data/bookmarkcondition.fodt 
b/sw/qa/extras/mailmerge/data/bookmarkcondition.fodt
new file mode 100644
index ..0f9d5a90b1dc
--- /dev/null
+++ b/sw/qa/extras/mailmerge/data/bookmarkcondition.fodt
@@ -0,0 +1,91 @@
+
+
+http://openoffice.org/2009/office"; 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns
 :config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="ur
 n:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:xforms="http://www.w3.org/2002/xforms"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+ 
+  
+  
+  
+ 
+ 
+  
+   
+   
+
+   
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+  
+   
+  
+
+  
+  
+  
+ 
+ 
+  
+   
+  
+  
+   
+  
+  
+   
+
+   
+  
+  
+   
+
+   
+   
+   
+  
+ 
+ 
+  
+ 
+ 
+  
+  
+  
+In den Bergen war es anstrengend.
+  
+  
+  
+In Barcelona war es schön.
+  
+  
+  
+In Paris war es erlebnisreich.
+  
+  
+  
+Mein Urlaub war 
+
+anstrengend
+
+
+schön
+
+
+erlebnisreich
+
+.
+  
+  
+
+  
+ 
+
diff --git a/sw/qa/extras/mailmerge/data/bookmarkcondition.ods 
b/sw/qa/extras/mailmerge/data/bookmarkcondition.ods
new file mode 100644
index ..463781ed5f6e
Binary files /dev/null and b/sw/qa/extras/mailmerge/data/bookmarkcondition.ods 
differ
diff --git a/sw/qa/extras/mailm

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

2021-08-24 Thread Michael Stahl (via logerrit)
 sw/source/core/crsr/bookmrk.cxx |   45 
 sw/source/core/doc/docbm.cxx|   16 ++
 sw/source/core/inc/bookmrk.hxx  |   10 +---
 3 files changed, 67 insertions(+), 4 deletions(-)

New commits:
commit e210e9b67cd46de98ee94dfdc54952c99f58be17
Author: Michael Stahl 
AuthorDate: Tue Jan 21 13:15:50 2020 +0100
Commit: Michael Stahl 
CommitDate: Tue Aug 24 11:02:19 2021 +0200

tdf#45589 sw: invalidate on bookmark insertion/deletion

Invalidate the text frames when a bookmark is inserted or deleted; also
when MarkManager::repositionMark() changes the positions.

The other calls of SetMarkPos()/SetOtherMarkPos() look like they're all
from code that corrects positions after text insertions or deletions so
no additional invalidate should be necessary there.

It turns out that one WW8 document in sw_filters_test wants to insert
a bookmark on a SwGrfNode; check for that in makeMark().

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87157
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit ef8427d12a63127a2eb867637699343d630545dd)

crashtesting: null dereference of reexporting abi12570.odt to odt

FLY_AT_FLY shape is anchored on SwStartNode of fly section.

(regression from ef8427d12a63127a2eb867637699343d630545dd)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91336
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 71ed878556422068041025668876fb3300c128df)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96318
Tested-by: Thorsten Behrens 
(cherry picked from commit 79bc162d86c62506614a19bf7c92c72237804f5e)

Change-Id: I293e6da9042bea5992cb27091b9cff77e5c7961d
4fe70237c060cc810af82657bc5791e7024db8f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120869
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index a16713dc295d..fad65a238147 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -238,6 +239,12 @@ namespace
 
 io_pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::UI_REPLACE, nullptr);
 };
+
+auto InvalidatePosition(SwPosition const& rPos) -> void
+{
+SwUpdateAttr const hint(rPos.nContent.GetIndex(), 
rPos.nContent.GetIndex(), 0);
+rPos.nNode.GetNode().GetTextNode()->NotifyClients(nullptr, &hint);
+}
 }
 
 namespace sw { namespace mark
@@ -337,6 +344,11 @@ namespace sw { namespace mark
 }
 
 // TODO: everything else uses MarkBase::GenerateNewName ?
+
+auto MarkBase::InvalidateFrames() -> void
+{
+}
+
 NavigatorReminder::NavigatorReminder(const SwPaM& rPaM)
 : MarkBase(rPaM, "__NavigatorReminder__")
 { }
@@ -393,6 +405,7 @@ namespace sw { namespace mark
 std::make_unique(*this));
 }
 io_pDoc->getIDocumentState().SetModified();
+InvalidateFrames();
 }
 
 void Bookmark::DeregisterFromDoc(SwDoc* const io_pDoc)
@@ -405,6 +418,36 @@ namespace sw { namespace mark
 std::make_unique(*this));
 }
 io_pDoc->getIDocumentState().SetModified();
+InvalidateFrames();
+}
+
+// invalidate text frames in case it's hidden or Formatting Marks enabled
+auto Bookmark::InvalidateFrames() -> void
+{
+InvalidatePosition(GetMarkPos());
+if (IsExpanded())
+{
+InvalidatePosition(GetOtherMarkPos());
+}
+}
+
+void Bookmark::Hide(bool const isHide)
+{
+if (isHide != m_bHidden)
+{
+m_bHidden = isHide;
+InvalidateFrames();
+}
+}
+
+void Bookmark::SetHideCondition(OUString const& rHideCondition)
+{
+if (m_sHideCondition != rHideCondition)
+{
+m_sHideCondition = rHideCondition;
+// don't eval condition here yet - probably only needed for
+// UI editing condition and that doesn't exist yet
+}
 }
 
 ::sfx2::IXmlIdRegistry& Bookmark::GetRegistry()
@@ -513,6 +556,8 @@ namespace sw { namespace mark
 if (eMode == sw::mark::InsertMode::New)
 {
 lcl_SetFieldMarks(this, io_pDoc, CH_TXT_ATR_FIELDSTART, 
CH_TXT_ATR_FIELDEND, pSepPos);
+// no need to invalidate text frames here, the insertion of the
+// CH_TXT_ATR already invalidates
 }
 else
 {
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index a9eed445a21c..e061dbf0a310 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -561,6 +561,18 @@ namespace sw { namespace mark
 pPos2->nContent.GetIndex());
 }
 #endif
+ 

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

2021-08-24 Thread Mike Kaganski (via logerrit)
 include/o3tl/unit_conversion.hxx |   20 
 include/oox/drawingml/drawingmltypes.hxx |4 +---
 2 files changed, 21 insertions(+), 3 deletions(-)

New commits:
commit ae04cfdbad1f4c09b06cd2cee9d89e9909181acc
Author: Mike Kaganski 
AuthorDate: Mon Aug 23 16:28:10 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue Aug 24 10:37:21 2021 +0200

Introduce convertNarrowing to return smaller integer types

It will use compile-type constants to clamp input value, instead of
clamping more expensive pre-sanitized output value.

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

diff --git a/include/o3tl/unit_conversion.hxx b/include/o3tl/unit_conversion.hxx
index cf293662e7b2..7bee0ed397e5 100644
--- a/include/o3tl/unit_conversion.hxx
+++ b/include/o3tl/unit_conversion.hxx
@@ -221,6 +221,26 @@ template  constexpr auto 
convertSaturate(N n, U from, U
 return detail::MulDivSaturate(n, detail::md(from, to), detail::md(to, 
from));
 }
 
+// Conversion with saturation (only for integral types), optimized for return 
types smaller than
+// sal_Int64. In this case, it's easier to clamp input values to known bounds, 
than to do some
+// preprocessing to handle too large input values, just to clamp the result 
anyway. Use it like:
+//
+// sal_Int32 n = convertNarrowing(m);
+template  && std::is_integral_v && sizeof(Out) 
< sizeof(sal_Int64),
+  int> = 0>
+constexpr Out convertNarrowing(N n)
+{
+constexpr sal_Int64 nMin = 
convertSaturate(std::numeric_limits::min(), to, from);
+constexpr sal_Int64 nMax = 
convertSaturate(std::numeric_limits::max(), to, from);
+if (static_cast(n) > nMax)
+return std::numeric_limits::max();
+if (static_cast(n) < nMin)
+return std::numeric_limits::min();
+return convert(n, from, to);
+}
+
 // Return a pair { multiplier, divisor } for a given conversion
 template  constexpr std::pair 
getConversionMulDiv(U from, U to)
 {
diff --git a/include/oox/drawingml/drawingmltypes.hxx 
b/include/oox/drawingml/drawingmltypes.hxx
index 05d218fa882e..4350b8d033a7 100644
--- a/include/oox/drawingml/drawingmltypes.hxx
+++ b/include/oox/drawingml/drawingmltypes.hxx
@@ -180,9 +180,7 @@ inline sal_Int64 convertHmmToEmu( sal_Int32 nValue )
 /** Converts the passed 64-bit integer value from EMUs to 1/100 mm. */
 inline sal_Int32 convertEmuToHmm( sal_Int64 nValue )
 {
-return getLimitedValue(
-o3tl::convertSaturate(nValue, o3tl::Length::emu, o3tl::Length::mm100), 
SAL_MIN_INT32,
-SAL_MAX_INT32);
+return o3tl::convertNarrowing(nValue);
 }
 
 /** Converts the passed 64-bit integer value from EMUs to Points. */


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

2021-08-24 Thread Julien Nabet (via logerrit)
 sd/inc/strings.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d21a9968728295736e63bfc53eb83ee162dafae7
Author: Julien Nabet 
AuthorDate: Mon Aug 23 22:41:25 2021 +0200
Commit: Heiko Tietze 
CommitDate: Tue Aug 24 10:36:02 2021 +0200

tdf#144032: fix STR_ASK_DELETE_LAYER

Like this since initial import

Change-Id: Ie1b475e594860480159d4dea0d401f33b28adab2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120929
Tested-by: Jenkins
Reviewed-by: Sophie Gautier 
Reviewed-by: Heiko Tietze 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index e1f9f0706930..4103cc7e452b 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -84,7 +84,7 @@
 #define STR_UNDO_DELETEPAGES
NC_("STR_UNDO_DELETEPAGES", "Delete slides")
 #define STR_UNDO_DELETEPAGES_DRAW   
NC_("STR_UNDO_DELETEPAGES_DRAW", "Delete pages")
 #define STR_UNDO_INSERTPAGES
NC_("STR_UNDO_INSERTPAGES", "Insert slides")
-#define STR_ASK_DELETE_LAYER
NC_("STR_ASK_DELETE_LAYER", "Are you sure you want to delete the level 
\"$\"?\nNote: All objects on this level will be deleted!")
+#define STR_ASK_DELETE_LAYER
NC_("STR_ASK_DELETE_LAYER", "Are you sure you want to delete the layer 
\"$\"?\nNote: All objects on this layer will be deleted!")
 #define STR_ASK_DELETE_ALL_PICTURES 
NC_("STR_ASK_DELETE_ALL_PICTURES", "Do you really want to delete all images?")
 #define STR_UNDO_CHANGE_TITLE_AND_LAYOUT
NC_("STR_UNDO_CHANGE_TITLE_AND_LAYOUT", "Modify title and outline")
 #define STR_WAV_FILENC_("STR_WAV_FILE", 
"Audio")


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

2021-08-24 Thread Mike Kaganski (via logerrit)
 sc/source/core/data/table2.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 6e990842f827b8c719decb6301a240f64bf82e8d
Author: Mike Kaganski 
AuthorDate: Mon Aug 23 12:28:18 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue Aug 24 09:44:05 2021 +0200

tdf#144022: make sure to create missing columns if needed

Change-Id: I1a0771fbe8023859ab29d8114303b62f6a3d539c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120731
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 23c1ec0d498124fbe275145d236db455f83cd850)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120873
Reviewed-by: Xisco Fauli 
(cherry picked from commit e2100a4f6927d3e441881033cf20d6034719a5fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120881
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 3eabcc585850..7dca833d8277 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2904,20 +2904,20 @@ bool ScTable::RemoveFlags( SCCOL nStartCol, SCROW 
nStartRow, SCCOL nEndCol, SCRO
 void ScTable::SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr )
 {
 if (ValidColRow(rPos.Col(),rPos.Row()))
-aCol[rPos.Col()].SetPattern( rPos.Row(), rAttr );
+CreateColumnIfNotExists(rPos.Col()).SetPattern(rPos.Row(), rAttr);
 }
 
 const ScPatternAttr* ScTable::SetPattern( SCCOL nCol, SCROW nRow, 
std::unique_ptr pAttr )
 {
 if (ValidColRow(nCol,nRow))
-return aCol[nCol].SetPattern( nRow, std::move(pAttr) );
+return CreateColumnIfNotExists(nCol).SetPattern(nRow, 
std::move(pAttr));
 return nullptr;
 }
 
 void ScTable::SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr )
 {
 if (ValidColRow(nCol,nRow))
-aCol[nCol].SetPattern( nRow, rAttr );
+CreateColumnIfNotExists(nCol).SetPattern(nRow, rAttr);
 }
 
 void ScTable::ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr )


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 svtools/source/svrtf/parrtf.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6f790c8b31360463670439e6857ea64f418ddfbd
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 20:21:25 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 09:36:10 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index a11ec870cf4b..cbd3a97aad63 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -572,7 +572,7 @@ void SvRTFParser::ReadBitmapData()  { SkipGroup(); }
 
 SvParserState SvRTFParser::CallParser()
 {
-char cFirstCh;
+char cFirstCh(0);
 nNextChPos = rInput.Tell();
 rInput.ReadChar( cFirstCh );
 nNextCh = static_cast(cFirstCh);


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/ipbm/ipbm.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a620516fbdddc93b85430081e83fe6cecd9f8d12
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 19:59:09 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 09:35:54 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/vcl/source/filter/ipbm/ipbm.cxx b/vcl/source/filter/ipbm/ipbm.cxx
index 7794e611ef4c..87065a81c1ba 100644
--- a/vcl/source/filter/ipbm/ipbm.cxx
+++ b/vcl/source/filter/ipbm/ipbm.cxx
@@ -145,7 +145,7 @@ bool PBMReader::ImplReadHeader()
 boolbFinished = false;
 
 mrPBM.ReadUChar( nID[ 0 ] ).ReadUChar( nID[ 1 ] );
-if ( nID[ 0 ] != 'P' )
+if (!mrPBM.good() || nID[0] != 'P')
 return false;
 mnMaxVal = mnWidth = mnHeight = 0;
 switch ( nID[ 1 ] )


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/png/PngImageReader.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a0e92a64a9a6069ee21336888f3781ffe144b2df
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 20:17:42 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 09:35:37 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/vcl/source/filter/png/PngImageReader.cxx 
b/vcl/source/filter/png/PngImageReader.cxx
index c4e04ad0f1d8..e3b3703c1cab 100644
--- a/vcl/source/filter/png/PngImageReader.cxx
+++ b/vcl/source/filter/png/PngImageReader.cxx
@@ -55,8 +55,8 @@ bool isPng(SvStream& rStream)
 {
 // Check signature bytes
 sal_uInt8 aHeader[PNG_SIGNATURE_SIZE];
-rStream.ReadBytes(aHeader, PNG_SIGNATURE_SIZE);
-
+if (rStream.ReadBytes(aHeader, PNG_SIGNATURE_SIZE) != PNG_SIGNATURE_SIZE)
+return false;
 return png_sig_cmp(aHeader, 0, PNG_SIGNATURE_SIZE) == 0;
 }
 


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/igif/gifread.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 8351081be79d0b9d61aae2a6eb328a11e2393c92
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 20:15:16 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 09:35:19 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/vcl/source/filter/igif/gifread.cxx 
b/vcl/source/filter/igif/gifread.cxx
index 595e5cf18183..fa1270e6a135 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -256,14 +256,14 @@ bool GIFReader::ReadGlobalHeader()
 charpBuf[ 7 ];
 boolbRet = false;
 
-rIStm.ReadBytes( pBuf, 6 );
-if( NO_PENDING( rIStm ) )
+auto nRead = rIStm.ReadBytes(pBuf, 6);
+if (nRead == 6 && NO_PENDING(rIStm))
 {
 pBuf[ 6 ] = 0;
 if( !strcmp( pBuf, "GIF87a" ) || !strcmp( pBuf, "GIF89a" ) )
 {
-rIStm.ReadBytes( pBuf, 7 );
-if( NO_PENDING( rIStm ) )
+nRead = rIStm.ReadBytes(pBuf, 7);
+if (nRead == 7 && NO_PENDING(rIStm))
 {
 sal_uInt8   nAspect;
 sal_uInt8   nRF;


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/ieps/ieps.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 4556dd0f9d154c9b71b009f6dcf9f3e54d9a4d85
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 20:08:48 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 09:34:58 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/vcl/source/filter/ieps/ieps.cxx b/vcl/source/filter/ieps/ieps.cxx
index 946fbf30b3d7..7b5a0c96dd10 100644
--- a/vcl/source/filter/ieps/ieps.cxx
+++ b/vcl/source/filter/ieps/ieps.cxx
@@ -635,11 +635,12 @@ bool ImportEpsGraphic( SvStream & rStream, Graphic & 
rGraphic)
 nPSSize = rStream.Seek( STREAM_SEEK_TO_END ) - nOrigPos;
 }
 
-std::unique_ptr pHeader( new sal_uInt8[ 22 ] );
+std::vector aHeader(22, 0);
 rStream.Seek( nPSStreamPos );
-rStream.ReadBytes(pHeader.get(), 22); // check PostScript header
-bool bOk = ImplSearchEntry(pHeader.get(), reinterpret_cast("%!PS-Adobe"), 10, 10) &&
-   ImplSearchEntry(&pHeader[ 15 ], reinterpret_cast("EPS"), 3, 3);
+rStream.ReadBytes(aHeader.data(), 22); // check PostScript header
+sal_uInt8* pHeader = aHeader.data();
+bool bOk = ImplSearchEntry(pHeader, reinterpret_cast("%!PS-Adobe"), 10, 10) &&
+   ImplSearchEntry(pHeader + 15, reinterpret_cast("EPS"), 3, 3);
 if (bOk)
 {
 rStream.Seek(nPSStreamPos);


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/iras/iras.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fe90f7fc34f8a6e354abbb48c21556d018fa768d
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 20:03:26 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 09:34:38 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/vcl/source/filter/iras/iras.cxx b/vcl/source/filter/iras/iras.cxx
index 415e3224d6fb..cc0c2a5062a9 100644
--- a/vcl/source/filter/iras/iras.cxx
+++ b/vcl/source/filter/iras/iras.cxx
@@ -94,7 +94,7 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
 
 m_rRAS.SetEndian( SvStreamEndian::BIG );
 m_rRAS.ReadUInt32( nMagicNumber );
-if ( nMagicNumber != SUNRASTER_MAGICNUMBER )
+if (!m_rRAS.good() || nMagicNumber != SUNRASTER_MAGICNUMBER)
 return false;
 
 // Kopf einlesen:


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/ipcd/ipcd.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 6097ea726dcc087694a600cf823761097e3ba13e
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 20:01:07 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 09:34:18 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/vcl/source/filter/ipcd/ipcd.cxx b/vcl/source/filter/ipcd/ipcd.cxx
index 10c4abc30549..b3377c8934e3 100644
--- a/vcl/source/filter/ipcd/ipcd.cxx
+++ b/vcl/source/filter/ipcd/ipcd.cxx
@@ -162,7 +162,6 @@ bool PCDReader::ReadPCD( Graphic & rGraphic, 
FilterConfigItem* pConfigItem )
 return bStatus;
 }
 
-
 void PCDReader::CheckPCDImagePacFile()
 {
 char Buf[ 8 ];
@@ -170,11 +169,10 @@ void PCDReader::CheckPCDImagePacFile()
 m_rPCD.Seek( 2048 );
 m_rPCD.ReadBytes(Buf, 7);
 Buf[ 7 ] = 0;
-if (Buf != std::string_view("PCD_IPI"))
+if (!m_rPCD.good() || Buf != std::string_view("PCD_IPI"))
 bStatus = false;
 }
 
-
 void PCDReader::ReadOrientation()
 {
 if ( !bStatus )
@@ -184,7 +182,6 @@ void PCDReader::ReadOrientation()
 nOrientation &= 0x03;
 }
 
-
 void PCDReader::ReadImage()
 {
 sal_uInt32  nx,ny,nW2,nH2,nYPair,ndy,nXPair;


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 vcl/source/gdi/svmconverter.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 33c1ba1209c7ce679889270edbf42fa66b317895
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 17:40:23 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 09:34:01 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index 8981ceb56fdc..126807b8f691 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -294,8 +294,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, 
GDIMetaFile& rMtf )
 
 // check header-magic and version
 if( rIStm.GetError()
-|| ( memcmp( aCode, "SVGDI", sizeof( aCode ) ) != 0 )
-|| ( nVersion != 200 ) )
+|| ( nVersion != 200 )
+|| ( memcmp( aCode, "SVGDI", sizeof( aCode ) ) != 0 ) )
 {
 SAL_WARN("vcl.gdi", "svm: wrong check for header-magic and version");
 lcl_error(rIStm, nOldFormat, nPos);


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/xistream.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 763996f29aef31f95c438738d081d9b361db36e3
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 19:55:59 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 09:33:41 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/sc/source/filter/excel/xistream.cxx 
b/sc/source/filter/excel/xistream.cxx
index df5500cc376d..702ae253e143 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -389,10 +389,10 @@ XclBiff XclImpStream::DetectBiffVersion( SvStream& rStrm )
 XclBiff eBiff = EXC_BIFF_UNKNOWN;
 
 rStrm.Seek( STREAM_SEEK_TO_BEGIN );
-sal_uInt16 nBofId, nBofSize;
+sal_uInt16 nBofId(0), nBofSize(0);
 rStrm.ReadUInt16( nBofId ).ReadUInt16( nBofSize );
 
-if( (4 <= nBofSize) && (nBofSize <= 16) ) switch( nBofId )
+if (rStrm.good() && 4 <= nBofSize && nBofSize <= 16) switch( nBofId )
 {
 case EXC_ID2_BOF:
 eBiff = EXC_BIFF2;
@@ -405,7 +405,7 @@ XclBiff XclImpStream::DetectBiffVersion( SvStream& rStrm )
 break;
 case EXC_ID5_BOF:
 {
-sal_uInt16 nVersion;
+sal_uInt16 nVersion(0);
 rStrm.ReadUInt16( nVersion );
 // #i23425# #i44031# #i62752# there are some *really* broken 
documents out there...
 switch( nVersion & 0xFF00 )


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

2021-08-24 Thread Caolán McNamara (via logerrit)
 filter/source/graphicfilter/icgm/class4.cxx |   18 --
 sd/qa/unit/data/cgm/pass/ofz-ubsan-2.cgm|binary
 2 files changed, 12 insertions(+), 6 deletions(-)

New commits:
commit 253c8adddb04529185c74aef5e5278eb71d309ab
Author: Caolán McNamara 
AuthorDate: Mon Aug 23 17:24:14 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 24 09:33:18 2021 +0200

ofz: cgm Integer-overflow

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

diff --git a/filter/source/graphicfilter/icgm/class4.cxx 
b/filter/source/graphicfilter/icgm/class4.cxx
index 04b8f7c6fb63..2129a0f96bcb 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -543,12 +543,18 @@ void CGM::ImplDoClass4()
 
 if ( mbFigure )
 {
-tools::Rectangle aBoundingBox(aCenter.X - aRadius.X, 
aCenter.Y - aRadius.X);
-aBoundingBox.SaturatingSetSize(Size(2 * aRadius.X, 2 * 
aRadius.X));
-tools::Polygon aPolygon( aBoundingBox,
-Point( static_cast(vector[ 0 ]), 
static_cast(vector[ 1 ]) ),
-Point( static_cast(vector[ 2 ]), 
static_cast(vector[ 3 ]) ), PolyStyle::Arc );
-mpOutAct->RegPolyLine( aPolygon );
+double fLeft = aCenter.X - aRadius.X;
+double fTop = aCenter.Y - aRadius.X;
+bUseless = useless(fLeft) || useless(fTop);
+if (!bUseless)
+{
+tools::Rectangle aBoundingBox(fLeft, fTop);
+aBoundingBox.SaturatingSetSize(Size(2 * aRadius.X, 
2 * aRadius.X));
+tools::Polygon aPolygon( aBoundingBox,
+Point( static_cast(vector[ 0 ]), 
static_cast(vector[ 1 ]) ),
+Point( static_cast(vector[ 2 ]), 
static_cast(vector[ 3 ]) ), PolyStyle::Arc );
+mpOutAct->RegPolyLine( aPolygon );
+}
 }
 else
 {
diff --git a/sd/qa/unit/data/cgm/pass/ofz-ubsan-2.cgm 
b/sd/qa/unit/data/cgm/pass/ofz-ubsan-2.cgm
new file mode 100644
index ..08692230b903
Binary files /dev/null and b/sd/qa/unit/data/cgm/pass/ofz-ubsan-2.cgm differ


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

2021-08-24 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/uicalc/data/tdf143979.ods |binary
 sc/qa/unit/uicalc/uicalc.cxx |   24 
 2 files changed, 24 insertions(+)

New commits:
commit 39a11e3287febeb9dd56f43da6f6612afeb0f512
Author: Xisco Fauli 
AuthorDate: Mon Aug 23 18:51:11 2021 +0200
Commit: Xisco Fauli 
CommitDate: Tue Aug 24 09:24:19 2021 +0200

tdf#143979: sc_uicalc: Add unittest

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

diff --git a/sc/qa/unit/uicalc/data/tdf143979.ods 
b/sc/qa/unit/uicalc/data/tdf143979.ods
new file mode 100644
index ..0ebc22d62ff7
Binary files /dev/null and b/sc/qa/unit/uicalc/data/tdf143979.ods differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 034df5aa3e7d..b7f272883fe9 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -1739,6 +1739,30 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, 
testTdf126540_GridToggleModifiesTheDocument)
 CPPUNIT_ASSERT(pDocSh->IsModified());
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf143979)
+{
+ScModelObj* pModelObj = createDoc("tdf143979.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+
+goToCell("A5:B79");
+
+dispatchCommand(mxComponent, ".uno:Copy", {});
+Scheduler::ProcessEventsToIdle();
+
+goToCell("D5");
+
+//Without the fix in place, this test would have crashed
+dispatchCommand(mxComponent, ".uno:PasteTransposed", {});
+Scheduler::ProcessEventsToIdle();
+
+for (size_t i = 3; i < 76; ++i)
+{
+OUString sExpected = "A" + OUString::number(i + 2);
+CPPUNIT_ASSERT_EQUAL(sExpected, pDoc->GetString(ScAddress(i, 4, 0)));
+}
+}
+
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf126926)
 {
 mxComponent = loadFromDesktop("private:factory/scalc");


[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore2' - 3 commits - drawinglayer/CppunitTest_drawinglayer_processors.mk drawinglayer/inc drawinglayer/Library_drawinglayer.mk drawinglayer/

2021-08-24 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 86b6ba7be8425a1bbb5872fc4bcbe6c2543aea67
Author: Tomaž Vajngerl 
AuthorDate: Tue Aug 24 11:02:40 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Aug 24 16:18:28 2021 +0900

SVG export for drawinglayer primitives

Change-Id: I34e17eeb9695c9a8b23178611c149f89a28a210c

diff --git a/drawinglayer/CppunitTest_drawinglayer_processors.mk 
b/drawinglayer/CppunitTest_drawinglayer_processors.mk
index b17a5107dc2d..fd0eb0b365c1 100644
--- a/drawinglayer/CppunitTest_drawinglayer_processors.mk
+++ b/drawinglayer/CppunitTest_drawinglayer_processors.mk
@@ -38,6 +38,7 @@ $(eval $(call 
gb_CppunitTest_use_externals,drawinglayer_processors,\
 $(eval $(call gb_CppunitTest_add_exception_objects,drawinglayer_processors, \
drawinglayer/qa/unit/vclmetafileprocessor2d \
drawinglayer/qa/unit/vclpixelprocessor2d \
+   drawinglayer/qa/unit/SvgExportTest \
 ))
 
 $(eval $(call gb_CppunitTest_use_ure,drawinglayer_processors))
diff --git a/drawinglayer/Library_drawinglayer.mk 
b/drawinglayer/Library_drawinglayer.mk
index 6cee84ede118..8f2c99f1c12f 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -189,6 +189,7 @@ $(eval $(call 
gb_Library_add_exception_objects,drawinglayer,\
 drawinglayer/source/texture/texture \
 drawinglayer/source/dumper/XShapeDumper \
 drawinglayer/source/dumper/EnhancedShapeDumper \
+drawinglayer/source/tools/SvgWriter \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/drawinglayer/qa/unit/SvgExportTest.cxx 
b/drawinglayer/qa/unit/SvgExportTest.cxx
new file mode 100644
index ..98198c2306e9
--- /dev/null
+++ b/drawinglayer/qa/unit/SvgExportTest.cxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+using namespace drawinglayer;
+
+class SvgExportTest : public test::BootstrapFixture
+{
+public:
+SvgExportTest()
+: BootstrapFixture(true, false)
+{
+}
+
+CPPUNIT_TEST_SUITE(SvgExportTest);
+CPPUNIT_TEST(test);
+CPPUNIT_TEST_SUITE_END();
+
+void test()
+{
+SvFileStream aStream("~/test.svg", StreamMode::WRITE | 
StreamMode::TRUNC);
+
+primitive2d::Primitive2DContainer aPrimitives;
+
+basegfx::BColor aBColor(1.0, 0.0, 0.0);
+
+auto aPolygon
+= 
basegfx::utils::createPolygonFromRect(basegfx::B2DRectangle(10.0, 10.0, 50.0, 
60.0));
+basegfx::B2DPolyPolygon aPolyPolygon(aPolygon);
+
+auto pStrokePrimitive(
+new 
drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(aPolyPolygon, aBColor));
+
+
aPrimitives.push_back(drawinglayer::primitive2d::Primitive2DReference(pStrokePrimitive));
+
+svg::SvgWriter aWriter(aStream, svg::SvgVersion::v1_1);
+aWriter.write(aPrimitives);
+}
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SvgExportTest);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/tools/SvgWriter.cxx 
b/drawinglayer/source/tools/SvgWriter.cxx
new file mode 100644
index ..c0435d19a001
--- /dev/null
+++ b/drawinglayer/source/tools/SvgWriter.cxx
@@ -0,0 +1,211 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+
+namespace svg
+{
+SvgWriter::SvgWriter(SvStream& rStream, SvgVersion eSvgVersion)
+: mrStream(rStream)
+, maWriter(&mrStream)
+, meSvgVersion(eSvgVersion)
+{
+}
+
+bool SvgWriter::write(const drawinglayer::primitive2d::Primitive2DContainer& 
rPrimitive2DSequence)
+{
+maWriter.startDocument();
+maWriter.startElement("svg");
+OString aVersion = meSvgVersion == SvgVersion::v1_1 ? "1.1" : "2";
+maWriter.attribute("version", aVersion);
+maWriter.attribute("xmlns", "http://www.w3.org/2000/svg";);
+
+drawinglayer::primitive2d::VisitorParameters aParameters; // default
+
+auto aRange = rPrimitive2DSequence.getB2DRange(aParameters);
+
+maWriter.attribute("width", aRange.getWidth());
+maWriter.attribute("height", aRange.getHeight());
+
+decomposeAndWrite(rPrimi