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

2021-05-11 Thread László Németh (via logerrit)
 sw/qa/extras/uiwriter/data/tdf142196.fodt |   30 +++
 sw/qa/extras/uiwriter/uiwriter2.cxx   |   47 --
 sw/source/core/inc/flyfrm.hxx |3 +
 sw/source/core/layout/fly.cxx |1 
 sw/source/core/layout/paintfrm.cxx|   10 ++
 sw/source/core/text/porlay.cxx|   44 
 6 files changed, 127 insertions(+), 8 deletions(-)

New commits:
commit 1610eeef6f2312616fe5d3535475f27f7896bef8
Author: László Németh 
AuthorDate: Tue May 11 18:40:18 2021 +0200
Commit: László Németh 
CommitDate: Wed May 12 08:44:00 2021 +0200

tdf#142196 sw: crossing out images anchored to character

Follow-up to commit d845b91bcc6eb885c55494d4d4fab4ec09577e1d
(tdf#78864 sw track changes: cross out deleted images).

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

diff --git a/sw/qa/extras/uiwriter/data/tdf142196.fodt 
b/sw/qa/extras/uiwriter/data/tdf142196.fodt
new file mode 100644
index ..b184ba22e67f
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf142196.fodt
@@ -0,0 +1,30 @@
+
+http://purl.org/dc/elements/1.1/"; 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ 
+  
+  
+   
+  
+ 
+ 
+  
+   
+
+ 
+  
+   X
+   2021-05-07T17:32:23
+  
+ 
+
+   
+   Lorem 
+  
iVBORw0KGgoNSUhEUgEBCAA6fptVAmJLR0QA/4ePzL8JcEhZ
+   cwAACxMAAAsTAQCanBgHdElNRQflBQYKGR4LTuGQCklEQVQI12M4DwAA0QDQfVbA
+   HQBJRU5ErkJggg==
+  
+ 
+ipsum dolor sit amet.
+  
+ 
+
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index b2c5a71e1164..02d8163cc95e 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -2194,9 +2194,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf142130)
 xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
 CPPUNIT_ASSERT(pXmlDoc);
 
-// This was 6 (crossing out of the first, not deleted image)
-// (4 lines = 2 lines for crossing out of the second image, 2 lines for the
-// vertical lines before the two lines)
+// This was 6 (bad crossing out of the first, not deleted image)
+// (4 lines = 2 lines for crossing out of the second image + 2 lines =
+// vertical "changed line" indicator before the two paragraph lines)
 assertXPath(pXmlDoc, "/metafile/push/push/push/line", 4);
 
 // reject deletion of the second image
@@ -2209,6 +2209,47 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf142130)
 assertXPath(pXmlDoc2, "/metafile/push/push/push/line", 0);
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf142196)
+{
+load(DATA_DIRECTORY, "tdf142196.fodt");
+
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+
+//turn on red-lining and show changes
+SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+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()));
+
+// Dump the rendering of the first page as an XML file.
+SwDocShell* pShell = pTextDoc->GetDocShell();
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+CPPUNIT_ASSERT(pXmlDoc);
+
+// This was 1 (missing crossing out of the deleted image)
+// (2 lines = crossing out of the deleted image + 1 line for the
+// vertical "changed line" indicator before the paragraph line)
+assertXPath(pXmlDoc, "//line", 3);
+
+// reject deletion of the image
+IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+rIDRA.AcceptAllRedline(false);
+
+xMetaFile = pShell->GetPreviewMetaFile();
+xmlDocUniquePtr pXmlDoc2 = dumpAndParse(dumper, *xMetaFile);
+
+// no crossing out and vertical "changed line" indicator
+assertXPath(pXmlDoc2, "//line", 0);
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf139120)
 {
 SwDoc* pDoc = createDoc("tdf54819.fodt");
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index 6072d7a4d033..399bbbe913fe 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -13

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

2021-05-11 Thread Mike Kaganski (via logerrit)
 sw/source/uibase/uiview/view.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 8ca83e3801ee8e6359159ab4c222eedbf76e63dc
Author: Mike Kaganski 
AuthorDate: Tue May 11 20:58:50 2021 +0200
Commit: Mike Kaganski 
CommitDate: Wed May 12 06:16:55 2021 +0200

Revert "tdf#141015: Show Mail Merge toolbar when DBData has data source"

This reverts commit 346153f08c907739ca310934ad45814379971027.
It seems to create more problems than expected, and there's no
way to remove DB association other than editing document XML.

Change-Id: I93171f17c01e231abbcfa9a816fdadce83c983ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115283
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 2009af1c0fb4fead653dd7688347c15d74eaa1b0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115286

diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 3e10ab192e5a..ff6f2bc82349 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -439,9 +439,7 @@ void SwView::SelectShell()
 }
 
 // Show Mail Merge toolbar initially for documents with Database fields
-if (!m_bInitOnceCompleted
-&& (GetWrtShell().IsAnyDatabaseFieldInDoc()
-|| !GetWrtShell().GetDBData().sDataSource.isEmpty()))
+if (!m_bInitOnceCompleted && GetWrtShell().IsAnyDatabaseFieldInDoc())
 ShowUIElement("private:resource/toolbar/mailmerge");
 
 // Activate the toolbar to the new selection which also was active 
last time.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread merttumer (via logerrit)
 vcl/source/window/layout.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit 0a0d19f8d604ea9560484817948f690978c8489a
Author: merttumer 
AuthorDate: Fri May 7 10:19:05 2021 +
Commit: Mert Tumer 
CommitDate: Wed May 12 05:55:56 2021 +0200

android: Fix DrawingArea inside CsvTableBox is shrinked

Change-Id: Ia722297051eb3413b9db17024173c9eb596d8e7a
Signed-off-by: merttumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115235
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 110ffa6b4f87..edebff002f8f 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -7,6 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -262,6 +263,14 @@ void VclBox::setAllocation(const Size &rAllocation)
 {
 Size aRequisition = calculateRequisition();
 nExtraSpace = (getPrimaryDimension(rAllocation) - 
getPrimaryDimension(aRequisition)) / nExpandChildren;
+// In mobile, the screen size is small and extraSpace can become negative
+// Though the dialogs are rendered in javascript for LOK Android some widgets 
like weld::DrawingArea
+// is sent as bitmap but it is rendered from only the visible part
+// when it gets negative, it shrinks instead of expands and it becomes 
invisible
+#if HAVE_FEATURE_ANDROID_LOK
+if (nExtraSpace < 0)
+nExtraSpace = 0;
+#endif
 }
 
 //Split into those we pack from the start onwards, and those we pack from 
the end backwards
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Mike Kaganski (via logerrit)
 sc/source/ui/view/tabview3.cxx |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 8bdbc928cb2d79e161aaa6a5ac1cd816ab6c591b
Author: Mike Kaganski 
AuthorDate: Tue May 11 21:03:19 2021 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed May 12 02:42:48 2021 +0200

tdf#139241: partially revert 059f07f9f33460c809a93e0fda1165f5c6f6d805

And instead normalize the start and end values before creating
rectangle.

Change-Id: Ib9921f1a537ca88a70cedf989d2f696180ad68e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115284
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 05f8f239d49bd66145e736b4e2e28ad073ef6f2f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115285
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 214f5a02ca3d..bdb78e9c2e98 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -65,6 +65,8 @@
 #include 
 #include 
 
+#include 
+
 #include 
 
 namespace
@@ -2684,9 +2686,11 @@ void ScTabView::PaintTopArea( SCCOL nStartCol, SCCOL 
nEndCol )
 tools::Long nStartX = aViewData.GetScrPos( nStartCol, 0, eWhich 
).X();
 tools::Long nEndX;
 if (nEndCol >= rDoc.MaxCol())
-nEndX = nStartX + (bLayoutRTL ? 0 : ( aWinSize.Width()-1 ));
+nEndX = bLayoutRTL ? 0 : ( aWinSize.Width()-1 );
 else
 nEndX = aViewData.GetScrPos( nEndCol+1, 0, eWhich ).X() - 
nLayoutSign;
+if (nStartX > nEndX)
+std::swap(nStartX, nEndX);
 pColBar[eWhich]->Invalidate(
 tools::Rectangle( nStartX, 0, nEndX, aWinSize.Height()-1 ) 
);
 }
@@ -2737,9 +2741,11 @@ void ScTabView::PaintLeftArea( SCROW nStartRow, SCROW 
nEndRow )
 tools::Long nStartY = aViewData.GetScrPos( 0, nStartRow, eWhich 
).Y();
 tools::Long nEndY;
 if (nEndRow >= rDoc.MaxRow())
-nEndY = nStartY + aWinSize.Height() - 1;
+nEndY = aWinSize.Height() - 1;
 else
 nEndY = aViewData.GetScrPos( 0, nEndRow+1, eWhich ).Y() - 1;
+if (nStartY > nEndY)
+std::swap(nStartY, nEndY);
 pRowBar[eWhich]->Invalidate(
 tools::Rectangle( 0, nStartY, aWinSize.Width()-1, nEndY ) 
);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/ucalc.cxx   |   35 ++
 sc/qa/unit/ucalc.hxx   |   33 -
 sc/qa/unit/ucalc_formula.cxx   |   66 +--
 sc/qa/unit/ucalc_pivottable.cxx|   53 ++---
 sc/qa/unit/ucalc_sharedformula.cxx |   90 ++---
 sc/qa/unit/ucalc_sort.cxx  |   64 +-
 6 files changed, 153 insertions(+), 188 deletions(-)

New commits:
commit 5d7251c7121cee8885fa9f2387c4a0625dd4ecee
Author: Xisco Fauli 
AuthorDate: Tue May 11 22:25:02 2021 +0200
Commit: Xisco Fauli 
CommitDate: Tue May 11 23:21:21 2021 +0200

sc_ucalc: remove duplicated method

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

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 2774772365b1..46220aa76f55 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -924,12 +924,11 @@ struct HoriIterCheck
 const char* pVal;
 };
 
-template
-bool checkHorizontalIterator(ScDocument& rDoc, const char* pData[][Size], 
size_t nDataCount, const HoriIterCheck* pChecks, size_t nCheckCount)
+bool checkHorizontalIterator(ScDocument& rDoc, const 
std::vector>& rData, const HoriIterCheck* pChecks, 
size_t nCheckCount)
 {
 ScAddress aPos(0,0,0);
-Test::insertRangeData(&rDoc, aPos, pData, nDataCount);
-ScHorizontalCellIterator aIter(rDoc, 0, 0, 0, 1, nDataCount-1);
+Test::insertRangeData(&rDoc, aPos, rData);
+ScHorizontalCellIterator aIter(rDoc, 0, 0, 0, 1, rData.size() - 1);
 
 SCCOL nCol;
 SCROW nRow;
@@ -974,7 +973,7 @@ void Test::testHorizontalIterator()
 
 {
 // Raw data - mixed types
-const char* aData[][2] = {
+std::vector> aData = {
 { "A", "B" },
 { "C", "1" },
 { "D", "2" },
@@ -993,7 +992,7 @@ void Test::testHorizontalIterator()
 };
 
 bool bRes = checkHorizontalIterator(
-*m_pDoc, aData, SAL_N_ELEMENTS(aData), aChecks, 
SAL_N_ELEMENTS(aChecks));
+*m_pDoc, aData, aChecks, SAL_N_ELEMENTS(aChecks));
 
 if (!bRes)
 CPPUNIT_FAIL("Failed on test mixed.");
@@ -1001,7 +1000,7 @@ void Test::testHorizontalIterator()
 
 {
 // Raw data - 'hole' data
-const char* aData[][2] = {
+std::vector> aData = {
 { "A", "B" },
 { "C",  nullptr  },
 { "D", "E" },
@@ -1016,7 +1015,7 @@ void Test::testHorizontalIterator()
 };
 
 bool bRes = checkHorizontalIterator(
-*m_pDoc, aData, SAL_N_ELEMENTS(aData), aChecks, 
SAL_N_ELEMENTS(aChecks));
+*m_pDoc, aData, aChecks, SAL_N_ELEMENTS(aChecks));
 
 if (!bRes)
 CPPUNIT_FAIL("Failed on test hole.");
@@ -1024,7 +1023,7 @@ void Test::testHorizontalIterator()
 
 {
 // Very holy data
-const char* aData[][2] = {
+std::vector> aData = {
 {  nullptr,  "A" },
 {  nullptr,   nullptr  },
 {  nullptr,  "1" },
@@ -1049,7 +1048,7 @@ void Test::testHorizontalIterator()
 };
 
 bool bRes = checkHorizontalIterator(
-*m_pDoc, aData, SAL_N_ELEMENTS(aData), aChecks, 
SAL_N_ELEMENTS(aChecks));
+*m_pDoc, aData, aChecks, SAL_N_ELEMENTS(aChecks));
 
 if (!bRes)
 CPPUNIT_FAIL("Failed on test holy.");
@@ -1057,14 +1056,14 @@ void Test::testHorizontalIterator()
 
 {
 // Degenerate case
-const char* aData[][2] = {
+std::vector> aData = {
 {  nullptr,   nullptr },
 {  nullptr,   nullptr },
 {  nullptr,   nullptr },
 };
 
 bool bRes = checkHorizontalIterator(
-*m_pDoc, aData, SAL_N_ELEMENTS(aData), nullptr, 0);
+*m_pDoc, aData, nullptr, 0);
 
 if (!bRes)
 CPPUNIT_FAIL("Failed on test degenerate.");
@@ -1072,7 +1071,7 @@ void Test::testHorizontalIterator()
 
 {
 // Data at end
-const char* aData[][2] = {
+std::vector> aData = {
 {  nullptr,   nullptr },
 {  nullptr,   nullptr },
 {  nullptr,  "A" },
@@ -1083,7 +1082,7 @@ void Test::testHorizontalIterator()
 };
 
 bool bRes = checkHorizontalIterator(
-*m_pDoc, aData, SAL_N_ELEMENTS(aData), aChecks, 
SAL_N_ELEMENTS(aChecks));
+*m_pDoc, aData, aChecks, SAL_N_ELEMENTS(aChecks));
 
 if (!bRes)
 CPPUNIT_FAIL("Failed on test at end.");
@@ -1091,7 +1090,7 @@ void Test::testHorizontalIterator()
 
 {
 // Data in middle
-const char* aData[][2] = {
+std::vector> aData = {
 {  nullptr,   nullptr  },
 {  nullptr,   nullptr  },
 {  nullptr,  "A" },
@@ -1105,7 +1104,7 @@ void Test::testHorizontalIterator()
 };
 
 bool bRes 

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

2021-05-11 Thread Mike Kaganski (via logerrit)
 sw/source/uibase/uiview/view.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 2009af1c0fb4fead653dd7688347c15d74eaa1b0
Author: Mike Kaganski 
AuthorDate: Tue May 11 20:58:50 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue May 11 22:34:26 2021 +0200

Revert "tdf#141015: Show Mail Merge toolbar when DBData has data source"

This reverts commit 346153f08c907739ca310934ad45814379971027.
It seems to create more problems than expected, and there's no
way to remove DB association other than editing document XML.

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

diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index c874e021375a..58012edabf60 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -453,9 +453,7 @@ void SwView::SelectShell()
 }
 
 // Show Mail Merge toolbar initially for documents with Database fields
-if (!m_bInitOnceCompleted
-&& (GetWrtShell().IsAnyDatabaseFieldInDoc()
-|| !GetWrtShell().GetDBData().sDataSource.isEmpty()))
+if (!m_bInitOnceCompleted && GetWrtShell().IsAnyDatabaseFieldInDoc())
 ShowUIElement("private:resource/toolbar/mailmerge");
 
 // Activate the toolbar to the new selection which also was active 
last time.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Bartosz Kosiorek (via logerrit)
 emfio/qa/cppunit/emf/EmfImportTest.cxx  |   36 +++-
 emfio/qa/cppunit/emf/data/TestRoundRect.emf |binary
 emfio/source/reader/emfreader.cxx   |5 ++-
 3 files changed, 38 insertions(+), 3 deletions(-)

New commits:
commit 2a416c0c4a1635af8be5b1167fd1f06bdc4a2466
Author: Bartosz Kosiorek 
AuthorDate: Tue May 11 17:24:20 2021 +0200
Commit: Xisco Fauli 
CommitDate: Tue May 11 22:34:34 2021 +0200

tdf#141982 tdf#142139 Add rotation and line width support to ROUNDRECT

With this commit the ROUNDRECT is able to change line width and
transformation (including rotation) is supported.

Change-Id: Ic303a74adf0fd0dd452353f250a13140603d492e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115429
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek 
(cherry picked from commit f11ed681df15728abe6a0b6b7b1612f190aa1707)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115282
Reviewed-by: Xisco Fauli 

diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx 
b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index 8dc864fb657e..52fab033941a 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -56,6 +56,7 @@ class Test : public test::BootstrapFixture, public 
XmlTestTools, public unotest:
 void TestEllipseXformIntersectClipRect();
 void TestDrawPolyLine16WithClip();
 void TestFillRegion();
+void TestRoundRect();
 void TestCreatePen();
 void TestPdfInEmf();
 
@@ -80,6 +81,7 @@ public:
 CPPUNIT_TEST(TestEllipseXformIntersectClipRect);
 CPPUNIT_TEST(TestDrawPolyLine16WithClip);
 CPPUNIT_TEST(TestFillRegion);
+CPPUNIT_TEST(TestRoundRect);
 CPPUNIT_TEST(TestCreatePen);
 CPPUNIT_TEST(TestPdfInEmf);
 CPPUNIT_TEST_SUITE_END();
@@ -414,7 +416,7 @@ void Test::TestDrawPolyLine16WithClip()
 
 void Test::TestFillRegion()
 {
-// Check import of EMF image with records: CREATEBRUSHINDIRECT, FILLRGN. 
The SETICMMODE is also used.
+// EMF import with records: CREATEBRUSHINDIRECT, FILLRGN. The SETICMMODE 
is also used.
 Primitive2DSequence aSequence = 
parseEmf(u"/emfio/qa/cppunit/emf/data/TestFillRegion.emf");
 CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength()));
 drawinglayer::Primitive2dXmlDump dumper;
@@ -434,6 +436,38 @@ void Test::TestFillRegion()
 assertXPath(pDocument, 
"/primitive2D/metafile/transform/mask/polygonhairline[1]", "color", "#00");
 }
 
+void Test::TestRoundRect()
+{
+// EMF import with records: CREATEPEN, ROUNDRECT.
+Primitive2DSequence aSequence = 
parseEmf(u"/emfio/qa/cppunit/emf/data/TestRoundRect.emf");
+CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength()));
+drawinglayer::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = 
dumper.dumpAndParse(comphelper::sequenceToContainer(aSequence));
+CPPUNIT_ASSERT (pDocument);
+
+assertXPath(pDocument, "/primitive2D/metafile/transform/polypolygoncolor", 
2);
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/polypolygoncolor[1]/polypolygon",
+"path", "m100 100h4000v2000h-4000z");
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/polypolygoncolor[1]",
+"color", "#ff");
+
+assertXPath(pDocument, "/primitive2D/metafile/transform/polygonstroke", 2);
+assertXPathContent(pDocument, 
"/primitive2D/metafile/transform/polygonstroke[1]/polygon",
+   "100,100 4100,100 4100,2100 100,2100");
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/polygonstroke[1]/line",
+"color", "#ff");
+
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/polypolygoncolor[2]/polypolygon",
+"path", "m4090 
2650-10-50-10-30-50-90-100-110-20-10-30-20-20-20-30-20-90-40-100-30-170-30h-2730l-140
 20-130 40-90 40-30 20-20 20-30 20-20 10-100 110-50 90-10 30-10 50v1090l10 50 
10 30 50 90 100 110 20 10 30 20 20 20 30 20 90 40 100 30 170 30h2730l140-20 
130-40 90-40 30-20 20-20 30-20 20-10 100-110 50-90 10-30 10-50z");
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/polypolygoncolor[2]",
+"color", "#ff");
+
+assertXPathContent(pDocument, 
"/primitive2D/metafile/transform/polygonstroke[2]/polygon",
+   "4090,2650 4080,2600 4070,2570 4020,2480 3920,2370 
3900,2360 3870,2340 3850,2320 3820,2300 3730,2260 3630,2230 3460,2200 730,2200 
590,2220 460,2260 370,2300 340,2320 320,2340 290,2360 270,2370 170,2480 
120,2570 110,2600 100,2650 100,3740 110,3790 120,3820 170,3910 270,4020 
290,4030 320,4050 340,4070 370,4090 460,4130 560,4160 730,4190 3460,4190 
3600,4170 3730,4130 3820,4090 3850,4070 3870,4050 3900,4030 3920,4020 4020,3910 
4070,3820 4080,3790 4090,3740");
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/polygonstroke[2]/line",
+"color", "#ff");
+}
+
 void Test::TestCreatePen()
 {
 // Check import of EMF image with records: RESTO

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

2021-05-11 Thread Noel Grandin (via logerrit)
 sw/source/core/inc/UndoSection.hxx |3 ++-
 sw/source/core/undo/unsect.cxx |   28 +++-
 2 files changed, 17 insertions(+), 14 deletions(-)

New commits:
commit af691db0dadaed984cae206f895075b0313758c0
Author: Noel Grandin 
AuthorDate: Tue May 11 11:27:40 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue May 11 22:18:11 2021 +0200

fix leak in SwUndoInsSection

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

diff --git a/sw/source/core/inc/UndoSection.hxx 
b/sw/source/core/inc/UndoSection.hxx
index 29065404cbdb..25d51ccb9660 100644
--- a/sw/source/core/inc/UndoSection.hxx
+++ b/sw/source/core/inc/UndoSection.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class SfxItemSet;
 class SwTextNode;
@@ -40,7 +41,7 @@ class SwUndoInsSection : public SwUndo, private SwUndRng
 {
 private:
 const std::unique_ptr m_pSectionData;
-const std::unique_ptr> m_pTOXBase; /// set iff section is TOX
+std::optional, sw::RedlineMode, 
sw::FieldmarkMode>> m_xTOXBase; /// set iff section is TOX
 const std::unique_ptr m_pAttrSet;
 std::unique_ptr m_pHistory;
 std::unique_ptr m_pRedlData;
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index ea1d9ec3e2da..b2f14d8a4b44 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -79,16 +79,18 @@ SwUndoInsSection::SwUndoInsSection(
 std::tuple 
const*const pTOXBase)
 : SwUndo( SwUndoId::INSSECTION, &rPam.GetDoc() ), SwUndRng( rPam )
 , m_pSectionData(new SwSectionData(rNewData))
-, m_pTOXBase( pTOXBase
-? std::make_unique>(
-new SwTOXBase(*std::get<0>(*pTOXBase)), std::get<1>(*pTOXBase), 
std::get<2>(*pTOXBase))
-: nullptr )
 , m_pAttrSet( (pSet && pSet->Count()) ? new SfxItemSet( *pSet ) : nullptr )
 , m_nSectionNodePos(0)
 , m_bSplitAtStart(false)
 , m_bSplitAtEnd(false)
 , m_bUpdateFootnote(false)
 {
+if (pTOXBase)
+m_xTOXBase.emplace(
+std::make_unique(*std::get<0>(*pTOXBase)),
+std::get<1>(*pTOXBase),
+std::get<2>(*pTOXBase));
+
 SwDoc& rDoc = rPam.GetDoc();
 if( rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
 {
@@ -179,7 +181,7 @@ void SwUndoInsSection::RedoImpl(::sw::UndoRedoContext & 
rContext)
 SwPaM & rPam( AddUndoRedoPaM(rContext) );
 
 const SwTOXBaseSection* pUpdateTOX = nullptr;
-if (m_pTOXBase)
+if (m_xTOXBase)
 {
 SwRootFrame const* pLayout(nullptr);
 SwRootFrame * pLayoutToReset(nullptr);
@@ -187,15 +189,15 @@ void SwUndoInsSection::RedoImpl(::sw::UndoRedoContext & 
rContext)
 comphelper::ScopeGuard g([&]() {
 if (pLayoutToReset)
 {
-pLayoutToReset->SetHideRedlines(std::get<1>(*m_pTOXBase) 
== sw::RedlineMode::Shown);
+pLayoutToReset->SetHideRedlines(std::get<1>(*m_xTOXBase) 
== sw::RedlineMode::Shown);
 pLayoutToReset->SetFieldmarkMode(eFieldmarkMode);
 }
 });
 o3tl::sorted_vector layouts(rDoc.GetAllLayouts());
 for (SwRootFrame const*const p : layouts)
 {
-if ((std::get<1>(*m_pTOXBase) == sw::RedlineMode::Hidden) == 
p->IsHideRedlines()
-&& std::get<2>(*m_pTOXBase) == p->GetFieldmarkMode())
+if ((std::get<1>(*m_xTOXBase) == sw::RedlineMode::Hidden) == 
p->IsHideRedlines()
+&& std::get<2>(*m_xTOXBase) == p->GetFieldmarkMode())
 {
 pLayout = p;
 break;
@@ -206,13 +208,13 @@ void SwUndoInsSection::RedoImpl(::sw::UndoRedoContext & 
rContext)
 assert(!layouts.empty()); // must have one layout
 pLayoutToReset = *layouts.begin();
 eFieldmarkMode = pLayoutToReset->GetFieldmarkMode();
-pLayoutToReset->SetHideRedlines(std::get<1>(*m_pTOXBase) == 
sw::RedlineMode::Hidden);
-pLayoutToReset->SetFieldmarkMode(std::get<2>(*m_pTOXBase));
+pLayoutToReset->SetHideRedlines(std::get<1>(*m_xTOXBase) == 
sw::RedlineMode::Hidden);
+pLayoutToReset->SetFieldmarkMode(std::get<2>(*m_xTOXBase));
 pLayout = pLayoutToReset;
 }
 pUpdateTOX = rDoc.InsertTableOf( *rPam.GetPoint(),
 // don't expand: will be done by SwUndoUpdateIndex::RedoImpl()
-*std::get<0>(*m_pTOXBase), m_pAttrSet.get(), false, pLayout);
+*std::get<0>(*m_xTOXBase), m_pAttrSet.get(), false, pLayout);
 }
 else
 {
@@ -258,10 +260,10 @@ void SwUndoInsSection::RedoImpl(::sw::UndoRedoContext & 
rContext)
 void SwUndoInsSection::RepeatImpl(::sw::RepeatContext & rContext)
 {
 SwDoc & rDoc = rContext.GetDoc();
-if (m_pTOXBase)
+if (m_xTOXBase)
 {
 rDoc.InsertTableOf(*rContext.GetRepea

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

2021-05-11 Thread Mike Kaganski (via logerrit)
 sc/source/ui/view/tabview3.cxx |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 05f8f239d49bd66145e736b4e2e28ad073ef6f2f
Author: Mike Kaganski 
AuthorDate: Tue May 11 21:03:19 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue May 11 21:49:36 2021 +0200

tdf#139241: partially revert 059f07f9f33460c809a93e0fda1165f5c6f6d805

And instead normalize the start and end values before creating
rectangle.

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

diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 4bca2a4d92f8..3273999128d2 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -66,6 +66,8 @@
 #include 
 #include 
 
+#include 
+
 #include 
 
 namespace
@@ -2686,9 +2688,11 @@ void ScTabView::PaintTopArea( SCCOL nStartCol, SCCOL 
nEndCol )
 tools::Long nStartX = aViewData.GetScrPos( nStartCol, 0, eWhich 
).X();
 tools::Long nEndX;
 if (nEndCol >= rDoc.MaxCol())
-nEndX = nStartX + (bLayoutRTL ? 0 : ( aWinSize.Width()-1 ));
+nEndX = bLayoutRTL ? 0 : ( aWinSize.Width()-1 );
 else
 nEndX = aViewData.GetScrPos( nEndCol+1, 0, eWhich ).X() - 
nLayoutSign;
+if (nStartX > nEndX)
+std::swap(nStartX, nEndX);
 pColBar[eWhich]->Invalidate(
 tools::Rectangle( nStartX, 0, nEndX, aWinSize.Height()-1 ) 
);
 }
@@ -2739,9 +2743,11 @@ void ScTabView::PaintLeftArea( SCROW nStartRow, SCROW 
nEndRow )
 tools::Long nStartY = aViewData.GetScrPos( 0, nStartRow, eWhich 
).Y();
 tools::Long nEndY;
 if (nEndRow >= rDoc.MaxRow())
-nEndY = nStartY + aWinSize.Height() - 1;
+nEndY = aWinSize.Height() - 1;
 else
 nEndY = aViewData.GetScrPos( 0, nEndRow+1, eWhich ).Y() - 1;
+if (nStartY > nEndY)
+std::swap(nStartY, nEndY);
 pRowBar[eWhich]->Invalidate(
 tools::Rectangle( 0, nStartY, aWinSize.Width()-1, nEndY ) 
);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Adolfo Jayme Barrientos (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu |
2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b74fe262d889705ea6c27267bd7e6d57279367b9
Author: Adolfo Jayme Barrientos 
AuthorDate: Tue May 11 14:08:32 2021 -0500
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue May 11 14:08:32 2021 -0500

There’s no need to SHOUT to the user

Nowhere else in LibreOffice’s UI are keyboard shortcuts
indicated in all-caps. Don’t do it; we’re not in the ’90s.

Change-Id: Ieb8aa32797d422c2ac067fab5d061de6d2176908

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index 6f773011b5fa..2333c056d5d1 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -1735,7 +1735,7 @@
   Zoom & Pan
 
 
-  Zoom & Pan (CTRL to Zoom Out, SHIFT to 
Pan)
+  Zoom & Pan (Ctrl to Zoom Out, Shift to 
Pan)
 
 
   1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Juergen Funk (via logerrit)
Tag 'mimo-6.1.6.3.M15' created by Andras Timar  at 
2021-05-11 19:05 +

mimo-6.1.6.3.M15

Changes since libreoffice-6-1-branch-point-1685:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/tags/mimo-6.1.6.3.M15' - 0 commits -

2021-05-11 Thread (via logerrit)
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Juergen Funk (via logerrit)
Tag 'mimo-5.4.7.2.M7' created by Andras Timar  at 
2021-05-11 19:04 +

mimo-5.4.7.2.M7

Changes since libreoffice-5-4-branch-point-1287:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/tags/mimo-5.4.7.2.M7' - 0 commits -

2021-05-11 Thread (via logerrit)
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/commonfuzzer.mk

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/commonfuzzer.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit dd29ce678ad76019886cb24c1492c57388733aee
Author: Caolán McNamara 
AuthorDate: Tue May 11 17:25:11 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 20:42:21 2021 +0200

ofz#32899 missing scripting_BrowseNodeFactoryImpl_get_implementation

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

diff --git a/vcl/commonfuzzer.mk b/vcl/commonfuzzer.mk
index 18f39c1dc413..7e722c76b3c6 100644
--- a/vcl/commonfuzzer.mk
+++ b/vcl/commonfuzzer.mk
@@ -71,6 +71,7 @@ fuzzer_core_libraries = \
 package2 \
 sax \
 sb \
+scriptframe \
 spell \
 sfx \
 sofficeapp \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx |   48 ++
 1 file changed, 4 insertions(+), 44 deletions(-)

New commits:
commit 43335776cfc18cdc7addf33250cffc886d384186
Author: Caolán McNamara 
AuthorDate: Tue May 11 17:21:47 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 20:42:00 2021 +0200

gtk[3|4] don't create File Dialog with buttons that need to be removed

just create it without the offending buttons in the first place

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

diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx 
b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
index c0113822b27f..2b5081463403 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
@@ -117,14 +117,10 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< 
uno::XComponentContext
 
 OUString aFilePickerTitle = getResString( FILE_PICKER_TITLE_OPEN );
 
-m_pDialog = gtk_file_chooser_dialog_new(
-OUStringToOString( aFilePickerTitle, RTL_TEXTENCODING_UTF8 
).getStr(),
-nullptr,
-GTK_FILE_CHOOSER_ACTION_OPEN,
-getCancelText().getStr(), GTK_RESPONSE_CANCEL,
-getOpenText().getStr(), GTK_RESPONSE_ACCEPT,
-nullptr );
-
+m_pDialog = GTK_WIDGET(g_object_new(GTK_TYPE_FILE_CHOOSER_DIALOG,
+"title", 
OUStringToOString(aFilePickerTitle, RTL_TEXTENCODING_UTF8).getStr(),
+"action", GTK_FILE_CHOOSER_ACTION_OPEN,
+nullptr));
 gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), 
GTK_RESPONSE_ACCEPT );
 
 #if !GTK_CHECK_VERSION(4, 0, 0)
@@ -453,39 +449,6 @@ shrinkFilterName( const OUString &rFilterName, bool 
bAllowNoStar = false )
 return aRealName;
 }
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
-static void
-dialog_remove_buttons(GtkWidget *pActionArea)
-{
-GtkContainer *pContainer = GTK_CONTAINER( pActionArea );
-
-g_return_if_fail( pContainer != nullptr );
-
-GList *pChildren = gtk_container_get_children( pContainer );
-
-for( GList *p = pChildren; p; p = p->next )
-{
-GtkWidget *pWidget = GTK_WIDGET( p->data );
-if ( GTK_IS_BUTTON( pWidget ) )
-gtk_widget_destroy( pWidget );
-}
-
-g_list_free( pChildren );
-}
-
-static void
-dialog_remove_buttons( GtkDialog *pDialog )
-{
-g_return_if_fail( GTK_IS_DIALOG( pDialog ) );
-
-GtkWidget *pHeaderBar = gtk_dialog_get_header_bar(pDialog);
-if( pHeaderBar != nullptr )
-dialog_remove_buttons( pHeaderBar );
-else
-dialog_remove_buttons(gtk_dialog_get_action_area(pDialog));
-}
-#endif
-
 namespace {
 
 struct FilterTitleMatch
@@ -1786,9 +1749,6 @@ void SAL_CALL SalGtkFilePicker::initialize( const 
uno::Sequence& aArgu
 }
 
 gtk_file_chooser_set_action( GTK_FILE_CHOOSER( m_pDialog ), eAction);
-#if !GTK_CHECK_VERSION(4, 0, 0)
-dialog_remove_buttons( GTK_DIALOG( m_pDialog ) );
-#endif
 gtk_dialog_add_button(GTK_DIALOG( m_pDialog ),
   getCancelText().getStr(),
   GTK_RESPONSE_CANCEL);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: (5) messages are pending

2021-05-11 Thread Eike Rathke
Hi,

On Tuesday, 2021-05-11 03:57:28 -0700, some scammer wrote:

>   [2]RE-ACTIVATE ACCOUNT HERE    

Of course you do *NOT* follow that phishing instruction.

  Eike

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


signature.asc
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-05-11 Thread Bartosz Kosiorek (via logerrit)
 emfio/qa/cppunit/emf/EmfImportTest.cxx  |   36 +++-
 emfio/qa/cppunit/emf/data/TestRoundRect.emf |binary
 emfio/source/reader/emfreader.cxx   |5 ++-
 3 files changed, 38 insertions(+), 3 deletions(-)

New commits:
commit f11ed681df15728abe6a0b6b7b1612f190aa1707
Author: Bartosz Kosiorek 
AuthorDate: Tue May 11 17:24:20 2021 +0200
Commit: Bartosz Kosiorek 
CommitDate: Tue May 11 18:38:08 2021 +0200

tdf#141982 tdf#142139 Add rotation and line width support to ROUNDRECT

With this commit the ROUNDRECT is able to change line width and
transformation (including rotation) is supported.

Change-Id: Ic303a74adf0fd0dd452353f250a13140603d492e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115429
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek 

diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx 
b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index e5b1f3f54114..78e613e2eafa 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -58,6 +58,7 @@ class Test : public test::BootstrapFixture, public 
XmlTestTools, public unotest:
 void TestEllipseXformIntersectClipRect();
 void TestDrawPolyLine16WithClip();
 void TestFillRegion();
+void TestRoundRect();
 void TestCreatePen();
 void TestPdfInEmf();
 
@@ -82,6 +83,7 @@ public:
 CPPUNIT_TEST(TestEllipseXformIntersectClipRect);
 CPPUNIT_TEST(TestDrawPolyLine16WithClip);
 CPPUNIT_TEST(TestFillRegion);
+CPPUNIT_TEST(TestRoundRect);
 CPPUNIT_TEST(TestCreatePen);
 CPPUNIT_TEST(TestPdfInEmf);
 CPPUNIT_TEST_SUITE_END();
@@ -416,7 +418,7 @@ void Test::TestDrawPolyLine16WithClip()
 
 void Test::TestFillRegion()
 {
-// Check import of EMF image with records: CREATEBRUSHINDIRECT, FILLRGN. 
The SETICMMODE is also used.
+// EMF import with records: CREATEBRUSHINDIRECT, FILLRGN. The SETICMMODE 
is also used.
 Primitive2DSequence aSequence = 
parseEmf(u"/emfio/qa/cppunit/emf/data/TestFillRegion.emf");
 CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength()));
 drawinglayer::Primitive2dXmlDump dumper;
@@ -436,6 +438,38 @@ void Test::TestFillRegion()
 assertXPath(pDocument, 
"/primitive2D/metafile/transform/mask/polygonhairline[1]", "color", "#00");
 }
 
+void Test::TestRoundRect()
+{
+// EMF import with records: CREATEPEN, ROUNDRECT.
+Primitive2DSequence aSequence = 
parseEmf(u"/emfio/qa/cppunit/emf/data/TestRoundRect.emf");
+CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength()));
+drawinglayer::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = 
dumper.dumpAndParse(comphelper::sequenceToContainer(aSequence));
+CPPUNIT_ASSERT (pDocument);
+
+assertXPath(pDocument, "/primitive2D/metafile/transform/polypolygoncolor", 
2);
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/polypolygoncolor[1]/polypolygon",
+"path", "m100 100h4000v2000h-4000z");
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/polypolygoncolor[1]",
+"color", "#ff");
+
+assertXPath(pDocument, "/primitive2D/metafile/transform/polygonstroke", 2);
+assertXPathContent(pDocument, 
"/primitive2D/metafile/transform/polygonstroke[1]/polygon",
+   "100,100 4100,100 4100,2100 100,2100");
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/polygonstroke[1]/line",
+"color", "#ff");
+
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/polypolygoncolor[2]/polypolygon",
+"path", "m4090 
2650-10-50-10-30-50-90-100-110-20-10-30-20-20-20-30-20-90-40-100-30-170-30h-2730l-140
 20-130 40-90 40-30 20-20 20-30 20-20 10-100 110-50 90-10 30-10 50v1090l10 50 
10 30 50 90 100 110 20 10 30 20 20 20 30 20 90 40 100 30 170 30h2730l140-20 
130-40 90-40 30-20 20-20 30-20 20-10 100-110 50-90 10-30 10-50z");
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/polypolygoncolor[2]",
+"color", "#ff");
+
+assertXPathContent(pDocument, 
"/primitive2D/metafile/transform/polygonstroke[2]/polygon",
+   "4090,2650 4080,2600 4070,2570 4020,2480 3920,2370 
3900,2360 3870,2340 3850,2320 3820,2300 3730,2260 3630,2230 3460,2200 730,2200 
590,2220 460,2260 370,2300 340,2320 320,2340 290,2360 270,2370 170,2480 
120,2570 110,2600 100,2650 100,3740 110,3790 120,3820 170,3910 270,4020 
290,4030 320,4050 340,4070 370,4090 460,4130 560,4160 730,4190 3460,4190 
3600,4170 3730,4130 3820,4090 3850,4070 3870,4050 3900,4030 3920,4020 4020,3910 
4070,3820 4080,3790 4090,3740");
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/polygonstroke[2]/line",
+"color", "#ff");
+}
+
 void Test::TestCreatePen()
 {
 // Check import of EMF image with records: RESTOREDC, SAVEDC, MOVETOEX, 
LINETO, POLYLINE16, EXTTEXTOUTW with DxBuffer
diff --git a/emfio/qa/cppunit/emf/data/TestRoundRect.emf 
b/emfio/qa/cppunit/emf/data/TestR

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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/fpicker/SalGtkPicker.cxx |7 --
 vcl/unx/gtk3/gtksys.cxx   |   39 ++
 2 files changed, 39 insertions(+), 7 deletions(-)

New commits:
commit a9a9d66ec8fb07df7d5b08d94b6e0878006b6004
Author: Caolán McNamara 
AuthorDate: Tue May 11 16:31:53 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 18:23:40 2021 +0200

gtk4: replace gtk_dialog_run

with effectively the same thing, so still a loop within a loop.

File Dialog now appears and is semi-functional

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

diff --git a/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx 
b/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx
index 76c7739b723a..441cc8183402 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx
@@ -188,13 +188,6 @@ namespace
 };
 }
 
-#if GTK_CHECK_VERSION(4, 0, 0)
-gint gtk_dialog_run(GtkDialog*)
-{
-return 0;
-}
-#endif
-
 gint RunDialog::run()
 {
 if (mxToolkit.is())
diff --git a/vcl/unx/gtk3/gtksys.cxx b/vcl/unx/gtk3/gtksys.cxx
index cf5461fef023..6a3701e10686 100644
--- a/vcl/unx/gtk3/gtksys.cxx
+++ b/vcl/unx/gtk3/gtksys.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -257,6 +258,44 @@ static OString MapToGtkAccelerator(const OUString &rStr)
 return OUStringToOString(rStr.replaceFirst("~", "_"), 
RTL_TEXTENCODING_UTF8);
 }
 
+#if GTK_CHECK_VERSION(4, 0, 0)
+
+namespace
+{
+struct DialogLoop
+{
+GMainLoop* m_pLoop = nullptr;
+gint nResponseId = GTK_RESPONSE_NONE;
+
+static void DialogResponse(GtkDialog*, gint nResponseId, gpointer data)
+{
+DialogLoop* pDialogLoop = static_cast(data);
+pDialogLoop->nResponseId = nResponseId;
+g_main_loop_quit(pDialogLoop->m_pLoop);
+}
+
+int run(GtkDialog *pDialog)
+{
+gulong nSignalResponseId = g_signal_connect(pDialog, "response", 
G_CALLBACK(DialogResponse), this);
+gtk_window_present(GTK_WINDOW(pDialog));
+m_pLoop = g_main_loop_new(nullptr, false);
+main_loop_run(m_pLoop);
+g_main_loop_unref(m_pLoop);
+g_signal_handler_disconnect(pDialog, nSignalResponseId);
+return nResponseId;
+}
+
+};
+}
+
+gint gtk_dialog_run(GtkDialog* pDialog)
+{
+DialogLoop aDialogLoop;
+return aDialogLoop.run(pDialog);
+}
+
+#endif
+
 int GtkSalSystem::ShowNativeDialog (const OUString& rTitle, const OUString& 
rMessage,
 const std::vector< OUString >& 
rButtonNames)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtksys.cxx |   21 ++---
 1 file changed, 18 insertions(+), 3 deletions(-)

New commits:
commit 87d795a7a25934b11095f401c3bda73056f4f3d6
Author: Caolán McNamara 
AuthorDate: Tue May 11 15:55:22 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 17:57:13 2021 +0200

gtk4: incomplete GetDisplayBuiltInScreen implementation

only x11 possible as far as I can see, maybe we can assume index 0 is
built-in otherwise. We like to default to put the presentation console
on the built-in laptop monitor and the presentation on the external
projector.

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

diff --git a/vcl/unx/gtk3/gtksys.cxx b/vcl/unx/gtk3/gtksys.cxx
index aa822c3e4b3e..cf5461fef023 100644
--- a/vcl/unx/gtk3/gtksys.cxx
+++ b/vcl/unx/gtk3/gtksys.cxx
@@ -207,12 +207,27 @@ bool GtkSalSystem::IsUnifiedDisplay()
 
 unsigned int GtkSalSystem::GetDisplayBuiltInScreen()
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
+#if GTK_CHECK_VERSION(4, 0, 0)
+#if defined(GDK_WINDOWING_X11)
+if (DLSYM_GDK_IS_X11_DISPLAY(mpDisplay))
+{
+GdkMonitor* pPrimary = gdk_x11_display_get_primary_monitor(mpDisplay);
+GListModel* pList = gdk_display_get_monitors(mpDisplay);
+int nIndex = 0;
+while (gpointer pElem = g_list_model_get_item(pList, nIndex))
+{
+if (pElem == pPrimary)
+return nIndex;
+++nIndex;
+}
+}
+#endif
+// nothing for wayland ?, hope for the best that its at index 0
+return 0;
+#else // !GTK_CHECK_VERSION(4, 0, 0)
 GdkScreen *pDefault = gdk_display_get_default_screen (mpDisplay);
 int idx = getScreenIdxFromPtr (pDefault);
 return idx + gdk_screen_get_primary_monitor(pDefault);
-#else
-return 0;
 #endif
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkframe.cxx |   13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit a7a1b836e55cda808472ade322b93a56ab82c40b
Author: Caolán McNamara 
AuthorDate: Tue May 11 15:33:24 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 17:56:51 2021 +0200

gtk4: reduce ifdefs

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

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 050f4ef3d5b2..e6363ee90164 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -2268,10 +2268,10 @@ void GtkSalFrame::SetPointer( PointerStyle 
ePointerStyle )
 
 m_ePointerStyle = ePointerStyle;
 GdkCursor *pCursor = getDisplay()->getCursor( ePointerStyle );
-#if !GTK_CHECK_VERSION(4, 0, 0)
-gdk_window_set_cursor( gtk_widget_get_window(m_pWindow), pCursor );
-#else
+#if GTK_CHECK_VERSION(4, 0, 0)
 gtk_widget_set_cursor(GTK_WIDGET(m_pWindow), pCursor);
+#else
+gdk_window_set_cursor( gtk_widget_get_window(m_pWindow), pCursor );
 #endif
 
 // #i80791# use grabPointer the same way as CaptureMouse, respective float 
grab
@@ -2322,13 +2322,13 @@ void GtkSalFrame::CaptureMouse( bool bCapture )
 
 void GtkSalFrame::SetPointerPos( tools::Long nX, tools::Long nY )
 {
+#if !GTK_CHECK_VERSION(4, 0, 0)
 GtkSalFrame* pFrame = this;
 while( pFrame && pFrame->isChild( false ) )
 pFrame = pFrame->m_pParent;
 if( ! pFrame )
 return;
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
 GdkScreen *pScreen = gtk_widget_get_screen(pFrame->m_pWindow);
 GdkDisplay *pDisplay = gdk_screen_get_display( pScreen );
 
@@ -2763,11 +2763,8 @@ void* GtkSalFrame::ShowPopover(const OUString& 
rHelpText, vcl::Window* pParent,
 gtk_popover_set_autohide(GTK_POPOVER(pWidget), false);
 #endif
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
-gtk_widget_show_all(pWidget);
-#else
+gtk_widget_show(pLabel);
 gtk_widget_show(pWidget);
-#endif
 
 return pWidget;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtkdata.hxx |2 --
 vcl/unx/gtk3/gtkdata.cxx|2 --
 vcl/unx/gtk3/gtkframe.cxx   |4 ++--
 vcl/unx/gtk3/gtkinst.cxx|6 --
 4 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit 8f03cf64ecbf026111cc4c506b1bb021a11187b7
Author: Caolán McNamara 
AuthorDate: Tue May 11 15:26:59 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 17:56:29 2021 +0200

gtk4: have just one way to determine if its an X11 Display

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

diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 747ad505abb5..e3cace3c6389 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -170,7 +170,6 @@ class GtkSalDisplay : public SalGenericDisplay
 GdkDisplay* m_pGdkDisplay;
 o3tl::enumarray m_aCursors;
 boolm_bStartupCompleted;
-boolm_bX11Display;
 
 GdkCursor* getFromSvg( OUString const & name, int nXHot, int nYHot );
 
@@ -179,7 +178,6 @@ public:
 virtual ~GtkSalDisplay() override;
 
 GdkDisplay* GetGdkDisplay() const { return m_pGdkDisplay; }
-boolIsX11Display() const { return m_bX11Display; }
 
 GtkSalSystem* getSystem() const { return m_pSys; }
 
diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx
index fc2f7df7ce1b..153fc61d068f 100644
--- a/vcl/unx/gtk3/gtkdata.cxx
+++ b/vcl/unx/gtk3/gtkdata.cxx
@@ -57,8 +57,6 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) :
 if ( getenv( "SAL_IGNOREXERRORS" ) )
 GetGenericUnixSalData()->ErrorTrapPush(); // and leak the trap
 
-m_bX11Display = DLSYM_GDK_IS_X11_DISPLAY( m_pGdkDisplay );
-
 gtk_widget_set_default_direction(AllSettings::GetLayoutRTL() ? 
GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
 }
 
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index d9d0852b6cd0..050f4ef3d5b2 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -2133,7 +2133,7 @@ void GtkSalFrame::SetScreenNumber( unsigned int 
nNewScreen )
 
 void GtkSalFrame::updateWMClass()
 {
-if (!getDisplay()->IsX11Display())
+if (!DLSYM_GDK_IS_X11_DISPLAY(getGdkDisplay()))
 return;
 
 if (!gtk_widget_get_realized(m_pWindow))
@@ -2190,7 +2190,7 @@ void GtkSalFrame::StartPresentation( bool bStart )
 std::optional aWindow;
 std::optional aDisplay;
 
-bool bX11 = getDisplay()->IsX11Display();
+bool bX11 = DLSYM_GDK_IS_X11_DISPLAY(getGdkDisplay());
 if (bX11)
 {
 aWindow = GtkSalFrame::GetNativeWindowHandle(m_pWindow);
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 3f15bf1f9fe0..df35fe0e1a8e 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -1767,7 +1767,8 @@ bool DLSYM_GDK_IS_WAYLAND_DISPLAY(GdkDisplay* pDisplay)
 static auto get_type = reinterpret_cast(dlsym(nullptr, 
"gdk_wayland_display_get_type"));
 if (!get_type)
 return false;
-return G_TYPE_CHECK_INSTANCE_TYPE(pDisplay, get_type());
+static bool bResult = G_TYPE_CHECK_INSTANCE_TYPE(pDisplay, get_type());
+return bResult;
 }
 
 bool DLSYM_GDK_IS_X11_DISPLAY(GdkDisplay* pDisplay)
@@ -1775,7 +1776,8 @@ bool DLSYM_GDK_IS_X11_DISPLAY(GdkDisplay* pDisplay)
 static auto get_type = reinterpret_cast(dlsym(nullptr, 
"gdk_x11_display_get_type"));
 if (!get_type)
 return false;
-return G_TYPE_CHECK_INSTANCE_TYPE(pDisplay, get_type());
+static bool bResult = G_TYPE_CHECK_INSTANCE_TYPE(pDisplay, get_type());
+return bResult;
 }
 
 #if !GTK_CHECK_VERSION(4, 0, 0)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkframe.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 2f26a3323dc0cf2975351774f2f1ffc60930fda6
Author: Caolán McNamara 
AuthorDate: Tue May 11 15:21:45 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 17:56:00 2021 +0200

gtk4: drop unneeded ifdef

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

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index babdb5fbdcb5..d9d0852b6cd0 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -2133,7 +2133,6 @@ void GtkSalFrame::SetScreenNumber( unsigned int 
nNewScreen )
 
 void GtkSalFrame::updateWMClass()
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 if (!getDisplay()->IsX11Display())
 return;
 
@@ -2152,7 +2151,6 @@ void GtkSalFrame::updateWMClass()
GtkSalFrame::GetNativeWindowHandle(m_pWindow),
pClass );
 XFree( pClass );
-#endif
 }
 
 void GtkSalFrame::SetApplicationID( const OUString &rWMClass )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkframe.cxx |   31 ++-
 1 file changed, 14 insertions(+), 17 deletions(-)

New commits:
commit 3f4400f1ac9185b7b123585deafef04a3d91bc66
Author: Caolán McNamara 
AuthorDate: Tue May 11 15:20:42 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 17:38:55 2021 +0200

gtk4: flatten this method

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

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index ba5478c8249a..babdb5fbdcb5 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -2134,27 +2134,24 @@ void GtkSalFrame::SetScreenNumber( unsigned int 
nNewScreen )
 void GtkSalFrame::updateWMClass()
 {
 #if !GTK_CHECK_VERSION(4, 0, 0)
-OString aResClass = OUStringToOString(m_sWMClass, 
RTL_TEXTENCODING_ASCII_US);
-const char *pResClass = !aResClass.isEmpty() ? aResClass.getStr() :
-
SalGenericSystem::getFrameClassName();
-Display *display;
-
 if (!getDisplay()->IsX11Display())
 return;
 
-display = gdk_x11_display_get_xdisplay(getGdkDisplay());
+if (!gtk_widget_get_realized(m_pWindow))
+return;
 
-if( gtk_widget_get_realized( m_pWindow ) )
-{
-XClassHint* pClass = XAllocClassHint();
-OString aResName = SalGenericSystem::getFrameResName();
-pClass->res_name  = const_cast(aResName.getStr());
-pClass->res_class = const_cast(pResClass);
-XSetClassHint( display,
-   GtkSalFrame::GetNativeWindowHandle(m_pWindow),
-   pClass );
-XFree( pClass );
-}
+OString aResClass = OUStringToOString(m_sWMClass, 
RTL_TEXTENCODING_ASCII_US);
+const char *pResClass = !aResClass.isEmpty() ? aResClass.getStr() :
+
SalGenericSystem::getFrameClassName();
+XClassHint* pClass = XAllocClassHint();
+OString aResName = SalGenericSystem::getFrameResName();
+pClass->res_name  = const_cast(aResName.getStr());
+pClass->res_class = const_cast(pResClass);
+Display *display = gdk_x11_display_get_xdisplay(getGdkDisplay());
+XSetClassHint( display,
+   GtkSalFrame::GetNativeWindowHandle(m_pWindow),
+   pClass );
+XFree( pClass );
 #endif
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkframe.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 8fb62def894ce6ea37ade9fc20e3cdad5562d0aa
Author: Caolán McNamara 
AuthorDate: Tue May 11 15:18:23 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 17:38:30 2021 +0200

gtk4: drop unneeded ifdef

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

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 45df011039ef..ba5478c8249a 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -2142,7 +2142,7 @@ void GtkSalFrame::updateWMClass()
 if (!getDisplay()->IsX11Display())
 return;
 
-display = GDK_DISPLAY_XDISPLAY(getGdkDisplay());
+display = gdk_x11_display_get_xdisplay(getGdkDisplay());
 
 if( gtk_widget_get_realized( m_pWindow ) )
 {
@@ -2194,17 +2194,17 @@ void GtkSalFrame::StartPresentation( bool bStart )
 {
 std::optional aWindow;
 std::optional aDisplay;
-#if !GTK_CHECK_VERSION(4, 0, 0)
-if( getDisplay()->IsX11Display() )
+
+bool bX11 = getDisplay()->IsX11Display();
+if (bX11)
 {
 aWindow = GtkSalFrame::GetNativeWindowHandle(m_pWindow);
-aDisplay = GDK_DISPLAY_XDISPLAY( getGdkDisplay() );
+aDisplay = gdk_x11_display_get_xdisplay(getGdkDisplay());
 }
-#endif
 
 m_ScreenSaverInhibitor.inhibit( bStart,
 u"presentation",
-getDisplay()->IsX11Display(),
+bX11,
 aWindow,
 aDisplay );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtkdata.hxx  |7 ---
 vcl/inc/unx/gtk/gtkframe.hxx |2 +-
 vcl/unx/gtk3/gtkframe.cxx|   28 
 3 files changed, 17 insertions(+), 20 deletions(-)

New commits:
commit 07d235414f95a74561204a3643975590cde89299
Author: Caolán McNamara 
AuthorDate: Tue May 11 15:04:51 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 17:38:02 2021 +0200

gtk4: tidy up messy xid/native handle behind 
GtkSalFrame::GetNativeWindowHandle

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

diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 85db523c2caf..747ad505abb5 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -46,13 +46,6 @@ namespace com::sun::star::accessibility { class 
XAccessibleEventListener; }
 class GtkSalDisplay;
 class DocumentFocusListener;
 
-#if !GTK_CHECK_VERSION(4,0,0)
-inline ::Window widget_get_xid(GtkWidget *widget)
-{
-return GDK_WINDOW_XID(gtk_widget_get_window(widget));
-}
-#endif
-
 inline void main_loop_run(GMainLoop* pLoop)
 {
 #if !GTK_CHECK_VERSION(4, 0, 0)
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 0f74ca131e3d..189a097fd40e 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -583,7 +583,7 @@ public:
 
 static GtkSalFrame *getFromWindow( GtkWidget *pWindow );
 
-sal_uIntPtr GetNativeWindowHandle(GtkWidget *pWidget) 
const;
+static sal_uIntPtr  GetNativeWindowHandle(GtkWidget *pWidget);
 
 //Call the usual SalFrame Callback, but catch uno exceptions and delegate
 //to GtkSalData to rethrow them after the gsignal is processed when its 
safe
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 6a5df5eafb20..45df011039ef 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -65,6 +65,8 @@
 #   define GDK_ALT_MASK GDK_MOD1_MASK
 #   define GDK_TOPLEVEL_STATE_MAXIMIZED GDK_WINDOW_STATE_MAXIMIZED
 #   define GDK_TOPLEVEL_STATE_MINIMIZED GDK_WINDOW_STATE_ICONIFIED
+#   define gdk_wayland_surface_get_wl_surface gdk_wayland_window_get_wl_surface
+#   define gdk_x11_surface_get_xid gdk_x11_window_get_xid
 #endif
 
 using namespace com::sun::star;
@@ -541,7 +543,7 @@ static void attach_menu_model(GtkSalFrame* pSalFrame)
 return;
 
 // Generate menu paths.
-sal_uIntPtr windowId = pSalFrame->GetNativeWindowHandle(pWidget);
+sal_uIntPtr windowId = GtkSalFrame::GetNativeWindowHandle(pWidget);
 gchar* aDBusWindowPath = g_strdup_printf( 
"/org/libreoffice/window/%lu", windowId );
 gchar* aDBusMenubarPath = g_strdup_printf( 
"/org/libreoffice/window/%lu/menus/menubar", windowId );
 
@@ -2149,7 +2151,7 @@ void GtkSalFrame::updateWMClass()
 pClass->res_name  = const_cast(aResName.getStr());
 pClass->res_class = const_cast(pResClass);
 XSetClassHint( display,
-   widget_get_xid(m_pWindow),
+   GtkSalFrame::GetNativeWindowHandle(m_pWindow),
pClass );
 XFree( pClass );
 }
@@ -2195,7 +2197,7 @@ void GtkSalFrame::StartPresentation( bool bStart )
 #if !GTK_CHECK_VERSION(4, 0, 0)
 if( getDisplay()->IsX11Display() )
 {
-aWindow = widget_get_xid(m_pWindow);
+aWindow = GtkSalFrame::GetNativeWindowHandle(m_pWindow);
 aDisplay = GDK_DISPLAY_XDISPLAY( getGdkDisplay() );
 }
 #endif
@@ -5232,28 +5234,30 @@ Size GtkSalDisplay::GetScreenSize( int nDisplayScreen )
 return Size( aRect.GetWidth(), aRect.GetHeight() );
 }
 
-sal_uIntPtr GtkSalFrame::GetNativeWindowHandle(GtkWidget *pWidget) const
+sal_uIntPtr GtkSalFrame::GetNativeWindowHandle(GtkWidget *pWidget)
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
-(void) this;// Silence loplugin:staticmethods
+#if !GTK_CHECK_VERSION(4,0,0)
+GdkSurface* pSurface = gtk_widget_get_window(pWidget);
+#else
+GdkSurface* pSurface = 
gtk_native_get_surface(gtk_widget_get_native(pWidget));
+#endif
+
 GdkDisplay *pDisplay = getGdkDisplay();
-GdkWindow *pWindow = gtk_widget_get_window(pWidget);
 
 #if defined(GDK_WINDOWING_X11)
 if (DLSYM_GDK_IS_X11_DISPLAY(pDisplay))
 {
-return GDK_WINDOW_XID(pWindow);
+return gdk_x11_surface_get_xid(pSurface);
 }
 #endif
+
 #if defined(GDK_WINDOWING_WAYLAND)
 if (DLSYM_GDK_IS_WAYLAND_DISPLAY(pDisplay))
 {
-return 
reinterpret_cast(gdk_wayland_window_get_wl_surface(pWindow));
+return 
reinterpret_cast(gdk_wayland_surface_get_wl_surface(pSurface));
 }
 #endif
-#else
-(void)pWidget;
-#endif
+
 return 0;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreo

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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkframe.cxx |   18 +++---
 1 file changed, 7 insertions(+), 11 deletions(-)

New commits:
commit 3cc2ea2da2dad635e7e0d4375668c55b16bada55
Author: Caolán McNamara 
AuthorDate: Tue May 11 14:44:59 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 17:37:41 2021 +0200

gtk4: rename ensure_dbus_setup to attach_menu_model

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

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 23457d764881..6a5df5eafb20 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -514,9 +514,8 @@ static void hud_activated( gboolean hud_active, gpointer 
user_data )
 }
 #endif
 
-static bool ensure_dbus_setup( gpointer data )
+static void attach_menu_model(GtkSalFrame* pSalFrame)
 {
-GtkSalFrame* pSalFrame = static_cast< GtkSalFrame* >( data );
 GtkWidget* pWidget = pSalFrame->getWindow();
 #if !GTK_CHECK_VERSION(4,0,0)
 GdkSurface* gdkWindow = gtk_widget_get_window(pWidget);
@@ -536,15 +535,13 @@ static bool ensure_dbus_setup( gpointer data )
 
 #if !GTK_CHECK_VERSION(4,0,0)
 // Get a DBus session connection.
-if(!pSessionBus)
+if (!pSessionBus)
 pSessionBus = g_bus_get_sync (G_BUS_TYPE_SESSION, nullptr, 
nullptr);
-if( !pSessionBus )
-{
-return false;
-}
+if (!pSessionBus)
+return;
 
 // Generate menu paths.
-sal_uIntPtr windowId = 
pSalFrame->GetNativeWindowHandle(pSalFrame->getWindow());
+sal_uIntPtr windowId = pSalFrame->GetNativeWindowHandle(pWidget);
 gchar* aDBusWindowPath = g_strdup_printf( 
"/org/libreoffice/window/%lu", windowId );
 gchar* aDBusMenubarPath = g_strdup_printf( 
"/org/libreoffice/window/%lu/menus/menubar", windowId );
 
@@ -581,7 +578,6 @@ static bool ensure_dbus_setup( gpointer data )
 g_free( aDBusMenubarPath );
 #endif
 }
-return false;
 }
 
 void on_registrar_available( GDBusConnection * /*connection*/,
@@ -1347,8 +1343,8 @@ void GtkSalFrame::Init( SalFrame* pParent, 
SalFrameStyleFlags nStyle )
 
 if (!bPopup)
 {
-// Enable DBus native menu if available.
-ensure_dbus_setup( this );
+// Enable GMenuModel native menu
+attach_menu_model(this);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkframe.cxx |   22 --
 1 file changed, 12 insertions(+), 10 deletions(-)

New commits:
commit 72f52efe861ff2a85d26a7cf6d8301af1c5ec2a2
Author: Caolán McNamara 
AuthorDate: Tue May 11 14:41:35 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 17:37:09 2021 +0200

gtk4: trim ensure_dbus_setup down to the minimum needed

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

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index b98e5d2a75bf..23457d764881 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -499,6 +499,7 @@ static void ObjectDestroyedNotify( gpointer data )
 }
 }
 
+#if !GTK_CHECK_VERSION(4,0,0)
 static void hud_activated( gboolean hud_active, gpointer user_data )
 {
 if ( hud_active )
@@ -511,6 +512,7 @@ static void hud_activated( gboolean hud_active, gpointer 
user_data )
 pSalMenu->UpdateFull();
 }
 }
+#endif
 
 static bool ensure_dbus_setup( gpointer data )
 {
@@ -524,6 +526,15 @@ static bool ensure_dbus_setup( gpointer data )
 
 if ( gdkWindow != nullptr && g_object_get_data( G_OBJECT( gdkWindow ), 
"g-lo-menubar" ) == nullptr )
 {
+// Create menu model and action group attached to this frame.
+GMenuModel* pMenuModel = G_MENU_MODEL( g_lo_menu_new() );
+GActionGroup* pActionGroup = 
reinterpret_cast(g_lo_action_group_new());
+
+// Set window properties.
+g_object_set_data_full( G_OBJECT( gdkWindow ), "g-lo-menubar", 
pMenuModel, ObjectDestroyedNotify );
+g_object_set_data_full( G_OBJECT( gdkWindow ), "g-lo-action-group", 
pActionGroup, ObjectDestroyedNotify );
+
+#if !GTK_CHECK_VERSION(4,0,0)
 // Get a DBus session connection.
 if(!pSessionBus)
 pSessionBus = g_bus_get_sync (G_BUS_TYPE_SESSION, nullptr, 
nullptr);
@@ -532,20 +543,11 @@ static bool ensure_dbus_setup( gpointer data )
 return false;
 }
 
-// Create menu model and action group attached to this frame.
-GMenuModel* pMenuModel = G_MENU_MODEL( g_lo_menu_new() );
-GActionGroup* pActionGroup = 
reinterpret_cast(g_lo_action_group_new());
-
 // Generate menu paths.
 sal_uIntPtr windowId = 
pSalFrame->GetNativeWindowHandle(pSalFrame->getWindow());
 gchar* aDBusWindowPath = g_strdup_printf( 
"/org/libreoffice/window/%lu", windowId );
 gchar* aDBusMenubarPath = g_strdup_printf( 
"/org/libreoffice/window/%lu/menus/menubar", windowId );
 
-// Set window properties.
-g_object_set_data_full( G_OBJECT( gdkWindow ), "g-lo-menubar", 
pMenuModel, ObjectDestroyedNotify );
-g_object_set_data_full( G_OBJECT( gdkWindow ), "g-lo-action-group", 
pActionGroup, ObjectDestroyedNotify );
-
-#if !GTK_CHECK_VERSION(4,0,0)
 GdkDisplay *pDisplay = GtkSalFrame::getGdkDisplay();
 #if defined(GDK_WINDOWING_X11)
 if (DLSYM_GDK_IS_X11_DISPLAY(pDisplay))
@@ -567,7 +569,6 @@ static bool ensure_dbus_setup( gpointer data )

"/org/libreoffice",

g_dbus_connection_get_unique_name( pSessionBus ));
 }
-#endif
 #endif
 // Publish the menu model and the action group.
 SAL_INFO("vcl.unity", "exporting menu model at " << pMenuModel << " 
for window " << windowId);
@@ -578,6 +579,7 @@ static bool ensure_dbus_setup( gpointer data )
 
 g_free( aDBusWindowPath );
 g_free( aDBusMenubarPath );
+#endif
 }
 return false;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Noel Grandin (via logerrit)
 sfx2/source/notify/hintpost.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit da6c8343993c4d5c0e7b60eebe27a611def7f250
Author: Noel Grandin 
AuthorDate: Tue May 11 15:03:11 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue May 11 17:28:43 2021 +0200

don't leak when the SfxHintPoster is disabled

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

diff --git a/sfx2/source/notify/hintpost.cxx b/sfx2/source/notify/hintpost.cxx
index 0020d3beac69..446c7a954ba9 100644
--- a/sfx2/source/notify/hintpost.cxx
+++ b/sfx2/source/notify/hintpost.cxx
@@ -37,8 +37,11 @@ void SfxHintPoster::Post(std::unique_ptr 
pHintToPost)
 
 IMPL_LINK(SfxHintPoster, DoEvent_Impl, void*, pPostedHint, void)
 {
+auto pRequest = static_cast(pPostedHint);
 if (m_Link)
-
m_Link(std::unique_ptr(static_cast(pPostedHint)));
+m_Link(std::unique_ptr(pRequest));
+else
+delete pRequest;
 ReleaseRef();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Regina Henschel (via logerrit)
 include/oox/drawingml/shape.hxx|4 
 oox/qa/unit/data/tdf141463_GroupTransform.pptx |binary
 oox/qa/unit/shape.cxx  |   55 +
 oox/source/drawingml/shape.cxx |  235 +++--
 4 files changed, 205 insertions(+), 89 deletions(-)

New commits:
commit 36499d8bf6cd5c6af7b2ceb6071baf5c7421bd0a
Author: Regina Henschel 
AuthorDate: Mon May 10 00:47:13 2021 +0200
Commit: Miklos Vajna 
CommitDate: Tue May 11 17:19:34 2021 +0200

tdf#141463 avoid skew in shape group in ooxml import ..

and implement special resize handling for rotation angles larger 45deg.
This solves tdf#93952 and tdf#141953 too.

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

diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index eac27b68c7a5..53401d18a1c1 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -188,7 +188,7 @@ public:
 const basegfx::B2DHomMatrix& aTransformation,
 FillProperties& rShapeOrParentShapeFillProps,
 ShapeIdMap* pShapeMap = nullptr,
-bool bInGroup = false);
+oox::drawingml::ShapePtr pParentGroupShape = 
nullptr);
 
 const css::uno::Reference< css::drawing::XShape > &
 getXShape() const { return mxShape; }
@@ -265,7 +265,7 @@ protected:
 bool bDoNotInsertEmptyTextBody,
 basegfx::B2DHomMatrix& aTransformation,
 FillProperties& rShapeOrParentShapeFillProps,
-bool bInGroup = false
+oox::drawingml::ShapePtr pParentGroupShape = 
nullptr
  );
 
 voidaddChildren(
diff --git a/oox/qa/unit/data/tdf141463_GroupTransform.pptx 
b/oox/qa/unit/data/tdf141463_GroupTransform.pptx
new file mode 100644
index ..36c506262333
Binary files /dev/null and b/oox/qa/unit/data/tdf141463_GroupTransform.pptx 
differ
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
index 6195e4955a39..a6949ff4fec3 100644
--- a/oox/qa/unit/shape.cxx
+++ b/oox/qa/unit/shape.cxx
@@ -14,6 +14,8 @@
 #include 
 #include 
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -22,6 +24,24 @@
 
 using namespace ::com::sun::star;
 
+namespace
+{
+/// Gets one child of xShape, which one is specified by nIndex.
+uno::Reference getChildShape(const 
uno::Reference& xShape,
+  sal_Int32 nIndex)
+{
+uno::Reference xGroup(xShape, uno::UNO_QUERY);
+CPPUNIT_ASSERT(xGroup.is());
+
+CPPUNIT_ASSERT(xGroup->getCount() > nIndex);
+
+uno::Reference xRet(xGroup->getByIndex(nIndex), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT(xRet.is());
+
+return xRet;
+}
+}
+
 constexpr OUStringLiteral DATA_DIRECTORY = u"/oox/qa/unit/data/";
 
 /// oox shape tests.
@@ -58,6 +78,41 @@ void OoxShapeTest::load(std::u16string_view rFileName)
 mxComponent = loadFromDesktop(aURL);
 }
 
+CPPUNIT_TEST_FIXTURE(OoxShapeTest, testGroupTransform)
+{
+load(u"tdf141463_GroupTransform.pptx");
+
+uno::Reference 
xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+uno::Reference xGroup(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xShape(getChildShape(xGroup, 0), 
uno::UNO_QUERY);
+uno::Reference xPropSet(xShape, uno::UNO_QUERY);
+// Without the accompanying fix in place, this test would have failed in 
several properties.
+
+sal_Int32 nAngle;
+xPropSet->getPropertyValue("ShearAngle") >>= nAngle;
+// Failed with - Expected: 0
+// - Actual  : -810
+// i.e. the shape was sheared although shearing does not exist in oox
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nAngle);
+
+xPropSet->getPropertyValue("RotateAngle") >>= nAngle;
+// Failed with - Expected: 26000 (is in 1/100deg)
+// - Actual  : 26481 (is in 1/100deg)
+// 100deg in PowerPoint UI = 360deg - 100deg in LO.
+CPPUNIT_ASSERT_EQUAL(sal_Int32(26000), nAngle);
+
+sal_Int32 nActual = xShape->getSize().Width;
+// The group has ext.cy=288 and chExt.cy=432 resulting in 
Y-scale=2/3.
+// The child has ext 288 x 144. Because of rotation angle 80deg, 
the Y-scale has to be
+// applied to the width, resulting in 288 * 2/3 = 192EMU = 5333Hmm
+// ToDo: Expected value currently 1 off.
+// Failed with - Expected: 5332
+// - Actual  : 5432
+CPPUNIT_ASSERT_EQUAL(sal_Int32(5332), nActual);
+}
+
 CPPUNIT_TEST_FIXTURE(OoxShapeTest, testMultipleGroupSh

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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtkdata.hxx |1 -
 vcl/unx/gtk3/gtkdata.cxx|   27 ---
 2 files changed, 28 deletions(-)

New commits:
commit 919260f73be652195d228d78ed519d46e59e6f8b
Author: Caolán McNamara 
AuthorDate: Tue May 11 14:18:39 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 16:37:56 2021 +0200

gtk4: drop no-op filterGdkEvent

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

diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index ddf8a4b63aec..85db523c2caf 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -202,7 +202,6 @@ public:
 void startupNotificationCompleted() { m_bStartupCompleted = true; }
 
 #if !GTK_CHECK_VERSION(4,0,0)
-GdkFilterReturn filterGdkEvent( GdkXEvent* sys_event );
 void screenSizeChanged( GdkScreen const * );
 void monitorsChanged( GdkScreen const * );
 #endif
diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx
index 2f0d949f0710..fc2f7df7ce1b 100644
--- a/vcl/unx/gtk3/gtkdata.cxx
+++ b/vcl/unx/gtk3/gtkdata.cxx
@@ -40,24 +40,11 @@
 
 #include 
 
-
-
 using namespace vcl_sal;
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
 /***
  * class GtkSalDisplay *
  ***/
-extern "C" {
-static GdkFilterReturn call_filterGdkEvent( GdkXEvent* sys_event,
- GdkEvent* /*event*/,
- gpointer data )
-{
-GtkSalDisplay *pDisplay = static_cast(data);
-return pDisplay->filterGdkEvent( sys_event );
-}
-}
-#endif
 
 GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) :
 m_pSys( GtkSalSystem::GetSingleton() ),
@@ -67,11 +54,6 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) :
 for(GdkCursor* & rpCsr : m_aCursors)
 rpCsr = nullptr;
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
-// FIXME: unify this with SalInst's filter too ?
-gdk_window_add_filter( nullptr, call_filterGdkEvent, this );
-#endif
-
 if ( getenv( "SAL_IGNOREXERRORS" ) )
 GetGenericUnixSalData()->ErrorTrapPush(); // and leak the trap
 
@@ -83,8 +65,6 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) :
 GtkSalDisplay::~GtkSalDisplay()
 {
 #if !GTK_CHECK_VERSION(4, 0, 0)
-gdk_window_remove_filter( nullptr, call_filterGdkEvent, this );
-
 if( !m_bStartupCompleted )
 gdk_notify_startup_complete();
 
@@ -116,13 +96,6 @@ static void signalMonitorsChanged( GdkScreen* pScreen, 
gpointer data )
 pDisp->monitorsChanged( pScreen );
 }
 
-GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* )
-{
-(void) this; // loplugin:staticmethods
-//FIXME: implement filterGdkEvent ...
-return GDK_FILTER_CONTINUE;
-}
-
 void GtkSalDisplay::screenSizeChanged( GdkScreen const * pScreen )
 {
 m_pSys->countScreenMonitors();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkdata.cxx |   27 ++-
 1 file changed, 18 insertions(+), 9 deletions(-)

New commits:
commit 1821241f7c7c90784662be54dc3b42e4f9ca3ca3
Author: Caolán McNamara 
AuthorDate: Tue May 11 14:01:52 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 16:37:32 2021 +0200

gtk4: listen to monitors changing the new way

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

diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx
index 4cea5bc5d223..2f0d949f0710 100644
--- a/vcl/unx/gtk3/gtkdata.cxx
+++ b/vcl/unx/gtk3/gtkdata.cxx
@@ -94,8 +94,15 @@ GtkSalDisplay::~GtkSalDisplay()
 #endif
 }
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
-extern "C" {
+#if GTK_CHECK_VERSION(4, 0, 0)
+
+static void signalMonitorsChanged(GListModel*, gpointer data)
+{
+GtkSalDisplay* pDisp = static_cast(data);
+pDisp->emitDisplayChanged();
+}
+
+#else
 
 static void signalScreenSizeChanged( GdkScreen* pScreen, gpointer data )
 {
@@ -109,8 +116,6 @@ static void signalMonitorsChanged( GdkScreen* pScreen, 
gpointer data )
 pDisp->monitorsChanged( pScreen );
 }
 
-}
-
 GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* )
 {
 (void) this; // loplugin:staticmethods
@@ -569,7 +574,14 @@ void GtkSalData::Init()
 GtkSalDisplay *pDisplay = new GtkSalDisplay( pGdkDisp );
 SetDisplay( pDisplay );
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
+#if GTK_CHECK_VERSION(4, 0, 0)
+pDisplay->emitDisplayChanged();
+GListModel *pMonitors = gdk_display_get_monitors(pGdkDisp);
+g_signal_connect(pMonitors, "items-changed", 
G_CALLBACK(signalMonitorsChanged), pDisplay);
+
+gtk_style_context_add_provider_for_display(pGdkDisp, 
CreateSmallButtonProvider(),
+GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+#else
 int nScreens = gdk_display_get_n_screens( pGdkDisp );
 for( int n = 0; n < nScreens; n++ )
 {
@@ -583,14 +595,11 @@ void GtkSalData::Init()
 g_signal_connect( G_OBJECT(pScreen), "size-changed",
   G_CALLBACK(signalScreenSizeChanged), pDisplay );
 g_signal_connect( G_OBJECT(pScreen), "monitors-changed",
-  G_CALLBACK(signalMonitorsChanged), GetGtkDisplay() );
+  G_CALLBACK(signalMonitorsChanged), pDisplay );
 
 gtk_style_context_add_provider_for_screen(pScreen, 
CreateSmallButtonProvider(),
 GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 }
-#else
-gtk_style_context_add_provider_for_display(pGdkDisp, 
CreateSmallButtonProvider(),
-GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 #endif
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkdata.cxx |   58 ---
 1 file changed, 35 insertions(+), 23 deletions(-)

New commits:
commit 27f2084cbe0f505e59420e90235bfd7a668ae96e
Author: Caolán McNamara 
AuthorDate: Tue May 11 13:51:00 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 16:37:17 2021 +0200

gtk4: style provider is at GdkDisplay rather than GdkScreen now

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

diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx
index a30e4df0b853..4cea5bc5d223 100644
--- a/vcl/unx/gtk3/gtkdata.cxx
+++ b/vcl/unx/gtk3/gtkdata.cxx
@@ -443,6 +443,37 @@ bool GtkSalData::Yield( bool bWait, bool 
bHandleAllCurrentEvents )
 return bWasEvent;
 }
 
+static GtkStyleProvider* CreateSmallButtonProvider()
+{
+/*
+   set a provider to allow certain widgets to have no padding
+
+   a) little close button in menubar to close back to start-center
+   b) and small buttons in view->data sources (button.small-button)
+   c) small toolbar button in infobars (toolbar.small-button button)
+   d) comboboxes in the data browser for tdf#137695 (box#combobox 
button.small-button,
+  which would instead be combobox button.small-button if we didn't 
replace GtkComboBox,
+  see GtkInstanceComboBox for an explanation for why we do that)
+   e) entry in the data browser for tdf#137695 (entry.small-button)
+*/
+GtkCssProvider* pSmallButtonProvider = gtk_css_provider_new();
+static const gchar data[] =
+  "button.small-button, toolbar.small-button button, combobox.small-button 
*.combo, box#combobox.small-button *.combo, entry.small-button { "
+  "padding: 0;"
+  "margin-left: 0px;"
+  "margin-right: 0px;"
+  "min-height: 18px;"
+  "min-width: 18px;"
+  "}";
+#if GTK_CHECK_VERSION(4, 0, 0)
+gtk_css_provider_load_from_data(pSmallButtonProvider, data, -1);
+#else
+gtk_css_provider_load_from_data(pSmallButtonProvider, data, -1, nullptr);
+#endif
+
+return GTK_STYLE_PROVIDER(pSmallButtonProvider);
+}
+
 void GtkSalData::Init()
 {
 SAL_INFO( "vcl.gtk", "GtkMainloop::Init()" );
@@ -554,31 +585,12 @@ void GtkSalData::Init()
 g_signal_connect( G_OBJECT(pScreen), "monitors-changed",
   G_CALLBACK(signalMonitorsChanged), GetGtkDisplay() );
 
-/*
-   set a provider to allow certain widgets to have no padding
-
-   a) little close button in menubar to close back to start-center
-   b) and small buttons in view->data sources (button.small-button)
-   c) small toolbar button in infobars (toolbar.small-button button)
-   d) comboboxes in the data browser for tdf#137695 (box#combobox 
button.small-button,
-  which would instead be combobox button.small-button if we didn't 
replace GtkComboBox,
-  see GtkInstanceComboBox for an explanation for why we do that)
-   e) entry in the data browser for tdf#137695 (entry.small-button)
-*/
-GtkCssProvider* pSmallButtonProvider = gtk_css_provider_new();
-static const gchar data[] =
-  "button.small-button, toolbar.small-button button, 
combobox.small-button *.combo, box#combobox.small-button *.combo, 
entry.small-button { "
-  "padding: 0;"
-  "margin-left: 0px;"
-  "margin-right: 0px;"
-  "min-height: 18px;"
-  "min-width: 18px;"
-  "}";
-gtk_css_provider_load_from_data(pSmallButtonProvider, data, -1, 
nullptr);
-
-gtk_style_context_add_provider_for_screen(pScreen, 
GTK_STYLE_PROVIDER(pSmallButtonProvider),
+gtk_style_context_add_provider_for_screen(pScreen, 
CreateSmallButtonProvider(),
 GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 }
+#else
+gtk_style_context_add_provider_for_display(pGdkDisp, 
CreateSmallButtonProvider(),
+GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 #endif
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Mike Kaganski (via logerrit)
 xmloff/source/core/xmlimp.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit b4c6fe22e2f91f33ce3705f01ef35b46e980b926
Author: Mike Kaganski 
AuthorDate: Tue May 11 15:20:02 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue May 11 16:30:05 2021 +0200

Missing include

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

diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 1f21acef1876..d3973c87e16c 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 108 commits - android/source basctl/source basegfx/CppunitTest_basegfx.mk basegfx/test basic/inc basic/source compilerplugins/clang

2021-05-11 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 0ad252bcf61aee5f9f0b2f7f94d4b24f276ba6e6
Author: Tomaž Vajngerl 
AuthorDate: Mon May 10 15:45:13 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue May 11 23:22:40 2021 +0900

vcl: add more methods to the PDFium

Change-Id: I74ef0f713125c7069620d1abc9534a636c1707d9

diff --git a/include/vcl/filter/PDFiumLibrary.hxx 
b/include/vcl/filter/PDFiumLibrary.hxx
index c5f1766f60c0..46988cf3c946 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -111,6 +111,13 @@ public:
 virtual PDFSegmentType getType() const = 0;
 };
 
+struct PDFImageMetadata
+{
+sal_uInt32 mnWidth;
+sal_uInt32 mnHeight;
+sal_uInt32 mnBitsPerPixel;
+};
+
 class VCL_DLLPUBLIC PDFiumPageObject
 {
 public:
@@ -127,15 +134,20 @@ public:
 virtual double getFontSize() = 0;
 virtual OUString getFontName() = 0;
 virtual PDFTextRenderMode getTextRenderMode() = 0;
+virtual bool hasTransparency() = 0;
 virtual Color getFillColor() = 0;
 virtual Color getStrokeColor() = 0;
 virtual double getStrokeWidth() = 0;
 // Path
 virtual int getPathSegmentCount() = 0;
 virtual std::unique_ptr getPathSegment(int index) = 0;
+virtual bool getDrawMode(PDFFillMode& eFillMode, bool& bStroke) = 0;
+// Image
 virtual Size getImageSize(PDFiumPage& rPage) = 0;
+virtual PDFImageMetadata getImageMetadata(PDFiumPage& rPage) = 0;
+
 virtual std::unique_ptr getImageBitmap() = 0;
-virtual bool getDrawMode(PDFFillMode& eFillMode, bool& bStroke) = 0;
+virtual bool getDecodedImageData(std::vector& rData) = 0;
 };
 
 class VCL_DLLPUBLIC PDFiumSearchHandle
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index adfa4db4fa45..f0fa8a8c2ce0 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -254,15 +254,19 @@ public:
 double getFontSize() override;
 OUString getFontName() override;
 PDFTextRenderMode getTextRenderMode() override;
+bool hasTransparency() override;
 Color getFillColor() override;
 Color getStrokeColor() override;
 double getStrokeWidth() override;
 // Path
 int getPathSegmentCount() override;
 std::unique_ptr getPathSegment(int index) override;
+bool getDrawMode(PDFFillMode& eFillMode, bool& bStroke) override;
+// Image
 Size getImageSize(PDFiumPage& rPage) override;
+PDFImageMetadata getImageMetadata(PDFiumPage& rPage) override;
 std::unique_ptr getImageBitmap() override;
-bool getDrawMode(PDFFillMode& eFillMode, bool& bStroke) override;
+bool getDecodedImageData(std::vector& rData) override;
 };
 
 class PDFiumSearchHandleImpl final : public PDFiumSearchHandle
@@ -835,6 +839,8 @@ Color PDFiumPageObjectImpl::getFillColor()
 return aColor;
 }
 
+bool PDFiumPageObjectImpl::hasTransparency() { return 
FPDFPageObj_HasTransparency(mpPageObject); }
+
 Color PDFiumPageObjectImpl::getStrokeColor()
 {
 Color aColor = COL_TRANSPARENT;
@@ -874,6 +880,28 @@ Size PDFiumPageObjectImpl::getImageSize(PDFiumPage& rPage)
 return Size(aMeta.width, aMeta.height);
 }
 
+PDFImageMetadata PDFiumPageObjectImpl::getImageMetadata(PDFiumPage& rPage)
+{
+FPDF_IMAGEOBJ_METADATA aMeta;
+auto& rPageImpl = static_cast(rPage);
+FPDFImageObj_GetImageMetadata(mpPageObject, rPageImpl.getPointer(), 
&aMeta);
+return { aMeta.width, aMeta.height, aMeta.bits_per_pixel };
+}
+
+bool PDFiumPageObjectImpl::getDecodedImageData(std::vector& rData)
+{
+unsigned long nLength = FPDFImageObj_GetImageDataDecoded(mpPageObject, 
nullptr, 0);
+if (nLength > 0)
+{
+rData.resize(nLength);
+unsigned long nReadLength
+= FPDFImageObj_GetImageDataDecoded(mpPageObject, rData.data(), 
nLength);
+if (nReadLength == nLength)
+return true;
+}
+return false;
+}
+
 std::unique_ptr PDFiumPageObjectImpl::getImageBitmap()
 {
 std::unique_ptr pPDFiumBitmap;
commit 7bec8b8eac54fd7757cd21313cd83c622ec8925f
Author: Tomaž Vajngerl 
AuthorDate: Mon May 3 16:42:22 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue May 11 23:22:39 2021 +0900

Add PDF importer to read a PDF into drawinglayer primitives

Change-Id: I8d2e28a39515dfef8a1b4c6b06df095dd3a4eaec

diff --git a/Repository.mk b/Repository.mk
index cc31448cc3e8..3dc09aaff01a 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -399,6 +399,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
passwordcontainer \
pcr \
pdffilter \
+   pdfimporter \
$(call gb_Helper_optional,SCRIPTING,protocolhandler) \
sax \
sb \
diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx 
b/drawinglayer/source/tools/primitive2dxmldump.cxx
index ade8cfaed89b..992619fe89f6 100644
--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
+++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
@@ -113,

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

2021-05-11 Thread Heiko Tietze (via logerrit)
 svx/source/tbxctrls/tbcontrl.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 8fa4371664108560dda438be8fc997d9cfe4bb6e
Author: Heiko Tietze 
AuthorDate: Fri May 7 12:19:19 2021 +0200
Commit: Heiko Tietze 
CommitDate: Tue May 11 16:10:45 2021 +0200

Resolves tdf#127406 - Font name and style name not readable

Font name dropdown made 5 chars larger, style name +3

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

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index fbac6172a92e..f72141d85214 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -866,7 +866,7 @@ 
SvxStyleBox_Base::SvxStyleBox_Base(std::unique_ptr xWidget,
 m_xWidget->connect_custom_render(LINK(this, SvxStyleBox_Base, 
CustomRenderHdl));
 m_xWidget->set_custom_renderer(true);
 
-m_xWidget->set_entry_width_chars(COMBO_WIDTH_IN_CHARS);
+m_xWidget->set_entry_width_chars(COMBO_WIDTH_IN_CHARS + 3);
 }
 
 IMPL_LINK(SvxStyleBox_Base, CustomGetSizeHdl, OutputDevice&, rArg, Size)
@@ -1106,7 +1106,7 @@ void SvxStyleBox_Impl::SetOptimalSize()
 // set width in chars low so the size request will not be overridden
 m_xWidget->set_entry_width_chars(1);
 // tdf#132338 purely using this calculation to keep things their 
traditional width
-Size aSize(LogicToPixel(Size(COMBO_WIDTH_IN_CHARS * 4, 0), 
MapMode(MapUnit::MapAppFont)));
+Size aSize(LogicToPixel(Size((COMBO_WIDTH_IN_CHARS + 3) * 4, 0), 
MapMode(MapUnit::MapAppFont)));
 m_xWidget->set_size_request(aSize.Width(), -1);
 
 SetSizePixel(get_preferred_size());
@@ -1479,7 +1479,7 @@ 
SvxFontNameBox_Base::SvxFontNameBox_Base(std::unique_ptr xWidget
 m_xWidget->connect_focus_out(LINK(this, SvxFontNameBox_Base, FocusOutHdl));
 m_xWidget->connect_get_property_tree(LINK(this, SvxFontNameBox_Base, 
DumpAsPropertyTreeHdl));
 
-m_xWidget->set_entry_width_chars(COMBO_WIDTH_IN_CHARS);
+m_xWidget->set_entry_width_chars(COMBO_WIDTH_IN_CHARS + 5);
 }
 
 SvxFontNameBox_Impl::SvxFontNameBox_Impl(vcl::Window* pParent, const 
Reference& rDispatchProvider,
@@ -1614,7 +1614,7 @@ void SvxFontNameBox_Impl::SetOptimalSize()
 // set width in chars low so the size request will not be overridden
 m_xWidget->set_entry_width_chars(1);
 // tdf#132338 purely using this calculation to keep things their 
traditional width
-Size aSize(LogicToPixel(Size(COMBO_WIDTH_IN_CHARS * 4, 0), 
MapMode(MapUnit::MapAppFont)));
+Size aSize(LogicToPixel(Size((COMBO_WIDTH_IN_CHARS +5) * 4, 0), 
MapMode(MapUnit::MapAppFont)));
 m_xWidget->set_size_request(aSize.Width(), -1);
 
 SetSizePixel(get_preferred_size());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sfx2 officecfg/registry sc/uiconfig sd/uiconfig sfx2/inc sfx2/Library_sfx.mk sfx2/sdi sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk sw/uiconfig

2021-05-11 Thread Tomaž Vajngerl (via logerrit)
 include/sfx2/sfxsids.hrc |2 
 include/sfx2/viewfrm.hxx |3 
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu   |6 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |8 
 sc/uiconfig/scalc/menubar/menubar.xml|1 
 sd/uiconfig/sdraw/menubar/menubar.xml|1 
 sd/uiconfig/simpress/menubar/menubar.xml |1 
 sfx2/Library_sfx.mk  |1 
 sfx2/UIConfig_sfx.mk |1 
 sfx2/inc/commandpopup/CommandPopup.hxx   |  104 

 sfx2/sdi/frmslots.sdi|6 
 sfx2/sdi/sfx.sdi |   17 
 sfx2/source/commandpopup/CommandPopup.cxx|  258 
++
 sfx2/source/view/viewfrm.cxx |   15 
 sfx2/uiconfig/ui/commandpopup.ui |   92 +++
 sw/uiconfig/sglobal/menubar/menubar.xml  |1 
 sw/uiconfig/sweb/menubar/menubar.xml |1 
 sw/uiconfig/swform/menubar/menubar.xml   |1 
 sw/uiconfig/swriter/menubar/menubar.xml  |1 
 sw/uiconfig/swxform/menubar/menubar.xml  |1 
 20 files changed, 518 insertions(+), 3 deletions(-)

New commits:
commit 83d91ebbbda2204af9a09a921055a850a16911e0
Author: Tomaž Vajngerl 
AuthorDate: Tue May 22 14:44:39 2018 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue May 11 16:08:36 2021 +0200

tdf#91874 Command Popup - HUD to search and run LO commands

This adds Command Popup functionality, which is a HUD like pop-up
window, which can be used to search and run commands presented in
the main menu (but not limited to that only).
This is the initial version, which has limitation in searching
and running the command (doesn't work for some currently).

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

diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index d72bddf3100b..6a420c13b095 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -387,7 +387,7 @@ class SvxSearchItem;
 
 // default-ids for windows
 
-// free (SID_SFX_START + 610)
+#define SID_COMMAND_POPUP   (SID_SFX_START + 610)
 #define SID_NEWWINDOW   (SID_SFX_START + 620)
 #define SID_CLOSEWIN(SID_SFX_START + 621)
 #define SID_VIEWSHELL   (SID_SFX_START + 623)
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index c01da176b847..4585b722e487 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -44,6 +44,7 @@ class Size;
 class SfxChildWindow;
 class SfxInfoBarWindow;
 enum class InfobarType;
+class CommandPopupHandler;
 
 class SFX2_DLLPUBLIC SfxViewFrame: public SfxShell, public SfxListener
 {
@@ -56,6 +57,8 @@ class SFX2_DLLPUBLIC SfxViewFrame: public SfxShell, public 
SfxListener
 ImplSVWinData*  m_pWinData;
 sal_uInt16  m_nAdjustPosPixelLock;
 
+std::unique_ptr m_pCommandPopupHandler;
+
 private:
 SAL_DLLPRIVATE void Construct_Impl( SfxObjectShell *pObjSh );
 
diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index 5cbde0e93d8f..63c1ad0515e9 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -313,6 +313,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   .uno:OptionsTreeDialog
 
   
+  
+
+  I10N SHORTCUTS - NO 
TRANSLATE
+  .uno:CommandPopup
+
+  
   
 
   I10N SHORTCUTS - NO 
TRANSLATE
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index c2088e58db7e..3d9420e76587 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -6532,6 +6532,14 @@ bit 3 (0x8): #define 
UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
   1
 
   
+  
+
+  Search Commands
+
+
+  1
+
+  
   
 
   Development Tools
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml 
b/sc/uiconfig/scalc/menubar/

[Libreoffice-commits] core.git: dictionaries

2021-05-11 Thread Robert Campbell (via logerrit)
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0409c4f5de99a125865af0323036516eb62c5a73
Author: Robert Campbell 
AuthorDate: Tue May 11 15:56:42 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Tue May 11 15:56:42 2021 +0200

Update git submodules

* Update dictionaries from branch 'master'
  to 4d00eb0e60d4d1e89c1f50cd97b44e44abe26517
  - Update lo_LA.dic with new data

Change-Id: Id3975f55c62b256b85ecee78a679a51c22f6e5c9
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/114928
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/dictionaries b/dictionaries
index cb1b834e00bc..4d00eb0e60d4 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit cb1b834e00bc31f668b086e547032341a0162131
+Subproject commit 4d00eb0e60d4d1e89c1f50cd97b44e44abe26517
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Noel Grandin (via logerrit)
 cui/source/dialogs/cuihyperdlg.cxx |3 +--
 cui/source/dialogs/iconcdlg.cxx|   10 +-
 cui/source/inc/cuihyperdlg.hxx |2 +-
 3 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit a9435ac284f9f0a4d374ab891833fbf737d2898b
Author: Noel Grandin 
AuthorDate: Tue May 11 09:51:23 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue May 11 15:00:21 2021 +0200

fix leak in SvxHpLinkDlg

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

diff --git a/cui/source/dialogs/cuihyperdlg.cxx 
b/cui/source/dialogs/cuihyperdlg.cxx
index 42d17b2fe720..d8e1790f5b20 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -85,7 +85,6 @@ void SvxHlinkCtrl::StateChanged( sal_uInt16 nSID, 
SfxItemState eState,
 SvxHpLinkDlg::SvxHpLinkDlg(SfxBindings* pBindings, SfxChildWindow* pChild, 
weld::Window* pParent)
 : SfxModelessDialogController(pBindings, pChild, pParent, 
"cui/ui/hyperlinkdialog.ui", "HyperlinkDialog")
 , pSet( nullptr )
-, pExampleSet ( nullptr )
 , maCtrl  ( SID_HYPERLINK_GETLINK, *pBindings, this )
 , mbIsHTMLDoc ( false )
 , m_xIconCtrl(m_xBuilder->weld_notebook("tabcontrol"))
@@ -101,7 +100,7 @@ SvxHpLinkDlg::SvxHpLinkDlg(SfxBindings* pBindings, 
SfxChildWindow* pChild, weld:
 // ItemSet
 if ( pSet )
 {
-pExampleSet = new SfxItemSet( *pSet );
+pExampleSet.reset(new SfxItemSet( *pSet ));
 pOutSet.reset(new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() ));
 }
 
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index e166c7475381..8eeed40dc181 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -163,7 +163,7 @@ void SvxHpLinkDlg::DeActivatePageImpl ()
 IconChoicePage * pPage = pData->xPage.get();
 
 if ( !pExampleSet && pPage->HasExchangeSupport() && pSet )
-pExampleSet = new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() );
+pExampleSet.reset(new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() 
));
 
 if ( pSet )
 {
@@ -187,10 +187,10 @@ void SvxHpLinkDlg::DeActivatePageImpl ()
 if ( !pExampleSet )
 {
 SfxItemPool* pPool = pPage->GetItemSet().GetPool();
-pExampleSet =
-new SfxItemSet( *pPool, GetInputRanges( *pPool ) );
+pExampleSet.reset(
+new SfxItemSet( *pPool, GetInputRanges( *pPool ) ) );
 }
-nRet = pPage->DeactivatePage( pExampleSet );
+nRet = pPage->DeactivatePage( pExampleSet.get() );
 }
 else
 nRet = pPage->DeactivatePage( nullptr );
@@ -252,7 +252,7 @@ void SvxHpLinkDlg::SetInputSet( const SfxItemSet* pInSet )
 
 if ( !bSet && !pExampleSet && !pOutSet )
 {
-pExampleSet = new SfxItemSet( *pSet );
+pExampleSet.reset(new SfxItemSet( *pSet ));
 pOutSet.reset(new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() ));
 }
 }
diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx
index af0124239563..490fbb26e4e3 100644
--- a/cui/source/inc/cuihyperdlg.hxx
+++ b/cui/source/inc/cuihyperdlg.hxx
@@ -71,7 +71,7 @@ private:
 
 const SfxItemSet*   pSet;
 std::unique_ptr pOutSet;
-SfxItemSet* pExampleSet;
+std::unique_ptr pExampleSet;
 std::unique_ptr   pRanges;
 
 SvxHlinkCtrlmaCtrl; ///< Controller
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/clang

2021-05-11 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/implicitboolconversion.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit a5c37adc47d91176bdd64250a1f44f26b36215ac
Author: Noel Grandin 
AuthorDate: Tue May 11 13:28:35 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue May 11 14:59:59 2021 +0200

loplugin:implicitboolconversion workaround

after
commit eb6819e74a66750235d3a4a894479faeee8146e2
Date:   Sat May 1 22:13:37 2021 +0900
change usage of boost::hash_combine to o3tl::hash_combine

Change-Id: Idc70726f7e762b49111e6505ba3f978370d7cf7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115399
Reviewed-by: Tor Lillqvist 
Reviewed-by: Noel Grandin 
Tested-by: Jenkins

diff --git a/compilerplugins/clang/implicitboolconversion.cxx 
b/compilerplugins/clang/implicitboolconversion.cxx
index 14574e3cd420..7e708eb49843 100644
--- a/compilerplugins/clang/implicitboolconversion.cxx
+++ b/compilerplugins/clang/implicitboolconversion.cxx
@@ -907,6 +907,12 @@ void 
ImplicitBoolConversion::reportWarning(ImplicitCastExpr const * expr) {
 }
 }
 }
+
+// ignore template magic
+StringRef aFileName = 
getFilenameOfLocation(compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr)));
+if (loplugin::hasPathnamePrefix(aFileName, SRCDIR 
"/include/o3tl/hash_combine.hxx"))
+return;
+
 report(
 DiagnosticsEngine::Warning,
 "implicit conversion (%0) from %1 to %2", 
compat::getBeginLoc(expr))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 sc/source/filter/oox/workbookhelper.cxx |3 +++
 vcl/unx/gtk3/gtkdata.cxx|5 -
 vcl/unx/gtk3/gtkinst.cxx|2 ++
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 948066dba3556598337b3b5db75f77439627f94f
Author: Caolán McNamara 
AuthorDate: Tue May 11 12:24:48 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 14:40:34 2021 +0200

gtk4: enable svg pointer cursors

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

diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx
index eb534b0d42e6..a30e4df0b853 100644
--- a/vcl/unx/gtk3/gtkdata.cxx
+++ b/vcl/unx/gtk3/gtkdata.cxx
@@ -135,12 +135,7 @@ void GtkSalDisplay::monitorsChanged( GdkScreen const * 
pScreen )
 
 GdkCursor* GtkSalDisplay::getFromSvg(OUString const & name, int nXHot, int 
nYHot)
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 GdkPixbuf* pPixBuf = load_icon_by_name(name);
-#else
-(void)name;
-GdkPixbuf* pPixBuf = nullptr;
-#endif
 assert(pPixBuf && "missing image?");
 if (!pPixBuf)
 return nullptr;
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index b8ddee717811..3f15bf1f9fe0 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -3665,6 +3665,7 @@ namespace
 return OUString(pText, pText ? strlen(pText) : 0, 
RTL_TEXTENCODING_UTF8);
 }
 }
+#endif
 
 namespace
 {
@@ -3702,6 +3703,7 @@ GdkPixbuf* load_icon_by_name(const OUString& rIconName)
 return load_icon_by_name_theme_lang(rIconName, sIconTheme, sUILang);
 }
 
+#if !GTK_CHECK_VERSION(4, 0, 0)
 namespace
 {
 GdkPixbuf* getPixbuf(const css::uno::Reference& 
rImage)
commit 31d3f7c7e571acbce0b4da98e6a240ecdc8ea014
Author: Noel Grandin 
AuthorDate: Tue May 11 12:30:43 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue May 11 14:40:15 2021 +0200

do not leak on error path

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

diff --git a/sc/source/filter/oox/workbookhelper.cxx 
b/sc/source/filter/oox/workbookhelper.cxx
index 7adb76bcb7ef..8c7ffb3de4d8 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -370,7 +370,10 @@ ScRangeData* lcl_addNewByNameAndTokens( ScDocument& rDoc, 
ScRangeName* pNames, c
 if ( pNames->insert(pNew) )
 bDone = true;
 if (!bDone)
+{
+delete pNew;
 throw RuntimeException();
+}
 return pNew;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtkframe.hxx |   24 +---
 vcl/unx/gtk3/gtkframe.cxx|   83 ---
 2 files changed, 81 insertions(+), 26 deletions(-)

New commits:
commit a161d8c2c7322cda720ec487cd31baae23f16546
Author: Caolán McNamara 
AuthorDate: Tue May 11 12:12:42 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 14:39:49 2021 +0200

gtk4: add basic scrolling support

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

diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 4d440119a6b3..0f74ca131e3d 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -297,27 +297,39 @@ class GtkSalFrame final : public SalFrame
 void DrawingAreaMotion(int nEventX, int nEventY, guint32 nTime, guint 
nState);
 void DrawingAreaCrossing(SalEvent nEventType, int nEventX, int nEventY, 
guint32 nTime, guint nState);
 bool DrawingAreaKey(SalEvent nEventType, guint keyval, guint keycode, 
guint32 nTime, guint nState);
+void DrawingAreaScroll(double delta_x, double delta_y, int nEventX, int 
nEventY, guint32 nTime, guint nState);
 #if GTK_CHECK_VERSION(4, 0, 0)
 static void signalMap( GtkWidget*, gpointer );
 static void signalUnmap( GtkWidget*, gpointer );
+
 static gboolean signalDelete( GtkWidget*, gpointer );
+
 static void signalMotion(GtkEventControllerMotion *controller, 
double x, double y, gpointer);
+
+static gboolean signalScroll(GtkEventControllerScroll* pController, 
double delta_x, double delta_y, gpointer);
+
 static void signalEnter(GtkEventControllerMotion *controller, 
double x, double y, gpointer);
 static void signalLeave(GtkEventControllerMotion *controller, 
gpointer);
-static gboolean signalKeyPressed(GtkEventControllerKey *controller, 
guint keyval, guint keycode, GdkModifierType state, gpointer user_data);
-static gboolean signalKeyReleased(GtkEventControllerKey *controller, 
guint keyval, guint keycode, GdkModifierType state, gpointer user_data);
+
+static gboolean signalKeyPressed(GtkEventControllerKey *controller, 
guint keyval, guint keycode, GdkModifierType state, gpointer);
+static gboolean signalKeyReleased(GtkEventControllerKey *controller, 
guint keyval, guint keycode, GdkModifierType state, gpointer);
 #else
 static gboolean signalMap( GtkWidget*, GdkEvent*, gpointer );
 static gboolean signalUnmap( GtkWidget*, GdkEvent*, gpointer );
+
 static gboolean signalDelete( GtkWidget*, GdkEvent*, gpointer );
+
 static gboolean signalMotion( GtkWidget*, GdkEventMotion*, gpointer );
+
+static gboolean signalScroll( GtkWidget*, GdkEvent*, gpointer );
+
+static gboolean signalCrossing( GtkWidget*, GdkEventCrossing*, 
gpointer );
+
 static gboolean signalKey( GtkWidget*, GdkEventKey*, gpointer );
 #endif
 #if !GTK_CHECK_VERSION(4, 0, 0)
 static gboolean signalConfigure( GtkWidget*, GdkEventConfigure*, 
gpointer );
 static gboolean signalWindowState( GtkWidget*, GdkEvent*, gpointer );
-static gboolean signalScroll( GtkWidget*, GdkEvent*, gpointer );
-static gboolean signalCrossing( GtkWidget*, GdkEventCrossing*, 
gpointer );
 #endif
 static void signalDestroy( GtkWidget*, gpointer );
 
@@ -385,7 +397,9 @@ public:
 basegfx::B2IVector  m_aFrameSize;
 DamageHandler   m_aDamageHandler;
 std::vector  m_aPendingScrollEvents;
+#if !GTK_CHECK_VERSION(4, 0, 0)
 Idlem_aSmoothScrollIdle;
+#endif
 int m_nGrabLevel;
 boolm_bSalObjectSetPosSize;
 GtkSalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle );
@@ -451,10 +465,10 @@ public:
 
 #if !GTK_CHECK_VERSION(4, 0, 0)
 void nopaint_container_resize_children(GtkContainer*);
-#endif
 
 void LaunchAsyncScroll(GdkEvent const * pEvent);
 DECL_LINK(AsyncScroll, Timer *, void);
+#endif
 
 virtual ~GtkSalFrame() override;
 
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 1838652ebd3d..b98e5d2a75bf 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -654,8 +654,10 @@ void GtkSalFrame::InvalidateGraphics()
 
 GtkSalFrame::~GtkSalFrame()
 {
+#if !GTK_CHECK_VERSION(4,0,0)
 m_aSmoothScrollIdle.Stop();
 m_aSmoothScrollIdle.ClearInvokeHandler();
+#endif
 
 if (m_pDropTarget)
 {
@@ -889,7 +891,9 @@ void GtkSalFrame::InitCommon()
 m_aDamageHandler.handle = this;
 m_aDamageHandler.damaged = ::damaged;
 
+#if !GTK_CHECK_VERSION(4,0,0)
 m_aSmoothScrollIdle.SetInvokeHandler(LINK(this, GtkSalFrame, AsyncScroll));
+#endif
 
 m_pTopLevelGrid = GTK_GRID(gtk_grid_new());
 #if !GTK_CHECK_VERSION(4,0,0)
@@ -

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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtkframe.hxx |1 
 vcl/unx/gtk3/gtkframe.cxx|   79 +--
 2 files changed, 70 insertions(+), 10 deletions(-)

New commits:
commit d19397ea3fe742d81251382c61608ea93a42ce74
Author: Caolán McNamara 
AuthorDate: Tue May 11 11:36:35 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 14:39:25 2021 +0200

gtk4: add basic Input Engine support

old hack to emulate single key press events not supported (yet?)

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

diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index f80e6f068edf..4d440119a6b3 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -180,6 +180,7 @@ class GtkSalFrame final : public SalFrame
 GtkFixed*   m_pFixedContainer;
 #else
 GtkDrawingArea* m_pFixedContainer;
+GtkEventControllerKey*  m_pKeyController;
 #endif
 #if !GTK_CHECK_VERSION(4, 0, 0)
 GdkWindow*  m_pForeignParent;
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 718140d0ac86..1838652ebd3d 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -1031,10 +1031,10 @@ void GtkSalFrame::InitCommon()
 g_signal_connect( G_OBJECT(m_pWindow), "key-press-event", 
G_CALLBACK(signalKey), this );
 g_signal_connect( G_OBJECT(m_pWindow), "key-release-event", 
G_CALLBACK(signalKey), this );
 #else
-GtkEventController* pKeyController = gtk_event_controller_key_new();
-g_signal_connect(pKeyController, "key-pressed", 
G_CALLBACK(signalKeyPressed), this);
-g_signal_connect(pKeyController, "key-released", 
G_CALLBACK(signalKeyReleased), this);
-gtk_widget_add_controller(pEventWidget, pKeyController);
+m_pKeyController = 
GTK_EVENT_CONTROLLER_KEY(gtk_event_controller_key_new());
+g_signal_connect(m_pKeyController, "key-pressed", 
G_CALLBACK(signalKeyPressed), this);
+g_signal_connect(m_pKeyController, "key-released", 
G_CALLBACK(signalKeyReleased), this);
+gtk_widget_add_controller(pEventWidget, 
GTK_EVENT_CONTROLLER(m_pKeyController));
 
 #endif
 g_signal_connect( G_OBJECT(m_pWindow), "destroy", 
G_CALLBACK(signalDestroy), this );
@@ -3910,11 +3910,6 @@ bool GtkSalFrame::DrawingAreaKey(SalEvent nEventType, 
guint keyval, guint keycod
 {
 UpdateLastInputEventTime(nTime);
 
-#if 0
-if (m_pIMHandler && m_pIMHandler->handleKeyEvent(pEvent))
-return true;
-#endif
-
 vcl::DeletionListener aDel(this);
 
 bool bStopProcessingKey = false;
@@ -4573,6 +4568,7 @@ void GtkSalFrame::IMHandler::createIMContext()
 GetGenericUnixSalData()->ErrorTrapPush();
 #if GTK_CHECK_VERSION(4, 0, 0)
 gtk_im_context_set_client_widget(m_pIMContext, 
m_pFrame->getMouseEventWidget());
+gtk_event_controller_key_set_im_context(m_pFrame->m_pKeyController, 
m_pIMContext);
 #else
 gtk_im_context_set_client_window(m_pIMContext, 
gtk_widget_get_window(m_pFrame->getMouseEventWidget()));
 #endif
@@ -4590,6 +4586,7 @@ void GtkSalFrame::IMHandler::deleteIMContext()
 GetGenericUnixSalData()->ErrorTrapPush();
 #if GTK_CHECK_VERSION(4, 0, 0)
 gtk_im_context_set_client_widget(m_pIMContext, nullptr);
+gtk_event_controller_key_set_im_context(m_pFrame->m_pKeyController, 
nullptr);
 #else
 gtk_im_context_set_client_window(m_pIMContext, nullptr);
 #endif
@@ -4856,8 +4853,70 @@ void GtkSalFrame::IMHandler::signalIMCommit( 
GtkIMContext* /*pContext*/, gchar*
 }
 }
 #else
-void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* /*pContext*/, 
gchar* /*pText*/, gpointer /*im_handler*/ )
+void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* /*pContext*/, 
gchar* pText, gpointer im_handler )
 {
+GtkSalFrame::IMHandler* pThis = 
static_cast(im_handler);
+
+SolarMutexGuard aGuard;
+vcl::DeletionListener aDel( pThis->m_pFrame );
+{
+#if 0
+const bool bWasPreedit =
+(pThis->m_aInputEvent.mpTextAttr != nullptr) ||
+pThis->m_bPreeditJustChanged;
+#endif
+
+pThis->m_aInputEvent.mpTextAttr = nullptr;
+pThis->m_aInputEvent.maText = OUString( pText, 
strlen(pText), RTL_TEXTENCODING_UTF8 );
+pThis->m_aInputEvent.mnCursorPos= 
pThis->m_aInputEvent.maText.getLength();
+pThis->m_aInputEvent.mnCursorFlags  = 0;
+
+pThis->m_aInputFlags.clear();
+
+/* necessary HACK: all keyboard input comes in here as soon as an 
IMContext is set
+ *  which is logical and consequent. But since even simple input like
+ *   comes through the commit signal instead of signalKey
+ *  and all kinds of windows only implement KeyInput (e.g. PushButtons,
+ *  RadioButtons and a lot of other Controls), will send a single
+ *  KeyInput/

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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtkframe.hxx |5 +
 vcl/unx/gtk3/gtkframe.cxx|  129 ++-
 2 files changed, 132 insertions(+), 2 deletions(-)

New commits:
commit 0064b47ee1ea9e8c7a63497889d2aa7e0126b95d
Author: Caolán McNamara 
AuthorDate: Tue May 11 10:38:08 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 14:39:08 2021 +0200

gtk4: add initial keyboard event support

basic typing works now

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

diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index e7fff2ffbcfe..f80e6f068edf 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -295,6 +295,7 @@ class GtkSalFrame final : public SalFrame
 bool WindowCloseRequest();
 void DrawingAreaMotion(int nEventX, int nEventY, guint32 nTime, guint 
nState);
 void DrawingAreaCrossing(SalEvent nEventType, int nEventX, int nEventY, 
guint32 nTime, guint nState);
+bool DrawingAreaKey(SalEvent nEventType, guint keyval, guint keycode, 
guint32 nTime, guint nState);
 #if GTK_CHECK_VERSION(4, 0, 0)
 static void signalMap( GtkWidget*, gpointer );
 static void signalUnmap( GtkWidget*, gpointer );
@@ -302,15 +303,17 @@ class GtkSalFrame final : public SalFrame
 static void signalMotion(GtkEventControllerMotion *controller, 
double x, double y, gpointer);
 static void signalEnter(GtkEventControllerMotion *controller, 
double x, double y, gpointer);
 static void signalLeave(GtkEventControllerMotion *controller, 
gpointer);
+static gboolean signalKeyPressed(GtkEventControllerKey *controller, 
guint keyval, guint keycode, GdkModifierType state, gpointer user_data);
+static gboolean signalKeyReleased(GtkEventControllerKey *controller, 
guint keyval, guint keycode, GdkModifierType state, gpointer user_data);
 #else
 static gboolean signalMap( GtkWidget*, GdkEvent*, gpointer );
 static gboolean signalUnmap( GtkWidget*, GdkEvent*, gpointer );
 static gboolean signalDelete( GtkWidget*, GdkEvent*, gpointer );
 static gboolean signalMotion( GtkWidget*, GdkEventMotion*, gpointer );
+static gboolean signalKey( GtkWidget*, GdkEventKey*, gpointer );
 #endif
 #if !GTK_CHECK_VERSION(4, 0, 0)
 static gboolean signalConfigure( GtkWidget*, GdkEventConfigure*, 
gpointer );
-static gboolean signalKey( GtkWidget*, GdkEventKey*, gpointer );
 static gboolean signalWindowState( GtkWidget*, GdkEvent*, gpointer );
 static gboolean signalScroll( GtkWidget*, GdkEvent*, gpointer );
 static gboolean signalCrossing( GtkWidget*, GdkEventCrossing*, 
gpointer );
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index b1f2becba4b2..718140d0ac86 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -1025,9 +1025,17 @@ void GtkSalFrame::InitCommon()
 #endif
 #if !GTK_CHECK_VERSION(4,0,0)
 g_signal_connect( G_OBJECT(m_pWindow), "configure-event", 
G_CALLBACK(signalConfigure), this );
+g_signal_connect( G_OBJECT(m_pWindow), "window-state-event", 
G_CALLBACK(signalWindowState), this );
+#endif
+#if !GTK_CHECK_VERSION(4,0,0)
 g_signal_connect( G_OBJECT(m_pWindow), "key-press-event", 
G_CALLBACK(signalKey), this );
 g_signal_connect( G_OBJECT(m_pWindow), "key-release-event", 
G_CALLBACK(signalKey), this );
-g_signal_connect( G_OBJECT(m_pWindow), "window-state-event", 
G_CALLBACK(signalWindowState), this );
+#else
+GtkEventController* pKeyController = gtk_event_controller_key_new();
+g_signal_connect(pKeyController, "key-pressed", 
G_CALLBACK(signalKeyPressed), this);
+g_signal_connect(pKeyController, "key-released", 
G_CALLBACK(signalKeyReleased), this);
+gtk_widget_add_controller(pEventWidget, pKeyController);
+
 #endif
 g_signal_connect( G_OBJECT(m_pWindow), "destroy", 
G_CALLBACK(signalDestroy), this );
 
@@ -3896,6 +3904,125 @@ gboolean GtkSalFrame::signalKey(GtkWidget* pWidget, 
GdkEventKey* pEvent, gpointe
 
 return bStopProcessingKey;
 }
+#else
+
+bool GtkSalFrame::DrawingAreaKey(SalEvent nEventType, guint keyval, guint 
keycode, guint32 nTime, guint state)
+{
+UpdateLastInputEventTime(nTime);
+
+#if 0
+if (m_pIMHandler && m_pIMHandler->handleKeyEvent(pEvent))
+return true;
+#endif
+
+vcl::DeletionListener aDel(this);
+
+bool bStopProcessingKey = false;
+
+// handle modifiers
+if( keyval == GDK_KEY_Shift_L || keyval == GDK_KEY_Shift_R ||
+keyval == GDK_KEY_Control_L || keyval == GDK_KEY_Control_R ||
+keyval == GDK_KEY_Alt_L || keyval == GDK_KEY_Alt_R ||
+keyval == GDK_KEY_Meta_L || keyval == GDK_KEY_Meta_R ||
+keyval == GDK_KEY_Super_L || keyval == GDK_KEY_Super_R )
+{
+sal_uInt16 nModCode = GetKeyMo

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

2021-05-11 Thread Noel Grandin (via logerrit)
 sw/source/filter/ww8/rtfexport.cxx |3 +--
 sw/source/filter/ww8/rtfexport.hxx |2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 9267e9fbd2ad1a05986f7ce16d4fef28cf7f08fb
Author: Noel Grandin 
AuthorDate: Tue May 11 10:04:47 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue May 11 14:21:25 2021 +0200

fix leak in RtfExport

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

diff --git a/sw/source/filter/ww8/rtfexport.cxx 
b/sw/source/filter/ww8/rtfexport.cxx
index 4b4712a7bf09..c7be2d080d0a 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -731,7 +731,7 @@ ErrCode RtfExport::ExportDocument_Impl()
 }
 
 // Init sections
-m_pSections = new MSWordSections(*this);
+m_pSections.reset(new MSWordSections(*this));
 
 // Page description
 WritePageDescTable();
@@ -1031,7 +1031,6 @@ RtfExport::RtfExport(RtfExportFilter* pFilter, SwDoc& 
rDocument,
 : MSWordExportBase(rDocument, pCurrentPam, &rOriginalPam)
 , m_pFilter(pFilter)
 , m_pWriter(pWriter)
-, m_pSections(nullptr)
 , m_bOutOutlineOnly(bOutOutlineOnly)
 , m_eDefaultEncoding(
   
rtl_getTextEncodingFromWindowsCharset(sw::ms::rtl_TextEncodingToWinCharset(DEF_ENCODING)))
diff --git a/sw/source/filter/ww8/rtfexport.hxx 
b/sw/source/filter/ww8/rtfexport.hxx
index 9b33c1304659..105f6305eba2 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -43,7 +43,7 @@ class RtfExport : public MSWordExportBase
 std::unique_ptr m_pAttrOutput;
 
 /// Sections/headers/footers
-MSWordSections* m_pSections;
+std::unique_ptr m_pSections;
 
 std::unique_ptr m_pSdrExport;
 bool m_bOutOutlineOnly;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Xisco Fauli (via logerrit)
 svl/qa/unit/svl.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 38f3bd349586ecae867c74b746fd3db7c6104d70
Author: Xisco Fauli 
AuthorDate: Tue May 11 11:25:33 2021 +0200
Commit: Xisco Fauli 
CommitDate: Tue May 11 14:11:14 2021 +0200

tdf#127363: svl_qa_cppunit: Add unittest

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

diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 47854129a6be..284692b2724f 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1132,6 +1132,7 @@ void Test::testIsNumberFormat()
 { "Jan1", false },
 { "Jan1 2000", true },
 { "Jan 1", true },
+{ "Sept 1", true }, //tdf#127363
 { "Jan 1 2000", true },
 { "5-12-14", false },
 { "005-12-14", true },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Samuel Mehrbrodt (via logerrit)
 sc/inc/queryentry.hxx  |2 ++
 sc/source/core/tool/queryentry.cxx |   20 
 sc/source/ui/dbgui/filtdlg.cxx |9 +
 3 files changed, 31 insertions(+)

New commits:
commit 518d0d8283b6d732cffa102c6b7c2fe01d1ec348
Author: Samuel Mehrbrodt 
AuthorDate: Tue May 11 11:52:30 2021 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue May 11 13:35:45 2021 +0200

tdf#76258 Skip color items in filter dialog for now

Change-Id: Iada39f065dbb9b975ada90bcc4135c39b9710def
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115393
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sc/inc/queryentry.hxx b/sc/inc/queryentry.hxx
index f7a7f6896934..1855744f78f7 100644
--- a/sc/inc/queryentry.hxx
+++ b/sc/inc/queryentry.hxx
@@ -79,7 +79,9 @@ struct SC_DLLPUBLIC ScQueryEntry
 void SetQueryByNonEmpty();
 bool IsQueryByNonEmpty() const;
 void SetQueryByTextColor(Color color);
+bool IsQueryByTextColor() const;
 void SetQueryByBackgroundColor(Color color);
+bool IsQueryByBackgroundColor() const;
 const Item& GetQueryItem() const { return GetQueryItemImpl(); }
 Item& GetQueryItem() { return GetQueryItemImpl(); }
 voidClear();
diff --git a/sc/source/core/tool/queryentry.cxx 
b/sc/source/core/tool/queryentry.cxx
index 836b2caf7dd8..5853a9760c1d 100644
--- a/sc/source/core/tool/queryentry.cxx
+++ b/sc/source/core/tool/queryentry.cxx
@@ -128,6 +128,16 @@ void ScQueryEntry::SetQueryByTextColor(Color color)
 rItem.maColor = color;
 }
 
+bool ScQueryEntry::IsQueryByTextColor() const
+{
+if (maQueryItems.size() != 1)
+return false;
+
+const Item& rItem = maQueryItems[0];
+return eOp == SC_EQUAL &&
+rItem.meType == ByTextColor;
+}
+
 void ScQueryEntry::SetQueryByBackgroundColor(Color color)
 {
 eOp = SC_EQUAL;
@@ -139,6 +149,16 @@ void ScQueryEntry::SetQueryByBackgroundColor(Color color)
 rItem.maColor = color;
 }
 
+bool ScQueryEntry::IsQueryByBackgroundColor() const
+{
+if (maQueryItems.size() != 1)
+return false;
+
+const Item& rItem = maQueryItems[0];
+return eOp == SC_EQUAL &&
+rItem.meType == ByBackgroundColor;
+}
+
 ScQueryEntry::Item& ScQueryEntry::GetQueryItemImpl() const
 {
 if (maQueryItems.size() != 1)
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 322c617aa2f9..db015dcaa268 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -233,6 +233,11 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
 aValStr = aStrNotEmpty;
 maCondLbArr[i]->set_sensitive(false);
 }
+else if (rEntry.IsQueryByTextColor() || 
rEntry.IsQueryByBackgroundColor())
+{
+// No support for color filters in filter dialog currently
+continue;
+}
 else
 {
 const ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
@@ -1247,6 +1252,10 @@ void ScFilterDlg::RefreshEditRow( size_t nOffset )
 aValStr = aStrNotEmpty;
 maCondLbArr[i]->set_sensitive(false);
 }
+else if (rEntry.IsQueryByTextColor() || 
rEntry.IsQueryByBackgroundColor())
+{
+continue;
+}
 else
 {
 SetValString(aQueryStr, rItem, aValStr);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Noel Grandin (via logerrit)
 include/vcl/glyphitem.hxx   |4 ++--
 vcl/source/gdi/impglyphitem.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 0111565f560a4978ee664403ba86af1e72a2ba05
Author: Noel Grandin 
AuthorDate: Tue May 11 11:47:36 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue May 11 13:16:34 2021 +0200

loplugin:noexceptmove

after
commit adfd91d24678053b9a1475ad6985eb1fc548706a
Date:   Mon May 10 20:17:11 2021 +0200
fix leak in SalLayoutGlyphs

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

diff --git a/include/vcl/glyphitem.hxx b/include/vcl/glyphitem.hxx
index 68f89701b2c3..6ca2de170561 100644
--- a/include/vcl/glyphitem.hxx
+++ b/include/vcl/glyphitem.hxx
@@ -41,11 +41,11 @@ class VCL_DLLPUBLIC SalLayoutGlyphs final
 public:
 SalLayoutGlyphs();
 SalLayoutGlyphs(const SalLayoutGlyphs&) = delete;
-SalLayoutGlyphs(SalLayoutGlyphs&&);
+SalLayoutGlyphs(SalLayoutGlyphs&&) noexcept;
 ~SalLayoutGlyphs();
 
 SalLayoutGlyphs& operator=(const SalLayoutGlyphs&) = delete;
-SalLayoutGlyphs& operator=(SalLayoutGlyphs&&);
+SalLayoutGlyphs& operator=(SalLayoutGlyphs&&) noexcept;
 
 SalLayoutGlyphsImpl* Impl(unsigned int nLevel) const;
 void AppendImpl(SalLayoutGlyphsImpl* pImpl);
diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx
index e9d5e699356c..06dbaf6c5f32 100644
--- a/vcl/source/gdi/impglyphitem.cxx
+++ b/vcl/source/gdi/impglyphitem.cxx
@@ -27,13 +27,13 @@ SalLayoutGlyphs::SalLayoutGlyphs() {}
 
 SalLayoutGlyphs::~SalLayoutGlyphs() {}
 
-SalLayoutGlyphs::SalLayoutGlyphs(SalLayoutGlyphs&& rOther)
+SalLayoutGlyphs::SalLayoutGlyphs(SalLayoutGlyphs&& rOther) noexcept
 {
 std::swap(m_pImpl, rOther.m_pImpl);
 std::swap(m_pExtraImpls, rOther.m_pExtraImpls);
 }
 
-SalLayoutGlyphs& SalLayoutGlyphs::operator=(SalLayoutGlyphs&& rOther)
+SalLayoutGlyphs& SalLayoutGlyphs::operator=(SalLayoutGlyphs&& rOther) noexcept
 {
 if (this != &rOther)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Tor Lillqvist (via logerrit)
 configure.ac |   21 +++--
 1 file changed, 15 insertions(+), 6 deletions(-)

New commits:
commit 70c75b2d21fc136362e6476ea2f84478459a018c
Author: Tor Lillqvist 
AuthorDate: Tue May 11 10:48:28 2021 +0300
Commit: Tor Lillqvist 
CommitDate: Tue May 11 13:00:32 2021 +0200

Accept macOS SDK 11.3 and iOS SDK 14.5

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

diff --git a/configure.ac b/configure.ac
index 39c50e3260b8..a120ef24069f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2854,7 +2854,7 @@ if test $_os = Darwin; then
 # higher than or equal to the minimum required should be found.
 
 AC_MSG_CHECKING([what macOS SDK to use])
-for _macosx_sdk in ${with_macosx_sdk-11.1 11.0 10.15 10.14 10.13 10.12}; do
+for _macosx_sdk in ${with_macosx_sdk-11.3 11.1 11.0 10.15 10.14 10.13 
10.12}; do
 MACOSX_SDK_PATH=`xcrun --sdk macosx${_macosx_sdk} --show-sdk-path 2> 
/dev/null`
 if test -d "$MACOSX_SDK_PATH"; then
 with_macosx_sdk="${_macosx_sdk}"
@@ -2892,8 +2892,11 @@ if test $_os = Darwin; then
 11.1)
 MACOSX_SDK_VERSION=110100
 ;;
+11.3)
+MACOSX_SDK_VERSION=110300
+;;
 *)
-AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported 
value, supported values are 10.12--11.1])
+AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported 
value, supported values are 10.12--11.3])
 ;;
 esac
 
@@ -2958,8 +2961,11 @@ if test $_os = Darwin; then
 11.1)
 MAC_OS_X_VERSION_MIN_REQUIRED="110100"
 ;;
+11.3)
+MAC_OS_X_VERSION_MIN_REQUIRED="110300"
+;;
 *)
-AC_MSG_ERROR([with-macosx-version-min-required 
$with_macosx_version_min_required is not a supported value, supported values 
are 10.10--11.1])
+AC_MSG_ERROR([with-macosx-version-min-required 
$with_macosx_version_min_required is not a supported value, supported values 
are 10.10--11.3])
 ;;
 esac
 MAC_OS_X_VERSION_MIN_REQUIRED_DOTS=$with_macosx_version_min_required
@@ -3027,8 +3033,11 @@ if test $_os = Darwin; then
 11.1)
 MAC_OS_X_VERSION_MAX_ALLOWED="110100"
 ;;
+11.3)
+MAC_OS_X_VERSION_MAX_ALLOWED="110100"
+;;
 *)
-AC_MSG_ERROR([with-macosx-version-max-allowed 
$with_macosx_version_max_allowed is not a supported value, supported values are 
10.10--11.1])
+AC_MSG_ERROR([with-macosx-version-max-allowed 
$with_macosx_version_max_allowed is not a supported value, supported values are 
10.10--11.3])
 ;;
 esac
 
@@ -3148,8 +3157,8 @@ dnl 
===
 
 if test $_os = iOS; then
 AC_MSG_CHECKING([what iOS SDK to use])
-current_sdk_ver=14.4
-older_sdk_vers="14.3 14.2 14.1 14.0 13.7 13.6 13.5 13.4 13.2 13.1 13.0 
12.4 12.2"
+current_sdk_ver=14.5
+older_sdk_vers="14.4 14.3 14.2 14.1 14.0 13.7 13.6 13.5 13.4 13.2 13.1 
13.0 12.4 12.2"
 if test "$enable_ios_simulator" = "yes"; then
 platform=iPhoneSimulator
 versionmin=-mios-simulator-version-min=12.2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Noel Grandin (via logerrit)
 sfx2/source/view/lokhelper.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 5ed6aae8b572fd2b7623454acbb1de791f166c45
Author: Noel Grandin 
AuthorDate: Tue May 11 09:45:13 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue May 11 12:51:19 2021 +0200

fix leak in LOKPostAsyncEvent

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

diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 0487ff96922e..389c45392b46 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -612,9 +612,11 @@ namespace
 
 void LOKPostAsyncEvent(void* pEv, void*)
 {
-LOKAsyncEventData* pLOKEv = static_cast(pEv);
+std::unique_ptr 
pLOKEv(static_cast(pEv));
 if (pLOKEv->mpWindow->IsDisposed())
+{
 return;
+}
 
 int nView = SfxLokHelper::getView(nullptr);
 if (nView != pLOKEv->mnView)
@@ -676,8 +678,6 @@ namespace
 assert(false);
 break;
 }
-
-delete pLOKEv;
 }
 
 void postEventAsync(LOKAsyncEventData *pEvent)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-5-4-7-2' - configure.ac

2021-05-11 Thread Juergen Funk (via logerrit)
 configure.ac |   21 ++---
 1 file changed, 10 insertions(+), 11 deletions(-)

New commits:
commit 5bd0fe89f87cd3c00da988809ecd0c42f57fb7d0
Author: Juergen Funk 
AuthorDate: Wed Sep 5 15:36:23 2018 +0200
Commit: Andras Timar 
CommitDate: Tue May 11 12:41:21 2021 +0200

Improve the Windows SDK 10 ProductVersion-Path

At the moment the ProductVersion-Path has always the same format,
with this patch, when the format the same, then no change is need for
the next Version.

Change-Id: I6a52fd20751ba139dd5ed6e3802f29c5e8f02975
Reviewed-on: https://gerrit.libreoffice.org/60041
Tested-by: Jenkins
Reviewed-by: Juergen Funk (CIB) 

diff --git a/configure.ac b/configure.ac
index bab32d23e6fa..a4dc1c7d2622 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5193,17 +5193,16 @@ find_winsdk_version()
 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft 
SDKs/Windows/v${1}/ProductVersion"
 if test -n "$regvalue"; then
 winsdkbinsubdir="$regvalue".0
-fi
-winsdklibsubdir=$regvalue
-if test "$regvalue" = "10.0.14393"; then
-winsdklibsubdir="10.0.14393.0"
-elif test "$regvalue" = "10.0.15063"; then
-winsdklibsubdir="10.0.15063.0"
-dnl Hack needed at least by tml:
-if test ! -f "${winsdktest}/Include/10.0.15063.0/um/sqlext.h" \
--a -f "${winsdktest}/Include/10.0.14393.0/um/sqlext.h"
-then
-winsdklibsubdir="10.0.14393.0"
+winsdklibsubdir=$winsdkbinsubdir
+tmppath="$winsdktest\\Include\\$winsdklibsubdir"
+# test exist the SDK path
+if test -d "$tmppath"; then
+   # when path is convertable to a short path then path is okay
+   if ! cygpath -d "$tmppath"; then
+  AC_MSG_ERROR([Windows SDK doesn't have a 8.3 name, see 
NtfsDisable8dot3NameCreation])
+   fi
+else
+   AC_MSG_ERROR([The Windows SDK not found, check the 
installation])
 fi
 fi
 return
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-6-1' - configure.ac

2021-05-11 Thread Juergen Funk (via logerrit)
 configure.ac |   21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

New commits:
commit b341657aa04cd3d7910d0765424649e990b03d80
Author: Juergen Funk 
AuthorDate: Wed Sep 5 15:36:23 2018 +0200
Commit: Andras Timar 
CommitDate: Tue May 11 12:38:59 2021 +0200

Improve the Windows SDK 10 ProductVersion-Path

At the moment the ProductVersion-Path has always the same format,
with this patch, when the format the same, then no change is need for
the next Version.

Change-Id: I6a52fd20751ba139dd5ed6e3802f29c5e8f02975
Reviewed-on: https://gerrit.libreoffice.org/60041
Tested-by: Jenkins
Reviewed-by: Juergen Funk (CIB) 

diff --git a/configure.ac b/configure.ac
index 34720ba7e7b9..b1a8fd178d08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5240,16 +5240,17 @@ find_winsdk_version()
 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft 
SDKs/Windows/v${1}/ProductVersion"
 if test -n "$regvalue"; then
 winsdkbinsubdir="$regvalue".0
-fi
-winsdklibsubdir=$regvalue
-if test "$regvalue" = "10.0.14393"; then
-winsdklibsubdir="10.0.14393.0"
-elif test "$regvalue" = "10.0.16299"; then
-winsdklibsubdir="10.0.16299.0"
-elif test "$regvalue" = "10.0.15063"; then
-winsdklibsubdir="10.0.15063.0"
-elif test "$regvalue" = "10.0.17134"; then
-winsdklibsubdir="$regvalue.0"
+winsdklibsubdir=$winsdkbinsubdir
+tmppath="$winsdktest\\Include\\$winsdklibsubdir"
+# test exist the SDK path
+if test -d "$tmppath"; then
+   # when path is convertable to a short path then path is okay
+   if ! cygpath -d "$tmppath"; then
+  AC_MSG_ERROR([Windows SDK doesn't have a 8.3 name, see 
NtfsDisable8dot3NameCreation])
+   fi
+else
+   AC_MSG_ERROR([The Windows SDK not found, check the 
installation])
+fi
 fi
 return
 fi
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basctl/source sc/source sdext/source vbahelper/source vcl/android vcl/inc vcl/source vcl/unx vcl/win xmloff/inc xmloff/source

2021-05-11 Thread Tomaž Vajngerl (via logerrit)
 basctl/source/basicide/bastypes.cxx   |6 +-
 sc/source/core/data/dpresfilter.cxx   |6 +-
 sc/source/ui/view/spellcheckcontext.cxx   |6 +-
 sdext/source/pdfimport/inc/pdfihelper.hxx |   62 +++---
 vbahelper/source/vbahelper/vbaapplicationbase.cxx |8 +-
 vcl/android/androidinst.cxx   |1 
 vcl/inc/ControlCacheKey.hxx   |   12 ++--
 vcl/inc/impfontcache.hxx  |6 +-
 vcl/inc/svdata.hxx|8 +-
 vcl/inc/widgetdraw/WidgetDefinition.hxx   |6 +-
 vcl/source/font/fontinstance.cxx  |7 +-
 vcl/source/gdi/gfxlink.cxx|4 -
 vcl/source/graphic/BinaryDataContainer.cxx|6 +-
 vcl/unx/generic/app/wmadaptor.cxx |1 
 vcl/unx/generic/fontmanager/fontconfig.cxx|   12 ++--
 vcl/unx/generic/gdi/cairotextrender.cxx   |2 
 vcl/unx/generic/printer/ppdparser.cxx |8 +-
 vcl/win/gdi/winlayout.cxx |6 +-
 xmloff/inc/StyleMap.hxx   |6 +-
 xmloff/source/core/xmltkmap.cxx   |6 +-
 xmloff/source/forms/property_meta_data.cxx|6 +-
 xmloff/source/transform/TransformerActions.hxx|6 +-
 22 files changed, 98 insertions(+), 93 deletions(-)

New commits:
commit eb6819e74a66750235d3a4a894479faeee8146e2
Author: Tomaž Vajngerl 
AuthorDate: Sat May 1 22:13:37 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue May 11 12:28:24 2021 +0200

change usage of boost::hash_combine to o3tl::hash_combine

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

diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index 2d1cfa6f0b76..34f17ea7677f 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -45,7 +45,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 namespace basctl
 {
@@ -679,8 +679,8 @@ bool LibInfo::Key::operator == (Key const& rKey) const
 size_t LibInfo::Key::Hash::operator () (Key const& rKey) const
 {
 std::size_t seed = 0;
-boost::hash_combine(seed, rKey.m_aDocument.hashCode());
-boost::hash_combine(seed, rKey.m_aLibName.hashCode());
+o3tl::hash_combine(seed, rKey.m_aDocument.hashCode());
+o3tl::hash_combine(seed, rKey.m_aLibName.hashCode());
 return seed;
 }
 
diff --git a/sc/source/core/data/dpresfilter.cxx 
b/sc/source/core/data/dpresfilter.cxx
index c0a496cb76ce..346cbef8b4f1 100644
--- a/sc/source/core/data/dpresfilter.cxx
+++ b/sc/source/core/data/dpresfilter.cxx
@@ -13,7 +13,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 #include 
@@ -30,8 +30,8 @@ ScDPResultFilterContext::ScDPResultFilterContext() :
 size_t ScDPResultTree::NamePairHash::operator() (const NamePairType& rPair) 
const
 {
 std::size_t seed = 0;
-boost::hash_combine(seed, rPair.first.hashCode());
-boost::hash_combine(seed, rPair.second.hashCode());
+o3tl::hash_combine(seed, rPair.first.hashCode());
+o3tl::hash_combine(seed, rPair.second.hashCode());
 return seed;
 }
 
diff --git a/sc/source/ui/view/spellcheckcontext.cxx 
b/sc/source/ui/view/spellcheckcontext.cxx
index 637458f07385..224af6859f59 100644
--- a/sc/source/ui/view/spellcheckcontext.cxx
+++ b/sc/source/ui/view/spellcheckcontext.cxx
@@ -21,7 +21,7 @@
 
 #include 
 
-#include 
+#include 
 
 #include 
 
@@ -38,8 +38,8 @@ class SpellCheckContext::SpellCheckCache
 size_t operator() (const CellPos& rPos) const
 {
 std::size_t seed = 0;
-boost::hash_combine(seed, rPos.mnCol);
-boost::hash_combine(seed, rPos.mnRow);
+o3tl::hash_combine(seed, rPos.mnCol);
+o3tl::hash_combine(seed, rPos.mnRow);
 return seed;
 }
 };
diff --git a/sdext/source/pdfimport/inc/pdfihelper.hxx 
b/sdext/source/pdfimport/inc/pdfihelper.hxx
index ad5ffa80f6b3..aa3a22bd2b67 100644
--- a/sdext/source/pdfimport/inc/pdfihelper.hxx
+++ b/sdext/source/pdfimport/inc/pdfihelper.hxx
@@ -32,7 +32,7 @@
 
 #include 
 #include 
-#include 
+#include 
 
 // virtual resolution of the PDF OutputDev in dpi
 #define PDFI_OUTDEV_RESOLUTION 7200
@@ -81,12 +81,12 @@ namespace pdfi
 size_t operator()(const FontAttributes& rFont ) const
 {
 std::size_t seed = 0;
-boost::hash_combine(seed, rFont.familyName.hashCode());
-boost::hash_combine(seed, rFont.isBold);
-boost::hash_combine(seed, rFont.isItalic);
-boost::hash_combine(seed, rFont.isUnderline);
-boost::hash_combine(seed, rFont.isOutline);
-boost::hash_combine(seed, rFont.size);
+o3tl::

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

2021-05-11 Thread Tomaž Vajngerl (via logerrit)
 include/o3tl/hash_combine.hxx |   29 +
 o3tl/qa/test-lru_map.cxx  |6 +++---
 2 files changed, 32 insertions(+), 3 deletions(-)

New commits:
commit e6c0c282be59a5198932604d6c40de837b7cb548
Author: Tomaž Vajngerl 
AuthorDate: Wed May 27 12:49:05 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Tue May 11 12:23:48 2021 +0200

add o3tl version of hash_combine to not depend on boost for this

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

diff --git a/include/o3tl/hash_combine.hxx b/include/o3tl/hash_combine.hxx
new file mode 100644
index ..17419b3e2c0f
--- /dev/null
+++ b/include/o3tl/hash_combine.hxx
@@ -0,0 +1,29 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+namespace o3tl
+{
+template  = 
false>
+inline void hash_combine(N& nSeed, T const& nValue)
+{
+static_assert(sizeof(nSeed) == 4);
+nSeed ^= std::hash{}(nValue) + 0x9E3779B9u + (nSeed << 6) + (nSeed >> 
2);
+}
+
+template  = 
false>
+inline void hash_combine(N& nSeed, T const& nValue)
+{
+static_assert(sizeof(nSeed) == 8);
+nSeed ^= std::hash{}(nValue) + 0x9E3779B97F4A7C15llu + (nSeed << 12) + 
(nSeed >> 4);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/o3tl/qa/test-lru_map.cxx b/o3tl/qa/test-lru_map.cxx
index ba9ee71835ce..ef46f44d17b9 100644
--- a/o3tl/qa/test-lru_map.cxx
+++ b/o3tl/qa/test-lru_map.cxx
@@ -15,7 +15,7 @@
 
 #include 
 
-#include 
+#include 
 
 using namespace ::o3tl;
 
@@ -202,8 +202,8 @@ struct TestClassKeyHashFunction
 std::size_t operator()(TestClassKey const& aKey) const
 {
 std::size_t seed = 0;
-boost::hash_combine(seed, aKey.mA);
-boost::hash_combine(seed, aKey.mB);
+o3tl::hash_combine(seed, aKey.mA);
+o3tl::hash_combine(seed, aKey.mB);
 return seed;
 }
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Noel Grandin (via logerrit)
 include/tools/zcodec.hxx   |5 +++--
 tools/source/zcodec/zcodec.cxx |   34 +-
 vcl/unx/gtk3/gtkframe.cxx  |1 +
 3 files changed, 21 insertions(+), 19 deletions(-)

New commits:
commit 57ed14b5c52c6a3504a7af8359dec436fcdf54f2
Author: Noel Grandin 
AuthorDate: Tue May 11 09:01:56 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue May 11 12:17:11 2021 +0200

fix leak in ZCodec

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

diff --git a/include/tools/zcodec.hxx b/include/tools/zcodec.hxx
index 17e44a500a41..c9c71bf752b1 100644
--- a/include/tools/zcodec.hxx
+++ b/include/tools/zcodec.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 
 #define ZCODEC_NO_COMPRESSION   0
 #define ZCODEC_DEFAULT_COMPRESSION  6
@@ -40,11 +41,11 @@ class SAL_WARN_UNUSED TOOLS_DLLPUBLIC ZCodec
 State   meState;
 boolmbStatus;
 boolmbFinish;
-sal_uInt8*  mpInBuf;
+std::unique_ptr mpInBuf;
 size_t  mnInBufSize;
 size_t  mnInToRead;
 SvStream*   mpOStm;
-sal_uInt8*  mpOutBuf;
+std::unique_ptr mpOutBuf;
 size_t  mnOutBufSize;
 
 int mnCompressLevel;
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index a21003afb55f..ce461d47ed0d 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -42,11 +42,9 @@ ZCodec::ZCodec( size_t nInBufSize, size_t nOutBufSize )
 : meState(STATE_INIT)
 , mbStatus(false)
 , mbFinish(false)
-, mpInBuf(nullptr)
 , mnInBufSize(nInBufSize)
 , mnInToRead(0)
 , mpOStm(nullptr)
-, mpOutBuf(nullptr)
 , mnOutBufSize(nOutBufSize)
 , mnCompressLevel(0)
 , mbGzLib(false)
@@ -67,7 +65,8 @@ void ZCodec::BeginCompression( int nCompressLevel, bool gzLib 
)
 mbFinish = false;
 mpOStm = nullptr;
 mnInToRead = 0x;
-mpInBuf = mpOutBuf = nullptr;
+mpInBuf.reset();
+mpOutBuf.reset();
 auto pStream = static_cast(mpsC_Stream);
 pStream->total_out = pStream->total_in = 0;
 mnCompressLevel = nCompressLevel;
@@ -106,8 +105,8 @@ tools::Long ZCodec::EndCompression()
 retvalue = pStream->total_out;
 inflateEnd( pStream );
 }
-delete[] mpOutBuf;
-delete[] mpInBuf;
+mpOutBuf.reset();
+mpInBuf.reset();
 meState = STATE_INIT;
 }
 return mbStatus ? retvalue : -1;
@@ -118,11 +117,11 @@ void ZCodec::Compress( SvStream& rIStm, SvStream& rOStm )
 assert(meState == STATE_INIT);
 mpOStm = &rOStm;
 InitCompress();
-mpInBuf = new sal_uInt8[ mnInBufSize ];
+mpInBuf.reset(new sal_uInt8[ mnInBufSize ]);
 auto pStream = static_cast(mpsC_Stream);
 for (;;)
 {
-pStream->next_in = mpInBuf;
+pStream->next_in = mpInBuf.get();
 pStream->avail_in = rIStm.ReadBytes( pStream->next_in, mnInBufSize );
 if (pStream->avail_in == 0)
 break;
@@ -147,15 +146,16 @@ tools::Long ZCodec::Decompress( SvStream& rIStm, 
SvStream& rOStm )
 mpOStm = &rOStm;
 InitDecompress(rIStm);
 pStream->avail_out = mnOutBufSize;
-pStream->next_out = mpOutBuf = new sal_uInt8[ pStream->avail_out ];
+mpOutBuf.reset(new sal_uInt8[ pStream->avail_out ]);
+pStream->next_out = mpOutBuf.get();
 do
 {
 if ( pStream->avail_out == 0 ) ImplWriteBack();
 if ( pStream->avail_in == 0 && mnInToRead )
 {
 nInToRead = std::min( mnInBufSize, mnInToRead );
-pStream->next_in = mpInBuf;
-pStream->avail_in = rIStm.ReadBytes(mpInBuf, nInToRead);
+pStream->next_in = mpInBuf.get();
+pStream->avail_in = rIStm.ReadBytes(mpInBuf.get(), nInToRead);
 mnInToRead -= nInToRead;
 }
 err = mbStatus ? inflate(pStream, Z_NO_FLUSH) : Z_ERRNO;
@@ -218,8 +218,8 @@ tools::Long ZCodec::Read( SvStream& rIStm, sal_uInt8* 
pData, sal_uInt32 nSize )
 if ( pStream->avail_in == 0 && mnInToRead )
 {
 nInToRead = std::min(mnInBufSize, mnInToRead);
-pStream->next_in = mpInBuf;
-pStream->avail_in = rIStm.ReadBytes(mpInBuf, nInToRead);
+pStream->next_in = mpInBuf.get();
+pStream->avail_in = rIStm.ReadBytes(mpInBuf.get(), nInToRead);
 mnInToRead -= nInToRead;
 }
 err = mbStatus ? inflate(pStream, Z_NO_FLUSH) : Z_ERRNO;
@@ -246,8 +246,8 @@ void ZCodec::ImplWriteBack()
 
 if ( nAvail > 0 )
 {
-pStream->next_out = mpOutBuf;
-mpOStm->WriteBytes( mpOutBuf, nAvail );
+pStream->next_out = mpOutBuf.get();
+mpOStm->WriteBytes( mpOutBuf.get(), nAvail );
 pStream->avail_out = mnOutBufSize;
 }
 }
@@ -260,8 +260,8 @@ void ZCodec::InitCompress()
  

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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 71dd1d72358a862b4cf36d5014624ab9d8c8a402
Author: Caolán McNamara 
AuthorDate: Tue May 11 09:08:57 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 12:16:36 2021 +0200

gtk4: current-folder-changed removed without replacement

since...

commit e31bacf7be3dcc5295c89f8e929b53636976ebaa
Date:   Thu Jul 9 01:48:33 2020 -0400

filechooser: Drop the ::current-folder-changed signal

This signal does not work on native file choosers,
and it exposes internals of the widget that should
not be public. And it is just not very interesting.

Change-Id: I170f91b6dc87965248e206c2b1a2863448e5c976

and selection-changed removed without replacement

since...

commit 2746a2d929615231af10f221fc2ab416537285f3
Date:   Thu Jul 9 02:06:31 2020 -0400

filechooser: Drop the ::selection-changed signal

This signal does not work on native file choosers,
and it exposes internals of the widget that should
not be public. And it is just not very interesting.

which doesn't bode too well.

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

diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx 
b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
index 5df93c145fd6..c0113822b27f 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
@@ -946,13 +946,23 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute()
 if ( !m_aCurrentFilter.isEmpty() )
 SetCurFilter(m_aCurrentFilter);
 
+#if !GTK_CHECK_VERSION(4, 0, 0)
 mnHID_FolderChange =
 g_signal_connect( GTK_FILE_CHOOSER( m_pDialog ), 
"current-folder-changed",
 G_CALLBACK( folder_changed_cb ), static_cast(this) );
+#else
+// no replacement in 4-0 that I can see :-(
+mnHID_FolderChange = 0;
+#endif
 
+#if !GTK_CHECK_VERSION(4, 0, 0)
 mnHID_SelectionChange =
 g_signal_connect( GTK_FILE_CHOOSER( m_pDialog ), "selection-changed",
 G_CALLBACK( selection_changed_cb ), static_cast(this) );
+#else
+// no replacement in 4-0 that I can see :-(
+mnHID_SelectionChange = 0;
+#endif
 
 int btn = GTK_RESPONSE_NO;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx |   26 ++
 1 file changed, 18 insertions(+), 8 deletions(-)

New commits:
commit a76834dc31247a26c409a7bcc7586de32782f9bb
Author: Caolán McNamara 
AuthorDate: Tue May 11 08:59:46 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 12:08:52 2021 +0200

gtk4: GtkCheckButton no longer inherits from GtkToggleButton

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

diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx 
b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
index 66e5670bb0db..5df93c145fd6 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
@@ -1109,12 +1109,12 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute()
 // cf. offapi/com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.idl
 GtkWidget *SalGtkFilePicker::getWidget( sal_Int16 nControlId, GType *pType )
 {
-GType  tType = GTK_TYPE_TOGGLE_BUTTON; //prevent warning by 
initializing
+GType  tType = GTK_TYPE_CHECK_BUTTON; //prevent warning by initializing
 GtkWidget *pWidget = nullptr;
 
 #define MAP_TOGGLE( elem ) \
 case ExtendedFilePickerElementIds::CHECKBOX_##elem: \
-pWidget = m_pToggles[elem]; tType = GTK_TYPE_TOGGLE_BUTTON; \
+pWidget = m_pToggles[elem]; tType = GTK_TYPE_CHECK_BUTTON; \
 break
 #define MAP_BUTTON( elem ) \
 case ExtendedFilePickerElementIds::PUSHBUTTON_##elem: \
@@ -1317,11 +1317,15 @@ void SAL_CALL SalGtkFilePicker::setValue( sal_Int16 
nControlId, sal_Int16 nContr
 
 if( !( pWidget = getWidget( nControlId, &tType ) ) )
 SAL_WARN( "vcl.gtk", "enable unknown control " << nControlId);
-else if( tType == GTK_TYPE_TOGGLE_BUTTON )
+else if( tType == GTK_TYPE_CHECK_BUTTON)
 {
 bool bChecked = false;
 rValue >>= bChecked;
-gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( pWidget ), bChecked );
+#if GTK_CHECK_VERSION(4, 0, 0)
+gtk_check_button_set_active(GTK_CHECK_BUTTON(pWidget), bChecked);
+#else
+gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pWidget), bChecked);
+#endif
 }
 else if( tType == GTK_TYPE_COMBO_BOX )
 HandleSetListValue(GTK_COMBO_BOX(pWidget), nControlAction, rValue);
@@ -1344,8 +1348,14 @@ uno::Any SAL_CALL SalGtkFilePicker::getValue( sal_Int16 
nControlId, sal_Int16 nC
 
 if( !( pWidget = getWidget( nControlId, &tType ) ) )
 SAL_WARN( "vcl.gtk", "enable unknown control " << nControlId);
-else if( tType == GTK_TYPE_TOGGLE_BUTTON )
-aRetval <<= bool( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( 
pWidget ) ) );
+else if( tType == GTK_TYPE_CHECK_BUTTON)
+{
+#if GTK_CHECK_VERSION(4, 0, 0)
+aRetval <<= 
bool(gtk_check_button_get_active(GTK_CHECK_BUTTON(pWidget)));
+#else
+aRetval <<= 
bool(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pWidget)));
+#endif
+}
 else if( tType == GTK_TYPE_COMBO_BOX )
 aRetval = HandleGetListValue(GTK_COMBO_BOX(pWidget), nControlAction);
 else
@@ -1393,7 +1403,7 @@ void SAL_CALL SalGtkFilePicker::setLabel( sal_Int16 
nControlId, const OUString&
 }
 
 OString aTxt = OUStringToOString( rLabel.replace('~', '_'), 
RTL_TEXTENCODING_UTF8 );
-if( tType == GTK_TYPE_TOGGLE_BUTTON || tType == GTK_TYPE_BUTTON || tType 
== GTK_TYPE_LABEL )
+if( tType == GTK_TYPE_CHECK_BUTTON || tType == GTK_TYPE_BUTTON || tType == 
GTK_TYPE_LABEL )
 g_object_set( pWidget, "label", aTxt.getStr(),
   "use_underline", true, nullptr );
 else
@@ -1412,7 +1422,7 @@ OUString SAL_CALL SalGtkFilePicker::getLabel( sal_Int16 
nControlId )
 
 if( !( pWidget = getWidget( nControlId, &tType ) ) )
 SAL_WARN( "vcl.gtk", "Get label on unknown control " << nControlId);
-else if( tType == GTK_TYPE_TOGGLE_BUTTON || tType == GTK_TYPE_BUTTON || 
tType == GTK_TYPE_LABEL )
+else if( tType == GTK_TYPE_CHECK_BUTTON || tType == GTK_TYPE_BUTTON || 
tType == GTK_TYPE_LABEL )
 aTxt = gtk_button_get_label( GTK_BUTTON( pWidget ) );
 else
 SAL_WARN( "vcl.gtk", "Can't get label on list");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Érico Nogueira license statement

2021-05-11 Thread Érico Nogueira
All of my past & future contributions to LibreOffice may be
licensed under the MPLv2/LGPLv3+ dual license.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-05-11 Thread Michael Stahl (via logerrit)
Tag 'mimo-5.4.7.2.M7' created by Andras Timar  at 
2021-05-11 09:57 +

mimo-5.4.7.2.M7

Changes since libreoffice-5-4-branch-point-1286:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Andras Timar (via logerrit)
Tag 'mimo-7.0.7.0.M1' created by Andras Timar  at 
2021-05-11 09:56 +

mimo-7.0.7.0.M1

Changes since mimo-7-0-branch-point-3:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Noel Grandin (via logerrit)
 include/xmlreader/pad.hxx |3 ++-
 xmlreader/source/pad.cxx  |   25 ++---
 2 files changed, 16 insertions(+), 12 deletions(-)

New commits:
commit de5af8315e014ce3408f66c6de3c9c4e841f8437
Author: Noel Grandin 
AuthorDate: Mon May 10 15:38:29 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue May 11 11:53:45 2021 +0200

improve perf of xmlreader::Pad

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

diff --git a/include/xmlreader/pad.hxx b/include/xmlreader/pad.hxx
index 3aa73d57eab4..1f758c471338 100644
--- a/include/xmlreader/pad.hxx
+++ b/include/xmlreader/pad.hxx
@@ -47,7 +47,8 @@ private:
 SAL_DLLPRIVATE void flushSpan();
 
 Span span_;
-OStringBuffer buffer_{ 256 };
+sal_Int32 buflength_ = 0;
+char buffer_[1024];
 };
 }
 
diff --git a/xmlreader/source/pad.cxx b/xmlreader/source/pad.cxx
index ce45f805f496..74bb5ec63fb0 100644
--- a/xmlreader/source/pad.cxx
+++ b/xmlreader/source/pad.cxx
@@ -29,46 +29,49 @@ namespace xmlreader {
 
 void Pad::add(char const * begin, sal_Int32 length) {
 assert(
-begin != nullptr && length >= 0 && !(span_.is() && buffer_.getLength() 
!= 0));
+begin != nullptr && length >= 0 && !(span_.is() && buflength_ != 0));
 if (length != 0) {
 flushSpan();
-if (buffer_.isEmpty()) {
+if (buflength_ == 0) {
 span_ = Span(begin, length);
 } else {
-buffer_.append(begin, length);
+memcpy(buffer_ + buflength_, begin, length);
+buflength_ += length;
 }
 }
 }
 
 void Pad::addEphemeral(char const * begin, sal_Int32 length) {
 assert(
-begin != nullptr && length >= 0 && !(span_.is() && buffer_.getLength() 
!= 0));
+begin != nullptr && length >= 0 && !(span_.is() && buflength_ != 0));
 if (length != 0) {
 flushSpan();
-buffer_.append(begin, length);
+memcpy(buffer_ + buflength_, begin, length);
+buflength_ += length;
 }
 }
 
 void Pad::clear() {
-assert(!(span_.is() && buffer_.getLength() != 0));
+assert(!(span_.is() && buflength_ != 0));
 span_.clear();
-buffer_.setLength(0);
+buflength_ = 0;
 }
 
 Span Pad::get() const {
-assert(!(span_.is() && buffer_.getLength() != 0));
+assert(!(span_.is() && buflength_ != 0));
 if (span_.is()) {
 return span_;
-} else if (buffer_.isEmpty()) {
+} else if (buflength_ == 0) {
 return Span("");
 } else {
-return Span(buffer_.getStr(), buffer_.getLength());
+return Span(buffer_, buflength_);
 }
 }
 
 void Pad::flushSpan() {
 if (span_.is()) {
-buffer_.append(span_.begin, span_.length);
+memcpy(buffer_ + buflength_, span_.begin, span_.length);
+buflength_ += span_.length;
 span_.clear();
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Tomaž Vajngerl (via logerrit)
 vcl/source/app/salvtables.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8f3b80f5c58e1f22db68be0f109eb06d2b054688
Author: Tomaž Vajngerl 
AuthorDate: Tue May 11 11:52:43 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue May 11 11:52:00 2021 +0200

vcl: Popover - signal "closed" when calling popdown()

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

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 4a19030397c7..4d4a418408c1 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6716,6 +6716,7 @@ public:
 {
 vcl::Window::GetDockingManager()->EndPopupMode(m_xPopover);
 m_xPopover->EnableDocking(false);
+signal_closed();
 }
 };
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 include/vcl/pdfwriter.hxx |2 ++
 vcl/source/gdi/pdfwriter_impl.cxx |2 +-
 vcl/unx/gtk3/gtksalmenu.cxx   |9 +
 3 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 351875e5662ee2c2bd45750cb2dd8fbac65bf728
Author: Caolán McNamara 
AuthorDate: Mon May 10 20:40:53 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 11:23:53 2021 +0200

gtk4: menu item text seems to be parsed as xml now, so escape the basics

"Zoom & Pan" in impress causing trouble

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

diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index fc28a009dd54..89776c815e87 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -1200,6 +1200,8 @@ The following structure describes the permissions used in 
PDF security
 static OString GetDateTime();
 };
 
+VCL_DLLPUBLIC void escapeStringXML( const OUString& rStr, OUString &rValue);
+
 }
 
 #endif // INCLUDED_VCL_PDFWRITER_HXX
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 6efb3ac3e81a..564e35dee051 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5191,7 +5191,7 @@ sal_Int32 PDFWriterImpl::emitOutputIntent()
 }
 
 // formats the string for the XML stream
-static void escapeStringXML( const OUString& rStr, OUString &rValue)
+void escapeStringXML(const OUString& rStr, OUString &rValue)
 {
 const sal_Unicode* pUni = rStr.getStr();
 int nLen = rStr.getLength();
diff --git a/vcl/unx/gtk3/gtksalmenu.cxx b/vcl/unx/gtk3/gtksalmenu.cxx
index a5e7376a79c0..ef1c665c533a 100644
--- a/vcl/unx/gtk3/gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtksalmenu.cxx
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include  // for escapeStringXML
 
 #include 
 #include 
@@ -1248,6 +1249,14 @@ void GtkSalMenu::NativeSetItemText( unsigned nSection, 
unsigned nItemPos, const
 OUString aText = rText.replaceAll( "_", "__" );
 // Replace the LibreOffice hotkey identifier with an underscore
 aText = aText.replace( '~', '_' );
+// quick and easy replacement of & to & etc, for e.g. "Zoom & Pa_n" in 
impress
+#if GTK_CHECK_VERSION(4, 0, 0)
+{
+OUString aTempString;
+vcl::escapeStringXML(aText, aTempString);
+aText = aTempString;
+}
+#endif
 OString aConvertedText = OUStringToOString( aText, RTL_TEXTENCODING_UTF8 );
 
 // Update item text only when necessary.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkframe.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 48b2d74b1d68523253368bd0ba23dec26ad6ad8c
Author: Caolán McNamara 
AuthorDate: Mon May 10 20:49:41 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 11:17:29 2021 +0200

gtk4: have to explicitly ask to listen to all buttons

right click works now

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

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 610fdb5ebd1f..1d7ac5f965f3 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -944,6 +944,7 @@ void GtkSalFrame::InitCommon()
 m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), 
"enter-notify-event", G_CALLBACK(signalCrossing), this ));
 #else
 GtkGesture *pClick = gtk_gesture_click_new();
+gtk_gesture_single_set_button(GTK_GESTURE_SINGLE(pClick), 0);
 gtk_widget_add_controller(pEventWidget, GTK_EVENT_CONTROLLER(pClick));
 g_signal_connect(pClick, "pressed", G_CALLBACK(gesturePressed), this);
 g_signal_connect(pClick, "released", G_CALLBACK(gestureReleased), this);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: leak-suppress.txt

2021-05-11 Thread Noel Grandin (via logerrit)
 leak-suppress.txt |8 
 1 file changed, 8 insertions(+)

New commits:
commit c600f7566319974323d718773a01082da078ad91
Author: Noel Grandin 
AuthorDate: Tue May 11 09:01:45 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue May 11 11:14:24 2021 +0200

suppress some leaks I don't want to deal with

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

diff --git a/leak-suppress.txt b/leak-suppress.txt
index e153d0c8e036..c3f372a3095c 100644
--- a/leak-suppress.txt
+++ b/leak-suppress.txt
@@ -57,3 +57,11 @@ leak:idlc/source/idlcmain.cxx
 
 # deliberate leak in cppunit
 leak:sal/cppunittester/cppunittester.cxx
+
+# TODO Firebird appears to be leaking like a sieve
+leak:connectivity::firebird::
+leak:Firebird::
+
+# TODO leaks in basic module
+# these appears to be some kind of ref-counting cycle
+leak:MacroSnippet::Compile()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Noel Grandin (via logerrit)
 include/vcl/glyphitem.hxx   |7 ---
 vcl/source/gdi/impglyphitem.cxx |   37 +
 2 files changed, 17 insertions(+), 27 deletions(-)

New commits:
commit adfd91d24678053b9a1475ad6985eb1fc548706a
Author: Noel Grandin 
AuthorDate: Mon May 10 20:17:11 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue May 11 11:14:05 2021 +0200

fix leak in SalLayoutGlyphs

we forgot to delete the extra impls vector

Also make more use of std::unique_ptr

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

diff --git a/include/vcl/glyphitem.hxx b/include/vcl/glyphitem.hxx
index d928bb954ee7..68f89701b2c3 100644
--- a/include/vcl/glyphitem.hxx
+++ b/include/vcl/glyphitem.hxx
@@ -24,6 +24,7 @@
 #include 
 
 #include 
+#include 
 
 typedef sal_uInt16 sal_GlyphId;
 
@@ -31,14 +32,14 @@ class SalLayoutGlyphsImpl;
 
 class VCL_DLLPUBLIC SalLayoutGlyphs final
 {
-SalLayoutGlyphsImpl* m_pImpl = nullptr;
+std::unique_ptr m_pImpl;
 // Extra items are in a dynamically allocated vector in order to save 
memory.
 // The usual case should be that this stays unused (it should be only used
 // when font fallback takes place).
-std::vector* m_pExtraImpls = nullptr;
+std::unique_ptr>> 
m_pExtraImpls;
 
 public:
-SalLayoutGlyphs() = default;
+SalLayoutGlyphs();
 SalLayoutGlyphs(const SalLayoutGlyphs&) = delete;
 SalLayoutGlyphs(SalLayoutGlyphs&&);
 ~SalLayoutGlyphs();
diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx
index 35681c341ea1..e9d5e699356c 100644
--- a/vcl/source/gdi/impglyphitem.cxx
+++ b/vcl/source/gdi/impglyphitem.cxx
@@ -23,13 +23,9 @@
 #include 
 #endif
 
-SalLayoutGlyphs::~SalLayoutGlyphs()
-{
-delete m_pImpl;
-if (m_pExtraImpls)
-for (SalLayoutGlyphsImpl* impl : *m_pExtraImpls)
-delete impl;
-}
+SalLayoutGlyphs::SalLayoutGlyphs() {}
+
+SalLayoutGlyphs::~SalLayoutGlyphs() {}
 
 SalLayoutGlyphs::SalLayoutGlyphs(SalLayoutGlyphs&& rOther)
 {
@@ -54,7 +50,7 @@ bool SalLayoutGlyphs::IsValid() const
 if (!m_pImpl->IsValid())
 return false;
 if (m_pExtraImpls)
-for (SalLayoutGlyphsImpl* impl : *m_pExtraImpls)
+for (std::unique_ptr const& impl : *m_pExtraImpls)
 if (!impl->IsValid())
 return false;
 return true;
@@ -63,35 +59,28 @@ bool SalLayoutGlyphs::IsValid() const
 void SalLayoutGlyphs::Invalidate()
 {
 // Invalidating is in fact simply clearing.
-delete m_pImpl;
-m_pImpl = nullptr;
-if (m_pExtraImpls)
-{
-for (SalLayoutGlyphsImpl* impl : *m_pExtraImpls)
-delete impl;
-delete m_pExtraImpls;
-m_pExtraImpls = nullptr;
-}
+m_pImpl.reset();
+m_pExtraImpls.reset();
 }
 
 SalLayoutGlyphsImpl* SalLayoutGlyphs::Impl(unsigned int nLevel) const
 {
 if (nLevel == 0)
-return m_pImpl;
+return m_pImpl.get();
 if (m_pExtraImpls != nullptr && nLevel - 1 < m_pExtraImpls->size())
-return (*m_pExtraImpls)[nLevel - 1];
+return (*m_pExtraImpls)[nLevel - 1].get();
 return nullptr;
 }
 
 void SalLayoutGlyphs::AppendImpl(SalLayoutGlyphsImpl* pImpl)
 {
-if (m_pImpl == nullptr)
-m_pImpl = pImpl;
+if (!m_pImpl)
+m_pImpl.reset(pImpl);
 else
 {
-if (m_pExtraImpls == nullptr)
-m_pExtraImpls = new std::vector;
-m_pExtraImpls->push_back(pImpl);
+if (!m_pExtraImpls)
+m_pExtraImpls.reset(new 
std::vector>);
+m_pExtraImpls->emplace_back(pImpl);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Samuel Mehrbrodt (via logerrit)
 include/vcl/settings.hxx|1 +
 vcl/source/app/settings.cxx |   14 ++
 vcl/source/window/menu.cxx  |6 --
 3 files changed, 19 insertions(+), 2 deletions(-)

New commits:
commit 5b01ad53aba40956a164500c4267990f7d2d8dd7
Author: Samuel Mehrbrodt 
AuthorDate: Tue May 11 09:28:12 2021 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue May 11 10:28:32 2021 +0200

tdf#76258 Use correct icon size for color filter popup colors

Change-Id: Icda5ee2cc4c02d6da5cc3f45c30416ad503eaa20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115378
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 3130f22ed205..0159e08fb7a4 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -536,6 +536,7 @@ public:
 
 voidSetToolbarIconSize( ToolbarIconSize nSize 
);
 ToolbarIconSize GetToolbarIconSize() const;
+SizeGetToolbarIconSizePixel() const;
 
 /** Set the icon theme to use. */
 voidSetIconTheme(const OUString&);
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 423e3eed679c..0e64a4269e35 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2070,6 +2070,20 @@ StyleSettings::GetToolbarIconSize() const
 return mxData->mnToolbarIconSize;
 }
 
+Size StyleSettings::GetToolbarIconSizePixel() const
+{
+switch (GetToolbarIconSize())
+{
+case ToolbarIconSize::Large:
+return Size(24, 24);
+case ToolbarIconSize::Size32:
+return Size(32, 32);
+case ToolbarIconSize::Small:
+default:
+return Size(16, 16);
+}
+}
+
 const DialogStyle&
 StyleSettings::GetDialogStyle() const
 {
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 128bc4bbcbd1..8f4019dd9d52 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1025,10 +1025,12 @@ OUString Menu::GetItemText( sal_uInt16 nItemId ) const
 
 void Menu::SetItemColor(sal_uInt16 nItemId, const Color& rColor)
 {
-Bitmap aBmp(Size(50, 50), vcl::PixelFormat::N24_BPP);
+StyleSettings aSettings = Application::GetSettings().GetStyleSettings();
+auto iconSize = aSettings.GetToolbarIconSizePixel();
+Bitmap aBmp(iconSize, vcl::PixelFormat::N24_BPP);
 BitmapWriteAccess aBmpAccess(aBmp);
 aBmpAccess.SetFillColor(rColor);
-aBmpAccess.FillRect(tools::Rectangle(0, 0, 49, 49));
+aBmpAccess.FillRect(tools::Rectangle(0, 0, iconSize.Width() - 1, 
iconSize.Height() - 1));
 BitmapEx aBmpEx(aBmp);
 Image aImage(aBmpEx);
 SetItemImage(nItemId, aImage);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Tomaž Vajngerl (via logerrit)
 vcl/source/window/dialog.cxx |8 
 1 file changed, 8 deletions(-)

New commits:
commit c07348292576fa755ec2c71b3912b57b050d6442
Author: Tomaž Vajngerl 
AuthorDate: Mon May 10 15:01:19 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue May 11 10:07:21 2021 +0200

vcl: Don't just return OK when executing a dialog in Android

This was probably "ifdef-ed" out for Android because of some old
assumptions and isn't true anymore today. This has prevented that
the dialog for macro execution shows up on Android when the
document is loading.

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

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index df02e19654bc..3cbffb41da66 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1035,10 +1035,6 @@ void Dialog::ImplEndExecuteModal()
 
 short Dialog::Execute()
 {
-// Once the Android app is based on same idea as the iOS one currently
-// being developed, no conditional should be needed here. Until then,
-// play it safe.
-#if HAVE_FEATURE_DESKTOP || defined IOS || HAVE_FEATURE_ANDROID_LOK
 VclPtr xWindow = this;
 
 mbInSyncExecute = true;
@@ -1069,10 +1065,6 @@ short Dialog::Execute()
 mpDialogImpl->mnResult = -1;
 
 return static_cast(nRet);
-
-#else
-return RET_OK;
-#endif
 }
 
 // virtual
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/libreoffice/ui/FileUtilities.java |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 55c17dff49166e8ad036f02fc97db40137158d43
Author: Michael Weghorn 
AuthorDate: Tue May 11 08:39:21 2021 +0200
Commit: Michael Weghorn 
CommitDate: Tue May 11 10:05:45 2021 +0200

android: Don't crash trying to process non-existing file from recents

When the "Recent files" list in Android Viewer contained an entry
for an Uri that was no longer pointing to a valid file, a
SecurityException was thrown trying to query the display name
from it.

Catch the SecurityException that is thrown and just return an
empty string, the document is then not displayed in the
"Recent files" list.

One scenario:

1) open file located in the "Download" directory from within the app
2) close the app
3) delete the file
4) open the app again

-> crash, with this backtrace in ADB log:

05-11 08:37:14.230  3892  4707 E DatabaseUtils: 
java.lang.SecurityException: Permission Denial: reading 
com.android.providers.downloads.DownloadStorageProvider uri 
content://com.android.providers.downloads.documents/document/msf%3A1091 from 
pid=6981, uid=10177 requires that you obtain access using ACTION_OPEN_DOCUMENT 
or related APIs
05-11 08:37:14.230  3892  4707 E DatabaseUtils: at 
android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:804)
05-11 08:37:14.230  3892  4707 E DatabaseUtils: at 
android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:670)
05-11 08:37:14.230  3892  4707 E DatabaseUtils: at 
android.content.ContentProvider$Transport.query(ContentProvider.java:238)
05-11 08:37:14.230  3892  4707 E DatabaseUtils: at 
android.content.ContentProviderNative.onTransact(ContentProviderNative.java:106)
05-11 08:37:14.230  3892  4707 E DatabaseUtils: at 
android.os.Binder.execTransactInternal(Binder.java:1138)
05-11 08:37:14.230  3892  4707 E DatabaseUtils: at 
android.os.Binder.execTransact(Binder.java:1102)
05-11 08:37:14.230  6981  6981 D AndroidRuntime: Shutting down VM
05-11 08:37:14.231  6981  6981 E AndroidRuntime: FATAL EXCEPTION: main
05-11 08:37:14.231  6981  6981 E AndroidRuntime: Process: 
org.libreoffice, PID: 6981
05-11 08:37:14.231  6981  6981 E AndroidRuntime: 
java.lang.RuntimeException: Unable to start activity 
ComponentInfo{org.libreoffice/org.libreoffice.ui.LibreOfficeUIActivity}: 
java.lang.SecurityException: Permission Denial: reading 
com.android.providers.downloads.DownloadStorageProvider uri 
content://com.android.providers.downloads.documents/document/msf%3A1091 from 
pid=6981, uid=10177 requires that you obtain access using ACTION_OPEN_DOCUMENT 
or related APIs
05-11 08:37:14.231  6981  6981 E AndroidRuntime:at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:)
05-11 08:37:14.231  6981  6981 E AndroidRuntime:at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3477)
05-11 08:37:14.231  6981  6981 E AndroidRuntime:at 
android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
05-11 08:37:14.231  6981  6981 E AndroidRuntime:at 
android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
05-11 08:37:14.231  6981  6981 E AndroidRuntime:at 
android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
05-11 08:37:14.231  6981  6981 E AndroidRuntime:at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2043)
05-11 08:37:14.231  6981  6981 E AndroidRuntime:at 
android.os.Handler.dispatchMessage(Handler.java:106)
05-11 08:37:14.231  6981  6981 E AndroidRuntime:at 
android.os.Looper.loop(Looper.java:216)
05-11 08:37:14.231  6981  6981 E AndroidRuntime:at 
android.app.ActivityThread.main(ActivityThread.java:7464)
05-11 08:37:14.231  6981  6981 E AndroidRuntime:at 
java.lang.reflect.Method.invoke(Native Method)
05-11 08:37:14.231  6981  6981 E AndroidRuntime:at 
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549)
05-11 08:37:14.231  6981  6981 E AndroidRuntime:at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:955)
05-11 08:37:14.231  6981  6981 E AndroidRuntime: Caused by: 
java.lang.SecurityException: Permission Denial: reading 
com.android.providers.downloads.DownloadStorageProvider uri 
content://com.android.providers.downloads.documents/document/msf%3A1091 from 
pid=6981, uid=10177 requires that you obtain access using ACTION_OPEN_DOCUMENT 
or related APIs
05-11 08:37:14.231  6981  6981 E AndroidRuntime:at 
android.os.Parcel.cre

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

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

New commits:
commit 3478c3ca5c2383c5340d1deaa22099d93bb2972f
Author: Caolán McNamara 
AuthorDate: Mon May 10 20:29:38 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 09:45:01 2021 +0200

gtk4: use GTK_POPOVER_MENU_NESTED to avoid crash on submenus

gtk_popover_menu_new crashes on submenus with:
"signal 'action-added' is invalid for instance  of type 'GtkActionMuxer'"

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

diff --git a/vcl/unx/gtk3/gtksalmenu.cxx b/vcl/unx/gtk3/gtksalmenu.cxx
index ac28c3ca5961..a5e7376a79c0 100644
--- a/vcl/unx/gtk3/gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtksalmenu.cxx
@@ -430,7 +430,8 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, 
const tools::Rectangl
 GtkWidget *pWidget = gtk_menu_new_from_model(mpMenuModel);
 gtk_menu_attach_to_widget(GTK_MENU(pWidget), 
mpFrame->getMouseEventWidget(), nullptr);
 #else
-GtkWidget *pWidget = gtk_popover_menu_new_from_model(mpMenuModel);
+// TODO: gtk_popover_menu_new crashes on submenus with: "signal 
'action-added' is invalid for instance  of type 'GtkActionMuxer'"
+GtkWidget *pWidget = gtk_popover_menu_new_from_model_full(mpMenuModel, 
GTK_POPOVER_MENU_NESTED);
 gtk_widget_set_parent(pWidget, mpFrame->getMouseEventWidget());
 #endif
 gtk_widget_insert_action_group(mpFrame->getMouseEventWidget(), "win", 
mpActionGroup);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtkdata.hxx |   11 +++
 vcl/unx/gtk3/gtkframe.cxx   |   10 +-
 vcl/unx/gtk3/gtkinst.cxx|   28 ++--
 vcl/unx/gtk3/gtksalmenu.cxx |   11 ++-
 4 files changed, 20 insertions(+), 40 deletions(-)

New commits:
commit 65543a53c4058a6e491bc3ef8ca71970a1bc50b7
Author: Caolán McNamara 
AuthorDate: Mon May 10 20:25:28 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 09:43:50 2021 +0200

gtk4: centralize g_main_loop_run ifdefry

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

diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 2a741e855b94..ddf8a4b63aec 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -53,6 +53,17 @@ inline ::Window widget_get_xid(GtkWidget *widget)
 }
 #endif
 
+inline void main_loop_run(GMainLoop* pLoop)
+{
+#if !GTK_CHECK_VERSION(4, 0, 0)
+gdk_threads_leave();
+#endif
+g_main_loop_run(pLoop);
+#if !GTK_CHECK_VERSION(4, 0, 0)
+gdk_threads_enter();
+#endif
+}
+
 class GtkSalTimer final : public SalTimer
 {
 struct SalGtkTimeoutSource *m_pTimeout;
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index f8effa137620..610fdb5ebd1f 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -4112,15 +4112,7 @@ public:
 gtk_drag_get_data(m_pWidget, m_pContext, it->second, m_nTime);
 
 if (g_main_loop_is_running(m_pLoop))
-{
-#if !GTK_CHECK_VERSION(4, 0, 0)
-gdk_threads_leave();
-#endif
-g_main_loop_run(m_pLoop);
-#if !GTK_CHECK_VERSION(4, 0, 0)
-gdk_threads_enter();
-#endif
-}
+main_loop_run(m_pLoop);
 
 g_main_loop_unref(m_pLoop);
 m_pLoop = nullptr;
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index c696627af246..b8ddee717811 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -4894,13 +4894,7 @@ struct DialogRunner
 m_pLoop = g_main_loop_new(nullptr, false);
 m_nResponseId = GTK_RESPONSE_NONE;
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
-gdk_threads_leave();
-#endif
-g_main_loop_run(m_pLoop);
-#if !GTK_CHECK_VERSION(4, 0, 0)
-gdk_threads_enter();
-#endif
+main_loop_run(m_pLoop);
 
 g_main_loop_unref(m_pLoop);
 
@@ -5106,11 +5100,7 @@ private:
 gtk_menu_popup(GTK_MENU(pMenu), nullptr, nullptr, nullptr, nullptr, 
button, event_time);
 
 if (g_main_loop_is_running(pLoop))
-{
-gdk_threads_leave();
-g_main_loop_run(pLoop);
-gdk_threads_enter();
-}
+main_loop_run(pLoop);
 
 g_main_loop_unref(pLoop);
 g_signal_handler_disconnect(pMenu, nSignalId);
@@ -8645,11 +8635,8 @@ private:
 }
 
 if (g_main_loop_is_running(pLoop))
-{
-gdk_threads_leave();
-g_main_loop_run(pLoop);
-gdk_threads_enter();
-}
+main_loop_run(pLoop);
+
 g_main_loop_unref(pLoop);
 g_signal_handler_disconnect(m_pMenu, nSignalId);
 }
@@ -8934,11 +8921,8 @@ public:
 }
 
 if (g_main_loop_is_running(pLoop))
-{
-gdk_threads_leave();
-g_main_loop_run(pLoop);
-gdk_threads_enter();
-}
+main_loop_run(pLoop);
+
 g_main_loop_unref(pLoop);
 g_signal_handler_disconnect(m_pMenu, nSignalId);
 gtk_menu_detach(m_pMenu);
diff --git a/vcl/unx/gtk3/gtksalmenu.cxx b/vcl/unx/gtk3/gtksalmenu.cxx
index b35bb59c14aa..ac28c3ca5961 100644
--- a/vcl/unx/gtk3/gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtksalmenu.cxx
@@ -536,15 +536,8 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, 
const tools::Rectangl
 #endif
 
 if (g_main_loop_is_running(pLoop))
-{
-#if !GTK_CHECK_VERSION(4, 0, 0)
-gdk_threads_leave();
-#endif
-g_main_loop_run(pLoop);
-#if !GTK_CHECK_VERSION(4, 0, 0)
-gdk_threads_enter();
-#endif
-}
+main_loop_run(pLoop);
+
 g_main_loop_unref(pLoop);
 
 mpVCLMenu->Deactivate();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtksalmenu.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit e104d1ee6918d9143d5d91ac46bbe3da6c6df1c5
Author: Caolán McNamara 
AuthorDate: Mon May 10 20:20:32 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 09:42:57 2021 +0200

gtk4: avoid gtk_widget_show_all

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

diff --git a/vcl/unx/gtk3/gtksalmenu.cxx b/vcl/unx/gtk3/gtksalmenu.cxx
index 5f9b20effbbf..b35bb59c14aa 100644
--- a/vcl/unx/gtk3/gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtksalmenu.cxx
@@ -1042,11 +1042,9 @@ void GtkSalMenu::CreateMenuBarWidget()
 g_signal_connect(G_OBJECT(mpMenuBarWidget), "key-press-event", 
G_CALLBACK(MenuBarSignalKey), this);
 #endif
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
-gtk_widget_show_all(mpMenuBarContainerWidget);
-#else
+gtk_widget_show(mpMenuBarWidget);
+gtk_widget_show(mpMenuAllowShrinkWidget);
 gtk_widget_show(mpMenuBarContainerWidget);
-#endif
 
 ShowCloseButton( static_cast(mpVCLMenu.get())->HasCloseButton() 
);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtksalmenu.cxx |   29 -
 1 file changed, 20 insertions(+), 9 deletions(-)

New commits:
commit 18b27b017ea8221b33f7e169f7725d3b9fc13c53
Author: Caolán McNamara 
AuthorDate: Mon May 10 20:12:30 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 11 09:42:39 2021 +0200

gtk4: get context menus working

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

diff --git a/vcl/unx/gtk3/gtksalmenu.cxx b/vcl/unx/gtk3/gtksalmenu.cxx
index b965880cfbcb..5f9b20effbbf 100644
--- a/vcl/unx/gtk3/gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtksalmenu.cxx
@@ -456,6 +456,25 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, 
const tools::Rectangl
 // don't allow any more to appear until menu is dismissed
 mpFrame->BlockTooltip();
 
+#if GTK_CHECK_VERSION(4, 0, 0)
+tools::Rectangle aFloatRect = FloatingWindow::ImplConvertToAbsPos(xParent, 
rRect);
+aFloatRect.Move(-mpFrame->maGeometry.nX, -mpFrame->maGeometry.nY);
+GdkRectangle rect {static_cast(aFloatRect.Left()), 
static_cast(aFloatRect.Top()),
+   static_cast(aFloatRect.GetWidth()), 
static_cast(aFloatRect.GetHeight())};
+
+gtk_popover_set_pointing_to(GTK_POPOVER(pWidget), &rect);
+
+if (nFlags & FloatWinPopupFlags::Left)
+gtk_popover_set_position(GTK_POPOVER(pWidget), GTK_POS_LEFT);
+else if (nFlags & FloatWinPopupFlags::Up)
+gtk_popover_set_position(GTK_POPOVER(pWidget), GTK_POS_TOP);
+else if (nFlags & FloatWinPopupFlags::Right)
+gtk_popover_set_position(GTK_POPOVER(pWidget), GTK_POS_RIGHT);
+else
+gtk_popover_set_position(GTK_POPOVER(pWidget), GTK_POS_BOTTOM);
+
+gtk_popover_popup(GTK_POPOVER(pWidget));
+#else
 #if GTK_CHECK_VERSION(3,22,0)
 if (gtk_check_version(3, 22, 0) == nullptr)
 {
@@ -464,7 +483,6 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, 
const tools::Rectangl
 GdkRectangle rect {static_cast(aFloatRect.Left()), 
static_cast(aFloatRect.Top()),
static_cast(aFloatRect.GetWidth()), 
static_cast(aFloatRect.GetHeight())};
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
 GdkGravity rect_anchor = GDK_GRAVITY_SOUTH_WEST, menu_anchor = 
GDK_GRAVITY_NORTH_WEST;
 
 if (nFlags & FloatWinPopupFlags::Left)
@@ -484,17 +502,10 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* 
pWin, const tools::Rectangl
 
 GdkWindow* gdkWindow = 
gtk_widget_get_window(mpFrame->getMouseEventWidget());
 gtk_menu_popup_at_rect(GTK_MENU(pWidget), gdkWindow, &rect, 
rect_anchor, menu_anchor, nullptr);
-#else
-gtk_popover_set_pointing_to(GTK_POPOVER(pWidget), &rect);
-(void)nFlags;
-//TODO use gtk_popover_set_position
-gtk_popover_popup(GTK_POPOVER(pWidget));
-#endif
 }
 else
 #endif
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 guint nButton;
 guint32 nTime;
 
@@ -521,8 +532,8 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, 
const tools::Rectangl
 
 gtk_menu_popup(GTK_MENU(pWidget), nullptr, nullptr, MenuPositionFunc,
&aPos, nButton, nTime);
-#endif
 }
+#endif
 
 if (g_main_loop_is_running(pLoop))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sd/qa svx/source

2021-05-11 Thread Miklos Vajna (via logerrit)
 sd/qa/unit/tiledrendering/data/duplicate-undo.odp |binary
 sd/qa/unit/tiledrendering/tiledrendering.cxx  |   50 ++
 svx/source/svdraw/svdedxv.cxx |6 ++
 3 files changed, 56 insertions(+)

New commits:
commit 9243345722354ca170c5c6b5b6cb73d8e1cb958f
Author: Miklos Vajna 
AuthorDate: Mon May 10 14:19:16 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue May 11 09:37:51 2021 +0200

svx: fix crash with active text edit vs slide delete

The problem is that SdrObjEditView::HideSdrPage() may delete
SdrPaintView::mpPageView when it calls SdrGlueEditView::HideSdrPage().

But SdrObjEditView::pTextEditPV is a non-owning reference to that.

GetTextEditBackgroundColor() in svx/ calls
SdrObjEditView::GetTextEditPageView(), so in case
SdrObjEditView::pTextEditPV is not cleared, we would access a deleted
SdrPageView.

(cherry picked from commit 014f33066a99488c52d10d8f5ff470ca6e2242f6)

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

diff --git a/sd/qa/unit/tiledrendering/data/duplicate-undo.odp 
b/sd/qa/unit/tiledrendering/data/duplicate-undo.odp
new file mode 100644
index ..f66c9f6081d5
Binary files /dev/null and b/sd/qa/unit/tiledrendering/data/duplicate-undo.odp 
differ
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 161aed640277..109cc29edc87 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -129,6 +129,7 @@ public:
 void testLanguageAllText();
 void testInsertDeletePageInvalidation();
 void testSpellOnlineRenderParameter();
+void testSlideDuplicateUndo();
 
 CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
 CPPUNIT_TEST(testCreateDestroy);
@@ -183,6 +184,7 @@ public:
 CPPUNIT_TEST(testLanguageAllText);
 CPPUNIT_TEST(testInsertDeletePageInvalidation);
 CPPUNIT_TEST(testSpellOnlineRenderParameter);
+CPPUNIT_TEST(testSlideDuplicateUndo);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -2561,6 +2563,54 @@ void 
SdTiledRenderingTest::testSpellOnlineRenderParameter()
 CPPUNIT_ASSERT_EQUAL(!bSet, pXImpressDocument->GetDoc()->GetOnlineSpell());
 }
 
+void SdTiledRenderingTest::testSlideDuplicateUndo()
+{
+// Create two views.
+SdXImpressDocument* pXImpressDocument = createDoc("duplicate-undo.odp");
+int nView0 = SfxLokHelper::getView();
+SfxLokHelper::createView();
+pXImpressDocument->initializeForTiledRendering({});
+int nView1 = SfxLokHelper::getView();
+SfxLokHelper::setView(nView0);
+
+// Switch to the 3rd slide on view 0, and start text editing.
+{
+pXImpressDocument->setPart(2);
+sd::ViewShell* pViewShell0 = 
pXImpressDocument->GetDocShell()->GetViewShell();
+SdrView* pView = pViewShell0->GetView();
+SdPage* pActualPage = pViewShell0->GetActualPage();
+SdrObject* pObject = pActualPage->GetObj(1);
+SdrTextObj* pTextObj = static_cast(pObject);
+pView->MarkObj(pTextObj, pView->GetSdrPageView());
+SfxStringItem aInputString(SID_ATTR_CHAR, "x");
+
pViewShell0->GetViewFrame()->GetDispatcher()->ExecuteList(SID_ATTR_CHAR,
+SfxCallMode::SYNCHRON, { &aInputString });
+CPPUNIT_ASSERT(pView->IsTextEdit());
+CPPUNIT_ASSERT(pView->GetTextEditPageView());
+}
+
+// Duplicate the first slide on view 1 and undo it.
+SfxLokHelper::setView(nView1);
+comphelper::dispatchCommand(".uno:DuplicatePage", {});
+Scheduler::ProcessEventsToIdle();
+pXImpressDocument->setPart(0, /*bAllowChangeFocus=*/false);
+pXImpressDocument->setPart(1, /*bAllowChangeFocus=*/false);
+SfxLokHelper::setView(nView0);
+pXImpressDocument->setPart(0, /*bAllowChangeFocus=*/false);
+pXImpressDocument->setPart(3, /*bAllowChangeFocus=*/false);
+SfxLokHelper::setView(nView1);
+pXImpressDocument->getUndoManager()->undo();
+// Without the accompanying fix in place, this would have tried to access 
the outdated page view
+// pointer, potentially leading to a crash.
+pXImpressDocument->setPart(2, /*bAllowChangeFocus=*/false);
+
+// Make sure that view 0 now doesn't have an outdated page view pointer.
+SfxLokHelper::setView(nView0);
+sd::ViewShell* pViewShell0 = 
pXImpressDocument->GetDocShell()->GetViewShell();
+SdrView* pView0 = pViewShell0->GetView();
+CPPUNIT_ASSERT(!pView0->GetTextEditPageView());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 43ea7336af56..fefeb43fe7bc 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -210,6 +210,12 @@ void SdrObjEditView::HideSdrPage()
 {
 lcl_Remov

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

2021-05-11 Thread Miklos Vajna (via logerrit)
 sw/inc/strings.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 89b1c955c182a14de6a044b4db90b085d5bcddf9
Author: Miklos Vajna 
AuthorDate: Mon May 10 21:03:55 2021 +0200
Commit: Miklos Vajna 
CommitDate: Tue May 11 09:27:07 2021 +0200

Related: tdf#138604 sw: don't advertise AS_CHAR as "to char"

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

diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index e45a3ed1f848..237a8f91c83a 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -,7 +,7 @@
 #define STR_FRM_FIXEDHEIGHT NC_("STR_FRM_FIXEDHEIGHT", 
"Fixed height:")
 #define STR_FRM_MINHEIGHT   NC_("STR_FRM_MINHEIGHT", "Min. 
height:")
 #define STR_FLY_AT_PARA NC_("STR_FLY_AT_PARA", "to 
paragraph")
-#define STR_FLY_AS_CHAR NC_("STR_FLY_AS_CHAR", "to 
character")
+#define STR_FLY_AS_CHAR NC_("STR_FLY_AS_CHAR", "as 
character")
 #define STR_FLY_AT_PAGE NC_("STR_FLY_AT_PAGE", "to 
page")
 #define STR_POS_X   NC_("STR_POS_X", "X 
Coordinate:")
 #define STR_POS_Y   NC_("STR_POS_Y", "Y 
Coordinate:")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: offapi/com offapi/UnoApi_offapi.mk sc/source

2021-05-11 Thread Samuel Mehrbrodt (via logerrit)
 offapi/UnoApi_offapi.mk|1 
 offapi/com/sun/star/sheet/FilterFieldType.idl  |   40 +
 offapi/com/sun/star/sheet/FilterFieldValue.idl |   23 ++-
 sc/source/filter/inc/autofilterbuffer.hxx  |   23 +++
 sc/source/filter/oox/autofilterbuffer.cxx  |   76 +++--
 sc/source/filter/oox/autofiltercontext.cxx |5 +
 sc/source/ui/unoobj/datauno.cxx|   26 
 7 files changed, 186 insertions(+), 8 deletions(-)

New commits:
commit 3c8b248b5a7395b174fc265e3237bd79aeb2455f
Author: Samuel Mehrbrodt 
AuthorDate: Thu May 6 09:12:05 2021 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue May 11 09:17:13 2021 +0200

tdf#76258 Add OOXML import for color filter

Change-Id: I74cf4f56e0adf1cb8af8e6e932c14b30cce67c71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115168
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index c958419b7aa3..3abfc388ba95 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -3422,6 +3422,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/sheet,\
FillMode \
FilterConnection \
FilterFieldValue \
+   FilterFieldType \
FilterOperator \
FilterOperator2 \
FormulaLanguage \
diff --git a/offapi/com/sun/star/sheet/FilterFieldType.idl 
b/offapi/com/sun/star/sheet/FilterFieldType.idl
new file mode 100644
index ..0a5113c7a075
--- /dev/null
+++ b/offapi/com/sun/star/sheet/FilterFieldType.idl
@@ -0,0 +1,40 @@
+/* -*- 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/.
+ */
+
+#ifndef __com_sun_star_sheet_FilterFieldType_idl__
+#define __com_sun_star_sheet_FilterFieldType_idl__
+
+module com {  module sun {  module star {  module sheet {
+
+/**
+ * @since LibreOffice 7.2
+ */
+constants FilterFieldType
+{
+   /** Filter by numeric value */
+   const short NUMERIC = 0;
+
+   /** Filter by string value */
+   const short STRING = 1;
+
+   /** Filter by date */
+   const short DATE = 2;
+
+   /** Filter by text color */
+   const short TEXT_COLOR = 3;
+
+   /** Filter by background color */
+   const short BACKGROUND_COLOR = 4;
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sheet/FilterFieldValue.idl 
b/offapi/com/sun/star/sheet/FilterFieldValue.idl
index 2e3ba927dc97..12e9b8ba62e8 100644
--- a/offapi/com/sun/star/sheet/FilterFieldValue.idl
+++ b/offapi/com/sun/star/sheet/FilterFieldValue.idl
@@ -19,6 +19,8 @@ struct FilterFieldValue
 {
 /** selects whether the TableFilterFieldValue::NumericValue
 or the TableFilterFieldValue::StringValue is used.
+
+@deprecated - Use FilterType instead.
  */
 boolean IsNumeric;
 
@@ -30,12 +32,27 @@ struct FilterFieldValue
  */
 string StringValue;
 
-/** specifies whether the TableFilterFieldValue::StringValue
-is a string value or a date value.
+/** Which field should be used for filtering:
+
+
+com::sun::star::sheet::FilterFieldType::NUMERIC -> 
NumericValue
+com::sun::star::sheet::FilterFieldType::STRING -> 
StringValue
+com::sun::star::sheet::FilterFieldType::DATE -> 
StringValue
+com::sun::star::sheet::FilterFieldType::TEXT_COLOR -> 
ColorValue
+com::sun::star::sheet::FilterFieldType::BACKGROUND_COLOR -> 
ColorValue
+
 
+@see com::sun::star::sheet::FilterFieldType
 @since LibreOffice 7.2
  */
-boolean IsDateValue;
+short FilterType;
+
+/** The color which is used for filtering
+
+@since LibreOffice 7.2
+ */
+com::sun::star::util::Color ColorValue;
+
 };
 
 }; }; }; };
diff --git a/sc/source/filter/inc/autofilterbuffer.hxx 
b/sc/source/filter/inc/autofilterbuffer.hxx
index 8af001d24db4..0f9135be7123 100644
--- a/sc/source/filter/inc/autofilterbuffer.hxx
+++ b/sc/source/filter/inc/autofilterbuffer.hxx
@@ -23,6 +23,7 @@
 #include 
 #include "workbookhelper.hxx"
 #include 
+#include 
 
 namespace com::sun::star {
 namespace sheet { class XDatabaseRange; }
@@ -47,6 +48,7 @@ struct ApiFilterSettings
 
 void appendField( bool bAnd, sal_Int32 nOperator, double fValue );
 void appendField( bool bAnd, sal_Int32 nOperator, const OUString& rValue );
+void appendField( bool bAnd, css::util::Color aColor, bool 
bIsBackgroundColor );
 void appendField( bool bAnd, const std::vector>& 
rValues );
 };
 
@@ -110,6 +112,27 @@ private:
 boolmbPercent;  /// True = percentage, false = number 
of items.
 };
 
+/** Settings for a color filter. */
+cl

[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-5-4-7-2' - l10ntools/source

2021-05-11 Thread Michael Stahl (via logerrit)
 l10ntools/source/uimerge.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit f95986bf8f1641f1bdd6235fc60c8ab411a56ed9
Author: Michael Stahl 
AuthorDate: Mon Nov 25 18:16:48 2019 +0100
Commit: Andras Timar 
CommitDate: Tue May 11 09:11:00 2021 +0200

l10ntools: try to fix WNT build failure in uimerge.cxx by ...

... moving libxslt includes first:

C:\PROGRA~2\MICROS~2\Windows\v7.1A\include\winnt.h(519): warning C4005: 
'DECLARE_HANDLE': macro redefinition
C:\LO\lode\dev\core\include\sal/main.h(87): note: see previous definition 
of 'DECLARE_HANDLE'
C:\PROGRA~2\MICROS~2\Windows\v7.1A\include\windef.h(280): error C2371: 
'HINSTANCE': redefinition; different basic types
C:\LO\lode\dev\core\include\sal/main.h(89): note: see declaration of 
'HINSTANCE'

Change-Id: Ia9a89835c2d0b0c3dadde6258b5f3ea013541626

diff --git a/l10ntools/source/uimerge.cxx b/l10ntools/source/uimerge.cxx
index dd334de13fa5..b85ac7c78915 100644
--- a/l10ntools/source/uimerge.cxx
+++ b/l10ntools/source/uimerge.cxx
@@ -7,17 +7,17 @@
  * 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 "common.hxx"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits