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

2021-03-16 Thread Adolfo Jayme Barrientos (via logerrit)
 source/text/sbasic/python/python_2_basic.xhp |2 +-
 source/text/sbasic/shared/0104.xhp   |2 +-
 source/text/sbasic/shared/03/sf_database.xhp |2 +-
 source/text/shared/00/0404.xhp   |2 +-
 source/text/shared/01/06140200.xhp   |2 +-
 source/text/shared/04/0101.xhp   |2 +-
 source/text/simpress/01/0414.xhp |2 +-
 source/text/simpress/main_slide.xhp  |   26 +-
 source/text/swriter/01/0404.xhp  |2 +-
 9 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit 65d0ce6b572ab20c9ebc89771118458acfab9d40
Author: Adolfo Jayme Barrientos 
AuthorDate: Tue Mar 16 01:55:37 2021 -0600
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Mar 16 01:55:37 2021 -0600

Fixups of things missed in review

Change-Id: I6190d21bef297077e6a7685b59b58804cce60bca

diff --git a/source/text/sbasic/python/python_2_basic.xhp 
b/source/text/sbasic/python/python_2_basic.xhp
index f3295d788..1c3820584 100644
--- a/source/text/sbasic/python/python_2_basic.xhp
+++ b/source/text/sbasic/python/python_2_basic.xhp
@@ -31,7 +31,7 @@
  
  It is recommended to have knowledge of Python 
standard modules and %PRODUCTNAME API features prior to perform inter-language 
calls from Python to Basic, JavaScript or any other script engine.
   
- When running Python scripts from an Integrated 
Development Environment (IDE), the %PRODUCTNAME nested Basic engine may be 
absent. Avoid Python to %PRODUCTNAME Basic calls in such context. However 
Python environment and Universal Networks Objects (UNO) are fully available. 
Refer to Setting Up an Integrated IDE for Python for 
more information.
+ When running Python scripts from an Integrated 
Development Environment (IDE), the %PRODUCTNAME-embedded Basic engine may be 
absent. Avoid Python-to-%PRODUCTNAME Basic calls in such contexts. However 
Python environment and Universal Networks Objects (UNO) are fully available. 
Refer to Setting Up an Integrated IDE for Python for 
more information.
  Retrieving %PRODUCTNAME Basic Scripts
  %PRODUCTNAME Basic macros can 
be personal, shared, or embedded in documents. In order to execute them, Python 
run time needs to be provided with Basic macro locations. Implementing the 
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1script_1_1provider_1_1XScript.html";
 name ="XScriptProvider 
interface">com.sun.star.script.provider.XScriptProvider interface allows 
the retrieval of executable scripts:
  
diff --git a/source/text/sbasic/shared/0104.xhp 
b/source/text/sbasic/shared/0104.xhp
index 7d2d273a6..182aa39ad 100644
--- a/source/text/sbasic/shared/0104.xhp
+++ b/source/text/sbasic/shared/0104.xhp
@@ -148,7 +148,7 @@
  
  
 -no UI-
-When the document disk location has changed, for example 
after a File - Save As... action.
+When the document disk location has changed, for example 
after a File - Save As action.
 OnStorageChanged
  
  
diff --git a/source/text/sbasic/shared/03/sf_database.xhp 
b/source/text/sbasic/shared/03/sf_database.xhp
index 6c137ef47..b29dee997 100644
--- a/source/text/sbasic/shared/03/sf_database.xhp
+++ b/source/text/sbasic/shared/03/sf_database.xhp
@@ -38,7 +38,7 @@
 
 
 TODO: Add reference to the future help page SFDocuments.SF_Form 
service in the paragraph below
-Each instance of the Database service 
represents a single database and gives access to its tables, queries and data. 
This service does not provide access to  forms or reports in the Base 
document.
+Each instance of the Database service 
represents a single database and gives access to its tables, queries and data. 
This service does not provide access to forms or reports in the Base 
document.
 All exchanges between this service and 
the database are done using SQL only.
 SQL statements may be run in direct or 
indirect mode. In direct mode the statement is 
transferred to the database engine without any syntax checking or 
review.
 The provided interfaces include simple tables and queries 
lists, as well as access to database data.
diff --git a/source/text/shared/00/0404.xhp 
b/source/text/shared/00/0404.xhp
index 6a4ea764a..1d8f1c683 100644
--- a/source/text/shared/00/0404.xhp
+++ b/source/text/shared/00/0404.xhp
@@ -277,7 +277,7 @@
 
 
 
-Choose Insert - Signature Line...
+Choose Insert - Signature Line
 
 
 
diff --git a/source/text/shared/01/06140200.xhp 
b/source/text/shared/01/06140200.xhp
index b0224ab51..35291f5cf 100644
--- a/source/text/shared/01/06140200.xhp
+++ b/source/text/shared/01/06140200.xhp
@@ -39,7 +39,7 @@
 
 
 
-You can assign 
or edit shortcut keys for the current application or for all $[officename] 
applications. To assign a key for all applications, choose the %PRODUCTNAME 
radi

[Libreoffice-commits] core.git: helpcontent2

2021-03-16 Thread Adolfo Jayme Barrientos (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit be0fdabfa6cdac4a606ae3691ac99948fb12e537
Author: Adolfo Jayme Barrientos 
AuthorDate: Tue Mar 16 01:55:45 2021 -0600
Commit: Gerrit Code Review 
CommitDate: Tue Mar 16 08:55:45 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 65d0ce6b572ab20c9ebc89771118458acfab9d40
  - Fixups of things missed in review

Change-Id: I6190d21bef297077e6a7685b59b58804cce60bca

diff --git a/helpcontent2 b/helpcontent2
index 7eb8bd849511..65d0ce6b572a 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 7eb8bd84951159cf677149d0f7c87a8b3e07b764
+Subproject commit 65d0ce6b572ab20c9ebc89771118458acfab9d40
___
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 sd/source svx/source

2021-03-16 Thread Samuel Mehrbrodt (via logerrit)
 sc/source/ui/inc/gridwin.hxx   |2 +-
 sc/source/ui/view/gridwin.cxx  |2 +-
 sc/source/ui/view/gridwin3.cxx |7 ++-
 sd/source/ui/view/drviews4.cxx |4 ++--
 svx/source/form/fmview.cxx |   28 
 5 files changed, 38 insertions(+), 5 deletions(-)

New commits:
commit ea9fff260129ccfa4755e96c08432252efbe5621
Author: Samuel Mehrbrodt 
AuthorDate: Wed Mar 3 07:47:43 2021 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Mar 16 09:00:23 2021 +0100

tdf#139804 Focus form controls inside document with Alt-

Change-Id: I710a23a53ca0eb256a477a78ce1b7ae01129f717
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111865
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 67ad205404211a2ae17c430a17ede6e9d04d0b7e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112431
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 2202b3647563..afcfe268b95f 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -263,7 +263,7 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, 
public DropTargetHel
 boolDrawMouseButtonDown(const MouseEvent& rMEvt);
 boolDrawMouseButtonUp(const MouseEvent& rMEvt);
 boolDrawMouseMove(const MouseEvent& rMEvt);
-boolDrawKeyInput(const KeyEvent& rKEvt);
+boolDrawKeyInput(const KeyEvent& rKEvt, vcl::Window* pWin);
 boolDrawCommand(const CommandEvent& rCEvt);
 boolDrawHasMarkedObj();
 voidDrawEndAction();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index fa8b2a4e1b64..cf781d0319b4 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3289,7 +3289,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
 if (mrViewData.GetDocShell()->GetProgress())
 return;
 
-if (DrawKeyInput(rKEvt))
+if (DrawKeyInput(rKEvt, this))
 {
 const vcl::KeyCode& rLclKeyCode = rKEvt.GetKeyCode();
 if (rLclKeyCode.GetCode() == KEY_DOWN
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index e78a97cd5e3f..948f388ca866 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -167,10 +167,15 @@ bool ScGridWindow::DrawCommand(const CommandEvent& rCEvt)
 return false;
 }
 
-bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
+bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
 {
 ScDrawView* pDrView = mrViewData.GetScDrawView();
 FuPoor* pDraw = mrViewData.GetView()->GetDrawFuncPtr();
+
+
+if (pDrView && pDrView->KeyInput(rKEvt, pWin))
+return true;
+
 if (pDrView && pDraw && !mrViewData.IsRefMode())
 {
 pDraw->SetWindow( this );
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index b6a9d424a8db..e1c7831e11a7 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -147,9 +147,9 @@ void DrawViewShell::DeleteActualLayer()
 
 bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
 {
-bool bRet = false;
+bool bRet = GetView()->KeyInput(rKEvt, pWin);
 
-if ( !IsInputLocked() || ( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE ) )
+if (!bRet && (!IsInputLocked() || (rKEvt.GetKeyCode().GetCode() == 
KEY_ESCAPE)))
 {
 if(KEY_RETURN == rKEvt.GetKeyCode().GetCode()
 && rKEvt.GetKeyCode().IsMod1()
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index aec343857f75..3a4b443f4541 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -41,11 +41,14 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -493,6 +496,31 @@ bool FmFormView::KeyInput(const KeyEvent& rKEvt, 
vcl::Window* pWin)
 
 }
 
+// tdf#139804 Allow selecting form controls with Alt-
+if (rKeyCode.IsMod2() && rKeyCode.GetCode())
+{
+FmFormPage* pCurPage = GetCurPage();
+for (size_t a = 0; a < pCurPage->GetObjCount(); ++a)
+{
+SdrObject* pObj = pCurPage->GetObj(a);
+FmFormObj* pFormObject = FmFormObj::GetFormObject(pObj);
+if (!pFormObject)
+continue;
+
+Reference xControl = 
pFormObject->GetUnoControl(*this, *pWin);
+if (!xControl.is())
+continue;
+const vcl::I18nHelper& rI18nHelper = 
Application::GetSettings().GetUILocaleI18nHelper();
+VclPtr pWindow = 
VCLUnoHelper::GetWindow(xControl->getPeer());
+if (rI18nHelper.MatchMnemonic(pWindow->GetText(), 
rKEvt.GetCharCode()))
+{
+pWindow->GrabFocus();
+   

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

2021-03-16 Thread Michael Weghorn (via logerrit)
 android/source/build.gradle |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 985a9551f47aac55b60ef452869c2b411313ef11
Author: Michael Weghorn 
AuthorDate: Tue Mar 16 08:41:12 2021 +0100
Commit: Michael Weghorn 
CommitDate: Tue Mar 16 09:08:47 2021 +0100

tdf#141052 android: Include 'tabviewbar.ui'

... which has been added in

commit e00fd78e6e454491014f03370e14efa5ebc2eefe
Date:   Thu Oct 22 19:41:17 2020 +0100

weld impress TabBarControl

and is now needed by Impress in Android Viewer
as well.

Change-Id: I7fd89fa78a277d9da2121a47765107166ada1fd3

[Note: This is a partial cherry-pick/backport of
pending Gerrit change
https://gerrit.libreoffice.org/c/core/+/112557 ;
only of the two commits mentioned in that one's
commit message is already contained in 7-1 branch
as well, so just one .ui file needs to be added
here.]

 Conflicts:
android/source/build.gradle

Change-Id: I084655679eced073eed9db009cbbc598fce43eeb

diff --git a/android/source/build.gradle b/android/source/build.gradle
index 32de09f84749..637a0495ff2d 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -193,7 +193,8 @@ task copyAssets(type: Copy) {
 // 'headerfootermenu.ui' when clicking inside header/footer of document
 into('config') {
 from "${liboInstdir}/share/config"
-include '**/pagebreakmenu.ui', '**/annotationmenu.ui', 
'**/headerfootermenu.ui'
+include '**/pagebreakmenu.ui', '**/annotationmenu.ui', 
'**/headerfootermenu.ui',
+'**/tabviewbar.ui'
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/data/ods/tdf112780.ods  |binary
 sc/qa/unit/subsequent_filters-test.cxx |   21 +
 2 files changed, 21 insertions(+)

New commits:
commit ca28c94bde551a07a2b61bf91b7a55c93497d451
Author: Xisco Fauli 
AuthorDate: Mon Mar 15 21:39:21 2021 +0100
Commit: Xisco Fauli 
CommitDate: Tue Mar 16 09:25:50 2021 +0100

tdf#112780: sc_subsequent_filters: Add unittest

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

diff --git a/sc/qa/unit/data/ods/tdf112780.ods 
b/sc/qa/unit/data/ods/tdf112780.ods
new file mode 100644
index ..41939b8ac56d
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf112780.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index fd553fa15260..7dd6fee558be 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -296,6 +296,7 @@ public:
 void testTdf137091();
 void testTdf62268();
 void testTdf137453();
+void testTdf112780();
 void testTdf72470();
 void testTdf35636();
 void testVBAMacroFunctionODS();
@@ -490,6 +491,7 @@ public:
 CPPUNIT_TEST(testTdf137091);
 CPPUNIT_TEST(testTdf62268);
 CPPUNIT_TEST(testTdf137453);
+CPPUNIT_TEST(testTdf112780);
 CPPUNIT_TEST(testTdf72470);
 CPPUNIT_TEST(testTdf35636);
 CPPUNIT_TEST(testVBAMacroFunctionODS);
@@ -5210,6 +5212,25 @@ void ScFiltersTest::testTdf137453()
 xDocSh->DoClose();
 }
 
+void ScFiltersTest::testTdf112780()
+{
+ScDocShellRef xDocSh = loadDoc(u"tdf112780.", FORMAT_ODS);
+CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+
+ScDocument& rDoc = xDocSh->GetDocument();
+
+// Without the fix in place, this test would haved failed with
+// - Expected:
+// - Actual  : #VALUE!
+CPPUNIT_ASSERT_EQUAL(OUString(""), rDoc.GetString(ScAddress(3,5,0)));
+
+OUString aFormula;
+rDoc.GetFormula(3, 5, 0, aFormula);
+CPPUNIT_ASSERT_EQUAL(OUString("=G6+J6+M6"), aFormula);
+
+xDocSh->DoClose();
+}
+
 void ScFiltersTest::testTdf72470()
 {
 // Without the fix in place, this test would have hung
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Seth Chaiklin (via logerrit)
 source/text/shared/optionen/01040300.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 09799dd8cd57f5971241ba7a5a3365220d106407
Author: Seth Chaiklin 
AuthorDate: Tue Mar 16 09:19:33 2021 +0100
Commit: Seth Chaiklin 
CommitDate: Tue Mar 16 09:27:54 2021 +0100

tdf#140478 clarify explanation of List in Basic Fonts

  Thanks to Mike Kaganski for insight.

Change-Id: Id5135c6e75d0bf6d19bedc5ac21d56656bf83678
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/112525
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/source/text/shared/optionen/01040300.xhp 
b/source/text/shared/optionen/01040300.xhp
index 14ab7c3b5..c4dbd4419 100644
--- a/source/text/shared/optionen/01040300.xhp
+++ b/source/text/shared/optionen/01040300.xhp
@@ -63,7 +63,7 @@
 Specifies the font to be used 
for headings.
 
 List
-Specifies the fonts for lists 
and numbering and all derived styles.
+Specifies the font and font 
size for the List paragraph style, which is inherited by all 
derived paragraph styles.
 When you 
choose Format - Bullets and Numbering
 
 Format - Bullets and 
Numbering to format a paragraph with 
numbers or bullets in a text document, the program assigns these Paragraph 
Styles automatically.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-03-16 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5ac7d9e0cb5172e3582b8fa4548913cdcdadc677
Author: Seth Chaiklin 
AuthorDate: Tue Mar 16 09:27:54 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Mar 16 09:27:54 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 09799dd8cd57f5971241ba7a5a3365220d106407
  - tdf#140478 clarify explanation of List in Basic Fonts

  Thanks to Mike Kaganski for insight.

Change-Id: Id5135c6e75d0bf6d19bedc5ac21d56656bf83678
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/112525
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/helpcontent2 b/helpcontent2
index 65d0ce6b572a..09799dd8cd57 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 65d0ce6b572ab20c9ebc89771118458acfab9d40
+Subproject commit 09799dd8cd57f5971241ba7a5a3365220d106407
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx  |   21 +++
 sw/source/filter/ww8/docxsdrexport.cxx  |   11 +++
 writerfilter/source/dmapper/GraphicImport.cxx   |   36 ++--
 4 files changed, 63 insertions(+), 5 deletions(-)

New commits:
commit d934cb370b1d660f996ec959fda4bcc6f29902a9
Author: Miklos Vajna 
AuthorDate: Tue Mar 16 09:05:57 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Mar 16 09:42:11 2021 +0100

tdf#138895 DOCX filter: fix handling for effect extent vs line width

Regression from commit a5a836d8c43dc9cebbbf8af39bf0142de603a7c6 (DOCX
filter: effect extent should be part of the margin, 2014-12-04), the
problem was that effect extent is OK to be added as an extra margin, but
line width is part of that effect extent in Word, so Writer margin
should not be increased with the line width.

The Word behavior seems to be that half of the line width is part of
e.g. the top effect extent, then the other half is part of the bottom
one (and so on).

The bugdoc's case was that a too large margin shifted the last line
below the shape, and this tiny half-line-width extra margin handled
correctly puts the line back to its correct place.

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

diff --git a/sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx 
b/sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx
new file mode 100644
index ..5cc4d4e374ee
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index 6338931f9ec3..0e0ad7cea8e1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -149,6 +149,27 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFooterMarginLost, 
"footer-margin-lost.do
 assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgMar", "footer", 
"709");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testEffectExtentLineWidth)
+{
+auto verify = [this]() {
+CPPUNIT_ASSERT_EQUAL(static_cast(508),
+ getProperty(getShape(1), "TopMargin"));
+};
+
+// Given a document with a shape that has a non-zero line width and effect 
extent:
+// When loading the document:
+load(mpTestDocumentPath, "effect-extent-line-width.docx");
+// Then make sure that the line width is not taken twice (once as part of 
the margin, and then
+// also as the line width):
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 508
+// - Actual  : 561
+// i.e. the upper spacing was too large, the last line of the text moved 
below the shape.
+verify();
+reload(mpFilter, "effect-extent-line-width.docx");
+verify();
+}
+
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf140572_docDefault_superscript, 
"tdf140572_docDefault_superscript.docx")
 {
 // A round-trip was crashing.
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index df4ce254908d..9b461f4c3831 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -37,6 +37,7 @@
 #include 
 
 #include 
+#include 
 
 using namespace com::sun::star;
 using namespace oox;
@@ -452,22 +453,32 @@ void DocxSdrExport::startDMLAnchorInline(const 
SwFrameFormat* pFrameFormat, cons
 }
 }
 attrList->add(XML_behindDoc, bOpaque ? "0" : "1");
+sal_Int32 nLineWidth = 0;
+if (const SdrObject* pObject = pFrameFormat->FindRealSdrObject())
+{
+nLineWidth = pObject->GetMergedItem(XATTR_LINEWIDTH).GetValue();
+}
+
 // Extend distance with the effect extent if the shape is not rotated, 
which is the opposite
 // of the mapping done at import time.
 // The type of dist* attributes is unsigned, so make sure no negative 
value is written.
 sal_Int64 nTopExtDist = nRotation ? 0 : nTopExt;
+nTopExtDist -= TwipsToEMU(nLineWidth / 2);
 sal_Int64 nDistT = std::max(static_cast(0),
 TwipsToEMU(aULSpaceItem.GetUpper()) - 
nTopExtDist);
 attrList->add(XML_distT, OString::number(nDistT).getStr());
 sal_Int64 nBottomExtDist = nRotation ? 0 : nBottomExt;
+nBottomExtDist -= TwipsToEMU(nLineWidth / 2);
 sal_Int64 nDistB = std::max(static_cast(0),
 TwipsToEMU(aULSpaceItem.GetLower()) - 
nBottomExtDist);
 attrList->add(XML_distB, OString::number(nDistB).getStr());
 sal_Int64 nLeftExtDist = nRotation ? 0 : nLeftExt;
+nLeftExtDist -= TwipsToEMU(nLin

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

2021-03-16 Thread Tomaž Vajngerl (via logerrit)
 include/vcl/graphicfilter.hxx   |1 
 vcl/CppunitTest_vcl_bitmap_test.mk  |8 -
 vcl/Library_vcl.mk  |2 
 vcl/inc/filter/BmpReader.hxx|   26 
 vcl/inc/filter/BmpWriter.hxx|   29 
 vcl/qa/cppunit/BmpFilterTest.cxx|  197 
 vcl/qa/cppunit/data/BMP_8bit_RLE.bmp|binary
 vcl/qa/cppunit/data/BMP_A8R8G8B8.bmp|binary
 vcl/qa/cppunit/data/BMP_Paint_1bit.bmp  |binary
 vcl/qa/cppunit/data/BMP_Paint_24bit.bmp |binary
 vcl/qa/cppunit/data/BMP_Paint_4bit.bmp  |binary
 vcl/qa/cppunit/data/BMP_Paint_8bit.bmp  |binary
 vcl/qa/cppunit/data/BMP_R5G6B5.bmp  |binary
 vcl/qa/cppunit/data/BMP_R8G8B8.bmp  |binary
 vcl/qa/cppunit/data/BMP_RLE.bmp |binary
 vcl/qa/cppunit/data/BMP_RLE_V2.bmp  |binary
 vcl/qa/cppunit/data/BMP_RLE_V3.bmp  |binary
 vcl/source/filter/bmp/BmpReader.cxx |   30 
 vcl/source/filter/bmp/BmpWriter.cxx |   40 ++
 vcl/source/filter/graphicfilter.cxx |   37 ++
 20 files changed, 345 insertions(+), 25 deletions(-)

New commits:
commit 95bb2a4fe05fe94029047d3165af21b56b7cd3e5
Author: Tomaž Vajngerl 
AuthorDate: Tue Mar 16 15:31:20 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Mar 16 09:46:37 2021 +0100

vcl: add BmpReader{Writer} and many BMP format test

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

diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index b9de5bb85de5..d153c9d97648 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -371,6 +371,7 @@ public:
 static ErrCode readPDF(SvStream & rStream, Graphic & rGraphic, GfxLinkType 
& rLinkType);
 static ErrCode readTIFF(SvStream & rStream, Graphic & rGraphic, 
GfxLinkType & rLinkType);
 static ErrCode readWithTypeSerializer(SvStream & rStream, Graphic & 
rGraphic, GfxLinkType & rLinkType, OUString aFilterName);
+static ErrCode readBMP(SvStream & rStream, Graphic & rGraphic, GfxLinkType 
& rLinkType);
 static ErrCode readTGA(SvStream & rStream, Graphic & rGraphic);
 static ErrCode readPICT(SvStream & rStream, Graphic & rGraphic, 
GfxLinkType & rLinkType);
 static ErrCode readMET(SvStream & rStream, Graphic & rGraphic, GfxLinkType 
& rLinkType);
diff --git a/vcl/CppunitTest_vcl_bitmap_test.mk 
b/vcl/CppunitTest_vcl_bitmap_test.mk
index dca63852a8af..187bb6871845 100644
--- a/vcl/CppunitTest_vcl_bitmap_test.mk
+++ b/vcl/CppunitTest_vcl_bitmap_test.mk
@@ -16,6 +16,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,vcl_bitmap_test, \
 vcl/qa/cppunit/ScanlineToolsTest \
 vcl/qa/cppunit/BitmapScaleTest \
 vcl/qa/cppunit/BitmapFilterTest \
+vcl/qa/cppunit/BmpFilterTest \
 ))
 
 $(eval $(call gb_CppunitTest_use_externals,vcl_bitmap_test,\
@@ -52,12 +53,7 @@ $(eval $(call gb_CppunitTest_use_sdk_api,vcl_bitmap_test))
 $(eval $(call gb_CppunitTest_use_ure,vcl_bitmap_test))
 $(eval $(call gb_CppunitTest_use_vcl,vcl_bitmap_test))
 
-$(eval $(call gb_CppunitTest_use_components,vcl_bitmap_test,\
-configmgr/source/configmgr \
-i18npool/util/i18npool \
-ucb/source/core/ucb1 \
-unotools/util/utl \
-))
+$(eval $(call gb_CppunitTest_use_rdb,vcl_bitmap_test,services))
 
 $(eval $(call gb_CppunitTest_use_configuration,vcl_bitmap_test))
 
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 17ddf83fe961..4ffb346ca2e1 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -427,6 +427,8 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/components/dtranscomp \
 vcl/source/components/factory \
 vcl/source/components/fontident \
+vcl/source/filter/bmp/BmpReader \
+vcl/source/filter/bmp/BmpWriter \
 vcl/source/filter/egif/egif \
 vcl/source/filter/egif/giflzwc \
 vcl/source/filter/eps/eps \
diff --git a/vcl/inc/filter/BmpReader.hxx b/vcl/inc/filter/BmpReader.hxx
new file mode 100644
index ..4b6733eeb7f9
--- /dev/null
+++ b/vcl/inc/filter/BmpReader.hxx
@@ -0,0 +1,26 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sc/source sd/source svx/source

2021-03-16 Thread Samuel Mehrbrodt (via logerrit)
 sc/source/ui/inc/gridwin.hxx   |2 +-
 sc/source/ui/view/gridwin.cxx  |2 +-
 sc/source/ui/view/gridwin3.cxx |6 +-
 sd/source/ui/view/drviews4.cxx |4 ++--
 svx/source/form/fmview.cxx |   28 
 5 files changed, 37 insertions(+), 5 deletions(-)

New commits:
commit e29e100174c133d27e953934311d68602c4515b7
Author: Samuel Mehrbrodt 
AuthorDate: Wed Mar 3 07:47:43 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Tue Mar 16 09:54:13 2021 +0100

tdf#139804 Focus form controls inside document with Alt-

Change-Id: I710a23a53ca0eb256a477a78ce1b7ae01129f717
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111865
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 67ad205404211a2ae17c430a17ede6e9d04d0b7e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112501
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index bd4ca07159c5..fcd312756f9d 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -249,7 +249,7 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, 
public DropTargetHel
 boolDrawMouseButtonDown(const MouseEvent& rMEvt);
 boolDrawMouseButtonUp(const MouseEvent& rMEvt);
 boolDrawMouseMove(const MouseEvent& rMEvt);
-boolDrawKeyInput(const KeyEvent& rKEvt);
+boolDrawKeyInput(const KeyEvent& rKEvt, vcl::Window* pWin);
 boolDrawCommand(const CommandEvent& rCEvt);
 boolDrawHasMarkedObj();
 voidDrawEndAction();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 6d2c4ea19106..81d4509d2808 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3249,7 +3249,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
 if (pViewData->GetDocShell()->GetProgress())
 return;
 
-if (DrawKeyInput(rKEvt))
+if (DrawKeyInput(rKEvt, this))
 {
 const vcl::KeyCode& rLclKeyCode = rKEvt.GetKeyCode();
 if (rLclKeyCode.GetCode() == KEY_DOWN
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 1fbc48e0ae6f..da226f59a841 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -142,10 +142,14 @@ bool ScGridWindow::DrawCommand(const CommandEvent& rCEvt)
 return false;
 }
 
-bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
+bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
 {
 ScDrawView* pDrView = pViewData->GetScDrawView();
 FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
+
+if (pDrView && pDrView->KeyInput(rKEvt, pWin))
+return true;
+
 if (pDrView && pDraw && !pViewData->IsRefMode())
 {
 pDraw->SetWindow( this );
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 78c4635f279e..4f9162f84069 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -130,9 +130,9 @@ void DrawViewShell::DeleteActualLayer()
 
 bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
 {
-bool bRet = false;
+bool bRet = GetView()->KeyInput(rKEvt, pWin);
 
-if ( !IsInputLocked() || ( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE ) )
+if (!bRet && (!IsInputLocked() || (rKEvt.GetKeyCode().GetCode() == 
KEY_ESCAPE)))
 {
 if(KEY_RETURN == rKEvt.GetKeyCode().GetCode()
 && rKEvt.GetKeyCode().IsMod1()
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 6c089c44c98c..e090d7c73640 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -58,12 +58,15 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -511,6 +514,31 @@ bool FmFormView::KeyInput(const KeyEvent& rKEvt, 
vcl::Window* pWin)
 
 }
 
+// tdf#139804 Allow selecting form controls with Alt-
+if (rKeyCode.IsMod2() && rKeyCode.GetCode())
+{
+FmFormPage* pCurPage = GetCurPage();
+for (size_t a = 0; a < pCurPage->GetObjCount(); ++a)
+{
+SdrObject* pObj = pCurPage->GetObj(a);
+FmFormObj* pFormObject = FmFormObj::GetFormObject(pObj);
+if (!pFormObject)
+continue;
+
+Reference xControl = 
pFormObject->GetUnoControl(*this, *pWin);
+if (!xControl.is())
+continue;
+const vcl::I18nHelper& rI18nHelper = 
Application::GetSettings().GetUILocaleI18nHelper();
+VclPtr pWindow = 
VCLUnoHelper::GetWindow(xControl->getPeer());
+if (rI18nHelper.MatchMnemonic(pWindow->GetText(), 
rKEvt.GetCharCode()))
+{
+   

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - sc/source sd/source svx/source

2021-03-16 Thread Samuel Mehrbrodt (via logerrit)
 sc/source/ui/inc/gridwin.hxx   |2 +-
 sc/source/ui/view/gridwin.cxx  |2 +-
 sc/source/ui/view/gridwin3.cxx |6 +-
 sd/source/ui/view/drviews4.cxx |4 ++--
 svx/source/form/fmview.cxx |   28 
 5 files changed, 37 insertions(+), 5 deletions(-)

New commits:
commit 5597f149a27dae43cbc9dfc469689bd6e4f03a17
Author: Samuel Mehrbrodt 
AuthorDate: Wed Mar 3 07:47:43 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Tue Mar 16 09:54:34 2021 +0100

tdf#139804 Focus form controls inside document with Alt-

Change-Id: I710a23a53ca0eb256a477a78ce1b7ae01129f717
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111865
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 67ad205404211a2ae17c430a17ede6e9d04d0b7e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112555
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 1775114c27c8..5e5760d30f62 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -247,7 +247,7 @@ class ScGridWindow : public vcl::Window, public 
DropTargetHelper, public DragSou
 boolDrawMouseButtonDown(const MouseEvent& rMEvt);
 boolDrawMouseButtonUp(const MouseEvent& rMEvt);
 boolDrawMouseMove(const MouseEvent& rMEvt);
-boolDrawKeyInput(const KeyEvent& rKEvt);
+boolDrawKeyInput(const KeyEvent& rKEvt, vcl::Window* pWin);
 boolDrawCommand(const CommandEvent& rCEvt);
 boolDrawHasMarkedObj();
 voidDrawEndAction();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index b2bd86673130..182d7bf4d9b3 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3199,7 +3199,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
 if (pViewData->GetDocShell()->GetProgress())
 return;
 
-if (DrawKeyInput(rKEvt))
+if (DrawKeyInput(rKEvt, this))
 {
 const vcl::KeyCode& rLclKeyCode = rKEvt.GetKeyCode();
 if (rLclKeyCode.GetCode() == KEY_DOWN
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 337bb7a72beb..a7ac09421a91 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -151,10 +151,14 @@ bool ScGridWindow::DrawCommand(const CommandEvent& rCEvt)
 return false;
 }
 
-bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
+bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
 {
 ScDrawView* pDrView = pViewData->GetScDrawView();
 FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
+
+if (pDrView && pDrView->KeyInput(rKEvt, pWin))
+return true;
+
 if (pDrView && pDraw && !pViewData->IsRefMode())
 {
 pDraw->SetWindow( this );
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index f8aca149a4ae..91b00f978496 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -124,9 +124,9 @@ void DrawViewShell::DeleteActualLayer()
 
 bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
 {
-bool bRet = false;
+bool bRet = GetView()->KeyInput(rKEvt, pWin);
 
-if ( !IsInputLocked() || ( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE ) )
+if (!bRet && (!IsInputLocked() || (rKEvt.GetKeyCode().GetCode() == 
KEY_ESCAPE)))
 {
 if(KEY_RETURN == rKEvt.GetKeyCode().GetCode()
 && rKEvt.GetKeyCode().IsMod1()
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 15df6aa0adfb..806b9cade78c 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -59,11 +59,14 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -510,6 +513,31 @@ bool FmFormView::KeyInput(const KeyEvent& rKEvt, 
vcl::Window* pWin)
 
 }
 
+// tdf#139804 Allow selecting form controls with Alt-
+if (rKeyCode.IsMod2() && rKeyCode.GetCode())
+{
+FmFormPage* pCurPage = GetCurPage();
+for (size_t a = 0; a < pCurPage->GetObjCount(); ++a)
+{
+SdrObject* pObj = pCurPage->GetObj(a);
+FmFormObj* pFormObject = FmFormObj::GetFormObject(pObj);
+if (!pFormObject)
+continue;
+
+Reference xControl = 
pFormObject->GetUnoControl(*this, *pWin);
+if (!xControl.is())
+continue;
+const vcl::I18nHelper& rI18nHelper = 
Application::GetSettings().GetUILocaleI18nHelper();
+VclPtr pWindow = 
VCLUnoHelper::GetWindow(xControl->getPeer());
+if (rI18nHelper.MatchMnemonic(pWindow->GetText(), 
rKEvt.GetCharCode()))
+{
+pWindow->G

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

2021-03-16 Thread Michael Weghorn (via logerrit)
 android/source/build.gradle |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 66e531d2337be9a2be7b1798779fb9da0e198bbf
Author: Michael Weghorn 
AuthorDate: Tue Mar 16 08:41:12 2021 +0100
Commit: Michael Weghorn 
CommitDate: Tue Mar 16 10:01:55 2021 +0100

tdf#141052 android: Include 'tabbuttons.ui' and 'tabviewbar.ui'

... which have been added in

commit e00fd78e6e454491014f03370e14efa5ebc2eefe
Date:   Thu Oct 22 19:41:17 2020 +0100

weld impress TabBarControl

and

commit aa0657e2983007c505b1223281df4a3a4eb6e73a
Date:   Fri Nov 20 15:59:17 2020 +

weld ImplTabButtons

and are now needed by Impress in Android Viewer
as well.

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

diff --git a/android/source/build.gradle b/android/source/build.gradle
index ee297e1b44c6..add78236cb22 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -189,7 +189,8 @@ task copyAssets(type: Copy) {
 // include required .ui files
 into('config') {
 from "${liboInstdir}/share/config"
-include '**/annotation.ui', '**/hfmenubutton.ui', '**/pbmenubutton.ui'
+include '**/annotation.ui', '**/hfmenubutton.ui', '**/pbmenubutton.ui',
+'**/tabbuttons.ui', '**/tabviewbar.ui'
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Unit Tests failing when built with clang 12

2021-03-16 Thread Stephan Bergmann

On 15/03/2021 20:54, Luke Benes wrote:

The  recently added Unit Test test_tdf131000
https://cgit.freedesktop.org/libreoffice/core/commit/?id=df33714f0eca
fails with clang 12 but not with gcc 10 or clang 11. I bisected this regression 
to this change in clang:

https://github.com/llvm/llvm-project/commit/69cd776e1ee79e72ccbdad30749eac04579715ee
 [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer


Does this look like undefined behavior on our end or a bug in clang? The build 
log is below:


Interesting.  I can't reproduce that UITest_calc_tests9 SEGV with any of 
my Clang 13 trunk builds (which also include the above LLVM commit), but 
they're all --enable-dbgutil (and thus implicitly --disable-optimized), 
while your build is presumably (implicitly) --enable-optimized?


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-03-16 Thread Mike Kaganski (via logerrit)
 include/sfx2/tabdlg.hxx   |2 ++
 sfx2/source/dialog/tabdlg.cxx |7 ++-
 sw/source/ui/fldui/flddb.cxx  |4 
 sw/source/ui/fldui/flddb.hxx  |1 +
 4 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 65941fd266d555c513f37e3ddec616cf769ffab3
Author: Mike Kaganski 
AuthorDate: Sun Mar 14 14:42:15 2021 +0300
Commit: Miklos Vajna 
CommitDate: Tue Mar 16 10:48:11 2021 +0100

tdf#141011: Postpone SwFieldDBPage::Reset to tab activation

This way, it will only ask for password when dialog is switched to that tab.

Change-Id: Ie2a453b0b6867ceb1ef3728a8565de4f6cbf4757
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112469
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 0adf52a644aaf85ba2bd666147c62c134234ffbb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112422
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 325bfb8b4b4b..d5522a0cd253 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -205,6 +205,8 @@ public:
 
 virtual boolFillItemSet( SfxItemSet* );
 virtual voidReset( const SfxItemSet* );
+// Allows to postpone some initialization to the first activation
+virtual boolDeferResetToFirstActivation();
 
 boolHasExchangeSupport() const
 { return bHasExchangeSupport; }
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 8a69523c0e8d..d7b75e2667fa 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -174,6 +174,8 @@ void SfxTabPage::Reset( const SfxItemSet* )
 {
 }
 
+bool SfxTabPage::DeferResetToFirstActivation() { return false; }
+
 void SfxTabPage::ActivatePage( const SfxItemSet& )
 /*  [Description]
 
@@ -925,7 +927,10 @@ void SfxTabDialogController::CreatePages()
 pDataObject->xTabPage->SetUserData(sUserData);
 
 PageCreated(pDataObject->sId, *pDataObject->xTabPage);
-pDataObject->xTabPage->Reset(m_pSet.get());
+if (pDataObject->xTabPage->DeferResetToFirstActivation())
+pDataObject->bRefresh = true; // Reset will be called in 
ActivatePageHdl
+else
+pDataObject->xTabPage->Reset(m_pSet.get());
 }
 }
 
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 01b9065cd36e..7cdf4d73d4d4 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -182,6 +182,10 @@ void SwFieldDBPage::Reset(const SfxItemSet*)
 }
 }
 
+// SwFieldDBPage may ask for password to select current document's data source,
+// so only do that when activating the page, not when dialog is creating all 
pages
+bool SwFieldDBPage::DeferResetToFirstActivation() { return true; }
+
 bool SwFieldDBPage::FillItemSet(SfxItemSet* )
 {
 OUString sTableName;
diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx
index e507fcb86ee0..b25c38699234 100644
--- a/sw/source/ui/fldui/flddb.hxx
+++ b/sw/source/ui/fldui/flddb.hxx
@@ -70,6 +70,7 @@ public:
 
 virtual boolFillItemSet( SfxItemSet* rSet ) override;
 virtual voidReset( const SfxItemSet* rSet ) override;
+virtual boolDeferResetToFirstActivation() override;
 
 virtual voidFillUserData() override;
 voidActivateMailMergeAddress();
___
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' - sw/source

2021-03-16 Thread Mike Kaganski (via logerrit)
 sw/source/uibase/dbui/dbtree.cxx |   13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 0460f3ee99fc09a336ade6aa88b3d9296e553e39
Author: Mike Kaganski 
AuthorDate: Sun Mar 14 14:33:34 2021 +0300
Commit: Miklos Vajna 
CommitDate: Tue Mar 16 10:49:50 2021 +0100

tdf#141012: do not try to expand the node if RequestingChildrenHdl failed

Just select the database node itself, so that it's still obvious which
database is associated with this document.

After selecting this node when initializing the tab, another call to
SwDBTreeList::Select will be made, so make sure to handle empty table and
column names.

Change-Id: Ie1d1bd445e18d5900910c780a24102b4dde5c787
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112467
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 351edb44eb0548f7e56464de42c1758a1f5e4ab4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112423
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index eea90633e048..f2aafb77965d 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -333,14 +333,25 @@ void SwDBTreeList::Select(const OUString& rDBName, const 
OUString& rTableName, c
 {
 if (rDBName == m_xTreeView->get_text(*xParent))
 {
+if (rTableName.isEmpty() && rColumnName.isEmpty())
+{
+// Just select the database node, do not expand
+m_xTreeView->scroll_to_row(*xParent);
+m_xTreeView->select(*xParent);
+return;
+}
 if (!m_xTreeView->iter_has_child(*xParent))
 {
 RequestingChildrenHdl(*xParent);
-m_xTreeView->expand_row(*xParent);
+// If successful, it will be expanded in a call to 
scroll_to_row for its children
 }
 std::unique_ptr 
xChild(m_xTreeView->make_iterator(xParent.get()));
 if (!m_xTreeView->iter_children(*xChild))
+{
+m_xTreeView->scroll_to_row(*xParent);
+m_xTreeView->select(*xParent);
 continue;
+}
 do
 {
 if (rTableName == m_xTreeView->get_text(*xChild))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/ucalc.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit d2392723e1db63e31aa31fb4531a368b349fcd88
Author: Xisco Fauli 
AuthorDate: Tue Mar 16 10:01:25 2021 +0100
Commit: Xisco Fauli 
CommitDate: Tue Mar 16 11:01:20 2021 +0100

tdf#89998: sc_ucalc: Add unittest

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

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 5fab68bcf3f1..8fa94e0cd8b2 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -5003,6 +5003,20 @@ void Test::testAutoFill()
 CPPUNIT_ASSERT_EQUAL( OUString("001-001-003"), m_pDoc->GetString( 0, 72, 0 
) );
 CPPUNIT_ASSERT_EQUAL( OUString("001-001-004"), m_pDoc->GetString( 0, 73, 0 
) );
 
+// Clear column A for a new test.
+clearRange(m_pDoc, ScRange(0,0,0,0,MAXROW,0));
+m_pDoc->SetRowHidden(0, MAXROW, 0, false); // Show all rows.
+
+m_pDoc->SetString( 0, 80, 0, "1%" );
+m_pDoc->Fill( 0, 80, 0, 80, nullptr, aMarkData, 3, FILL_TO_BOTTOM, 
FILL_AUTO );
+
+// tdf#89998: Without the fix in place, this test would have failed with
+// - Expected: 2.00%
+// - Actual  : 101.00%
+CPPUNIT_ASSERT_EQUAL( OUString("2.00%"), m_pDoc->GetString( 0, 81, 0 ) );
+CPPUNIT_ASSERT_EQUAL( OUString("3.00%"), m_pDoc->GetString( 0, 82, 0 ) );
+CPPUNIT_ASSERT_EQUAL( OUString("4.00%"), m_pDoc->GetString( 0, 83, 0 ) );
+
 m_pDoc->DeleteTab(0);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Ahmet Hakan Çelik (via logerrit)
 basctl/source/dlged/dlged.cxx |4 ++--
 idl/inc/types.hxx |6 +++---
 idl/source/objects/types.cxx  |   12 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 0726ecd9e2f2d94e9f49eb40d2b4952475e02764
Author: Ahmet Hakan Çelik 
AuthorDate: Mon Mar 8 11:13:46 2021 +0300
Commit: Michael Stahl 
CommitDate: Tue Mar 16 11:45:04 2021 +0100

tdf#114441: Convert use of sal_uLong to better integer types

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

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index d74d375357ce..9ddb6adbc8a5 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -278,8 +278,8 @@ void DlgEditor::InitScrollBars()
 
 pHScroll->SetRange( Range( 0, aPgSize.Width()  ));
 pVScroll->SetRange( Range( 0, aPgSize.Height() ));
-pHScroll->SetVisibleSize( static_cast(aOutSize.Width()) );
-pVScroll->SetVisibleSize( static_cast(aOutSize.Height()) );
+pHScroll->SetVisibleSize( aOutSize.Width() );
+pVScroll->SetVisibleSize( aOutSize.Height() );
 
 pHScroll->SetLineSize( aOutSize.Width() / 10 );
 pVScroll->SetLineSize( aOutSize.Height() / 10 );
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 97c353b36541..298e863c6663 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -44,7 +44,7 @@ public:
 
 virtual boolTest( SvTokenStream & rInStm );
 virtual boolReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) 
override;
-sal_uLong   MakeSfx( OStringBuffer& rAtrrArray ) const;
+size_t   MakeSfx( OStringBuffer& rAtrrArray ) const;
 virtual voidInsert( SvSlotElementList& );
 };
 
@@ -70,7 +70,7 @@ public:
 
 SvRefMemberList&
 GetAttrList() { return aAttrList; }
-sal_uLong   GetAttrCount() const { return aAttrList.size(); }
+size_t   GetAttrCount() const { return aAttrList.size(); }
 
 voidSetType( MetaTypeType nT );
 MetaTypeTypeGetMetaTypeType() const { return nType; }
@@ -81,7 +81,7 @@ public:
 
 virtual boolReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) 
override;
 
-sal_uLong   MakeSfx( OStringBuffer& rAtrrArray );
+size_t   MakeSfx( OStringBuffer& rAtrrArray );
 virtual voidWriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
 boolReadMethodArgs( SvIdlDataBase & rBase,
 SvTokenStream & rInStm );
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 9cb1684caffc..a0238d9b4c78 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -96,7 +96,7 @@ bool SvMetaAttribute::ReadSvIdl( SvIdlDataBase & rBase,
 return bOk;
 }
 
-sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) const
+size_t SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) const
 {
 SvMetaType * pType = GetType();
 DBG_ASSERT( pType, "no type for attribute" );
@@ -199,15 +199,15 @@ void SvMetaType::ReadContextSvIdl( SvIdlDataBase & rBase,
 }
 }
 
-sal_uLong SvMetaType::MakeSfx( OStringBuffer& rAttrArray )
+size_t SvMetaType::MakeSfx( OStringBuffer& rAttrArray )
 {
-sal_uLong nC = 0;
+size_t nC = 0;
 
 if( GetBaseType()->GetMetaTypeType() == MetaTypeType::Struct )
 {
-sal_uLong nAttrCount = GetAttrCount();
+size_t nAttrCount = GetAttrCount();
 // write the single attributes
-for( sal_uLong n = 0; n < nAttrCount; n++ )
+for( size_t n = 0; n < nAttrCount; n++ )
 {
 nC += aAttrList[n]->MakeSfx( rAttrArray );
 if( n +1 < nAttrCount )
@@ -224,7 +224,7 @@ void SvMetaType::WriteSfxItem(
 OString aVarName = " a" + rItemName + "_Impl";
 
 OStringBuffer aAttrArray(1024);
-sal_uLong   nAttrCount = MakeSfx( aAttrArray );
+size_t   nAttrCount = MakeSfx( aAttrArray );
 OString aAttrCount( OString::number(nAttrCount));
 OString aTypeName = "SfxType" + aAttrCount;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/calc_tests3/tdf79983.py |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit bada1d6abac201e28d470d1c4e18ab77672fdf01
Author: Xisco Fauli 
AuthorDate: Tue Mar 16 10:31:45 2021 +0100
Commit: Xisco Fauli 
CommitDate: Tue Mar 16 12:10:23 2021 +0100

uitest: sc: assert text in entries

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

diff --git a/sc/qa/uitest/calc_tests3/tdf79983.py 
b/sc/qa/uitest/calc_tests3/tdf79983.py
index f4afc77eaf26..f674897c8b14 100644
--- a/sc/qa/uitest/calc_tests3/tdf79983.py
+++ b/sc/qa/uitest/calc_tests3/tdf79983.py
@@ -6,11 +6,10 @@
 #
 from uitest.framework import UITestCase
 from uitest.uihelper.common import get_state_as_dict
-from uitest.uihelper.common import select_pos
 from uitest.uihelper.calc import enter_text_to_cell
 from libreoffice.calc.document import get_cell_by_position
 from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.debug import sleep
+
 #Bug 79983 - Calc sort lists aren't case sensitive
 
 class tdf79983(UITestCase):
@@ -38,6 +37,9 @@ class tdf79983(UITestCase):
 #copy new list from selected cells
 xcopy = xDialogOpt.getChild("copy")
 xcopy.executeAction("CLICK", tuple())
+
+self.assertEqual("AAA\nBBB\nCCC\nDDD", 
get_state_as_dict(xDialogOpt.getChild("entries"))['Text'])
+
 xOKBtn = xDialogOpt.getChild("ok")
 self.ui_test.close_dialog_through_button(xOKBtn)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Caolán McNamara (via logerrit)
 sw/qa/core/layout/data/tdf122894-4.doc  |binary
 sw/qa/core/layout/layout.cxx|5 +
 sw/source/core/layout/objectformattertxtfrm.cxx |3 ++-
 3 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit fa1bcc22921941b2cd8a0b32fe0d15655d12d607
Author: Caolán McNamara 
AuthorDate: Tue Mar 16 10:18:18 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Mar 16 12:36:27 2021 +0100

tdf#122894 skipping anchor in column in footnote

a trawl of crash testing document didn't show up another example
and it doesn't seem possible to create this scenario directly in out
UI

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

diff --git a/sw/qa/core/layout/data/tdf122894-4.doc 
b/sw/qa/core/layout/data/tdf122894-4.doc
new file mode 100644
index ..4ebdb53de04f
Binary files /dev/null and b/sw/qa/core/layout/data/tdf122894-4.doc differ
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 7c899aa31d63..8db099b6fc1b 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -463,6 +463,11 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, 
testVerticallyMergedCellBorder)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testCrashRemoveFromLayout)
+{
+load(DATA_DIRECTORY, "tdf122894-4.doc");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx 
b/sw/source/core/layout/objectformattertxtfrm.cxx
index 96ea415070c5..1ea4a63fb56c 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -747,7 +747,8 @@ void 
SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAn
 // format the content of the previous columns.
 // Note: It's a very simple format without formatting objects.
 SwFrame* pColFrameOfAnchor = _rAnchorTextFrame.FindColFrame();
-if ( pColFrameOfAnchor )
+SAL_WARN_IF(pColFrameOfAnchor && _rAnchorTextFrame.IsInFootnote(), 
"sw.layout", "tdf#122894 skipping anchor in column in footnote");
+if (pColFrameOfAnchor && !_rAnchorTextFrame.IsInFootnote())
 {
 // #i44049#
 _rAnchorTextFrame.LockJoin();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Caolán McNamara (via logerrit)
 sfx2/source/sidebar/Deck.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 98fbedf9e59ba5b6159abfbc85c05c00ceab5b90
Author: Caolán McNamara 
AuthorDate: Mon Mar 15 20:44:02 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Mar 16 12:49:17 2021 +0100

a panel if present is always enabled

there's no case, as far as I can tell, where the panel container window
is in a disabled state. Hidden yes, disabled no.

"enabled" in the json dump was added by

commit fc93925a935960c750f400b9b3c79a592baaf5fe
Date:   Fri Jan 10 18:03:49 2020 +

lok: jsdialog creation for sidebar panels cleanup.

presumably for completeness sake

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

diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 0beb6376c8f0..7444f7fe7b15 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -218,7 +218,7 @@ void Deck::DumpAsPropertyTree(tools::JsonWriter& 
rJsonWriter)
 rJsonWriter.put("id", it->GetId());
 rJsonWriter.put("type", "panel");
 rJsonWriter.put("text", it->GetText());
-rJsonWriter.put("enabled", it->IsEnabled());
+rJsonWriter.put("enabled", true);
 
 {
 auto children2Node = rJsonWriter.startArray("children");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Luboš Luňák (via logerrit)
 vcl/inc/skia/utils.hxx |2 ++
 vcl/skia/salbmp.cxx|   10 ++
 2 files changed, 12 insertions(+)

New commits:
commit 96007832dd3d800ca781c9ef12904b178adb61f1
Author: Luboš Luňák 
AuthorDate: Mon Mar 15 16:56:07 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Mar 16 12:55:33 2021 +0100

don't repeatedly create (alpha)SkImage on mEraseColorSet

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

diff --git a/vcl/inc/skia/utils.hxx b/vcl/inc/skia/utils.hxx
index 3baa749adb8b..716bd3e2471c 100644
--- a/vcl/inc/skia/utils.hxx
+++ b/vcl/inc/skia/utils.hxx
@@ -67,6 +67,8 @@ VCL_DLLPUBLIC sk_sp 
makeCheckedImageSnapshot(sk_sp surface);
 VCL_DLLPUBLIC sk_sp makeCheckedImageSnapshot(sk_sp surface,
   const SkIRect& bounds);
 
+inline Size imageSize(const sk_sp& image) { return 
Size(image->width(), image->height()); }
+
 // Must be called in any VCL backend before any Skia functionality is used.
 // If not set, Skia will be disabled.
 VCL_DLLPUBLIC void
diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index 0fa95deb39db..83dd16950eaa 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -730,6 +730,11 @@ const sk_sp& SkiaSalBitmap::GetSkImage() const
 #endif
 if (mEraseColorSet)
 {
+if (mImage)
+{
+assert(imageSize(mImage) == mSize);
+return mImage;
+}
 SkiaZone zone;
 sk_sp surface = createSkSurface(
 mSize, mEraseColor.IsTransparent() ? kPremul_SkAlphaType : 
kOpaque_SkAlphaType);
@@ -801,6 +806,11 @@ const sk_sp& SkiaSalBitmap::GetAlphaSkImage() 
const
 #endif
 if (mEraseColorSet)
 {
+if (mAlphaImage)
+{
+assert(imageSize(mAlphaImage) == mSize);
+return mAlphaImage;
+}
 SkiaZone zone;
 sk_sp surface = createSkSurface(mSize, 
kAlpha_8_SkColorType);
 assert(surface);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

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

New commits:
commit 2c84920182ee18d0cff97637bc7f20facc5f29cd
Author: Luboš Luňák 
AuthorDate: Mon Mar 15 16:56:44 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Mar 16 12:55:53 2021 +0100

with mEraseColorSet, there should be no pixel buffer

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

diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index 83dd16950eaa..c8abfb64252b 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -1024,15 +1024,10 @@ void SkiaSalBitmap::EnsureBitmapData()
 if (mEraseColorSet)
 {
 SkiaZone zone;
-if (mPixelsSize != mSize)
-{
-mPixelsSize = mSize;
-ComputeScanlineSize();
-mBuffer.reset();
-}
+assert(mPixelsSize == mSize);
+assert(!mBuffer);
 mScaleQuality = BmpScaleFlag::BestQuality;
-if (!mBuffer)
-CreateBitmapData();
+CreateBitmapData();
 // Unset now, so that repeated call will return mBuffer.
 mEraseColorSet = false;
 PerformErase();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Luboš Luňák (via logerrit)
 vcl/inc/skia/salbmp.hxx  |4 +-
 vcl/qa/cppunit/skia/skia.cxx |   43 +
 vcl/skia/salbmp.cxx  |   72 +++
 3 files changed, 85 insertions(+), 34 deletions(-)

New commits:
commit 1e9b97dc1f795da63c92b0169415a4f455d9d014
Author: Luboš Luňák 
AuthorDate: Mon Mar 15 22:15:15 2021 +0100
Commit: Luboš Luňák 
CommitDate: Tue Mar 16 12:56:17 2021 +0100

fixes for SkiaSalBitmap delayed scaling (tdf#140930)

The original idea for delayed scaling was that if a bitmap is to be
scaled, only the parameters will be saved and the pixel buffer
mBuffer will be resized only on-demand. But this gets complicated
by mImage sometimes not being just a cache of mBuffer, but sometimes
it is the only data. This is needed so that e.g.
OutputDevice::GetBitmap() can operate only on SkImage without
possibly ever needing a conversion to the pixel buffer, thus even
keeping the data only on the GPU in the Vulkan case.

Together with delayed scaling this means that the size of mImage
can be either the original size (if Scale() is called with mImage
already valid) or the final size (if mImage is created in
GetSkImage()). Thus relying on 'mPixelsSize != mSize' as
a detection of pending scaling does not always work for mImage.
Handle this by using mImage dimensions in cases where relevant.

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

diff --git a/vcl/inc/skia/salbmp.hxx b/vcl/inc/skia/salbmp.hxx
index 0509ed3381b6..012594169132 100644
--- a/vcl/inc/skia/salbmp.hxx
+++ b/vcl/inc/skia/salbmp.hxx
@@ -105,8 +105,6 @@ private:
 void ResetToBuffer();
 // Sets the data only as SkImage (will be converted as needed).
 void ResetToSkImage(sk_sp image);
-// Resets all data that does not match mSize.
-void ResetCachedDataBySize();
 // Resets all data (buffer and images).
 void ResetAllData();
 // Call to ensure mBuffer has data (will convert from mImage if necessary).
@@ -119,6 +117,8 @@ private:
 void CreateBitmapData();
 // Should be called whenever mPixelsSize or mBitCount is set/changed.
 bool ComputeScanlineSize();
+// Resets information about pending scaling. To be called when mBuffer is 
resized or created.
+void ResetPendingScaling();
 // Sets bitmap to be erased on demand.
 void EraseInternal(const Color& color);
 // Sets pixels to the erase color.
diff --git a/vcl/qa/cppunit/skia/skia.cxx b/vcl/qa/cppunit/skia/skia.cxx
index 8f288d813404..d8e103d1a431 100644
--- a/vcl/qa/cppunit/skia/skia.cxx
+++ b/vcl/qa/cppunit/skia/skia.cxx
@@ -20,6 +20,8 @@
 #include 
 #include 
 
+using namespace SkiaHelper;
+
 // This tests backends that use Skia (i.e. intentionally not the svp one, 
which is the default.)
 // Note that you still may need to actually set for Skia to be used (see 
vcl/README.vars).
 // If Skia is not enabled, all tests will be silently skipped.
@@ -39,6 +41,7 @@ public:
 void testAlphaBlendWith();
 void testBitmapCopyOnWrite();
 void testMatrixQuality();
+void testDelayedScale();
 void testTdf137329();
 
 CPPUNIT_TEST_SUITE(SkiaTest);
@@ -48,6 +51,7 @@ public:
 CPPUNIT_TEST(testAlphaBlendWith);
 CPPUNIT_TEST(testBitmapCopyOnWrite);
 CPPUNIT_TEST(testMatrixQuality);
+CPPUNIT_TEST(testDelayedScale);
 CPPUNIT_TEST(testTdf137329);
 CPPUNIT_TEST_SUITE_END();
 
@@ -329,6 +333,45 @@ void SkiaTest::testMatrixQuality()
 #endif
 }
 
+void SkiaTest::testDelayedScale()
+{
+if (!SkiaHelper::isVCLSkiaEnabled())
+return;
+Bitmap bitmap1(Size(10, 10), vcl::PixelFormat::N24_BPP);
+SkiaSalBitmap* skiaBitmap1 = 
dynamic_cast(bitmap1.ImplGetSalBitmap().get());
+CPPUNIT_ASSERT(skiaBitmap1);
+// Do scaling based on mBuffer.
+(void)BitmapReadAccess(bitmap1); // allocates mBuffer
+CPPUNIT_ASSERT(skiaBitmap1->unittestHasBuffer());
+CPPUNIT_ASSERT(!skiaBitmap1->unittestHasImage());
+CPPUNIT_ASSERT(bitmap1.Scale(2, 2, BmpScaleFlag::Default));
+skiaBitmap1 = 
dynamic_cast(bitmap1.ImplGetSalBitmap().get());
+CPPUNIT_ASSERT(skiaBitmap1);
+CPPUNIT_ASSERT(skiaBitmap1->unittestHasBuffer());
+CPPUNIT_ASSERT(!skiaBitmap1->unittestHasImage());
+CPPUNIT_ASSERT_EQUAL(Size(20, 20), bitmap1.GetSizePixel());
+CPPUNIT_ASSERT_EQUAL(Size(20, 20), imageSize(skiaBitmap1->GetSkImage()));
+BitmapBuffer* buffer1 = skiaBitmap1->AcquireBuffer(BitmapAccessMode::Read);
+CPPUNIT_ASSERT(buffer1);
+CPPUNIT_ASSERT_EQUAL(tools::Long(20), buffer1->mnWidth);
+CPPUNIT_ASSERT_EQUAL(tools::Long(20), buffer1->mnHeight);
+skiaBitmap1->ReleaseBuffer(buffer1, BitmapAccessMode::Read);
+// Do scaling based on mImage.
+SkiaSalBitmap skiaBitmap2(skiaBitmap1->GetSkImage());
+CPPUNIT_ASSERT(!skiaBitmap2.unittestHasBuffe

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

2021-03-16 Thread Jean-Pierre Ledure (via logerrit)
 wizards/source/scriptforge/SF_Exception.xba  |   44 +
 wizards/source/scriptforge/SF_PythonHelper.xba   |8 +--
 wizards/source/scriptforge/SF_Root.xba   |2 
 wizards/source/scriptforge/python/scriptforge.py |   57 +++
 4 files changed, 105 insertions(+), 6 deletions(-)

New commits:
commit 8570a945f2c77ea0231acd0d110016a336dbf9c7
Author: Jean-Pierre Ledure 
AuthorDate: Tue Mar 16 11:44:44 2021 +0100
Commit: Jean-Pierre Ledure 
CommitDate: Tue Mar 16 13:08:05 2021 +0100

ScriptForge - (scriptforge.py) Exception class

The SF_Exception class is not intended to replace or complement
the builtin Python exception handling.
Hence it implements only a subset of the corresponding
Basic service.

- no properties: they are fully related to Basic error trapping
- next methods are available: Console, ConsoleClear, ConsoleToFile,
  DebugPrint and RaiseFatal (reserved for internal use)
Restriction: Console() does not work in non-modal mode.

DebugPrint formats its messages by using the repr() builtin method.
DebugPrint outputs from Basic or from Python are mixed within
the same console.
The other methods call their Basic counterpart.

A new method has been added both in Python and Basic: DebugDisplay
It combines DebugPrint with a display in a message box of the
arguments.

Change-Id: Iba94ab951b95b409c881ac17560476d6e9bc2fc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112570
Tested-by: Jean-Pierre Ledure 
Reviewed-by: Jean-Pierre Ledure 

diff --git a/wizards/source/scriptforge/SF_Exception.xba 
b/wizards/source/scriptforge/SF_Exception.xba
index 18d562b21e7b..ba9ce109ecc8 100644
--- a/wizards/source/scriptforge/SF_Exception.xba
+++ b/wizards/source/scriptforge/SF_Exception.xba
@@ -391,6 +391,49 @@ Catch:
GoTo Finally
 End Function'   ScriptForge.SF_Exception.ConsoleToFile
 
+REM 
-
+Public Sub DebugDisplay(ParamArray pvArgs() As Variant)
+''' Display the list of arguments in a readable form in a 
message box
+''' Arguments are separated by a LINEFEED character
+''' The maximum length of each individual argument = 1024 
characters
+''' Args:
+''' Any number of arguments of any type
+''' Examples:
+''' SF_Exception.DebugDisplay(a, Array(1, 2, 3), , 
"line1" & Chr(10) & "Line2", DateSerial(2020, 04, 
09))
+
+Dim sOutputMsg As String   '  Line to display
+Dim sOutputCon As String   '  Line to write in console
+Dim sArgMsg As String  '  Single argument
+Dim sArgCon As String  '  Single argument
+Dim i As Integer
+Const cstTab = 4
+Const cstMaxLength = 1024
+Const cstThisSub = "Exception.DebugDisplay"
+Const cstSubArgs = "Arg0, [Arg1, ...]"
+
+   If SF_Utils._ErrorHandling() Then On Local Error Goto Finally   '  
Never interrupt processing
+   SF_Utils._EnterFunction(cstThisSub, cstSubArgs)
+Try:
+   '  Build new console line
+   sOutputMsg = ""   :   sOutputCon = 
""
+   For i = 0 To UBound(pvArgs)
+   If IsError(pvArgs(i)) Then pvArgs(i) = ""
+   sArgMsg = Iif(i = 0, "", SF_String.sfNEWLINE) & 
SF_Utils._Repr(pvArgs(i), cstMaxLength)   'Do not use SF_String.Represent()
+   sArgCon = Iif(i = 0, "", SF_String.sfTAB) & 
SF_Utils._Repr(pvArgs(i), cstMaxLength)
+   sOutputMsg = sOutputMsg & sArgMsg
+   sOutputCon = sOutputCon & sArgCon
+   Next i
+   
+   '  Add to actual console
+   _SF_._AddToConsole(SF_String.ExpandTabs(sOutputCon, cstTab))
+   '  Display the message
+   MsgBox(sOutputMsg, MB_OK + MB_ICONINFORMATION, "DebugDisplay")
+   
+Finally:
+   SF_Utils._ExitFunction(cstThisSub)
+   Exit Sub
+End Sub'  ScriptForge.SF_Exception.DebugDisplay
+
 REM 
-
 Public Sub DebugPrint(ParamArray pvArgs() As Variant)
 ''' Print the list of arguments in a readable form in the 
console
@@ -403,7 +446,6 @@ Public Sub DebugPrint(ParamArray pvArgs() As Variant)
 
 Dim sOutput As String  '  Line to write in console
 Dim sArg As String '  Single argument
-Dim sMainSub As String '  Temporary storage for main function
 Dim i As Integer
 Const cstTab = 4
 Const cstMaxLength = 1024
diff --git a/wizards/source/scriptforge/SF_PythonHelper.xba 
b/wizards/source/scriptforge/SF_PythonHelper.xba
index c54d799ae282..38aaa0e4681b 100644
--- a/wizards/source/scriptforge/SF_PythonHelper.xba
+++ b/wizards/source/scriptforge/SF_PythonHelper.xba
@@ -481,21 +481,21 @@ Public Function PyMsgBox(ByVal Text As Variant _
 ''' Example: (Python code)
 ''' a = bas.MsgBox ('Please press a button:', 
bas.MB_EXCLAMATION, 'Dear User')
 
-Dim sMsg As String  

[Libreoffice-commits] core.git: configure.ac distro-configs/LibreOfficeiOS.conf external/pdfium

2021-03-16 Thread Tor Lillqvist (via logerrit)
 configure.ac |2 +-
 distro-configs/LibreOfficeiOS.conf   |2 +-
 external/pdfium/Library_pdfium.mk|   14 ++
 external/pdfium/UnpackedTarball_pdfium.mk|2 ++
 external/pdfium/cg-instead-of-carbon.patch.1 |   13 +
 5 files changed, 31 insertions(+), 2 deletions(-)

New commits:
commit f1073838d24d418c14afd0cf5cc4cfd547f5d213
Author: Tor Lillqvist 
AuthorDate: Tue Mar 16 12:21:44 2021 +0200
Commit: Tor Lillqvist 
CommitDate: Tue Mar 16 13:44:31 2021 +0100

Do build Pdfium for iOS, too

For it to compile, the inclusion of  had to be
replaced with . That doesn't harm the
macOS build either.

This fixes the crash in
https://github.com/CollaboraOnline/online/issues/1710 . I am not
entirely sure yet whether the actual PDF import functionality now then
works in the iOS app, though.

Change-Id: Ie25e7c58632c0fdddb569d58217f23b26d1e5937
Signed-off-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112571
Tested-by: Jenkins

diff --git a/configure.ac b/configure.ac
index fe84f7b4e922..887db854e7d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11609,7 +11609,7 @@ AC_SUBST([ENABLE_DCONF])
 # pdf import?
 AC_MSG_CHECKING([whether to build the PDF import feature])
 ENABLE_PDFIMPORT=
-if test $_os != iOS -a \( -z "$enable_pdfimport" -o "$enable_pdfimport" = yes 
\); then
+if test -z "$enable_pdfimport" -o "$enable_pdfimport" = yes; then
 AC_MSG_RESULT([yes])
 ENABLE_PDFIMPORT=TRUE
 AC_DEFINE(HAVE_FEATURE_PDFIMPORT)
diff --git a/distro-configs/LibreOfficeiOS.conf 
b/distro-configs/LibreOfficeiOS.conf
index 2fc9b2ddf1d8..2f54e1ada54e 100644
--- a/distro-configs/LibreOfficeiOS.conf
+++ b/distro-configs/LibreOfficeiOS.conf
@@ -22,7 +22,7 @@
 --disable-kf5
 --disable-odk
 --disable-openssl
---disable-pdfium
+--disable-poppler
 --disable-python
 
 --without-tls
diff --git a/external/pdfium/Library_pdfium.mk 
b/external/pdfium/Library_pdfium.mk
index 81cdbe859ba2..0e6b110f9a0e 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -662,6 +662,20 @@ $(eval $(call 
gb_Library_use_system_darwin_frameworks,pdfium,\
 ))
 endif
 
+ifeq ($(OS),iOS)
+# fxge
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+UnpackedTarball/pdfium/core/fxge/apple/fx_apple_platform \
+UnpackedTarball/pdfium/core/fxge/apple/fx_mac_impl \
+UnpackedTarball/pdfium/core/fxge/apple/fx_quartz_device \
+))
+
+$(eval $(call gb_Library_use_system_darwin_frameworks,pdfium,\
+CoreGraphics \
+CoreFoundation \
+))
+endif
+
 ifeq ($(OS),ANDROID)
 # fxge
 $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
diff --git a/external/pdfium/UnpackedTarball_pdfium.mk 
b/external/pdfium/UnpackedTarball_pdfium.mk
index 11cd2193bb47..97da4dc71caa 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -14,6 +14,8 @@ pdfium_patches += build.patch.1
 # Avoids Windows 8 build dependency.
 pdfium_patches += windows7.patch.1
 pdfium_patches += c++20-comparison.patch
+# Use CoreGraphics.h instead of Carbon.h
+pdfium_patches += cg-instead-of-carbon.patch.1
 
 # Work around  "c++20 
rewritten operator==
 # recursive call mixing friend and external operators for template class" in 
GCC with
diff --git a/external/pdfium/cg-instead-of-carbon.patch.1 
b/external/pdfium/cg-instead-of-carbon.patch.1
new file mode 100644
index ..bd29af1b95c2
--- /dev/null
+++ b/external/pdfium/cg-instead-of-carbon.patch.1
@@ -0,0 +1,13 @@
+-*- Mode: Diff -*-
+--- a/core/fxge/apple/fx_quartz_device.h
 b/core/fxge/apple/fx_quartz_device.h
+@@ -7,7 +7,7 @@
+ #ifndef CORE_FXGE_APPLE_FX_QUARTZ_DEVICE_H_
+ #define CORE_FXGE_APPLE_FX_QUARTZ_DEVICE_H_
+ 
+-#include 
++#include 
+ 
+ #include "core/fxcrt/fx_system.h"
+ #include "core/fxge/cfx_gemodule.h"
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/ucalc.cxx |   13 +
 1 file changed, 13 insertions(+)

New commits:
commit 6fdff333560e625b7c5c4dd9053c9945a45a52d1
Author: Xisco Fauli 
AuthorDate: Tue Mar 16 11:18:39 2021 +0100
Commit: Xisco Fauli 
CommitDate: Tue Mar 16 14:27:38 2021 +0100

tdf#129606: sc_ucalc: Add unittest

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

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 8fa94e0cd8b2..ec599ad7a42d 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -5017,6 +5017,19 @@ void Test::testAutoFill()
 CPPUNIT_ASSERT_EQUAL( OUString("3.00%"), m_pDoc->GetString( 0, 82, 0 ) );
 CPPUNIT_ASSERT_EQUAL( OUString("4.00%"), m_pDoc->GetString( 0, 83, 0 ) );
 
+// Clear column A for a new test.
+clearRange(m_pDoc, ScRange(0,0,0,0,MAXROW,0));
+m_pDoc->SetRowHidden(0, MAXROW, 0, false); // Show all rows.
+
+m_pDoc->SetString( 0, 0, 0, "1" );
+m_pDoc->SetString( 0, 1, 0, "1.1" );
+m_pDoc->Fill( 0, 0, 0, 1, nullptr, aMarkData, 60, FILL_TO_BOTTOM, 
FILL_AUTO );
+
+// tdf#129606: Without the fix in place, this test would have failed with
+// - Expected: 6
+// - Actual  : 6.01
+CPPUNIT_ASSERT_EQUAL( OUString("6"), m_pDoc->GetString( 0, 50, 0 ) );
+
 m_pDoc->DeleteTab(0);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Caolán McNamara (via logerrit)
 include/vcl/weld.hxx  |1 +
 vcl/inc/salvtables.hxx|2 ++
 vcl/source/app/salvtables.cxx |5 +
 vcl/unx/gtk3/gtk3gtkinst.cxx  |5 +
 4 files changed, 13 insertions(+)

New commits:
commit 90f25a4ff279aa4561861c313c7c18b9d42777a8
Author: Caolán McNamara 
AuthorDate: Tue Mar 16 11:30:07 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Mar 16 14:39:17 2021 +0100

add access to DumpAsPropertyTree for sidebar::Deck

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

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 0b995277cd31..1fc18c85fb65 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -317,6 +317,7 @@ public:
 virtual css::uno::Reference 
get_drop_target() = 0;
 
 virtual void connect_get_property_tree(const Link& rLink) = 0;
+virtual void get_property_tree(tools::JsonWriter& rJsonWriter) = 0;
 
 // render the widget to an output device
 virtual void draw(OutputDevice& rOutput, const Point& rPos, const Size& 
rSizePixel) = 0;
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 340c546f6f40..efec58258868 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -365,6 +365,8 @@ public:
 
 virtual void connect_get_property_tree(const Link& rLink) override;
 
+virtual void get_property_tree(tools::JsonWriter& rJsonWriter) override;
+
 virtual void set_stack_background() override;
 
 virtual void set_title_background() override;
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 083f571d858b..2a0009446132 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -539,6 +539,11 @@ void SalInstanceWidget::connect_get_property_tree(const 
LinkSetDumpAsPropertyTreeHdl(rLink);
 }
 
+void SalInstanceWidget::get_property_tree(tools::JsonWriter& rJsonWriter)
+{
+m_xWidget->DumpAsPropertyTree(rJsonWriter);
+}
+
 void SalInstanceWidget::set_stack_background()
 {
 
set_background(m_xWidget->GetSettings().GetStyleSettings().GetWindowColor());
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 882a6f0210e5..d15ee5d5a7e8 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3049,6 +3049,11 @@ public:
 //not implemented for the gtk variant
 }
 
+virtual void get_property_tree(tools::JsonWriter& /*rJsonWriter*/) override
+{
+//not implemented for the gtk variant
+}
+
 virtual void set_stack_background() override
 {
 
do_set_background(Application::GetSettings().GetStyleSettings().GetWindowColor());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/finalclasses.py |1 -
 compilerplugins/clang/methodcycles.py |1 -
 compilerplugins/clang/plugin.cxx  |1 -
 include/systools/win32/uwinapi.h  |6 +++---
 4 files changed, 3 insertions(+), 6 deletions(-)

New commits:
commit f416acdc3a142c7bf54ae5ea5d5fdcd690e0e810
Author: Stephan Bergmann 
AuthorDate: Tue Mar 16 14:11:53 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Mar 16 14:53:44 2021 +0100

systools is no longer part of the URE interface

...since de030cd7a234fd9191364647deb1a4836ca992cb "gbuild: Remove MSVC 2013
legacy code", so no longer treat it as such in compilerplugins.  (Which 
caused a
few loplugin:includeform and loplugin:nullptr warnings.)

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

diff --git a/compilerplugins/clang/finalclasses.py 
b/compilerplugins/clang/finalclasses.py
index 8b6f505fdd90..dfaa402f9513 100755
--- a/compilerplugins/clang/finalclasses.py
+++ b/compilerplugins/clang/finalclasses.py
@@ -54,7 +54,6 @@ for clazz in sorted(definitionSet - inheritFromSet):
 if file.startswith("include/rtl/"): continue
 if file.startswith("include/sal/"): continue
 if file.startswith("include/salhelper/"): continue
-if file.startswith("include/systools/"): continue
 if file.startswith("include/typelib/"): continue
 if file.startswith("include/uno/"): continue
 # some kind of template noise
diff --git a/compilerplugins/clang/methodcycles.py 
b/compilerplugins/clang/methodcycles.py
index 4a153ae1c0e5..1b0ef2b1ef71 100755
--- a/compilerplugins/clang/methodcycles.py
+++ b/compilerplugins/clang/methodcycles.py
@@ -106,7 +106,6 @@ for caller in definitionSet:
   or "include/rtl/" in location \
   or "include/sal/" in location \
   or "include/salhelper/" in location \
-  or "include/systools/" in location \
   or "include/typelib/" in location \
   or "include/uno/" in location \
   or "workdir/UnpackedTarball/" in location \
diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx
index 4e640cfb2c3b..753c548cf252 100644
--- a/compilerplugins/clang/plugin.cxx
+++ b/compilerplugins/clang/plugin.cxx
@@ -278,7 +278,6 @@ bool Plugin::isInUnoIncludeFile(SourceLocation 
spellingLocation) const
|| hasPathnamePrefix(name, SRCDIR "/include/rtl/")
|| hasPathnamePrefix(name, SRCDIR "/include/sal/")
|| hasPathnamePrefix(name, SRCDIR "/include/salhelper/")
-   || hasPathnamePrefix(name, SRCDIR "/include/systools/")
|| hasPathnamePrefix(name, SRCDIR "/include/typelib/")
|| hasPathnamePrefix(name, SRCDIR "/include/uno/"));
 }
diff --git a/include/systools/win32/uwinapi.h b/include/systools/win32/uwinapi.h
index 52daae944974..501c9aa38e0f 100644
--- a/include/systools/win32/uwinapi.h
+++ b/include/systools/win32/uwinapi.h
@@ -20,14 +20,14 @@
 #ifndef INCLUDED_SYSTOOLS_WIN32_UWINAPI_H
 #define INCLUDED_SYSTOOLS_WIN32_UWINAPI_H
 
-#include "prewin.h"
-#include "postwin.h"
+#include 
+#include 
 
 #ifdef __cplusplus
 
 inline bool IsValidHandle(HANDLE handle)
 {
-return handle != INVALID_HANDLE_VALUE && handle != NULL;
+return handle != INVALID_HANDLE_VALUE && handle != nullptr;
 }
 
 #else /* __cplusplus */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Stephan Bergmann (via logerrit)
 sfx2/source/appl/appdde.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 67acdf3f1c536079e07afcec6894ed1f8d08b2bd
Author: Stephan Bergmann 
AuthorDate: Tue Mar 16 14:14:37 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Mar 16 15:04:35 2021 +0100

loplugin:staticdynamic (clang-cl)

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

diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index c31ef2bd5e25..0211d8978192 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -149,10 +149,10 @@ bool ImplDdeService::MakeTopic( const OUString& rNm )
 SfxCallMode::SYNCHRON,
 { &aName, &aNewView, &aSilent });
 
-if( dynamic_cast< const SfxViewFrameItem *>( pRet ) &&
-static_cast(pRet)->GetFrame() &&
-nullptr != ( pShell = static_cast(pRet)
-->GetFrame()->GetObjectShell() ) )
+if( auto const item = dynamic_cast< const SfxViewFrameItem *>( 
pRet );
+item &&
+item->GetFrame() &&
+nullptr != ( pShell = item->GetFrame()->GetObjectShell() ) )
 {
 SfxGetpApp()->AddDdeTopic( pShell );
 bRet = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Ayhan Yalçınsoy (via logerrit)
 cui/uiconfig/ui/toolbarmodedialog.ui |   68 +--
 1 file changed, 41 insertions(+), 27 deletions(-)

New commits:
commit fd9b1fbcae5d90d7e542dae999cffda9a0f928f0
Author: Ayhan Yalçınsoy 
AuthorDate: Tue Mar 16 08:02:54 2021 +0300
Commit: Heiko Tietze 
CommitDate: Tue Mar 16 15:21:19 2021 +0100

tdf#137925: UI: Preferred user interface rearranged

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

diff --git a/cui/uiconfig/ui/toolbarmodedialog.ui 
b/cui/uiconfig/ui/toolbarmodedialog.ui
index 9483f977e167..b7c6427ef7b3 100644
--- a/cui/uiconfig/ui/toolbarmodedialog.ui
+++ b/cui/uiconfig/ui/toolbarmodedialog.ui
@@ -15,6 +15,9 @@
 True
 center-on-parent
 dialog
+
+  
+
 
   
 False
@@ -103,8 +106,8 @@
 vertical
 3
 
-  
-Standard Toolbar
+  
+Tabbed
 True
 True
 False
@@ -112,6 +115,7 @@
 start
 True
 True
+rbButton1
   
   
 False
@@ -120,8 +124,8 @@
   
 
 
-  
-Tabbed
+  
+Standard Toolbar
 True
 True
 False
@@ -129,17 +133,27 @@
 start
 True
 True
-rbButton1
   
   
 False
 True
-3
+1
   
 
 
-  
-Tabbed Compact
+  
+True
+False
+  
+  
+False
+True
+2
+  
+
+
+  
+Single Toolbar
 True
 True
 False
@@ -152,12 +166,12 @@
   
 False
 True
-4
+3
   
 
 
-  
-Groupedbar
+  
+Sidebar
 True
 True
 False
@@ -170,12 +184,12 @@
   
 False
 True
-5
+4
   
 
 
-  
-Groupedbar Compact
+  
+Tabbed Compact
 True
 True
 False
@@ -188,12 +202,12 @@
   
 False
 True
-6
+5
   
 
 
-  
-Contextual Single
+  
+Groupedbar
 True
 True
 False
@@ -206,12 +220,12 @@
   
 False
 True
-7
+6
   
 
 
-  
-Contextual Groups
+  
+Groupedbar Compact
 True
 True
 False
@@ -224,12 +238,12 @@
   
 False
 True
-8
+7
   
 
 
-  
-Single Toolbar
+  
+Contextual Single
 True
 True
 False
@@ -242,12 +256,12 @@
   
 False
 True
-9
+ 

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

2021-03-16 Thread Mark Hung (via logerrit)
 sd/qa/unit/misc-tests.cxx   |   35 ++
 svx/source/table/tablemodel.cxx |   61 ++--
 2 files changed, 70 insertions(+), 26 deletions(-)

New commits:
commit f3f7cc53efda828af8897fa45fa2a8f18cf3b48b
Author: Mark Hung 
AuthorDate: Thu Mar 11 23:44:06 2021 +0800
Commit: Mark Hung 
CommitDate: Tue Mar 16 15:23:58 2021 +0100

tdf#136956 reorder undo actions in removeColumns

and removeRows.  Inside the removeColumns and removeRows, undo actions
are added first, and then cell spans are updated to reflect the removed
columns or rows. Once undo the cell spans they become immediately
invalid because the rows or columns are already removed, hence cause
Impress to crash.

Change-Id: I9d8641bdad43026eca03cbeaaa3a5907b516304f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112355
Tested-by: Jenkins
Reviewed-by: Mark Hung 

diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 0ae169ce4431..d7fbf74ef58a 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -27,6 +27,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -82,6 +84,7 @@ public:
 void testTdf130988();
 void testTdf131033();
 void testTdf129898LayerDrawnInSlideshow();
+void testTdf136956();
 
 CPPUNIT_TEST_SUITE(SdMiscTest);
 CPPUNIT_TEST(testTdf96206);
@@ -103,6 +106,7 @@ public:
 CPPUNIT_TEST(testTdf130988);
 CPPUNIT_TEST(testTdf131033);
 CPPUNIT_TEST(testTdf129898LayerDrawnInSlideshow);
+CPPUNIT_TEST(testTdf136956);
 CPPUNIT_TEST_SUITE_END();
 
 virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override
@@ -874,6 +878,37 @@ void SdMiscTest::testTdf129898LayerDrawnInSlideshow()
 xDocShRef->DoClose();
 }
 
+void SdMiscTest::testTdf136956()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/cellspan.odp"), ODP);
+
+const SdrPage *pPage = GetPage( 1, xDocShRef );
+sdr::table::SdrTableObj *pTableObj = 
dynamic_cast(pPage->GetObj(0));
+CPPUNIT_ASSERT( pTableObj );
+uno::Reference< table::XTable > xTable(pTableObj->getTable(), 
uno::UNO_SET_THROW);
+
+uno::Reference< css::table::XMergeableCellRange > xRange(
+xTable->createCursorByRange( xTable->getCellRangeByPosition( 0, 0, 
3, 2 ) ), uno::UNO_QUERY_THROW );
+
+// 4x3 Table before merge.
+CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable->getColumnCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRowCount());
+
+xRange->merge();
+
+// 1x1 Table after merge.
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumnCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRowCount());
+
+xDocShRef->GetUndoManager()->Undo();
+
+// 4x3 Table after undo. Undo crashed before.
+CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable->getColumnCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRowCount());
+
+xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdMiscTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx
index 6efcbd1280dc..a6d21f3935db 100644
--- a/svx/source/table/tablemodel.cxx
+++ b/svx/source/table/tablemodel.cxx
@@ -694,24 +694,6 @@ void TableModel::removeColumns( sal_Int32 nIndex, 
sal_Int32 nCount )
 {
 rModel.BegUndo( SvxResId(STR_UNDO_COL_DELETE) );
 rModel.AddUndo( 
rModel.GetSdrUndoFactory().CreateUndoGeoObject(*mpTableObj) );
-
-TableModelRef xThis( this );
-ColumnVector aRemovedCols( nCount );
-sal_Int32 nOffset;
-for( nOffset = 0; nOffset < nCount; ++nOffset )
-{
-aRemovedCols[nOffset] = maColumns[nIndex+nOffset];
-}
-
-CellVector aRemovedCells( nCount * nRows );
-CellVector::iterator aCellIter( aRemovedCells.begin() );
-for( sal_Int32 nRow = 0; nRow < nRows; ++nRow )
-{
-for( nOffset = 0; nOffset < nCount; ++nOffset )
-(*aCellIter++) = getCell( nIndex + nOffset, nRow );
-}
-
-rModel.AddUndo( std::make_unique( xThis, nIndex, 
aRemovedCols, aRemovedCells ) );
 }
 
 // only rows before and inside the removed rows are considered
@@ -758,6 +740,29 @@ void TableModel::removeColumns( sal_Int32 nIndex, 
sal_Int32 nCount )
 }
 }
 
+// We must not add RemoveColUndo before we make cell spans correct, 
otherwise we
+// get invalid cell span after undo.
+if( bUndo  )
+{
+TableModelRef xThis( this );
+ColumnVector aRemovedCols( nCount );
+sal_Int32 nOffset;
+for( nOffset = 0; nOffset < nCount; ++nOffset )
+{
+aRemovedCols[nOffset] = maColumns[nIndex+nOffset];
+}
+
+CellVector aR

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

2021-03-16 Thread Winston Min Tjong (via logerrit)
 sc/source/ui/view/cellsh3.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 872ab577ccc4626f4720ae71cc298dca8e2968f4
Author: Winston Min Tjong 
AuthorDate: Mon Mar 1 21:32:08 2021 -0800
Commit: Ilmari Lauhakangas 
CommitDate: Tue Mar 16 15:49:52 2021 +0100

tdf#101217 Change row height and col width decimal places to 4

Bug 101217 - Setting the column width and height should not round
the values causing compounding errors
This patch fixes the problem caused by rounding errors by
increasing the number of decimal places for row height,
optimal row height, column width, and optimal column width to 4.
Modified:   sc/source/ui/view/cellsh3.cxx

Change-Id: I29d90b413e6f6f6e8b73d30ac47d644a69d15046
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111800
Reviewed-by: Heiko Tietze 
Tested-by: Ilmari Lauhakangas 

diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index c809c79fce60..433ce133997d 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -699,7 +699,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
 ScopedVclPtr 
pDlg(pFact->CreateScMetricInputDlg(
 pTabViewShell->GetFrameWeld(), "RowHeightDialog",
 nCurHeight, ScGlobal::nStdRowHeight,
-eMetric, 2, MAX_ROW_HEIGHT));
+eMetric, 4, MAX_ROW_HEIGHT));
 
 if ( pDlg->Execute() == RET_OK )
 {
@@ -736,7 +736,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
 ScopedVclPtr 
pDlg(pFact->CreateScMetricInputDlg(
 pTabViewShell->GetFrameWeld(), 
"OptimalRowHeightDialog",
-ScGlobal::nLastRowHeightExtra, 0, eMetric, 1, 
MAX_EXTRA_HEIGHT));
+ScGlobal::nLastRowHeightExtra, 0, eMetric, 4, 
MAX_EXTRA_HEIGHT));
 if ( pDlg->Execute() == RET_OK )
 {
 tools::Long nVal = pDlg->GetInputValue();
@@ -797,7 +797,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
 ScopedVclPtr 
pDlg(pFact->CreateScMetricInputDlg(
 pTabViewShell->GetFrameWeld(), "ColWidthDialog", 
nCurHeight,
-STD_COL_WIDTH, eMetric, 2, MAX_COL_WIDTH));
+STD_COL_WIDTH, eMetric, 4, MAX_COL_WIDTH));
 if ( pDlg->Execute() == RET_OK )
 {
 tools::Long nVal = pDlg->GetInputValue();
@@ -833,7 +833,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
 ScopedVclPtr 
pDlg(pFact->CreateScMetricInputDlg(
 pTabViewShell->GetFrameWeld(), "OptimalColWidthDialog",
-ScGlobal::nLastColWidthExtra, STD_EXTRA_WIDTH, 
eMetric, 1, MAX_EXTRA_WIDTH));
+ScGlobal::nLastColWidthExtra, STD_EXTRA_WIDTH, 
eMetric, 4, MAX_EXTRA_WIDTH));
 if ( pDlg->Execute() == RET_OK )
 {
 tools::Long nVal = pDlg->GetInputValue();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: setup_native/scripts

2021-03-16 Thread Christian Lohmaier (via logerrit)
 setup_native/scripts/osx_install_languagepack.applescript |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit daa162c20f4c7d61edc217ed44cb2854652a63ec
Author: Christian Lohmaier 
AuthorDate: Fri Mar 12 12:25:30 2021 +0100
Commit: Christian Lohmaier 
CommitDate: Tue Mar 16 15:58:28 2021 +0100

tdf#134607 use kMDItemFSName instead of _kMDItemDisplayNameWithExtensions

apparently the latter is not available on older versions of macOS.
https://developer.apple.com/documentation/coreservices/kmditemfsname
lists it as in version 10.4 and not flagged as deprecated, so keeping
fingers crossed that it is not affected by user-settings or similar…

Change-Id: I208d22f2abd628e7d95babc23ddb145a88bcf5cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112385
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/setup_native/scripts/osx_install_languagepack.applescript 
b/setup_native/scripts/osx_install_languagepack.applescript
index bc793a510c8d..4083b01cd97c 100644
--- a/setup_native/scripts/osx_install_languagepack.applescript
+++ b/setup_native/scripts/osx_install_languagepack.applescript
@@ -66,7 +66,7 @@ end if
 set found_ooos_all to ""
 -- command might return an error if spotlight is disabled completely
 try
-   set found_ooos_all to (do shell script "mdfind \"kMDItemContentType == 
'com.apple.application-bundle' && _kMDItemDisplayNameWithExtensions == 
'[PRODUCTNAME].app'\"")
+   set found_ooos_all to (do shell script "mdfind \"kMDItemContentType == 
'com.apple.application-bundle' && kMDItemFSName == '[PRODUCTNAME].app'\"")
 end try
 set found_ooos_all to found_ooos_all & "
 " & chooseMyOwn
@@ -126,7 +126,7 @@ end if
 
 -- now only check whether the path is really from [PRODUCTNAME]
 try
-   do shell script "mdls --raw --name _kMDItemDisplayNameWithExtensions 
--name kMDItemVersion " & quoted form of (choice as string) & " | xargs -0 | 
fgrep '[PRODUCTNAME].app [PRODUCTVERSION]'"
+   do shell script "mdls --raw --name kMDItemFSName --name kMDItemVersion 
" & quoted form of (choice as string) & " | xargs -0 | fgrep '[PRODUCTNAME].app 
[PRODUCTVERSION]'"
 on error
display dialog (choice as string) & appInvalid buttons {InstallLabel} 
default button 1 with icon 0
return 3 --wrong target-directory
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Seth Chaiklin (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 486f329b9589f1c795286228a513cb3751492fd2
Author: Seth Chaiklin 
AuthorDate: Thu Mar 11 11:56:40 2021 +0100
Commit: Heiko Tietze 
CommitDate: Tue Mar 16 16:49:56 2021 +0100

tdf#140949 update "Format > Page" to "Format > Page Style" in Calc menu

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

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 77a9015986cf..b61385b8572d 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1704,7 +1704,7 @@
   Format ~Page...
 
 
-  ~Page...
+  ~Page Style...
 
 
   Format Pa~ge...
___
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' - sw/source

2021-03-16 Thread Xisco Fauli (via logerrit)
 sw/source/core/doc/notxtfrm.cxx |   52 
 1 file changed, 1 insertion(+), 51 deletions(-)

New commits:
commit 8926d9282fe84793ce909471b5caec3583fd3ec9
Author: Xisco Fauli 
AuthorDate: Thu Mar 11 12:42:47 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Mar 16 17:56:13 2021 +0100

Revert "tdf#114076: Expand ClipRange to next PixelBound" ...

and "tdf#124272 use ClipRegion's geometry if not a rectangle"

This commit reverts c1230cede19ae3633e51c7ca780cb34d9dbaa20f
and 362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c

tdf#114076, or any of its duplicates, is not reproducible in master
if c1230cede19ae3633e51c7ca780cb34d9dbaa20f
("tdf#114076: Expand ClipRange to next PixelBound") is reverted.
(Tested on Linux and Windows)
So, if we revert it, we no longer need
362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c
("tdf#124272 use ClipRegion's geometry if not a rectangle"), which
was a follow-up fix for a regression introduced by the first commit.

This also fixes tdf#129085 and all the duplicates, which were
introduced by the follow-up commit.

I plan to add the unittests in a different commit

Change-Id: Ie4328c15b24b521127c1b653bd621bfc92ac39cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112340
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112398
Reviewed-by: Armin Le Grand 

diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 8bf008297233..f6fc53990bee 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -974,59 +974,9 @@ void paintGraphicUsingPrimitivesHelper(
 
 if(0 != aClip.count())
 {
-// tdf#114076: Expand ClipRange to next PixelBound
-// Do this by going to basegfx::B2DRange, adding a
-// single pixel size and using floor/ceil to go to
-// full integer (as needed for pixels). Also need
-// to go back to basegfx::B2DPolyPolygon for the
-// creation of the needed MaskPrimitive2D.
-// The general problem is that Writer is scrolling
-// using blitting the unchanged parts, this forces
-// this part of the scroll to pixel coordinate steps,
-// while the ViewTransformation for paint nowadays has
-// a sub-pixel precision. This results in an offset
-// up to one pixel in radius. To solve this for now,
-// we need to expand to the next outer pixel bound.
-// Hopefully in the future we will someday be able to
-// stay on the full available precision, but this
-// will need a change in the repaint/scroll paradigm.
-const basegfx::B2DRange aClipRange(aClip.getB2DRange());
-const basegfx::B2DVector 
aSinglePixelXY(rOutputDevice.GetInverseViewTransformation() * 
basegfx::B2DVector(1.0, 1.0));
-const basegfx::B2DRange aExpandedClipRange(
-floor(aClipRange.getMinX() - aSinglePixelXY.getX()),
-floor(aClipRange.getMinY() - aSinglePixelXY.getY()),
-ceil(aClipRange.getMaxX() + aSinglePixelXY.getX()),
-ceil(aClipRange.getMaxY() + aSinglePixelXY.getY()));
-
-// create the enclosing rectangle as polygon
-basegfx::B2DPolyPolygon 
aTarget(basegfx::utils::createPolygonFromRect(aExpandedClipRange));
-
-// tdf#124272 the fix above (tdf#114076) was too rough - the
-// clip region used may be a PolyPolygon. In that case that
-// PolyPolygon would have to be scaled to mentioned PixelBounds.
-// Since that is not really possible geometrically (would need
-// more some 'grow in outside direction' but with unequal grow
-// values in all directions - just maaany problems
-// involved), use a graphical trick: The topology of the
-// PolyPolygon uses the standard FillRule, so adding the now
-// guaranteed to be bigger or equal bounding (enclosing)
-// rectangle twice as polygon will expand the BoundRange, but
-// not change the geometry visualization at all
-if(!rOutputDevice.GetClipRegion().IsRectangle())
-{
-// double the outer rectangle range polygon to have it
-// included twice
-aTarget.append(aTarget.getB2DPolygon(0));
-
-// add the original clip 'inside' (due to being smaller
-// or equal). That PolyPolygon may have an unknown number
-// of polygons (>=1)
-aTarget.append(aClip);
-}
-
 drawinglayer::primitive2d::MaskPrimitive2D* pNew(
 new drawinglayer::primitive2d::MaskPrimitive2D(
-aTarget

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

2021-03-16 Thread Eike Rathke (via logerrit)
 svl/source/numbers/zformat.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 9b6805db873b26a22eda8cd35d6553e463775324
Author: Eike Rathke 
AuthorDate: Mon Mar 15 15:49:55 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Mar 16 17:56:58 2021 +0100

xls save: fix writing inline calendar modifiers as format code, don't

E.g. ja-JP
  GGGE [~gregorian]
saved as OOXML ended up as
  [$-411]ggge\ gregorian
which when reloaded became
  GGGE GREGoRian
displaying
  令和3 R033Ro03ian2021
(whatever Xcl might have done with that).

Change-Id: If8a7d5b837b69c32afacc7a8d7646fedc84ab87a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112510
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 3e73d3475711b790cc80b9a286c5d454f3929384)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112519
Reviewed-by: Caolán McNamara 

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 92e62e87aeae..6402aa7f5dbc 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -5309,6 +5309,8 @@ OUString SvNumberformat::GetMappedFormatstring( const 
NfKeywordTable& rKeywords,
 }
 break;
 case NF_SYMBOLTYPE_CALDEL :
+if (j + 1 >= nCnt)
+break;
 if ( rStrArray[j+1] == "gengou" )
 {
 nCalendarID = 0x003;
@@ -5325,9 +5327,10 @@ OUString SvNumberformat::GetMappedFormatstring( const 
NfKeywordTable& rKeywords,
 {
 nCalendarID = 0x008;
 }
-// other calendars (see tdf#36038) not corresponding 
between LibO and XL
-if ( nCalendarID > 0 )
-j = j+2;
+// Other calendars (see tdf#36038) not corresponding 
between LibO and XL.
+// However, skip any calendar modifier and don't write
+// as format code (if not as literal string).
+j += 2;
 break;
 case NF_SYMBOLTYPE_CURREXT :
 nPosHaveLCID = aStr.getLength();
___
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 distro-configs/LibreOfficeiOS.conf external/pdfium

2021-03-16 Thread Tor Lillqvist (via logerrit)
 configure.ac |2 +-
 distro-configs/LibreOfficeiOS.conf   |2 +-
 external/pdfium/Library_pdfium.mk|   14 ++
 external/pdfium/UnpackedTarball_pdfium.mk|2 ++
 external/pdfium/cg-instead-of-carbon.patch.1 |   13 +
 5 files changed, 31 insertions(+), 2 deletions(-)

New commits:
commit 8bf542a13aa7272e36462ac6000a13b3a018083f
Author: Tor Lillqvist 
AuthorDate: Tue Mar 16 12:21:44 2021 +0200
Commit: Tor Lillqvist 
CommitDate: Tue Mar 16 19:34:19 2021 +0100

Do build Pdfium for iOS, too

For it to compile, the inclusion of  had to be
replaced with .

This fixes the crash in
https://github.com/CollaboraOnline/online/issues/1710 . I am not
entirely sure yet whether the actual PDF import functionality now then
works in the iOS app, though.

Change-Id: Ie25e7c58632c0fdddb569d58217f23b26d1e5937
Signed-off-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112572
Tested-by: Jenkins CollaboraOffice 

diff --git a/configure.ac b/configure.ac
index bca3825a31ab..e36325456c82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10994,7 +10994,7 @@ AC_SUBST([ENABLE_DCONF])
 # pdf import?
 AC_MSG_CHECKING([whether to build the PDF import feature])
 ENABLE_PDFIMPORT=
-if test $_os != Android -a $_os != iOS -a \( -z "$enable_pdfimport" -o 
"$enable_pdfimport" = yes \); then
+if test $_os != Android -a \( -z "$enable_pdfimport" -o "$enable_pdfimport" = 
yes \); then
 AC_MSG_RESULT([yes])
 ENABLE_PDFIMPORT=TRUE
 AC_DEFINE(HAVE_FEATURE_PDFIMPORT)
diff --git a/distro-configs/LibreOfficeiOS.conf 
b/distro-configs/LibreOfficeiOS.conf
index 33471127e14f..c08cb87ce920 100644
--- a/distro-configs/LibreOfficeiOS.conf
+++ b/distro-configs/LibreOfficeiOS.conf
@@ -22,7 +22,7 @@
 --disable-kf5
 --disable-odk
 --disable-openssl
---disable-pdfium
+--disable-poppler
 --disable-python
 
 --without-tls
diff --git a/external/pdfium/Library_pdfium.mk 
b/external/pdfium/Library_pdfium.mk
index f08ff51a31a3..900c21b349b5 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -670,6 +670,20 @@ $(eval $(call 
gb_Library_use_system_darwin_frameworks,pdfium,\
 ))
 endif
 
+ifeq ($(OS),iOS)
+# fxge
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+UnpackedTarball/pdfium/core/fxge/apple/fx_apple_platform \
+UnpackedTarball/pdfium/core/fxge/apple/fx_mac_impl \
+UnpackedTarball/pdfium/core/fxge/apple/fx_quartz_device \
+))
+
+$(eval $(call gb_Library_use_system_darwin_frameworks,pdfium,\
+CoreGraphics \
+CoreFoundation \
+))
+endif
+
 ifeq ($(OS),ANDROID)
 # fxge
 $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
diff --git a/external/pdfium/UnpackedTarball_pdfium.mk 
b/external/pdfium/UnpackedTarball_pdfium.mk
index f4643376cee0..f1b02473a062 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -14,6 +14,8 @@ pdfium_patches += build.patch.1
 # Avoids Windows 8 build dependency.
 pdfium_patches += windows7.patch.1
 pdfium_patches += c++20-comparison.patch
+# Use CoreGraphics.h instead of Carbon.h
+pdfium_patches += cg-instead-of-carbon.patch.1
 
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium))
 
diff --git a/external/pdfium/cg-instead-of-carbon.patch.1 
b/external/pdfium/cg-instead-of-carbon.patch.1
new file mode 100644
index ..bd29af1b95c2
--- /dev/null
+++ b/external/pdfium/cg-instead-of-carbon.patch.1
@@ -0,0 +1,13 @@
+-*- Mode: Diff -*-
+--- a/core/fxge/apple/fx_quartz_device.h
 b/core/fxge/apple/fx_quartz_device.h
+@@ -7,7 +7,7 @@
+ #ifndef CORE_FXGE_APPLE_FX_QUARTZ_DEVICE_H_
+ #define CORE_FXGE_APPLE_FX_QUARTZ_DEVICE_H_
+ 
+-#include 
++#include 
+ 
+ #include "core/fxcrt/fx_system.h"
+ #include "core/fxge/cfx_gemodule.h"
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Solved] Need help for unit test

2021-03-16 Thread Regina Henschel

Regina Henschel schrieb am 16.03.2021 um 02:58:

Hi all,

and again I need help for making a unit test.

My idea for unit test for https://gerrit.libreoffice.org/c/core/+/112474 
is to load a document with a custom shape in 3D mode. It has extrusion 
direction "Extrusion Backwards", which means, that no side faces are 
visible.
Then I want let a DrawViewShell execute a request with 
SID_EXTRUSION_DIRECTION. That should show a side face and I can examine 
whether the BoundRect has the correct height.


I have now used svx::ExtrusionBar directly in customshapes.cxx in 
svx/qa/unit instead of DrawViewShell.


Kind regards
Regina
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-03-16 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/executor.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 719184cfc844562b498d76d606163dd51b8738b4
Author: Szymon Kłos 
AuthorDate: Mon Mar 15 16:23:48 2021 +0100
Commit: Andras Timar 
CommitDate: Tue Mar 16 21:30:27 2021 +0100

jsdialog: simplify unselect for treeview

Change-Id: Iaadd8122d735103d89e4acb65bef1ca8c1ad2e1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112532
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index aa71178a6605..16096c6dcf01 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -243,9 +243,7 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 OString nRowString
 = OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US);
 
-std::unique_ptr 
itSelected(pTreeView->make_iterator());
-pTreeView->get_selected(itSelected.get());
-pTreeView->unselect(*itSelected);
+pTreeView->unselect_all();
 
 int nAbsPos = std::atoi(nRowString.getStr());
 
@@ -262,7 +260,7 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 = OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US);
 int nRow = std::atoi(nRowString.getStr());
 
-pTreeView->unselect(pTreeView->get_selected_index());
+pTreeView->unselect_all();
 pTreeView->select(nRow);
 pTreeView->set_cursor(nRow);
 LOKTrigger::trigger_changed(*pTreeView);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Caolán McNamara (via logerrit)
 include/vcl/weld.hxx  |2 ++
 vcl/inc/salvtables.hxx|1 +
 vcl/source/app/salvtables.cxx |9 +
 vcl/unx/gtk3/gtk3gtkinst.cxx  |   34 ++
 4 files changed, 42 insertions(+), 4 deletions(-)

New commits:
commit 5aef0085cadb03c5c6b64747cf0ea76657a3a2ca
Author: Caolán McNamara 
AuthorDate: Tue Mar 16 12:56:42 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Mar 16 21:38:23 2021 +0100

enable grabbing focus to an unspecified container child

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

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 1fc18c85fb65..46ae951f3b94 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -346,6 +346,8 @@ public:
 {
 m_aContainerFocusChangedHdl = rLink;
 }
+// causes a child of the container to have the keyboard focus
+virtual void child_grab_focus() = 0;
 };
 
 class VCL_DLLPUBLIC Box : virtual public Container
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index efec58258868..88bda40618b6 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -419,6 +419,7 @@ public:
  bool bTakeOwnership);
 virtual void HandleEventListener(VclWindowEvent& rEvent) override;
 virtual void connect_container_focus_changed(const Link& 
rLink) override;
+virtual void child_grab_focus() override;
 virtual void move(weld::Widget* pWidget, weld::Container* pNewParent) 
override;
 virtual void recursively_unset_default_buttons() override;
 virtual css::uno::Reference CreateChildFrame() override;
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 2a0009446132..7d309a7ebe13 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1189,6 +1189,15 @@ void SalInstanceContainer::move(weld::Widget* pWidget, 
weld::Container* pNewPare
 pVclWidget->getWidget()->SetParentToDefaultWindow();
 }
 
+void SalInstanceContainer::child_grab_focus()
+{
+disable_notify_events();
+m_xContainer->GrabFocus();
+if (vcl::Window* pFirstChild = m_xContainer->ImplGetDlgWindow(0, 
GetDlgWindowType::First))
+pFirstChild->ImplControlFocus();
+enable_notify_events();
+}
+
 void SalInstanceContainer::recursively_unset_default_buttons()
 {
 implResetDefault(m_xContainer.get());
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index d15ee5d5a7e8..fc958c780f18 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3817,6 +3817,27 @@ public:
 
 GtkContainer* getContainer() { return m_pContainer; }
 
+virtual void child_grab_focus() override
+{
+disable_notify_events();
+gtk_widget_grab_focus(m_pWidget);
+bool bHasFocusChild = gtk_container_get_focus_child(m_pContainer);
+if (!bHasFocusChild)
+{
+GList* pChildren = gtk_container_get_children(m_pContainer);
+for (GList* pChild = g_list_first(pChildren); pChild; pChild = 
g_list_next(pChild))
+{
+gtk_container_set_focus_child(m_pContainer, 
static_cast(pChild->data));
+bHasFocusChild = true;
+break;
+}
+g_list_free(pChildren);
+}
+if (bHasFocusChild)
+
gtk_widget_child_focus(gtk_container_get_focus_child(GTK_CONTAINER(m_pWidget)), 
GTK_DIR_TAB_FORWARD);
+enable_notify_events();
+}
+
 virtual void move(weld::Widget* pWidget, weld::Container* pNewParent) 
override
 {
 GtkInstanceWidget* pGtkWidget = 
dynamic_cast(pWidget);
@@ -8897,12 +8918,17 @@ public:
 {
 disable_notify_events();
 gtk_widget_grab_focus(m_pWidget);
-if (!gtk_container_get_focus_child(GTK_CONTAINER(m_pWidget)))
+bool bHasFocusChild = 
gtk_container_get_focus_child(GTK_CONTAINER(m_pWidget));
+if (!bHasFocusChild)
 {
-GtkToolItem* pItem = gtk_toolbar_get_nth_item(m_pToolbar, 0);
-gtk_container_set_focus_child(GTK_CONTAINER(m_pWidget), 
GTK_WIDGET(pItem));
+if (GtkToolItem* pItem = gtk_toolbar_get_nth_item(m_pToolbar, 0))
+{
+gtk_container_set_focus_child(GTK_CONTAINER(m_pWidget), 
GTK_WIDGET(pItem));
+bHasFocusChild = true;
+}
 }
-
gtk_widget_child_focus(gtk_container_get_focus_child(GTK_CONTAINER(m_pWidget)), 
GTK_DIR_TAB_FORWARD);
+if (bHasFocusChild)
+
gtk_widget_child_focus(gtk_container_get_focus_child(GTK_CONTAINER(m_pWidget)), 
GTK_DIR_TAB_FORWARD);
 enable_notify_events();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffi

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

2021-03-16 Thread Xisco Fauli (via logerrit)
 sw/source/core/doc/notxtfrm.cxx |   52 
 1 file changed, 1 insertion(+), 51 deletions(-)

New commits:
commit cf453e399c94f3af49a614c266f7c2e9a1ad45fa
Author: Xisco Fauli 
AuthorDate: Thu Mar 11 12:42:47 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Mar 16 21:39:33 2021 +0100

Revert "tdf#114076: Expand ClipRange to next PixelBound" ...

and "tdf#124272 use ClipRegion's geometry if not a rectangle"

This commit reverts c1230cede19ae3633e51c7ca780cb34d9dbaa20f
and 362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c

tdf#114076, or any of its duplicates, is not reproducible in master
if c1230cede19ae3633e51c7ca780cb34d9dbaa20f
("tdf#114076: Expand ClipRange to next PixelBound") is reverted.
(Tested on Linux and Windows)
So, if we revert it, we no longer need
362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c
("tdf#124272 use ClipRegion's geometry if not a rectangle"), which
was a follow-up fix for a regression introduced by the first commit.

This also fixes tdf#129085 and all the duplicates, which were
introduced by the follow-up commit.

I plan to add the unittests in a different commit

Change-Id: Ie4328c15b24b521127c1b653bd621bfc92ac39cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112340
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112398
Reviewed-by: Armin Le Grand 
(cherry picked from commit 8926d9282fe84793ce909471b5caec3583fd3ec9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112530
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 550f0df508db..291608431bfa 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -982,59 +982,9 @@ void paintGraphicUsingPrimitivesHelper(
 
 if(0 != aClip.count())
 {
-// tdf#114076: Expand ClipRange to next PixelBound
-// Do this by going to basegfx::B2DRange, adding a
-// single pixel size and using floor/ceil to go to
-// full integer (as needed for pixels). Also need
-// to go back to basegfx::B2DPolyPolygon for the
-// creation of the needed MaskPrimitive2D.
-// The general problem is that Writer is scrolling
-// using blitting the unchanged parts, this forces
-// this part of the scroll to pixel coordinate steps,
-// while the ViewTransformation for paint nowadays has
-// a sub-pixel precision. This results in an offset
-// up to one pixel in radius. To solve this for now,
-// we need to expand to the next outer pixel bound.
-// Hopefully in the future we will someday be able to
-// stay on the full available precision, but this
-// will need a change in the repaint/scroll paradigm.
-const basegfx::B2DRange aClipRange(aClip.getB2DRange());
-const basegfx::B2DVector 
aSinglePixelXY(rOutputDevice.GetInverseViewTransformation() * 
basegfx::B2DVector(1.0, 1.0));
-const basegfx::B2DRange aExpandedClipRange(
-floor(aClipRange.getMinX() - aSinglePixelXY.getX()),
-floor(aClipRange.getMinY() - aSinglePixelXY.getY()),
-ceil(aClipRange.getMaxX() + aSinglePixelXY.getX()),
-ceil(aClipRange.getMaxY() + aSinglePixelXY.getY()));
-
-// create the enclosing rectangle as polygon
-basegfx::B2DPolyPolygon 
aTarget(basegfx::utils::createPolygonFromRect(aExpandedClipRange));
-
-// tdf#124272 the fix above (tdf#114076) was too rough - the
-// clip region used may be a PolyPolygon. In that case that
-// PolyPolygon would have to be scaled to mentioned PixelBounds.
-// Since that is not really possible geometrically (would need
-// more some 'grow in outside direction' but with unequal grow
-// values in all directions - just maaany problems
-// involved), use a graphical trick: The topology of the
-// PolyPolygon uses the standard FillRule, so adding the now
-// guaranteed to be bigger or equal bounding (enclosing)
-// rectangle twice as polygon will expand the BoundRange, but
-// not change the geometry visualization at all
-if(!rOutputDevice.GetClipRegion().IsRectangle())
-{
-// double the outer rectangle range polygon to have it
-// included twice
-aTarget.append(aTarget.getB2DPolygon(0));
-
-// add the original clip 'inside' (due to being smaller
-// or equal). That PolyPolygon may have an unknown number
-// of polygons (>=1)
-aTarget.append(aClip);
- 

[Libreoffice-commits] core.git: Changes to 'private/timar/pythonupgrademsp'

2021-03-16 Thread Andras Timar (via logerrit)
New branch 'private/timar/pythonupgrademsp' available with the following 
commits:
commit 71ec50308467ef9371663d1be251ccb9c8e862b9
Author: Andras Timar 
Date:   Tue Mar 16 21:56:04 2021 +0100

we have to keep the original python version number 3.7.7

because MSP creation does not tolerate adding/removing files, or
remaming directories

Change-Id: Ib997d438add82652d570753a749170f207dc3a80

commit 055b815dbe3769e33fab6d69eb8ce80bc2321285
Author: Michael Stahl 
Date:   Wed Feb 17 13:56:52 2021 +0100

python3: upgrade to release 3.7.10

Fixes CVE-2021-3177 plus these less important ones:
CVE-2021-23336 CVE-2020-27619 CVE-2020-14422 CVE-2020-26116
CVE-2019-20907 CVE-2020-8492 CVE-2019-18348

Change-Id: I8e83395bd3e871eb2ed030a03827b7d261c96049

commit 1bdba93ee984f004f2b26e15e2e6ee223028c91d
Author: Caolán McNamara 
Date:   Mon Feb 8 17:05:28 2021 +

default to CertificateValidity::INVALID

so if CertGetCertificateChain fails we don't want validity to be
css::security::CertificateValidity::VALID which is what the old default
of 0 equates to

notably

commit 1e0bc66d16aee28ce8bd9582ea32178c63841902
Date:   Thu Nov 5 16:55:26 2009 +0100

jl137:  #103420# better logging

turned the nss equivalent of SecurityEnvironment_NssImpl::verifyCertificate
from 0 to CertificateValidity::INVALID like this change does

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

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Unit Tests failing when built with clang 12

2021-03-16 Thread slacka
Yes, I just verified that you'll need an --enable-optimized build to
reproduce this failure. When I built with clang 12 + --enable-debug, all
unit tests passed. 



--
Sent from: 
http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-03-16 Thread Regina Henschel (via logerrit)
 svx/CppunitTest_svx_unit.mk   |1 
 svx/qa/unit/customshapes.cxx  |   37 ++
 svx/qa/unit/data/tdf141021_ExtrusionNorth.odp |binary
 svx/source/toolbars/extrusionbar.cxx  |2 -
 4 files changed, 39 insertions(+), 1 deletion(-)

New commits:
commit fa8d00560bbfededec7f2c328f04eb2b369c00e2
Author: Regina Henschel 
AuthorDate: Sun Mar 14 16:26:22 2021 +0100
Commit: Regina Henschel 
CommitDate: Wed Mar 17 00:06:57 2021 +0100

tdf#141021 Correct sign in Origin in Extrusion North

This is about customs shapes in 3D mode using direction floater.
Shapes, which were created with older versions, keep their values until
the direction is newly assigned. So the change will not automatically
change existing documents.

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

diff --git a/svx/CppunitTest_svx_unit.mk b/svx/CppunitTest_svx_unit.mk
index 892490265261..598d788392b4 100644
--- a/svx/CppunitTest_svx_unit.mk
+++ b/svx/CppunitTest_svx_unit.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_CppunitTest_use_libraries,svx_unit, \
editeng \
sal \
sfx \
+svl \
svxcore \
svx \
tl \
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 271a7aad6f19..4e3f76db74ec 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -18,9 +18,16 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
 #include 
+#include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -120,6 +127,36 @@ void lcl_AssertRectEqualWithTolerance(std::string_view 
sInfo, const tools::Recta
std::abs(rExpected.GetHeight() - 
rActual.GetHeight()) <= nTolerance);
 }
 
+CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf141021ExtrusionNorth)
+{
+// tdf#141021 Setting extrusion direction in projection method 
'perspective' to
+// 'Extrusion North' had used a wrong origin for the ViewPoint and thus the
+// side faces were wrong calculated.
+
+// Load document and get shape. It is a custom shape in 3D mode.
+OUString aURL = m_directories.getURLFromSrc(sDataDirectory) + 
"tdf141021_ExtrusionNorth.odp";
+mxComponent = loadFromDesktop(aURL, 
"com.sun.star.comp.presentation.PresentationDocument");
+CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is());
+uno::Reference xShape(getShape(0));
+SdrObjCustomShape& rSdrCustomShape(
+static_cast(*GetSdrObjectFromXShape(xShape)));
+
+// Mark Object
+SfxViewShell* pViewShell = SfxViewShell::Current();
+SdrView* pSdrView = pViewShell->GetDrawView();
+pSdrView->MarkObj(&rSdrCustomShape, pSdrView->GetSdrPageView());
+
+// Set direction
+SfxRequest aReq(pViewShell->GetViewFrame(), SID_EXTRUSION_DIRECTION);
+SfxInt32Item aItem(SID_EXTRUSION_DIRECTION, 90);
+aReq.AppendItem(aItem);
+svx::ExtrusionBar::execute(pSdrView, aReq, 
SfxViewFrame::Current()->GetBindings());
+
+// Verify height. Without the fix in place the height would 4001.
+tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect());
+CPPUNIT_ASSERT_EQUAL(tools::Long(5895), aBoundRect.GetHeight());
+}
+
 CPPUNIT_TEST_FIXTURE(CustomshapesTest, testResizeRotatedShape)
 {
 // tdf#138945 Setting width or height for a rotated or sheared shape in 
the Position&Size dialog
diff --git a/svx/qa/unit/data/tdf141021_ExtrusionNorth.odp 
b/svx/qa/unit/data/tdf141021_ExtrusionNorth.odp
new file mode 100644
index ..559b2c0d58e0
Binary files /dev/null and b/svx/qa/unit/data/tdf141021_ExtrusionNorth.odp 
differ
diff --git a/svx/source/toolbars/extrusionbar.cxx 
b/svx/source/toolbars/extrusionbar.cxx
index 011da2175e93..82d42ddb81ef 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -197,7 +197,7 @@ static void impl_execute( SfxRequest const & rReq, 
SdrCustomShapeGeometryItem& r
 aViewPoint.PositionX = 0;
 aViewPoint.PositionY = 3472;
 fOriginX = 0;
-fOriginY = -0.50;
+fOriginY = 0.50;
 break;
 case 45:
 aViewPoint.PositionX = -3472;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-16 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/DocumentModelTreeHandler.cxx |  426 --
 1 file changed, 246 insertions(+), 180 deletions(-)

New commits:
commit 8ba384f47a26404a6b81390095e10d793e4b218c
Author: Tomaž Vajngerl 
AuthorDate: Tue Mar 16 22:30:15 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed Mar 17 00:26:49 2021 +0100

devtools: change DocumentModelTreeEntry to do expanding and name

This changes DocumentModelTreeEntry and its subclasses to handle
when to show the expander on the tree view and when not, and to
hold the string of the tree view node, which is passed as a
input parameter. This simplifies the code and makes it easier
to handle. Most of the ideas are from ObjectInspectorNodeInterface
and it subclasses, where this works really good.

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

diff --git a/sfx2/source/devtools/DocumentModelTreeHandler.cxx 
b/sfx2/source/devtools/DocumentModelTreeHandler.cxx
index 6216feb34ec1..047b1d97b19d 100644
--- a/sfx2/source/devtools/DocumentModelTreeHandler.cxx
+++ b/sfx2/source/devtools/DocumentModelTreeHandler.cxx
@@ -42,24 +42,6 @@ using namespace css;
 
 namespace
 {
-class DocumentModelTreeEntry;
-
-void lclAppendToParentEntry(std::unique_ptr& rTree, 
weld::TreeIter const& rParent,
-OUString const& rString, DocumentModelTreeEntry* 
pEntry,
-bool bChildrenOnDemand = false)
-{
-OUString sId(OUString::number(reinterpret_cast(pEntry)));
-rTree->insert(&rParent, -1, &rString, &sId, nullptr, nullptr, 
bChildrenOnDemand, nullptr);
-}
-
-OUString lclAppend(std::unique_ptr& rTree, OUString const& 
rString,
-   DocumentModelTreeEntry* pEntry, bool bChildrenOnDemand = 
false)
-{
-OUString sId(OUString::number(reinterpret_cast(pEntry)));
-rTree->insert(nullptr, -1, &rString, &sId, nullptr, nullptr, 
bChildrenOnDemand, nullptr);
-return sId;
-}
-
 // returns a name of the object, if available
 OUString lclGetNamed(uno::Reference const& xObject)
 {
@@ -77,18 +59,28 @@ OUString lclGetNamed(uno::Reference const& 
xObject)
  */
 class DocumentModelTreeEntry
 {
-public:
+protected:
+OUString maString;
 css::uno::Reference mxObject;
 
+public:
 DocumentModelTreeEntry() = default;
 
-DocumentModelTreeEntry(css::uno::Reference const& 
xObject)
-: mxObject(xObject)
+DocumentModelTreeEntry(OUString const& rString,
+   css::uno::Reference const& 
xObject)
+: maString(rString)
+, mxObject(xObject)
 {
 }
 
 virtual ~DocumentModelTreeEntry() {}
 
+/// the node string shown in the tree view
+virtual OUString& getString() { return maString; }
+
+/// should show the expander for the tree view node
+virtual bool shouldShowExpander() { return false; }
+
 /// The main UNO object for this entry
 virtual css::uno::Reference getMainObject() { return 
mxObject; }
 
@@ -97,13 +89,46 @@ public:
   weld::TreeIter const& /*rParent*/)
 {
 }
+};
+
+void lclAppendToParentEntry(std::unique_ptr& rTree, 
weld::TreeIter const& rParent,
+DocumentModelTreeEntry* pEntry)
+{
+OUString sId(OUString::number(reinterpret_cast(pEntry)));
+OUString const& rString = pEntry->getString();
+rTree->insert(&rParent, -1, &rString, &sId, nullptr, nullptr, 
pEntry->shouldShowExpander(),
+  nullptr);
+}
 
+OUString lclAppend(std::unique_ptr& rTree, 
DocumentModelTreeEntry* pEntry)
+{
+OUString sId(OUString::number(reinterpret_cast(pEntry)));
+OUString const& rString = pEntry->getString();
+rTree->insert(nullptr, -1, &rString, &sId, nullptr, nullptr, 
pEntry->shouldShowExpander(),
+  nullptr);
+return sId;
+}
+
+class NameAccessTreeEntry : public DocumentModelTreeEntry
+{
 protected:
+NameAccessTreeEntry(OUString const& rString, 
uno::Reference const& xObject)
+: DocumentModelTreeEntry(rString, xObject)
+{
+}
+
+bool shouldShowExpander() override
+{
+uno::Reference xNameAccess(getMainObject(), 
uno::UNO_QUERY);
+return xNameAccess.is() && xNameAccess->getElementNames().getLength() 
> 0;
+}
+
 /// A generic fill when the UNO object implements XNameAccess interface
-void fillNameAccess(std::unique_ptr& pDocumentModelTree,
-weld::TreeIter const& rParent)
+void fill(std::unique_ptr& pDocumentModelTree,
+  weld::TreeIter const& rParent) override
 {
 uno::Reference xNameAccess(getMainObject(), 
uno::UNO_QUERY);
+xNameAccess.set(getMainObject(), uno::UNO_QUERY);
 if (!xNameAccess.is())
 return;
 
@@ -111,8 +136,8 @@ protected:
 for (auto const& rName : aNames)
 {
 uno::Reference 
xObject(xN

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

2021-03-16 Thread Tomaž Vajngerl (via logerrit)
 include/sfx2/devtools/DevelopmentToolDockingWindow.hxx |2 
 include/sfx2/devtools/DocumentModelTreeHandler.hxx |3 +
 sfx2/source/devtools/DevelopmentToolDockingWindow.cxx  |   14 -
 sfx2/source/devtools/DocumentModelTreeHandler.cxx  |   14 +
 sfx2/uiconfig/ui/developmenttool.ui|   47 +++--
 5 files changed, 74 insertions(+), 6 deletions(-)

New commits:
commit a873ef61534353df3251dd879f8deabde9295145
Author: Tomaž Vajngerl 
AuthorDate: Tue Mar 16 23:12:51 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed Mar 17 00:27:11 2021 +0100

devtools: add refresh button for the DocumentObjectTreeView

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

diff --git a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx 
b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
index 1c4826f975f6..171ff96ad5fb 100644
--- a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
+++ b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
@@ -38,6 +38,7 @@ private:
 std::unique_ptr mpObjectInspectorWidgets;
 std::unique_ptr mpDocumentModelTreeView;
 std::unique_ptr mpSelectionToggle;
+std::unique_ptr mpDomToolbar;
 
 // Reference to the root object for the current document
 css::uno::Reference mxRoot;
@@ -53,6 +54,7 @@ private:
 
 DECL_LINK(DocumentModelTreeViewSelectionHandler, weld::TreeView&, void);
 DECL_LINK(SelectionToggled, weld::ToggleButton&, void);
+DECL_LINK(DomToolbarButtonClicked, const OString&, void);
 
 void updateSelection();
 
diff --git a/include/sfx2/devtools/DocumentModelTreeHandler.hxx 
b/include/sfx2/devtools/DocumentModelTreeHandler.hxx
index 17b853b36c6f..c63986ad1476 100644
--- a/include/sfx2/devtools/DocumentModelTreeHandler.hxx
+++ b/include/sfx2/devtools/DocumentModelTreeHandler.hxx
@@ -33,6 +33,9 @@ private:
 // identified by the input tree iter.
 void clearChildren(weld::TreeIter const& rParent);
 
+// Clear all tree view nodes.
+void clearAll();
+
 public:
 DocumentModelTreeHandler(std::unique_ptr& 
pDocumentModelTree,
  css::uno::Reference const& 
xDocument);
diff --git a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx 
b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
index 6fcbcc68812d..32ef347eded7 100644
--- a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
+++ b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
@@ -29,7 +29,8 @@ 
DevelopmentToolDockingWindow::DevelopmentToolDockingWindow(SfxBindings* pInputBi
"sfx/ui/developmenttool.ui")
 , mpObjectInspectorWidgets(new ObjectInspectorWidgets(m_xBuilder))
 , 
mpDocumentModelTreeView(m_xBuilder->weld_tree_view("leftside_treeview_id"))
-, mpSelectionToggle(m_xBuilder->weld_toggle_button("selection_toggle"))
+, mpSelectionToggle(m_xBuilder->weld_toggle_button("dom_selection_toggle"))
+, mpDomToolbar(m_xBuilder->weld_toolbar("dom_toolbar"))
 , maDocumentModelTreeHandler(
   mpDocumentModelTreeView,
   
pInputBindings->GetDispatcher()->GetFrame()->GetObjectShell()->GetBaseModel())
@@ -38,6 +39,8 @@ 
DevelopmentToolDockingWindow::DevelopmentToolDockingWindow(SfxBindings* pInputBi
 mpDocumentModelTreeView->connect_changed(
 LINK(this, DevelopmentToolDockingWindow, 
DocumentModelTreeViewSelectionHandler));
 mpSelectionToggle->connect_toggled(LINK(this, 
DevelopmentToolDockingWindow, SelectionToggled));
+mpDomToolbar->connect_clicked(
+LINK(this, DevelopmentToolDockingWindow, DomToolbarButtonClicked));
 
 auto* pViewFrame = pInputBindings->GetDispatcher()->GetFrame();
 
@@ -69,6 +72,14 @@ IMPL_LINK_NOARG(DevelopmentToolDockingWindow, 
SelectionToggled, weld::ToggleButt
 updateSelection();
 }
 
+IMPL_LINK(DevelopmentToolDockingWindow, DomToolbarButtonClicked, const 
OString&, rSelectionId, void)
+{
+if (rSelectionId == "dom_refresh_button")
+{
+maDocumentModelTreeHandler.inspectDocument();
+}
+}
+
 DevelopmentToolDockingWindow::~DevelopmentToolDockingWindow() { disposeOnce(); 
}
 
 void DevelopmentToolDockingWindow::dispose()
@@ -86,6 +97,7 @@ void DevelopmentToolDockingWindow::dispose()
 // dispose welded objects
 mpObjectInspectorWidgets.reset();
 mpSelectionToggle.reset();
+mpDomToolbar.reset();
 mpDocumentModelTreeView.reset();
 
 SfxDockingWindow::dispose();
diff --git a/sfx2/source/devtools/DocumentModelTreeHandler.cxx 
b/sfx2/source/devtools/DocumentModelTreeHandler.cxx
index 047b1d97b19d..7645fc327686 100644
--- a/sfx2/source/devtools/DocumentModelTreeHandler.cxx
+++ b/sfx2/source/devtools/DocumentModelTreeHandler.cxx
@@ -719,6 +719,18 @@ uno::Reference 
DocumentModelTreeHandler::getObjectByID(OUString
 return pEntry->getMainObject();
 }
 
+void DocumentModelTreeHandler::clearAll()
+{
+

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

2021-03-16 Thread Noel Grandin (via logerrit)
 vcl/source/app/salusereventlist.cxx |   30 --
 1 file changed, 8 insertions(+), 22 deletions(-)

New commits:
commit 4e8a4d9ceda1f5931a8a086b175793c81b715b58
Author: Noel Grandin 
AuthorDate: Tue Mar 16 18:39:49 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 17 07:40:31 2021 +0100

use noexcept lambda in DispatchUserEvents to improve debugging

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

diff --git a/vcl/source/app/salusereventlist.cxx 
b/vcl/source/app/salusereventlist.cxx
index 0321fc29e9fd..309e66bafc29 100644
--- a/vcl/source/app/salusereventlist.cxx
+++ b/vcl/source/app/salusereventlist.cxx
@@ -110,28 +110,14 @@ bool SalUserEventList::DispatchUserEvents( bool 
bHandleAllCurrentEvents )
 *   which is do-able, but requires writing some assembly.
 * See also Scheduler::ProcessTaskScheduling
 */
-#ifndef IOS
-try
-#endif
-{
-ProcessEvent( aEvent );
-}
-#ifndef IOS
-catch (css::uno::Exception&)
-{
-TOOLS_WARN_EXCEPTION("vcl", "Uncaught");
-std::abort();
-}
-catch (std::exception& e)
-{
-SAL_WARN("vcl", "Uncaught " << typeid(e).name() << " " << 
e.what());
-std::abort();
-}
-catch (...)
-{
-SAL_WARN("vcl", "Uncaught exception during 
DispatchUserEvents!");
-std::abort();
-}
+#ifdef IOS
+ProcessEvent( aEvent );
+#else
+// the noexcept here means that (a) we abort and (b) debuggers will
+// likely trigger at the throw site instead of here, making the 
debugging
+// experience better when something goes wrong.
+auto process = [&aEvent, this] () noexcept { ProcessEvent(aEvent); 
};
+process();
 #endif
 aResettableListGuard.reset();
 if (!bHandleAllCurrentEvents)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits