[Libreoffice-commits] core.git: qadevOOo/objdsc sc/CppunitTest_sc_cellsearchobj.mk sc/Module_sc.mk sc/qa

2019-05-01 Thread Jens Carl (via logerrit)
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv |7 
 sc/CppunitTest_sc_cellsearchobj.mk  |   43 +
 sc/Module_sc.mk |3 
 sc/qa/extras/sccellsearchobj.cxx|   86 
++
 4 files changed, 131 insertions(+), 8 deletions(-)

New commits:
commit 4931a1e5e365c018a271fcd94f0a743b4fc38c6c
Author: Jens Carl 
AuthorDate: Wed May 1 00:58:31 2019 +
Commit: Jens Carl 
CommitDate: Wed May 1 09:30:00 2019 +0200

tdf#45904 Move XPropertSet Java tests to C++

Move XPropertSet Java tests to C++ for ScCellSearchObj.

Change-Id: I46e55794fe0b205173c3b208ba84c90d70aa2de0
Reviewed-on: https://gerrit.libreoffice.org/71608
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
index 3af1d2feb37e..8f8a0add5ae6 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
@@ -12,10 +12,3 @@
 
"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchSimilarityExchange"
 
"ScCellSearchObj";"com::sun::star::util::XReplaceDescriptor";"getReplaceString()"
 
"ScCellSearchObj";"com::sun::star::util::XReplaceDescriptor";"setReplaceString()"
-"ScCellSearchObj";"com::sun::star::beans::XPropertySet";"getPropertySetInfo()"
-"ScCellSearchObj";"com::sun::star::beans::XPropertySet";"setPropertyValue()"
-"ScCellSearchObj";"com::sun::star::beans::XPropertySet";"getPropertyValue()"
-"ScCellSearchObj";"com::sun::star::beans::XPropertySet";"addPropertyChangeListener()"
-"ScCellSearchObj";"com::sun::star::beans::XPropertySet";"removePropertyChangeListener()"
-"ScCellSearchObj";"com::sun::star::beans::XPropertySet";"addVetoableChangeListener()"
-"ScCellSearchObj";"com::sun::star::beans::XPropertySet";"removeVetoableChangeListener()"
diff --git a/sc/CppunitTest_sc_cellsearchobj.mk 
b/sc/CppunitTest_sc_cellsearchobj.mk
new file mode 100644
index ..a6bc54d1e9aa
--- /dev/null
+++ b/sc/CppunitTest_sc_cellsearchobj.mk
@@ -0,0 +1,43 @@
+# -*- 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,sc_cellsearchobj))
+
+$(eval $(call gb_CppunitTest_use_external,sc_cellsearchobj,boost_headers))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sc_cellsearchobj, \
+   sc/qa/extras/sccellsearchobj \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sc_cellsearchobj, \
+   cppu \
+   sal \
+   subsequenttest \
+   test \
+   unotest \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sc_cellsearchobj,\
+   $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,sc_cellsearchobj))
+
+$(eval $(call gb_CppunitTest_use_ure,sc_cellsearchobj))
+$(eval $(call gb_CppunitTest_use_vcl,sc_cellsearchobj))
+
+$(eval $(call gb_CppunitTest_use_components,sc_cellsearchobj,\
+   $(sc_unoapi_common_components) \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sc_cellsearchobj))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 633fa010982e..0b424cd0a381 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -114,10 +114,11 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\
CppunitTest_sc_cellformatsenumeration \
CppunitTest_sc_cellformatsobj \
CppunitTest_sc_cellobj \
-   CppunitTest_sc_cellsobj \
CppunitTest_sc_cellrangeobj \
CppunitTest_sc_cellrangesobj \
+   CppunitTest_sc_cellsearchobj \
CppunitTest_sc_cellsenumeration \
+   CppunitTest_sc_cellsobj \
CppunitTest_sc_chart2dataprovider \
CppunitTest_sc_chartobj \
CppunitTest_sc_chartsobj \
diff --git a/sc/qa/extras/sccellsearchobj.cxx b/sc/qa/extras/sccellsearchobj.cxx
new file mode 100644
index ..21ece504221b
--- /dev/null
+++ b/sc/qa/extras/sccellsearchobj.cxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+using namespace css;
+
+names

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

2019-05-01 Thread Mike Kaganski (via logerrit)
 sc/qa/unit/data/xlsx/pivottable_1s_difference.xlsx |binary
 sc/qa/unit/pivottable_filters_test.cxx |   38 +
 sc/source/filter/excel/xepivotxml.cxx  |6 ++-
 3 files changed, 42 insertions(+), 2 deletions(-)

New commits:
commit f8472069d451ec001e602bbc5329ad030fae1219
Author: Mike Kaganski 
AuthorDate: Wed May 1 07:22:44 2019 +0300
Commit: Mike Kaganski 
CommitDate: Wed May 1 09:40:22 2019 +0200

tdf#125055: properly round fractions of seconds

... so that 2017-07-10T09:11:02.99... becomes 2017-07-10T09:11:03,
not 2017-07-10T09:11:02. The latter created duplicated items in pivot
table cache previously.

TODO: check what to do if the times are actually different by 100 ns?
What Excel does then? Should we increase cache item precision?

Change-Id: I622d1c784ee9fddf6b387bec2d8af87bae5668ba
Reviewed-on: https://gerrit.libreoffice.org/71610
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sc/qa/unit/data/xlsx/pivottable_1s_difference.xlsx 
b/sc/qa/unit/data/xlsx/pivottable_1s_difference.xlsx
new file mode 100644
index ..de8906cf94ca
Binary files /dev/null and b/sc/qa/unit/data/xlsx/pivottable_1s_difference.xlsx 
differ
diff --git a/sc/qa/unit/pivottable_filters_test.cxx 
b/sc/qa/unit/pivottable_filters_test.cxx
index d9804d0713f1..5df1766190cb 100644
--- a/sc/qa/unit/pivottable_filters_test.cxx
+++ b/sc/qa/unit/pivottable_filters_test.cxx
@@ -92,6 +92,7 @@ public:
 void testTdf124810();
 void testTdf124883();
 void testTdf125046();
+void testTdf125055();
 
 CPPUNIT_TEST_SUITE(ScPivotTableFiltersTest);
 
@@ -141,6 +142,7 @@ public:
 CPPUNIT_TEST(testTdf124810);
 CPPUNIT_TEST(testTdf124883);
 CPPUNIT_TEST(testTdf125046);
+CPPUNIT_TEST(testTdf125055);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -2646,6 +2648,42 @@ void ScPivotTableFiltersTest::testTdf125046()
 "longText", "1");
 }
 
+void ScPivotTableFiltersTest::testTdf125055()
+{
+ScDocShellRef xDocSh = loadDoc("pivottable_1s_difference.", FORMAT_XLSX);
+CPPUNIT_ASSERT(xDocSh.is());
+
+xmlDocPtr pDoc = XPathHelper::parseExport2(
+*this, *xDocSh, m_xSFactory, 
"xl/pivotCache/pivotCacheDefinition1.xml", FORMAT_XLSX);
+CPPUNIT_ASSERT(pDoc);
+
+// 1-second precision should not result in duplicated entries for values 
different by ~1 s.
+// Previously truncating nanoseconds in GetExcelFormattedDate converted
+// "2017-07-10T09:11:02.9..." into "2017-07-10T09:11:02", creating two 
identical strings
+// Only compare times here: see comment to 
ScPivotTableFiltersTest::testPivotCacheExportXLSX
+// "TODO Date generator in tests are one day higher, than during standard 
xlsx export"
+OUString sISODateTime = getXPath(
+pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems", 
"minDate");
+CPPUNIT_ASSERT_EQUAL(OUString("T09:11:02"), sISODateTime.copy(10));
+sISODateTime = getXPath(
+pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems", 
"maxDate");
+CPPUNIT_ASSERT_EQUAL(OUString("T09:11:03"), sISODateTime.copy(10));
+assertXPath(pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems",
+"count", "3");
+assertXPathChildren(pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems",
+3); // 2 different values + empty
+sISODateTime = getXPath(
+pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems/x:d[1]", 
"v");
+CPPUNIT_ASSERT_EQUAL(OUString("T09:11:02"), sISODateTime.copy(10));
+sISODateTime = getXPath(
+pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems/x:d[2]", 
"v");
+CPPUNIT_ASSERT_EQUAL(OUString("T09:11:03"), sISODateTime.copy(10));
+// Trailing empty
+CPPUNIT_ASSERT_EQUAL(
+2, getXPathPosition(
+   pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems", "m"));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScPivotTableFiltersTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/filter/excel/xepivotxml.cxx 
b/sc/source/filter/excel/xepivotxml.cxx
index 8c263795fe94..dc825f0c836b 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -192,8 +192,10 @@ namespace {
  */
 OUString GetExcelFormattedDate( double fSerialDateTime, const 
SvNumberFormatter& rFormatter )
 {
-//::sax::Converter::convertDateTime(sBuf, 
(DateTime(rFormatter.GetNullDate()) + fSerialDateTime).GetUNODateTime(), 0, 
true);
-css::util::DateTime aUDateTime = (DateTime(rFormatter.GetNullDate()) + 
fSerialDateTime).GetUNODateTime();
+// tdf#125055: properly round the value to seconds when truncating 
nanoseconds below
+constexpr double fHalfSecond = 1 / 86400.0 * 0.5;
+css::util::DateTime aUDateTime
+= (DateTime(rFormatter.Get

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

2019-05-01 Thread Mike Kaganski (via logerrit)
 svx/source/svdraw/svdmrkv.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 6fe0ebb25bc846392b02cd67c2c08c6e92c3ee47
Author: Mike Kaganski 
AuthorDate: Wed May 1 10:01:08 2019 +0200
Commit: Mike Kaganski 
CommitDate: Wed May 1 10:09:19 2019 +0200

Fix build after commit 6d63cb8749811ff407c3b3f523a329bcaab05542

Failed on Windows with

  C:/lo/src/core2/svx/source/svdraw/svdmrkv.cxx(925): error C2079: 
'aDragParameters' uses undefined class 'std::array'
  C:/lo/src/core2/svx/source/svdraw/svdmrkv.cxx(927): error C3312: no 
callable 'begin' function found for type 'int'
  C:/lo/src/core2/svx/source/svdraw/svdmrkv.cxx(927): error C3312: no 
callable 'end' function found for type 'int'
  C:/lo/src/core2/svx/source/svdraw/svdmrkv.cxx(931): error C2065: 
'rParam': undeclared identifier
  C:/lo/src/core2/svx/source/svdraw/svdmrkv.cxx(935): error C2109: 
subscript requires array or pointer type
  C:/lo/src/core2/svx/source/svdraw/svdmrkv.cxx(936): error C2109: 
subscript requires array or pointer type
  C:/lo/src/core2/svx/source/svdraw/svdmrkv.cxx(937): error C2109: 
subscript requires array or pointer type
  C:/lo/src/core2/svx/source/svdraw/svdmrkv.cxx(938): error C2109: 
subscript requires array or pointer type
  C:/lo/src/core2/svx/source/svdraw/svdmrkv.cxx(941): error C2109: 
subscript requires array or pointer type
  C:/lo/src/core2/svx/source/svdraw/svdmrkv.cxx(944): error C2109: 
subscript requires array or pointer type
  C:/lo/src/core2/svx/source/svdraw/svdmrkv.cxx(945): error C2109: 
subscript requires array or pointer type
  C:/lo/src/core2/svx/source/svdraw/svdmrkv.cxx(930): error C2043: illegal 
break
  make[1]: *** [C:/lo/src/core2/solenv/gbuild/LinkTarget.mk:293: 
C:/lo/src/core2/workdir/CxxObject/svx/source/svdraw/svdmrkv.o] Error 2

Change-Id: Iaf2762a43a7eefce582bb187dd6978d5b28564e5
Reviewed-on: https://gerrit.libreoffice.org/71616
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 90865f7d5d02..08afd9d091df 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -56,6 +56,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace com::sun::star;
 
___
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.0' - sc/qa sc/source

2019-05-01 Thread Mike Kaganski (via logerrit)
 sc/qa/unit/data/xlsx/pivottable_1s_difference.xlsx |binary
 sc/qa/unit/pivottable_filters_test.cxx |   42 +
 sc/source/filter/excel/xepivotxml.cxx  |6 ++-
 3 files changed, 46 insertions(+), 2 deletions(-)

New commits:
commit 4fa1bdfad1ccf3bb61ff0d505278402f3f1a2afe
Author: Mike Kaganski 
AuthorDate: Wed May 1 07:22:44 2019 +0300
Commit: Mike Kaganski 
CommitDate: Wed May 1 10:23:17 2019 +0200

tdf#125055: properly round fractions of seconds

... so that 2017-07-10T09:11:02.99... becomes 2017-07-10T09:11:03,
not 2017-07-10T09:11:02. The latter created duplicated items in pivot
table cache previously.

TODO: check what to do if the times are actually different by 100 ns?
What Excel does then? Should we increase cache item precision?

Change-Id: I622d1c784ee9fddf6b387bec2d8af87bae5668ba
Reviewed-on: https://gerrit.libreoffice.org/71610
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/71618
Tested-by: Mike Kaganski 

diff --git a/sc/qa/unit/data/xlsx/pivottable_1s_difference.xlsx 
b/sc/qa/unit/data/xlsx/pivottable_1s_difference.xlsx
new file mode 100644
index ..de8906cf94ca
Binary files /dev/null and b/sc/qa/unit/data/xlsx/pivottable_1s_difference.xlsx 
differ
diff --git a/sc/qa/unit/pivottable_filters_test.cxx 
b/sc/qa/unit/pivottable_filters_test.cxx
index 100a8143facb..065ad71b4e55 100644
--- a/sc/qa/unit/pivottable_filters_test.cxx
+++ b/sc/qa/unit/pivottable_filters_test.cxx
@@ -95,6 +95,7 @@ public:
 void testTdf124810();
 void testTdf124883();
 void testTdf125046();
+void testTdf125055();
 
 CPPUNIT_TEST_SUITE(ScPivotTableFiltersTest);
 
@@ -144,6 +145,7 @@ public:
 CPPUNIT_TEST(testTdf124810);
 CPPUNIT_TEST(testTdf124883);
 CPPUNIT_TEST(testTdf125046);
+CPPUNIT_TEST(testTdf125055);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -2654,6 +2656,46 @@ void ScPivotTableFiltersTest::testTdf125046()
 "longText", "1");
 }
 
+void ScPivotTableFiltersTest::testTdf125055()
+{
+ScDocShellRef xDocSh = loadDoc("pivottable_1s_difference.", FORMAT_XLSX);
+CPPUNIT_ASSERT(xDocSh.is());
+
+std::shared_ptr pXPathFile
+= ScBootstrapFixture::exportTo(xDocSh.get(), FORMAT_XLSX);
+xDocSh->DoClose();
+
+xmlDocPtr pDoc = XPathHelper::parseExport(pXPathFile, m_xSFactory,
+  
"xl/pivotCache/pivotCacheDefinition1.xml");
+CPPUNIT_ASSERT(pDoc);
+
+// 1-second precision should not result in duplicated entries for values 
different by ~1 s.
+// Previously truncating nanoseconds in GetExcelFormattedDate converted
+// "2017-07-10T09:11:02.9..." into "2017-07-10T09:11:02", creating two 
identical strings
+// Only compare times here: see comment to 
ScPivotTableFiltersTest::testPivotCacheExportXLSX
+// "TODO Date generator in tests are one day higher, than during standard 
xlsx export"
+OUString sISODateTime = getXPath(
+pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems", 
"minDate");
+CPPUNIT_ASSERT_EQUAL(OUString("T09:11:02"), sISODateTime.copy(10));
+sISODateTime = getXPath(
+pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems", 
"maxDate");
+CPPUNIT_ASSERT_EQUAL(OUString("T09:11:03"), sISODateTime.copy(10));
+assertXPath(pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems",
+"count", "3");
+assertXPathChildren(pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems",
+3); // 2 different values + empty
+sISODateTime = getXPath(
+pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems/x:d[1]", 
"v");
+CPPUNIT_ASSERT_EQUAL(OUString("T09:11:02"), sISODateTime.copy(10));
+sISODateTime = getXPath(
+pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems/x:d[2]", 
"v");
+CPPUNIT_ASSERT_EQUAL(OUString("T09:11:03"), sISODateTime.copy(10));
+// Trailing empty
+CPPUNIT_ASSERT_EQUAL(
+2, getXPathPosition(
+   pDoc, 
"/x:pivotCacheDefinition/x:cacheFields/x:cacheField[2]/x:sharedItems", "m"));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScPivotTableFiltersTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/filter/excel/xepivotxml.cxx 
b/sc/source/filter/excel/xepivotxml.cxx
index fb174ef849f9..e0a6bc84870c 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -194,8 +194,10 @@ namespace {
  */
 OUString GetExcelFormattedDate( double fSerialDateTime, SvNumberFormatter& 
rFormatter )
 {
-//::sax::Converter::convertDateTime(sBuf, 
(DateTime(rFormatter.GetNullDate()) + fSerialDateTime).GetUNODateTime(), 0, 
true);
-css::util::DateTime aUDateTime = (DateTime(rFormatter.GetNullDate()) + 
fSerialDateTime).GetUNODateTi

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

2019-05-01 Thread Julien Nabet (via logerrit)
 vcl/source/bitmap/BitmapScaleSuperFilter.cxx |   26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

New commits:
commit ff18b00ab438ca627625e263389098307dcfd1cc
Author: Julien Nabet 
AuthorDate: Tue Apr 30 21:04:42 2019 +0200
Commit: Julien Nabet 
CommitDate: Wed May 1 11:39:35 2019 +0200

Typo Pallete->Palette

Change-Id: I8a7be3738cd84699568ae2711367e49754401609
Reviewed-on: https://gerrit.libreoffice.org/71594
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx 
b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
index 54f22f2dc5d8..b621ebe95fa7 100644
--- a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
+++ b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
@@ -186,7 +186,7 @@ void scaleUp32bit(ScaleContext &rCtx, long nStartY, long 
nEndY)
 }
 }
 
-void scaleUpPallete8bit(ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleUpPalette8bit(ScaleContext &rCtx, long nStartY, long nEndY)
 {
 const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
 
@@ -224,7 +224,7 @@ void scaleUpPallete8bit(ScaleContext &rCtx, long nStartY, 
long nEndY)
 }
 }
 
-void scaleUpPalleteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleUpPaletteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
 {
 const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
 
@@ -314,7 +314,7 @@ void scaleUp24bit(ScaleContext &rCtx, long nStartY, long 
nEndY)
 }
 }
 
-void scaleUpNonPalleteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleUpNonPaletteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
 {
 const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
 
@@ -491,7 +491,7 @@ void scaleDown32bit(ScaleContext &rCtx, long nStartY, long 
nEndY)
 }
 }
 
-void scaleDownPallete8bit(ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleDownPalette8bit(ScaleContext &rCtx, long nStartY, long nEndY)
 {
 const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
 
@@ -616,7 +616,7 @@ void scaleDownPallete8bit(ScaleContext &rCtx, long nStartY, 
long nEndY)
 }
 }
 
-void scaleDownPalleteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleDownPaletteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
 {
 const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
 
@@ -876,7 +876,7 @@ void scaleDown24bit(ScaleContext &rCtx, long nStartY, long 
nEndY)
 }
 }
 
-void scaleDownNonPalleteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleDownNonPaletteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
 {
 const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
 
@@ -1086,12 +1086,12 @@ BitmapEx BitmapScaleSuperFilter::execute(BitmapEx 
const& rBitmap) const
 switch( pReadAccess->GetScanlineFormat() )
 {
 case ScanlineFormat::N8BitPal:
-pScaleRangeFn = bScaleUp ? scaleUpPallete8bit
- : scaleDownPallete8bit;
+pScaleRangeFn = bScaleUp ? scaleUpPalette8bit
+ : scaleDownPalette8bit;
 break;
 default:
-pScaleRangeFn = bScaleUp ? scaleUpPalleteGeneral
- : scaleDownPalleteGeneral;
+pScaleRangeFn = bScaleUp ? scaleUpPaletteGeneral
+ : scaleDownPaletteGeneral;
 break;
 }
 }
@@ -1102,7 +1102,7 @@ BitmapEx BitmapScaleSuperFilter::execute(BitmapEx const& 
rBitmap) const
 // a fast path, so we always need to process with a general scaler.
 else if (nSourceBitcount != nTargetBitcount)
 {
-pScaleRangeFn = bScaleUp ? scaleUpNonPalleteGeneral : 
scaleDownNonPalleteGeneral;
+pScaleRangeFn = bScaleUp ? scaleUpNonPaletteGeneral : 
scaleDownNonPaletteGeneral;
 }
 // If we get here then we can only use a fast path, but let's
 // still keep the fallback to the general scaler alive.
@@ -1121,8 +1121,8 @@ BitmapEx BitmapScaleSuperFilter::execute(BitmapEx const& 
rBitmap) const
 pScaleRangeFn = bScaleUp ? scaleUp32bit : scaleDown32bit;
 break;
 default:
-pScaleRangeFn = bScaleUp ? scaleUpNonPalleteGeneral
- : scaleDownNonPalleteGeneral;
+pScaleRangeFn = bScaleUp ? scaleUpNonPaletteGeneral
+ : scaleDownNonPaletteGeneral;
 break;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-05-01 Thread Zdeněk Crhonek (via logerrit)
 sc/qa/uitest/calc_tests7/tdf125030.py |   36 ++
 1 file changed, 36 insertions(+)

New commits:
commit da53faea86be3980e014a3ec9acc7c48fe6aeeb9
Author: Zdeněk Crhonek 
AuthorDate: Tue Apr 30 23:51:31 2019 +0200
Commit: Zdenek Crhonek 
CommitDate: Wed May 1 11:51:21 2019 +0200

uitest for bug tdf#125030

Change-Id: Id3f8a0e7b03e47d5f09e87320006fbed293e941f
Reviewed-on: https://gerrit.libreoffice.org/71602
Tested-by: Jenkins
Reviewed-by: Zdenek Crhonek 

diff --git a/sc/qa/uitest/calc_tests7/tdf125030.py 
b/sc/qa/uitest/calc_tests7/tdf125030.py
new file mode 100644
index ..5aaa81abca9a
--- /dev/null
+++ b/sc/qa/uitest/calc_tests7/tdf125030.py
@@ -0,0 +1,36 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+import os
+from uitest.uihelper.common import get_state_as_dict
+from uitest.debug import sleep
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from libreoffice.calc.document import get_cell_by_position
+from uitest.uihelper.calc import enter_text_to_cell
+
+#Bug 125030 - nice crash by repeating apply style (Ctrl+Shft+Y)
+
+class tdf125030(UITestCase):
+def test_tdf125030_repeat_crash(self):
+calc_doc = self.ui_test.create_doc_in_start_center("calc")
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+#enter data
+enter_text_to_cell(gridwin, "A1", "")
+enter_text_to_cell(gridwin, "B1", "")
+#select A1
+gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
+
self.xUITest.executeCommand(".uno:StyleApply?Style:string=Heading%201&FamilyName:string=CellStyles")
+#focus on A2
+gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A2"}))
+#repeat (Ctrl+Shft+Y)
+self.xUITest.executeCommand(".uno:Repeat")
+self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), 
"")
+
+self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - include/test sw/qa sw/uiconfig test/qa test/source

2019-05-01 Thread Mike Kaganski (via logerrit)
 include/test/xmltesttools.hxx |2 -
 sw/qa/extras/uiwriter/uiwriter.cxx|   28 ++---
 sw/uiconfig/swriter/ui/notebookbar.ui |   27 +
 sw/uiconfig/swriter/ui/notebookbar_compact.ui |   41 +-
 test/qa/cppunit/test_xpath.cxx|2 +
 test/source/xmltesttools.cxx  |   17 +-
 6 files changed, 90 insertions(+), 27 deletions(-)

New commits:
commit d822953cbc1d8814ac9f9eac2107177d37103542
Author: Mike Kaganski 
AuthorDate: Wed May 1 09:17:14 2019 +0300
Commit: Mike Kaganski 
CommitDate: Wed May 1 12:30:22 2019 +0200

Make getXPathPosition assert on requested child found

Previously, for an XML like this:







the call like

int pos = getXPathPosition(pDoc, "/x:sharedItems", "absent");

gave 3. That could result in mistakes, when a test would assert
on position "3" for a child element which name is mistyped.

I made such a mistake when creating a unit test trying to assert on
a position of the last element, and writing its name as "x:m", like
in rXPath itself; the return was 3, and I initially wrongly assumed
that the return is 1-based (like in xpath bracketed expressions).

rChildName made const OString&, for consistency with rXPath, or with
rAttribute in getXPath: child name is just a part of a longer xpath.

Change-Id: I7ba9c4466c75b1b10fce1ccf26ef3b56b4e11e87
Reviewed-on: https://gerrit.libreoffice.org/71614
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/include/test/xmltesttools.hxx b/include/test/xmltesttools.hxx
index c24a81eb65d6..f8f10da387bd 100644
--- a/include/test/xmltesttools.hxx
+++ b/include/test/xmltesttools.hxx
@@ -58,7 +58,7 @@ protected:
  * Get the position of the child named rName of the parent node specified 
by rXPath.
  * Useful for checking relative order of elements.
  */
-int   getXPathPosition(xmlDocPtr pXmlDoc, const OString& rXPath, 
const OUString& rChildName);
+int   getXPathPosition(xmlDocPtr pXmlDoc, const OString& rXPath, 
const OString& rChildName);
 /**
  * Assert that rXPath exists, and returns exactly one node.
  */
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index d6795ead6620..aa32c236eaab 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -4680,12 +4680,10 @@ void SwUiWriterTest::testBookmarkCollapsed()
 const OString 
aPath("/office:document-content/office:body/office:text/text:p");
 
 const int pos1 = getXPathPosition(pXmlDoc, aPath, "bookmark");
-const int pos2 = getXPathPosition(pXmlDoc, aPath, "bookmark-start");
-const int pos3 = getXPathPosition(pXmlDoc, aPath, "bookmark-end");
-
 CPPUNIT_ASSERT_EQUAL(0, pos1); // found, and it is first
-CPPUNIT_ASSERT_EQUAL(2, pos2); // not found
-CPPUNIT_ASSERT_EQUAL(2, pos3); // not found
+
+CPPUNIT_ASSERT_ASSERTION_FAIL(getXPathPosition(pXmlDoc, aPath, 
"bookmark-start")); // not found
+CPPUNIT_ASSERT_ASSERTION_FAIL(getXPathPosition(pXmlDoc, aPath, 
"bookmark-end")); // not found
 }
 }
 
@@ -4758,11 +4756,10 @@ void SwUiWriterTest::testRemoveBookmarkText()
 {
 const OString 
aPath("/office:document-content/office:body/office:text/text:p");
 
-const int pos1 = getXPathPosition(pXmlDoc, aPath, "bookmark");
+CPPUNIT_ASSERT_ASSERTION_FAIL(getXPathPosition(pXmlDoc, aPath, 
"bookmark")); // not found
 const int pos2 = getXPathPosition(pXmlDoc, aPath, "bookmark-start");
 const int pos3 = getXPathPosition(pXmlDoc, aPath, "bookmark-end");
 
-CPPUNIT_ASSERT_EQUAL(3, pos1); // not found
 CPPUNIT_ASSERT_EQUAL(0, pos2); // found, and it is first
 CPPUNIT_ASSERT_EQUAL(1, pos3); // found, and it is second
 }
@@ -4865,12 +4862,11 @@ void SwUiWriterTest::testRemoveBookmarkTextAndAddNew()
 {
 const OString 
aPath("/office:document-content/office:body/office:text/text:p");
 
-const int pos1 = getXPathPosition(pXmlDoc, aPath, "bookmark");
+CPPUNIT_ASSERT_ASSERTION_FAIL(getXPathPosition(pXmlDoc, aPath, 
"bookmark")); // not found
 const int pos2 = getXPathPosition(pXmlDoc, aPath, "bookmark-start");
 const int pos3 = getXPathPosition(pXmlDoc, aPath, "text");
 const int pos4 = getXPathPosition(pXmlDoc, aPath, "bookmark-end");
 
-CPPUNIT_ASSERT_EQUAL(4, pos1); // not found
 CPPUNIT_ASSERT_EQUAL(0, pos2);
 CPPUNIT_ASSERT_EQUAL(1, pos3);
 CPPUNIT_ASSERT_EQUAL(2, pos4);
@@ -4935,13 +4931,11 @@ void 
SwUiWriterTest::testRemoveBookmarkTextAndAddNewAfterReload()
 const int pos1 = getXPathPosition(pXmlDoc, aPath, "bookmark");
 const int pos2 = getXPathPosition(pXmlDoc, aPath, "text");
 

Re: Bambara locale

2019-05-01 Thread Cyrille
>Excuse so much, but I just found the solution! Please update the page
>https://wiki.documentfoundation.org/Language_support_of_LibreOffice,
>because the exact code is now bm_ML. for the dictionary. Then the entry
>bambara is not recognize.

But the problem when I try to remove the extension remains. Please any
help. The error is the following:

(com.sun.star.lang.IllegalArgumentException) { { { Message =
"Impossibile rilevare il tipo di supporto:
file:///home/cyrille/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu252794ypqbj.tmp_/bm_test.oxt",
Context = (com.sun.star.uno.XInterface) @55ba6db9b6a0 } },
ArgumentPosition = (short) -1 }


Il 30/04/2019 21:17, Cyrille ha scritto:
> Hello,
> Currently I'm testing an other dictionary for the Bambara language. I
> download it from
> https://extensions.libreoffice.org/extensions/bambara-bamanakan-spell-checker/2.3.
> The oxt is corrupt and can't be uninstall after installation on the
> latest version of LO. Then I unzipped it and copied the dic/aff file in
> the hunspell folder.
> But LO doesn't recognize the dictionary in the list as a spellchecker. I
> need to enter the code manually {bm} then it works.
> The hunspell bm.dic works well with Thunderbird and Firefox. Is it a bug
> with the bm locale or LO use an other code for the bambara language?
> I tested also bam without success.
>
> Please help me again.
> Cyrille
>




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

[Libreoffice-commits] core.git: extras/source include/vcl sc/inc sc/source sc/uiconfig sfx2/source solenv/bin solenv/sanitizers sw/source vcl/inc vcl/source vcl/unx

2019-05-01 Thread Caolán McNamara (via logerrit)
 extras/source/glade/libreoffice-catalog.xml.in  |9 
 include/vcl/weld.hxx|   16 
 include/vcl/window.hxx  |1 
 sc/inc/scabstdlg.hxx|4 
 sc/source/ui/attrdlg/scdlgfact.cxx  |4 
 sc/source/ui/attrdlg/scdlgfact.hxx  |4 
 sc/source/ui/dbgui/PivotLayoutDialog.cxx|  405 ++--
 sc/source/ui/dbgui/PivotLayoutTreeList.cxx  |   61 +--
 sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx  |  129 +++
 sc/source/ui/dbgui/PivotLayoutTreeListData.cxx  |   84 ++--
 sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx |   34 --
 sc/source/ui/dbgui/pvfundlg.cxx |4 
 sc/source/ui/inc/PivotLayoutDialog.hxx  |  101 +++--
 sc/source/ui/inc/PivotLayoutTreeList.hxx|   13 
 sc/source/ui/inc/PivotLayoutTreeListBase.hxx|   50 +-
 sc/source/ui/inc/PivotLayoutTreeListData.hxx|   14 
 sc/source/ui/inc/PivotLayoutTreeListLabel.hxx   |8 
 sc/source/ui/inc/pvfundlg.hxx   |4 
 sc/source/ui/view/reffact.cxx   |   10 
 sc/source/ui/view/tabvwshc.cxx  |   32 -
 sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui  |  266 ---
 sfx2/source/dialog/basedlgs.cxx |2 
 solenv/bin/native-code.py   |3 
 solenv/sanitizers/ui/modules/scalc.false|2 
 solenv/sanitizers/ui/modules/scalc.suppr|4 
 sw/source/ui/fldui/fldfunc.cxx  |3 
 vcl/inc/treeglue.hxx|   40 ++
 vcl/inc/window.h|1 
 vcl/source/app/salvtables.cxx   |   60 +++
 vcl/source/window/dlgctrl.cxx   |   11 
 vcl/unx/gtk3/gtk3gtkinst.cxx|  159 +
 31 files changed, 979 insertions(+), 559 deletions(-)

New commits:
commit f82356d9a1ce1457593a5f42728e2962561328cf
Author: Caolán McNamara 
AuthorDate: Mon Apr 29 13:13:23 2019 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 15:55:55 2019 +0200

weld ScPivotLayoutDialog

Change-Id: I821ee682bf5b65774a609227811365b94ae2063e
Reviewed-on: https://gerrit.libreoffice.org/71547
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/extras/source/glade/libreoffice-catalog.xml.in 
b/extras/source/glade/libreoffice-catalog.xml.in
index 5fce152c342c..50b8118b0b91 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -247,15 +247,6 @@
 
-
-
-
 
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index ed3d69d5a652..4bc3e0893cf2 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -78,6 +78,7 @@ class VCL_DLLPUBLIC Widget
 protected:
 Link m_aFocusInHdl;
 Link m_aFocusOutHdl;
+Link m_aMnemonicActivateHdl;
 Link m_aSizeAllocateHdl;
 Link m_aKeyPressHdl;
 Link m_aKeyReleaseHdl;
@@ -161,6 +162,15 @@ public:
 m_aFocusOutHdl = rLink;
 }
 
+// rLink is called when the mnemonic for the Widget is called.
+// If rLink returns true the Widget will not automatically gain
+// focus as normally occurs
+virtual void connect_mnemonic_activate(const Link& rLink)
+{
+assert(!m_aMnemonicActivateHdl.IsSet() || !rLink.IsSet());
+m_aMnemonicActivateHdl = rLink;
+}
+
 virtual void connect_size_allocate(const Link& rLink)
 {
 assert(!m_aSizeAllocateHdl.IsSet() || !rLink.IsSet());
@@ -655,6 +665,7 @@ public:
 virtual std::vector get_selected_rows() const = 0;
 virtual void set_font_color(int pos, const Color& rColor) const = 0;
 virtual void scroll_to_row(int pos) = 0;
+virtual int get_cursor_index() const = 0;
 virtual void set_cursor(int pos) = 0;
 
 //by text
@@ -801,6 +812,11 @@ public:
 OUString const& get_saved_value() const { return m_sSavedValue; }
 bool get_value_changed_from_saved() const { return m_sSavedValue != 
get_selected_text(); }
 
+// for dnd
+virtual bool get_dest_row_at_pos(const Point& rPos, weld::TreeIter* 
pResult) = 0;
+// for dragging and dropping between TreeViews, return the active source
+virtual TreeView* get_drag_source() const = 0;
+
 using Widget::set_sensitive;
 };
 
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index c109e80d982d..e2223af65950 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1577,6 +1577,7 @@ public:
 virtual bool IsChart() const { return false; }
 
 void SetHelpHdl(const Link& rLink);
+void SetMnemonicActivateHdl(const Link& rLink);
 };
 
 }
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 7b2c458ee7eb..cb6ba6933ee7 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -472,12 +472,12 @@ public:
 const 
SfxItemSet& rArgSet,
  

[Libreoffice-commits] core.git: nlpsolver/ThirdParty

2019-05-01 Thread Todor Balabanov (via logerrit)
 
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java
 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit df512e74753667194faa623b99884d3590597cfd
Author: Todor Balabanov 
AuthorDate: Mon Apr 29 13:27:17 2019 +0300
Commit: Noel Grandin 
CommitDate: Wed May 1 16:10:45 2019 +0200

Math pow is too slow in this case.

Change-Id: I16149cabf75ec928d96975e4b98622df6951cefc
Reviewed-on: https://gerrit.libreoffice.org/71519
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
Reviewed-by: Noel Grandin 

diff --git 
a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java
 
b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java
index b6387bfb8a96..e5677818c0ef 100644
--- 
a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java
+++ 
b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java
@@ -57,7 +57,7 @@ public class DEGTBehavior extends AbsGTBehavior implements 
ILibEngine {
   if (Math.random()https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: nlpsolver/ThirdParty

2019-05-01 Thread Todor Balabanov (via logerrit)
 
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java
 |   11 +++---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 209e40de80dec55427d406951f01507a6c8aeb84
Author: Todor Balabanov 
AuthorDate: Mon Apr 29 18:55:25 2019 +0300
Commit: Noel Grandin 
CommitDate: Wed May 1 16:11:30 2019 +0200

Random class is better than Math random function.

Change-Id: Ia35e3bb3b4f0323c7fbfc54ae5064afdf2c3f381
Reviewed-on: https://gerrit.libreoffice.org/71539
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git 
a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java
 
b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java
index b59b0f8b19ed..d7fafc9b9046 100644
--- 
a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java
+++ 
b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java
@@ -22,7 +22,13 @@
 
 package net.adaptivebox.global;
 
+import java.util.Random;
+
 public class RandomGenerator {
+/**
+ * Pseudo-random number generator instance.
+ */
+private static Random PRNG = new Random();
 
 /**
  * This function returns a random integer number between the lowLimit and
@@ -34,8 +40,7 @@ public class RandomGenerator {
  * @return int return value Example: for find [0,1,2]
  */
 public static int intRangeRandom(int lowLimit, int upLimit) {
-int num = (int) Math
-.floor(doubleRangeRandom(lowLimit, upLimit + 1) - 1E-10);
+int num = lowLimit + PRNG.nextInt(upLimit - lowLimit + 1);
 return num;
 }
 
@@ -49,7 +54,7 @@ public class RandomGenerator {
  * @return double return value
  */
 public static double doubleRangeRandom(double lowLimit, double upLimit) {
-double num = lowLimit + Math.random() * (upLimit - lowLimit);
+double num = lowLimit + PRNG.nextDouble() * (upLimit - lowLimit);
 return num;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: nlpsolver/ThirdParty

2019-05-01 Thread Todor Balabanov (via logerrit)
 
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java
 |   46 --
 1 file changed, 19 insertions(+), 27 deletions(-)

New commits:
commit b596210c09374f53d4349990945a07520c092f55
Author: Todor Balabanov 
AuthorDate: Wed May 1 15:04:27 2019 +0300
Commit: Noel Grandin 
CommitDate: Wed May 1 16:15:24 2019 +0200

Fisher-Yates shuffling algorithm achieves much better randomization.

Change-Id: I6d204a7ba0fa19f4c318d1c70f5a0344e0640d6d
Reviewed-on: https://gerrit.libreoffice.org/71620
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git 
a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java
 
b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java
index d7fafc9b9046..18ced86335dc 100644
--- 
a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java
+++ 
b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java
@@ -59,37 +59,29 @@ public class RandomGenerator {
 }
 
 public static int[] randomSelection(int maxNum, int times) {
-if (times <= 0)
-return new int[0];
-int realTimes = Math.min(maxNum, times);
-boolean[] flags = new boolean[maxNum];
-boolean isBelowHalf = times < maxNum * 0.5;
-int virtualTimes = realTimes;
-if (!isBelowHalf) {
-virtualTimes = maxNum - realTimes;
+if (maxNum < 0) {
+maxNum = 0;
 }
-int i = 0;
-int upper = maxNum - 1;
-int[] indices = new int[realTimes];
 
-while (i < virtualTimes) {
-indices[i] = intRangeRandom(0, upper);
-if (!flags[indices[i]]) {
-flags[indices[i]] = true;
-i++;
-}
+if (times < 0) {
+times = 0;
 }
-if (!isBelowHalf) {
-int j = 0;
-for (i = 0; i < maxNum; i++) {
-if (flags[i] == isBelowHalf) {
-indices[j] = i;
-j++;
-if (j == realTimes)
-break;
-}
-}
+
+int[] all = new int[maxNum];
+for (int i = 0; i < all.length; i++) {
+all[i] = i;
 }
+
+/* https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle */
+int[] indices = new int[Math.min(maxNum, times)];
+for (int i = 0, j, value; i < indices.length; i++) {
+j = intRangeRandom(i, all.length - 1);
+
+value = all[j];
+all[j] = all[i];
+indices[i] = all[i] = value;
+}
+
 return indices;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

LibreOffice Java API and Java 11

2019-05-01 Thread Rick Heckadon
Good Morning!

I'm currently working on a Java project that includes the LibreOffice Java API. 
 With Oracles changes to the distribution and support of Java, I have since 
moved the project over to AdoptOpenJDK 11.  While trying to run the program, 
the LibreOffice API keeps causing this error:

Error occurred during initialization of boot layer. 
java.lang.module.ResolutionException: Module jurt contains package 
com.sun.star.lib.util, module ridl exports package com.sun.star.lib.util to 
jurt. Command execution failed.

I did do a Google search and found this bug report: 
https://bugs.documentfoundation.org/show_bug.cgi?id=117331.  It is related to 
my issue, but I do not see any resolution to the problem.  I am writing this 
message to see if there is some way to get around this issue before the 
LibreOffice Java API is made Java 9 or 11 compliant?

Thank you for your time!
Rick Heckadon

#
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal
#
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - test/helpers.hpp test/test.cpp

2019-05-01 Thread Libreoffice Gerrit user
 test/helpers.hpp |   17 +
 test/test.cpp|   17 +++--
 2 files changed, 24 insertions(+), 10 deletions(-)

New commits:
commit 8dc0f525ac8b6f74b020445934ce4ab725bbefc7
Author: Michael Meeks 
AuthorDate: Mon Mar 4 22:02:59 2019 +0100
Commit: Michael Meeks 
CommitDate: Wed May 1 19:14:42 2019 +0200

Don't use the same std::ostringstream from multiple threads.

Avoids tests crashing with obscure memory errors re-allocating the
string buffer; and hopefully cleans up the output too.

Change-Id: I3e38680c15129e84f0c7dd8cada3b505cf08ad34
(cherry picked from commit 5bbf2b2fec2e118f91908325d9e8dd2df9f7a47e)
Reviewed-on: https://gerrit.libreoffice.org/71626
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/test/helpers.hpp b/test/helpers.hpp
index 13b351762..07e02a386 100644
--- a/test/helpers.hpp
+++ b/test/helpers.hpp
@@ -37,11 +37,20 @@
 #error TDOC must be defined (see Makefile.am)
 #endif
 
-// Logging in unit-tests go to cerr, for now at least.
-#define TST_LOG_NAME_BEGIN(NAME, X) do { std::cerr << NAME << "(@" << 
helpers::timeSinceTestStartMs() << "ms) " << X; } while (false)
+// Oh dear std::cerr and/or its re-direction is not
+// necessarily thread safe on Linux
+#ifdef TST_LOG_REDIRECT
+  void tstLog(const std::ostringstream &stream);
+#else
+  inline void tstLog(const std::ostringstream &stream)
+  {
+  fprintf(stderr, "%s", stream.str().c_str());
+  }
+#endif
+#define TST_LOG_NAME_BEGIN(NAME, X) do { std::ostringstream str; str << NAME 
<< "(@" << helpers::timeSinceTestStartMs() << "ms) " << X; tstLog(str); } while 
(false)
 #define TST_LOG_BEGIN(X) TST_LOG_NAME_BEGIN(testname, X)
-#define TST_LOG_APPEND(X) do { std::cerr << X; } while (false)
-#define TST_LOG_END do { std::cerr << "| " << __FILE__ << ':' << __LINE__ << 
std::endl; } while (false)
+#define TST_LOG_APPEND(X) do { std::ostringstream str; str << X; tstLog(str); 
} while (false)
+#define TST_LOG_END do { std::ostringstream str; str << "| " << __FILE__ << 
':' << __LINE__ << std::endl; tstLog(str); } while (false)
 #define TST_LOG_NAME(NAME, X) TST_LOG_NAME_BEGIN(NAME, X); TST_LOG_END
 #define TST_LOG(X) TST_LOG_NAME(testname, X)
 
diff --git a/test/test.cpp b/test/test.cpp
index f09e1f855..0b905fb54 100644
--- a/test/test.cpp
+++ b/test/test.cpp
@@ -7,6 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#define TST_LOG_REDIRECT
 #include 
 
 #include 
@@ -79,6 +80,15 @@ bool isStandalone()
 return IsStandalone;
 }
 
+static std::mutex errorMutex;
+static std::stringstream errors;
+
+void tstLog(const std::ostringstream &stream)
+{
+std::lock_guard lock(errorMutex);
+errors << stream.str();
+}
+
 // returns true on success
 bool runClientTests(bool standalone, bool verbose)
 {
@@ -119,16 +129,11 @@ bool runClientTests(bool standalone, bool verbose)
 if (!verbose)
 {
 // redirect std::cerr temporarily
-std::stringstream errorBuffer;
-std::streambuf* oldCerr = std::cerr.rdbuf(errorBuffer.rdbuf());
-
 runner.run(controller);
 
-std::cerr.rdbuf(oldCerr);
-
 // output the errors we got during the testing
 if (!result.wasSuccessful())
-std::cerr << errorBuffer.str() << std::endl;
+std::cerr << errors.str() << std::endl;
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-05-01 Thread Michael Meeks (via logerrit)
 vcl/source/window/paint.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit a876de01dedb50bbdfb38838b55cae65c07c72a1
Author: Michael Meeks 
AuthorDate: Fri Apr 26 20:04:00 2019 +0100
Commit: Michael Meeks 
CommitDate: Wed May 1 19:19:06 2019 +0200

lok: disable VCL painting and whole window invalidation.

The reasoning is somewhat complex:

void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, 
InvalidateFlags nFlags )

sets the mnPaintFlags on the mpWindowImpl - and then queues an idle
paint. This paint in LOK mode does ~nothing - since all rendering is
tiled, although amazingly it does emit eg. selection callbacks.

However the paint flag - changes the behavior of Window::Update() to
force a complete window invalidate. This happens, but only rarely -
when a key-event manages to get into the mainloop before the idle
paint handler arrives and does nothing (except clear the paint flags).

So - don't do these big invalidations we don't need to in lok mode,
unless it is for dialogs - which presumably Pranav wanted fixed by
625087b58f3b7.

Change-Id: I88dda34b8d8bba9c89296d883ad9169fe49a7c5e
Reviewed-on: https://gerrit.libreoffice.org/71395
Tested-by: Jenkins
Reviewed-by: Michael Meeks 

diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 46b56b330602..7f6e8124c0d1 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #if HAVE_FEATURE_OPENGL
 #include 
 #endif
@@ -631,6 +632,8 @@ void Window::ImplCallOverlapPaint()
 
 IMPL_LINK_NOARG(Window, ImplHandlePaintHdl, Timer *, void)
 {
+comphelper::ProfileZone aZone("VCL idle re-paint");
+
 // save paint events until layout is done
 if (IsSystemWindow() && static_cast(this)->hasPendingLayout())
 {
@@ -652,6 +655,8 @@ IMPL_LINK_NOARG(Window, ImplHandlePaintHdl, Timer *, void)
 
 IMPL_LINK_NOARG(Window, ImplHandleResizeTimerHdl, Timer *, void)
 {
+comphelper::ProfileZone aZone("VCL idle resize");
+
 if( mpWindowImpl->mbReallyVisible )
 {
 ImplCallResize();
@@ -719,6 +724,7 @@ void Window::ImplInvalidateFrameRegion( const vcl::Region* 
pRegion, InvalidateFl
 pParent->ImplInvalidateFrameRegion( pChildRegion, nFlags );
 }
 }
+
 if ( !mpWindowImpl->mpFrameData->maPaintIdle.IsActive() )
 mpWindowImpl->mpFrameData->maPaintIdle.Start();
 }
@@ -1321,10 +1327,13 @@ void Window::Update()
 }
 
 pUpdateWindow->ImplCallPaint(nullptr, 
pUpdateWindow->mpWindowImpl->mnPaintFlags);
-pUpdateWindow->LogicInvalidate(nullptr);
+
+if (comphelper::LibreOfficeKit::isActive() && 
pUpdateWindow->GetParentDialog())
+pUpdateWindow->LogicInvalidate(nullptr);
 
 if (xWindow->IsDisposed())
return;
+
 bFlush = true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-05-01 Thread Jens Carl (via logerrit)
 sc/qa/extras/sctablecolumnobj.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 0b8ac2d3c84043789783d3b4f04639323b9d3bb9
Author: Jens Carl 
AuthorDate: Wed May 1 01:04:29 2019 +
Commit: Jens Carl 
CommitDate: Wed May 1 19:30:40 2019 +0200

Add XServiceInfo tests to ScTableColumnObj

Change-Id: Id8f78e2b114945f2c2499739711db9223828314a
Reviewed-on: https://gerrit.libreoffice.org/71609
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/sc/qa/extras/sctablecolumnobj.cxx 
b/sc/qa/extras/sctablecolumnobj.cxx
index f64b2c0b1822..dff0384fe42a 100644
--- a/sc/qa/extras/sctablecolumnobj.cxx
+++ b/sc/qa/extras/sctablecolumnobj.cxx
@@ -10,6 +10,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -32,7 +33,8 @@ class ScTableColumnObj : public CalcUnoApiTest,
  public apitest::TableColumn,
  public apitest::XCellRange,
  public apitest::XNamed,
- public apitest::XPropertySet
+ public apitest::XPropertySet,
+ public apitest::XServiceInfo
 {
 public:
 ScTableColumnObj();
@@ -63,6 +65,11 @@ public:
 CPPUNIT_TEST(testPropertyChangeListener);
 CPPUNIT_TEST(testVetoableChangeListener);
 
+// XServiceInfo
+CPPUNIT_TEST(testGetImplementationName);
+CPPUNIT_TEST(testGetSupportedServiceNames);
+CPPUNIT_TEST(testSupportsService);
+
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -108,6 +115,7 @@ ScTableColumnObj::ScTableColumnObj()
   "ValidationXML",
   "WritingMode",
   })
+, XServiceInfo("ScTableColumnObj", "com.sun.star.table.TableColumn")
 {
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: Changes to 'distro/collabora/collabora-online-4-0-4'

2019-05-01 Thread Libreoffice Gerrit user
New branch 'distro/collabora/collabora-online-4-0-4' available with the 
following commits:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0-4' - 8 commits - configure.ac ios/config.h.in ios/Mobile loleaflet/html loleaflet/js loleaflet/Makefile.am loleaflet/plu

2019-05-01 Thread Libreoffice Gerrit user
 configure.ac   |   20 ++--
 ios/Mobile/Info.plist.in   |2 -
 ios/config.h.in|2 +
 loleaflet/Makefile.am  |2 -
 loleaflet/html/loleaflet.html.m4   |2 +
 loleaflet/js/jquery.mCustomScrollbar.js|   27 +++--
 loleaflet/plugins/path-transform/src/Path.Transform.js |   26 ++--
 loleaflet/src/control/Control.Scroll.js|5 ++-
 loleaflet/src/core/Socket.js   |   15 +
 loleaflet/src/layer/tile/TileLayer.js  |   10 ++
 loleaflet/src/layer/tile/WriterTileLayer.js|7 +++-
 loleaflet/src/map/Map.js   |9 +
 wsd/LOOLWSD.cpp|3 +
 13 files changed, 93 insertions(+), 37 deletions(-)

New commits:
commit a83d10b57713f6144db93a9dc3ef3e5711382e80
Author: Marco Cecchetti 
AuthorDate: Mon Mar 4 20:36:45 2019 +0100
Commit: Andras Timar 
CommitDate: Wed May 1 21:54:20 2019 +0200

leaflet: after resizing a shape, dragging cursor with mouse pans view

The problem was in Path.Transform._apply executed at scale/rotate end
which enabled map dragging unconditionally.

Change-Id: Id42dc7de397a2ca2774f9d31a698c32b5e1c8514
Reviewed-on: https://gerrit.libreoffice.org/70559
Reviewed-by: Henry Castro 
Tested-by: Henry Castro 

diff --git a/loleaflet/plugins/path-transform/src/Path.Transform.js 
b/loleaflet/plugins/path-transform/src/Path.Transform.js
index f7efd72cc..3ea9ddaab 100644
--- a/loleaflet/plugins/path-transform/src/Path.Transform.js
+++ b/loleaflet/plugins/path-transform/src/Path.Transform.js
@@ -282,6 +282,7 @@ L.Handler.PathTransform = L.Handler.extend({
var matrix = this._matrix.clone();
var angle = this._angle;
var scale = this._scale.clone();
+   var moved = this._handleDragged;
 
this._transformGeometries();
 
@@ -299,7 +300,11 @@ L.Handler.PathTransform = L.Handler.extend({
 
this._updateHandlers();
 
-   map.dragging.enable();
+   if (this._mapDraggingWasEnabled) {
+   if (moved) L.DomEvent._fakeStop({ type: 'click' });
+   map.dragging.enable();
+   }
+
this._path.fire('transformed', {
matrix: matrix,
scale: scale,
@@ -576,7 +581,12 @@ L.Handler.PathTransform = L.Handler.extend({
_onRotateStart: function(evt) {
var map = this._map;
 
-   map.dragging.disable();
+   this._handleDragged = false;
+   this._mapDraggingWasEnabled = false;
+   if (map.dragging.enabled()) {
+   map.dragging.disable();
+   this._mapDraggingWasEnabled = true;
+   }
 
this._originMarker = null;
this._rotationOriginPt = 
map.latLngToLayerPoint(this._getRotationOrigin());
@@ -604,6 +614,8 @@ L.Handler.PathTransform = L.Handler.extend({
var previous = this._rotationStart;
var origin   = this._rotationOriginPt;
 
+   this._handleDragged = true;
+
// rotation step angle
this._angle = Math.atan2(pos.y - origin.y, pos.x - origin.x) -
Math.atan2(previous.y - origin.y, previous.x - 
origin.x);
@@ -649,7 +661,12 @@ L.Handler.PathTransform = L.Handler.extend({
var marker = evt.target;
var map = this._map;
 
-   map.dragging.disable();
+   this._handleDragged = false;
+   this._mapDraggingWasEnabled = false;
+   if (map.dragging.enabled()) {
+   map.dragging.disable();
+   this._mapDraggingWasEnabled = true;
+   }
 
this._activeMarker = marker;
 
@@ -688,6 +705,9 @@ L.Handler.PathTransform = L.Handler.extend({
_onScale: function(evt) {
var originPoint = this._originMarker._point;
var ratioX, ratioY;
+
+   this._handleDragged = true;
+
if (this.options.uniformScaling) {
ratioX = originPoint.distanceTo(evt.layerPoint) / 
this._initialDist;
ratioY = ratioX;
commit de348d2f9624b85470a389e0c1efc38a801c3539
Author: Szymon Kłos 
AuthorDate: Wed Mar 13 18:05:14 2019 +0100
Commit: Andras Timar 
CommitDate: Wed May 1 21:53:27 2019 +0200

Show progressbar centered in the mobile

When Online was embodied in the nextcloud app (Android)
the progressbar was moved into top-left corner.
During a loading all functions to get container
or browser size were returning (0,0).
This

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

2019-05-01 Thread Caolán McNamara (via logerrit)
 sc/source/ui/view/reffact.cxx |   14 ++
 1 file changed, 2 insertions(+), 12 deletions(-)

New commits:
commit def3802af84a8f1b0d6d885d0481e02d7fa1da64
Author: Caolán McNamara 
AuthorDate: Wed May 1 12:34:23 2019 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 22:13:22 2019 +0200

parent SfxChildWindow::GetInfo does the same already

Change-Id: I1c3185530f7b892f78f71d2db8534aec07e73e57
Reviewed-on: https://gerrit.libreoffice.org/71623
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 47927d38071c..9887ba56364b 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -55,16 +55,8 @@ SFX_IMPL_CHILDWINDOW_WITHID(ScValidityRefChildWin, 
SID_VALIDITY_REFERENCE)
 
 SfxChildWinInfo ScValidityRefChildWin::GetInfo() const
 {
-SfxChildWinInfo anInfo = SfxChildWindow::GetInfo();
-
-auto xDlgController = GetController();
-if (xDlgController)
-{
-weld::Dialog* pDialog = xController->getDialog();
-aInfo.aSize = pDialog->get_size();
-}
-
-return anInfo;
+SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
+return aInfo;
 }
 
 namespace
commit 95a9ec752032c82cdd72624b4c0eb030989d0803
Author: Caolán McNamara 
AuthorDate: Wed May 1 12:31:19 2019 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 22:13:13 2019 +0200

ScValidityRefChildWin has a Controller, not a Window now

Change-Id: Ia570417f6f7926dbce19944d91d4a9cb9814eb19
Reviewed-on: https://gerrit.libreoffice.org/71622
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 8a389b529ade..47927d38071c 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -57,13 +57,11 @@ SfxChildWinInfo ScValidityRefChildWin::GetInfo() const
 {
 SfxChildWinInfo anInfo = SfxChildWindow::GetInfo();
 
-if( vcl::Window *pWnd = GetWindow() )
+auto xDlgController = GetController();
+if (xDlgController)
 {
-anInfo.aSize  = pWnd->GetSizePixel();
-
-if( pWnd->IsDialog() )
-if ( static_cast(pWnd)->IsRollUp() )
-anInfo.nFlags |= SfxChildWindowFlags::ZOOMIN;
+weld::Dialog* pDialog = xController->getDialog();
+aInfo.aSize = pDialog->get_size();
 }
 
 return anInfo;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-05-01 Thread Andrea Gelmini (via logerrit)
 dbaccess/source/core/api/query.cxx   |2 +-
 dbaccess/source/core/api/querydescriptor.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit daebba1c296b9baa194b9052127810497a1c9f20
Author: Andrea Gelmini 
AuthorDate: Sun Apr 28 21:11:28 2019 +
Commit: Julien Nabet 
CommitDate: Wed May 1 22:38:24 2019 +0200

Fix typo

Change-Id: I0def9e55b25aec0920e1a6aafb9f4c75ad6a06f7
Reviewed-on: https://gerrit.libreoffice.org/71635
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/dbaccess/source/core/api/query.cxx 
b/dbaccess/source/core/api/query.cxx
index cac86edf8e2b..c690ca756a3b 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -330,7 +330,7 @@ void SAL_CALL OQuery::rename( const OUString& newName )
 void OQuery::registerProperties()
 {
 // the properties which OCommandBase supplies (it has no own registration, 
as it's not derived from
-// a OPropertyStateContainer)
+// an OPropertyStateContainer)
 registerProperty(PROPERTY_NAME, PROPERTY_ID_NAME, 
PropertyAttribute::BOUND|PropertyAttribute::CONSTRAINED,
 &m_sElementName, 
cppu::UnoType::get());
 
commit 57b7873e3ed62e3acb8334a98864c4ebfca302c8
Author: Andrea Gelmini 
AuthorDate: Sun Apr 28 21:11:27 2019 +
Commit: Julien Nabet 
CommitDate: Wed May 1 22:38:10 2019 +0200

Fix typo

Change-Id: I7dee823ce762e14fb1b96a7aa3ced2d64a66c82c
Reviewed-on: https://gerrit.libreoffice.org/71636
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/dbaccess/source/core/api/querydescriptor.cxx 
b/dbaccess/source/core/api/querydescriptor.cxx
index 0dc0a609d0ff..b506da57b13c 100644
--- a/dbaccess/source/core/api/querydescriptor.cxx
+++ b/dbaccess/source/core/api/querydescriptor.cxx
@@ -72,7 +72,7 @@ IMPLEMENT_FORWARD_XINTERFACE3( 
OQueryDescriptor,OWeakObject,OQueryDescriptor_Bas
 void OQueryDescriptor::registerProperties()
 {
 // the properties which OCommandBase supplies (it has no own registration, 
as it's not derived from
-// a OPropertyStateContainer)
+// an OPropertyStateContainer)
 registerProperty(PROPERTY_NAME, PROPERTY_ID_NAME, 
PropertyAttribute::BOUND|PropertyAttribute::CONSTRAINED,
 &m_sElementName, 
cppu::UnoType::get());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-05-01 Thread Andrea Gelmini (via logerrit)
 dbaccess/source/core/api/RowSetCache.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 10d3c43ff169b0c250f22d07fadd0edd86a8d2d2
Author: Andrea Gelmini 
AuthorDate: Sun Apr 28 21:11:29 2019 +
Commit: Julien Nabet 
CommitDate: Wed May 1 22:38:42 2019 +0200

Fix typo

Change-Id: I56626f7df54c31847f150374dbb41ace274d5c2d
Reviewed-on: https://gerrit.libreoffice.org/71634
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/dbaccess/source/core/api/RowSetCache.hxx 
b/dbaccess/source/core/api/RowSetCache.hxx
index c00f818a7373..7d9adedcd35b 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -70,7 +70,7 @@ namespace dbaccess
 TOldRowSetRows  m_aOldRows;
 
 std::unique_ptr  m_pInsertMatrix;// represent 
the rows which should be inserted normally this is only one
-ORowSetMatrix::iterator m_aInsertRow;   // represent a 
insert row
+ORowSetMatrix::iterator m_aInsertRow;   // represent 
an insert row
 
 connectivity::OSQLTable m_aUpdateTable; // used for 
updates/deletes and inserts
 
@@ -135,7 +135,7 @@ namespace dbaccess
 ~ORowSetCache();
 
 
-// called from the rowset when a updateXXX was called for the first 
time
+// called from the rowset when an updateXXX was called for the first 
time
 void setUpdateIterator(const ORowSetMatrix::iterator& _rOriginalRow);
 ORowSetCacheIterator createIterator(ORowSetBase* _pRowSet);
 void deleteIterator(const ORowSetBase* _pRowSet);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-05-01 Thread Andrea Gelmini (via logerrit)
 connectivity/source/inc/java/LocalRef.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2aed7abb64ded178850f1ecaff98986357086b68
Author: Andrea Gelmini 
AuthorDate: Sun Apr 28 21:11:38 2019 +
Commit: Julien Nabet 
CommitDate: Wed May 1 22:38:59 2019 +0200

Fix typo

Change-Id: I20e6de52e8244ef118973671cd25fb9fc6f3e22f
Reviewed-on: https://gerrit.libreoffice.org/71632
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/connectivity/source/inc/java/LocalRef.hxx 
b/connectivity/source/inc/java/LocalRef.hxx
index 18beca5e6f36..e4db70263801 100644
--- a/connectivity/source/inc/java/LocalRef.hxx
+++ b/connectivity/source/inc/java/LocalRef.hxx
@@ -30,7 +30,7 @@ namespace connectivity { namespace jdbc
 
 Note that this class never actually calls NewLocalRef. It is assumed 
that all objects
 passed are already acquired with a local ref (as it usually is the 
case if you obtain
-the object from an JNI method).
+the object from a JNI method).
 */
 template< typename T >
 class LocalRef final
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: test/TileCacheTests.cpp

2019-05-01 Thread Libreoffice Gerrit user
 test/TileCacheTests.cpp |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 98fb165c6918cfc8db2482d46fc3efdfe38478bf
Author: Michael Meeks 
AuthorDate: Wed May 1 21:54:45 2019 +0100
Commit: Michael Meeks 
CommitDate: Wed May 1 22:56:17 2019 +0200

Adapt test for new hiddenparts field.

Change-Id: Id2173a38167b97327d0735dfe2a8c88e2dcc4bc7
Reviewed-on: https://gerrit.libreoffice.org/71640
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/test/TileCacheTests.cpp b/test/TileCacheTests.cpp
index d6577f50a..7f8b0e63a 100644
--- a/test/TileCacheTests.cpp
+++ b/test/TileCacheTests.cpp
@@ -1041,7 +1041,10 @@ void 
TileCacheTests::checkTiles(std::shared_ptr& socket, const st
 std::getline(istr, line);
 
 Poco::StringTokenizer tokens(line, " ", 
Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
-CPPUNIT_ASSERT_EQUAL(static_cast(6), tokens.count());
+if (docType == "presentation" || docType == "spreadsheet") // extra 
hiddenparts="..."
+CPPUNIT_ASSERT_EQUAL(static_cast(7), tokens.count());
+else
+CPPUNIT_ASSERT_EQUAL(static_cast(6), tokens.count());
 
 // Expected format is something like 'type= parts= current= width= 
height='.
 const std::string text = tokens[0].substr(type.size());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: test/test.cpp

2019-05-01 Thread Libreoffice Gerrit user
 test/test.cpp |8 
 1 file changed, 8 insertions(+)

New commits:
commit 95e1034d27e39e080ac25ddd88099e12db89d3d3
Author: Michael Meeks 
AuthorDate: Wed May 1 22:12:56 2019 +0100
Commit: Michael Meeks 
CommitDate: Wed May 1 23:14:04 2019 +0200

test: help people run just the one that matters.

Change-Id: I1916e250613f8d50377180e38505045f71f51fd0
Reviewed-on: https://gerrit.libreoffice.org/71642
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/test/test.cpp b/test/test.cpp
index 0b905fb54..91e3251c7 100644
--- a/test/test.cpp
+++ b/test/test.cpp
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -144,6 +145,13 @@ bool runClientTests(bool standalone, bool verbose)
 outputter.setNoWrap();
 outputter.write();
 
+const std::deque &failures = result.failures();
+if (!envar && failures.size() > 0)
+{
+std::cerr << "\nTo reproduce the first test failure use:\n\n";
+std::cerr << "(cd test; CPPUNIT_TEST_NAME=\"" << 
(*failures.begin())->failedTestName() << "\" ./run_unit.sh)\n\n";
+}
+
 return result.wasSuccessful();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/test qadevOOo/objdsc sc/qa test/Library_subsequenttest.mk test/source

2019-05-01 Thread Jens Carl (via logerrit)
 include/test/util/xsearchdescriptor.hxx |   33 
+
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv |2 
 sc/qa/extras/sccellsearchobj.cxx|8 +-
 test/Library_subsequenttest.mk  |1 
 test/source/util/xsearchdescriptor.cxx  |   36 
++
 5 files changed, 77 insertions(+), 3 deletions(-)

New commits:
commit 976bb31199baf8ded562323e35626c61ef5bffbe
Author: Jens Carl 
AuthorDate: Wed May 1 03:55:35 2019 +
Commit: Jens Carl 
CommitDate: Thu May 2 01:19:34 2019 +0200

tdf#45904 Move XSearchDescriptor Java tests to C++

Move XSearchDescriptor Java tests to C++ for ScCellSearchObj.

Change-Id: I1ae50bb586fd742b7cc19f71bcae018ca42139e6
Reviewed-on: https://gerrit.libreoffice.org/71643
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/include/test/util/xsearchdescriptor.hxx 
b/include/test/util/xsearchdescriptor.hxx
new file mode 100644
index ..1bad973753db
--- /dev/null
+++ b/include/test/util/xsearchdescriptor.hxx
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+
+#include 
+
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XSearchDescriptor
+{
+public:
+virtual css::uno::Reference init() = 0;
+
+void testGetSetSearchString();
+
+protected:
+~XSearchDescriptor() {}
+};
+
+} // namespace apitest
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
index 8f8a0add5ae6..04f296d22cbf 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
@@ -1,5 +1,3 @@
-"ScCellSearchObj";"com::sun::star::util::XSearchDescriptor";"getSearchString()"
-"ScCellSearchObj";"com::sun::star::util::XSearchDescriptor";"setSearchString()"
 "ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchBackwards"
 
"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchCaseSensitive"
 "ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchWords"
diff --git a/sc/qa/extras/sccellsearchobj.cxx b/sc/qa/extras/sccellsearchobj.cxx
index 21ece504221b..0dfb94a8c245 100644
--- a/sc/qa/extras/sccellsearchobj.cxx
+++ b/sc/qa/extras/sccellsearchobj.cxx
@@ -9,6 +9,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -24,7 +25,9 @@ using namespace css;
 
 namespace sc_apitest
 {
-class ScCellSearchObj : public CalcUnoApiTest, public apitest::XPropertySet
+class ScCellSearchObj : public CalcUnoApiTest,
+public apitest::XPropertySet,
+public apitest::XSearchDescriptor
 {
 public:
 ScCellSearchObj();
@@ -42,6 +45,9 @@ public:
 CPPUNIT_TEST(testPropertyChangeListener);
 CPPUNIT_TEST(testVetoableChangeListener);
 
+// XSearchDescriptor
+CPPUNIT_TEST(testGetSetSearchString);
+
 CPPUNIT_TEST_SUITE_END();
 
 private:
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index 95341a5f91f5..2d8a876d6a95 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -191,6 +191,7 @@ $(eval $(call 
gb_Library_add_exception_objects,subsequenttest,\
test/source/util/xrefreshable \
test/source/util/xreplaceable \
test/source/util/xsearchable \
+   test/source/util/xsearchdescriptor \
test/source/view/xcontrolaccess \
test/source/view/xformlayeraccess \
 ))
diff --git a/test/source/util/xsearchdescriptor.cxx 
b/test/source/util/xsearchdescriptor.cxx
new file mode 100644
index ..b42ed7f90a44
--- /dev/null
+++ b/test/source/util/xsearchdescriptor.cxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+
+#include 
+
+#include 
+
+using namespace css;
+
+namespace apitest
+{
+void XSearchDescriptor::testGetSetSearchString()
+{
+uno::Reference xDS(init(), uno::UNO_QUERY_THROW);
+const OUString aSearchStringOld = xDS->getSearchString();
+CPPUNIT_ASSERT(aSearchStringOld.isEmpty());
+
+xDS->setSearchString("_XSearchDescriptor");
+const O

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - extensions.lst

2019-05-01 Thread Matthias Seidel (via logerrit)
 extensions.lst |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1cf848bb409cd8710d11b85d0943f5e908a0b097
Author: Matthias Seidel 
AuthorDate: Wed May 1 22:24:52 2019 +
Commit: Matthias Seidel 
CommitDate: Wed May 1 22:24:52 2019 +

Updated English dictionary 2019.05.01

diff --git a/extensions.lst b/extensions.lst
index 3b08605143a5..5655e3cea1e5 100644
--- a/extensions.lst
+++ b/extensions.lst
@@ -73,7 +73,7 @@
 
 # English (en_AU, en_CA, en_GB, en_US, en_ZA) dictionary
 [ language=en.* || language=de || language=it ]
-   1e8d1fa844c4771a6ef91afe80d77c81 
https://sourceforge.net/projects/aoo-extensions/files/17102/46/dict-en-20190301.oxt/download
 "dict-en.oxt"
+   2d8cc9e3825d481283bf6f3817ac4b4e 
https://sourceforge.net/projects/aoo-extensions/files/17102/47/dict-en-20190501b.oxt/download
 "dict-en.oxt"
 
 # English (USA, en_US) dictionary
 [ language==nl || language==ru ]
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/test qadevOOo/objdsc sc/qa test/Library_subsequenttest.mk test/source

2019-05-01 Thread Jens Carl (via logerrit)
 include/test/util/searchdescriptor.hxx  |   33 +
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv |   10 -
 sc/qa/extras/sccellsearchobj.cxx|5 
 test/Library_subsequenttest.mk  |1 
 test/source/util/searchdescriptor.cxx   |   65 
++
 5 files changed, 104 insertions(+), 10 deletions(-)

New commits:
commit 6f763a3fcd420ddd147459db0f836ef3e05e710f
Author: Jens Carl 
AuthorDate: Wed May 1 22:48:02 2019 +
Commit: Jens Carl 
CommitDate: Thu May 2 02:52:28 2019 +0200

tdf#45904 Move SearchDescriptor Java tests to C++

Move SearchDescriptor Java tests to C++ for ScCellSearchObj.

Change-Id: I3c9ffbfc80c7fdc39d0e67fe8aae12605a8d04f5
Reviewed-on: https://gerrit.libreoffice.org/71644
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/include/test/util/searchdescriptor.hxx 
b/include/test/util/searchdescriptor.hxx
new file mode 100644
index ..b2f5d5bd62fa
--- /dev/null
+++ b/include/test/util/searchdescriptor.hxx
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+
+#include 
+
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST SearchDescriptor
+{
+public:
+virtual css::uno::Reference init() = 0;
+
+void testSearchDescriptorProperties();
+
+protected:
+~SearchDescriptor() {}
+};
+
+} // namespace apitest
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
index 04f296d22cbf..0ba1e44ec269 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
@@ -1,12 +1,2 @@
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchBackwards"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchCaseSensitive"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchWords"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchRegularExpression"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchStyles"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchSimilarity"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchSimilarityRelax"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchSimilarityRemove"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchSimilarityAdd"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchSimilarityExchange"
 
"ScCellSearchObj";"com::sun::star::util::XReplaceDescriptor";"getReplaceString()"
 
"ScCellSearchObj";"com::sun::star::util::XReplaceDescriptor";"setReplaceString()"
diff --git a/sc/qa/extras/sccellsearchobj.cxx b/sc/qa/extras/sccellsearchobj.cxx
index 0dfb94a8c245..7d376a5b5262 100644
--- a/sc/qa/extras/sccellsearchobj.cxx
+++ b/sc/qa/extras/sccellsearchobj.cxx
@@ -9,6 +9,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -26,6 +27,7 @@ using namespace css;
 namespace sc_apitest
 {
 class ScCellSearchObj : public CalcUnoApiTest,
+public apitest::SearchDescriptor,
 public apitest::XPropertySet,
 public apitest::XSearchDescriptor
 {
@@ -38,6 +40,9 @@ public:
 
 CPPUNIT_TEST_SUITE(ScCellSearchObj);
 
+// SearchDescriptor
+CPPUNIT_TEST(testSearchDescriptorProperties);
+
 // XPropertSet
 CPPUNIT_TEST(testGetPropertySetInfo);
 CPPUNIT_TEST(testGetPropertyValue);
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index 2d8a876d6a95..6bdde7dece5b 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -186,6 +186,7 @@ $(eval $(call 
gb_Library_add_exception_objects,subsequenttest,\
 test/source/text/textprintersettings \
 test/source/text/textsettings \
 test/source/text/textdocumentindex \
+   test/source/util/searchdescriptor \
test/source/util/xindent \
test/source/util/xmergeable \
test/source/util/xrefreshable \
diff --git a/test/source/util/searchdescriptor.cxx 
b/test/source/util/searchdescriptor.cxx
new file mode 100644
index ..a2b72ce588dc
--- /dev/null
+++ b/test/source/util/searchdescriptor.cxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code For

[Libreoffice-commits] core.git: framework/qa include/test qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sc/qa test/Library_subsequenttest.mk test/source

2019-05-01 Thread Jens Carl (via logerrit)
 framework/qa/complex/api_internal/api.lst   |1 
 include/test/util/xreplacedescriptor.hxx|   33 ++
 qadevOOo/Jar_OOoRunner.mk   |1 
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv |2 
 qadevOOo/tests/java/mod/_sc/ScCellSearchObj.java|  122 
--
 sc/qa/extras/sccellsearchobj.cxx|5 
 sc/qa/unoapi/sc_3.sce   |1 
 test/Library_subsequenttest.mk  |1 
 test/source/util/xreplacedescriptor.cxx |   37 +++
 9 files changed, 76 insertions(+), 127 deletions(-)

New commits:
commit f07e91ac739edf846ae9dda9b2305bae6dde489e
Author: Jens Carl 
AuthorDate: Wed May 1 23:08:14 2019 +
Commit: Jens Carl 
CommitDate: Thu May 2 02:53:26 2019 +0200

tdf#45904 Move XReplaceDescriptor Java tests to C++

Move XReplaceDescriptor Java tests to C++ for ScCellSearchObj.

Change-Id: Ica5042ce8b5eac3663a0fb5f66ae0a2830c89d93
Reviewed-on: https://gerrit.libreoffice.org/71645
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index f64d961474b4..f19edba01394 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -73,7 +73,6 @@ job73=sc.ScAccessiblePreviewTable
 job74=sc.ScAccessibleSpreadsheet
 job78=sc.ScAutoFormatFieldObj
 job81=sc.ScCellFieldObj
-job85=sc.ScCellSearchObj
 job88=sc.ScDatabaseRangeObj
 job98=sc.ScHeaderFieldObj
 job99=sc.ScHeaderFieldsObj
diff --git a/include/test/util/xreplacedescriptor.hxx 
b/include/test/util/xreplacedescriptor.hxx
new file mode 100644
index ..878ee7126f52
--- /dev/null
+++ b/include/test/util/xreplacedescriptor.hxx
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+
+#include 
+
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XReplaceDescriptor
+{
+public:
+virtual css::uno::Reference init() = 0;
+
+void testGetSetReplaceString();
+
+protected:
+~XReplaceDescriptor() {}
+};
+
+} // namespace apitest
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 4c12f9aa9994..36a156f0cdcc 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -953,7 +953,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sc/ScCellObj \
 qadevOOo/tests/java/mod/_sc/ScCellRangeObj \
 qadevOOo/tests/java/mod/_sc/ScCellRangesObj \
-qadevOOo/tests/java/mod/_sc/ScCellSearchObj \
 qadevOOo/tests/java/mod/_sc/ScCellTextCursor \
 qadevOOo/tests/java/mod/_sc/ScDatabaseRangeObj \
 qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj \
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
deleted file mode 100644
index 0ba1e44ec269..
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-"ScCellSearchObj";"com::sun::star::util::XReplaceDescriptor";"getReplaceString()"
-"ScCellSearchObj";"com::sun::star::util::XReplaceDescriptor";"setReplaceString()"
diff --git a/qadevOOo/tests/java/mod/_sc/ScCellSearchObj.java 
b/qadevOOo/tests/java/mod/_sc/ScCellSearchObj.java
deleted file mode 100644
index 349eed1da44d..
--- a/qadevOOo/tests/java/mod/_sc/ScCellSearchObj.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package mod._sc;
-
-import java.io.PrintWriter;
-
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOffice

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - comphelper/inc udkapi/com

2019-05-01 Thread Matthias Seidel (via logerrit)
 comphelper/inc/comphelper/namedvaluecollection.hxx |4 ++--
 udkapi/com/sun/star/container/XNamedEx.idl |1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 229623ec69f002e75afc07229dab85ca760c7c92
Author: Matthias Seidel 
AuthorDate: Thu May 2 00:24:03 2019 +
Commit: Matthias Seidel 
CommitDate: Thu May 2 00:24:03 2019 +

Fixed typos

diff --git a/comphelper/inc/comphelper/namedvaluecollection.hxx 
b/comphelper/inc/comphelper/namedvaluecollection.hxx
index d22446b8eaf1..6c1c3a60675d 100644
--- a/comphelper/inc/comphelper/namedvaluecollection.hxx
+++ b/comphelper/inc/comphelper/namedvaluecollection.hxx
@@ -158,7 +158,7 @@ namespace comphelper
 
 @return
  if there is a value with the given name, which could 
successfully
-be extraced. In this case, _out_rValue will contain 
the requested
+be extracted. In this case, _out_rValue will 
contain the requested
 value.
 , if there is no value with the given name.
 @throws IllegalArgumentException
@@ -178,7 +178,7 @@ namespace comphelper
 }
 
 /** retrieves a value with a given name, or defaults it to a given 
value, if its not present
-in the colllection
+in the collection
 */
 template < typename VALUE_TYPE >
 VALUE_TYPE  getOrDefault( const sal_Char* _pAsciiValueName, const 
VALUE_TYPE& _rDefault ) const
commit 05da77c638dd0f190c362a7a00fd0192e79fe6d5
Author: Matthias Seidel 
AuthorDate: Thu May 2 00:06:33 2019 +
Commit: Matthias Seidel 
CommitDate: Thu May 2 00:06:33 2019 +

Added missing #endif

diff --git a/udkapi/com/sun/star/container/XNamedEx.idl 
b/udkapi/com/sun/star/container/XNamedEx.idl
index b59c50428118..f794cafc47cb 100644
--- a/udkapi/com/sun/star/container/XNamedEx.idl
+++ b/udkapi/com/sun/star/container/XNamedEx.idl
@@ -29,6 +29,7 @@
 
 #ifndef __com_sun_star_container_XNamed_idl__
 #include 
+#endif
 
 //=
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-05-01 Thread László Németh (via logerrit)
 sc/qa/unit/data/xlsx/tdf112567.xlsx   |binary
 sc/qa/unit/subsequent_export-test.cxx |   30 ++
 sc/source/filter/excel/xename.cxx |8 +++-
 3 files changed, 37 insertions(+), 1 deletion(-)

New commits:
commit 19976f079800ec4c1d0d5d7e226986cb41f834c2
Author: László Németh 
AuthorDate: Mon Apr 29 17:31:16 2019 +0200
Commit: László Németh 
CommitDate: Thu May 2 08:27:33 2019 +0200

tdf#112567 XLSX export: fix broken built-in names

Localized range separators resulted broken XLSX export
with duplicated built-in names. For example, XLSX export
of a Format->Print range using Hungarian locale in LibO
raised an error message in MSO, because the export
contained the same range also with a bad semicolon:

Sheet1!$A:$A;Sheet1!$1:$1
Sheet1!$A:$A,Sheet1!$1:$1

Change-Id: Iee6ff7c5f5952fc1e736cebfc290c64a851786ab
Reviewed-on: https://gerrit.libreoffice.org/71538
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/sc/qa/unit/data/xlsx/tdf112567.xlsx 
b/sc/qa/unit/data/xlsx/tdf112567.xlsx
new file mode 100644
index ..287c0cc1aa0e
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf112567.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 23727d5b17c7..2db10074d785 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -60,6 +60,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 
@@ -214,6 +216,7 @@ public:
 void testTdf115192XLSX();
 void testTdf91634XLSX();
 void testTdf115159();
+void testTdf112567();
 void testTdf123645XLSX();
 
 void testXltxExport();
@@ -336,6 +339,7 @@ public:
 CPPUNIT_TEST(testTdf115192XLSX);
 CPPUNIT_TEST(testTdf91634XLSX);
 CPPUNIT_TEST(testTdf115159);
+CPPUNIT_TEST(testTdf112567);
 CPPUNIT_TEST(testTdf123645XLSX);
 
 CPPUNIT_TEST(testXltxExport);
@@ -4199,6 +4203,32 @@ void ScExportTest::testTdf115159()
 xDocSh->DoClose();
 }
 
+void ScExportTest::testTdf112567()
+{
+// Set the system locale to Hungarian (a language with different range 
separator)
+SvtSysLocaleOptions aOptions;
+aOptions.SetLocaleConfigString("hu-HU");
+aOptions.Commit();
+comphelper::ScopeGuard g([&aOptions] {
+aOptions.SetLocaleConfigString(OUString());
+aOptions.Commit();
+});
+
+ScDocShellRef xShell = loadDoc("tdf112567.", FORMAT_XLSX);
+CPPUNIT_ASSERT(xShell.is());
+ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLSX);
+CPPUNIT_ASSERT(xDocSh.is());
+xShell->DoClose();
+
+xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, 
"xl/workbook.xml", FORMAT_XLSX);
+CPPUNIT_ASSERT(pDoc);
+
+//assert the existing OOXML built-in name is not duplicated
+assertXPath(pDoc, "/x:workbook/x:definedNames/x:definedName", 1);
+
+xDocSh->DoClose();
+}
+
 void ScExportTest::testTdf123645XLSX()
 {
 ScDocShellRef xDocSh = loadDoc("chart_hyperlink.", FORMAT_XLSX);
diff --git a/sc/source/filter/excel/xename.cxx 
b/sc/source/filter/excel/xename.cxx
index ee3bfa2c10f3..ee418fb80d5c 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -537,8 +537,14 @@ sal_uInt16 XclExpNameManagerImpl::FindBuiltInNameIdx(
 for( size_t nPos = 0; nPos < mnFirstUserIdx; ++nPos )
 {
 XclExpNameRef xName = maNameList.GetRecord( nPos );
-if( xName->GetBuiltInName() == cBuiltIn && xName->GetSymbol() == 
sSymbol )
+if( xName->GetBuiltInName() == cBuiltIn && 
xName->GetSymbol().replace(';', ',') == sSymbol.replace(';', ',') )
 {
+// tdf#112567 restore the original built-in names with 
non-localized separators
+// TODO: support more localizations, if needed
+if ( xName->GetSymbol() != sSymbol )
+{
+xName->SetSymbol(xName->GetSymbol().replace(';', ','));
+}
 return static_cast< sal_uInt16 >( nPos + 1 );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

contributions license

2019-05-01 Thread Adrien Ollier
   All of my past & future contributions to LibreOffice may be
   licensed under the MPLv2/LGPLv3+ dual license.

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

[Libreoffice-commits] core.git: desktop/source include/sfx2 sfx2/Library_sfx.mk sfx2/source solenv/clang-format

2019-05-01 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/app.cxx|4 -
 include/sfx2/flatpak.hxx  |   34 ++
 include/sfx2/sfxhelp.hxx  |2 
 sfx2/Library_sfx.mk   |1 
 sfx2/source/appl/flatpak.cxx  |   99 ++
 sfx2/source/appl/sfxhelp.cxx  |   74 +--
 sfx2/source/view/viewsh.cxx   |   12 -
 solenv/clang-format/blacklist |2 
 8 files changed, 151 insertions(+), 77 deletions(-)

New commits:
commit c61e7b9940cb30800d6f1000727f9cfd5de9fa5e
Author: Stephan Bergmann 
AuthorDate: Tue Apr 30 10:38:38 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Thu May 2 08:40:10 2019 +0200

Support "Preview in Web Browser" in Flatpak mode

...by storing the temporary HTML document in a location that can be 
accessed by
the browser running outside the Flatpak sandbox.  This reuses and extends 
the
mechanism already in place for the new HTML-based help in Flatpak mode (see
72b936d70b7eaa6d9f5f911b27e3c955382de967 "Enable --help=html for flatpak").

This fixes 

"“Preview in Web Browser” does not work in Flatpak version".

Change-Id: I5f73fd89139ffe6b8ab0dc501154b4f054a0ae5c
Reviewed-on: https://gerrit.libreoffice.org/71570
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index e584858b3191..c516d19a6862 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -110,7 +110,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -1696,7 +1696,7 @@ int Desktop::doShutdown()
 
 // remove temp directory
 RemoveTemporaryDirectory();
-SfxHelp::removeFlatpakHelpTemporaryDirectory();
+flatpak::removeTemporaryHtmlDirectory();
 
 // flush evtl. configuration changes so that all config files in user
 // dir are written
diff --git a/include/sfx2/flatpak.hxx b/include/sfx2/flatpak.hxx
new file mode 100644
index ..cb5d758b51fe
--- /dev/null
+++ b/include/sfx2/flatpak.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_INCLUDE_SFX2_FLATPAK_HXX
+#define INCLUDED_INCLUDE_SFX2_FLATPAK_HXX
+
+#include 
+
+#include 
+#include 
+
+// Functionality related to the Flatpak version of LibreOffice.
+
+namespace flatpak {
+
+bool isFlatpak();
+
+// Must only be called with SolarMutex locked:
+bool createTemporaryHtmlDirectory(OUString ** url);
+
+// Must only be called with SolarMutex locked:
+SFX2_DLLPUBLIC void removeTemporaryHtmlDirectory();
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx
index 5dd0a81fc1e9..e76872f3f201 100644
--- a/include/sfx2/sfxhelp.hxx
+++ b/include/sfx2/sfxhelp.hxx
@@ -50,8 +50,6 @@ public:
 static OUString GetCurrentModuleIdentifier();
 // Check for built-in help
 static bool IsHelpInstalled();
-
-static void removeFlatpakHelpTemporaryDirectory();
 };
 
 #endif // INCLUDED_SFX2_SFXHELP_HXX
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 6b10dfa021ee..d4fb4cf6b972 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -94,6 +94,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
 sfx2/source/appl/childwin \
 sfx2/source/appl/childwinimpl \
 sfx2/source/appl/fileobj \
+sfx2/source/appl/flatpak \
 sfx2/source/appl/fwkhelper \
 sfx2/source/appl/helpdispatch \
 sfx2/source/appl/helpinterceptor \
diff --git a/sfx2/source/appl/flatpak.cxx b/sfx2/source/appl/flatpak.cxx
new file mode 100644
index ..14411dafc5d0
--- /dev/null
+++ b/sfx2/source/appl/flatpak.cxx
@@ -0,0 +1,99 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+bool flatpak::isFlatpak() {
+static auto const flatpak = [] { return std::getenv("LIBO_FLATPAK") != 
nullptr; }();
+return flatpak;
+}
+
+namespace {
+
+// Must only be accessed with SolarMutex locked:
+struct {
+bool created = false;
+OUString url;
+} temporaryHtmlDirectoryStatus;
+
+}

[Libreoffice-commits] core.git: solenv/clang-format

2019-05-01 Thread Stephan Bergmann (via logerrit)
 solenv/clang-format/blacklist |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 0c434b06a3792a6429fbe718a0231c48597c1ff5
Author: Stephan Bergmann 
AuthorDate: Tue Apr 30 10:45:14 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Thu May 2 08:42:09 2019 +0200

Sort solenv/clang-format/blacklist

(lexicographically, by Unicode code point values; to make it easier to add
further entries)

Change-Id: Icd5a58b6b65004ceb90f470ae58512d9f8ae57e7
Reviewed-on: https://gerrit.libreoffice.org/71571
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 900fd3eaea92..e270e474ea51 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -4066,8 +4066,8 @@ editeng/source/items/flditem.cxx
 editeng/source/items/frmitems.cxx
 editeng/source/items/itemtype.cxx
 editeng/source/items/justifyitem.cxx
-editeng/source/items/numitem.cxx
 editeng/source/items/legacyitem.cxx
+editeng/source/items/numitem.cxx
 editeng/source/items/optitems.cxx
 editeng/source/items/paperinf.cxx
 editeng/source/items/paraitem.cxx
@@ -7042,7 +7042,6 @@ include/svx/AccessibleShapeTreeInfo.hxx
 include/svx/AccessibleTextHelper.hxx
 include/svx/ActionDescriptionProvider.hxx
 include/svx/AffineMatrixItem.hxx
-include/svx/autoformathelper.hxx
 include/svx/ChildrenManager.hxx
 include/svx/ClassificationDialog.hxx
 include/svx/ClassificationEditView.hxx
@@ -7079,6 +7078,7 @@ include/svx/XPropertyEntry.hxx
 include/svx/XPropertyTable.hxx
 include/svx/algitem.hxx
 include/svx/anchorid.hxx
+include/svx/autoformathelper.hxx
 include/svx/bmpmask.hxx
 include/svx/camera3d.hxx
 include/svx/charmap.hxx
@@ -7782,10 +7782,10 @@ include/vbahelper/vbashapes.hxx
 include/vbahelper/vbatextframe.hxx
 include/vbahelper/vbawindowbase.hxx
 include/vcl/AccessibleBrowseBoxObjType.hxx
-include/vcl/BitmapTools.hxx
 include/vcl/BitmapBuffer.hxx
 include/vcl/BitmapColor.hxx
 include/vcl/BitmapPalette.hxx
+include/vcl/BitmapTools.hxx
 include/vcl/ColorMask.hxx
 include/vcl/EnumContext.hxx
 include/vcl/FilterConfigItem.hxx
@@ -13623,8 +13623,8 @@ svl/source/items/itemiter.cxx
 svl/source/items/itempool.cxx
 svl/source/items/itemprop.cxx
 svl/source/items/itemset.cxx
-svl/source/items/legacyitem.cxx
 svl/source/items/lckbitem.cxx
+svl/source/items/legacyitem.cxx
 svl/source/items/macitem.cxx
 svl/source/items/poolcach.cxx
 svl/source/items/poolio.cxx
@@ -14661,7 +14661,6 @@ sw/inc/IDocumentUndoRedo.hxx
 sw/inc/IGrammarContact.hxx
 sw/inc/IMark.hxx
 sw/inc/IShellCursorSupplier.hxx
-sw/inc/legacyitem.hxx
 sw/inc/PageColumnPopup.hxx
 sw/inc/PageMarginPopup.hxx
 sw/inc/PageOrientationPopup.hxx
@@ -14789,6 +14788,7 @@ sw/inc/init.hxx
 sw/inc/iodetect.hxx
 sw/inc/istyleaccess.hxx
 sw/inc/itabenum.hxx
+sw/inc/legacyitem.hxx
 sw/inc/lineinfo.hxx
 sw/inc/linkenum.hxx
 sw/inc/list.hxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits