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

2021-03-30 Thread Miklos Vajna (via logerrit)
 sd/qa/unit/SdrPdfImportTest.cxx   |   31 ++---
 sd/qa/unit/export-tests.cxx   |   10 +++-
 sd/qa/unit/import-tests.cxx   |   14 +++---
 sd/qa/unit/tiledrendering/LOKitSearchTest.cxx |   60 ++
 4 files changed, 73 insertions(+), 42 deletions(-)

New commits:
commit 1fcc3d13d624b2a97f54063d7ffce13254b06373
Author: Miklos Vajna 
AuthorDate: Tue Mar 30 21:13:13 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Mar 31 08:58:01 2021 +0200

sd: clean up not needed HAVE_FEATURE_PDFIUM ifdefs

Towards completely avoiding the HAVE_FEATURE_PDFIUM ifdef forest.

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

diff --git a/sd/qa/unit/SdrPdfImportTest.cxx b/sd/qa/unit/SdrPdfImportTest.cxx
index abf68b8f8676..39d8f74fca54 100644
--- a/sd/qa/unit/SdrPdfImportTest.cxx
+++ b/sd/qa/unit/SdrPdfImportTest.cxx
@@ -10,19 +10,9 @@
 #include 
 #include 
 
-#include 
-
 #include 
 #include 
 
-#if HAVE_FEATURE_PDFIUM
-// Prevent workdir/UnpackedTarball/pdfium/public/fpdfview.h from including 
windows.h in a way that
-// it will define e.g. Yield as a macro:
-#include 
-#include 
-#include 
-#endif
-
 #include 
 #include 
 #include 
@@ -71,7 +61,13 @@ void SdrPdfImportTest::tearDown()
 // convert the PDF content into objects/shapes.
 CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testImportSimpleText)
 {
-#if HAVE_FEATURE_PDFIUM && !defined(_WIN32)
+#if !defined(_WIN32)
+auto pPdfium = vcl::pdf::PDFiumLibrary::get();
+if (!pPdfium)
+{
+return;
+}
+
 // We need to enable PDFium import (and make sure to disable after the 
test)
 bool bResetEnvVar = false;
 if (getenv("LO_IMPORT_USE_PDFIUM") == nullptr)
@@ -136,13 +132,18 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, 
testImportSimpleText)
 const EditTextObject& aEdit = pOutlinerParagraphObject->GetTextObject();
 OUString sText = aEdit.GetText(0);
 CPPUNIT_ASSERT_EQUAL(OUString("This is PDF!"), sText);
-
-#endif // HAVE_FEATURE_PDFIUM
+#endif
 }
 
 CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testAnnotationsImportExport)
 {
-#if HAVE_FEATURE_PDFIUM && !defined(_WIN32)
+#if !defined(_WIN32)
+auto pPdfium = vcl::pdf::PDFiumLibrary::get();
+if (!pPdfium)
+{
+return;
+}
+
 // We need to enable PDFium import (and make sure to disable after the 
test)
 bool bResetEnvVar = false;
 if (getenv("LO_IMPORT_USE_PDFIUM") == nullptr)
@@ -295,7 +296,7 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, 
testAnnotationsImportExport)
 CPPUNIT_ASSERT_EQUAL(false, bool(aDateTime.IsUTC));
 }
 
-#endif // HAVE_FEATURE_PDFIUM
+#endif
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 42e58143f900..46630c76 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -40,7 +40,7 @@
 
 
 #include 
-#include 
+#include 
 
 using namespace css;
 using namespace css::animations;
@@ -823,7 +823,12 @@ void SdExportTest::testTdf62176()
 
 void SdExportTest::testEmbeddedPdf()
 {
-#if HAVE_FEATURE_PDFIUM
+auto pPdfium = vcl::pdf::PDFiumLibrary::get();
+if (!pPdfium)
+{
+return;
+}
+
 sd::DrawDocShellRef xShell = 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/embedded-pdf.odp"), 
ODP);
 xShell = saveAndReload( xShell.get(), ODP );
 uno::Reference xPage = getPage(0, xShell);
@@ -832,7 +837,6 @@ void SdExportTest::testEmbeddedPdf()
 xShape->getPropertyValue("ReplacementGraphic") >>= xGraphic;
 CPPUNIT_ASSERT(xGraphic.is());
 xShell->DoClose();
-#endif
 }
 
 void SdExportTest::testEmbeddedText()
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 1b36fc2ba866..22431385ea17 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -9,7 +9,6 @@
 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -96,6 +95,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -154,9 +154,7 @@ public:
 void testBnc862510_6();
 void testBnc862510_7();
 #if ENABLE_PDFIMPORT
-#if HAVE_FEATURE_PDFIUM
 void testPDFImportShared();
-#endif
 #if defined(IMPORT_PDF_ELEMENTS)
 void testPDFImport();
 void testPDFImportSkipImages();
@@ -273,9 +271,7 @@ public:
 CPPUNIT_TEST(testBnc862510_6);
 CPPUNIT_TEST(testBnc862510_7);
 #if ENABLE_PDFIMPORT
-#if HAVE_FEATURE_PDFIUM
 CPPUNIT_TEST(testPDFImportShared);
-#endif
 #if defined(IMPORT_PDF_ELEMENTS)
 CPPUNIT_TEST(testPDFImport);
 CPPUNIT_TEST(testPDFImportSkipImages);
@@ -1398,9 +1394,14 @@ void SdImportTest::testBnc862510_7()
 // import+break and then check the results. But that isn't straight-forward and
 // currently await volunteering time to implement.
 
-#if HAVE_FEATURE_PDFIUM
 void SdImportTest::testPDFImportShared()
 {
+auto pPdfium = 

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

2021-03-30 Thread Ming Hua (via logerrit)
 cui/inc/toolbarmode.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6034f0993111f7b6ee459eec5ad31d0c4ea78eec
Author: Ming Hua 
AuthorDate: Wed Mar 31 07:32:34 2021 +0800
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Mar 31 08:40:04 2021 +0200

UI Selection dialog: reword UI description

The description of Groupedbar Compact variant starts with a general
description about both Groupedbar UI variants (the compact variant and
the full variant), then specify what is special about the compact
variant.  Therefore it should starts with "The Groupedbar interface
provides...", just like the description of Groupedbar Full variant in
the previous line.

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

diff --git a/cui/inc/toolbarmode.hrc b/cui/inc/toolbarmode.hrc
index b65851c2eb08..ab2c9263abd6 100644
--- a/cui/inc/toolbarmode.hrc
+++ b/cui/inc/toolbarmode.hrc
@@ -25,7 +25,7 @@ const std::tuple 
TOOLBARMODES_ARRAY[] =
 { NC_("RID_CUI_TOOLBARMODES", "Standard user interface with expanded 
sidebar. Expert users who want to quickly change many different properties are 
advised to use this UI."), "Sidebar", "sidebar.png" },
 { NC_("RID_CUI_TOOLBARMODES", "The Tabbed Compact variant aims to be 
familiar with the Microsoft Office interface, yet occupying less space for 
smaller screens."), "notebookbar_compact.ui", "notebookbar_compact.png" },
 { NC_("RID_CUI_TOOLBARMODES", "The Groupedbar interface provides access to 
functions in groups, with icons for most-frequently used features, and dropdown 
menus for others. This full variant favors functions and is slightly larger 
than others."), "notebookbar_groupedbar_full.ui", 
"notebookbar_groupedbar_full.png" },
-{ NC_("RID_CUI_TOOLBARMODES", "The Groupedbar Compact interface provides 
access to functions in groups, with icons for most-frequently used features, 
and dropdown menus for others. This compact variant favors vertical space."), 
"notebookbar_groupedbar_compact.ui", "notebookbar_groupedbar_compact.png" },
+{ NC_("RID_CUI_TOOLBARMODES", "The Groupedbar interface provides access to 
functions in groups, with icons for most-frequently used features, and dropdown 
menus for others. This compact variant favors vertical space."), 
"notebookbar_groupedbar_compact.ui", "notebookbar_groupedbar_compact.png" },
 { NC_("RID_CUI_TOOLBARMODES", "The Contextual Single interface shows 
functions in a single-line toolbar with context-dependent content."), 
"notebookbar_single.ui", "notebookbar_single.png" },
 { NC_("RID_CUI_TOOLBARMODES", "The Contextual Groups interface focuses on 
beginners. It exposes the most frequently used functions on groups with the 
core action as large icon and a couple of small additional features. All 
functions have a label. Depending on the context, an additional section 
provides access to those functions."), "notebookbar_groups.ui", 
"notebookbar_groups.png" },
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - sw/CppunitTest_sw_uibase_uno.mk sw/Module_sw.mk sw/qa sw/source

2021-03-30 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_uibase_uno.mk   |   74 ++
 sw/Module_sw.mk   |1 
 sw/qa/uibase/uno/uno.cxx  |   36 ++
 sw/source/uibase/uno/unotxdoc.cxx |4 ++
 4 files changed, 115 insertions(+)

New commits:
commit b7812468120c8618c62ef8cfbf061528f55e4da3
Author: Miklos Vajna 
AuthorDate: Wed Sep 30 16:48:27 2020 +0200
Commit: Miklos Vajna 
CommitDate: Wed Mar 31 08:35:48 2021 +0200

sw: fix heap-use-after-free in the UnoActionContext dtor

When lockControllers() is followed by close() + dispose(), but no match
unlock first:

==8514==ERROR: AddressSanitizer: heap-use-after-free on address 
0x6190002d1b58 at pc 0x7f48b13f5b85 bp 0x7fff557d98c0 sp 0x7fff557d98b8
...
#3 0x7f48b138beca in SwDoc::getIDocumentLayoutAccess() 
/sw/source/core/doc/doc.cxx:412:12
#4 0x7f48b58db224 in UnoActionContext::~UnoActionContext() 
/sw/source/core/unocore/unoobj2.cxx:200:49
...
#15 0x7f48b841c484 in SwXTextDocument::~SwXTextDocument() 
/sw/source/uibase/uno/unotxdoc.cxx:439:1

freed by thread T0 here:
#1 0x7f48b1388a26 in SwDoc::release() /sw/source/core/doc/doc.cxx:118:9
...
#17 0x7f48d15a40e5 in SfxBaseModel::dispose() 
/sfx2/source/doc/sfxbasemodel.cxx:755:13
#18 0x7f48b8429a48 in SwXTextDocument::dispose() 
/sw/source/uibase/uno/unotxdoc.cxx:586:19

(cherry picked from commit e08afec61aef62dd4f949ca7e1ffcc70d437e525)

Change-Id: I39bf65e43c12ce5ee49bdedeb1673b934ca21106

diff --git a/sw/CppunitTest_sw_uibase_uno.mk b/sw/CppunitTest_sw_uibase_uno.mk
new file mode 100644
index ..36c54d04db33
--- /dev/null
+++ b/sw/CppunitTest_sw_uibase_uno.mk
@@ -0,0 +1,74 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_uibase_uno))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_uibase_uno))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_uibase_uno, \
+sw/qa/uibase/uno/uno \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_uibase_uno, \
+comphelper \
+cppu \
+cppuhelper \
+editeng \
+sal \
+sfx \
+svl \
+svx \
+svxcore \
+sw \
+   swqahelper \
+test \
+unotest \
+utl \
+vcl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_uibase_uno,\
+boost_headers \
+libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_uibase_uno,\
+-I$(SRCDIR)/sw/inc \
+-I$(SRCDIR)/sw/source/core/inc \
+-I$(SRCDIR)/sw/source/uibase/inc \
+-I$(SRCDIR)/sw/qa/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_uibase_uno,\
+   udkapi \
+   offapi \
+   oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_uibase_uno))
+$(eval $(call gb_CppunitTest_use_vcl,sw_uibase_uno))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_uibase_uno,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_uibase_uno,\
+officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_uibase_uno))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_uibase_uno, \
+modules/swriter \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_uibase_uno))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 653f97335f92..723c26f53e40 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -111,6 +111,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
 CppunitTest_sw_uibase_shells \
 CppunitTest_sw_uibase_dochdl \
 CppunitTest_sw_uibase_frmdlg \
+CppunitTest_sw_uibase_uno \
 CppunitTest_sw_core_accessibilitycheck \
 CppunitTest_sw_core_layout \
 CppunitTest_sw_core_frmedt \
diff --git a/sw/qa/uibase/uno/uno.cxx b/sw/qa/uibase/uno/uno.cxx
new file mode 100644
index ..23c1829ab7de
--- /dev/null
+++ b/sw/qa/uibase/uno/uno.cxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+
+/// Covers sw/source/uibase/uno/ fixes.
+class SwUibaseUnoTest : public SwModelTestBase
+{
+};
+
+CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testLockControllers)
+{
+mxComponent = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+{
+

Re: License statement as a prerequisite for gerrit account

2021-03-30 Thread Samuel Mehrbrodt

> Personally, I would think the most efficient thing would be to just
> have it be a checkbox on the account registration screen. Similar to
> the "I agree to the terms and conditions" statement that everyone just
> acknowledges without reading on any other website.

Note that Gerrit already has such a feature:
https://gerrit-review.googlesource.com/Documentation/config-cla.html

If we still want to keep the license statements on the Mailing List, we
could use the Gerrit Contributor agreement feature with the agreement
saying "I sent my license statement to the mailing list". This way we
have some automated check in gerrit, and still have the license
statements on the public Mailing List.

Regards
Samuel

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


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - solenv/bin

2021-03-30 Thread Christian Lohmaier (via logerrit)
 solenv/bin/hrcex|   13 +++--
 solenv/bin/polib.py |2 +-
 solenv/bin/uiex |   10 +-
 3 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit ea5a7b353c200a39933f9d8b8bcbe5e43b1145a0
Author: Christian Lohmaier 
AuthorDate: Mon Mar 29 15:55:45 2021 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Mar 31 08:35:37 2021 +0200

python3-ify hrcex & uiex (creation of pot files)

Change-Id: I824c9ed536a1e852d6bd157fbd7d4766327b7bcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113319
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 9dfd55dffc4cca6617b4ee67be9a8bfe96601c00)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113353
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/solenv/bin/hrcex b/solenv/bin/hrcex
index 54cef2626a19..0645f79fcb37 100755
--- a/solenv/bin/hrcex
+++ b/solenv/bin/hrcex
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 
 import polib
 import binascii
@@ -22,17 +22,18 @@ for o, a in myopts:
 ofile = a
 
 with open(ofile, "a") as output:
-xgettext = Popen(["xgettext", "-C", "--add-comments", 
"--keyword=NC_:1c,2", "--keyword=NNC_:1c,2,3", "--from-code=UTF-8", 
"--no-wrap", ifile, "-o", "-"], stdout=PIPE)
+xgettext = Popen(["xgettext", "-C", "--add-comments", 
"--keyword=NC_:1c,2", "--keyword=NNC_:1c,2,3", "--from-code=UTF-8", 
"--no-wrap", ifile, "-o", "-"], stdout=PIPE, encoding="UTF-8")
 # while overall format is c++, all of the strings use custom placeholders 
and don't follow c-format
 # esp. plain percent sign never is escaped explicitly
-input = check_output(['sed', '-e', '/^#, c-format$/d'], 
stdin=xgettext.stdout)
+input = check_output(['sed', '-e', '/^#, c-format$/d'], 
stdin=xgettext.stdout, encoding="UTF-8")
 xgettext.wait()
+xgettext.stdout.close()
 po = polib.pofile(input)
 if len(po) != 0:
-print >> output, ""
+print("", file=output)
 for entry in po:
 keyid = entry.msgctxt + '|' + entry.msgid
-print >> output, '#. ' + polib.genKeyId(keyid)
+print('#. ' + polib.genKeyId(keyid), file=output)
 for i, occurrence in enumerate(entry.occurrences):
 entry.occurrences[i] = os.path.relpath(occurrence[0], 
os.environ['SRCDIR']), occurrence[1]
-print >> output, entry
+print(entry, file=output)
diff --git a/solenv/bin/polib.py b/solenv/bin/polib.py
index 5ab421365376..092e7dfdb8b3 100644
--- a/solenv/bin/polib.py
+++ b/solenv/bin/polib.py
@@ -1858,7 +1858,7 @@ def wrap(text, width=70, **kwargs):
 # }}}
 
 def genKeyId(inkey):
-crc = binascii.crc32(bytes(inkey)) & 0x
+crc = binascii.crc32(bytes(inkey, encoding="UTF-8")) & 0x
 # Use simple ASCII characters, exclude I, l, 1 and O, 0 to avoid confusing 
IDs
 symbols = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789";
 outkey = ""
diff --git a/solenv/bin/uiex b/solenv/bin/uiex
index c9b00b2e062c..1f5faead4575 100755
--- a/solenv/bin/uiex
+++ b/solenv/bin/uiex
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 
 import polib
 import binascii
@@ -22,13 +22,13 @@ for o, a in myopts:
 ofile = a
 
 with open(ofile, "a") as output:
-input = check_output(["xgettext", "--add-comments", "--no-wrap", ifile, 
"-o", "-"])
+input = check_output(["xgettext", "--add-comments", "--no-wrap", ifile, 
"-o", "-"], encoding="UTF-8")
 po = polib.pofile(input)
 if len(po) != 0:
-print >> output, ""
+print("", file=output)
 for entry in po:
 keyid = entry.msgctxt + '|' + entry.msgid
-print >> output, '#. ' + polib.genKeyId(keyid)
+print('#. ' + polib.genKeyId(keyid), file=output)
 for i, occurrence in enumerate(entry.occurrences):
 entry.occurrences[i] = os.path.relpath(occurrence[0], 
os.environ['SRCDIR']), occurrence[1]
-print >> output, entry
+print(entry, file=output)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - solenv/bin

2021-03-30 Thread Christian Lohmaier (via logerrit)
 solenv/bin/hrcex|   13 +++--
 solenv/bin/polib.py |2 +-
 solenv/bin/uiex |   10 +-
 3 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit e9200fca767ab4a490cb8b0b955a5e296910a0c2
Author: Christian Lohmaier 
AuthorDate: Mon Mar 29 15:55:45 2021 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Mar 31 08:35:20 2021 +0200

python3-ify hrcex & uiex (creation of pot files)

Change-Id: I824c9ed536a1e852d6bd157fbd7d4766327b7bcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113319
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 9dfd55dffc4cca6617b4ee67be9a8bfe96601c00)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113354
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/solenv/bin/hrcex b/solenv/bin/hrcex
index 1c371a1ed48e..49966dc7e167 100755
--- a/solenv/bin/hrcex
+++ b/solenv/bin/hrcex
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 
 import polib
 import binascii
@@ -22,17 +22,18 @@ for o, a in myopts:
 ofile = a
 
 with open(ofile, "a") as output:
-xgettext = Popen(["xgettext", "-C", "--add-comments", 
"--keyword=NC_:1c,2", "--keyword=NNC_:1c,2,3", "--from-code=UTF-8", 
"--no-wrap", ifile, "-o", "-"], stdout=PIPE)
+xgettext = Popen(["xgettext", "-C", "--add-comments", 
"--keyword=NC_:1c,2", "--keyword=NNC_:1c,2,3", "--from-code=UTF-8", 
"--no-wrap", ifile, "-o", "-"], stdout=PIPE, encoding="UTF-8")
 # while overall format is c++, all of the strings use custom placeholders 
and don't follow c-format
 # esp. plain percent sign never is escaped explicitly
-input = check_output(['sed', '-e', '/^#, c-format$/d'], 
stdin=xgettext.stdout)
+input = check_output(['sed', '-e', '/^#, c-format$/d'], 
stdin=xgettext.stdout, encoding="UTF-8")
 xgettext.wait()
+xgettext.stdout.close()
 po = polib.pofile(input)
 if len(po) != 0:
-print >> output, ""
+print("", file=output)
 for entry in po:
 keyid = entry.msgctxt + '|' + entry.msgid
-print >> output, '#. ' + polib.genKeyId(keyid)
+print('#. ' + polib.genKeyId(keyid), file=output)
 for i, occurrence in enumerate(entry.occurrences):
 entry.occurrences[i] = os.path.relpath(occurrence[0], 
os.environ['SRCDIR']), occurrence[1]
-print >> output, entry
+print(entry, file=output)
diff --git a/solenv/bin/polib.py b/solenv/bin/polib.py
index 5ab421365376..092e7dfdb8b3 100644
--- a/solenv/bin/polib.py
+++ b/solenv/bin/polib.py
@@ -1858,7 +1858,7 @@ def wrap(text, width=70, **kwargs):
 # }}}
 
 def genKeyId(inkey):
-crc = binascii.crc32(bytes(inkey)) & 0x
+crc = binascii.crc32(bytes(inkey, encoding="UTF-8")) & 0x
 # Use simple ASCII characters, exclude I, l, 1 and O, 0 to avoid confusing 
IDs
 symbols = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789";
 outkey = ""
diff --git a/solenv/bin/uiex b/solenv/bin/uiex
index c9b00b2e062c..1f5faead4575 100755
--- a/solenv/bin/uiex
+++ b/solenv/bin/uiex
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 
 import polib
 import binascii
@@ -22,13 +22,13 @@ for o, a in myopts:
 ofile = a
 
 with open(ofile, "a") as output:
-input = check_output(["xgettext", "--add-comments", "--no-wrap", ifile, 
"-o", "-"])
+input = check_output(["xgettext", "--add-comments", "--no-wrap", ifile, 
"-o", "-"], encoding="UTF-8")
 po = polib.pofile(input)
 if len(po) != 0:
-print >> output, ""
+print("", file=output)
 for entry in po:
 keyid = entry.msgctxt + '|' + entry.msgid
-print >> output, '#. ' + polib.genKeyId(keyid)
+print('#. ' + polib.genKeyId(keyid), file=output)
 for i, occurrence in enumerate(entry.occurrences):
 entry.occurrences[i] = os.path.relpath(occurrence[0], 
os.environ['SRCDIR']), occurrence[1]
-print >> output, entry
+print(entry, file=output)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Miklos Vajna (via logerrit)
 sw/source/uibase/uno/unotxdoc.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 9a8f8719b7a315a0cce213428f50957dfef792af
Author: Miklos Vajna 
AuthorDate: Mon Feb 1 17:44:39 2021 +0100
Commit: Miklos Vajna 
CommitDate: Wed Mar 31 08:20:32 2021 +0200

sw lok: disable field shadings

There are two problems with it:

First, the field shading is rendered behind bullet portions depending on
the cursor position (if the cursor is before the bullet, then we
render it; but not if the cursor is after the bullet), and tiled
rendering assumes that the render result is independent from the cursor
position.

Second, field shading is always painted directly (not going via
invalidation), so it's possible to end up with one tile showing field
shadings and another not, which is inconsistent. And even if it would be
there consistently, that would mean a lot of unnecessary invalidations.

The alternative would be to disable this from online.git's
loolconfig.xcu, but the item's path would end with something like
"ColorScheme['LibreOfficeDev']/WriterFieldShadings", which means it's
not easy to do this in a way that's independent from the product name.

(cherry picked from commit 876da94619d561e4b4c6c7d12a8d6726eb857df8)

Change-Id: I23c62acc3c15966cfba98fcee99cc96854ba4394

diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 4362d09044ec..7261aaa79fc1 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3458,6 +3458,10 @@ void SwXTextDocument::initializeForTiledRendering(const 
css::uno::SequenceGetViewOptions());
 aViewOption.SetHardBlank(false);
+
+// Disable field shadings: the result would depend on the cursor position.
+SwViewOption::SetAppearanceFlag(ViewOptFlags::FieldShadings, false);
+
 for (const beans::PropertyValue& rValue : rArguments)
 {
 if (rValue.Name == ".uno:HideWhitespace" && rValue.Value.has())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/unotest sw/qa unotest/source vcl/qa

2021-03-30 Thread Mike Kaganski (via logerrit)
 include/unotest/bootstrapfixturebase.hxx |1 
 sw/qa/extras/uiwriter/uiwriter3.cxx  |2 
 unotest/source/cpp/bootstrapfixturebase.cxx  |   13 +++
 vcl/qa/cppunit/BackendTest.cxx   |   88 +++
 vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx |2 
 5 files changed, 106 insertions(+)

New commits:
commit 95b51c5792a8d71b079eac42d6439abaa15e44e8
Author: Mike Kaganski 
AuthorDate: Tue Mar 30 18:36:08 2021 +0300
Commit: Mike Kaganski 
CommitDate: Wed Mar 31 08:08:12 2021 +0200

Exclude some tests in Windows RDP session

It seems that RDP may change (limit?) color space (even configured
to use 32-bit colors), and then some tests start failing like this:

  Test name: BackendTest::testDrawAlphaBitmapMirrored
  equality assertion failed
  - Expected: c[8000]
  - Actual  : c[8400]

Debugging ImplDrawBitmap in vcl/win/gdi/gdiimpl.cxx, and adding a
call to GetPixel immediately after the call to StretchDIBits, shows
that the resulting color on the device is different from the color
in the bitmap data: e.g., for original color {128, 0, 0} the result
is {132, 0, 0}.

Calling GetColorAdjustment shows that there's no color adjustments
set for the device, so I can't detect or modify the behavior this
way. So just disable the tests for now when running in RDP sessions.

Change-Id: Ie89d07f18f53e56bed6f7fa58432b8575b4d9f12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113388
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 9c6142ec26a0ba61b1cf58d1e6bf0b5376394bcd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113355
Tested-by: Mike Kaganski 

diff --git a/include/unotest/bootstrapfixturebase.hxx 
b/include/unotest/bootstrapfixturebase.hxx
index 85f270b02c2c..ac0e1166f8a6 100644
--- a/include/unotest/bootstrapfixturebase.hxx
+++ b/include/unotest/bootstrapfixturebase.hxx
@@ -66,6 +66,7 @@ public:
   virtual void setUp() override;
   virtual void tearDown() override;
 
+  bool isWindowsRDP() const;
 };
 
 }
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index a2b8c8bc1c38..71d742bf4359 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -2067,6 +2067,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135661)
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133477)
 {
+if (isWindowsRDP())
+return;
 load(DATA_DIRECTORY, "tdf133477.fodt");
 SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
 CPPUNIT_ASSERT(pTextDoc);
diff --git a/unotest/source/cpp/bootstrapfixturebase.cxx 
b/unotest/source/cpp/bootstrapfixturebase.cxx
index 5c5b3bcc3a9c..5eb5b91dcaf0 100644
--- a/unotest/source/cpp/bootstrapfixturebase.cxx
+++ b/unotest/source/cpp/bootstrapfixturebase.cxx
@@ -13,6 +13,10 @@
 #include 
 #include 
 
+#if defined _WIN32
+#include 
+#endif
+
 using namespace ::com::sun::star;
 
 // NB. this constructor is called before any tests are run, once for each
@@ -32,4 +36,13 @@ void test::BootstrapFixtureBase::setUp()
 
 void test::BootstrapFixtureBase::tearDown() { 
StarBASIC::DetachAllDocBasicItems(); }
 
+bool test::BootstrapFixtureBase::isWindowsRDP() const
+{
+#if defined _WIN32
+return GetSystemMetrics(SM_REMOTESESSION);
+#else
+return false;
+#endif
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx
index 29d7268445e1..0f34dc65ecc1 100644
--- a/vcl/qa/cppunit/BackendTest.cxx
+++ b/vcl/qa/cppunit/BackendTest.cxx
@@ -95,6 +95,8 @@ public:
 
 void testDrawRectWithRectangle()
 {
+if (isWindowsRDP())
+return;
 vcl::test::OutputDeviceTestRect aOutDevTest;
 Bitmap aBitmap = aOutDevTest.setupRectangle(false);
 auto eResult = 
vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
@@ -106,6 +108,8 @@ public:
 
 void testDrawRectWithPixel()
 {
+if (isWindowsRDP())
+return;
 vcl::test::OutputDeviceTestPixel aOutDevTest;
 Bitmap aBitmap = aOutDevTest.setupRectangle(false);
 auto eResult = 
vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
@@ -117,6 +121,8 @@ public:
 
 void testDrawRectWithLine()
 {
+if (isWindowsRDP())
+return;
 vcl::test::OutputDeviceTestLine aOutDevTest;
 Bitmap aBitmap = aOutDevTest.setupRectangle(false);
 auto eResult = 
vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
@@ -128,6 +134,8 @@ public:
 
 void testDrawRectWithPolygon()
 {
+if (isWindowsRDP())
+return;
 vcl::test::OutputDeviceTestPolygon aOutDevTest;
 Bitmap aBitmap = aOutDevTest.setupRectangle(false);
 auto eResult = 
vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
@@ -138,6 +146,8 @@ publi

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

2021-03-30 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/libreoffice/LOEvent.java |1 
 android/source/src/java/org/libreoffice/LOKitShell.java  |4 +
 android/source/src/java/org/libreoffice/LOKitThread.java |   19 
+---
 android/source/src/java/org/libreoffice/LOKitTileProvider.java   |   31 
++-
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |   39 
--
 android/source/src/java/org/libreoffice/TileProvider.java|   18 

 android/source/src/java/org/libreoffice/ToolbarController.java   |6 -
 7 files changed, 73 insertions(+), 45 deletions(-)

New commits:
commit d342851b9f68680d3f001546e543795cd0786cb1
Author: Michael Weghorn 
AuthorDate: Tue Mar 30 15:17:42 2021 +0200
Commit: Michael Weghorn 
CommitDate: Wed Mar 31 07:03:50 2021 +0200

tdf#139350 android: Fix handling of new docs

Pass param 'takeOwnership=true' to the 'saveDocumentAs'
method when saving a newly created document in Android Viewer
in 'LOKitThread::loadNewDocument', so the newly
written document is used subsequently, rather
than continuing to more or less operate on
"private:factory/swriter" (for the Writer case,
similar for the others).

Extend 'LibreOfficeMainActivity::saveFileToOriginalSource'
to handle this case as well (show a proper message and
reset the modified state after saving).

Drop now unnecessary special handling for the case
of saving new files from the toolbar or the dialog
shown when exiting without having saved previously.

Change-Id: Ief95620e324aa2abc318f1add0b91376ffe669d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113376
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 2e86226cff95100e3c34d0f22ec5ce6429efb8cb)

diff --git a/android/source/src/java/org/libreoffice/LOKitThread.java 
b/android/source/src/java/org/libreoffice/LOKitThread.java
index c20365d58fad..a3c6733ad81f 100644
--- a/android/source/src/java/org/libreoffice/LOKitThread.java
+++ b/android/source/src/java/org/libreoffice/LOKitThread.java
@@ -265,7 +265,7 @@ class LOKitThread extends Thread {
 refresh();
 LOKitShell.hideProgressSpinner(mContext);
 
-mTileProvider.saveDocumentAs(filePath, false);
+mTileProvider.saveDocumentAs(filePath, true);
 } else {
 closeDocument();
 }
diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java 
b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 210b2bf2ffd5..b9896c3c046c 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -179,17 +179,16 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Settin
 // create TextCursorLayer
 mDocumentOverlay = new DocumentOverlay(this, layerView);
 
-// New document type string is not null, meaning we want to open a new 
document
+mbISReadOnlyMode = !isExperimentalMode();
+
 if (getIntent().getStringExtra(LibreOfficeUIActivity.NEW_DOC_TYPE_KEY) 
!= null) {
+// New document type string is not null, meaning we want to open a 
new document
 String newDocumentType = 
getIntent().getStringExtra(LibreOfficeUIActivity.NEW_DOC_TYPE_KEY);
 String newFilePath = 
getIntent().getStringExtra(LibreOfficeUIActivity.NEW_FILE_PATH_KEY);
 
 // Load the new document
 loadNewDocument(newFilePath, newDocumentType);
-}
-
-mbISReadOnlyMode = !isExperimentalMode();
-if (getIntent().getData() != null) {
+} else if (getIntent().getData() != null) {
 if 
(getIntent().getData().getScheme().equals(ContentResolver.SCHEME_CONTENT)) {
 if (copyFileToTemp() && mTempFile != null) {
 mInputFile = mTempFile;
@@ -218,9 +217,7 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Settin
 "org.libreoffice.document_uri");
 }
 } else {
-if (!isNewDocument) {
-mInputFile = new File(DEFAULT_DOC_PATH);
-}
+mInputFile = new File(DEFAULT_DOC_PATH);
 }
 
 mDrawerLayout = findViewById(R.id.drawer_layout);
@@ -361,13 +358,6 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Settin
 }
 }
 
-/**
- * Save a new document
- * */
-public void saveAs(){
-LOKitShell.sendSaveCopyAsEvent(mInputFile.getPath(), 
FileUtilities.getExtension(mInputFile.getPath()).substring(1));
-}
-
 /**
  * Save the document and invoke save on document provider to upload the 
file
  * to the cloud if necessary.
@@ -387,6 +377,17 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Sett

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

2021-03-30 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/libreoffice/LOKitThread.java |2 
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |   37 
--
 android/source/src/java/org/libreoffice/ToolbarController.java   |6 -
 3 files changed, 19 insertions(+), 26 deletions(-)

New commits:
commit 2e86226cff95100e3c34d0f22ec5ce6429efb8cb
Author: Michael Weghorn 
AuthorDate: Tue Mar 30 15:17:42 2021 +0200
Commit: Michael Weghorn 
CommitDate: Wed Mar 31 06:58:12 2021 +0200

tdf#139350 android: Fix handling of new docs

Pass param 'takeOwnership=true' to the 'saveDocumentAs'
method when saving a newly created document in Android Viewer
in 'LOKitThread::loadNewDocument', so the newly
written document is used subsequently, rather
than continuing to more or less operate on
"private:factory/swriter" (for the Writer case,
similar for the others).

Extend 'LibreOfficeMainActivity::saveFileToOriginalSource'
to handle this case as well (show a proper message and
reset the modified state after saving).

Drop now unnecessary special handling for the case
of saving new files from the toolbar or the dialog
shown when exiting without having saved previously.

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

diff --git a/android/source/src/java/org/libreoffice/LOKitThread.java 
b/android/source/src/java/org/libreoffice/LOKitThread.java
index c20365d58fad..a3c6733ad81f 100644
--- a/android/source/src/java/org/libreoffice/LOKitThread.java
+++ b/android/source/src/java/org/libreoffice/LOKitThread.java
@@ -265,7 +265,7 @@ class LOKitThread extends Thread {
 refresh();
 LOKitShell.hideProgressSpinner(mContext);
 
-mTileProvider.saveDocumentAs(filePath, false);
+mTileProvider.saveDocumentAs(filePath, true);
 } else {
 closeDocument();
 }
diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java 
b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 210b2bf2ffd5..b9896c3c046c 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -179,17 +179,16 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Settin
 // create TextCursorLayer
 mDocumentOverlay = new DocumentOverlay(this, layerView);
 
-// New document type string is not null, meaning we want to open a new 
document
+mbISReadOnlyMode = !isExperimentalMode();
+
 if (getIntent().getStringExtra(LibreOfficeUIActivity.NEW_DOC_TYPE_KEY) 
!= null) {
+// New document type string is not null, meaning we want to open a 
new document
 String newDocumentType = 
getIntent().getStringExtra(LibreOfficeUIActivity.NEW_DOC_TYPE_KEY);
 String newFilePath = 
getIntent().getStringExtra(LibreOfficeUIActivity.NEW_FILE_PATH_KEY);
 
 // Load the new document
 loadNewDocument(newFilePath, newDocumentType);
-}
-
-mbISReadOnlyMode = !isExperimentalMode();
-if (getIntent().getData() != null) {
+} else if (getIntent().getData() != null) {
 if 
(getIntent().getData().getScheme().equals(ContentResolver.SCHEME_CONTENT)) {
 if (copyFileToTemp() && mTempFile != null) {
 mInputFile = mTempFile;
@@ -218,9 +217,7 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Settin
 "org.libreoffice.document_uri");
 }
 } else {
-if (!isNewDocument) {
-mInputFile = new File(DEFAULT_DOC_PATH);
-}
+mInputFile = new File(DEFAULT_DOC_PATH);
 }
 
 mDrawerLayout = findViewById(R.id.drawer_layout);
@@ -361,13 +358,6 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Settin
 }
 }
 
-/**
- * Save a new document
- * */
-public void saveAs(){
-LOKitShell.sendSaveCopyAsEvent(mInputFile.getPath(), 
FileUtilities.getExtension(mInputFile.getPath()).substring(1));
-}
-
 /**
  * Save the document and invoke save on document provider to upload the 
file
  * to the cloud if necessary.
@@ -387,6 +377,17 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Settin
 if (documentUri != null) {
 // case where file was opened using IDocumentProvider from within 
LO app
 saveFilesToCloud();
+} else if (isNewDocument) {
+// nothing to do for actual save, the actual (local) file is 
already handled
+// by LOKitTileProvider
+runOnUiThread(new Runnable() {
+@Override
+

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

2021-03-30 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/libreoffice/LOEvent.java |1 
 android/source/src/java/org/libreoffice/LOKitShell.java  |4 +
 android/source/src/java/org/libreoffice/LOKitThread.java |   11 
++--
 android/source/src/java/org/libreoffice/LOKitTileProvider.java   |   26 
++
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |4 -
 android/source/src/java/org/libreoffice/TileProvider.java|   12 
+++-
 6 files changed, 40 insertions(+), 18 deletions(-)

New commits:
commit a1abf2c865228e6ed33e99ab73b94357ddbc590f
Author: Michael Weghorn 
AuthorDate: Tue Mar 30 15:01:31 2021 +0200
Commit: Michael Weghorn 
CommitDate: Wed Mar 31 06:57:53 2021 +0200

tdf#139350 android: Add param to allow a "real" "Save As"

So far, LOKitTileProvider's 'saveDocumentAs' method
was always saving a copy of the current document
(or doing an export), but was not continuing to use
the newly saved doc afterwards.

Add an additional parameter 'takeOwnership' to the
method to specify whether to do so.

In other words,

* the 'takeOwnership=false' case continues to
  do what was done previously, it basically does what
  "File" -> "Save a Copy" or "File" -> "Export"
  does in the desktop version

* the 'takeOwnership=true' case now basically does the
  same as "File" -> "Save As" in the desktop version
  (except that the path is already known in the
  Android case)

This essentially forwards the "TakeOwnership"
param to LibreOfficeKit, which was originally
added there in

commit a121074cbd07939713e169586469b934aedbe594
Date:   Wed Feb 10 13:26:50 2016 +0100

lok: Introduce a "TakeOwnership" filter option for saveAs().

It is consumed by the saveAs() itself, and when provided, the 
document
identity changes to the provided pUrl - meaning that 
'.uno:ModifiedStatus' is
triggered as with the "Save As..." in the UI.

This mode must not be used when saving to PNG or PDF.

Change-Id: I11b5aa814476a8dcab9eac5202bd052828ebbd96

This also adds a new 'SAVE_COPY_AS' event type to save a
copy without taking ownership, and switches all uses of the
'SAVE_AS' event to that new one for now. (So the behavior
remains unchanged, but the terminology is hopefully clearer.)

Except for one instance in LOKitTileProver::saveDocument (where
the cached version of the document is written to the original
URI, if present), all other places are left with the previous
behaviour in this commit.
Further changes will be done in follow-up commits.

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

diff --git a/android/source/src/java/org/libreoffice/LOEvent.java 
b/android/source/src/java/org/libreoffice/LOEvent.java
index 4db48a5bbd6d..74a09c92cc1d 100644
--- a/android/source/src/java/org/libreoffice/LOEvent.java
+++ b/android/source/src/java/org/libreoffice/LOEvent.java
@@ -42,6 +42,7 @@ public class LOEvent implements Comparable {
 public static final int REFRESH = 21;
 public static final int PAGE_SIZE_CHANGED = 22;
 public static final int UNO_COMMAND_NOTIFY = 23;
+public static final int SAVE_COPY_AS = 24;
 
 
 public final int mType;
diff --git a/android/source/src/java/org/libreoffice/LOKitShell.java 
b/android/source/src/java/org/libreoffice/LOKitShell.java
index 46ca256c7993..75b2fb09b260 100644
--- a/android/source/src/java/org/libreoffice/LOKitShell.java
+++ b/android/source/src/java/org/libreoffice/LOKitShell.java
@@ -119,6 +119,10 @@ public class LOKitShell {
 LOKitShell.sendEvent(new LOEvent(filePath, fileFormat, 
LOEvent.SAVE_AS));
 }
 
+public static void sendSaveCopyAsEvent(String filePath, String fileFormat) 
{
+LOKitShell.sendEvent(new LOEvent(filePath, fileFormat, 
LOEvent.SAVE_COPY_AS));
+}
+
 public static void sendResumeEvent(String inputFile, int partIndex) {
 LOKitShell.sendEvent(new LOEvent(LOEvent.RESUME, inputFile, 
partIndex));
 }
diff --git a/android/source/src/java/org/libreoffice/LOKitThread.java 
b/android/source/src/java/org/libreoffice/LOKitThread.java
index e80e5af6c990..c20365d58fad 100644
--- a/android/source/src/java/org/libreoffice/LOKitThread.java
+++ b/android/source/src/java/org/libreoffice/LOKitThread.java
@@ -265,7 +265,7 @@ class LOKitThread extends Thread {
 refresh();
 LOKitShell.hideProgressSpinner(mContext);
 
-mTileProvider.saveDocumentAs(filePath);
+mTileProvider.saveDocumentAs(filePath, false);
 } else {
 closeDocument();
 }
@@ -274,11 +274,11 @@ class LOKitThread extends Thread {
 /**
  * Save the curr

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

2021-03-30 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/libreoffice/LOKitThread.java   |   10 --
 android/source/src/java/org/libreoffice/LOKitTileProvider.java |   15 
++
 android/source/src/java/org/libreoffice/TileProvider.java  |8 -
 3 files changed, 23 insertions(+), 10 deletions(-)

New commits:
commit 4dbc9c87a09922072c0250e4e932228de93961db
Author: Michael Weghorn 
AuthorDate: Tue Mar 30 11:40:21 2021 +0200
Commit: Michael Weghorn 
CommitDate: Wed Mar 31 06:57:34 2021 +0200

android: TileKitProvider: Optionally detect file type from document

Add an overload for the 'saveDocumentAs' method that takes just one
parameter and auto-detects the file type to use from the document.

Use it when creating new documents.

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

diff --git a/android/source/src/java/org/libreoffice/LOKitThread.java 
b/android/source/src/java/org/libreoffice/LOKitThread.java
index 03b7070e783a..e80e5af6c990 100644
--- a/android/source/src/java/org/libreoffice/LOKitThread.java
+++ b/android/source/src/java/org/libreoffice/LOKitThread.java
@@ -265,15 +265,7 @@ class LOKitThread extends Thread {
 refresh();
 LOKitShell.hideProgressSpinner(mContext);
 
-if (fileType.matches(LibreOfficeUIActivity.NEW_WRITER_STRING_KEY))
-mTileProvider.saveDocumentAs(filePath, "odt");
-else if 
(fileType.matches(LibreOfficeUIActivity.NEW_CALC_STRING_KEY))
-mTileProvider.saveDocumentAs(filePath, "ods");
-else if 
(fileType.matches(LibreOfficeUIActivity.NEW_IMPRESS_STRING_KEY))
-mTileProvider.saveDocumentAs(filePath, "odp");
-else
-mTileProvider.saveDocumentAs(filePath, "odg");
-
+mTileProvider.saveDocumentAs(filePath);
 } else {
 closeDocument();
 }
diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java 
b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
index 0e2649337322..a887118c6aaa 100644
--- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
@@ -356,6 +356,21 @@ class LOKitTileProvider implements TileProvider {
 LOKitShell.hideProgressSpinner(mContext);
 }
 
+@Override
+public void saveDocumentAs(final String filePath) {
+final int docType = mDocument.getDocumentType();
+if (docType == Document.DOCTYPE_TEXT)
+saveDocumentAs(filePath, "odt");
+else if (docType == Document.DOCTYPE_SPREADSHEET)
+saveDocumentAs(filePath, "ods");
+else if (docType == Document.DOCTYPE_PRESENTATION)
+saveDocumentAs(filePath, "odp");
+else if (docType == Document.DOCTYPE_DRAWING)
+saveDocumentAs(filePath, "odg");
+else
+Log.w(LOGTAG, "Cannot determine file format from document. Not 
saving.");
+}
+
 public void exportToPDF(boolean print){
 String dir = 
Environment.getExternalStorageDirectory().getAbsolutePath()+"/Documents";
 File docDir = new File(dir);
diff --git a/android/source/src/java/org/libreoffice/TileProvider.java 
b/android/source/src/java/org/libreoffice/TileProvider.java
index dabf30b834f7..a848b4ae98d0 100644
--- a/android/source/src/java/org/libreoffice/TileProvider.java
+++ b/android/source/src/java/org/libreoffice/TileProvider.java
@@ -22,10 +22,16 @@ import org.mozilla.gecko.gfx.IntSize;
 public interface TileProvider {
 
 /**
- * Save the current document.
+ * Save the current document under the given path.
  */
 void saveDocumentAs(String filePath, String format);
 
+/**
+ * Saves the current document under the given path,
+ * using the default file format.
+ */
+void saveDocumentAs(String filePath);
+
 /**
  * Returns the page width in pixels.
  */
___
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' - vcl/win

2021-03-30 Thread Mike Kaganski (via logerrit)
 vcl/win/dtrans/DOTransferable.cxx |  110 --
 vcl/win/dtrans/DOTransferable.hxx |   19 --
 vcl/win/dtrans/DataFmtTransl.cxx  |4 -
 vcl/win/dtrans/DataFmtTransl.hxx  |2 
 vcl/win/dtrans/FetcList.cxx   |5 -
 vcl/win/dtrans/WinClipboard.cxx   |   36 +---
 vcl/win/dtrans/WinClipboard.hxx   |6 +-
 vcl/win/dtrans/XTDataObject.cxx   |6 +-
 vcl/win/dtrans/target.cxx |3 -
 9 files changed, 113 insertions(+), 78 deletions(-)

New commits:
commit 5be35c2b1fe127f69223a92965cbbc92dab15c3b
Author: Mike Kaganski 
AuthorDate: Fri Mar 5 20:45:08 2021 +0300
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Mar 31 05:49:37 2021 +0200

tdf#140813: Use GetUpdatedClipboardFormats to enumerate clipboard formats

We really don't have to provide plain text formats other than Unicode, so
we may avoid checking CF_LOCALE data when initializing flavor list. Let's
pretend that any textual format in the clipboard is Unicode, and ensure
that we only actually access system clipboard when we paste.

Change-Id: Ife30f57605a42d59233bfcb97f8bc297b3ace463
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112044
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 7b6c0e63e64eb2ad1e83bd744a0d20f78c7a6b84)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112971
Reviewed-by: Michael Stahl 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/win/dtrans/DOTransferable.cxx 
b/vcl/win/dtrans/DOTransferable.cxx
index 409c671e3de4..91133970e8c6 100644
--- a/vcl/win/dtrans/DOTransferable.cxx
+++ b/vcl/win/dtrans/DOTransferable.cxx
@@ -25,6 +25,7 @@
 #include "DOTransferable.hxx"
 #include "ImplHelper.hxx"
 #include "WinClip.hxx"
+#include "WinClipboard.hxx"
 #include "DTransHelper.hxx"
 #include "TxtCnvtHlp.hxx"
 #include "MimeAttrib.hxx"
@@ -208,19 +209,6 @@ bool cmpAllContentTypeParameter(
 
 } // end namespace
 
-Reference< XTransferable > CDOTransferable::create( const Reference< 
XComponentContext >& rxContext,
-   
  IDataObjectPtr pIDataObject )
-{
-CDOTransferable* pTransf = new CDOTransferable(rxContext, pIDataObject);
-Reference refDOTransf(pTransf);
-
-pTransf->acquire();
-pTransf->initFlavorList();
-pTransf->release();
-
-return refDOTransf;
-}
-
 CDOTransferable::CDOTransferable(
 const Reference< XComponentContext >& rxContext, IDataObjectPtr 
rDataObject ) :
 m_rDataObject( rDataObject ),
@@ -229,6 +217,20 @@ CDOTransferable::CDOTransferable(
 m_bUnicodeRegistered( false ),
 m_TxtFormatOnClipboard( CF_INVALID )
 {
+initFlavorList();
+}
+
+CDOTransferable::CDOTransferable(
+const Reference& rxContext,
+const css::uno::Reference& 
xClipboard,
+const std::vector& rFormats)
+: m_xClipboard(xClipboard)
+, m_xContext(rxContext)
+, m_DataFormatTranslator(rxContext)
+, m_bUnicodeRegistered(false)
+, m_TxtFormatOnClipboard(CF_INVALID)
+{
+initFlavorListFromFormatList(rFormats);
 }
 
 Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor )
@@ -312,6 +314,7 @@ sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( 
const DataFlavor& aFla
 
 void CDOTransferable::initFlavorList( )
 {
+std::vector aFormats;
 sal::systools::COMReference pEnumFormatEtc;
 HRESULT hr = m_rDataObject->EnumFormatEtc( DATADIR_GET, &pEnumFormatEtc );
 if ( SUCCEEDED( hr ) )
@@ -321,39 +324,38 @@ void CDOTransferable::initFlavorList( )
 FORMATETC fetc;
 while ( S_OK == pEnumFormatEtc->Next( 1, &fetc, nullptr ) )
 {
-// we use locales only to determine the
-// charset if there is text on the cliboard
-// we don't offer this format
-if ( CF_LOCALE == fetc.cfFormat )
-continue;
-
-DataFlavor aFlavor = formatEtcToDataFlavor( fetc );
+aFormats.push_back(fetc.cfFormat);
+// see MSDN IEnumFORMATETC
+CoTaskMemFree( fetc.ptd );
+}
+initFlavorListFromFormatList(aFormats);
+}
+}
 
-// if text or oemtext is offered we also pretend to have unicode 
text
-if ( CDataFormatTranslator::isOemOrAnsiTextFormat( fetc.cfFormat ) 
&&
- !m_bUnicodeRegistered )
+void CDOTransferable::initFlavorListFromFormatList(const 
std::vector& rFormats)
+{
+for (sal_uInt32 cfFormat : rFormats)
+{
+// we use locales only to determine the
+// charset if there is text on the cliboard
+// we don't offer this format
+if (CF_LOCALE == cfFormat)
+continue;
+
+// if text or oemtext is offered we pretend to have unicode text
+if (CDataFormatTranslator::isTextFormat(cfFormat))
+{
+if (!m_bUnicodeRegistered)
 {
-addSupportedFlavor( aFlavor );
-

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

2021-03-30 Thread Eike Rathke (via logerrit)
 include/svl/hint.hxx  |2 ++
 sc/source/ui/app/inputwin.cxx |3 ++-
 sc/source/ui/docshell/docfunc.cxx |1 +
 sc/source/ui/undo/undotab.cxx |1 +
 4 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 6b3f0866e9eddd5553857741862ca0d7d5b2ec2b
Author: Eike Rathke 
AuthorDate: Wed Mar 31 00:00:31 2021 +0200
Commit: Eike Rathke 
CommitDate: Wed Mar 31 01:21:36 2021 +0200

Related: tdf#137577 Update Name Box range name list on sheet rename

... for sheet-local names that include the sheet name.

Introduce SfxHintId::ScTablesRenamed for this as the existing
ScTablesChanged is fired quite too often.

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

diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index 314b4f886f7d..284ebe7200c4 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -73,6 +73,7 @@ enum class SfxHintId {
 ScDbAreasChanged,
 ScAreasChanged,
 ScTablesChanged,
+ScTablesRenamed,
 ScDrawChanged,
 ScDocNameChanged,
 ScAreaLinksChanged,
@@ -164,6 +165,7 @@ inline std::basic_ostream & operator <<(
 case SfxHintId::ScDbAreasChanged: return stream << "ScDbAreasChanged";
 case SfxHintId::ScAreasChanged: return stream << "ScAreasChanged";
 case SfxHintId::ScTablesChanged: return stream << "ScTablesChanged";
+case SfxHintId::ScTablesRenamed: return stream << "ScTablesRenamed";
 case SfxHintId::ScDrawChanged: return stream << "ScDrawChanged";
 case SfxHintId::ScDocNameChanged: return stream << "ScDocNameChanged";
 case SfxHintId::ScAreaLinksChanged: return stream << "ScAreaLinksChanged";
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 2b5a48c09d38..d69aac2c9984 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2291,7 +2291,8 @@ void ScPosWnd::Notify( SfxBroadcaster&, const SfxHint& 
rHint )
 else
 {
 const SfxHintId nHintId = rHint.GetId();
-if ( nHintId == SfxHintId::ScAreasChanged || nHintId == 
SfxHintId::ScNavigatorUpdateAll)
+if (nHintId == SfxHintId::ScAreasChanged || nHintId == 
SfxHintId::ScNavigatorUpdateAll
+|| nHintId == SfxHintId::ScTablesRenamed)
 FillRangeNames();
 }
 }
diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index 951048e43869..e1498dd4424a 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3512,6 +3512,7 @@ bool ScDocFunc::RenameTable( SCTAB nTab, const OUString& 
rName, bool bRecord, bo
 rDocShell.PostPaintExtras();
 aModificator.SetDocumentModified();
 SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
+SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesRenamed ) );
 
 bSuccess = true;
 }
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 85c2708367e4..0002fefa1ccb 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -432,6 +432,7 @@ void ScUndoRenameTab::DoChange( SCTAB nTabP, const 
OUString& rName ) const
 rDoc.RenameTab( nTabP, rName );
 
 SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );// 
Navigator
+SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesRenamed ) );// 
Name Box
 
 pDocShell->PostPaintGridAll();
 pDocShell->PostPaintExtras();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Christian Lohmaier (via logerrit)
 solenv/bin/hrcex|   13 +++--
 solenv/bin/polib.py |2 +-
 solenv/bin/uiex |   10 +-
 3 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 9dfd55dffc4cca6617b4ee67be9a8bfe96601c00
Author: Christian Lohmaier 
AuthorDate: Mon Mar 29 15:55:45 2021 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Mar 31 00:52:05 2021 +0200

python3-ify hrcex & uiex (creation of pot files)

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

diff --git a/solenv/bin/hrcex b/solenv/bin/hrcex
index 54cef2626a19..0645f79fcb37 100755
--- a/solenv/bin/hrcex
+++ b/solenv/bin/hrcex
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 
 import polib
 import binascii
@@ -22,17 +22,18 @@ for o, a in myopts:
 ofile = a
 
 with open(ofile, "a") as output:
-xgettext = Popen(["xgettext", "-C", "--add-comments", 
"--keyword=NC_:1c,2", "--keyword=NNC_:1c,2,3", "--from-code=UTF-8", 
"--no-wrap", ifile, "-o", "-"], stdout=PIPE)
+xgettext = Popen(["xgettext", "-C", "--add-comments", 
"--keyword=NC_:1c,2", "--keyword=NNC_:1c,2,3", "--from-code=UTF-8", 
"--no-wrap", ifile, "-o", "-"], stdout=PIPE, encoding="UTF-8")
 # while overall format is c++, all of the strings use custom placeholders 
and don't follow c-format
 # esp. plain percent sign never is escaped explicitly
-input = check_output(['sed', '-e', '/^#, c-format$/d'], 
stdin=xgettext.stdout)
+input = check_output(['sed', '-e', '/^#, c-format$/d'], 
stdin=xgettext.stdout, encoding="UTF-8")
 xgettext.wait()
+xgettext.stdout.close()
 po = polib.pofile(input)
 if len(po) != 0:
-print >> output, ""
+print("", file=output)
 for entry in po:
 keyid = entry.msgctxt + '|' + entry.msgid
-print >> output, '#. ' + polib.genKeyId(keyid)
+print('#. ' + polib.genKeyId(keyid), file=output)
 for i, occurrence in enumerate(entry.occurrences):
 entry.occurrences[i] = os.path.relpath(occurrence[0], 
os.environ['SRCDIR']), occurrence[1]
-print >> output, entry
+print(entry, file=output)
diff --git a/solenv/bin/polib.py b/solenv/bin/polib.py
index 5ab421365376..092e7dfdb8b3 100644
--- a/solenv/bin/polib.py
+++ b/solenv/bin/polib.py
@@ -1858,7 +1858,7 @@ def wrap(text, width=70, **kwargs):
 # }}}
 
 def genKeyId(inkey):
-crc = binascii.crc32(bytes(inkey)) & 0x
+crc = binascii.crc32(bytes(inkey, encoding="UTF-8")) & 0x
 # Use simple ASCII characters, exclude I, l, 1 and O, 0 to avoid confusing 
IDs
 symbols = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789";
 outkey = ""
diff --git a/solenv/bin/uiex b/solenv/bin/uiex
index ba47d8e2f9a8..b9344c429543 100755
--- a/solenv/bin/uiex
+++ b/solenv/bin/uiex
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 
 import polib
 import binascii
@@ -22,17 +22,17 @@ for o, a in myopts:
 ofile = a
 
 with open(ofile, "a") as output:
-input = check_output(["xgettext", "--add-comments", "--no-wrap", ifile, 
"-o", "-"])
+input = check_output(["xgettext", "--add-comments", "--no-wrap", ifile, 
"-o", "-"], encoding="UTF-8")
 po = polib.pofile(input)
 if len(po) != 0:
-print >> output, ""
+print("", file=output)
 for entry in po:
 # skip 'stock' entries like "cancel", "help", "ok", etc
 # l10ntools/source/localize.cxx will insert one entry for each 
stock per .po
 if entry.msgctxt == "stock":
 continue
 keyid = entry.msgctxt + '|' + entry.msgid
-print >> output, '#. ' + polib.genKeyId(keyid)
+print('#. ' + polib.genKeyId(keyid), file=output)
 for i, occurrence in enumerate(entry.occurrences):
 entry.occurrences[i] = os.path.relpath(occurrence[0], 
os.environ['SRCDIR']), occurrence[1]
-print >> output, entry
+print(entry, file=output)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: License statement as a prerequisite for gerrit account

2021-03-30 Thread Michael Warner
Every license statement I see on this list follows the provided 
template, so regex matching that should be trivial. Matching the email 
address to accounts in gerrit or bugzilla would probably work for some 
large percentage of cases, but you could reasonably expect there to be 
some cases where someone registered for a gerrit account with one email 
address, and sent their license statement to the mailing list from 
another one.


Personally, I would think the most efficient thing would be to just have 
it be a checkbox on the account registration screen. Similar to the "I 
agree to the terms and conditions" statement that everyone just 
acknowledges without reading on any other website.


John wrote:


Would it be possible to script? Looping over messages in the mailing 
list would not be hard to script, finding bugzilla tickets from a 
corresponding email that the script has not modified yet would not be 
hard, but it might be tricky to identify that a given message /is/ a 
valid license statement.


If you could figure that out, though, having the bot/script update 
tickets with a link to the assignee's license statement would make 
this much less of an issue, in my opinion.


On 3/29/21 9:24 AM, Eike Rathke wrote:

Hi,

On Sunday, 2021-03-28 02:36:49 -0700, julien2412 wrote:


I noticed several times some patches on gerrit for which authors hadn't send
yet their license statement.
Of course when asking, the license statement is provided but to avoid to
miss it and risk some legal problem, thought it could be relevant to make
license statement as prerequisite for a gerrit account.

Maybe not a prerequisite for a gerrit account (contributors want that
quickly to push a change and you don't want their hard disk die before
;-), but a prerequisite for being able to merge a change. Often enough
when I spot a new name at a change I look up the dev statement and if
not found mention that during review, but I'm also guilty not thinking
of or asking only after merging.

   Eike


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


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


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


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

2021-03-30 Thread Armin Le Grand (Allotropia) (via logerrit)
 vcl/unx/gtk3/gtk3gtkframe.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit f6fc4c2630a4bc0ca6296481994afc868a581775
Author: Armin Le Grand (Allotropia) 
AuthorDate: Wed Mar 17 18:31:59 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Wed Mar 31 00:24:35 2021 +0200

tdf#131031 take MenuBar into account on size change

in GtkSalFrame::SetPosSize when setting local vars for
maGeometry.nWidth/nHeight the implicitely existing gtk
native menu bar has to be taken into account. This can
be done by extracting the values for it and re-apply
to the new values.

Change-Id: Ic0e76ecfd49fab7dbf330f3e26ab4a6ad3267b35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112654
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Reviewed-by: Armin Le Grand 
(cherry picked from commit cc1690b9752b3fef3d541de0d26b7c7681615767)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112728
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 786aa40474d6..09ffd31a5255 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1479,8 +1479,13 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long 
nWidth, long nHeight, sal_u
 {
 m_bDefaultSize = false;
 
+// tdf#131031 Just setting maGeometry.nWidth/nHeight will delete
+// the evtl. implicitely existing space at top for the gtk native 
MenuBar,
+// will make the Window too big and the StatusBar at the bottom vanish
+// and thus breaks the fix in tdf#130841.
+const int nImplicitMenuBarHeight(m_pSalMenu ? 
m_pSalMenu->GetMenuBarHeight() : 0);
 maGeometry.nWidth = nWidth;
-maGeometry.nHeight = nHeight;
+maGeometry.nHeight = nHeight - nImplicitMenuBarHeight;
 
 if( isChild( false ) )
 widget_set_size_request(nWidth, nHeight);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Samuel Mehrbrodt (via logerrit)
 sw/qa/extras/layout/data/tdf141079.odt |binary
 sw/qa/extras/layout/layout.cxx |   30 ++
 sw/source/core/text/itrcrsr.cxx|8 ++--
 3 files changed, 36 insertions(+), 2 deletions(-)

New commits:
commit 2be0c266276bf5e6c4ae8c84aba7d715adcfcc1f
Author: Samuel Mehrbrodt 
AuthorDate: Thu Mar 18 11:41:29 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Wed Mar 31 00:21:47 2021 +0200

tdf#141079 Restore double click behavior for script fields

Change-Id: I5daa730740ea042bdae56b832f2557ec974339b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112668
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 5302268de6a33716c7746aa13232746ad2f2b561)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113074
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/qa/extras/layout/data/tdf141079.odt 
b/sw/qa/extras/layout/data/tdf141079.odt
new file mode 100644
index ..65dfcb4a296f
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf141079.odt differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index c94811b4d5e7..9e990266dea9 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -3419,6 +3419,36 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testImageComment)
 CPPUNIT_ASSERT_EQUAL(static_cast(5), 
aPosition.nContent.GetIndex());
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testScriptField)
+{
+// Test clicking script field inside table ( tdf#141079 )
+SwDoc* pDoc = createDoc("tdf141079.odt");
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+// Look up layout position which is the first cell in the table
+SwRootFrame* pRoot = pWrtShell->GetLayout();
+CPPUNIT_ASSERT(pRoot->GetLower()->IsPageFrame());
+SwPageFrame* pPage = static_cast(pRoot->GetLower());
+CPPUNIT_ASSERT(pPage->GetLower()->IsBodyFrame());
+SwBodyFrame* pBody = static_cast(pPage->GetLower());
+CPPUNIT_ASSERT(pBody->GetLower()->IsTextFrame());
+SwTextFrame* pTextFrame = static_cast(pBody->GetLower());
+CPPUNIT_ASSERT(pTextFrame->GetNext()->IsTabFrame());
+SwFrame* pTable = pTextFrame->GetNext();
+SwFrame* pRow1 = pTable->GetLower();
+CPPUNIT_ASSERT(pRow1->GetLower()->IsCellFrame());
+SwFrame* pCell1 = pRow1->GetLower();
+CPPUNIT_ASSERT(pCell1->GetLower()->IsTextFrame());
+SwTextFrame* pCellTextFrame = 
static_cast(pCell1->GetLower());
+const SwRect& rCellRect = pCell1->getFrameArea();
+Point aPoint = rCellRect.Center();
+aPoint.setX(aPoint.getX() - rCellRect.Width() / 2);
+// Ask for the doc model pos of this layout point.
+SwPosition aPosition(*pCellTextFrame->GetTextNodeForFirstText());
+pCellTextFrame->GetModelPositionForViewPoint(&aPosition, aPoint);
+// Position was 1 without the fix from tdf#141079
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
aPosition.nContent.GetIndex());
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf64222)
 {
 createDoc("tdf64222.docx");
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 5806f06e3b76..6528440e 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1538,8 +1538,12 @@ TextFrameIndex SwTextCursor::GetCursorOfst( SwPosition 
*pPos, const Point &rPoin
 {
 if (pPor->IsPostItsPortion())
 {
-// Offset would be nCurrStart + nLength below, do the same 
for post-it portions.
-nCurrStart += pPor->GetLen();
+SwPostItsPortion* pPostItsPortion = 
dynamic_cast(pPor);
+if (!pPostItsPortion->IsScript()) // tdf#141079
+{
+// Offset would be nCurrStart + nLength below, do the 
same for post-it portions.
+nCurrStart += pPor->GetLen();
+}
 }
 return nCurrStart;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Mike Kaganski (via logerrit)
 include/unotest/bootstrapfixturebase.hxx |1 
 sw/qa/extras/uiwriter/uiwriter3.cxx  |2 
 unotest/source/cpp/bootstrapfixturebase.cxx  |   13 +++
 vcl/qa/cppunit/BackendTest.cxx   |   88 +++
 vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx |2 
 5 files changed, 106 insertions(+)

New commits:
commit 9c6142ec26a0ba61b1cf58d1e6bf0b5376394bcd
Author: Mike Kaganski 
AuthorDate: Tue Mar 30 18:36:08 2021 +0300
Commit: Mike Kaganski 
CommitDate: Tue Mar 30 23:00:37 2021 +0200

Exclude some tests in Windows RDP session

It seems that RDP may change (limit?) color space (even configured
to use 32-bit colors), and then some tests start failing like this:

  Test name: BackendTest::testDrawAlphaBitmapMirrored
  equality assertion failed
  - Expected: c[8000]
  - Actual  : c[8400]

Debugging ImplDrawBitmap in vcl/win/gdi/gdiimpl.cxx, and adding a
call to GetPixel immediately after the call to StretchDIBits, shows
that the resulting color on the device is different from the color
in the bitmap data: e.g., for original color {128, 0, 0} the result
is {132, 0, 0}.

Calling GetColorAdjustment shows that there's no color adjustments
set for the device, so I can't detect or modify the behavior this
way. So just disable the tests for now when running in RDP sessions.

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

diff --git a/include/unotest/bootstrapfixturebase.hxx 
b/include/unotest/bootstrapfixturebase.hxx
index 85f270b02c2c..ac0e1166f8a6 100644
--- a/include/unotest/bootstrapfixturebase.hxx
+++ b/include/unotest/bootstrapfixturebase.hxx
@@ -66,6 +66,7 @@ public:
   virtual void setUp() override;
   virtual void tearDown() override;
 
+  bool isWindowsRDP() const;
 };
 
 }
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 944cb3b3f33b..f998e2313684 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -2622,6 +2622,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135661)
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133477)
 {
+if (isWindowsRDP())
+return;
 load(DATA_DIRECTORY, "tdf133477.fodt");
 SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
 CPPUNIT_ASSERT(pTextDoc);
diff --git a/unotest/source/cpp/bootstrapfixturebase.cxx 
b/unotest/source/cpp/bootstrapfixturebase.cxx
index 5c5b3bcc3a9c..5eb5b91dcaf0 100644
--- a/unotest/source/cpp/bootstrapfixturebase.cxx
+++ b/unotest/source/cpp/bootstrapfixturebase.cxx
@@ -13,6 +13,10 @@
 #include 
 #include 
 
+#if defined _WIN32
+#include 
+#endif
+
 using namespace ::com::sun::star;
 
 // NB. this constructor is called before any tests are run, once for each
@@ -32,4 +36,13 @@ void test::BootstrapFixtureBase::setUp()
 
 void test::BootstrapFixtureBase::tearDown() { 
StarBASIC::DetachAllDocBasicItems(); }
 
+bool test::BootstrapFixtureBase::isWindowsRDP() const
+{
+#if defined _WIN32
+return GetSystemMetrics(SM_REMOTESESSION);
+#else
+return false;
+#endif
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx
index 2f05ac47aea8..bb3abce0f99c 100644
--- a/vcl/qa/cppunit/BackendTest.cxx
+++ b/vcl/qa/cppunit/BackendTest.cxx
@@ -94,6 +94,8 @@ public:
 
 void testDrawRectWithRectangle()
 {
+if (isWindowsRDP())
+return;
 vcl::test::OutputDeviceTestRect aOutDevTest;
 Bitmap aBitmap = aOutDevTest.setupRectangle(false);
 auto eResult = 
vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
@@ -105,6 +107,8 @@ public:
 
 void testDrawRectWithPixel()
 {
+if (isWindowsRDP())
+return;
 vcl::test::OutputDeviceTestPixel aOutDevTest;
 Bitmap aBitmap = aOutDevTest.setupRectangle(false);
 auto eResult = 
vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
@@ -116,6 +120,8 @@ public:
 
 void testDrawRectWithLine()
 {
+if (isWindowsRDP())
+return;
 vcl::test::OutputDeviceTestLine aOutDevTest;
 Bitmap aBitmap = aOutDevTest.setupRectangle(false);
 auto eResult = 
vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
@@ -127,6 +133,8 @@ public:
 
 void testDrawRectWithPolygon()
 {
+if (isWindowsRDP())
+return;
 vcl::test::OutputDeviceTestPolygon aOutDevTest;
 Bitmap aBitmap = aOutDevTest.setupRectangle(false);
 auto eResult = 
vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
@@ -137,6 +145,8 @@ public:
 
 void testDrawRectWithPolyLine()
 {
+if (isWindowsRDP())
+return;
 vcl::test::OutputDeviceTestPolyLine aOutDevTest;
 B

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

2021-03-30 Thread Eike Rathke (via logerrit)
 sc/inc/rangeutl.hxx  |9 +++
 sc/source/core/tool/rangeutl.cxx |   44 +++
 sc/source/ui/app/inputwin.cxx|   28 
 sc/source/ui/view/tabvwsh3.cxx   |7 +-
 4 files changed, 63 insertions(+), 25 deletions(-)

New commits:
commit fb68609fadc7fd46c44f404ac611d87e2cc03ea0
Author: Eike Rathke 
AuthorDate: Tue Mar 30 19:04:55 2021 +0200
Commit: Eike Rathke 
CommitDate: Tue Mar 30 22:28:45 2021 +0200

Related: tdf#137577 Be able to select a global named range from Name Box

... if an identical sheet-local name exists.

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

diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx
index aca68c6c3def..2f4a988725be 100644
--- a/sc/inc/rangeutl.hxx
+++ b/sc/inc/rangeutl.hxx
@@ -32,7 +32,14 @@ class ScArea;
 class ScDocument;
 class ScRangeList;
 
-enum RutlNameScope { RUTL_NONE=0, RUTL_NAMES, RUTL_DBASE };
+enum RutlNameScope
+{
+RUTL_NONE = 0,
+RUTL_NAMES,
+RUTL_NAMES_LOCAL,
+RUTL_NAMES_GLOBAL,
+RUTL_DBASE
+};
 
 class SC_DLLPUBLIC ScRangeUtil
 {
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 18473e0a3d5f..a80db03c56f1 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -248,35 +248,43 @@ bool ScRangeUtil::MakeRangeFromName (
 SCROW nRowStart = 0;
 SCROW nRowEnd = 0;
 
-if( eScope==RUTL_NAMES )
+if (eScope == RUTL_NAMES || eScope == RUTL_NAMES_LOCAL || eScope == 
RUTL_NAMES_GLOBAL)
 {
 OUString aName(rName);
 SCTAB nTable = nCurTab;
 
-// First handle UI names like "local1 (Sheet1)", which point to a local
-// range name.
-const sal_Int32 nEndPos = aName.getLength() - 1;
-if (rName[nEndPos] == ')')
+if (eScope != RUTL_NAMES_GLOBAL)
 {
-const sal_Int32 nStartPos = aName.indexOf(" (");
-if (nStartPos != -1)
+// First handle UI names like "local1 (Sheet1)", which point to a
+// local range name.
+const sal_Int32 nEndPos = aName.getLength() - 1;
+if (rName[nEndPos] == ')')
 {
-OUString aSheetName = aName.copy(nStartPos+2, 
nEndPos-nStartPos-2);
-if (rDoc.GetTable(aSheetName, nTable))
+const sal_Int32 nStartPos = aName.indexOf(" (");
+if (nStartPos != -1)
 {
-aName = aName.copy(0, nStartPos);
+OUString aSheetName = aName.copy(nStartPos+2, 
nEndPos-nStartPos-2);
+if (rDoc.GetTable(aSheetName, nTable))
+{
+aName = aName.copy(0, nStartPos);
+eScope = RUTL_NAMES_LOCAL;
+}
+else
+nTable = nCurTab;
 }
-else
-nTable = nCurTab;
 }
 }
-// Then check for local range names.
-ScRangeName* pRangeNames = rDoc.GetRangeName( nTable );
-ScRangeData* pData = nullptr;
+
 aName = ScGlobal::getCharClassPtr()->uppercase(aName);
-if ( pRangeNames )
-pData = pRangeNames->findByUpperName(aName);
-if (!pData)
+ScRangeData* pData = nullptr;
+if (eScope != RUTL_NAMES_GLOBAL)
+{
+// Check for local range names.
+ScRangeName* pRangeNames = rDoc.GetRangeName( nTable );
+if ( pRangeNames )
+pData = pRangeNames->findByUpperName(aName);
+}
+if (!pData && eScope != RUTL_NAMES_LOCAL)
 pData = rDoc.GetRangeName()->findByUpperName(aName);
 if (pData)
 {
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 3473ffc48109..2b5a48c09d38 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -101,7 +101,8 @@ enum ScNameInputType
 {
 SC_NAME_INPUT_CELL,
 SC_NAME_INPUT_RANGE,
-SC_NAME_INPUT_NAMEDRANGE,
+SC_NAME_INPUT_NAMEDRANGE_LOCAL,
+SC_NAME_INPUT_NAMEDRANGE_GLOBAL,
 SC_NAME_INPUT_DATABASE,
 SC_NAME_INPUT_ROW,
 SC_NAME_INPUT_SHEET,
@@ -2323,14 +2324,23 @@ static ScNameInputType lcl_GetInputType( const 
OUString& rText )
 SCTAB nNameTab;
 sal_Int32 nNumeric;
 
+// From the context we know that when testing for a range name
+// sheet-local scope names have " (sheetname)" appended and global
+// names don't and can't contain ')', so we can force one or the other.
+const RutlNameScope eNameScope =
+((!rText.isEmpty() && rText[rText.getLength()-1] == ')') ? 
RUTL_NAMES_LOCAL : RUTL_NAMES_GLOBAL);
+
 if (rText == ScResId(STR_MANAGE_NAMES))
 eRet = SC_MANAGE_

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

2021-03-30 Thread Caolán McNamara (via logerrit)
 basic/source/sbx/sbxscan.cxx |3 ++-
 sfx2/source/appl/appbas.cxx  |8 
 sfx2/source/doc/objxtor.cxx  |2 +-
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit a69ad67504b32dd644902d8acf4c2a0fef86d3c7
Author: Caolán McNamara 
AuthorDate: Tue Mar 30 15:40:08 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Mar 30 21:23:28 2021 +0200

fix some --disable-scripting warnings

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

diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index de3d50dbed38..0a7be60432a7 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -606,6 +606,8 @@ enum class VbaFormatType
 Null
 };
 
+#if HAVE_FEATURE_SCRIPTING
+
 struct VbaFormatInfo
 {
 VbaFormatType meType;
@@ -614,7 +616,6 @@ struct VbaFormatInfo
 const char* mpOOoFormat; // if meType = VbaFormatType::UserDefined
 };
 
-#if HAVE_FEATURE_SCRIPTING
 const VbaFormatInfo pFormatInfoTable[] =
 {
 { VbaFormatType::Offset,  std::u16string_view(u"Long Date"),   
NF_DATE_SYSTEM_LONG,nullptr },
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 1dec99095687..482b93692200 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -62,7 +62,7 @@ void SfxApplication::SaveBasicAndDialogContainer() const
 BasicManager* SfxApplication::GetBasicManager()
 {
 #if !HAVE_FEATURE_SCRIPTING
-return 0;
+return nullptr;
 #else
 if (utl::ConfigManager::IsFuzzing())
 return nullptr;
@@ -73,7 +73,7 @@ BasicManager* SfxApplication::GetBasicManager()
 XLibraryContainer * SfxApplication::GetDialogContainer()
 {
 #if !HAVE_FEATURE_SCRIPTING
-return NULL;
+return nullptr;
 #else
 if (utl::ConfigManager::IsFuzzing())
 return nullptr;
@@ -87,7 +87,7 @@ XLibraryContainer * SfxApplication::GetDialogContainer()
 XLibraryContainer * SfxApplication::GetBasicContainer()
 {
 #if !HAVE_FEATURE_SCRIPTING
-return NULL;
+return nullptr;
 #else
 if (utl::ConfigManager::IsFuzzing())
 return nullptr;
@@ -100,7 +100,7 @@ XLibraryContainer * SfxApplication::GetBasicContainer()
 StarBASIC* SfxApplication::GetBasic()
 {
 #if !HAVE_FEATURE_SCRIPTING
-return 0;
+return nullptr;
 #else
 if (utl::ConfigManager::IsFuzzing())
 return nullptr;
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index e5de957a4202..6c33cc54e325 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -747,7 +747,7 @@ Reference< XLibraryContainer > 
SfxObjectShell::GetBasicContainer()
 StarBASIC* SfxObjectShell::GetBasic() const
 {
 #if !HAVE_FEATURE_SCRIPTING
-return NULL;
+return nullptr;
 #else
 BasicManager * pMan = GetBasicManager();
 return pMan ? pMan->GetLib(0) : nullptr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Noel Grandin (via logerrit)
 vcl/source/bitmap/BitmapEx.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 344fe3bc48bd84799791e4e321fa37b2150e6b6b
Author: Noel Grandin 
AuthorDate: Tue Mar 30 18:42:28 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 30 21:14:19 2021 +0200

short circuit image creation if dest size is zero

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

diff --git a/vcl/source/bitmap/BitmapEx.cxx b/vcl/source/bitmap/BitmapEx.cxx
index ca80d6650380..0464cbd47f8a 100644
--- a/vcl/source/bitmap/BitmapEx.cxx
+++ b/vcl/source/bitmap/BitmapEx.cxx
@@ -59,7 +59,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, 
Size aSize )
 : meTransparent(TransparentType::NONE)
 , mbAlpha(false)
 {
-if( rBitmapEx.IsEmpty() )
+if( rBitmapEx.IsEmpty() || aSize.IsEmpty() )
 return;
 
 maBitmap = Bitmap(aSize, rBitmapEx.maBitmap.getPixelFormat());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


UX for data providers and transformations for Calc

2021-03-30 Thread Tushar Kumar Rai
Hello.

Please look into this wiki page and provide inputs for interface for Data
Providers.

https://wiki.documentfoundation.org/User:Tusharrai2017

Thanks
Regards
Tushar Kumar Rai
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-03-30 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/style/PageProperties.idl |6 ++
 sw/qa/core/unocore/unocore.cxx   |   14 ++
 sw/source/core/unocore/unomap1.cxx   |1 +
 3 files changed, 21 insertions(+)

New commits:
commit bcbf1c245fa13cfbae2059a996006179c7f4b747
Author: Miklos Vajna 
AuthorDate: Tue Mar 30 14:09:06 2021 +0200
Commit: Miklos Vajna 
CommitDate: Tue Mar 30 20:03:57 2021 +0200

tdf#140343 sw page rtl gutter margin: add UNO API

When true, the gutter position may be right and top, not left and top.

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

diff --git a/offapi/com/sun/star/style/PageProperties.idl 
b/offapi/com/sun/star/style/PageProperties.idl
index 29b561e34538..3189f569d4df 100644
--- a/offapi/com/sun/star/style/PageProperties.idl
+++ b/offapi/com/sun/star/style/PageProperties.idl
@@ -501,6 +501,12 @@ published service PageProperties
  */
 [optional, property] boolean BackgroundFullSize;
 
+/** specifies that the page gutter shall be placed on the right side of 
the page.
+
+@since LibreOffice 7.2
+ */
+[optional, property] boolean RtlGutter;
+
 };
 
 }; }; }; };
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 62c3f439c4e5..cf701a25d423 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -82,6 +82,20 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, flyAtParaAnchor)
 xText->insertTextContent(xAnchor, xFieldmark, false);
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testRtlGutter)
+{
+mxComponent = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+uno::Reference 
xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+   uno::UNO_QUERY);
+// Without the accompanying fix in place, this test would have failed with:
+// - Unknown property: RtlGutter
+auto bRtlGutter = getProperty(xPageStyle, "RtlGutter");
+CPPUNIT_ASSERT(!bRtlGutter);
+xPageStyle->setPropertyValue("RtlGutter", uno::makeAny(true));
+bRtlGutter = getProperty(xPageStyle, "RtlGutter");
+CPPUNIT_ASSERT(bRtlGutter);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unomap1.cxx 
b/sw/source/core/unocore/unomap1.cxx
index 572f1f752c61..803c93f94b1b 100644
--- a/sw/source/core/unocore/unomap1.cxx
+++ b/sw/source/core/unocore/unomap1.cxx
@@ -570,6 +570,7 @@ const SfxItemPropertyMapEntry*  
SwUnoPropertyMapProvider::GetPageStylePropertyMa
 // This entry is for adding that properties to style import/export
 FILL_PROPERTIES_SW
 { u"BackgroundFullSize", RES_BACKGROUND_FULL_SIZE, 
cppu::UnoType::get(), PROPERTY_NONE, 0 },
+{ u"RtlGutter", RES_RTL_GUTTER, cppu::UnoType::get(), 
PROPERTY_NONE, 0 },
 
 // Added DrawingLayer FillStyle Properties for Header. These need an 
own unique name,
 // but reuse the same WhichIDs as the regular fill. The implementation 
will decide to which
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: download.lst external/libcdr solenv/flatpak-manifest.in

2021-03-30 Thread David Tardon (via logerrit)
 download.lst  |4 ++--
 external/libcdr/UnpackedTarball_libcdr.mk |1 -
 external/libcdr/libcdr-no-icu-boolean.patch.1 |   12 
 solenv/flatpak-manifest.in|6 +++---
 4 files changed, 5 insertions(+), 18 deletions(-)

New commits:
commit 64788738db595cb642b7efd49340cae33d92698e
Author: David Tardon 
AuthorDate: Tue Mar 30 17:36:05 2021 +0200
Commit: David Tardon 
CommitDate: Tue Mar 30 19:46:50 2021 +0200

upload libcdr 0.1.7

Change-Id: Ie01fdee7379c398fe7df7c140e2f0059bea71abe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113380
Tested-by: Jenkins
Reviewed-by: David Tardon 

diff --git a/download.lst b/download.lst
index fcb5e165473c..adf73ca23d30 100644
--- a/download.lst
+++ b/download.lst
@@ -25,8 +25,8 @@ export BZIP2_TARBALL := 
00b516f4704d4a7cb50a1d97e6e8e15b-bzip2-1.0.6.tar.gz
 export CAIRO_SHA256SUM := 
5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331
 export CAIRO_VERSION_MICRO := 0
 export CAIRO_TARBALL := cairo-1.16.$(CAIRO_VERSION_MICRO).tar.xz
-export CDR_SHA256SUM := 
01cd00b04a030977e544433c2d127c997205332cd9b8e35ec0ee17110da7f861
-export CDR_TARBALL := libcdr-0.1.6.tar.xz
+export CDR_SHA256SUM := 
5666249d613466b9aa1e987ea4109c04365866e9277d80f6cd9663e86b8ecdd4
+export CDR_TARBALL := libcdr-0.1.7.tar.xz
 export CLUCENE_SHA256SUM := 
ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab
 export CLUCENE_TARBALL := 
48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz
 export DTOA_SHA256SUM := 
0082d0684f7db6f62361b76c4b7faba19e0c7ce5cb8e36c4b65fea8281e711b4
diff --git a/external/libcdr/UnpackedTarball_libcdr.mk 
b/external/libcdr/UnpackedTarball_libcdr.mk
index d8742f3c5f5a..f0e80f06f05f 100644
--- a/external/libcdr/UnpackedTarball_libcdr.mk
+++ b/external/libcdr/UnpackedTarball_libcdr.mk
@@ -17,7 +17,6 @@ $(eval $(call 
gb_UnpackedTarball_update_autoconf_configs,libcdr))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libcdr, \
 external/libcdr/libcdr-visibility-win.patch \
-external/libcdr/libcdr-no-icu-boolean.patch.1 \
 external/libcdr/ax_gcc_func_attribute.m4.patch \
 ))
 
diff --git a/external/libcdr/libcdr-no-icu-boolean.patch.1 
b/external/libcdr/libcdr-no-icu-boolean.patch.1
deleted file mode 100644
index 65884fbbf873..
--- a/external/libcdr/libcdr-no-icu-boolean.patch.1
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur libcdr.org/src/lib/libcdr_utils.cpp libcdr/src/lib/libcdr_utils.cpp
 libcdr.org/src/lib/libcdr_utils.cpp2020-02-02 16:30:44.0 
+0100
-+++ libcdr/src/lib/libcdr_utils.cpp2020-11-16 21:08:04.092927628 +0100
-@@ -108,7 +108,7 @@
- csd = ucsdet_open(&status);
- if (U_FAILURE(status) || !csd)
-   return 0;
--ucsdet_enableInputFilter(csd, TRUE);
-+ucsdet_enableInputFilter(csd, true);
- ucsdet_setText(csd, (const char *)buffer, bufferLength, &status);
- if (U_FAILURE(status))
-   throw libcdr::EncodingException();
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 369184ce7f0a..c86fc663388f 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -219,10 +219,10 @@
 "dest-filename": "external/tarballs/libabw-0.1.3.tar.xz"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/libcdr-0.1.6.tar.xz";,
-"sha256": 
"01cd00b04a030977e544433c2d127c997205332cd9b8e35ec0ee17110da7f861",
+"url": 
"https://dev-www.libreoffice.org/src/libcdr-0.1.7.tar.xz";,
+"sha256": 
"5666249d613466b9aa1e987ea4109c04365866e9277d80f6cd9663e86b8ecdd4",
 "type": "file",
-"dest-filename": "external/tarballs/libcdr-0.1.6.tar.xz"
+"dest-filename": "external/tarballs/libcdr-0.1.7.tar.xz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/libcmis-0.5.2.tar.xz";,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: translations

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

New commits:
commit 42c09f639d68e2b25a108a451e23ac9a5e3312b6
Author: Christian Lohmaier 
AuthorDate: Tue Mar 30 18:45:35 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Mar 30 18:45:35 2021 +0200

Update git submodules

* Update translations from branch 'master'
  to 7b43a13473ab1c692d33577af1ec191179e9079a
  - update translations for master

and force-fix errors using pocheck

Change-Id: I84eb112a5f299d0c0ec33a280ab490cf22ae6d46

diff --git a/translations b/translations
index 943a62baf90a..7b43a13473ab 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 943a62baf90a015aac8846f3b8d88c8a49787fe7
+Subproject commit 7b43a13473ab1c692d33577af1ec191179e9079a
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Stephan Bergmann (via logerrit)
 sw/qa/uitest/writer_tests3/hyperlinkdialog.py |8 
 1 file changed, 8 insertions(+)

New commits:
commit 82b81f00f2de2cf7b6440b1d23a0dd9bece45c48
Author: Stephan Bergmann 
AuthorDate: Tue Mar 30 15:11:55 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Mar 30 18:34:28 2021 +0200

For now, skip problematic test_tdf141166 also for --with-help

...similar to how it already got skipped with
10fbf2b80e11620f3fc1691aa7968e6d3d460db9 "Skip a problematic UITest for
--with-help=html/online".  (And note how the check for "-DWITH_HELP" in 
$SCPDEFS
would unfortunately also hit for the --with-help=html case, see 
configure.ac, if
that were not already filtered with the preceding check, anyway.)

The better fix would arguably be to make the code close both the 
"LibreOffice
Help" window and the "LibreOffice Help Not Installed" dialog, whichever 
shows up
for a given configuration.  But this temporary fix at least gets --with-help
builds like  going again.

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

diff --git a/sw/qa/uitest/writer_tests3/hyperlinkdialog.py 
b/sw/qa/uitest/writer_tests3/hyperlinkdialog.py
index 6e28a02b2dfa..d3554436a935 100644
--- a/sw/qa/uitest/writer_tests3/hyperlinkdialog.py
+++ b/sw/qa/uitest/writer_tests3/hyperlinkdialog.py
@@ -9,6 +9,7 @@
 
 from uitest.framework import UITestCase
 import os
+import re
 import time
 from uitest.uihelper.common import get_state_as_dict, type_text
 from libreoffice.uno.propertyvalue import mkPropertyValues
@@ -88,6 +89,13 @@ class HyperlinkDialog(UITestCase):
 # opened in the user's default browser):
 if os.getenv('ENABLE_HTMLHELP') == 'TRUE':
 return
+# Skip this test for --with-help, as that would fail with a
+# "uno.com.sun.star.uno.RuntimeException: Could not find child with 
id: cancel" thrown from
+# the below execute_blocking_action call, as it would open the 
"LibreOffice Help" window
+# instead of the apparently expected "LibreOffice Help Not Installed" 
dialog that has a
+# "Cancel" button:
+if re.compile(r'-DWITH_HELP\b').search(os.getenv('SCPDEFS')):
+return
 
 self.ui_test.create_doc_in_start_center("writer")
 xWriterDoc = self.xUITest.getTopFocusWindow()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Need help with expert config

2021-03-30 Thread Dante Doménech
Checked changing autoclosebrackets and does not work either.
Note that changing it from UI settings instead of advanced config works.
Should I then make a bug report org.openoffice.Office.Math does not
synchronize,
or update the one that there already is?

El mar, 30 mar 2021 a las 17:34, Mike Kaganski ()
escribió:

> On 30.03.2021 18:06, Dante Doménech wrote:
> > Hello.
> > I while ago I did code this
> > https://gerrit.libreoffice.org/c/core/+/55
> > .
> > It basically allows the user to change the size of the text of the math
> > input box (tdf*130654*
> > ).
> > However at some point it has stopped working.
> >
> > The problem is that the expert config won't update.
> > When you change the value of the zoom from expert config
> > (SmEditWindowZoomFactor), the change of value won't be noticed until the
> > program is relaunched.
> > Read the config by SM_MOD()->GetConfig();
> >
> > That's why, what I have to do to check if the config has been updated
> > and get the new value?
>
> See also: https://bugs.documentfoundation.org/show_bug.cgi?id=132145
> '"com.sun.star.sheet.GlobalSheetSettings" properties and
> "org.openoffice.Office.Calc/Input/" entries are not synchronized'
>
>
> --
> Best regards,
> Mike Kaganski
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-03-30 Thread Eike Rathke (via logerrit)
 sc/inc/document.hxx |2 +-
 sc/source/core/data/documen3.cxx|8 +++-
 sc/source/ui/app/inputhdl.cxx   |2 +-
 sc/source/ui/miscdlgs/optsolver.cxx |4 ++--
 4 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 5464dabc9025b100b782f517a0e86e0d45cdb4e7
Author: Eike Rathke 
AuthorDate: Tue Mar 30 14:05:31 2021 +0200
Commit: Eike Rathke 
CommitDate: Tue Mar 30 18:15:52 2021 +0200

ScDocument::GetRangeAtBlock() name is always passed, so use reference

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

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 0d3078327390..f9582dc4837b 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -820,7 +820,7 @@ public:
 void RefreshDirtyTableColumnNames();
 SC_DLLPUBLIC sc::ExternalDataMapper& GetExternalDataMapper();
 
-SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, 
OUString* pName,
+SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, 
OUString& rName,
  bool* pSheetLocal = 
nullptr ) const;
 
 SC_DLLPUBLIC bool  HasPivotTable() const;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 6f6a9a6f27d6..e3da76da859c 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -234,7 +234,7 @@ bool ScDocument::InsertNewRangeName( SCTAB nTab, const 
OUString& rName, const Sc
 return pLocalNames->insert(pName);
 }
 
-const ScRangeData* ScDocument::GetRangeAtBlock( const ScRange& rBlock, 
OUString* pName, bool* pSheetLocal ) const
+const ScRangeData* ScDocument::GetRangeAtBlock( const ScRange& rBlock, 
OUString& rName, bool* pSheetLocal ) const
 {
 const ScRangeData* pData = nullptr;
 if (rBlock.aStart.Tab() == rBlock.aEnd.Tab())
@@ -245,8 +245,7 @@ const ScRangeData* ScDocument::GetRangeAtBlock( const 
ScRange& rBlock, OUString*
 pData = pLocalNames->findByRange( rBlock );
 if (pData)
 {
-if (pName)
-*pName = pData->GetName();
+rName = pData->GetName();
 if (pSheetLocal)
 *pSheetLocal = true;
 return pData;
@@ -258,8 +257,7 @@ const ScRangeData* ScDocument::GetRangeAtBlock( const 
ScRange& rBlock, OUString*
 pData = pRangeName->findByRange( rBlock );
 if (pData)
 {
-if (pName)
-*pName = pData->GetName();
+rName = pData->GetName();
 if (pSheetLocal)
 *pSheetLocal = false;
 }
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 109035c62a82..0d50b5eb 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -4110,7 +4110,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* 
pState,
 //! Find by Timer?
 if ( pActiveViewSh )
 pActiveViewSh->GetViewData().GetDocument().
-GetRangeAtBlock( ScRange( rSPos, rEPos ), 
&aPosStr, &bSheetLocal);
+GetRangeAtBlock( ScRange( rSPos, rEPos ), aPosStr, 
&bSheetLocal);
 
 if ( aPosStr.isEmpty() )   // Not a name -> format
 {
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx 
b/sc/source/ui/miscdlgs/optsolver.cxx
index dec0442b5d2a..3476efaa456b 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -355,7 +355,7 @@ void ScOptSolverDlg::Init(const ScAddress& rCursorPos)
 {
 m_xRbMax->set_active(true);
 OUString aCursorStr;
-if ( !mrDoc.GetRangeAtBlock( ScRange(rCursorPos), &aCursorStr ) )
+if ( !mrDoc.GetRangeAtBlock( ScRange(rCursorPos), aCursorStr ) )
 aCursorStr = rCursorPos.Format(ScRefFlags::ADDR_ABS, nullptr, 
mrDoc.GetAddressConvention());
 m_xEdObjectiveCell->SetRefString( aCursorStr );
 if ( bImplHasElements )
@@ -465,7 +465,7 @@ void ScOptSolverDlg::SetReference( const ScRange& rRef, 
ScDocument& rDocP )
 aNewRef.aEnd = aAdr;
 
 OUString aName;
-if ( rDocP.GetRangeAtBlock( aNewRef, &aName ) )// named range: 
show name
+if ( rDocP.GetRangeAtBlock( aNewRef, aName ) )// named range: 
show name
 aStr = aName;
 else// format 
cell/range reference
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: distro-configs/LibreOfficeOssFuzz.conf

2021-03-30 Thread Caolán McNamara (via logerrit)
 distro-configs/LibreOfficeOssFuzz.conf |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 4761b5f9820719ad400f7114dc647799a345a836
Author: Caolán McNamara 
AuthorDate: Tue Mar 30 15:51:14 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Mar 30 17:42:05 2021 +0200

drop ---disable-scripting again for fuzzing

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

diff --git a/distro-configs/LibreOfficeOssFuzz.conf 
b/distro-configs/LibreOfficeOssFuzz.conf
index 61acf2d80c00..7d4cf1e672fd 100644
--- a/distro-configs/LibreOfficeOssFuzz.conf
+++ b/distro-configs/LibreOfficeOssFuzz.conf
@@ -18,5 +18,4 @@
 --disable-odk
 --disable-zxing
 --without-java
---disable-scripting
 --enable-ld=gold
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Need help with expert config

2021-03-30 Thread Mike Kaganski

On 30.03.2021 18:06, Dante Doménech wrote:

Hello.
I while ago I did code this 
https://gerrit.libreoffice.org/c/core/+/55 
.
It basically allows the user to change the size of the text of the math 
input box (tdf*130654* 
).

However at some point it has stopped working.

The problem is that the expert config won't update.
When you change the value of the zoom from expert config 
(SmEditWindowZoomFactor), the change of value won't be noticed until the 
program is relaunched.

Read the config by SM_MOD()->GetConfig();

That's why, what I have to do to check if the config has been updated 
and get the new value?


See also: https://bugs.documentfoundation.org/show_bug.cgi?id=132145
'"com.sun.star.sheet.GlobalSheetSettings" properties and 
"org.openoffice.Office.Calc/Input/" entries are not synchronized'



--
Best regards,
Mike Kaganski
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Need help with expert config

2021-03-30 Thread Dante Doménech
Hello.
I while ago I did code this https://gerrit.libreoffice.org/c/core/+/55.
It basically allows the user to change the size of the text of the math
input box (tdf*130654*
).
However at some point it has stopped working.

The problem is that the expert config won't update.
When you change the value of the zoom from expert config
(SmEditWindowZoomFactor), the change of value won't be noticed until the
program is relaunched.
Read the config by SM_MOD()->GetConfig();

That's why, what I have to do to check if the config has been updated and
get the new value?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 0 commits -

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


[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 506 commits - accessibility/inc accessibility/README accessibility/README.md android/README android/README.md android/source animat

2021-03-30 Thread Caolán McNamara (via logerrit)
Rebased ref, commits from common ancestor:
commit 62cfca2a292af3e80b17d8b6ed5537665a8b9755
Author: Caolán McNamara 
AuthorDate: Fri Mar 12 14:25:34 2021 +
Commit: Tomaž Vajngerl 
CommitDate: Tue Mar 30 23:54:20 2021 +0900

weld the sidebar deck

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

diff --git a/sfx2/source/sidebar/DeckLayouter.cxx 
b/sfx2/source/sidebar/DeckLayouter.cxx
index aea8b9b651ee..b80c80e80407 100644
--- a/sfx2/source/sidebar/DeckLayouter.cxx
+++ b/sfx2/source/sidebar/DeckLayouter.cxx
@@ -216,6 +216,18 @@ void LayoutPanels (
 eMode==MinimumOrLarger);
 }
 
+<<< HEAD
+===
+if (bShowVerticalScrollBar)
+{
+const sal_Int32 nContentHeight(
+eMode==Preferred
+? nTotalPreferredHeight + nTotalDecorationHeight
+: aBox.GetHeight());
+SetupVerticalScrollBar(rVerticalScrollBar, nContentHeight, 
aBox.GetHeight());
+}
+
+>>> d03e3c66cf68 (weld the sidebar deck)
 const sal_Int32 nUsedHeight(PlacePanels(rLayoutItems, eMode));
 rMinimalHeight = nUsedHeight;
 }
commit acbbeb24968a82426d0b7f8a13a9f1f111e3d767
Author: Tomaž Vajngerl 
AuthorDate: Thu Mar 18 15:59:20 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Mar 30 23:52:59 2021 +0900

vcl: bring back RGB565 scanline transformer

While we don't support this as a Bitmap format anymore, we still
need to transform a buffer that is in RGB565 format in some cases.
For example backwards compatibility or if a certain bitmap format
supports such pixel format.
This change also simplifies some scanline transformers by removing
code duplication.

Change-Id: I64aa258b8b1fbebf0ed174c0d5fdd2f75f382b28

diff --git a/vcl/inc/bitmap/ScanlineTools.hxx b/vcl/inc/bitmap/ScanlineTools.hxx
index 98e702549f2b..fcb243e72014 100644
--- a/vcl/inc/bitmap/ScanlineTools.hxx
+++ b/vcl/inc/bitmap/ScanlineTools.hxx
@@ -16,7 +16,7 @@
 
 namespace vcl::bitmap
 {
-class ScanlineTransformer
+class IScanlineTransformer
 {
 public:
 virtual void startLine(sal_uInt8* pLine) = 0;
@@ -24,127 +24,163 @@ public:
 virtual Color readPixel() = 0;
 virtual void writePixel(Color nColor) = 0;
 
-virtual ~ScanlineTransformer() = default;
+virtual ~IScanlineTransformer() = default;
 };
 
-class ScanlineTransformer_ARGB final : public ScanlineTransformer
+class ScanlineTransformer_RGB565 : public IScanlineTransformer
 {
-private:
-sal_uInt8* pData;
+protected:
+sal_uInt16* mpData;
 
 public:
-virtual void startLine(sal_uInt8* pLine) override { pData = pLine; }
+void startLine(sal_uInt8* pLine) override { mpData = 
reinterpret_cast(pLine); }
 
-virtual void skipPixel(sal_uInt32 nPixel) override { pData += nPixel << 2; 
}
+void skipPixel(sal_uInt32 nPixel) override { mpData += nPixel; }
 
-virtual Color readPixel() override
+Color readPixel() override
 {
-const Color aColor(ColorTransparency, pData[4], pData[1], pData[2], 
pData[3]);
-pData += 4;
-return aColor;
+sal_uInt8 R = sal_uInt8((*mpData & 0xf800) >> 8);
+sal_uInt8 G = sal_uInt8((*mpData & 0x07e0) >> 3);
+sal_uInt8 B = sal_uInt8((*mpData & 0x001f) << 3);
+mpData++;
+return Color(R, G, B);
 }
 
-virtual void writePixel(Color nColor) override
+void writePixel(Color nColor) override
 {
-*pData++ = nColor.GetAlpha();
-*pData++ = nColor.GetRed();
-*pData++ = nColor.GetGreen();
-*pData++ = nColor.GetBlue();
+sal_uInt16 R = (nColor.GetRed() & 0xf8) << 8;
+sal_uInt16 G = (nColor.GetGreen() & 0xfc) << 3;
+sal_uInt16 B = (nColor.GetBlue() & 0xf8) >> 3;
+
+*mpData++ = R | G | B;
 }
 };
 
-class ScanlineTransformer_BGR final : public ScanlineTransformer
+class ScanlineTransformerBase : public IScanlineTransformer
 {
-private:
-sal_uInt8* pData;
+protected:
+sal_uInt8* mpData;
 
 public:
-virtual void startLine(sal_uInt8* pLine) override { pData = pLine; }
+ScanlineTransformerBase()
+: mpData(nullptr)
+{
+}
 
-virtual void skipPixel(sal_uInt32 nPixel) override { pData += (nPixel << 
1) + nPixel; }
+void startLine(sal_uInt8* pLine) override { mpData = pLine; }
+};
 
-virtual Color readPixel() override
+class ScanlineTransformer_ARGB final : public ScanlineTransformerBase
+{
+public:
+void skipPixel(sal_uInt32 nPixel) override { mpData += nPixel << 2; }
+
+Color readPixel() override
 {
-const Color aColor(pData[2], pData[1], pData[0]);
-pData += 3;
+const Color aColor(ColorTransparency, mpData[4], mpData[1], mpData[2], 
mpData[3]);
+mpData += 4;
 return aColor;
 }
 
-virtual void writePixel(Color nColor) override
+void writePixel(Color nColor) override

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

2021-03-30 Thread Heiko Tietze (via logerrit)
 cui/inc/tipoftheday.hrc   |2 +-
 cui/source/dialogs/tipofthedaydlg.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d553366978bef46f353c99f4fda2c8476a39
Author: Heiko Tietze 
AuthorDate: Tue Mar 30 11:26:59 2021 +0200
Commit: Rizal Muttaqin 
CommitDate: Tue Mar 30 16:43:31 2021 +0200

tdf#140839 - TotD image size

Previous size of 100x120 has shown to be too small for
thumbnails so we agreed on 150x150

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

diff --git a/cui/inc/tipoftheday.hrc b/cui/inc/tipoftheday.hrc
index 107e39cf803f..401ff2c4907a 100644
--- a/cui/inc/tipoftheday.hrc
+++ b/cui/inc/tipoftheday.hrc
@@ -41,7 +41,7 @@
  * image:
* leave the image string empty for the default tipoftheday.png
* place new images at extra/source/tipoftheday and do not forget to add the 
files to vcl/Package_tipoftheday.mk
-   * do not exceed 100x120px too much - images do not get scaled
+   * images are scaled to 150x150px; const ThumbSize() in tipoftheday.cxx
 */
 
 const std::tuple TIPOFTHEDAY_STRINGARRAY[] =
diff --git a/cui/source/dialogs/tipofthedaydlg.cxx 
b/cui/source/dialogs/tipofthedaydlg.cxx
index 478780578b56..9d43fd21f4ba 100644
--- a/cui/source/dialogs/tipofthedaydlg.cxx
+++ b/cui/source/dialogs/tipofthedaydlg.cxx
@@ -43,7 +43,7 @@
 #include 
 
 //size of preview
-const Size ThumbSize(100, 120);
+const Size ThumbSize(150, 150);
 
 TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent)
 : GenericDialogController(pParent, "cui/ui/tipofthedaydialog.ui", 
"TipOfTheDayDialog")
___
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' - vcl/unx

2021-03-30 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit ca464268484ade5d20d453e9b23f18d513aa2af4
Author: Caolán McNamara 
AuthorDate: Tue Mar 30 12:11:42 2021 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Mar 30 16:05:52 2021 +0200

fix the endif placement for GTK_CHECK_VERSION

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index f29c0c018ad3..773b20ac5b07 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -7783,8 +7783,8 @@ private:
 
 gdk_event_free(pKeyEvent);
 }
-#else
 else
+#endif
 {
 guint nButton;
 guint32 nTime;
@@ -7806,7 +7806,6 @@ private:
 
 gtk_menu_popup(m_pMenu, nullptr, nullptr, nullptr, nullptr, 
nButton, nTime);
 }
-#endif
 
 if (g_main_loop_is_running(pLoop))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - icon-themes/karasa_jaga icon-themes/karasa_jaga_svg

2021-03-30 Thread Rizal Muttaqin (via logerrit)
 icon-themes/karasa_jaga/cmd/ar/sc_defaultnumbering.png|binary
 icon-themes/karasa_jaga/cmd/ar/sc_linenumberingdialog.png |binary
 icon-themes/karasa_jaga/cmd/sc_defaultnumbering.png   |binary
 icon-themes/karasa_jaga/cmd/sc_linenumberingdialog.png|binary
 icon-themes/karasa_jaga_svg/cmd/ar/sc_defaultnumbering.svg|2 +-
 icon-themes/karasa_jaga_svg/cmd/ar/sc_linenumberingdialog.svg |2 +-
 icon-themes/karasa_jaga_svg/cmd/sc_defaultnumbering.svg   |2 +-
 icon-themes/karasa_jaga_svg/cmd/sc_linenumberingdialog.svg|2 +-
 8 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 0fef5798d7aa90dfc025ff53dba6476d932605dd
Author: Rizal Muttaqin 
AuthorDate: Tue Mar 30 11:49:16 2021 +0700
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Mar 30 16:03:44 2021 +0200

KJ: Improve small numbering icons

Change-Id: I5e6aff983875c8144450b8c484cbc25e5eb465fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/11
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin 
(cherry picked from commit a247d2f896d7fcb30f35cf95f69e32534a475fba)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113287
Tested-by: Adolfo Jayme Barrientos 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/icon-themes/karasa_jaga/cmd/ar/sc_defaultnumbering.png 
b/icon-themes/karasa_jaga/cmd/ar/sc_defaultnumbering.png
index 7247281c3ad1..6255d5be3a46 100644
Binary files a/icon-themes/karasa_jaga/cmd/ar/sc_defaultnumbering.png and 
b/icon-themes/karasa_jaga/cmd/ar/sc_defaultnumbering.png differ
diff --git a/icon-themes/karasa_jaga/cmd/ar/sc_linenumberingdialog.png 
b/icon-themes/karasa_jaga/cmd/ar/sc_linenumberingdialog.png
index bca545c56639..094ef7c30507 100644
Binary files a/icon-themes/karasa_jaga/cmd/ar/sc_linenumberingdialog.png and 
b/icon-themes/karasa_jaga/cmd/ar/sc_linenumberingdialog.png differ
diff --git a/icon-themes/karasa_jaga/cmd/sc_defaultnumbering.png 
b/icon-themes/karasa_jaga/cmd/sc_defaultnumbering.png
index ca437a82c63e..6aed602d256b 100644
Binary files a/icon-themes/karasa_jaga/cmd/sc_defaultnumbering.png and 
b/icon-themes/karasa_jaga/cmd/sc_defaultnumbering.png differ
diff --git a/icon-themes/karasa_jaga/cmd/sc_linenumberingdialog.png 
b/icon-themes/karasa_jaga/cmd/sc_linenumberingdialog.png
index 49bdb065819c..e06aff69b007 100644
Binary files a/icon-themes/karasa_jaga/cmd/sc_linenumberingdialog.png and 
b/icon-themes/karasa_jaga/cmd/sc_linenumberingdialog.png differ
diff --git a/icon-themes/karasa_jaga_svg/cmd/ar/sc_defaultnumbering.svg 
b/icon-themes/karasa_jaga_svg/cmd/ar/sc_defaultnumbering.svg
index aee94eb670f0..52386857dad5 100644
--- a/icon-themes/karasa_jaga_svg/cmd/ar/sc_defaultnumbering.svg
+++ b/icon-themes/karasa_jaga_svg/cmd/ar/sc_defaultnumbering.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
\ No newline at end of file
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
\ No newline at end of file
diff --git a/icon-themes/karasa_jaga_svg/cmd/ar/sc_linenumberingdialog.svg 
b/icon-themes/karasa_jaga_svg/cmd/ar/sc_linenumberingdialog.svg
index 9fca94d77f30..81176347fd67 100644
--- a/icon-themes/karasa_jaga_svg/cmd/ar/sc_linenumberingdialog.svg
+++ b/icon-themes/karasa_jaga_svg/cmd/ar/sc_linenumberingdialog.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
\ No newline at end of file
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
\ No newline at end of file
diff --git a/icon-themes/karasa_jaga_svg/cmd/sc_defaultnumbering.svg 
b/icon-themes/karasa_jaga_svg/cmd/sc_defaultnumbering.svg
index 9fe105b81da5..b0115eded738 100644
--- a/icon-themes/karasa_jaga_svg/cmd/sc_defaultnumbering.svg
+++ b/icon-themes/karasa_jaga_svg/cmd/sc_defaultnumbering.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
\ No newline at end of file
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
\ No newline at end of file
diff --git a/icon-themes/karasa_jaga_svg/cmd/sc_linenumberingdialog.svg 
b/icon-themes/karasa_jaga_svg/cmd/sc_linenumberingdialog.svg
index 2f3e9878cfc5..98c4b00bdd36 100644
--- a/icon-themes/karasa_jaga_svg/cmd/sc_linenumberingdialog.svg
+++ b/icon-themes/karasa_jaga_svg/cmd/sc_linenumberingdialog.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
\ No newline at end of file
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
\ No newline at end of file
___
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' - oox/source sd/qa

2021-03-30 Thread Tibor Nagy (via logerrit)
 oox/source/drawingml/hyperlinkcontext.cxx |3 +-
 oox/source/drawingml/textrun.cxx  |4 ++
 sd/qa/unit/data/pptx/tdf137367.pptx   |binary
 sd/qa/unit/import-tests.cxx   |   41 ++
 4 files changed, 46 insertions(+), 2 deletions(-)

New commits:
commit a8f834ed66d4b2c2eab06be751d913b5eba2aeac
Author: Tibor Nagy 
AuthorDate: Fri Mar 12 11:35:53 2021 +0100
Commit: Xisco Fauli 
CommitDate: Tue Mar 30 15:45:57 2021 +0200

tdf#137367 PPTX import: fix lost direct hyperlink colors

Regression from commit 92f74f6ccb5a55807724db85815f7ea0c49370e0
(bnc#887230: always use theme color for hyperlinks in Impress)

Testing: direct color of the first text line is theme based
(a:rPr/a:solidFill/a:schemeClr), the second line contains
a direct color (a:rPr/a:solidFill/a:srgbClr), the third one
contains a theme based direct color darkened by 25.000%
(val=75000 of a:rPr/a:solidFill/a:schemeClr/a:lumMod).

Note: overwriting default theme based hyperlink colors is
also supported by Google Docs, Office 365 and MS Office 2019.

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

diff --git a/oox/source/drawingml/hyperlinkcontext.cxx 
b/oox/source/drawingml/hyperlinkcontext.cxx
index d0a09b140dcf..267216ff7500 100644
--- a/oox/source/drawingml/hyperlinkcontext.cxx
+++ b/oox/source/drawingml/hyperlinkcontext.cxx
@@ -150,7 +150,8 @@ ContextHandlerRef HyperLinkContext::onCreateContext(
 switch( aElement )
 {
 case A_TOKEN( extLst ):
-return nullptr;
+maProperties.setProperty(PROP_CharColor, XML_fillcolor);
+break;
 case A_TOKEN( snd ):
 // TODO use getEmbeddedWAVAudioFile() here
 break;
diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx
index 8b34fd99082e..ab87fb732141 100644
--- a/oox/source/drawingml/textrun.cxx
+++ b/oox/source/drawingml/textrun.cxx
@@ -148,7 +148,9 @@ sal_Int32 TextRun::insertAt(
 
 xTextFieldCursor->gotoEnd( true );
 
-aTextCharacterProps.maFillProperties.maFillColor.setSchemeClr( 
XML_hlink );
+if 
(!maTextCharacterProperties.maHyperlinkPropertyMap.hasProperty(PROP_CharColor))
+
aTextCharacterProps.maFillProperties.maFillColor.setSchemeClr(XML_hlink);
+
 
aTextCharacterProps.maFillProperties.moFillType.set(XML_solidFill);
 if ( !maTextCharacterProperties.moUnderline.has() )
 aTextCharacterProps.moUnderline.set( XML_sng );
diff --git a/sd/qa/unit/data/pptx/tdf137367.pptx 
b/sd/qa/unit/data/pptx/tdf137367.pptx
new file mode 100644
index ..cf6aa086d9a8
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf137367.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index a60d6f601bfc..e140c41c126d 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -122,6 +122,7 @@ public:
 virtual void setUp() override;
 
 void testDocumentLayout();
+void testHyperlinkColor();
 void testSmoketest();
 void testN759180();
 void testN778859();
@@ -239,6 +240,7 @@ public:
 CPPUNIT_TEST_SUITE(SdImportTest);
 
 CPPUNIT_TEST(testDocumentLayout);
+CPPUNIT_TEST(testHyperlinkColor);
 CPPUNIT_TEST(testSmoketest);
 CPPUNIT_TEST(testN759180);
 CPPUNIT_TEST(testN778859);
@@ -432,6 +434,45 @@ void SdImportTest::testDocumentLayout()
 }
 }
 
+void SdImportTest::testHyperlinkColor()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf137367.pptx"), 
PPTX);
+
+uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, 
xDocShRef ) );
+
+// Get first paragraph of the text
+uno::Reference const xParagraph1( getParagraphFromShape( 
0, xShape ) );
+// Get second paragraph of the text
+uno::Reference const xParagraph2( getParagraphFromShape( 
1, xShape ) );
+// Get third paragraph of the text
+uno::Reference const xParagraph3( getParagraphFromShape( 
2, xShape ) );
+
+// Get run of the first paragraph
+uno::Reference xRun1( getRunFromParagraph (0, 
xParagraph1 ) );
+uno::Reference< beans::XPropertySet > xPropSet1( xRun1, 
uno::UNO_QUERY_THROW );
+sal_Int32 nCharColorBlue;
+xPropSet1->getPropertyValue( "CharColor" ) >>= nCharColorBlue;
+
+// Get run of the second paragraph
+uno::Reference xRun2( getRunFromParagraph (1, 
xParagraph2 ) );
+uno::Reference< beans::XPropertySet > xPropSet2( xRun2, 
uno::UNO_QUERY_THROW );
+sal_Int32 nCharColorRed;
+xPropSet2->getPropertyValue( 

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

2021-03-30 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 1a1d2ad0e2dff2c948e09e1488cbd8f8ea651bec
Author: Caolán McNamara 
AuthorDate: Tue Mar 30 12:11:42 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Mar 30 15:42:02 2021 +0200

fix the endif placement for GTK_CHECK_VERSION

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 2b9463544c5d..95377fbe6594 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -7949,8 +7949,8 @@ private:
 
 gdk_event_free(pKeyEvent);
 }
-#else
 else
+#endif
 {
 guint nButton;
 guint32 nTime;
@@ -7972,7 +7972,6 @@ private:
 
 gtk_menu_popup(m_pMenu, nullptr, nullptr, nullptr, nullptr, 
nButton, nTime);
 }
-#endif
 
 if (g_main_loop_is_running(pLoop))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Szymon Kłos (via logerrit)
 include/svx/svdedtv.hxx  |6 +++
 sd/qa/unit/tiledrendering/tiledrendering.cxx |   51 +++
 svx/source/svdraw/svdedtv.cxx|   21 +--
 3 files changed, 74 insertions(+), 4 deletions(-)

New commits:
commit 795005f210e74bf04be798609ca1d4d93be74061
Author: Szymon Kłos 
AuthorDate: Fri Mar 26 09:30:18 2021 +0100
Commit: Jan Holesovsky 
CommitDate: Tue Mar 30 15:16:57 2021 +0200

Don't end text editing in other views if shape inserted

This is revert of a small piece of
tdf#126180: EndTextEdit on all views before delete/cut slide
e6c7a018a0cfee395ce2886d41c908a2447ef5cc

Change needed for online where multiple users work together
and we need to not disturb other views in editing.

Change-Id: I73c2289a9d950465f020f684e9e736148380f5c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113148
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 4351ccee2764..51da6124ed88 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -185,6 +185,12 @@ public:
 void SetUndoComment(const OUString& rComment, const OUString& rObjDescr) { 
mpModel->SetUndoComment(rComment,rObjDescr); }
 bool IsUndoEnabled() const;
 
+/**
+ * Checks if this or other views have an active text edit, in which case 
object undos are not
+ * created.
+ */
+bool CanDoSdrUndo() const;
+
 /**
  * Checks if this or other views have an active text edit, if true, end 
them.
  */
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 61940c1e8c2a..161aed640277 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -114,6 +114,7 @@ public:
 void testCommentChangeDraw();
 void testMultiViewInsertDeletePage();
 void testMultiViewInsertDeletePage2();
+void testEditingTextBoxAndInsertShapeInterrupt();
 void testDisableUndoRepair();
 void testDocumentRepair();
 void testLanguageStatus();
@@ -167,6 +168,7 @@ public:
 CPPUNIT_TEST(testCommentChangeDraw);
 CPPUNIT_TEST(testMultiViewInsertDeletePage);
 CPPUNIT_TEST(testMultiViewInsertDeletePage2);
+CPPUNIT_TEST(testEditingTextBoxAndInsertShapeInterrupt);
 CPPUNIT_TEST(testDisableUndoRepair);
 CPPUNIT_TEST(testDocumentRepair);
 CPPUNIT_TEST(testLanguageStatus);
@@ -1986,6 +1988,55 @@ void 
SdTiledRenderingTest::testMultiViewInsertDeletePage2()
 CPPUNIT_ASSERT(pViewShell->GetView()->IsTextEdit());
 }
 
+void SdTiledRenderingTest::testEditingTextBoxAndInsertShapeInterrupt()
+{
+// Load the document.
+SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
+ViewCallback aView1;
+int nView1 = SfxLokHelper::getView();
+uno::Sequence aArgs;
+
+// Create second view
+SfxLokHelper::createView();
+pXImpressDocument->initializeForTiledRendering(aArgs);
+ViewCallback aView2;
+int nView2 = SfxLokHelper::getView();
+
+// Switch to 5th page in 2nd view
+pXImpressDocument->setPart(4);
+
+// Begin text edit on the only object on the slide.
+sd::ViewShell* pViewShell = 
pXImpressDocument->GetDocShell()->GetViewShell();
+SdPage* pActualPage = pViewShell->GetActualPage();
+SdrObject* pObject1 = pActualPage->GetObj(0);
+CPPUNIT_ASSERT(pObject1 != nullptr);
+CPPUNIT_ASSERT_EQUAL(static_cast(OBJ_TITLETEXT), 
pObject1->GetObjIdentifier());
+SdrTextObj* pTextObject = static_cast(pObject1);
+
+// Double-click outside the text to enter edit mode.
+const ::tools::Rectangle aRect = pTextObject->GetCurrentBoundRect();
+const auto cornerX = convertMm100ToTwip(aRect.getX() + (aRect.getWidth() / 
4));
+const auto cornerY = convertMm100ToTwip(aRect.getY() + (aRect.getHeight() 
/ 4));
+pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN,
+  cornerX, cornerY,
+  2, MOUSE_LEFT, 0);
+pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONUP,
+  cornerX, cornerY,
+  2, MOUSE_LEFT, 0);
+Scheduler::ProcessEventsToIdle();
+
+// We must be in text editing mode and have cursor visible.
+CPPUNIT_ASSERT(pViewShell->GetView()->IsTextEdit());
+
+// Insert shape in 1st view
+SfxLokHelper::setView(nView1);
+comphelper::dispatchCommand(".uno:BasicShapes.rectangle", aArgs);
+
+// We must be still in text editing mode and have cursor visible.
+SfxLokHelper::setView(nView2);
+CPPUNIT_ASSERT(pViewShell->GetView()->IsTextEdit());
+}
+
 void SdTiledRenderingTest::testDisableUndoRepair()
 {
 // Load the document.
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index b301d19312d2..b48174ad8b57 100644
--- a/svx

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

2021-03-30 Thread Szymon Kłos (via logerrit)
 sc/source/ui/app/inputwin.cxx |   13 +
 sc/source/ui/inc/inputwin.hxx |2 ++
 2 files changed, 15 insertions(+)

New commits:
commit 09afa34955d76419ebe8f4d15780d801f95256ca
Author: Szymon Kłos 
AuthorDate: Mon Mar 29 12:11:27 2021 +0200
Commit: Jan Holesovsky 
CommitDate: Tue Mar 30 15:14:32 2021 +0200

online: update calc inputbar position on change

Change-Id: I9b340cb0f5d5d28b0cc683878ba8fad2c4d8a5af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113307
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index b106a188dbd3..b718ba7cb7a5 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -487,6 +487,19 @@ void ScInputWindow::SetSizePixel( const Size& rNewSize )
 ToolBox::SetSizePixel(rNewSize);
 }
 
+void ScInputWindow::setPosSizePixel(long nX, long nY, long nWidth, long 
nHeight, PosSizeFlags nFlags)
+{
+ToolBox::setPosSizePixel(nX, nY, nWidth, nHeight, nFlags);
+if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
+{
+std::vector aItems;
+aItems.emplace_back(std::make_pair("position", 
Point(GetOutOffXPixel(), GetOutOffYPixel()).toString()));
+aItems.emplace_back("size", GetSizePixel().toString());
+aItems.emplace_back("lines", 
OString::number(aTextWindow.GetNumLines()));
+pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems);
+}
+}
+
 void ScInputWindow::Resize()
 {
 ToolBox::Resize();
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 9150096fec72..c77ecb8d0e59 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -259,6 +259,8 @@ public:
 
 virtual voidPaint( vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect ) override;
 virtual voidPixelInvalidate(const tools::Rectangle* pRectangle) 
override;
+virtual voidsetPosSizePixel( long nX, long nY, long nWidth, long 
nHeight,
+ PosSizeFlags nFlags = PosSizeFlags::All ) 
override;
 virtual voidSetSizePixel( const Size& rNewSize ) override;
 virtual voidResize() override;
 virtual voidSelect() override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/uiwriter/data/tdf135662.odt |binary
 sw/qa/extras/uiwriter/uiwriter3.cxx  |   26 ++
 2 files changed, 26 insertions(+)

New commits:
commit ed8b1b78272f7fce657fb7b5fd311c456df0916d
Author: Xisco Fauli 
AuthorDate: Tue Mar 30 12:17:42 2021 +0200
Commit: Xisco Fauli 
CommitDate: Tue Mar 30 14:56:47 2021 +0200

tdf#135662: sw_uiwriter3: Add unittest

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

diff --git a/sw/qa/extras/uiwriter/data/tdf135662.odt 
b/sw/qa/extras/uiwriter/data/tdf135662.odt
new file mode 100644
index ..d65725bda510
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf135662.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 47407eaf7149..944cb3b3f33b 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -83,6 +83,32 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf129382)
 CPPUNIT_ASSERT_EQUAL(8, getShapes());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135662)
+{
+load(DATA_DIRECTORY, "tdf135662.odt");
+
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+
+CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+rtl::Reference xTransfer = new SwTransferable(*pWrtShell);
+xTransfer->Cut();
+
+CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+TransferableDataHelper aHelper(xTransfer);
+SwTransferable::Paste(*pWrtShell, aHelper);
+
+// Without the fix in place, this test would have failed with
+// - Expected: 2
+// - Actual  : 1
+CPPUNIT_ASSERT_EQUAL(2, getShapes());
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134227)
 {
 load(DATA_DIRECTORY, "tdf134227.docx");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Eike Rathke (via logerrit)
 sc/inc/document.hxx  |3 ++-
 sc/qa/uitest/range_name/create_range_name.py |3 ++-
 sc/source/core/data/documen3.cxx |   13 ++---
 sc/source/ui/app/inputhdl.cxx|9 -
 sc/source/ui/app/inputwin.cxx|7 ++-
 sc/source/ui/inc/inputwin.hxx|2 ++
 6 files changed, 26 insertions(+), 11 deletions(-)

New commits:
commit 65cba409936d133aa05f9934db28bd2555a38676
Author: Eike Rathke 
AuthorDate: Tue Mar 30 01:50:38 2021 +0200
Commit: Eike Rathke 
CommitDate: Tue Mar 30 14:02:12 2021 +0200

Related: tdf#137577 Display (sheetname) with sheet-local names in Name Box

... if current cell selection matches a sheet-local name, so it
can be differentiated from an identically named global name. Which
is already the case when listing and picking a name from the list.

Made it necessary to adapt an UI test checking for Name Box
content.

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

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 72f84cd9ba9b..0d3078327390 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -820,7 +820,8 @@ public:
 void RefreshDirtyTableColumnNames();
 SC_DLLPUBLIC sc::ExternalDataMapper& GetExternalDataMapper();
 
-SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, 
OUString* pName ) const;
+SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, 
OUString* pName,
+ bool* pSheetLocal = 
nullptr ) const;
 
 SC_DLLPUBLIC bool  HasPivotTable() const;
 SC_DLLPUBLIC ScDPCollection*   GetDPCollection();
diff --git a/sc/qa/uitest/range_name/create_range_name.py 
b/sc/qa/uitest/range_name/create_range_name.py
index e4fab4e4329d..989532bf5643 100644
--- a/sc/qa/uitest/range_name/create_range_name.py
+++ b/sc/qa/uitest/range_name/create_range_name.py
@@ -114,7 +114,8 @@ class CreateRangeNameTest(UITestCase):
 
 # tdf#67007: Without the fix in place, this test would have failed with
 # AssertionError: 'localRangeName' != 'A1'
-self.assertEqual('localRangeName', 
get_state_as_dict(xPosWindow)['Text'])
+# Additionally, newly check a sheet-local scoped name has " 
(sheetname)" appended.
+self.assertEqual('localRangeName (Sheet1)', 
get_state_as_dict(xPosWindow)['Text'])
 
 gridwin = calcDoc.getChild("grid_window")
 enter_text_to_cell(gridwin, "A1", "1")
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 798fa467948b..6f6a9a6f27d6 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -234,7 +234,7 @@ bool ScDocument::InsertNewRangeName( SCTAB nTab, const 
OUString& rName, const Sc
 return pLocalNames->insert(pName);
 }
 
-const ScRangeData* ScDocument::GetRangeAtBlock( const ScRange& rBlock, 
OUString* pName ) const
+const ScRangeData* ScDocument::GetRangeAtBlock( const ScRange& rBlock, 
OUString* pName, bool* pSheetLocal ) const
 {
 const ScRangeData* pData = nullptr;
 if (rBlock.aStart.Tab() == rBlock.aEnd.Tab())
@@ -247,6 +247,8 @@ const ScRangeData* ScDocument::GetRangeAtBlock( const 
ScRange& rBlock, OUString*
 {
 if (pName)
 *pName = pData->GetName();
+if (pSheetLocal)
+*pSheetLocal = true;
 return pData;
 }
 }
@@ -254,8 +256,13 @@ const ScRangeData* ScDocument::GetRangeAtBlock( const 
ScRange& rBlock, OUString*
 if ( pRangeName )
 {
 pData = pRangeName->findByRange( rBlock );
-if (pData && pName)
-*pName = pData->GetName();
+if (pData)
+{
+if (pName)
+*pName = pData->GetName();
+if (pSheetLocal)
+*pSheetLocal = false;
+}
 }
 return pData;
 }
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 540d342728ac..109035c62a82 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -4103,13 +4103,14 @@ void ScInputHandler::NotifyChange( const 
ScInputHdlState* pState,
 if ( pInputWin || comphelper::LibreOfficeKit::isActive())  
  // Named range input
 {
 OUString aPosStr;
+bool bSheetLocal = false;
 const ScAddress::Details aAddrDetails( rDoc, aCursorPos );
 
 // Is the range a name?
 //! Find by Timer?
 if ( pActiveViewSh )
 pActiveViewSh->GetViewData().GetDocument().
-GetRangeAtBlock( ScRange( rSPos, rEPos ), 

[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 21ab57323d7845b52cfd0871ee3331ce113ab6d1
Author: Rafael Lima 
AuthorDate: Tue Mar 30 13:49:39 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Tue Mar 30 13:49:39 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 8ec0053e3f8610f06c7f7eae0680549a1c9fd896
  - Fixes localization in SF String, TextStream, Timer and UI help pages

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

diff --git a/helpcontent2 b/helpcontent2
index ba389e0d4c71..8ec0053e3f86 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ba389e0d4c71bd220689d912470c345746203d6e
+Subproject commit 8ec0053e3f8610f06c7f7eae0680549a1c9fd896
___
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-30 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_string.xhp |   16 
 source/text/sbasic/shared/03/sf_textstream.xhp |   12 ++--
 source/text/sbasic/shared/03/sf_timer.xhp  |   10 +-
 source/text/sbasic/shared/03/sf_ui.xhp |2 +-
 4 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit 8ec0053e3f8610f06c7f7eae0680549a1c9fd896
Author: Rafael Lima 
AuthorDate: Mon Mar 29 20:54:58 2021 +0200
Commit: Olivier Hallot 
CommitDate: Tue Mar 30 13:49:39 2021 +0200

Fixes localization in SF String, TextStream, Timer and UI help pages

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

diff --git a/source/text/sbasic/shared/03/sf_string.xhp 
b/source/text/sbasic/shared/03/sf_string.xhp
index 6ca6447c0..80d228c31 100644
--- a/source/text/sbasic/shared/03/sf_string.xhp
+++ b/source/text/sbasic/shared/03/sf_string.xhp
@@ -128,7 +128,7 @@



-   
+   
  \n  \r  \t


@@ -146,7 +146,7 @@



-  To have the escape sequence "\n" interpreted 
as an actual string, simply use "\\n" instead of "\" & Chr(10).
+  To have the escape sequence "\n" interpreted 
as an actual string, simply use "\\n" instead of "\" & 
Chr(10).
 
   Non-printable characters:
 Characters defined 
in the Unicode Character Database as “Other” or “Separator” are considered as 
non-printable characters.
@@ -343,10 +343,10 @@
 
 
Count 
--
 
-  
+  
   String service;Count
   
-  Count
+  Count
 Counts the number 
of occurrences of a substring or a regular expression within a 
string.
 
   
@@ -476,10 +476,10 @@
 
   InputStr: The string to be 
searched
   Regex: The regular 
expression
-  Start: The position in the string where 
the search will begin. This parameter is passed by reference, so after 
execution the value of Start will point to the first character of the found 
substring. If no matching substring is found, Start will be set to 
0.
+  Start: The position in the string where 
the search will begin. This parameter is passed by reference, so after 
execution the value of Start will point to the first 
character of the found substring. If no matching substring is found, 
Start will be set to 0.
   CaseSensitive: Default = 
False
   Forward: Determines the direction of 
the search. If True, search moves forward. If 
False search moves backwards (Default = 
True)
-  At the first 
iteration, if Forward = True, then Start should be equal to 
1, whereas if Forward = False then Start should be equal to 
Len(InputStr)
+  At the first 
iteration, if Forward = True, then Start 
should be equal to 1, whereas if Forward = False then 
Start should be equal to 
Len(InputStr)
 
   
 Dim lStart As Long : lStart = 1
@@ -577,7 +577,7 @@
 SF_String.IsAlpha(InputStr As String) As 
Boolean
   
 
-  InputStr: The string to be checked.  If 
empty, the method returns False.
+  InputStr: The string to be checked. If 
empty, the method returns False.
 
   
 MsgBox SF_String.IsAlpha("àénΣlPµ") 'True
@@ -1234,7 +1234,7 @@
 a = SF_String.SplitNotQuoted("abc,""def,ghi""", 
",")
 ' a = Array("abc", """def,ghi""")
 a = SF_String.SplitNotQuoted("abc,""def\"",ghi""", 
",")
- ' a = 
Array("abc", """def\"",ghi""")
+ 
' a = Array("abc", """def\"",ghi""")
 a = 
SF_String.SplitNotQuoted("abc,""def\"",ghi,", ",")
 ' a = Array("abc", """def\"",ghi""", "")
   
diff --git a/source/text/sbasic/shared/03/sf_textstream.xhp 
b/source/text/sbasic/shared/03/sf_textstream.xhp
index 99c158e19..1659d32a5 100644
--- a/source/text/sbasic/shared/03/sf_textstream.xhp
+++ b/source/text/sbasic/shared/03/sf_textstream.xhp
@@ -42,16 +42,16 @@
 
 The file must be closed with the CloseFile 
method after all read or write operations have been executed:
 
-  myFile.CloseFile()
+  myFile.CloseFile()
 
 Optionally, the resources used by the 
TextStream instance can be released using the 
Dispose method:
 
-  Set myFile = 
myFile.Dispose()
+  Set myFile = myFile.Dispose()
 
 The methods in the 
TextStream service are mostly based on the https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1io_1_1XTextInputStream.html";
 name="XTextInputStream API">XTextInputStream and 
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1io_1_1XTextOutputStream.html";
 name="XTextOutputStream API">XTextOutputStream UNO 
interfaces.
 
 Properties
-
+
   TextStream service;AtEndOfStream
   TextStream service;Encoding
   TextStream service;FileName
@@ -228,10 +228,10

[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 68fc346abe45042c08116fe957945dbb14b259f2
Author: Rafael Lima 
AuthorDate: Tue Mar 30 12:49:21 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Mar 30 13:49:21 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to ba389e0d4c71bd220689d912470c345746203d6e
  - Fix localization in SF_Platform, SF_Services and SF_Session help pages

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

diff --git a/helpcontent2 b/helpcontent2
index a9237a2b7018..ba389e0d4c71 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit a9237a2b7018be667f26f9a93d06b48bccb1015e
+Subproject commit ba389e0d4c71bd220689d912470c345746203d6e
___
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-30 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_platform.xhp |6 +-
 source/text/sbasic/shared/03/sf_services.xhp |   22 +++
 source/text/sbasic/shared/03/sf_session.xhp  |   76 +--
 3 files changed, 52 insertions(+), 52 deletions(-)

New commits:
commit ba389e0d4c71bd220689d912470c345746203d6e
Author: Rafael Lima 
AuthorDate: Sat Mar 27 19:30:03 2021 +0100
Commit: Olivier Hallot 
CommitDate: Tue Mar 30 13:49:21 2021 +0200

Fix localization in SF_Platform, SF_Services and SF_Session help pages

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

diff --git a/source/text/sbasic/shared/03/sf_platform.xhp 
b/source/text/sbasic/shared/03/sf_platform.xhp
index 97f45948b..d66f41827 100644
--- a/source/text/sbasic/shared/03/sf_platform.xhp
+++ b/source/text/sbasic/shared/03/sf_platform.xhp
@@ -31,7 +31,7 @@
   Operating system information (OS type, release, version, 
etc)
   
   
-  The LibreOffice version
+  The %PRODUCTNAME version
   
   
   The current user name
@@ -115,7 +115,7 @@
 Integer
 
 
-The number of central processor units.
+The number of central processing units.
 
 
 
@@ -157,7 +157,7 @@
 String
 
 
-The actual LibreOffice version expressed as'LibreOffice w.x.y.z (The Document 
Foundation)'.
+The actual %PRODUCTNAME version expressed as' 
%PRODUCTNAME w.x.y.z (The Document Foundation)'.
 Example: 'LibreOffice 7.1.1.2 (The Document 
Foundation, Debian and Ubuntu)'
 
 
diff --git a/source/text/sbasic/shared/03/sf_services.xhp 
b/source/text/sbasic/shared/03/sf_services.xhp
index 66b672a5d..241eac25f 100644
--- a/source/text/sbasic/shared/03/sf_services.xhp
+++ b/source/text/sbasic/shared/03/sf_services.xhp
@@ -63,7 +63,7 @@

   CreateScriptService
   Called by user scripts to get an object giving access to the 
service given as argument.
- All services should be invoked thru the 
CreateScriptService method.
+ All services should be invoked through the 
CreateScriptService method.

 
 Conventionally, the 
String, Array and 
Exception services may be invoked directly respectively as 
SF_String, SF_Array and 
SF_Exception.
@@ -113,17 +113,17 @@
   or a set of methods and properties gathered in a Basic class 
module.

   
-
+  
   
CreateScriptService(Service As String, [arg0, ...] 
As Variant) As Variant
   
-
+  
  Service: The name of the service 
identified as "library.service".
   The library is a Basic library that must exist in the GlobalScope. 
The default value is "ScriptForge".
   The service is one of the services registered by the library via 
the RegisterScriptServices() method.
   arg0, 
...: A list of arguments required by the invoked service.
 If the first argument refers to an event manager, then arg0 is 
mandatory and must be the UNO object representing the event provided as 
argument to the user macro.
-
+  
   
 GlobalScope.BasicLibraries.loadLibrary("ScriptForge")
 ' To be done 
once
@@ -168,7 +168,7 @@
  
 "LibraryName.ModuleName.FunctionName" ' String


-   
+   

   Public Sub RegisterScriptServices()
   ' 
To be stored in library = myLibrary
@@ -206,15 +206,15 @@

   The method returns True if the name-value pair given 
as argument could be registered successfully.

-   
+   

   GlobalScope.ScriptForge.SF_Services.RegisterService(ServiceName
 As String, ServiceReference As Variant) As Boolean

-   
+   
ServiceName: The name of the service as 
a case-insensitive string. The name must be unique.
ServiceReference: A service reference is 
either:

-   
+   

   
With GlobalScope.ScriptForge.SF_Services
  
 .RegisterService("myService1", GlobalScope.myLibrary.myModule)
@@ -235,15 +235,15 @@

   The method returns True if the name-value pair given 
as argument could be registered successfully.

-   
+   

   GlobalScope.ScriptForge.SF_Services.RegisterEventManager(ServiceName
 As String, ServiceReference As String) As Boolean

-   
+   
ServiceName: The name of the service as 
a case-insensitive string. The name must be unique.
ServiceReference: A string designating the 
function to execute to get an instance of the service. It is in fact the 
function containing the New keyword of a Set 
statement creating the instance.:
"LibraryName.ModuleName.FunctionName" ' 
String
-   
+   

   
With GlobalScope.ScriptForge.SF_Services
  
 .RegisterEventManager("myEventMgr", 
"myLibrary.someModule.someFunc

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

2021-03-30 Thread Tünde Tóth (via logerrit)
 sc/inc/document.hxx  |2 
 sc/qa/unit/uicalc/data/tdf99913.xlsx |binary
 sc/qa/unit/uicalc/uicalc.cxx |9 
 sc/source/filter/oox/worksheethelper.cxx |   65 ++-
 vcl/source/fontsubset/sft.cxx|   24 ++-
 5 files changed, 87 insertions(+), 13 deletions(-)

New commits:
commit ae60c27f936642ecd4391d11fcd73a6d461d0b7f
Author: Tünde Tóth 
AuthorDate: Wed Mar 24 14:07:15 2021 +0100
Commit: László Németh 
CommitDate: Tue Mar 30 13:36:24 2021 +0200

tdf#99913 XLSX import: set filtered flag for rows

hidden by AutoFilter to support copying the
result of filtering. Unlike ODS and XLS,
XLSX doesn't differentiates filtered and
manually hidden rows, and without this fix,
copy of the unupdated data of the loaded
filtering contained the hidden rows, too.

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

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index fb5980cc5b5e..72f84cd9ba9b 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1947,7 +1947,7 @@ public:
 SC_DLLPUBLIC SCROW  LastVisibleRow(SCROW nStartRow, SCROW nEndRow, 
SCTAB nTab) const;
 SCROW   CountVisibleRows(SCROW nStartRow, SCROW 
nEndRow, SCTAB nTab) const;
 
-boolRowFiltered(SCROW nRow, SCTAB nTab, SCROW* 
pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
+SC_DLLPUBLIC bool   RowFiltered(SCROW nRow, SCTAB nTab, SCROW* 
pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
 boolHasFilteredRows(SCROW nStartRow, SCROW 
nEndRow, SCTAB nTab) const;
 boolColFiltered(SCCOL nCol, SCTAB nTab) const;
 SC_DLLPUBLIC void   SetRowFiltered(SCROW nStartRow, SCROW nEndRow, 
SCTAB nTab, bool bFiltered);
diff --git a/sc/qa/unit/uicalc/data/tdf99913.xlsx 
b/sc/qa/unit/uicalc/data/tdf99913.xlsx
new file mode 100644
index ..3fd18a12984a
Binary files /dev/null and b/sc/qa/unit/uicalc/data/tdf99913.xlsx differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 818361ec9d83..48cde55df479 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -1387,6 +1387,15 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf116215)
 CPPUNIT_ASSERT_EQUAL(OUString("=SUM(A2:B2)"), aFormula);
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf99913)
+{
+ScModelObj* pModelObj = createDoc("tdf99913.xlsx");
+ScDocument* pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+
+CPPUNIT_ASSERT(pDoc->RowFiltered(2, 0));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/oox/worksheethelper.cxx 
b/sc/source/filter/oox/worksheethelper.cxx
index fe30d788b623..6d07bfd57cad 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -68,6 +68,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -341,9 +343,12 @@ private:
 voidconvertColumns( OutlineLevelVec& orColLevels, const 
ValueRange& rColRange, const ColumnModel& rModel );
 
 /** Converts row properties for all rows in the sheet. */
-voidconvertRows();
+voidconvertRows(const std::vector& rSpans);
 /** Converts row properties. */
-voidconvertRows( OutlineLevelVec& orRowLevels, const 
ValueRange& rRowRange, const RowModel& rModel, double fDefHeight = -1.0 );
+voidconvertRows(OutlineLevelVec& orRowLevels, const 
ValueRange& rRowRange,
+const RowModel& rModel,
+const std::vector& rSpans,
+double fDefHeight = -1.0);
 
 /** Converts outline grouping for the passed column or row. */
 voidconvertOutlines( OutlineLevelVec& orLevels, sal_Int32 
nColRow, sal_Int32 nLevel, bool bCollapsed, bool bRows );
@@ -947,7 +952,37 @@ void WorksheetGlobals::finalizeWorksheetImport()
 
 lclUpdateProgressBar( mxFinalProgress, 0.5 );
 convertColumns();
-convertRows();
+
+// tdf#99913 rows hidden by filter need extra flag
+ScDocument& rDoc = getScDocument();
+std::vector aSpans;
+SCTAB nTab = getSheetIndex();
+ScDBData* pDBData = rDoc.GetAnonymousDBData(nTab);
+if (pDBData && pDBData->HasAutoFilter())
+{
+ScRange aRange;
+pDBData->GetArea(aRange);
+SCCOLROW nStartRow = static_cast(aRange.aStart.Row());
+SCCOLROW nEndRow = static_cast(aRange.aEnd.Row());
+aSpans.push_back(sc::ColRowSpan(nStartRow, nEndRow));
+}
+ScDBCollection* pDocColl = rDoc.GetDBCollection();
+if (!pDocColl->empty())
+{
+S

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

2021-03-30 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf140336_paraNoneShading.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx  |   12 ++
 sw/source/filter/ww8/attributeoutputbase.hxx|2 -
 sw/source/filter/ww8/docxattributeoutput.cxx|5 +-
 sw/source/filter/ww8/docxattributeoutput.hxx|2 -
 sw/source/filter/ww8/ww8atr.cxx |   21 +---
 6 files changed, 34 insertions(+), 8 deletions(-)

New commits:
commit 8ef5d0f724b75ef62c20996271e9a6997ff6c3dd
Author: Justin Luth 
AuthorDate: Thu Mar 25 14:52:01 2021 +0200
Commit: Miklos Vajna 
CommitDate: Tue Mar 30 12:50:43 2021 +0200

tdf#140336 ms formats export: export NONE background for ParaBackColor

This fixes a regression from LO 4.2 with tdf#88583's
commit 60cdeb2d441a6bf5c55f511f574b2b9dd598fbb8.

It isn't only SOLID that needs to be written,
otherwise there is no way to cancel an inherited background.

And only write out a SOLID if one is specified here.
Do not duplicate a style's SOLID fill into every
sub-style and paragraph. (Yikes)

This fixes DOCX (seriously) and DOC (de-duplication),
but not RTF (which doesn't write out transparent brushes).

Surprisingly, I didn't find any examples
where a NONE was specified that matched an inherited NONE.
But it IS important (probably because of a bug) and also smart
to determine and avoid writing NONE if there is no inheritance.
So then, there is no reason not to do the last step of
checking if the current brush matches the inherited brush.

[That also paves the way for a potential follow-up commit
to try deduplicating SOLID fills as well,
although that likely adds grabbag complications into the mix.
And perhaps deduplication isn't desired either,
in case the user actually wanted to duplicate
(if that is even possible under UI conditions).]

Change-Id: I8958a68c779057d9fc5da74eca50fcf5b41d8b52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113105
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf140336_paraNoneShading.odt 
b/sw/qa/extras/ooxmlexport/data/tdf140336_paraNoneShading.odt
new file mode 100644
index ..c4bd80f1a65c
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf140336_paraNoneShading.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index ac46467b87f7..bda5911c1b16 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -15,6 +15,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -140,6 +141,17 @@ 
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf135773_numberingShading, "tdf135774_n
 assertXPath(pXmlStyles, 
"/w:numbering/w:abstractNum[@w:abstractNumId='1']/w:lvl[@w:ilvl='0']/w:rPr/w:shd",
 "fill", "ED4C05");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf140336_paraNoneShading, 
"tdf140336_paraNoneShading.odt")
+{
+// Before the fix, the background from a style was exported to 
dis-inheriting paragraphs/styles.
+CPPUNIT_ASSERT_EQUAL(sal_uInt32(COL_AUTO), 
getProperty(getParagraph(1), "ParaBackColor"));
+uno::Reference 
xStyle(getStyles("ParagraphStyles")->getByName("CanclledBackground"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, 
getProperty(xStyle, "FillStyle"));
+
+// sanity check: backgroundColor paragraph style has a golden 
color(FF7F50), which para2 inherits
+CPPUNIT_ASSERT_EQUAL(sal_uInt32(16744272), 
getProperty(getParagraph(2), "ParaBackColor"));
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf141173_missingFrames, 
"tdf141173_missingFrames.rtf")
 {
 // Without the fix in place, almost all of the text and textboxes were 
missing.
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx 
b/sw/source/filter/ww8/attributeoutputbase.hxx
index e102b3f7012b..cea47b8e3c60 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -666,7 +666,7 @@ public:
 ( ww8::WW8TableNodeInfoInner const * pTableTextNodeInfoInner,
   tools::Long& rPageSize, bool& rRelBoxSize );
 
-virtual void MaybeOutputBrushItem(SfxItemSet const&) { }
+virtual bool MaybeOutputBrushItem(SfxItemSet const&) { return false; }
 
 /// Exports the definition (image, size) of a single numbering picture 
bullet.
 virtual void BulletDefinition(int /*nId*/, const Graphic& /*rGraphic*/, 
Size /*aSize*/) {}
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index f4688e5f6a01..7e67ffda5590 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6308,14 +6308,14 @@ oox::drawingml::DrawingML& 
DocxAttributeOutput::GetDrawingML()
 return m_rDrawingML;

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

2021-03-30 Thread Caolán McNamara (via logerrit)
 include/vcl/window.hxx |2 +-
 vcl/source/window/clipping.cxx |   24 +++-
 vcl/source/window/paint.cxx|8 
 3 files changed, 16 insertions(+), 18 deletions(-)

New commits:
commit c6c128b947c8864d6bbd4b0abd1abad16cd0d67e
Author: Caolán McNamara 
AuthorDate: Tue Mar 30 09:38:45 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Mar 30 12:36:05 2021 +0200

ImplGetWinChildClipRegion never returns null

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

diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 000d64ffcb4a..095e597d6c28 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -656,7 +656,7 @@ private:
 
 SAL_DLLPRIVATE void ImplInitWinClipRegion();
 SAL_DLLPRIVATE void ImplInitWinChildClipRegion();
-SAL_DLLPRIVATE vcl::Region* ImplGetWinChildClipRegion();
+SAL_DLLPRIVATE vcl::Region& ImplGetWinChildClipRegion();
 
 SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows( 
const vcl::Region& rInterRegion, vcl::Region& rRegion ) const;
 SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows2( 
const vcl::Region& rInterRegion, vcl::Region& rRegion );
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index 7b9330d18505..b5c262df2c1a 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -45,7 +45,7 @@ void Window::InitClipRegion()
 aRegion = *(mpWindowImpl->mpPaintRegion);
 else
 {
-aRegion = *(ImplGetWinChildClipRegion());
+aRegion = ImplGetWinChildClipRegion();
 // only this region is in frame coordinates, so re-mirror it
 // the mpWindowImpl->mpPaintRegion above is already correct (see 
ImplCallPaint()) !
 if( ImplIsAntiparallel() )
@@ -96,7 +96,7 @@ void Window::ExpandPaintClipRegion( const vcl::Region& 
rRegion )
 vcl::Region aPixRegion = LogicToPixel( rRegion );
 vcl::Region aDevPixRegion = ImplPixelToDevicePixel( aPixRegion );
 
-vcl::Region aWinChildRegion = *ImplGetWinChildClipRegion();
+vcl::Region aWinChildRegion = ImplGetWinChildClipRegion();
 // only this region is in frame coordinates, so re-mirror it
 if( ImplIsAntiparallel() )
 {
@@ -286,19 +286,17 @@ void Window::ImplInitWinChildClipRegion()
 mpWindowImpl->mbInitChildRegion = false;
 }
 
-Region* Window::ImplGetWinChildClipRegion()
+Region& Window::ImplGetWinChildClipRegion()
 {
 if ( mpWindowImpl->mbInitWinClipRegion )
 ImplInitWinClipRegion();
 if ( mpWindowImpl->mbInitChildRegion )
 ImplInitWinChildClipRegion();
 if ( mpWindowImpl->mpChildClipRegion )
-return mpWindowImpl->mpChildClipRegion.get();
-else
-return &mpWindowImpl->maWinClipRegion;
+return *mpWindowImpl->mpChildClipRegion;
+return mpWindowImpl->maWinClipRegion;
 }
 
-
 bool Window::ImplSysObjClip( const vcl::Region* pOldRegion )
 {
 bool bUpdate = true;
@@ -309,18 +307,18 @@ bool Window::ImplSysObjClip( const vcl::Region* 
pOldRegion )
 
 if ( bVisibleState )
 {
-vcl::Region* pWinChildClipRegion = ImplGetWinChildClipRegion();
+vcl::Region& rWinChildClipRegion = ImplGetWinChildClipRegion();
 
-if ( !pWinChildClipRegion->IsEmpty() )
+if (!rWinChildClipRegion.IsEmpty())
 {
 if ( pOldRegion )
 {
-vcl::Region aNewRegion = *pWinChildClipRegion;
-pWinChildClipRegion->Intersect( *pOldRegion );
-bUpdate = aNewRegion == *pWinChildClipRegion;
+vcl::Region aNewRegion = rWinChildClipRegion;
+rWinChildClipRegion.Intersect(*pOldRegion);
+bUpdate = aNewRegion == rWinChildClipRegion;
 }
 
-vcl::Region  aRegion = *pWinChildClipRegion;
+vcl::Region  aRegion = rWinChildClipRegion;
 vcl::Region  aWinRectRegion( GetOutputRectPixel() );
 
 if ( aRegion == aWinRectRegion )
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index e673299095b9..d991b0bdd3b2 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -247,11 +247,11 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion)
 {
 WindowImpl* pWindowImpl = m_pWindow->ImplGetWindowImpl();
 
-vcl::Region* pWinChildClipRegion = m_pWindow->ImplGetWinChildClipRegion();
+vcl::Region& rWinChildClipRegion = m_pWindow->ImplGetWinChildClipRegion();
 ImplFrameData* pFrameData = m_pWindow->mpWindowImpl->mpFrameData;
 if (pWindowImpl->mnPaintFlags & ImplPaintFlags::PaintAll || 
pFrameData->mbInBufferedPaint)
 {
-pWindowImpl->maInvalidateRegion = *

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

2021-03-30 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/xltoolbar.cxx |   13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit ffe6eb528dca34b19fecf738bce647ccb8367379
Author: Caolán McNamara 
AuthorDate: Tue Mar 30 09:24:58 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Mar 30 12:34:53 2021 +0200

cid#1473732 Untrusted loop bound

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

diff --git a/sc/source/filter/excel/xltoolbar.cxx 
b/sc/source/filter/excel/xltoolbar.cxx
index f94f96f50033..acf6d8339f20 100644
--- a/sc/source/filter/excel/xltoolbar.cxx
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -111,14 +111,15 @@ bool ScCTB::Read( SvStream &rS )
 SAL_WARN("sc.filter", "ScCTB::Read more entries claimed than 
stream could contain");
 return false;
 }
-}
 
-for ( sal_Int16 index = 0; index < nIndexes; ++index )
-{
-ScTBC aTBC;
-aTBC.Read( rS );
-rTBC.push_back( aTBC );
+for ( sal_Int16 index = 0; index < nIndexes; ++index )
+{
+ScTBC aTBC;
+aTBC.Read( rS );
+rTBC.push_back( aTBC );
+}
 }
+
 return true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Caolán McNamara (via logerrit)
 basic/source/sbx/sbxarray.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit b80fc56c89e805372d87373903a6c4da0c4466c8
Author: Caolán McNamara 
AuthorDate: Tue Mar 30 09:14:01 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Mar 30 12:34:39 2021 +0200

cid#1474044 Untrusted loop bound

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

diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index fa2a2aa69f9a..4f5a9fd3cfb0 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -543,13 +543,13 @@ bool SbxDimArray::LoadData( SvStream& rStrm, sal_uInt16 
nVer )
 SAL_WARN("basic", "SbxDimArray::LoadData more entries claimed than 
stream could contain");
 return false;
 }
-}
 
-for( short i = 0; i < nDimension && rStrm.GetError() == ERRCODE_NONE; i++ )
-{
-sal_Int16 lb(0), ub(0);
-rStrm.ReadInt16( lb ).ReadInt16( ub );
-AddDim( lb, ub );
+for (short i = 0; i < nDimension && rStrm.GetError() == ERRCODE_NONE; 
++i)
+{
+sal_Int16 lb(0), ub(0);
+rStrm.ReadInt16( lb ).ReadInt16( ub );
+AddDim( lb, ub );
+}
 }
 return SbxArray::LoadData( rStrm, nVer );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/utlui/glbltree.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 30fb31983a3492da9db09cdfccdd2f8f9550bb0d
Author: Caolán McNamara 
AuthorDate: Mon Mar 29 14:17:31 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Mar 30 12:07:15 2021 +0200

tdf#140556 master document view not launching subdocument from context menu

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

diff --git a/sw/source/uibase/utlui/glbltree.cxx 
b/sw/source/uibase/utlui/glbltree.cxx
index 3261050f3a6c..360a2ddbea8b 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -608,7 +608,7 @@ void SwGlobalTree::ExecuteContextMenuAction(const OString& 
rSelectedPopupEntry)
 pCont = nullptr;
 bUpdateHard = true;
 }
-else if (rSelectedPopupEntry == "edit")
+else if (rSelectedPopupEntry == "editcontent")
 {
 OSL_ENSURE(pCont, "edit without entry ? " );
 if (pCont)
___
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' - sd/source

2021-03-30 Thread Caolán McNamara (via logerrit)
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |   12 +---
 sd/source/ui/inc/AccessibleDocumentViewBase.hxx   |2 ++
 2 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 38f678a357b3f8c179a91da013593156b7f95ab4
Author: Caolán McNamara 
AuthorDate: Tue Mar 23 13:05:26 2021 +
Commit: Michael Stahl 
CommitDate: Tue Mar 30 11:39:39 2021 +0200

Resolves: tdf#135364 ensure the window is released by a11y dispose

the window dtor wasn't called with a11y enabled, with the side
effect that the pen color wasn't stored by the dtor

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

diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx 
b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 67238cb3154c..66bef0694c28 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -88,13 +88,17 @@ AccessibleDocumentViewBase::AccessibleDocumentViewBase (
 mpViewShell = pViewShell;
 }
 
+void AccessibleDocumentViewBase::ReleaseWindow()
+{
+SolarMutexGuard g;
+mpWindow.reset();
+}
+
 AccessibleDocumentViewBase::~AccessibleDocumentViewBase()
 {
 // At this place we should be disposed.  You may want to add a
 // corresponding assertion into the destructor of a derived class.
-
-SolarMutexGuard g;
-mpWindow.reset();
+ReleaseWindow(); // this should already be done by impl_dispose
 }
 
 void AccessibleDocumentViewBase::Init()
@@ -484,6 +488,8 @@ void AccessibleDocumentViewBase::impl_dispose()
 mxController = nullptr;
 
 maShapeTreeInfo.SetDocumentWindow (nullptr);
+
+ReleaseWindow(); // tdf#135363 - ensure the window is released by dispose
 }
 
 //=  XEventListener  ==
diff --git a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx 
b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
index 2194dee2f290..44079e305560 100644
--- a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
+++ b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
@@ -238,6 +238,8 @@ private:
 virtual void
 implSelect( sal_Int32 nAccessibleChildIndex, bool bSelect ) override;
 
+void ReleaseWindow();
+
 protected:
 /// The core window that is made accessible.
 VclPtr< ::sd::Window> mpWindow;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Caolán McNamara (via logerrit)
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |   12 +---
 sd/source/ui/inc/AccessibleDocumentViewBase.hxx   |2 ++
 2 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit c9f08c3008984039f18c23aab3f6690e3ae27649
Author: Caolán McNamara 
AuthorDate: Tue Mar 23 13:05:26 2021 +
Commit: Michael Stahl 
CommitDate: Tue Mar 30 11:39:25 2021 +0200

Resolves: tdf#135364 ensure the window is released by a11y dispose

the window dtor wasn't called with a11y enabled, with the side
effect that the pen color wasn't stored by the dtor

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

diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx 
b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 67c1a1fb08b7..17036e3e6cea 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -88,13 +88,17 @@ AccessibleDocumentViewBase::AccessibleDocumentViewBase (
 mpViewShell = pViewShell;
 }
 
+void AccessibleDocumentViewBase::ReleaseWindow()
+{
+SolarMutexGuard g;
+mpWindow.reset();
+}
+
 AccessibleDocumentViewBase::~AccessibleDocumentViewBase()
 {
 // At this place we should be disposed.  You may want to add a
 // corresponding assertion into the destructor of a derived class.
-
-SolarMutexGuard g;
-mpWindow.reset();
+ReleaseWindow(); // this should already be done by impl_dispose
 }
 
 void AccessibleDocumentViewBase::Init()
@@ -484,6 +488,8 @@ void AccessibleDocumentViewBase::impl_dispose()
 mxController = nullptr;
 
 maShapeTreeInfo.SetDocumentWindow (nullptr);
+
+ReleaseWindow(); // tdf#135363 - ensure the window is released by dispose
 }
 
 //=  XEventListener  ==
diff --git a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx 
b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
index 2194dee2f290..44079e305560 100644
--- a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
+++ b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
@@ -238,6 +238,8 @@ private:
 virtual void
 implSelect( sal_Int32 nAccessibleChildIndex, bool bSelect ) override;
 
+void ReleaseWindow();
+
 protected:
 /// The core window that is made accessible.
 VclPtr< ::sd::Window> mpWindow;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Caolán McNamara (via logerrit)
 sc/source/ui/condformat/condformatdlg.cxx |9 +
 sc/source/ui/inc/condformatdlgentry.hxx   |1 +
 2 files changed, 10 insertions(+)

New commits:
commit f2cae3f0febc6f1909e14a4fd5060977fd096f00
Author: Caolán McNamara 
AuthorDate: Thu Mar 18 14:21:22 2021 +
Commit: Michael Stahl 
CommitDate: Tue Mar 30 11:35:25 2021 +0200

tdf#118482 set a scroll step of the height of a collapsed entry

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

diff --git a/sc/source/ui/condformat/condformatdlg.cxx 
b/sc/source/ui/condformat/condformatdlg.cxx
index 09432d8f6454..4744b99e1125 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -177,6 +177,8 @@ void ScCondFormatList::RecalcAll()
 if (mbFrozen)
 return;
 
+int nWheelScroll = SAL_MAX_INT32;
+
 sal_Int32 nIndex = 1;
 for (const auto& item : maEntries)
 {
@@ -184,8 +186,15 @@ void ScCondFormatList::RecalcAll()
 continue;
 item->SetIndex(nIndex);
 item->set_grid_top_attach(nIndex - 1);
+nWheelScroll = std::min(nWheelScroll, item->get_preferred_height());
 ++nIndex;
 }
+
+if (nWheelScroll != SAL_MAX_INT32)
+{
+// tdf#118482 set a scroll step of the height of a collapsed entry
+mxScrollWindow->vadjustment_set_step_increment(nWheelScroll);
+}
 }
 
 IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, weld::ComboBox&, rBox, void)
diff --git a/sc/source/ui/inc/condformatdlgentry.hxx 
b/sc/source/ui/inc/condformatdlgentry.hxx
index bf2d80fba2e0..aed63be47729 100644
--- a/sc/source/ui/inc/condformatdlgentry.hxx
+++ b/sc/source/ui/inc/condformatdlgentry.hxx
@@ -77,6 +77,7 @@ public:
 void Show() { mxGrid->show(); }
 
 void set_grid_top_attach(int nAttach) { 
mxBorder->set_grid_top_attach(nAttach); }
+int get_preferred_height() const { return 
mxBorder->get_preferred_size().Height(); }
 
 void SetPos(const ScAddress& rPos) { maPos = rPos; };
 bool IsSelected() const { return mbActive;}
___
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-30 Thread Julien Nabet (via logerrit)
 sw/source/core/edit/autofmt.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0dba9eddafc7ba2c22554538a1324ee75ddb565e
Author: Julien Nabet 
AuthorDate: Sun Mar 7 10:40:42 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Mar 30 11:32:54 2021 +0200

sw fr_FR AutoCorrect: fix crash using "Apply and Edit changes"

Bad calling of SvxAutoCorrect::FnAddNonBrkSpace() in French
documents, see tdf#140849 for a similar problem.

Change-Id: I19b964fb8fe437c7f98342a873a456ffded75d82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112120
(cherry picked from commit df41967a29c4f8243d1df2d9b23d7c41d4a13819)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112731
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 2a40b90d448f..060e8b2889b4 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -2184,7 +2184,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos)
 continue;   // do not check further
 }
 
-if ( m_aFlags.bAddNonBrkSpace )
+if ( m_aFlags.bAddNonBrkSpace && nPos < 
TextFrameIndex(pText->getLength()) )
 {
 SetRedlineText( STR_AUTOFMTREDL_NON_BREAK_SPACE );
 pATst->FnAddNonBrkSpace(aACorrDoc, *pText, sal_Int32(nPos), 
eLang, bNbspRunNext);
___
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-30 Thread Vert D (via logerrit)
 sfx2/source/control/templatedlglocalview.cxx |3 ++-
 sfx2/source/control/templatelocalview.cxx|3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit f974664988d84a32196c152a3cf996e2b4909f70
Author: Vert D 
AuthorDate: Mon Mar 29 16:57:06 2021 -0500
Commit: Noel Grandin 
CommitDate: Tue Mar 30 11:32:43 2021 +0200

tdf#141329 fix refresh shows the wrong category

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

diff --git a/sfx2/source/control/templatedlglocalview.cxx 
b/sfx2/source/control/templatedlglocalview.cxx
index d444ec49464b..0adc30d8b97e 100644
--- a/sfx2/source/control/templatedlglocalview.cxx
+++ b/sfx2/source/control/templatedlglocalview.cxx
@@ -69,8 +69,9 @@ void TemplateDlgLocalView::showRegion(std::u16string_view 
rName)
 void TemplateDlgLocalView::reload()
 {
 mpDocTemplates->Update();
-
+OUString sCurRegionName = getRegionItemName(mnCurRegionId);
 Populate();
+mnCurRegionId = getRegionId(sCurRegionName);
 
 // Check if we are currently browsing a region or root folder
 if (mnCurRegionId)
diff --git a/sfx2/source/control/templatelocalview.cxx 
b/sfx2/source/control/templatelocalview.cxx
index 87e07fd30642..4dcbaa3ba0b6 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -140,8 +140,9 @@ void TemplateLocalView::Populate()
 void TemplateLocalView::reload()
 {
 mpDocTemplates->Update();
-
+OUString sCurRegionName = getRegionItemName(mnCurRegionId);
 Populate();
+mnCurRegionId = getRegionId(sCurRegionName);
 
 // Check if we are currently browsing a region or root folder
 if (mnCurRegionId)
___
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' - connectivity/source

2021-03-30 Thread Lionel Elie Mamane (via logerrit)
 connectivity/source/parse/sqliterator.cxx |   27 ++-
 1 file changed, 22 insertions(+), 5 deletions(-)

New commits:
commit 97b952d05320f90fe85b91122431d47f3a87ed5d
Author: Lionel Elie Mamane 
AuthorDate: Sat Mar 27 10:57:50 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Mar 30 11:31:19 2021 +0200

tdf#141115: correctly find the ORDER BY clause of a UNION

instead of blindly assuming a SELECT is not a UNION, leading to an
out-of-bounds array access when it is.

Change-Id: I8f904ae65acba8d8ee23b95299058207af68c0ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113189
(cherry picked from commit f4367cfd6978ae2fa896652175956bdbedd3c4bf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113128
Tested-by: Jenkins
Reviewed-by: Lionel Mamane 
Reviewed-by: Michael Stahl 

diff --git a/connectivity/source/parse/sqliterator.cxx 
b/connectivity/source/parse/sqliterator.cxx
index a91390eca2b8..4d8634d07eb5 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -1831,12 +1831,29 @@ const OSQLParseNode* 
OSQLParseTreeIterator::getOrderTree() const
 
 // Analyse parse tree (depending on statement type)
 // and set pointer to ORDER clause:
+
+assert(SQL_ISRULE(m_pParseTree, select_statement) || 
SQL_ISRULE(m_pParseTree, union_statement));
+
+auto pParseTree = m_pParseTree;
+if(SQL_ISRULE(m_pParseTree, union_statement))
+{
+assert(m_pParseTree->count() == 4);
+pParseTree = pParseTree->getChild(3);
+// since UNION is left-associative (at least in our grammar),
+// possibly the left-hand (m_pParseTree->getChild(0)) is a 
union_statement,
+// but the right hand cannot.
+assert(SQL_ISRULE(pParseTree, select_statement));
+}
+
 OSQLParseNode * pOrderClause = nullptr;
-OSL_ENSURE(m_pParseTree->count() >= 4,"ParseTreeIterator: error in parse 
tree!");
-OSQLParseNode * pTableExp = m_pParseTree->getChild(3);
-OSL_ENSURE(pTableExp != nullptr,"OSQLParseTreeIterator: error in parse 
tree!");
-OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error 
in parse tree!");
-OSL_ENSURE(pTableExp->count() == 
TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
+OSL_ENSURE(pParseTree->count() == 4, "OSQLParseTreeIterator::getOrderTree: 
expected a SELECT, and a SELECT must have exactly four children");
+OSQLParseNode * pTableExp = pParseTree->getChild(3);
+OSL_ENSURE(pTableExp != nullptr, "OSQLParseTreeIterator::getOrderTree: got 
NULL table_exp");
+OSL_ENSURE(SQL_ISRULE(pTableExp, table_exp), 
"OSQLParseTreeIterator::getOrderTree: expected table_exp but got something 
else");
+OSL_ENSURE(pTableExp->count() == 
TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator::getOrderTree: table_exp 
doesn't have the expected number of children");
+// tdf#141115 upgrade the above to an assert;
+// this cannot go well if there are too few children
+assert(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT);
 
 pOrderClause = pTableExp->getChild(ORDER_BY_CHILD_POS);
 // If it is an order_by, it must not be empty
___
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' - connectivity/source

2021-03-30 Thread Lionel Elie Mamane (via logerrit)
 connectivity/source/drivers/file/FStatement.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 3e0714839d3c8cecbe02dea80b372364f4712373
Author: Lionel Elie Mamane 
AuthorDate: Sat Mar 27 15:44:08 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Mar 30 11:29:21 2021 +0200

tdf#141115 semi-userfriendly message on UNION query on file driver

Rather than silently returning only the first (left) part of the
UNION, error out.

Change-Id: I6ed1eba55ad33f149d9010933a3c7a835fce0451
(cherry picked from commit d0efd1e280c2b9759dce120dff64e8bac1ab19c1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113216
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/connectivity/source/drivers/file/FStatement.cxx 
b/connectivity/source/drivers/file/FStatement.cxx
index 08c4f7fdd844..31d435b62aab 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -394,6 +394,13 @@ void OStatement_Base::construct(const OUString& sql)
 case OSQLStatementType::Unknown:
 
m_pConnection->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,*this);
 break;
+case OSQLStatementType::Select:
+if(SQL_ISRULE(m_aSQLIterator.getParseTree(), union_statement))
+{
+m_pConnection->throwGenericSQLException(STR_QUERY_TOO_COMPLEX, 
*this);
+}
+assert(SQL_ISRULE(m_aSQLIterator.getParseTree(), 
select_statement));
+break;
 default:
 break;
 }
___
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-30 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/utlui/glbltree.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 995dde17ee9a2249e0e2d3bc704294583b9ff7b1
Author: Caolán McNamara 
AuthorDate: Mon Mar 29 14:17:31 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Mar 30 11:22:59 2021 +0200

tdf#140556 master document view not launching subdocument from context menu

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

diff --git a/sw/source/uibase/utlui/glbltree.cxx 
b/sw/source/uibase/utlui/glbltree.cxx
index 925753c35345..f17faed8c960 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -610,7 +610,7 @@ void SwGlobalTree::ExecuteContextMenuAction(const OString& 
rSelectedPopupEntry)
 pCont = nullptr;
 bUpdateHard = true;
 }
-else if (rSelectedPopupEntry == "edit")
+else if (rSelectedPopupEntry == "editcontent")
 {
 OSL_ENSURE(pCont, "edit without entry ? " );
 if (pCont)
___
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' - vcl/source

2021-03-30 Thread Caolán McNamara (via logerrit)
 vcl/source/window/menu.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b9de0b5d94a155ccd43e28841064e7c1b1f9ab1d
Author: Caolán McNamara 
AuthorDate: Tue Mar 23 14:55:09 2021 +
Commit: Michael Stahl 
CommitDate: Tue Mar 30 11:17:13 2021 +0200

Related: tdf#141197 critical a11y warning

** (soffice:19098): CRITICAL **: 13:44:40.365:
AtkObject* atk_object_wrapper_ref(const 
com::sun::star::uno::Reference&, 
bool):
assertion 'bool(rxAccessible)' failed

probably since...

commit cbc18cc904c652a936c4b68fba4d975bd89b5abd
Date:   Mon Nov 23 21:03:28 2020 +0100

tdf#138425 vcl/gtk activate main menu in UpdateFull

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

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 7d4a34678ada..792f3aed5ff5 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1302,7 +1302,7 @@ css::uno::Reference 
Menu::GetAccessible()
 // Since PopupMenu are sometimes shared by different instances of MenuBar, 
the mxAccessible member gets
 // overwritten and may contain a disposed object when the initial menubar 
gets set again. So use the
 // mxAccessible member only for sub menus.
-if ( pStartedFrom )
+if (pStartedFrom && pStartedFrom != this)
 {
 for ( sal_uInt16 i = 0, nCount = pStartedFrom->GetItemCount(); i < 
nCount; ++i )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Justin Luth (via logerrit)
 sw/source/core/text/txtfld.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit b0017158094e16025ef71c728bebe1093525cb59
Author: Justin Luth 
AuthorDate: Fri Jan 29 09:49:56 2021 +0300
Commit: Michael Stahl 
CommitDate: Tue Mar 30 11:11:30 2021 +0200

related tdf#131801: remove completed TODO comment

The todo was done in LO 7.1 with
commit c77b9c349f0a48392d8cb7a49532844b2cafb5ba

Michael's reference to testParagraphMark is puzzling
because the only place that is found is in a unit test,
and Miklos' ooxmlexport.cxx test has nothing
to do with numbering.

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

diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 795228efd5b3..e150f7f489f1 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -456,8 +456,6 @@ static void 
checkApplyParagraphMarkFormatToNumbering(SwFont* pNumFnt, SwTextForm
 }
 }
 
-// TODO: apparently Word can apply Character Style too, see 
testParagraphMark
-
 // Check each item and in case it should be ignored, then clear it.
 if (!pSet)
 return;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/tiledrendering/tiledrendering.cxx |  129 +++--
 sw/source/core/docnode/nodes.cxx   |   13 ++
 sw/source/core/inc/txtfrm.hxx  |6 +
 sw/source/core/txtnode/ndtxt.cxx   |   46 
 4 files changed, 182 insertions(+), 12 deletions(-)

New commits:
commit c2bb0186a9a9da50403e3974f1d2be80cac05d2d
Author: Miklos Vajna 
AuthorDate: Mon Feb 1 10:09:19 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Mar 30 11:08:04 2021 +0200

sw: don't repaint all text frames on selecting and deleting several bullets

This is similar to disabling bullets for a paragraph, but in this case
the text nodes are deleted as well.

It seems to me that both invalidations are only useful in the numberging
(e.g. Arabic) case, and not in the bullet case.

(cherry picked from commit e267fe1a3dffc39bf5076dd6413ed3b0e698378c)

Change-Id: Ie03e2847e5e50d9464399f4ea0840910e43a663a

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 250d685d5faa..a8fa06ba50c8 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -150,6 +150,7 @@ public:
 void testExtTextInputReadOnly();
 void testBulletDeleteInvalidation();
 void testBulletNoNumInvalidation();
+void testBulletMultiDeleteInvalidation();
 
 CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
 CPPUNIT_TEST(testRegisterCallback);
@@ -225,6 +226,7 @@ public:
 CPPUNIT_TEST(testExtTextInputReadOnly);
 CPPUNIT_TEST(testBulletDeleteInvalidation);
 CPPUNIT_TEST(testBulletNoNumInvalidation);
+CPPUNIT_TEST(testBulletMultiDeleteInvalidation);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -2987,6 +2989,42 @@ void SwTiledRenderingTest::testBulletNoNumInvalidation()
 CPPUNIT_ASSERT(!aFirstTextRect.IsOver(m_aInvalidations));
 }
 
+void SwTiledRenderingTest::testBulletMultiDeleteInvalidation()
+{
+// Given a document with 5 paragraphs: all are bulleted.
+SwXTextDocument* pXTextDocument = createDoc();
+SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
+pWrtShell->StartAllAction();
+pWrtShell->BulletOn();
+pWrtShell->EndAllAction();
+// There is alredy an initial text node, so type 5 times, but split 4 
times.
+for (int i = 0; i < 4; ++i)
+{
+pWrtShell->Insert2("a");
+pWrtShell->SplitNode();
+}
+pWrtShell->Insert2("a");
+// Go to the end of the 4th para.
+pWrtShell->Up(/*bSelect=*/false);
+pWrtShell->GetLayout()->PaintSwFrame(*pWrtShell->GetOut(),
+ 
pWrtShell->GetLayout()->getFrameArea());
+Scheduler::ProcessEventsToIdle();
+
pWrtShell->GetSfxViewShell()->registerLibreOfficeKitViewCallback(&SwTiledRenderingTest::callback,
 this);
+m_aInvalidations = tools::Rectangle();
+
+// When selecting and deleting several bullets: select till the end of the 
2nd para and delete.
+pWrtShell->Up(/*bSelect=*/true, /*nCount=*/2);
+pWrtShell->DelRight();
+
+// Then the first paragraph should not be invalidated.
+SwRootFrame* pRoot = pWrtShell->GetLayout();
+SwFrame* pPage = pRoot->GetLower();
+SwFrame* pBody = pPage->GetLower();
+SwFrame* pFirstText = pBody->GetLower();
+tools::Rectangle aFirstTextRect = pFirstText->getFrameArea().SVRect();
+CPPUNIT_ASSERT(!aFirstTextRect.IsOver(m_aInvalidations));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwTiledRenderingTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index a7a2078b2091..3a05e69f6854 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -43,6 +43,7 @@
 #include 
 
 #include 
+#include 
 
 typedef std::vector SwStartNodePointers;
 
@@ -227,8 +228,13 @@ void SwNodes::ChgNode( SwNodeIndex const & rDelPos, 
sal_uLong nSz,
 }
 }
 else
+{
 // if movement into the UndoNodes-array, update numbering
-pTextNd->InvalidateNumRule();
+if (sw::HasNumberingWhichNeedsLayoutUpdate(*pTextNd))
+{
+pTextNd->InvalidateNumRule();
+}
+}
 
 pTextNd->RemoveFromList();
 }
@@ -1197,7 +1203,10 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, 
sal_uLong nNodes)
 m_pOutlineNodes->erase( pTextNd );
 bUpdateOutline = true;
 }
-pTextNd->InvalidateNumRule();
+if (sw::HasNumberingWhichNeedsLayoutUpdate(*pTextNd))
+{
+pTextNd->InvalidateNumRule();
+}
 }
 else if( pCurrentNode->IsContentNode() )
 static_cast(pCurrentNode)->InvalidateNumRul

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

2021-03-30 Thread Mike Kaganski (via logerrit)
 sw/source/core/attr/format.cxx |   11 ++-
 1 file changed, 2 insertions(+), 9 deletions(-)

New commits:
commit 6340862e0c0eaff3ef1cf5161b2115a858a4ae4a
Author: Mike Kaganski 
AuthorDate: Tue Mar 30 08:54:30 2021 +0300
Commit: Mike Kaganski 
CommitDate: Tue Mar 30 10:45:24 2021 +0200

Simplify SwFormat::SetPageFormatToDefault

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

diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index cfbf3a2ba77e..d5c3a3833f0d 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -693,16 +693,9 @@ void SwFormat::DelDiffs( const SfxItemSet& rSet )
 
 void SwFormat::SetPageFormatToDefault()
 {
-
-SvxLRSpaceItem aLR(RES_LR_SPACE);
 const sal_Int32 nSize = o3tl::convert(2, o3tl::Length::cm, 
o3tl::Length::twip);
-aLR.SetLeft(nSize);
-aLR.SetRight(nSize);
-SvxULSpaceItem aUL(RES_UL_SPACE);
-aUL.SetUpper(static_cast(nSize));
-aUL.SetLower(static_cast(nSize));
-SetFormatAttr(aLR);
-SetFormatAttr(aUL);
+SetFormatAttr(SvxLRSpaceItem(nSize, nSize, nSize, 0, RES_LR_SPACE));
+SetFormatAttr(SvxULSpaceItem(nSize, nSize, RES_UL_SPACE));
 }
 
 /** SwFormat::IsBackgroundTransparent
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Mike Kaganski (via logerrit)
 include/o3tl/unit_conversion.hxx |   20 
 1 file changed, 8 insertions(+), 12 deletions(-)

New commits:
commit 852c4f8cded79435bd69675e9e9a10034b385219
Author: Mike Kaganski 
AuthorDate: Tue Mar 30 09:02:12 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue Mar 30 10:11:45 2021 +0200

Simplify prepareMDArray

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

diff --git a/include/o3tl/unit_conversion.hxx b/include/o3tl/unit_conversion.hxx
index 434f2e50c1c8..4c76375737a2 100644
--- a/include/o3tl/unit_conversion.hxx
+++ b/include/o3tl/unit_conversion.hxx
@@ -128,19 +128,15 @@ template  constexpr auto prepareMDArray(const 
m_and_d (&mdBase)[N])
 std::array, N> a{};
 for (int i = 0; i < N; ++i)
 {
-for (int j = 0; j <= i; ++j)
+a[i][i] = 1;
+for (int j = 0; j < i; ++j)
 {
-if (i == j)
-a[i][j] = 1;
-else
-{
-assert(mdBase[i].m < SAL_MAX_INT64 / mdBase[j].d);
-assert(mdBase[i].d < SAL_MAX_INT64 / mdBase[j].m);
-const sal_Int64 m = mdBase[i].m * mdBase[j].d, d = mdBase[i].d 
* mdBase[j].m;
-const sal_Int64 g = std::gcd(m, d);
-a[i][j] = m / g;
-a[j][i] = d / g;
-}
+assert(mdBase[i].m < SAL_MAX_INT64 / mdBase[j].d);
+assert(mdBase[i].d < SAL_MAX_INT64 / mdBase[j].m);
+const sal_Int64 m = mdBase[i].m * mdBase[j].d, d = mdBase[i].d * 
mdBase[j].m;
+const sal_Int64 g = std::gcd(m, d);
+a[i][j] = m / g;
+a[j][i] = d / g;
 }
 }
 return a;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 3 commits - filter/source hwpfilter/source icon-themes/karasa_jaga icon-themes/karasa_jaga_svg

2021-03-30 Thread Rizal Muttaqin (via logerrit)
 filter/source/msfilter/svdfppt.cxx  |   28 
+-
 hwpfilter/source/hiodev.cxx |4 -
 icon-themes/karasa_jaga/cmd/ar/sc_alphaliststyle.png|binary
 icon-themes/karasa_jaga/cmd/ar/sc_alphalowliststyle.png |binary
 icon-themes/karasa_jaga/cmd/ar/sc_bulletsandnumberingdialog.png |binary
 icon-themes/karasa_jaga/cmd/ar/sc_chapternumberingdialog.png|binary
 icon-themes/karasa_jaga/cmd/ar/sc_defaultbullet.png |binary
 icon-themes/karasa_jaga/cmd/ar/sc_insertneutralparagraph.png|binary
 icon-themes/karasa_jaga/cmd/ar/sc_numberingstart.png|binary
 icon-themes/karasa_jaga/cmd/ar/sc_outlinebullet.png |binary
 icon-themes/karasa_jaga/cmd/ar/sc_removebullets.png |binary
 icon-themes/karasa_jaga/cmd/ar/sc_romanliststyle.png|binary
 icon-themes/karasa_jaga/cmd/ar/sc_romanlowliststyle.png |binary
 icon-themes/karasa_jaga/cmd/ar/sc_setoutline.png|binary
 icon-themes/karasa_jaga/cmd/sc_alphaliststyle.png   |binary
 icon-themes/karasa_jaga/cmd/sc_alphalowliststyle.png|binary
 icon-themes/karasa_jaga/cmd/sc_bulletsandnumberingdialog.png|binary
 icon-themes/karasa_jaga/cmd/sc_chapternumberingdialog.png   |binary
 icon-themes/karasa_jaga/cmd/sc_defaultbullet.png|binary
 icon-themes/karasa_jaga/cmd/sc_insertneutralparagraph.png   |binary
 icon-themes/karasa_jaga/cmd/sc_numberingstart.png   |binary
 icon-themes/karasa_jaga/cmd/sc_outlinebullet.png|binary
 icon-themes/karasa_jaga/cmd/sc_removebullets.png|binary
 icon-themes/karasa_jaga/cmd/sc_romanliststyle.png   |binary
 icon-themes/karasa_jaga/cmd/sc_romanlowliststyle.png|binary
 icon-themes/karasa_jaga/cmd/sc_setoutline.png   |binary
 icon-themes/karasa_jaga_svg/cmd/ar/sc_alphaliststyle.svg|2 
 icon-themes/karasa_jaga_svg/cmd/ar/sc_alphalowliststyle.svg |2 
 icon-themes/karasa_jaga_svg/cmd/ar/sc_bulletsandnumberingdialog.svg |2 
 icon-themes/karasa_jaga_svg/cmd/ar/sc_chapternumberingdialog.svg|2 
 icon-themes/karasa_jaga_svg/cmd/ar/sc_defaultbullet.svg |2 
 icon-themes/karasa_jaga_svg/cmd/ar/sc_insertneutralparagraph.svg|2 
 icon-themes/karasa_jaga_svg/cmd/ar/sc_numberingstart.svg|2 
 icon-themes/karasa_jaga_svg/cmd/ar/sc_outlinebullet.svg |2 
 icon-themes/karasa_jaga_svg/cmd/ar/sc_removebullets.svg |2 
 icon-themes/karasa_jaga_svg/cmd/ar/sc_romanliststyle.svg|2 
 icon-themes/karasa_jaga_svg/cmd/ar/sc_romanlowliststyle.svg |2 
 icon-themes/karasa_jaga_svg/cmd/ar/sc_setoutline.svg|2 
 icon-themes/karasa_jaga_svg/cmd/sc_alphaliststyle.svg   |2 
 icon-themes/karasa_jaga_svg/cmd/sc_alphalowliststyle.svg|2 
 icon-themes/karasa_jaga_svg/cmd/sc_bulletsandnumberingdialog.svg|2 
 icon-themes/karasa_jaga_svg/cmd/sc_chapternumberingdialog.svg   |2 
 icon-themes/karasa_jaga_svg/cmd/sc_defaultbullet.svg|2 
 icon-themes/karasa_jaga_svg/cmd/sc_insertneutralparagraph.svg   |2 
 icon-themes/karasa_jaga_svg/cmd/sc_numberingstart.svg   |2 
 icon-themes/karasa_jaga_svg/cmd/sc_outlinebullet.svg|2 
 icon-themes/karasa_jaga_svg/cmd/sc_removebullets.svg|2 
 icon-themes/karasa_jaga_svg/cmd/sc_romanliststyle.svg   |2 
 icon-themes/karasa_jaga_svg/cmd/sc_romanlowliststyle.svg|2 
 icon-themes/karasa_jaga_svg/cmd/sc_setoutline.svg   |2 
 50 files changed, 52 insertions(+), 28 deletions(-)

New commits:
commit ecd219c430e5ef6984f36a74698f808b1f80008e
Author: Rizal Muttaqin 
AuthorDate: Sun Mar 28 20:57:05 2021 +0700
Commit: Andras Timar 
CommitDate: Tue Mar 30 09:56:39 2021 +0200

KJ: Improve small bullets & numbering icons

Change-Id: I57ab63bcb91c0af1fdbc14e6c3834bfb3962234b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113256
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin 
(cherry picked from commit 7461d1a3a3519093cf05b09fcf49e514df5ed94e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113280
Reviewed-by: Caolán McNamara 

diff --git a/icon-themes/karasa_jaga/cmd/ar/sc_alphaliststyle.png 
b/icon-themes/karasa_jaga/cmd/ar/sc_alphaliststyle.png
index 80c986e7fd3f..6f6877944562 100644
Binary files a/icon-themes/karasa_jaga/cmd/ar/sc_alphaliststyle.png and 
b/icon-themes/karasa_jaga/cmd/ar/sc_alphaliststyle.png differ
diff --git a/icon-themes/karasa_jaga/cmd/ar/sc_alphalowliststyle.png 
b/icon-themes/karasa_jaga/cmd/ar/sc_alphalowliststyle.png
index 5346074b75c8..0c78a6951c56 100644
Binary files a

[Libreoffice-commits] core.git: sw/ooxmlexport_setup.mk

2021-03-30 Thread Stephan Bergmann (via logerrit)
 sw/ooxmlexport_setup.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 2e8d635f7908497898c2d90b45070a3467fd15a5
Author: Stephan Bergmann 
AuthorDate: Tue Mar 30 08:40:08 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Mar 30 09:32:27 2021 +0200

Missing test dependencies

From-scratch CppunitTest_sw_ooxmlexport16 had failed for me due to

> warn:vcl.builder:30496:4101353:vcl/source/window/builder.cxx:517: 
DBG_UNHANDLED_EXCEPTION in VclBuilder
> when: Unable to read .ui file exception: 
com.sun.star.container.NoSuchElementException message: 
file:///.../instdir/LibreOffice.app/Contents/Resources/config/soffice.cfg/svt/ui/editcontrol.ui

and

> warn:vcl.builder:33595:4130924:vcl/source/window/builder.cxx:517: 
DBG_UNHANDLED_EXCEPTION in VclBuilder
> when: Unable to read .ui file exception: 
com.sun.star.container.NoSuchElementException message: 
file:///.../instdir/LibreOffice.app/Contents/Resources/config/soffice.cfg/sfx/ui/tabbar.ui

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

diff --git a/sw/ooxmlexport_setup.mk b/sw/ooxmlexport_setup.mk
index 85763f591b43..e3fce1ed342e 100644
--- a/sw/ooxmlexport_setup.mk
+++ b/sw/ooxmlexport_setup.mk
@@ -69,6 +69,8 @@ $(eval $(call 
gb_CppunitTest_use_configuration,sw_ooxmlexport$(1)))
 
 $(eval $(call gb_CppunitTest_use_uiconfigs,sw_ooxmlexport$(1),\
 modules/swriter \
+sfx \
+svt \
 ))
 
 $(eval $(call gb_CppunitTest_use_packages,sw_ooxmlexport$(1),\
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: distro-configs/LibreOfficeiOS_Sim.conf

2021-03-30 Thread Tor Lillqvist (via logerrit)
 distro-configs/LibreOfficeiOS_Sim.conf |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 089f83796c25a24860c313f47ea6bdbe8cb1c096
Author: Tor Lillqvist 
AuthorDate: Tue Mar 30 10:07:55 2021 +0300
Commit: Tor Lillqvist 
CommitDate: Tue Mar 30 10:09:36 2021 +0300

Update the iOS simulator conf file to match the device one

(But note that it is unclear whether building for the iOS simulator
actually works any longer, and I am not really interested in trying.)

Change-Id: Ifb4fecdbd20162728bfcb0750264c0a627e66279

diff --git a/distro-configs/LibreOfficeiOS_Sim.conf 
b/distro-configs/LibreOfficeiOS_Sim.conf
index af532d2c3bca..86e6da0d6825 100644
--- a/distro-configs/LibreOfficeiOS_Sim.conf
+++ b/distro-configs/LibreOfficeiOS_Sim.conf
@@ -7,7 +7,7 @@
 --without-java
 --without-junit
 
---with-theme=colibre sukapura
+--with-theme=colibre
 
 --with-build-platform-configure-options=--with-system-jpeg=no
 --with-macosx-version-min-required=10.11
@@ -22,7 +22,7 @@
 --disable-kf5
 --disable-odk
 --disable-openssl
---disable-pdfium
+--disable-poppler
 --disable-python
 
 --without-tls
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Miklos Vajna (via logerrit)
 vcl/source/window/winproc.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit d4ed266849b558b041acb740a18bd81fa39bc582
Author: Miklos Vajna 
AuthorDate: Mon Mar 29 20:57:07 2021 +0200
Commit: Miklos Vajna 
CommitDate: Tue Mar 30 09:03:42 2021 +0200

tdf#133350 vcl focus loss: fix unwanted cancel of non-menu popup

Regression from commit f21d2b48bd68424a96aa6cd5572e368208378291
(tdf#121723 vcl: leave popup mode on focus loss of toplevel windows,
2018-11-26), the original motivation was to cancel menu popus (toplevel
window menus, context menus).

Fix the unwanted cancel of ImplPopupFloatWin/ImplListBoxFloatingWindow
by restricting the cancel to menu floating windows. This keeps the
original bug fixed and allows setting e.g. the font size in the
toolbar's popup part.

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

diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 3f94d112b751..03c73072c5a5 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1898,8 +1898,10 @@ static void ImplHandleLoseFocus( vcl::Window* pWindow )
 
 // Make sure that no menu is visible when a toplevel window loses focus.
 VclPtr pFirstFloat = pSVData->mpWinData->mpFirstFloat;
-if (pFirstFloat && !pWindow->GetParent())
+if (pFirstFloat && pFirstFloat->IsMenuFloatingWindow() && 
!pWindow->GetParent())
+{
 pFirstFloat->EndPopupMode(FloatWinPopupEndFlags::Cancel | 
FloatWinPopupEndFlags::CloseAll);
+}
 }
 
 namespace {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits