[Libreoffice-commits] online.git: wsd/LOOLWSD.hpp

2020-09-08 Thread Aron Budea (via logerrit)
 wsd/LOOLWSD.hpp |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit d876290762ee7af989b08c60a5ed9aa3c5a68f96
Author: Aron Budea 
AuthorDate: Tue Sep 8 14:06:47 2020 +0200
Commit: Michael Meeks 
CommitDate: Wed Sep 9 08:55:55 2020 +0200

wsd: Don't fail if config item is missing in loolwsd.xml

After upgrading from old versions that didn't include
config.storage.ssl in loolwsd.xml, an exception was thrown
and not caught, and loolwsd failed to start with the following
message: "Not found: storage.ssl.cert_file_path".

Change-Id: Id0ca76632c513c6f5c80797a2c7d20f0173e4b56
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102250
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index 533c4dfd0..7f1e05a27 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -351,7 +351,15 @@ public:
 static
 std::string getPathFromConfigWithFallback(const std::string& name, const 
std::string& fallbackName)
 {
-std::string value = LOOLWSD::getPathFromConfig(name);
+std::string value;
+// the expected path might not exist, in which case Poco throws an 
exception
+try
+{
+value = LOOLWSD::getPathFromConfig(name);
+}
+catch (...)
+{
+}
 if (value.empty())
 return LOOLWSD::getPathFromConfig(fallbackName);
 return value;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Serge Krot (via logerrit)
 sc/inc/dbdata.hxx  |4 
 sc/inc/document.hxx|4 
 sc/qa/unit/data/ods/tdf95640.ods   |binary
 sc/qa/unit/data/ods/tdf95640_standard_list.ods |binary
 sc/qa/unit/data/xlsx/tdf95640.xlsx |binary
 sc/qa/unit/subsequent_export-test.cxx  |   63 +
 sc/source/filter/excel/excrecds.cxx|   64 +
 sc/source/filter/inc/autofilterbuffer.hxx  |   30 ++
 sc/source/filter/inc/autofiltercontext.hxx |   39 
 sc/source/filter/inc/excrecds.hxx  |3 
 sc/source/filter/oox/autofilterbuffer.cxx  |  116 +++--
 sc/source/filter/oox/autofiltercontext.cxx |   68 ++
 sc/source/filter/oox/tablebuffer.cxx   |2 
 13 files changed, 375 insertions(+), 18 deletions(-)

New commits:
commit e6bdfaaf572b592f7e8b510cb38f82a4aca41593
Author: Serge Krot 
AuthorDate: Mon Jun 29 13:23:34 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Sep 9 08:49:19 2020 +0200

tdf#95640 XLSX: import/export of custom sort lists

Conflicts:
sc/source/filter/excel/excrecds.cxx
sc/source/filter/oox/autofilterbuffer.cxx
sc/source/filter/oox/tablebuffer.cxx

Change-Id: If5ffef39770bf7abd6e75e8de998d4a2b4749a0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97399
Tested-by: Jenkins
Tested-by: Serge Krot 
Reviewed-by: Serge Krot 
Reviewed-by: Thorsten Behrens 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102252
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index 488063cd0a2b..0e31a0f02152 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -172,8 +172,8 @@ public:
 OUString GetSourceString() const;
 OUString GetOperations() const;
 
-voidGetSortParam(ScSortParam& rSortParam) const;
-voidSetSortParam(const ScSortParam& rSortParam);
+SC_DLLPUBLIC void GetSortParam(ScSortParam& rSortParam) const;
+SC_DLLPUBLIC void SetSortParam(const ScSortParam& rSortParam);
 
 /** Remember some more settings of ScSortParam, only to be called at
 anonymous DB ranges as it at least overwrites bHasHeader. */
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 15a7145b7abc..0c5ccc248faf 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -812,8 +812,8 @@ public:
   bool bRemoveAutoFilter = 
false );
 const ScDBData*  GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB 
nTab, ScDBDataPortion ePortion) const;
 ScDBData*GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB 
nTab, ScDBDataPortion ePortion);
-const ScDBData*  GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow2) const;
-ScDBData*GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow2);
+SC_DLLPUBLIC const ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow2) const;
+SC_DLLPUBLIC ScDBData*   GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow2);
 void RefreshDirtyTableColumnNames();
 SC_DLLPUBLIC sc::ExternalDataMapper& GetExternalDataMapper();
 
diff --git a/sc/qa/unit/data/ods/tdf95640.ods b/sc/qa/unit/data/ods/tdf95640.ods
new file mode 100644
index ..5d435c61cc85
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf95640.ods differ
diff --git a/sc/qa/unit/data/ods/tdf95640_standard_list.ods 
b/sc/qa/unit/data/ods/tdf95640_standard_list.ods
new file mode 100644
index ..37bea8a0c93e
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf95640_standard_list.ods 
differ
diff --git a/sc/qa/unit/data/xlsx/tdf95640.xlsx 
b/sc/qa/unit/data/xlsx/tdf95640.xlsx
new file mode 100644
index ..78c2d32c2cf6
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf95640.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index d74d4d63d0ec..2f0a7c7fdd0e 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -205,6 +205,12 @@ public:
 void testTdf129985();
 void testTdf73063();
 
+xmlDocUniquePtr testTdf95640(const OUString& rFileName, sal_Int32 
nSourceFormat,
+ sal_Int32 nDestFormat);
+void testTdf95640_ods_to_xlsx();
+void testTdf95640_ods_to_xlsx_with_standard_list();
+void testTdf95640_xlsx_to_xlsx();
+
 void testRefStringXLSX();
 void testRefStringConfigXLSX();
 void testRefStringUnspecified();
@@ -352,6 +358,9 @@ public:
 CPPUNIT_TEST(testTdf55417);
 CPPUNIT_TEST(testTdf129985);
 CPPUNIT_TEST(testTdf73063);
+CPPUNIT_TEST(testTdf95640_ods_to_xlsx);
+CPPUNIT_TEST(testTdf95640_ods_to_xlsx_with_standard_list);
+CPPUNIT_TEST(testTdf95640_xlsx_to_xlsx

[Libreoffice-commits] core.git: .git-hooks/pre-commit

2020-09-08 Thread Xisco Fauli (via logerrit)
 .git-hooks/pre-commit |8 
 1 file changed, 8 insertions(+)

New commits:
commit 94e6eafefd5ca9e19e6bd5d6aa70c1f7ceaf6132
Author: Xisco Fauli 
AuthorDate: Tue Sep 8 16:17:49 2020 +0200
Commit: Xisco Fauli 
CommitDate: Wed Sep 9 08:38:50 2020 +0200

git pre-commit hook: check OOXMLIMPORT and OOXMLEXPORT...

... are used in the right place

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

diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit
index cddc8d330b77..00a5e7cd7e67 100755
--- a/.git-hooks/pre-commit
+++ b/.git-hooks/pre-commit
@@ -85,6 +85,14 @@ sub check_whitespaces($)
 {
 bad_line("temporary debug in commit", $_, $src_limited);
 }
+if ((/OOXMLIMPORT/) and ($filename =~ /ooxmlexport/))
+{
+bad_line("OOXMLIMPORT definition used in a ooxmlexport file", 
$_, "cxx");
+}
+if ((/OOXMLEXPORT/) and ($filename =~ /ooxmlimport/))
+{
+bad_line("OOXMLEXPORT definition used in a ooxmlimport file", 
$_, "cxx");
+}
 if (/True<\/property>/)
 {
 bad_line("use font attributes instead of use-markup", $_, 
"ui");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Muhammet Kara (via logerrit)
 xmloff/source/draw/sdxmlexp.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 1b135d95623eb455ce4e633b032ba2226a8b8c94
Author: Muhammet Kara 
AuthorDate: Tue Sep 8 19:04:16 2020 +0300
Commit: Muhammet Kara 
CommitDate: Wed Sep 9 08:36:57 2020 +0200

Remove unnecessary search before insert

Change-Id: Ie6ba54a61b59879bd047343cc9857d9937cc76c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102269
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index d5b8463b0d6e..dbb761e9ddec 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2400,13 +2400,11 @@ void SdXMLExport::addDataStyle(const sal_Int32 
nNumberFormat, bool bTimeFormat )
 
 if( bTimeFormat )
 {
-if( maUsedTimeStyles.count( nFormat ) == 0 )
-maUsedTimeStyles.insert( nFormat );
+maUsedTimeStyles.insert( nFormat );
 }
 else
 {
-if( maUsedDateStyles.count( nFormat ) == 0 )
-maUsedDateStyles.insert( nFormat );
+maUsedDateStyles.insert( nFormat );
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx |   35 ++
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx  |   34 -
 2 files changed, 35 insertions(+), 34 deletions(-)

New commits:
commit 41690703be4c15a95543a9d211ca272f7690e871
Author: Xisco Fauli 
AuthorDate: Tue Sep 8 17:19:10 2020 +0200
Commit: Xisco Fauli 
CommitDate: Wed Sep 9 08:36:39 2020 +0200

sw_ooxmlimport: move export test to sw_ooxmlexport8

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

diff --git a/sw/qa/extras/ooxmlimport/data/fdo76803.docx 
b/sw/qa/extras/ooxmlexport/data/fdo76803.docx
similarity index 100%
rename from sw/qa/extras/ooxmlimport/data/fdo76803.docx
rename to sw/qa/extras/ooxmlexport/data/fdo76803.docx
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 74375341c60d..f95920b7a9dc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -53,6 +54,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -506,6 +508,39 @@ DECLARE_OOXMLEXPORT_TEST(testTDF91122, "tdf91122.docx")
 }
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo76803, "fdo76803.docx")
+{
+// The ContourPolyPolygon was wrong
+uno::Reference xPropertySet(getShape(1), 
uno::UNO_QUERY);
+
+drawing::PointSequenceSequence rContour = 
getProperty(xPropertySet, "ContourPolyPolygon");
+basegfx::B2DPolyPolygon 
aPolyPolygon(basegfx::utils::UnoPointSequenceSequenceToB2DPolyPolygon(rContour));
+
+// We've got exactly one polygon inside
+CPPUNIT_ASSERT_EQUAL(sal_uInt32(1), aPolyPolygon.count());
+
+// Now check it deeply
+basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(0));
+
+CPPUNIT_ASSERT_EQUAL(sal_uInt32(4), aPolygon.count());
+
+CPPUNIT_ASSERT_EQUAL(double(-149), aPolygon.getB2DPoint(0).getX());
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: -35
+// - Actual  : -67
+// i.e. the cropping did not influence the wrap polygon during export.
+CPPUNIT_ASSERT_EQUAL(double(-35), aPolygon.getB2DPoint(0).getY());
+
+CPPUNIT_ASSERT_EQUAL(double(-149), aPolygon.getB2DPoint(1).getX());
+CPPUNIT_ASSERT_EQUAL(double(3511), aPolygon.getB2DPoint(1).getY());
+
+CPPUNIT_ASSERT_EQUAL(double(16889), aPolygon.getB2DPoint(2).getX());
+CPPUNIT_ASSERT_EQUAL(double(3511), aPolygon.getB2DPoint(2).getY());
+
+CPPUNIT_ASSERT_EQUAL(double(16889), aPolygon.getB2DPoint(3).getX());
+CPPUNIT_ASSERT_EQUAL(double(-35), aPolygon.getB2DPoint(3).getY());
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTDF91260, "tdf91260.docx")
 {
 uno::Reference xFrame(getShape(1), uno::UNO_QUERY);
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 7079fd8bfd19..97011d4bf997 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -55,7 +55,6 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -1158,39 +1157,6 @@ DECLARE_OOXMLIMPORT_TEST(testFdo75722dml, 
"fdo75722-dml.docx")
 CPPUNIT_ASSERT_EQUAL(sal_Int64(3128), nRot);
 }
 
-DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo76803, "fdo76803.docx")
-{
-// The ContourPolyPolygon was wrong
-uno::Reference xPropertySet(getShape(1), 
uno::UNO_QUERY);
-
-drawing::PointSequenceSequence rContour = 
getProperty(xPropertySet, "ContourPolyPolygon");
-basegfx::B2DPolyPolygon 
aPolyPolygon(basegfx::utils::UnoPointSequenceSequenceToB2DPolyPolygon(rContour));
-
-// We've got exactly one polygon inside
-CPPUNIT_ASSERT_EQUAL(sal_uInt32(1), aPolyPolygon.count());
-
-// Now check it deeply
-basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(0));
-
-CPPUNIT_ASSERT_EQUAL(sal_uInt32(4), aPolygon.count());
-
-CPPUNIT_ASSERT_EQUAL(double(-149), aPolygon.getB2DPoint(0).getX());
-// Without the accompanying fix in place, this test would have failed with:
-// - Expected: -35
-// - Actual  : -67
-// i.e. the cropping did not influence the wrap polygon during export.
-CPPUNIT_ASSERT_EQUAL(double(-35), aPolygon.getB2DPoint(0).getY());
-
-CPPUNIT_ASSERT_EQUAL(double(-149), aPolygon.getB2DPoint(1).getX());
-CPPUNIT_ASSERT_EQUAL(double(3511), aPolygon.getB2DPoint(1).getY());
-
-CPPUNIT_ASSERT_EQUAL(double(16889), aPolygon.getB2DPoint(2).getX());
-CPPUNIT_ASSERT_EQUAL(double(3511), aPolygon.getB2DPoint(2).getY());
-
-CPPUNIT_ASSERT_EQUAL(double(16889), aPolygon.getB2DPoint(3).getX());
-CPPUNIT_ASSERT_EQUAL(double(-35), aPolygon.getB2DPoint(3).getY());
-}
-
 DECLARE_OOXMLIMPORT_TEST(testUnbalancedColumnsCompat, 
"unbalanced-columns-compat.docx")
 {
 uno::Reference 
xTex

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

2020-09-08 Thread Thorsten Wagner (via logerrit)
 vcl/source/control/button.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 6be0a806dcce864fb4d604be68e8b3711fc604d6
Author: Thorsten Wagner 
AuthorDate: Tue Jul 28 00:36:07 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Sep 9 08:26:52 2020 +0200

tdf#134708 Text coloring of buttons within forms amended

Change-Id: I55f91ff626a55ab588ac49a085070c0d9f919e68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99564
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 84b2849512bdb19597739d9515dd55e2d3ba9504)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101857
Reviewed-by: Thorsten Wagner 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 7e0a1bfa81fa..048ff2181c25 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -752,6 +752,13 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice 
*pDev, DrawFlags nDrawFl
 if (nDrawFlags & DrawFlags::Mono)
 aColor = COL_BLACK;
 
+// Custom foreground color is reasonable on stock controls only. Stock 
controls are used if a custom background has been set
+// (and thus no native controls are able to be used) or no native controls 
are available.
+
+else if (IsControlForeground()
+ && (IsControlBackground() || 
!IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Entire)))
+aColor = GetControlForeground();
+
 // Button types with possibly different text coloring are flat buttons and 
regular buttons. Regular buttons may be action
 // buttons and may have an additional default status. Moreover all buttons 
may have an additional pressed and rollover
 // (highlight) status. Pressed buttons are always in rollover status.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: chart2/source compilerplugins/clang cui/source dbaccess/source desktop/source include/svx lotuswordpro/inc sc/inc sc/source sdext/source sd/source solenv/CompilerTest_c

2020-09-08 Thread Noel Grandin (via logerrit)
 chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx |   38 -
 chart2/source/view/main/ChartView.cxx |2 
 compilerplugins/clang/test/unusedvarsglobal.cxx   |   27 
 compilerplugins/clang/unusedvarsglobal.cxx|   81 +-
 compilerplugins/clang/unusedvarsglobal.untouched.results  |  242 
 compilerplugins/clang/unusedvarsglobal.writeonly.results  |  392 ++
 cui/source/inc/cuitabarea.hxx |1 
 cui/source/tabpages/tpbitmap.cxx  |7 
 dbaccess/source/ui/inc/TokenWriter.hxx|4 
 dbaccess/source/ui/misc/TokenWriter.cxx   |8 
 desktop/source/app/langselect.cxx |3 
 include/svx/def3d.hxx |1 
 include/svx/xoutbmp.hxx   |2 
 lotuswordpro/inc/lwptools.hxx |1 
 sc/inc/global.hxx |1 
 sc/source/core/data/global.cxx|3 
 sc/source/core/opencl/opinlinefun_finacial.cxx|   38 -
 sc/source/filter/excel/impop.cxx  |2 
 sc/source/filter/inc/imp_op.hxx   |2 
 sc/source/filter/inc/xlstream.hxx |1 
 sc/source/ui/inc/content.hxx  |2 
 sc/source/ui/inc/viewfunc.hxx |1 
 sc/source/ui/navipi/content.cxx   |5 
 sc/source/ui/view/gridwin.cxx |6 
 sc/source/ui/view/viewfun4.cxx|2 
 sd/source/ui/framework/tools/FrameworkHelper.cxx  |   12 
 sd/source/ui/inc/framework/FrameworkHelper.hxx|   12 
 sd/source/ui/inc/unokywds.hxx |   47 -
 sdext/source/presenter/PresenterHelper.cxx|3 
 sdext/source/presenter/PresenterHelper.hxx|3 
 sdext/source/presenter/PresenterPaneFactory.cxx   |5 
 sdext/source/presenter/PresenterPaneFactory.hxx   |2 
 solenv/CompilerTest_compilerplugins_clang.mk  |1 
 svtools/source/config/printoptions.cxx|8 
 svx/source/xoutdev/_xoutbmp.cxx   |5 
 sw/source/filter/html/css1kywd.cxx|   30 -
 sw/source/filter/html/css1kywd.hxx|   30 -
 sw/source/filter/ww8/ww8scan.hxx  |1 
 vcl/inc/unx/gtk/gtkgdi.hxx|1 
 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx |2 
 xmloff/source/chart/XMLSymbolImageContext.cxx |9 
 xmloff/source/draw/sdpropls.hxx   |1 
 xmloff/source/style/DashStyle.cxx |   13 
 xmloff/source/style/XMLBackgroundImageContext.cxx |2 
 xmloff/source/style/xmlstyle.cxx  |   20 
 xmloff/source/style/xmltabi.cxx   |2 
 xmloff/source/text/txtdropi.cxx   |2 
 xmloff/source/text/txtimp.cxx |   14 
 48 files changed, 461 insertions(+), 636 deletions(-)

New commits:
commit f2517e82904b92989ed7e38a070c18234f460b33
Author: Noel Grandin 
AuthorDate: Tue Sep 8 22:11:11 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 9 08:25:30 2020 +0200

improve loplugin:unusedvarsglobal

to find any global variable, was checking the wrong property of
VarDecl

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

diff --git a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx 
b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
index 5ecd5f30cc19..ac08f2c99cf6 100644
--- a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
+++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
@@ -146,28 +146,6 @@ const sal_uInt16 nRowWhichPairs[] =
 0
 };
 
-const sal_uInt16 nAreaWhichPairs[] =
-{
-XATTR_LINE_FIRST, XATTR_LINE_LAST,  //  1000 -  1016  
svx/xdef.hxx
-XATTR_FILL_FIRST, XATTR_FILL_LAST,  //  1000 -  1016  
svx/xdef.hxx
-SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,  //  1067 -  1078  
svx/svddef.hxx
-0
-};
-
-const sal_uInt16 nTextWhichPairs[] =
-{
-CHARACTER_WHICHPAIRS,
-SCHATTR_TEXT_START, SCHATTR_TEXT_END,
-0
-};
-
-const sal_uInt16 nTextOrientWhichPairs[] =
-{
-CHARACTER_WHICHPAIRS,
-SCHATTR_TEXT_START, SCHATTR_TEXT_END,
-0
-};
-
 const sal_uInt16 nStatWhichPairs[]=
 {
 SCHATTR_STAT_START, SCHATTR_STAT_END,   //45 -52  
sch/schattr.hxx
@@ -196,13 +174,6 @@ const sal_uInt16 nLinePropertyWhichPairs[] =
 0
 };
 
-const sal_uInt16 nFillPropertyWhichPairs[] =
-{
-

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

2020-09-08 Thread Noel Grandin (via logerrit)
 sw/inc/swcrsr.hxx|4 +++-
 sw/source/core/crsr/findattr.cxx |9 ++---
 sw/source/core/crsr/findcoll.cxx |5 +++--
 sw/source/core/crsr/findtxt.cxx  |   24 +++-
 sw/source/core/crsr/swcrsr.cxx   |7 +--
 sw/source/core/inc/pamtyp.hxx|4 +++-
 6 files changed, 35 insertions(+), 18 deletions(-)

New commits:
commit 1159f58831c69680e9f10767d5358e13b66579dd
Author: Noel Grandin 
AuthorDate: Tue Sep 8 11:51:59 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 9 08:25:01 2020 +0200

tdf#119286 speed up find/replace

SvxSearchItem is very expensive to construct, so move it outside the
primary loop.
This takes the time from 6s to 3s for me.

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

diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index 923928887023..a6e634ac3b55 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -25,6 +25,7 @@
 
 class SfxItemSet;
 struct SwCursor_SavePos;
+class SvxSearchItem;
 namespace i18nutil {
 struct SearchOptions2;
 }
@@ -37,7 +38,8 @@ const int FIND_NO_RING  = 2;
 
 struct SwFindParas
 {
-virtual int DoFind(SwPaM &, SwMoveFnCollection const &, const SwPaM&, 
bool) = 0;
+// @param xSearchItem allocate in parent so we can do so outside the 
calling loop
+virtual int DoFind(SwPaM &, SwMoveFnCollection const &, const SwPaM&, 
bool, std::unique_ptr& xSearchItem) = 0;
 virtual bool IsReplaceMode() const = 0;
 
 protected:
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 40d536de3083..8d1cafd41c64 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1253,14 +1254,16 @@ struct SwFindParaAttr : public SwFindParas
 
 virtual ~SwFindParaAttr()   {}
 
-virtual int DoFind(SwPaM &, SwMoveFnCollection const &, const SwPaM &, 
bool bInReadOnly) override;
+virtual int DoFind(SwPaM &, SwMoveFnCollection const &, const SwPaM &, 
bool bInReadOnly,
+   std::unique_ptr& xSearchItem) override;
 virtual bool IsReplaceMode() const override;
 };
 
 }
 
 int SwFindParaAttr::DoFind(SwPaM & rCursor, SwMoveFnCollection const & fnMove,
-const SwPaM & rRegion, bool bInReadOnly)
+const SwPaM & rRegion, bool bInReadOnly,
+std::unique_ptr& xSearchItem)
 {
 // replace string (only if text given and search is not parameterized)?
 bool bReplaceText = pSearchOpt && ( !pSearchOpt->replaceString.isEmpty() ||
@@ -1310,7 +1313,7 @@ int SwFindParaAttr::DoFind(SwPaM & rCursor, 
SwMoveFnCollection const & fnMove,
 // TODO: searching for attributes in Outliner text?!
 
 // continue search in correct section (pTextRegion)
-if (sw::FindTextImpl(aSrchPam, *pSearchOpt, 
false/*bSearchInNotes*/, *pSText, fnMove, *pTextRegion, bInReadOnly, m_pLayout) 
&&
+if (sw::FindTextImpl(aSrchPam, *pSearchOpt, 
false/*bSearchInNotes*/, *pSText, fnMove, *pTextRegion, bInReadOnly, m_pLayout, 
xSearchItem) &&
 *aSrchPam.GetMark() != *aSrchPam.GetPoint() )
 break; // found
 else if( !pSet->Count() )
diff --git a/sw/source/core/crsr/findcoll.cxx b/sw/source/core/crsr/findcoll.cxx
index f80fff2c10ee..8385e0a4cf24 100644
--- a/sw/source/core/crsr/findcoll.cxx
+++ b/sw/source/core/crsr/findcoll.cxx
@@ -41,14 +41,15 @@ struct SwFindParaFormatColl : public SwFindParas
 , m_pLayout(pLayout)
 {}
 virtual ~SwFindParaFormatColl() {}
-virtual int DoFind(SwPaM &, SwMoveFnCollection const &, const SwPaM &, 
bool bInReadOnly) override;
+virtual int DoFind(SwPaM &, SwMoveFnCollection const &, const SwPaM &, 
bool bInReadOnly, std::unique_ptr& xSearchItem) override;
 virtual bool IsReplaceMode() const override;
 };
 
 }
 
 int SwFindParaFormatColl::DoFind(SwPaM & rCursor, SwMoveFnCollection const & 
fnMove,
-const SwPaM & rRegion, bool bInReadOnly)
+const SwPaM & rRegion, bool bInReadOnly,
+std::unique_ptr& /*xSearchItem*/)
 {
 int nRet = FIND_FOUND;
 if( bInReadOnly && pReplColl )
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index b7c4afbf1e47..1e9ecef2c2d2 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -369,11 +369,13 @@ static bool DoSearch(SwPaM & rSearchPam,
 
 namespace sw {
 
+// @param xSearchItem allocate in parent so we can do so outside the calling 
loop
 bool FindTextImpl(SwPaM & rSearchPam,
 const i18nutil::SearchOptions2& rSearchOpt, bool bSearchInNotes,
 utl::TextSearch& rSText,
 SwMoveFnCollection const & fnMove, const SwPaM & rRegion,
-bool bInReadOnly, SwRootFrame const*const pLayout)
+bool bInReadOnl

[Libreoffice-commits] online.git: loleaflet/src

2020-09-08 Thread Pranam Lashkari (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |   31 ++-
 1 file changed, 30 insertions(+), 1 deletion(-)

New commits:
commit 28d163f843ae69f5bbd3a71147533cba5a672578
Author: Pranam Lashkari 
AuthorDate: Sun Aug 9 23:50:30 2020 +0530
Commit: Aron Budea 
CommitDate: Wed Sep 9 08:07:30 2020 +0200

leaflet: hyperlink popup will not displace the view

hyperlink popups always opend above the links
when it did not fit into the view it would scroll
this scrolling caused problem in calc by messing the grid

now popup will not trigger the scroll
and would be adjusted to fit in view

Change-Id: I6c886e0dc57b010db16f51baed0e7a0465e52d4f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100407
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 16744d019..9d3299b88 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1235,13 +1235,42 @@ L.TileLayer = L.GridLayer.extend({
_showURLPopUp: function(position, url) {
// # for internal links
if (!url.startsWith('#')) {
-   this._map.hyperlinkPopup = new L.Popup({className: 
'hyperlink-popup', closeButton: false, closeOnClick: false})
+   this._map.hyperlinkPopup = new L.Popup({className: 
'hyperlink-popup', closeButton: false, closeOnClick: false, autoPan: false})
.setContent('' + 
url + '')
.setLatLng(position)
.openOn(this._map);
+   var offsetDiffTop = $('.hyperlink-popup').offset().top 
- $('#map').offset().top;
+   var offsetDiffLeft = 
$('.hyperlink-popup').offset().left - $('#map').offset().left;
+   if (offsetDiffTop < 10) this._movePopUpBelow();
+   if (offsetDiffLeft < 10) this._movePopUpRight();
}
},
 
+   _movePopUpBelow: function() {
+   var popUp = $('.hyperlink-popup').first();
+   var pixBounds = 
L.bounds(this._map.latLngToLayerPoint(this._visibleCursor.getSouthWest()),
+   
this._map.latLngToLayerPoint(this._visibleCursor.getNorthEast()));
+   var cursorSize = 
pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom()));
+   var bottom = cursorSize.y + popUp.height();
+
+   popUp.css({
+   'bottom': bottom ? -bottom + 'px': '',
+   'display': 'flex',
+   'flex-direction': 'column-reverse'
+   });
+   $('.leaflet-popup-tip-container').first().css('transform', 
'rotate(180deg)');
+   },
+
+   _movePopUpRight: function() {
+   $('.leaflet-popup-content-wrapper').first().css({
+   'position': 'relative',
+   'left': this._map.hyperlinkPopup._containerLeft * -1
+   });
+   $('.leaflet-popup-tip-container').first().css({
+   'left': '25px'
+   });
+   },
+
_closeURLPopUp: function() {
this._map.closePopup(this._map.hyperlinkPopup);
this._map.hyperlinkPopup = null;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Eike Rathke (via logerrit)
 formula/source/core/api/FormulaCompiler.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit e00e2be30436b636d93f8852bb6af44972638a7c
Author: Eike Rathke 
AuthorDate: Tue Sep 8 21:18:30 2020 +0200
Commit: Eike Rathke 
CommitDate: Wed Sep 9 01:14:22 2020 +0200

Resolves: tdf#136364 treat svSep type with ocUnion as range type

So for RPN
sv...Ref(ocPush), sv...Ref(ocPush), svSep(ocUnion), sv...Ref(ocPush)
another svSep(ocUnion) instead of svSep(ocSep) is appended.

Regression from

commit a6032ff5418ad66cc8fec10c636e32b124ee7864
CommitDate: Thu Oct 11 11:26:37 2018 +0200

Resolves: tdf#90698 catch list (1;2) of non-references as error

that introduced a conditional check on operands and operators.

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

diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index da5f7428e196..e6a224fa93a7 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -305,7 +305,7 @@ bool isRangeResultOpCode( OpCode eOp )
 @param  bRight
 If bRPN==false, bRight==false means opcodes for left side are
 checked, bRight==true means opcodes for right side. If bRPN==true
-it doesn't matter.
+it doesn't matter except for the ocSep converted to ocUnion case.
  */
 bool isPotentialRangeType( FormulaToken const * pToken, bool bRPN, bool bRight 
)
 {
@@ -326,6 +326,10 @@ bool isPotentialRangeType( FormulaToken const * pToken, 
bool bRPN, bool bRight )
 case svExternalDoubleRef:
 case svExternalName:// could be range
 return true;
+case svSep:
+// A special case if a previous ocSep was converted to ocUnion it
+// stays svSep instead of svByte.
+return bRPN && !bRight && pToken->GetOpCode() == ocUnion;
 default:
 // Separators are not part of RPN and right opcodes need to be
 // other StackVar types or functions and thus svByte.
@@ -1407,6 +1411,7 @@ void FormulaCompiler::Factor()
 if (p && isPotentialRangeType( p, true, true))
 {
 pFacToken->NewOpCode( ocUnion, 
FormulaToken::PrivateAccess());
+// XXX NOTE: the token's eType is still svSep here!
 PutCode( pFacToken);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


License Statement

2020-09-08 Thread Heather Ellsworth

   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: include/svl include/svx svx/source

2020-09-08 Thread Miklos Vajna (via logerrit)
 include/svl/solar.hrc   |2 +-
 include/svx/unoshprp.hxx|4 +++-
 svx/source/unodraw/unoshape.cxx |   33 +
 3 files changed, 37 insertions(+), 2 deletions(-)

New commits:
commit cd268f0047443ddbb22361cdc15093e881f83588
Author: Miklos Vajna 
AuthorDate: Tue Sep 8 17:26:12 2020 +0200
Commit: Miklos Vajna 
CommitDate: Tue Sep 8 22:52:10 2020 +0200

svx UNO API for shapes: expose what scaling factor is used for autofit 
scaling

TextFitToSizeScale is 0 when the shape has no text or autofit is not
enabled, 100 when there is autofit (but no scale-down), a value between
the two otherwise.

Towards allowing both "autofit" and "same font size for these shapes" at
the same time for SmartArt purposes.

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

diff --git a/include/svl/solar.hrc b/include/svl/solar.hrc
index 6b4cb07bbc33..317d45a84bc1 100644
--- a/include/svl/solar.hrc
+++ b/include/svl/solar.hrc
@@ -23,7 +23,7 @@
 // defines --
 
 #define OWN_ATTR_VALUE_START3900
-#define OWN_ATTR_VALUE_END  4004
+#define OWN_ATTR_VALUE_END  4005
 
 #define RID_LIB_START   1
 #define RID_LIB_END 1
diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index 862db4357117..c73d0c8a5e72 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -192,7 +192,8 @@
 #define OWN_ATTR_SIGNATURELINE_UNSIGNED_IMAGE   (OWN_ATTR_VALUE_START+102)
 #define OWN_ATTR_SIGNATURELINE_IS_SIGNED(OWN_ATTR_VALUE_START+103)
 #define OWN_ATTR_QRCODE (OWN_ATTR_VALUE_START+104)
-// ATTENTION: maximum is OWN_ATTR_VALUE_START+104 svx, see 
include/svl/solar.hrc
+#define OWN_ATTR_TEXTFITTOSIZESCALE (OWN_ATTR_VALUE_START+105)
+// ATTENTION: maximum is OWN_ATTR_VALUE_START+105 svx, see 
include/svl/solar.hrc
 
 // #FontWork#
 #define FONTWORK_PROPERTIES \
@@ -350,6 +351,7 @@
 { u"" UNO_NAME_MISC_OBJ_SIZEPROTECT,  SDRATTR_OBJSIZEPROTECT  , 
cppu::UnoType::get(),  0,  0},\
 { u"UINameSingular",   OWN_ATTR_UINAME_SINGULAR, 
::cppu::UnoType::get(),css::beans::PropertyAttribute::READONLY,   
0}, \
 { u"UINamePlural", OWN_ATTR_UINAME_PLURAL  , 
::cppu::UnoType::get(),css::beans::PropertyAttribute::READONLY,   
0}, \
+{ u"TextFitToSizeScale", OWN_ATTR_TEXTFITTOSIZESCALE, 
::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, 
\
 /* #i68101# */ \
 { u"" UNO_NAME_MISC_OBJ_TITLE,OWN_ATTR_MISC_OBJ_TITLE , 
::cppu::UnoType::get(),0,  0}, \
 { u"" UNO_NAME_MISC_OBJ_DESCRIPTION,  OWN_ATTR_MISC_OBJ_DESCRIPTION   , 
::cppu::UnoType::get(),0,  0},
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index d1e76804133e..c78f5f65a71e 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -82,6 +82,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -165,6 +167,31 @@ protected:
 }
 };
 
+/// Calculates what scaling factor will be used for autofit text scaling of 
this shape.
+sal_Int16 GetTextFitToSizeScale(SdrObject* pObject)
+{
+SdrTextObj* pTextObj = dynamic_cast(pObject);
+if (!pTextObj)
+{
+return 0;
+}
+
+const SfxItemSet& rTextObjSet = pTextObj->GetMergedItemSet();
+if 
(rTextObjSet.GetItem(SDRATTR_TEXT_FITTOSIZE)->GetValue()
+!= drawing::TextFitToSizeType_AUTOFIT)
+{
+return 0;
+}
+
+std::unique_ptr pOutliner
+= 
pTextObj->getSdrModelFromSdrObject().createOutliner(OutlinerMode::TextObject);
+tools::Rectangle aBoundRect(pTextObj->GetCurrentBoundRect());
+pTextObj->SetupOutlinerFormatting(*pOutliner, aBoundRect);
+sal_uInt16 nX = 0;
+sal_uInt16 nY = 0;
+pOutliner->GetGlobalCharStretching(nX, nY);
+return nY;
+}
 }
 
 SvxShape::SvxShape( SdrObject* pObject )
@@ -2833,6 +2860,12 @@ bool SvxShape::getPropertyValueImpl( const OUString&, 
const SfxItemPropertySimpl
 break;
 }
 
+case OWN_ATTR_TEXTFITTOSIZESCALE:
+{
+rValue <<= GetTextFitToSizeScale(GetSdrObject());
+break;
+}
+
 case OWN_ATTR_UINAME_PLURAL:
 {
 rValue <<= GetSdrObject()->TakeObjNamePlural();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sysui/desktop

2020-09-08 Thread Tor Lillqvist (via logerrit)
 sysui/desktop/macosx/Info.plist.in |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 02d431279c59a4be8e2d01d5605a3c5e41666b01
Author: Tor Lillqvist 
AuthorDate: Tue Sep 8 13:29:05 2020 +0300
Commit: Tor Lillqvist 
CommitDate: Tue Sep 8 22:42:53 2020 +0200

tdf#96725: Add LSHandlerRank for the recently added AppleWorks Document

When submitting for the App Store Apple enforces that each document
type in Info.plist has an LSHandlerRank.

Change-Id: I1f963cef31e87ed2176178754490a1e2194e4743
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102238
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/sysui/desktop/macosx/Info.plist.in 
b/sysui/desktop/macosx/Info.plist.in
index a87895078135..f1ce15a5c83e 100644
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -1914,6 +1914,8 @@
 
 CFBundleTypeRole
 Editor
+LSHandlerRank
+Alternate
 
 
 CFBundleExecutable
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Maxim Monastirsky (via logerrit)
 framework/source/uiconfiguration/imagemanagerimpl.cxx |   23 +-
 1 file changed, 7 insertions(+), 16 deletions(-)

New commits:
commit a3ca36086bdc69e4e3da41cd1d41e9d5228b06b6
Author: Maxim Monastirsky 
AuthorDate: Mon Sep 7 23:59:03 2020 +0300
Commit: Maxim Monastirsky 
CommitDate: Tue Sep 8 22:25:19 2020 +0200

Related: tdf#130445 Fix custom icon scale check

There were two problems here:

- For large size 26x26 was specified, but this was the case
only for Galaxy. All other themes have 24x24, and that's the
size specified also in the icon selection dialog (See
SvxIconSelectorDialog::SvxIconSelectorDialog).

- When a wrong size detected, the image was always scaled to
16x16, instead of to the current image size.

Change-Id: I586abfd01441d6b1cdbf1dd011b0e12a31f02dd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102225
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx 
b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index e17649ca8176..ae3aafef0113 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -214,32 +214,23 @@ bool GlobalImageList::hasImage( vcl::ImageType 
nImageType, const OUString& rComm
 
 static bool implts_checkAndScaleGraphic( uno::Reference< XGraphic >& 
rOutGraphic, const uno::Reference< XGraphic >& rInGraphic, vcl::ImageType 
nImageType )
 {
-static Size aNormSize(16, 16);
-static Size aLargeSize(26, 26);
-static Size aSize32(32, 32);
-
 if ( !rInGraphic.is() )
 {
 rOutGraphic = uno::Reference();
 return false;
 }
 
+static const o3tl::enumarray BITMAP_SIZE =
+{
+Size(16, 16), Size(24, 24), Size(32, 32)
+};
+
 // Check size and scale it
 Graphic aImage(rInGraphic);
-Size   aSize = aImage.GetSizePixel();
-bool   bMustScale( false );
-
-if (nImageType == vcl::ImageType::Size26)
-bMustScale = (aSize != aLargeSize);
-else if (nImageType == vcl::ImageType::Size32)
-bMustScale = (aSize != aSize32);
-else
-bMustScale = (aSize != aNormSize);
-
-if (bMustScale)
+if (BITMAP_SIZE[nImageType] != aImage.GetSizePixel())
 {
 BitmapEx aBitmap = aImage.GetBitmapEx();
-aBitmap.Scale( aNormSize );
+aBitmap.Scale(BITMAP_SIZE[nImageType]);
 aImage = Graphic(aBitmap);
 rOutGraphic = aImage.GetXGraphic();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Justin Luth (via logerrit)
 sw/CppunitTest_sw_ww8export.mk   |1 
 sw/qa/extras/ww8export/ww8export.cxx |  138 +
 sw/qa/extras/ww8import/ww8import.cxx |  144 +--
 3 files changed, 144 insertions(+), 139 deletions(-)

New commits:
commit a1ac10f3acc027fa325fb846f79db6af90dfc223
Author: Justin Luth 
AuthorDate: Sat Sep 5 12:41:51 2020 +0300
Commit: Justin Luth 
CommitDate: Tue Sep 8 21:37:45 2020 +0200

move round-tripables to ww8export #2

This is a followup to much earlier
commit a9afa89e953f0f32acf26b143717e7d067cbc75a

This serves two purposes. It helps to prevent regressions
and it allows focus on features that still don't export properly.

A few more DO export, but things like lazy-load are
just testing load-related things, so skipped a few
that didn't seem to have any value in being round-tripped.

Change-Id: I718e3c09074e7b52d8e83dc9a659f6439ce17d3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102073
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/sw/CppunitTest_sw_ww8export.mk b/sw/CppunitTest_sw_ww8export.mk
index 0d79d53d9d57..beec46f3cc7f 100644
--- a/sw/CppunitTest_sw_ww8export.mk
+++ b/sw/CppunitTest_sw_ww8export.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ww8export, \
 comphelper \
 cppu \
 cppuhelper \
+editeng \
 emboleobj \
 sal \
 test \
diff --git a/sw/qa/extras/ww8import/data/tdf105570.doc 
b/sw/qa/extras/ww8export/data/tdf105570.doc
similarity index 100%
rename from sw/qa/extras/ww8import/data/tdf105570.doc
rename to sw/qa/extras/ww8export/data/tdf105570.doc
diff --git a/sw/qa/extras/ww8import/data/tdf106291.doc 
b/sw/qa/extras/ww8export/data/tdf106291.doc
similarity index 100%
rename from sw/qa/extras/ww8import/data/tdf106291.doc
rename to sw/qa/extras/ww8export/data/tdf106291.doc
diff --git a/sw/qa/extras/ww8import/data/tdf112346.doc 
b/sw/qa/extras/ww8export/data/tdf112346.doc
similarity index 100%
rename from sw/qa/extras/ww8import/data/tdf112346.doc
rename to sw/qa/extras/ww8export/data/tdf112346.doc
diff --git a/sw/qa/extras/ww8import/data/tdf112535.doc 
b/sw/qa/extras/ww8export/data/tdf112535.doc
similarity index 100%
rename from sw/qa/extras/ww8import/data/tdf112535.doc
rename to sw/qa/extras/ww8export/data/tdf112535.doc
diff --git a/sw/qa/extras/ww8import/data/tdf122425_2.doc 
b/sw/qa/extras/ww8export/data/tdf122425_2.doc
similarity index 100%
rename from sw/qa/extras/ww8import/data/tdf122425_2.doc
rename to sw/qa/extras/ww8export/data/tdf122425_2.doc
diff --git a/sw/qa/extras/ww8import/data/tdf128605.doc 
b/sw/qa/extras/ww8export/data/tdf128605.doc
similarity index 100%
rename from sw/qa/extras/ww8import/data/tdf128605.doc
rename to sw/qa/extras/ww8export/data/tdf128605.doc
diff --git a/sw/qa/extras/ww8import/data/tdf130262.doc 
b/sw/qa/extras/ww8export/data/tdf130262.doc
similarity index 100%
rename from sw/qa/extras/ww8import/data/tdf130262.doc
rename to sw/qa/extras/ww8export/data/tdf130262.doc
diff --git a/sw/qa/extras/ww8import/data/tdf79639.doc 
b/sw/qa/extras/ww8export/data/tdf79639.doc
similarity index 100%
rename from sw/qa/extras/ww8import/data/tdf79639.doc
rename to sw/qa/extras/ww8export/data/tdf79639.doc
diff --git a/sw/qa/extras/ww8import/data/transparent-text.doc 
b/sw/qa/extras/ww8export/data/transparent-text.doc
similarity index 100%
rename from sw/qa/extras/ww8import/data/transparent-text.doc
rename to sw/qa/extras/ww8export/data/transparent-text.doc
diff --git a/sw/qa/extras/ww8export/ww8export.cxx 
b/sw/qa/extras/ww8export/ww8export.cxx
index a8e774e4dfce..68c464bc8759 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -35,6 +35,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -45,6 +46,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -689,6 +692,141 @@ DECLARE_WW8EXPORT_TEST(testTdf102334, "tdf102334.doc")
 CPPUNIT_ASSERT_EQUAL(true, getProperty(getRun(getParagraph(7), 1), 
"CharHidden"));
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf128605, "tdf128605.doc")
+{
+OUString aPara1PageStyleName = getProperty(getParagraph(1), 
"PageStyleName");
+OUString aPara2PageStyleName = getProperty(getParagraph(2), 
"PageStyleName");
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: Standard
+// - Actual  : Convert 1
+// i.e. the continuous section break resulted in an unwanted page break.
+CPPUNIT_ASSERT_EQUAL(aPara1PageStyleName, aPara2PageStyleName);
+}
+
+DECLARE_WW8EXPORT_TEST(testTdf112535, "tdf112535.doc")
+{
+SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+
+SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+CPPUNIT_ASSERT(pDoc->GetSpzFrameFormats());
+
+SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+CPPUNIT_ASSERT(!rFormats.em

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

2020-09-08 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_core_draw.mk|   73 ++
 sw/Module_sw.mk   |1 
 sw/qa/core/draw/data/as-char-textbox.docx |binary
 sw/qa/core/draw/draw.cxx  |   51 
 sw/qa/inc/swmodeltestbase.hxx |   19 +++
 sw/source/core/draw/dview.cxx |   15 +++---
 6 files changed, 152 insertions(+), 7 deletions(-)

New commits:
commit 821909ee711f7806d899900b739503f20e1879e5
Author: Miklos Vajna 
AuthorDate: Mon Sep 7 21:23:07 2020 +0200
Commit: Caolán McNamara 
CommitDate: Tue Sep 8 21:34:53 2020 +0200

tdf#135149 sw: fix deleting textbox of as-char shapes

Regression from 7596e26fd259ce5445212949403e7cd32303b2bd (Add
SwTextBoxHelper::findShapes, 2014-06-24), the problem was that in case
the shape is as-char anchored, then DeleteSelection() returns false, and
so the textboxes of the deleted shapes are not deleted.

There is no real reason why deletion should be conditional on the
DeleteSelection() result, so just move it outside that block, so
textboxes are always deleted.

(cherry picked from commit da4f9b77a6cd39b1ae5babdd476d1575c8b9371c)

Conflicts:
sw/Module_sw.mk

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

diff --git a/sw/CppunitTest_sw_core_draw.mk b/sw/CppunitTest_sw_core_draw.mk
new file mode 100644
index ..77e62dd876b6
--- /dev/null
+++ b/sw/CppunitTest_sw_core_draw.mk
@@ -0,0 +1,73 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_core_draw))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_draw))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_draw, \
+sw/qa/core/draw/draw \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_core_draw, \
+comphelper \
+cppu \
+cppuhelper \
+sal \
+sfx \
+svxcore \
+sw \
+test \
+unotest \
+utl \
+vcl \
+svt \
+tl \
+svl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_core_draw,\
+boost_headers \
+libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_core_draw,\
+-I$(SRCDIR)/sw/inc \
+-I$(SRCDIR)/sw/source/core/inc \
+-I$(SRCDIR)/sw/source/uibase/inc \
+-I$(SRCDIR)/sw/qa/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_core_draw,\
+   udkapi \
+   offapi \
+   oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_core_draw))
+$(eval $(call gb_CppunitTest_use_vcl,sw_core_draw))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_core_draw,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_draw,\
+officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_core_draw))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_draw, \
+modules/swriter \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_draw))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index e2fd9b5ed75a..be2e7e8d86c7 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -119,6 +119,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
 CppunitTest_sw_core_unocore \
 CppunitTest_sw_core_crsr \
 CppunitTest_sw_core_undo \
+CppunitTest_sw_core_draw \
 ))
 
 ifneq ($(DISABLE_GUI),TRUE)
diff --git a/sw/qa/core/draw/data/as-char-textbox.docx 
b/sw/qa/core/draw/data/as-char-textbox.docx
new file mode 100644
index ..3edf7c632246
Binary files /dev/null and b/sw/qa/core/draw/data/as-char-textbox.docx differ
diff --git a/sw/qa/core/draw/draw.cxx b/sw/qa/core/draw/draw.cxx
new file mode 100644
index ..162bf237d154
--- /dev/null
+++ b/sw/qa/core/draw/draw.cxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+char const DATA_DIRECTORY[] = "/sw/qa/core/draw/data/";
+
+/// Covers sw/source/core/draw/ fixes.
+class SwCoreDrawTest : public SwModelTestBase
+{
+};
+
+CPPUNIT_TEST_FIXTURE(SwCoreDrawTest, testTextboxDeleteAsChar)
+{
+// Load a documen

[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - include/vcl vcl/source xmlsecurity/Library_xmlsecurity.mk xmlsecurity/qa xmlsecurity/source xmlsecurity/workben

2020-09-08 Thread Miklos Vajna (via logerrit)
 include/vcl/filter/PDFiumLibrary.hxx   |   
48 ++
 vcl/source/pdf/PDFiumLibrary.cxx   |   
56 
 xmlsecurity/Library_xmlsecurity.mk |   
 5 
 xmlsecurity/qa/unit/signing/data/hide-and-replace-shadow-file-signed-2.pdf 
|binary
 xmlsecurity/qa/unit/signing/signing.cxx|   
16 ++
 xmlsecurity/source/pdfio/pdfdocument.cxx   |   
69 ++
 xmlsecurity/workben/pdfverify.cxx  |   
 5 
 7 files changed, 196 insertions(+), 3 deletions(-)

New commits:
commit d7336df8c4aa949643a63acad80d48291880e161
Author: Miklos Vajna 
AuthorDate: Fri Sep 4 17:17:48 2020 +0200
Commit: Caolán McNamara 
CommitDate: Tue Sep 8 21:34:18 2020 +0200

xmlsecurity: pdf incremental updates that are non-commenting are invalid

I.e. it's OK to add incremental updates for annotation/commenting
purposes and that doesn't invalite existing signatures. Everything else
does.

(cherry picked from commit 61834cd574568613f0b0a2ee099a60fa5a8d9804)

Conflicts:
include/vcl/filter/PDFiumLibrary.hxx
vcl/source/pdf/PDFiumLibrary.cxx

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

diff --git a/include/vcl/filter/PDFiumLibrary.hxx 
b/include/vcl/filter/PDFiumLibrary.hxx
index bc7912c17e81..639c71d61a3d 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -17,9 +17,14 @@
 #include 
 #include 
 #include 
+#include 
+
+#include 
 
 namespace vcl::pdf
 {
+class PDFiumDocument;
+
 class VCL_DLLPUBLIC PDFium final
 {
 private:
@@ -31,6 +36,49 @@ public:
 ~PDFium();
 };
 
+class VCL_DLLPUBLIC PDFiumPage final
+{
+private:
+FPDF_PAGE mpPage;
+
+private:
+PDFiumPage(const PDFiumPage&) = delete;
+PDFiumPage& operator=(const PDFiumPage&) = delete;
+
+public:
+PDFiumPage(FPDF_PAGE pPage)
+: mpPage(pPage)
+{
+}
+
+~PDFiumPage()
+{
+if (mpPage)
+FPDF_ClosePage(mpPage);
+}
+
+/// Get bitmap checksum of the page, without annotations/commenting.
+BitmapChecksum getChecksum();
+};
+
+class VCL_DLLPUBLIC PDFiumDocument final
+{
+private:
+FPDF_DOCUMENT mpPdfDocument;
+
+private:
+PDFiumDocument(const PDFiumDocument&) = delete;
+PDFiumDocument& operator=(const PDFiumDocument&) = delete;
+
+public:
+PDFiumDocument(FPDF_DOCUMENT pPdfDocument);
+~PDFiumDocument();
+
+int getPageCount();
+
+std::unique_ptr openPage(int nIndex);
+};
+
 struct PDFiumLibrary : public rtl::StaticWithInit, 
PDFiumLibrary>
 {
 std::shared_ptr operator()() { return std::make_shared(); }
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index 604807524bf9..861b7dda0acb 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -15,6 +15,10 @@
 #include 
 #include 
 
+#include 
+
+#include 
+
 namespace vcl::pdf
 {
 PDFium::PDFium()
@@ -29,6 +33,58 @@ PDFium::PDFium()
 
 PDFium::~PDFium() { FPDF_DestroyLibrary(); }
 
+PDFiumDocument::PDFiumDocument(FPDF_DOCUMENT pPdfDocument)
+: mpPdfDocument(pPdfDocument)
+{
+}
+
+PDFiumDocument::~PDFiumDocument()
+{
+if (mpPdfDocument)
+FPDF_CloseDocument(mpPdfDocument);
+}
+
+std::unique_ptr PDFiumDocument::openPage(int nIndex)
+{
+std::unique_ptr pPDFiumPage;
+FPDF_PAGE pPage = FPDF_LoadPage(mpPdfDocument, nIndex);
+if (pPage)
+{
+pPDFiumPage = std::make_unique(pPage);
+}
+return pPDFiumPage;
+}
+
+int PDFiumDocument::getPageCount() { return FPDF_GetPageCount(mpPdfDocument); }
+
+BitmapChecksum PDFiumPage::getChecksum()
+{
+size_t nPageWidth = FPDF_GetPageWidth(mpPage);
+size_t nPageHeight = FPDF_GetPageHeight(mpPage);
+FPDF_BITMAP pPdfBitmap = FPDFBitmap_Create(nPageWidth, nPageHeight, 
/*alpha=*/1);
+if (!pPdfBitmap)
+{
+return 0;
+}
+
+// Intentionally not using FPDF_ANNOT here, annotations/commenting is OK 
to not affect the
+// checksum, signature verification wants this.
+FPDF_RenderPageBitmap(pPdfBitmap, mpPage, /*start_x=*/0, /*start_y=*/0, 
nPageWidth, nPageHeight,
+  /*rotate=*/0, /*flags=*/0);
+Bitmap aBitmap(Size(nPageWidth, nPageHeight), 24);
+{
+BitmapScopedWriteAccess pWriteAccess(aBitmap);
+const auto pPdfBuffer = 
static_cast(FPDFBitmap_GetBuffer(pPdfBitmap));
+const int nStride = FPDFBitmap_GetStride(pPdfBitmap);
+for (size_t nRow = 0; nRow < nPageHeight; ++nRow)
+{
+ConstScanline pPdfLine = pPdfBuffer + (nStride * nRow);
+pWriteAccess->CopyScanline(nRow, pPdfLine, 
ScanlineFormat::N32BitTcBgra, nStride);
+}
+}
+  

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

2020-09-08 Thread Caolán McNamara (via logerrit)
 vcl/inc/listbox.hxx|2 +-
 vcl/source/control/combobox.cxx|2 +-
 vcl/source/control/imp_listbox.cxx |4 +++-
 vcl/source/control/listbox.cxx |2 +-
 vcl/source/control/spinfld.cxx |3 +++
 5 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit d05c1459f5b8150654ca0b7098cc331ba6009e07
Author: Caolán McNamara 
AuthorDate: Tue Sep 8 15:21:10 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 8 21:27:08 2020 +0200

tdf#136208 make combo/list/spin take focus on use of scroll wheel

So using the scrollwheel on those widgets when they do not have focus will
cause then to take focus. That will then cause the fontsize/fontname 
widgets to
reset back to the current document size/name if they are scrolled to a new
value, but their new value not explicitly applied to the current document,
when focus is restored to the document window.

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

diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 0485001216b0..4d714e418d81 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -427,7 +427,7 @@ public:
 sal_Int32   GetCurrentPos() const   { return 
maLBWindow->GetCurrentPos(); }
 
 boolProcessKeyInput( const KeyEvent& rKEvt ){ return 
maLBWindow->ProcessKeyInput( rKEvt ); }
-boolHandleWheelAsCursorTravel( const CommandEvent& rCEvt );
+boolHandleWheelAsCursorTravel(const CommandEvent& rCEvt, 
Control& rControl);
 
 /**
  * Removes existing separators, and sets the position of the
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 00764d68bf12..b5b14d833d9d 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -784,7 +784,7 @@ bool ComboBox::EventNotify( NotifyEvent& rNEvt )
 )
 )
 {
-bDone = m_pImpl->m_pImplLB->HandleWheelAsCursorTravel( 
*rNEvt.GetCommandEvent() );
+bDone = 
m_pImpl->m_pImplLB->HandleWheelAsCursorTravel(*rNEvt.GetCommandEvent(), *this);
 }
 else
 {
diff --git a/vcl/source/control/imp_listbox.cxx 
b/vcl/source/control/imp_listbox.cxx
index e25a506c6a48..a11d0eb8ba7c 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -2402,7 +2402,7 @@ const Wallpaper& ImplListBox::GetDisplayBackground() const
 return maLBWindow->GetDisplayBackground();
 }
 
-bool ImplListBox::HandleWheelAsCursorTravel( const CommandEvent& rCEvt )
+bool ImplListBox::HandleWheelAsCursorTravel(const CommandEvent& rCEvt, 
Control& rControl)
 {
 bool bDone = false;
 if ( rCEvt.GetCommand() == CommandEventId::Wheel )
@@ -2410,6 +2410,8 @@ bool ImplListBox::HandleWheelAsCursorTravel( const 
CommandEvent& rCEvt )
 const CommandWheelData* pData = rCEvt.GetWheelData();
 if( !pData->GetModifier() && ( pData->GetMode() == 
CommandWheelMode::SCROLL ) )
 {
+if (!rControl.HasChildPathFocus())
+rControl.GrabFocus();
 sal_uInt16 nKey = ( pData->GetDelta() < 0 ) ? KEY_DOWN : KEY_UP;
 KeyEvent aKeyEvent( 0, vcl::KeyCode( nKey ) );
 bDone = ProcessKeyInput( aKeyEvent );
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx
index fbada6496e89..a82e4ce0fb11 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -883,7 +883,7 @@ bool ListBox::PreNotify( NotifyEvent& rNEvt )
 )
 )
 {
-bDone = mpImplLB->HandleWheelAsCursorTravel( 
*rNEvt.GetCommandEvent() );
+bDone = 
mpImplLB->HandleWheelAsCursorTravel(*rNEvt.GetCommandEvent(), *this);
 }
 else
 {
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index d9298ae1598a..f63c037d6e9d 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -554,6 +554,9 @@ bool SpinField::EventNotify(NotifyEvent& rNEvt)
 else
 Up();
 bDone = true;
+
+if (!HasChildPathFocus())
+GrabFocus();
 }
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Julien Nabet (via logerrit)
 editeng/source/uno/unotext.cxx |4 ++--
 vcl/source/window/printdlg.cxx |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 18939aadf534f97b3650544345957a0bea46825c
Author: Julien Nabet 
AuthorDate: Tue Sep 8 13:55:37 2020 +0200
Commit: Julien Nabet 
CommitDate: Tue Sep 8 18:59:18 2020 +0200

Fix typo in code+comment (vaules->values)

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

diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 392c0cd37255..86a2c8062077 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1965,12 +1965,12 @@ void SAL_CALL SvxUnoTextBase::moveTextRange( const 
uno::Reference< text::XTextRa
 /// @throws uno::RuntimeException
 static void SvxPropertyValuesToItemSet(
 SfxItemSet &rItemSet,
-const uno::Sequence< beans::PropertyValue >& rPropertyVaules,
+const uno::Sequence< beans::PropertyValue >& rPropertyValues,
 const SfxItemPropertySet *pPropSet,
 SvxTextForwarder *pForwarder /*needed for WID_NUMLEVEL*/,
 sal_Int32 nPara /*needed for WID_NUMLEVEL*/)
 {
-for (const beans::PropertyValue& rProp : rPropertyVaules)
+for (const beans::PropertyValue& rProp : rPropertyValues)
 {
 const SfxItemPropertySimpleEntry *pEntry = 
pPropSet->getPropertyMap().getByName( rProp.Name );
 if (!pEntry)
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index c210525b17f3..042e58c3a06a 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -2199,7 +2199,7 @@ PrintProgressDialog::PrintProgressDialog(weld::Window* 
i_pParent, int i_nMax)
 mxButton->connect_clicked( LINK( this, PrintProgressDialog, ClickHdl ) );
 
 // after this patch f7157f04fab298423e2c4f6a7e5f8e361164b15f, we have seen 
the calc Max string (sometimes) look above
-// now init to the right start vaules
+// now init to the right start values
 mxText->set_label(getNewLabel(maStr, mnCur, mnMax));
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Tor Lillqvist (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1a1908e8e5a57eebba83a9c91ffc84853cd0636a
Author: Tor Lillqvist 
AuthorDate: Tue Sep 8 15:14:08 2020 +0300
Commit: Tor Lillqvist 
CommitDate: Tue Sep 8 18:39:44 2020 +0200

The current macOS beta for Apple Silicon is 11.0

Change-Id: I79a62c680bdf1b8d0e982fa0d30f019a9a57f666
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102251
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/configure.ac b/configure.ac
index 4a48eea2de28..d97b10fff15b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2931,7 +2931,7 @@ if test $_os = Darwin; then
 if test "$host_cpu" = x86_64; then
 with_macosx_version_min_required="10.10";
 else
-with_macosx_version_min_required="10.16";
+with_macosx_version_min_required="11.0";
 fi
 fi
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Attila Bakos (via logerrit)
 sw/qa/extras/uiwriter/data3/tdf112342.docx   |binary
 sw/qa/extras/uiwriter/uiwriter3.cxx  |   17 +
 writerfilter/source/dmapper/DomainMapper.cxx |8 +++-
 3 files changed, 24 insertions(+), 1 deletion(-)

New commits:
commit 75f291ff075c4e4106a1f652e8bab629e4edcff7
Author: Attila Bakos 
AuthorDate: Thu Jul 30 10:15:09 2020 +0200
Commit: Xisco Fauli 
CommitDate: Tue Sep 8 18:36:40 2020 +0200

tdf#112342 DOCX import: fix page break before image-only paragraphs

Picture anchored to an empty paragraphs was moved to the
previous page, because the deferred page wasn't handled here.

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

diff --git a/sw/qa/extras/uiwriter/data3/tdf112342.docx 
b/sw/qa/extras/uiwriter/data3/tdf112342.docx
new file mode 100644
index ..ab4c7ee07d4d
Binary files /dev/null and b/sw/qa/extras/uiwriter/data3/tdf112342.docx differ
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 34db982e195b..fe637456f517 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -55,6 +55,23 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf129382)
 CPPUNIT_ASSERT_EQUAL(8, getShapes());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf112342)
+{
+load(DATA_DIRECTORY, "tdf112342.docx");
+
+//Get the last para
+uno::Reference xPara = getParagraph(3);
+auto xCur = xPara->getText()->createTextCursor();
+//Go to the end of it
+xCur->gotoEnd(false);
+//And let's remove the last 2 chars (the last para with its char).
+xCur->goLeft(2, true);
+xCur->setString("");
+
+//If the second paragraph on the second page, this will be passed.
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Page break does not match", 2, getPages());
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf126626)
 {
 load(DATA_DIRECTORY, "tdf126626.docx");
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index beccdfdafc76..b9adb976c73b 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2284,7 +2284,13 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
 {
 if ( m_pImpl->IsDiscardHeaderFooter() )
 break;
-
+//tdf112342: Break before images as well, if there are page break
+if (m_pImpl->isBreakDeferred(BreakType::PAGE_BREAK))
+{
+m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH)
+->Insert(PROP_BREAK_TYPE, 
uno::makeAny(style::BreakType_PAGE_BEFORE));
+m_pImpl->clearDeferredBreak(PAGE_BREAK);
+}
 writerfilter::Reference::Pointer_t pProperties = 
rSprm.getProps();
 if( pProperties )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 1dc133c6994833dadd91e20d0a7c9ebc22bc0e61
Author: Xisco Fauli 
AuthorDate: Tue Sep 8 13:07:12 2020 +0200
Commit: Xisco Fauli 
CommitDate: Tue Sep 8 18:32:03 2020 +0200

sw_ooxmlexport11: DECLARE_OOXMLIMPORT_TEST -> DECLARE_OOXMLEXPORT_TEST

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index c36b399f4352..6cdecfd2c258 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -330,7 +330,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf115719, "tdf115719.docx")
 CPPUNIT_ASSERT_EQUAL(2, getPages());
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf115719b, "tdf115719b.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf115719b, "tdf115719b.docx")
 {
 // This is similar to testTdf115719, but here the left textbox is not 
aligned "from left, by
 // 0cm" but simply aligned to left, which is a different codepath.
@@ -832,7 +832,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf118521_marginsLR, 
"tdf118521_marginsLR.docx")
 CPPUNIT_ASSERT_EQUAL(sal_Int32(882), 
getProperty(getParagraph(2), "ParaFirstLineIndent"));
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf104797, "tdf104797.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf104797, "tdf104797.docx")
 {
 // check moveFrom and moveTo
 CPPUNIT_ASSERT_EQUAL( OUString( "Will this sentence be duplicated?" ), 
getParagraph( 1 )->getString());
@@ -1289,7 +1289,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123189_tableBackground, 
"table-black_fill.docx")
 CPPUNIT_ASSERT_EQUAL(COL_TRANSPARENT, Color(getProperty(xCell, 
"BackColor")));
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf116084, "tdf116084.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf116084, "tdf116084.docx")
 {
 // tracked line is not a single text portion: w:del is recognized within 
w:ins
 CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 1 ), 1 
)->getString());
@@ -1297,7 +1297,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf116084, "tdf116084.docx")
 CPPUNIT_ASSERT_EQUAL( OUString( "There should be a better start to this. " 
), getRun( getParagraph( 1 ), 2 )->getString());
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf121176, "tdf121176.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf121176, "tdf121176.docx")
 {
 // w:del is imported correctly when it is in a same size w:ins
 CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 1 ), 1 
)->getString());
@@ -1305,7 +1305,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf121176, "tdf121176.docx")
 CPPUNIT_ASSERT_EQUAL( OUString( "must" ), getRun( getParagraph( 1 ), 2 
)->getString());
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf123054, "tdf123054.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf123054, "tdf123054.docx")
 {
 CPPUNIT_ASSERT_EQUAL(OUString("No Spacing"),
  getProperty(getParagraph(20), 
"ParaStyleName"));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport15.cxx |   21 +++--
 sw/qa/extras/uiwriter/uiwriter3.cxx|   17 +
 2 files changed, 20 insertions(+), 18 deletions(-)

New commits:
commit 09bd2fb3c3b35b61cbf99b5d95a9542b344c7251
Author: Xisco Fauli 
AuthorDate: Tue Sep 8 13:38:17 2020 +0200
Commit: Xisco Fauli 
CommitDate: Tue Sep 8 17:57:57 2020 +0200

sw_ooxmlexport15: DECLARE_OOXMLIMPORT_TEST -> DECLARE_OOXMLEXPORT_TEST

and move one test to sw_uiwriter. It fits more there

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 2b49b47dbfd2..999ef57a38af 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -47,7 +47,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123621, 
"tdf123621.docx")
 "/wp:positionV/wp:posOffset", "1080135");
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf131801, "tdf131801.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf131801, "tdf131801.docx")
 {
 CPPUNIT_ASSERT_EQUAL(1, getPages());
 
@@ -503,7 +503,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf134063, "tdf134063.docx")
 CPPUNIT_ASSERT_EQUAL(sal_Int32(720), getXPath(pDump, 
"//page[1]/body/txt[1]/Text[3]", "nWidth").toInt32());
 }
 
-DECLARE_OOXMLIMPORT_TEST(TestTdf135653, "tdf135653.docx")
+DECLARE_OOXMLEXPORT_TEST(TestTdf135653, "tdf135653.docx")
 {
 uno::Reference xOLEProps(getShape(1), 
uno::UNO_QUERY_THROW);
 drawing::FillStyle nFillStyle = static_cast(-1);
@@ -579,22 +579,7 @@ 
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testRelativeAnchorHeightFromBottomMarginHasF
 assertXPath(pXmlDoc, "//SwAnchoredDrawObject/bounds", "height", "1147");
 }
 
-DECLARE_OOXMLIMPORT_TEST(TestTdf112342, "tdf112342.docx")
-{
-//Get the last para
-uno::Reference xPara = getParagraph(3);
-auto xCur = xPara->getText()->createTextCursor();
-//Go to the end of it
-xCur->gotoEnd(false);
-//And let's remove the last 2 chars (the last para with its char).
-xCur->goLeft(2, true);
-xCur->setString("");
-
-//If the second paragraph on the second page, this will be passed.
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Page break does not match", 2, getPages());
-}
-
-DECLARE_OOXMLIMPORT_TEST(TestTdf132483, "tdf132483.docx")
+DECLARE_OOXMLEXPORT_TEST(TestTdf132483, "tdf132483.docx")
 {
 uno::Reference xOLEProps(getShape(1), 
uno::UNO_QUERY_THROW);
 sal_Int16 nVRelPos = -1;
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112342.docx 
b/sw/qa/extras/uiwriter/data3/tdf112342.docx
similarity index 100%
rename from sw/qa/extras/ooxmlexport/data/tdf112342.docx
rename to sw/qa/extras/uiwriter/data3/tdf112342.docx
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 928711466229..46e5a4eee028 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -191,6 +191,23 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134404)
 CPPUNIT_ASSERT_EQUAL(2, getPages());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf112342)
+{
+load(DATA_DIRECTORY, "tdf112342.docx");
+
+//Get the last para
+uno::Reference xPara = getParagraph(3);
+auto xCur = xPara->getText()->createTextCursor();
+//Go to the end of it
+xCur->gotoEnd(false);
+//And let's remove the last 2 chars (the last para with its char).
+xCur->goLeft(2, true);
+xCur->setString("");
+
+//If the second paragraph on the second page, this will be passed.
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Page break does not match", 2, getPages());
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132321)
 {
 load(DATA_DIRECTORY, "tdf132321.odt");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx |   53 ++---
 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx  |   44 
 2 files changed, 49 insertions(+), 48 deletions(-)

New commits:
commit 45518f03c6c994cd7a7d13bb7b4e1b6cf3ec95e5
Author: Xisco Fauli 
AuthorDate: Tue Sep 8 13:02:07 2020 +0200
Commit: Xisco Fauli 
CommitDate: Tue Sep 8 17:56:23 2020 +0200

sw_ooxmlexport14: DECLARE_OOXMLIMPORT_TEST -> DECLARE_OOXMLEXPORT_TEST

and if the test fails, move it to sw_ooxmlimport2

Change-Id: I2fb18f9cef40ba502ee4d719de543b5e78cd31d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102241
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index bcd96e2491cc..834c59c785c2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -57,7 +57,7 @@ protected:
 }
 };
 
-DECLARE_OOXMLIMPORT_TEST(Tdf130907, "tdf130907.docx")
+DECLARE_OOXMLEXPORT_TEST(Tdf130907, "tdf130907.docx")
 {
 uno::Reference xPara1 = getParagraph(2);
 CPPUNIT_ASSERT(xPara1.is());
@@ -120,7 +120,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf135595_HFtableWrap_c12, 
"tdf135595_HFtableWrap_c
 CPPUNIT_ASSERT_MESSAGE("Text must not wrap around header image", 
nRowHeight < 800);
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf123622, "tdf123622.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf123622, "tdf123622.docx")
 {
 uno::Reference 
XPropsRight(getShape(1),uno::UNO_QUERY);
 sal_Int16 nRelativePosR = 0;
@@ -231,7 +231,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf130814ooxml, 
"tdf130814.docx")
 p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:u", "val", 
"single");
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf129888vml, "tdf129888vml.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf129888vml, "tdf129888vml.docx")
 {
 //the line shape has anchor in the first cell however it has to
 //be positioned to an another cell. To reach this we must handle
@@ -245,7 +245,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf129888vml, 
"tdf129888vml.docx")
  false, bValue);
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf129888dml, "tdf129888dml.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf129888dml, "tdf129888dml.docx")
 {
 //the shape has anchor in the first cell however it has to
 //be positioned to the right side of the page. To reach this we must handle
@@ -639,17 +639,7 @@ 
DECLARE_OOXMLEXPORT_TEST(testTdf130167_spilloverHeaderShape, "testTdf130167_spil
 CPPUNIT_ASSERT(xNameAccess->getCount() < 4);
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf125038, "tdf125038.docx")
-{
-OUString aActual = getParagraph(1)->getString();
-// Without the accompanying fix in place, this test would have failed with:
-// - Expected: phone:...
-// - Actual  : result1result2phone:...
-// i.e. the result if the inner MERGEFIELD fields ended up in the body 
text.
-CPPUNIT_ASSERT_EQUAL(OUString("phone: \t1234567890"), aActual);
-}
-
-DECLARE_OOXMLIMPORT_TEST(testTdf124986, "tdf124986.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf124986, "tdf124986.docx")
 {
 // Load a document with SET fields, where the SET fields contain 
leading/trailing quotation marks and spaces.
 uno::Reference xTextFieldsSupplier(mxComponent, 
uno::UNO_QUERY);
@@ -669,39 +659,6 @@ DECLARE_OOXMLIMPORT_TEST(testTdf124986, "tdf124986.docx")
 }
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf125038b, "tdf125038b.docx")
-{
-// Load a document with an IF field, where the IF field command contains a 
paragraph break.
-uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
-uno::Reference 
xParagraphAccess(xTextDocument->getText(), uno::UNO_QUERY);
-uno::Reference xParagraphs = 
xParagraphAccess->createEnumeration();
-CPPUNIT_ASSERT(xParagraphs->hasMoreElements());
-uno::Reference xParagraph(xParagraphs->nextElement(), 
uno::UNO_QUERY);
-
-// Without the accompanying fix in place, this test would have failed with:
-// - Expected: phone: 1234
-// - Actual  :
-// i.e. the first paragraph was empty and the second paragraph had the 
content.
-CPPUNIT_ASSERT_EQUAL(OUString("phone: 1234"), xParagraph->getString());
-CPPUNIT_ASSERT(xParagraphs->hasMoreElements());
-xParagraphs->nextElement();
-
-// Without the accompanying fix in place, this test would have failed with:
-// - Expression: !xParagraphs->hasMoreElements()
-// i.e. the document had 3 paragraphs, while only 2 was expected.
-CPPUNIT_ASSERT(!xParagraphs->hasMoreElements());
-}
-
-DECLARE_OOXMLIMPORT_TEST(testTdf125038c, "tdf125038c.docx")
-{
-OUString aActual = getParagraph(1)->getString();
-// Without the accompanying fix in place, this test would have failed with:
-// - Expected: email: t...@test.test
-// - Actual  : email:
-// I.e. the result of the MERGEFIELD field inside an IF field was lost.
-CPPUNIT_ASSER

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

2020-09-08 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 60ebe8e183881ed7a85f3bd92fabbc43cf484ed1
Author: Xisco Fauli 
AuthorDate: Tue Sep 8 13:12:56 2020 +0200
Commit: Xisco Fauli 
CommitDate: Tue Sep 8 17:54:53 2020 +0200

sw_ooxmlexport13: DECLARE_OOXMLIMPORT_TEST -> DECLARE_OOXMLEXPORT_TEST

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index fff8e17ec4f5..daaecd43df9f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -715,7 +715,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTextInput, 
"textinput.odt")
 CPPUNIT_ASSERT_EQUAL(4, nElements);
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf123460, "tdf123460.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf123460, "tdf123460.docx")
 {
 // check paragraph mark deletion at terminating moveFrom
 CPPUNIT_ASSERT_EQUAL(true,getParagraph( 2 
)->getString().startsWith("Nunc"));
@@ -754,7 +754,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125298, 
"tdf125298_crossreflink_nonas
 CPPUNIT_ASSERT_EQUAL(expectedFieldName2, fieldName2);
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf121784, "tdf121784.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf121784, "tdf121784.docx")
 {
 // check tracked insertion of footnotes
 CPPUNIT_ASSERT_EQUAL( OUString( "Text1" ), getParagraph( 1 )->getString());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 90ac08fa522efd4952ecc8c3e7dcc18cfd5a66a0
Author: Xisco Fauli 
AuthorDate: Tue Sep 8 13:19:06 2020 +0200
Commit: Xisco Fauli 
CommitDate: Tue Sep 8 17:53:55 2020 +0200

sw_ooxmlexport10: DECLARE_OOXMLIMPORT_TEST -> DECLARE_OOXMLEXPORT_TEST

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 23aa25f2f2a9..da998b01bb5f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -571,7 +571,7 @@ DECLARE_OOXMLEXPORT_TEST(testNegativeCellMarginTwips, 
"negative-cell-margin-twip
 CPPUNIT_ASSERT( width.toInt32() > 0 );
 }
 
-DECLARE_OOXMLIMPORT_TEST(testFdo38414, "fdo38414.docx" )
+DECLARE_OOXMLEXPORT_TEST(testFdo38414, "fdo38414.docx" )
 {
 // The cells in the last (4th) column were merged properly and so the 
result didn't have the same height.
 // (Since w:gridBefore is worked around by faking another cell in the row, 
so column count is thus 5
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: ppt import(?) bug hunting

2020-09-08 Thread Caolán McNamara
On Sun, 2020-09-06 at 16:30 +0100, Dr. David Alan Gilbert wrote:
> So I'm now even more convinced that the right thing to do is just
> nuke these two lines

That does look convincing, that it was left over and accidentally not
updated at 8a64144fddde61dd050da4cb93b4a7242a495bb2 to the new reality

> suggest how else I should test it?

Along with your change to fix this, the ideal thing is to also add a
test to (probably) sd/qa/unit/import-tests.cxx to assert the desired
value for the numbering level 

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


[Libreoffice-commits] online.git: loleaflet/.gitignore loleaflet/Makefile.am loleaflet/package.json loleaflet/.stylelintrc.json

2020-09-08 Thread Henry Castro (via logerrit)
 loleaflet/.gitignore|1 -
 loleaflet/.stylelintrc.json |   13 +
 loleaflet/Makefile.am   |2 ++
 loleaflet/package.json  |4 +++-
 4 files changed, 18 insertions(+), 2 deletions(-)

New commits:
commit d7353acf969ba6e35ef3edc5d4b63a06e81bcf7f
Author: Henry Castro 
AuthorDate: Mon Sep 7 15:22:38 2020 -0400
Commit: Pedro Silva 
CommitDate: Tue Sep 8 17:33:12 2020 +0200

loleaflet: introduce "stylelint" a modern linter for CSS

Change-Id: I8a7427eeb3b838baac8a6669d5313dc0d53d9ddd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102199
Tested-by: Pedro Silva 
Reviewed-by: Pedro Silva 

diff --git a/loleaflet/.gitignore b/loleaflet/.gitignore
index 5ee267820..33dac7e7a 100644
--- a/loleaflet/.gitignore
+++ b/loleaflet/.gitignore
@@ -1,6 +1,5 @@
 node_modules
 node_cache
-.*
 tmp/**/*
 *.iml
 *.sublime-*
diff --git a/loleaflet/.stylelintrc.json b/loleaflet/.stylelintrc.json
new file mode 100644
index 0..83b2927a4
--- /dev/null
+++ b/loleaflet/.stylelintrc.json
@@ -0,0 +1,13 @@
+{
+   "rules": {
+   "indentation": "tab",
+   "string-quotes": "single",
+   "no-duplicate-selectors": true,
+   "selector-combinator-space-after": "always",
+   "selector-attribute-quotes": "always",
+   "selector-attribute-brackets-space-inside": "never",
+   "function-url-quotes": ["always", {
+   "except": ["empty"]
+   }]
+   }
+}
diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index 44c4886fa..20dbcb80d 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -447,6 +447,8 @@ $(INTERMEDIATE_DIR)/loleaflet-src.js: $(call 
prereq_loleaflet)
 
 $(DIST_FOLDER)/bundle.css: $(call prereq_css)
@mkdir -p $(dir $@)
+   @echo "Checking for CSS errors..."
+   @$(NODE) node_modules/stylelint/bin/stylelint.js --config 
$(srcdir)/.stylelintrc.json $(srcdir)/css/*.css
$(call bundle_css)
 
 $(DIST_FOLDER)/bundle.js: $(INTERMEDIATE_DIR)/loleaflet-src.js $(call 
prereq_all)
diff --git a/loleaflet/package.json b/loleaflet/package.json
index d081f4eb9..0c6eb695a 100644
--- a/loleaflet/package.json
+++ b/loleaflet/package.json
@@ -23,7 +23,9 @@
 "uglifycss": "0.0.29",
 "uglifyify": "5.0.2",
 "vex-js": "4.1.0",
-"typescript": "3.9.5"
+"typescript": "3.9.5",
+"stylelint-config-standard": "20.0.0",
+"stylelint": "13.7.0"
   },
   "repository": {
 "type": "git",
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9fbd3299b8ffd0349c14b0986a5a87ebb0b0c521
Author: Xisco Fauli 
AuthorDate: Tue Sep 8 13:10:39 2020 +0200
Commit: Xisco Fauli 
CommitDate: Tue Sep 8 17:28:02 2020 +0200

sw_ooxmlexport6: DECLARE_OOXMLIMPORT_TEST -> DECLARE_OOXMLEXPORT_TEST

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index 120a8db1d3bb..d1091c949bb6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -976,7 +976,7 @@ 
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testSyncedRelativePercent, "tdf93676-1.odt")
 assertXPath(pXmlDoc, "//wp14:pctHeight", 0);
 }
 
-DECLARE_OOXMLIMPORT_TEST(testTdf107119, "tdf107119.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf107119, "tdf107119.docx")
 {
 uno::Reference XPropsWrap(getShape(1), 
uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_PARALLEL, 
getProperty(XPropsWrap, "Surround"));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Alain Romedenne (via logerrit)
 basic/qa/basic_coverage/test_Date.vb |   19 +++
 1 file changed, 19 insertions(+)

New commits:
commit c3c8d2d67174beddb27fc94b10aebed259500133
Author: Alain Romedenne 
AuthorDate: Mon Sep 7 14:55:19 2020 +0200
Commit: Mike Kaganski 
CommitDate: Tue Sep 8 17:18:29 2020 +0200

tdf#136112 Unit test for Date() Basic function

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

diff --git a/basic/qa/basic_coverage/test_Date.vb 
b/basic/qa/basic_coverage/test_Date.vb
new file mode 100644
index ..c21d8cc05910
--- /dev/null
+++ b/basic/qa/basic_coverage/test_Date.vb
@@ -0,0 +1,19 @@
+'
+' 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/.
+'
+
+Function doUnitTest as Integer
+  ''' Return 'text' OR 'date' variable '''
+
+  If ( TypeName(Date$)<>"String" Or Vartype(Date())<>V_DATE) Then
+doUnitTest = 0 ' not successful
+  Else
+doUnitTest = 1 ' Ok
+  End If
+End Function
+
+Sub DEV_TST : MsgBox doUnitTesT : End Sub
\ No newline at end of file
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'feature/calc-canvas' - loleaflet/src

2020-09-08 Thread Michael Meeks (via logerrit)
 loleaflet/src/layer/tile/CanvasTileLayer.js |   22 +-
 1 file changed, 9 insertions(+), 13 deletions(-)

New commits:
commit 19a5000a69654e181abd5c67a5a9c32ee60fb91d
Author: Michael Meeks 
AuthorDate: Tue Sep 8 16:18:31 2020 +0100
Commit: Michael Meeks 
CommitDate: Tue Sep 8 16:18:31 2020 +0100

calc canvas: avoid repeated setTransform; build the right offset.

Change-Id: Iab153b25fa38f27742a052ad0892e3d55c2c04cc

diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js 
b/loleaflet/src/layer/tile/CanvasTileLayer.js
index c44e2ae47..aee0f9b60 100644
--- a/loleaflet/src/layer/tile/CanvasTileLayer.js
+++ b/loleaflet/src/layer/tile/CanvasTileLayer.js
@@ -94,6 +94,7 @@ L.CanvasTilePainter = L.Class.extend({
this._lastSize = mapSize;
this._lastMapSize = mapSize;
this._setCanvasSize(mapSize.x, mapSize.y);
+   this._canvasCtx.setTransform(1,0,0,1,0,0);
},
 
_setCanvasSize: function (widthCSSPx, heightCSSPx) {
@@ -130,7 +131,6 @@ L.CanvasTilePainter = L.Class.extend({
},
 
clear: function () {
-   this._canvasCtx.setTransform(1,0,0,1,0,0);
if (this._layer._debug)
this._canvasCtx.fillStyle = 'rgba(255, 0, 0, 0.5)';
else
@@ -172,20 +172,16 @@ L.CanvasTilePainter = L.Class.extend({
if (!paneBounds.intersects(tileBounds))
continue;
 
-   var topLeft = paneBounds.getTopLeft();
-   if (topLeft.x)
-   topLeft.x = viewBounds.min.x;
-   if (topLeft.y)
-   topLeft.y = viewBounds.min.y;
+   var offset = paneBounds.getTopLeft(); // allocates
+   offset.x = Math.min(offset.x, viewBounds.min.x);
+   offset.y = Math.min(offset.y, viewBounds.min.y);
 
-   this._canvasCtx.setTransform(1,0,
-0,1,
--topLeft.x, -topLeft.y);
-   // when using the pinch to zoom, set additional 
translation based
+   // when using the pinch to zoom, set additional 
translation based */
// on the pinch movement
if (this._map._animatingZoom) {
var centerOffset = 
this._map._getCenterOffset(this._map._animateToCenter);
-   
this._canvasCtx.translate(-Math.round(centerOffset.x), 
-Math.round(centerOffset.y));
+   offset.x += Math.round(centerOffset.x);
+   offset.y += Math.round(centerOffset.y);
}
 
// intersect - to avoid state thrash through clipping
@@ -202,7 +198,8 @@ L.CanvasTilePainter = L.Class.extend({
  crop.min.x - tileBounds.min.x,
  crop.min.y - tileBounds.min.y,
  cropWidth, cropHeight,
- crop.min.x, crop.min.y,
+ crop.min.x - offset.x,
+ crop.min.y - offset.y,
  cropWidth, cropHeight);
if (this._layer._debug)
{
@@ -218,7 +215,6 @@ L.CanvasTilePainter = L.Class.extend({
return;
}
var splitPos = 
this._layer._cssPixelsToCore(splitPanesContext.getSplitPos());
-   this._canvasCtx.setTransform(1,0,0,1,0,0);
this._canvasCtx.strokeStyle = 'red';
this._canvasCtx.strokeRect(0, 0, splitPos.x, splitPos.y);
},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - configure.ac

2020-09-08 Thread Tor Lillqvist (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 944530b46728874766080879f96b123f78ef4e48
Author: Tor Lillqvist 
AuthorDate: Tue Sep 8 08:09:46 2020 +0300
Commit: Miklos Vajna 
CommitDate: Tue Sep 8 17:10:26 2020 +0200

Use PRODUCTNAME_WITHOUT_SPACES for SDKDIRNAME

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

diff --git a/configure.ac b/configure.ac
index 0ffa7979dc39..5924a59ec420 100644
--- a/configure.ac
+++ b/configure.ac
@@ -704,7 +704,7 @@ darwin*) # macOS or iOS
 _os=Darwin
 INSTROOTBASESUFFIX=/$PRODUCTNAME_WITHOUT_SPACES.app
 INSTROOTCONTENTSUFFIX=/Contents
-SDKDIRNAME=${PRODUCTNAME}${PRODUCTVERSION}_SDK
+SDKDIRNAME=${PRODUCTNAME_WITHOUT_SPACES}${PRODUCTVERSION}_SDK
 fi
 # See comment above the case "$host_os"
 LINKFLAGSSHL="-dynamiclib -single_module"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/unx

2020-09-08 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |   17 +
 1 file changed, 17 insertions(+)

New commits:
commit c16a7e629599086610e00fefadfcfc6367195275
Author: Caolán McNamara 
AuthorDate: Sun Sep 6 21:00:48 2020 +0100
Commit: Miklos Vajna 
CommitDate: Tue Sep 8 17:09:33 2020 +0200

tdf#136455 unused ComboBox menu listening to GtkListStore and slowing 
inserts

Since tdf#131120 we don't use the original ComboBox menu, but it's still
listening to additions to the ListStore and slowing things down (tdf#136455)

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index e53e0e6a546b..31d2cf1fc009 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -13777,6 +13777,21 @@ private:
 return true;
 }
 
+// Since tdf#131120 we don't use the original ComboBox menu, but it's still
+// listening to additions to the ListStore and slowing things down 
(tdf#136455)
+void destroy_unused_menu()
+{
+AtkObject* pAtkObj = gtk_combo_box_get_popup_accessible(m_pComboBox);
+if (!pAtkObj)
+return;
+if (!GTK_IS_ACCESSIBLE(pAtkObj))
+return;
+GtkWidget* pWidget = 
gtk_accessible_get_widget(GTK_ACCESSIBLE(pAtkObj));
+if (!pWidget)
+return;
+gtk_widget_destroy(pWidget);
+}
+
 public:
 GtkInstanceComboBox(GtkBuilder* pComboBuilder, GtkComboBox* pComboBox, 
GtkInstanceBuilder* pBuilder, bool bTakeOwnership)
 : 
GtkInstanceContainer(GTK_CONTAINER(gtk_builder_get_object(pComboBuilder, 
"box")), pBuilder, bTakeOwnership)
@@ -13918,6 +13933,8 @@ public:
 gtk_overlay_add_overlay(m_pOverlay, GTK_WIDGET(m_pOverlayButton));
 g_signal_connect(m_pOverlayButton, "leave-notify-event", 
G_CALLBACK(signalOverlayButtonCrossing), this);
 g_signal_connect(m_pOverlayButton, "enter-notify-event", 
G_CALLBACK(signalOverlayButtonCrossing), this);
+
+destroy_unused_menu();
 }
 
 virtual int get_active() const override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/uiwriter/uiwriter3.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 30f59fd86a5e31bee69d837da284b95aad418148
Author: Caolán McNamara 
AuthorDate: Wed Sep 2 20:42:26 2020 +0100
Commit: Miklos Vajna 
CommitDate: Tue Sep 8 17:08:41 2020 +0200

blind fix for testTdf130685 intermittent failure

Change-Id: If6f330ebbe63a5438769fda771d68afb1dcadf2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101977
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 37ee5d5a41c99cddae0652d839539df91f28f35d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101963
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 342c44146936..34db982e195b 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -446,13 +446,16 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130685)
 // Without fix in place, this test would have failed with:
 //- Expected: 2
 //- Actual  : 4
+Scheduler::ProcessEventsToIdle();
 CPPUNIT_ASSERT_EQUAL(2, getPages());
 
 dispatchCommand(mxComponent, ".uno:Undo", {});
 dispatchCommand(mxComponent, ".uno:Undo", {});
+Scheduler::ProcessEventsToIdle();
 CPPUNIT_ASSERT_EQUAL(1, getPages());
 
 dispatchCommand(mxComponent, ".uno:Undo", {});
+Scheduler::ProcessEventsToIdle();
 CPPUNIT_ASSERT_EQUAL(2, getPages());
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Caolán McNamara (via logerrit)
 sc/qa/unit/functions_test.cxx|4 
 sc/source/core/tool/interpr8.cxx |2 ++
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 69b287731c1c4693ab9d2ed696e829a15f01071d
Author: Caolán McNamara 
AuthorDate: Thu Sep 3 11:51:41 2020 +0100
Commit: Miklos Vajna 
CommitDate: Tue Sep 8 17:08:02 2020 +0200

intermittent forecast.ets.add.fods failure

valgrinding the forecast.ets.add.fods failure gives...

a) mnSmplInPrd is 9
b) ScETSForecastCalculation::prefillPerIdx:476 fills mpPerIdx to index 8 
with values.
c) ScETSForecastCalculation::refill:791 (the bAdditive branch)
   due to nIdx = ( i > mnSmplInPrd ? i - mnSmplInPrd : i ) with i of 9 
gives nIdx of 9 and
   uninit mpPerIdx[9] is used in the calculation.
d) At line 799 (the !bAdditive branch)
   due to nIdx = ( i >= mnSmplInPrd ? i - mnSmplInPrd : i ) the nIdx used 
would be 0 not 9
   under the same circumstances

extending the initialization of prefillPerIdx to zeroing out the next index 
gives the same
results as we usually get and test passes without a need to change it while 
avoiding the use
of an uninitialized value.

Change-Id: Ib4629b28ecf2389c0c7611137b756d4d2d9fd700
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101997
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit e3545d491e2a2c4ff609a63385994f0c8d388edf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101961
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sc/qa/unit/functions_test.cxx b/sc/qa/unit/functions_test.cxx
index 1a48c03432d9..16e0a530a5e5 100644
--- a/sc/qa/unit/functions_test.cxx
+++ b/sc/qa/unit/functions_test.cxx
@@ -40,10 +40,6 @@ bool FunctionsTest::load(const OUString& rFilter, const 
OUString& rURL,
 
 ScDocument& rDoc = xDocShRef->GetDocument();
 
-#ifdef __APPLE__
-// FIXME tends to fail a lot
-if (!rURL.endsWith("forecast.ets.add.fods"))
-#endif
 CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, rDoc.GetValue(1, 2, 0), 1e-14);
 
 xDocShRef->DoClose();
diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 92ea9ab1ac11..d380a057176b 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -475,6 +475,8 @@ bool ScETSForecastCalculation::prefillPerIdx()
 }
 mpPerIdx[ j ] = fI / nPeriods;
 }
+if (mnSmplInPrd < mnCount)
+mpPerIdx[mnSmplInPrd] = 0.0;
 }
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Caolán McNamara (via logerrit)
 sd/qa/uitest/impress_tests/tdf130440.py |   15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

New commits:
commit ab12dfe7c09aef537a82d35f2f9e51bcd8205fdf
Author: Caolán McNamara 
AuthorDate: Wed Sep 2 20:49:06 2020 +0100
Commit: Miklos Vajna 
CommitDate: Tue Sep 8 17:07:06 2020 +0200

blind fix for tdf129346 test intermittent failure

Change-Id: Ib3bc0ce0bdeee01c3c752d935e195f677b6f6d4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101978
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 3b0f53beed3e0e21b0fc4d8efc38d404637404a0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101962
Reviewed-by: Miklos Vajna 

diff --git a/sd/qa/uitest/impress_tests/tdf130440.py 
b/sd/qa/uitest/impress_tests/tdf130440.py
index 31bf83c196ea..348feb33c0fa 100644
--- a/sd/qa/uitest/impress_tests/tdf130440.py
+++ b/sd/qa/uitest/impress_tests/tdf130440.py
@@ -15,9 +15,12 @@ class tdf129346(UITestCase):
 xCancelBtn = xTemplateDlg.getChild("cancel")
 self.ui_test.close_dialog_through_button(xCancelBtn)
 
+xToolkit = 
self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
+
 document = self.ui_test.get_component()
 self.assertEqual(document.CurrentController.getCurrentPage().Number, 1)
 self.xUITest.executeCommand(".uno:DuplicatePage")
+xToolkit.processEventsToIdle()
 self.assertEqual(document.CurrentController.getCurrentPage().Number, 2)
 
 xDoc = self.xUITest.getTopFocusWindow()
@@ -25,20 +28,28 @@ class tdf129346(UITestCase):
 xEdit.executeAction("TYPE", mkPropertyValues({"TEXT":"test"}))
 
 self.xUITest.executeCommand(".uno:Undo")
+xToolkit.processEventsToIdle()
 self.assertEqual(document.CurrentController.getCurrentPage().Number, 2)
+
 self.xUITest.executeCommand(".uno:Undo")
+xToolkit.processEventsToIdle()
 self.assertEqual(document.CurrentController.getCurrentPage().Number, 2)
+
 self.xUITest.executeCommand(".uno:Undo")
+xToolkit.processEventsToIdle()
 self.assertEqual(document.CurrentController.getCurrentPage().Number, 1)
+
 self.xUITest.executeCommand(".uno:Redo")
-# usually passes, but sometimes it asserts with AssertionError: 1 != 2
-#self.assertEqual(document.CurrentController.getCurrentPage().Number, 
2)
+xToolkit.processEventsToIdle()
+self.assertEqual(document.CurrentController.getCurrentPage().Number, 2)
+
 self.xUITest.executeCommand(".uno:Redo")
 
 xDoc = self.xUITest.getTopFocusWindow()
 xEdit = xDoc.getChild("impress_win")
 xEdit.executeAction("TYPE", mkPropertyValues({"TEXT":"test"}))
 
+xToolkit.processEventsToIdle()
 #Without the accompanying fix in place, it would fail with 
AssertionError: 2 != 1
 self.assertEqual(document.CurrentController.getCurrentPage().Number, 2)
 self.ui_test.close_doc()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'feature/calc-canvas' - 2 commits - loleaflet/src

2020-09-08 Thread Michael Meeks (via logerrit)
 loleaflet/src/geometry/Bounds.js|7 ++
 loleaflet/src/layer/tile/CanvasTileLayer.js |   31 
 2 files changed, 30 insertions(+), 8 deletions(-)

New commits:
commit 02ff5aba43627e28b1ebf3726a370305edf97780
Author: Michael Meeks 
AuthorDate: Tue Sep 8 16:03:34 2020 +0100
Commit: Michael Meeks 
CommitDate: Tue Sep 8 16:04:06 2020 +0100

calc canvas: use sub image blitting instead of clipping.

Avoids thrashing the canvas rendering context / clip state.

Change-Id: I547ce22a171874cd7be3a0fac50b4afc56faf084

diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js 
b/loleaflet/src/layer/tile/CanvasTileLayer.js
index 9f6f4c42b..c44e2ae47 100644
--- a/loleaflet/src/layer/tile/CanvasTileLayer.js
+++ b/loleaflet/src/layer/tile/CanvasTileLayer.js
@@ -178,7 +178,9 @@ L.CanvasTilePainter = L.Class.extend({
if (topLeft.y)
topLeft.y = viewBounds.min.y;
 
-   this._canvasCtx.setTransform(1,0,0,1,-topLeft.x, 
-topLeft.y);
+   this._canvasCtx.setTransform(1,0,
+0,1,
+-topLeft.x, -topLeft.y);
// when using the pinch to zoom, set additional 
translation based
// on the pinch movement
if (this._map._animatingZoom) {
@@ -186,13 +188,22 @@ L.CanvasTilePainter = L.Class.extend({

this._canvasCtx.translate(-Math.round(centerOffset.x), 
-Math.round(centerOffset.y));
}
 
-   // create a clip for the pane/view.
-   this._canvasCtx.beginPath();
-   var paneSize = paneBounds.getSize();
-   this._canvasCtx.rect(paneBounds.min.x, 
paneBounds.min.y, paneSize.x + 1, paneSize.y + 1);
-   this._canvasCtx.clip();
-
-   this._canvasCtx.drawImage(tile.el, tile.coords.x, 
tile.coords.y);
+   // intersect - to avoid state thrash through clipping
+   var crop = new L.Bounds(tileBounds.min, tileBounds.max);
+   crop.min.x = Math.max(paneBounds.min.x, 
tileBounds.min.x);
+   crop.min.y = Math.max(paneBounds.min.y, 
tileBounds.min.y);
+   crop.max.x = Math.min(paneBounds.max.x, 
tileBounds.max.x);
+   crop.max.y = Math.min(paneBounds.max.y, 
tileBounds.max.y);
+
+   var cropWidth = crop.max.x - crop.min.x;
+   var cropHeight = crop.max.y - crop.min.y;
+
+   this._canvasCtx.drawImage(tile.el,
+ crop.min.x - tileBounds.min.x,
+ crop.min.y - tileBounds.min.y,
+ cropWidth, cropHeight,
+ crop.min.x, crop.min.y,
+ cropWidth, cropHeight);
if (this._layer._debug)
{
this._canvasCtx.strokeStyle = 'rgba(255, 0, 0, 
0.5)';
commit 53f3ef5bfb21d5a2ff0c61dd6500ca4c850a821a
Author: Michael Meeks 
AuthorDate: Tue Sep 8 16:03:15 2020 +0100
Commit: Michael Meeks 
CommitDate: Tue Sep 8 16:04:06 2020 +0100

calc canvas: round view co-ordinates to the real pixels we need.

Change-Id: I768cd9015da1f1301f3ddad242130d4eddb426d1

diff --git a/loleaflet/src/geometry/Bounds.js b/loleaflet/src/geometry/Bounds.js
index 8dacdc832..e9ac075e8 100644
--- a/loleaflet/src/geometry/Bounds.js
+++ b/loleaflet/src/geometry/Bounds.js
@@ -83,6 +83,13 @@ L.Bounds.prototype = {
(this.min.y + this.max.y) / 2, round);
},
 
+   round: function() {
+   this.min.x = Math.round(this.min.x);
+   this.min.y = Math.round(this.min.y);
+   this.max.x = Math.round(this.max.x);
+   this.max.y = Math.round(this.max.y);
+   },
+
getBottomLeft: function () { // -> Point
return new L.Point(this.min.x, this.max.y);
},
diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js 
b/loleaflet/src/layer/tile/CanvasTileLayer.js
index 5a030050a..9f6f4c42b 100644
--- a/loleaflet/src/layer/tile/CanvasTileLayer.js
+++ b/loleaflet/src/layer/tile/CanvasTileLayer.js
@@ -165,6 +165,10 @@ L.CanvasTilePainter = L.Class.extend({
var paneBounds = 
this._layer._cssBoundsToCore(ctx.paneBoundsList[i]);
var viewBounds = 
this._layer._cssBoundsToCore(ctx.viewBounds);
 
+   // into real pixel-land ...
+   paneBounds.round();
+   viewBounds.round();
+
if (!paneBound

[Libreoffice-commits] online.git: loleaflet/css

2020-09-08 Thread Pedro Pinto Silva (via logerrit)
 loleaflet/css/device-mobile.css   |  117 +---
 loleaflet/css/device-tablet.css   |2 
 loleaflet/css/jquery-ui-lightness.css |2 
 loleaflet/css/jquery.mCustomScrollbar.css |  830 +++---
 loleaflet/css/leaflet-spinner.css |4 
 loleaflet/css/leaflet.css |  423 +++
 loleaflet/css/loleaflet.css   |   67 +-
 loleaflet/css/menubar.css |  304 +-
 loleaflet/css/mobilewizard.css|  102 +--
 loleaflet/css/notebookbar.css |   25 
 loleaflet/css/partsPreviewControl.css |   18 
 loleaflet/css/scrollBar.css   |3 
 loleaflet/css/searchControl.css   |6 
 loleaflet/css/sidebar.css |2 
 loleaflet/css/spreadsheet.css |   46 -
 loleaflet/css/toolbar.css |  514 +-
 loleaflet/css/vex.css |   10 
 loleaflet/css/w2ui-1.5.rc1.css|2 
 18 files changed, 1212 insertions(+), 1265 deletions(-)

New commits:
commit 175ac6e740c38c13d04c1a1717890fcf1eca707b
Author: Pedro Pinto Silva 
AuthorDate: Thu Sep 3 16:41:01 2020 +0200
Commit: Pedro Silva 
CommitDate: Tue Sep 8 17:02:30 2020 +0200

CSS lint: Code refactoring

- Detected many duplicated selectors within the same file (squashed them)
- Detected inconsistency (sometimes spaces sometimes tabs). Tabify as in JS.
- Detected quotes' inconsistency (sometimes none, sometimes '', sometimes 
""). Use '' as in JS
- Avoid touching on files from 3rd party sources (jquery, w2ui), ignore 
files

Change-Id: Idd82945f29ac6c5c9f522e5d5df4a783a367654d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102009
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pedro Silva 

diff --git a/loleaflet/css/device-mobile.css b/loleaflet/css/device-mobile.css
index 890c0d612..935bf088f 100644
--- a/loleaflet/css/device-mobile.css
+++ b/loleaflet/css/device-mobile.css
@@ -33,7 +33,7 @@ input#follow-checkbox {
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-  }
+}
 .checkmark {
position: absolute;
top: 0;
@@ -42,11 +42,9 @@ input#follow-checkbox {
width: 25px;
 }
 .checkmark:after {
-   content: "";
+   content: '';
position: absolute;
display: none;
-}
-.checkmark:after {
left: 9px;
top: 5px;
width: 5px;
@@ -56,7 +54,7 @@ input#follow-checkbox {
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
-  }
+}
 input#follow-checkbox:checked ~ .checkmark:after {
display: block;
 }
@@ -102,63 +100,64 @@ div#w2ui-overlay-actionbar.w2ui-overlay{
 
 /* Related to menubar.css */
 .document-logo {
-width: 35px;
-height: 38px;
+   width: 35px;
+   height: 38px;
 }
 
 #document-titlebar {
-display: none;
+   display: none;
 }
 
 .document-title {
-display: none;
+   display: none;
 }
 
 /* hide the menu in mobile view */
 #main-menu-state:not(:checked) ~ #main-menu {
-display: none;
+   display: none;
 }
 
 .main-menu-btn {
-display: inline-block;
+   display: inline-block;
 }
 
 .main-nav {
-position: absolute;
-height: 0;
-width: 100%;
-top: 37px; /*set equal to toolbar up's height*/
-margin: 0;
--webkit-overflow-scrolling: touch;
-overflow: scroll;
-z-index: 1010;
-bottom: 34px !important;
-background-color: #0050;
+   position: absolute;
+   height: 0;
+   width: 100%;
+   top: 37px; /*set equal to toolbar up's height*/
+   margin: 0;
+   -webkit-overflow-scrolling: touch;
+   overflow: scroll;
+   z-index: 1010;
+   bottom: 34px !important;
+   background-color: #0050;
+   display: block !important; /* Show menubar even if folded */
 }
 
 #main-menu {
-   position: relative;
-   top: 0;
-   width: 70%;
-   float: right;
-   background-color: white;
-   height: 100%;
+   position: relative;
+   top: 0;
+   width: 70%;
+   float: right;
+   background-color: white;
+   height: 100%;
 }
 
 .writer-icon-img {
-background-size: 35px 35px;
+   background-size: 35px 35px;
 }
 
 .calc-icon-img {
-background-size: 35px 35px;
+   background-size: 35px 35px;
 }
 
 .impress-icon-img {
-background-size: 35px 35px;
+   background-size: 35px 35px;
 }
 
 #document-name-input {
-display: none;
+   display: none;
 }
 
 /* Related to scollBar.css */
@@ -224,24 +223,6 @@ div#w2ui-overlay-actionbar.w2ui-overlay{
top: 95px !important;
}
 }
-#spreadsheet-toolbar {
-   bottom: 0;
-}
-
-.spreadsheet-tabs-container {
-   bottom: 0;
-}
-
-#spreadsheet-row-column-frame.readonly {
-   top: 37px !important;
-}
-#document-container.spreadsheet-document.readonly {
-   top: 57px !important

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

2020-09-08 Thread Samuel Mehrbrodt (via logerrit)
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 497180d86055dd532b66b8b11d2f86e4168182cc
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 8 16:48:47 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Sep 8 16:48:47 2020 +0200

Fix build

after 1f7a2f913af1173d22a1bb1c9e2d014226f6c4d5

Change-Id: I19e2385e17c72a5767476a02bed4de9ca1971167

diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 
b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 7edf92536e86..5be9bd0d603f 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -626,7 +626,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 
 if ( bSigValid )
 {
-if (maSignatureManager.getStore().is())
+if (maSignatureManager.mxStore.is())
 {
 // XML based.
 bSigValid = 
DocumentSignatureHelper::checkIfAllFilesAreSigned(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Maxim Monastirsky (via logerrit)
 framework/source/uiconfiguration/ImageList.cxx |9 -
 framework/source/uiconfiguration/ImageList.hxx |1 -
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 8ef781e68f66a9bf7501ef82ee5625b3758b6c88
Author: Maxim Monastirsky 
AuthorDate: Mon Sep 7 23:25:50 2020 +0300
Commit: Maxim Monastirsky 
CommitDate: Tue Sep 8 16:47:38 2020 +0200

tdf#130445 Use actual icon size

maImageSize was always 0x0, unless the image list was
first loaded from a correctly saved file. Just drop it,
and use the actual size of the first icon of the list.

Change-Id: Ifcda130ed1acdde7ce53dda6f4e1b3636be2bb03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102224
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/framework/source/uiconfiguration/ImageList.cxx 
b/framework/source/uiconfiguration/ImageList.cxx
index dfe936b50abd..8e775aeda62d 100644
--- a/framework/source/uiconfiguration/ImageList.cxx
+++ b/framework/source/uiconfiguration/ImageList.cxx
@@ -44,16 +44,16 @@ BitmapEx ImageList::GetAsHorizontalStrip() const
 sal_uInt16 nCount = maImages.size();
 if( !nCount )
 return BitmapEx();
-Size aSize( maImageSize.Width() * nCount, maImageSize.Height() );
 
 BitmapEx aTempl = maImages[ 0 ]->maImage.GetBitmapEx();
+Size aImageSize(aTempl.GetSizePixel());
+Size aSize(aImageSize.Width() * nCount, aImageSize.Height());
 BitmapEx aResult( aTempl, Point(), aSize );
 
-tools::Rectangle aSrcRect( Point( 0, 0 ), maImageSize );
+tools::Rectangle aSrcRect( Point( 0, 0 ), aImageSize );
 for (sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++)
 {
-tools::Rectangle aDestRect( Point( nIdx * maImageSize.Width(), 0 ),
- maImageSize );
+tools::Rectangle aDestRect( Point( nIdx * aImageSize.Width(), 0 ), 
aImageSize );
 ImageAryData *pData = maImages[ nIdx ].get();
 BitmapEx aTmp = pData->maImage.GetBitmapEx();
 aResult.CopyPixel( aDestRect, aSrcRect, &aTmp);
@@ -77,7 +77,6 @@ void ImageList::InsertFromHorizontalStrip( const BitmapEx 
&rBitmapEx,
 maImages.clear();
 maNameHash.clear();
 maImages.reserve( nItems );
-maImageSize = aSize;
 maPrefix.clear();
 
 for (sal_uInt16 nIdx = 0; nIdx < nItems; nIdx++)
diff --git a/framework/source/uiconfiguration/ImageList.hxx 
b/framework/source/uiconfiguration/ImageList.hxx
index 7a7af3d1bb63..946805f6cdd2 100644
--- a/framework/source/uiconfiguration/ImageList.hxx
+++ b/framework/source/uiconfiguration/ImageList.hxx
@@ -65,7 +65,6 @@ private:
 std::vector< std::unique_ptr >   maImages;
 std::unordered_map< OUString, ImageAryData * > maNameHash;
 OUString   maPrefix;
-Size   maImageSize;
 
 sal_uInt16  ImplGetImageId( const OUString& rImageName ) const;
 void ImplAddImage( const OUString &aPrefix, const OUString &aName, 
sal_uInt16 nId, const Image &aImage );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/integration_tests

2020-09-08 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b027150707a388ce4cbddca7dc8bcdd64ac345e0
Author: Tamás Zolnai 
AuthorDate: Fri Sep 4 14:35:39 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Sep 8 16:39:58 2020 +0200

cypress: disable unstable test.

Change-Id: I3358c38d11692bcd7e08aa79fd6a9e95c6509654
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102259
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js 
b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
index e9457a3e9..6f3748ed6 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -190,7 +190,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('have.attr', 'stroke', 'rgb(152,0,0)');
});
 
-   it('Change line style', function() {
+   it.skip('Change line style', function() {
openLinePropertyPanel();
 
helper.clickOnIdle('#linestyle');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'feature/calc-canvas' - loleaflet/css loleaflet/src

2020-09-08 Thread Szymon Kłos (via logerrit)
 loleaflet/css/device-mobile.css |9 -
 loleaflet/css/toolbar-mobile.css|1 +
 loleaflet/css/toolbar.css   |1 -
 loleaflet/src/control/Control.FormulaBar.js |   11 ++-
 loleaflet/src/control/Control.LokDialog.js  |   18 ++
 loleaflet/src/map/Map.js|   16 +---
 6 files changed, 30 insertions(+), 26 deletions(-)

New commits:
commit dd300b2e81679060ee1a2cbc7b8b23272c13cdb7
Author: Szymon Kłos 
AuthorDate: Tue Sep 8 16:30:13 2020 +0200
Commit: Szymon Kłos 
CommitDate: Tue Sep 8 16:34:32 2020 +0200

Fix formulabar on mobile

Don't cover column headers. Show/hide on permission change.

Change-Id: Iedb1aa38e722f8fe90d8246cc030a0b7949d1be2

diff --git a/loleaflet/css/device-mobile.css b/loleaflet/css/device-mobile.css
index c12126a04..f8477cf38 100644
--- a/loleaflet/css/device-mobile.css
+++ b/loleaflet/css/device-mobile.css
@@ -189,15 +189,6 @@ div#w2ui-overlay-actionbar.w2ui-overlay{
 }
 
 /* Related to selectionMarkers.css */
-#tb_formulabar_item_formula, #tb_formulabar_item_address {
-   height: 54px !important;
-}
-#tb_formulabar_item_formula > div, #tb_formulabar_item_address > div {
-   margin-top: -16px;
-}
-#tb_formulabar_item_functiondialog > div {
-   margin-top: -20px;
-}
 .inputbar_multiline #tb_formulabar_item_formula > div,
 .inputbar_multiline #tb_formulabar_item_address > div {
margin-top:0px;
diff --git a/loleaflet/css/toolbar-mobile.css b/loleaflet/css/toolbar-mobile.css
index 59c308ec7..19168e2c9 100644
--- a/loleaflet/css/toolbar-mobile.css
+++ b/loleaflet/css/toolbar-mobile.css
@@ -5,6 +5,7 @@
}
#toolbar-wrapper{
border-top: none;
+   top: 0px;
}
#toolbar-up{
top:-1px;
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 74272cb03..0cfb9aaf4 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -84,7 +84,6 @@ w2ui-toolbar {
 
 #formulabar {
border-top: 1px solid #bb;
-   height: 30px;
 }
 
 #presentation-toolbar {
diff --git a/loleaflet/src/control/Control.FormulaBar.js 
b/loleaflet/src/control/Control.FormulaBar.js
index 60fd848d9..e6bcfcb4b 100644
--- a/loleaflet/src/control/Control.FormulaBar.js
+++ b/loleaflet/src/control/Control.FormulaBar.js
@@ -93,7 +93,10 @@ L.Control.FormulaBar = L.Control.extend({
onDocLayerInit: function() {
var docType = this.map.getDocType();
if (docType == 'spreadsheet') {
-   $('#formulabar').show();
+   if (window.mode.isMobile())
+   $('#formulabar').hide();
+   else
+   $('#formulabar').show();
}
},
 
@@ -102,6 +105,10 @@ L.Control.FormulaBar = L.Control.extend({
var toolbar = w2ui.formulabar;
 
if (e.perm === 'edit') {
+   $('#formulabar').show();
+
+   this.map.dialog.refreshCalcInputBar(0);
+
// Enable formula bar
$('#addressInput').prop('disabled', false);
$('#formulaInput').prop('disabled', false);
@@ -112,6 +119,8 @@ L.Control.FormulaBar = L.Control.extend({
});
}
} else {
+   $('#formulabar').hide();
+
// Disable formula bar
$('#addressInput').prop('disabled', true);
$('#formulaInput').prop('disabled', true);
diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index c1abe867f..892306e03 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -929,6 +929,24 @@ L.Control.LokDialog = L.Control.extend({
}
},
 
+   refreshCalcInputBar: function(deckOffset) {
+   if (this._calcInputBar && !this._calcInputBar.isPainting) {
+   var id = this._calcInputBar.id;
+   var calcInputbar = L.DomUtil.get('calc-inputbar');
+   if (calcInputbar) {
+   var calcInputbarContainer = 
calcInputbar.children[0];
+   if (calcInputbarContainer) {
+   var width = 
calcInputbarContainer.clientWidth - deckOffset;
+   var height = 
calcInputbarContainer.clientHeight;
+   if (width > 0 && height > 0) {
+   console.log('_onResize: 
container width: ' + width + ', container height: ' + height + ', _calcInputBar 
width: ' + this._calcInputBar.width);
+   
t

[Libreoffice-commits] online.git: Branch 'feature/calc-canvas' - loleaflet/src

2020-09-08 Thread Michael Meeks (via logerrit)
 loleaflet/src/layer/tile/CanvasTileLayer.js |   14 +++---
 1 file changed, 3 insertions(+), 11 deletions(-)

New commits:
commit c1c1ae1a395abc54d279487560e4fa5fac5c5af6
Author: Michael Meeks 
AuthorDate: Tue Sep 8 15:25:09 2020 +0100
Commit: Michael Meeks 
CommitDate: Tue Sep 8 15:25:09 2020 +0100

calc canvas: avoid lots of canvas context save/restores.

Change-Id: Ib813686ef7d495e660ad8fa3b545391180b9e019

diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js 
b/loleaflet/src/layer/tile/CanvasTileLayer.js
index 4a35b4939..5a030050a 100644
--- a/loleaflet/src/layer/tile/CanvasTileLayer.js
+++ b/loleaflet/src/layer/tile/CanvasTileLayer.js
@@ -130,14 +130,12 @@ L.CanvasTilePainter = L.Class.extend({
},
 
clear: function () {
-   this._canvasCtx.save();
-   this._canvasCtx.scale(1, 1);
+   this._canvasCtx.setTransform(1,0,0,1,0,0);
if (this._layer._debug)
this._canvasCtx.fillStyle = 'rgba(255, 0, 0, 0.5)';
else
this._canvasCtx.fillStyle = 'white';
this._canvasCtx.fillRect(0, 0, this._width, this._height);
-   this._canvasCtx.restore();
},
 
// Details of tile areas to render
@@ -176,10 +174,7 @@ L.CanvasTilePainter = L.Class.extend({
if (topLeft.y)
topLeft.y = viewBounds.min.y;
 
-   this._canvasCtx.save();
-   this._canvasCtx.scale(1, 1);
-   this._canvasCtx.translate(-topLeft.x, -topLeft.y);
-
+   this._canvasCtx.setTransform(1,0,0,1,-topLeft.x, 
-topLeft.y);
// when using the pinch to zoom, set additional 
translation based
// on the pinch movement
if (this._map._animatingZoom) {
@@ -199,7 +194,6 @@ L.CanvasTilePainter = L.Class.extend({
this._canvasCtx.strokeStyle = 'rgba(255, 0, 0, 
0.5)';
this._canvasCtx.strokeRect(tile.coords.x, 
tile.coords.y, 256, 256);
}
-   this._canvasCtx.restore();
}
},
 
@@ -209,11 +203,9 @@ L.CanvasTilePainter = L.Class.extend({
return;
}
var splitPos = 
this._layer._cssPixelsToCore(splitPanesContext.getSplitPos());
-   this._canvasCtx.save();
-   this._canvasCtx.scale(1, 1);
+   this._canvasCtx.setTransform(1,0,0,1,0,0);
this._canvasCtx.strokeStyle = 'red';
this._canvasCtx.strokeRect(0, 0, splitPos.x, splitPos.y);
-   this._canvasCtx.restore();
},
 
_updateWithRAF: function () {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: New Defects reported by Coverity Scan for LibreOffice

2020-09-08 Thread Stephan Bergmann

On 08/09/2020 11:13, scan-ad...@coverity.com wrote:
[...]

** CID 141:  Parse warnings  (PARSE_ERROR)
/dbaccess/source/ui/dlg/dbfindex.cxx: 39 in ()



*** CID 141:  Parse warnings  (PARSE_ERROR)
/dbaccess/source/ui/dlg/dbfindex.cxx: 39 in ()
33 namespace dbaui
34 {
35 using namespace ::com::sun::star::uno;
36 using namespace ::com::sun::star::ucb;
37 using namespace ::svt;
38

 CID 141:  Parse warnings  (PARSE_ERROR)
 class template name must be a placeholder for the complete type being 
initialized (not for a component of that type)

39 const OStringLiteral aGroupIdent("dBase III");
40
41
42 ODbaseIndexDialog::ODbaseIndexDialog(weld::Window * pParent, const 
OUString& aDataSrcName)
43 : GenericDialogController(pParent, "dbaccess/ui/dbaseindexdialog.ui", 
"DBaseIndexDialog")
44 , m_aDSN(aDataSrcName)


[...]

** CID 1466653:  Parse warnings  (PARSE_ERROR)
/oox/source/vml/vmlinputstream.cxx: 267 in ()



*** CID 1466653:  Parse warnings  (PARSE_ERROR)
/oox/source/vml/vmlinputstream.cxx: 267 in ()
261 return bHasBracket;
262 }
263
264 } // namespace
265
266 const OStringLiteral gaOpeningCData( "" );
268
269 InputStream::InputStream( const Reference< XComponentContext >& rxContext, const 
Reference< XInputStream >& rxInStrm ) :
270 // use single-byte ISO-8859-1 encoding which maps all byte 
characters to the first 256 Unicode characters
271 mxTextStrm( TextInputStream::createXTextInputStream( rxContext, 
rxInStrm, RTL_TEXTENCODING_ISO_8859_1 ) ),
272 maOpeningBracket( 1 ),


[...]

** CID 1466650:  Parse warnings  (PARSE_ERROR)
/oox/source/vml/vmlinputstream.cxx: 266 in ()



*** CID 1466650:  Parse warnings  (PARSE_ERROR)
/oox/source/vml/vmlinputstream.cxx: 266 in ()
260
261 return bHasBracket;
262 }
263
264 } // namespace
265

 CID 1466650:  Parse warnings  (PARSE_ERROR)
 class template name must be a placeholder for the complete type being 
initialized (not for a component of that type)

266 const OStringLiteral gaOpeningCData( "" );
268
269 InputStream::InputStream( const Reference< XComponentContext >& rxContext, const 
Reference< XInputStream >& rxInStrm ) :
270 // use single-byte ISO-8859-1 encoding which maps all byte 
characters to the first 256 Unicode characters
271 mxTextStrm( TextInputStream::createXTextInputStream( rxContext, 
rxInStrm, RTL_TEXTENCODING_ISO_8859_1 ) ),

** CID 1466649:  Parse warnings  (PARSE_ERROR)
/idlc/source/astdeclaration.cxx: 25 in ()



*** CID 1466649:  Parse warnings  (PARSE_ERROR)
/idlc/source/astdeclaration.cxx: 25 in ()
19
20 #include 
21 #include 
22 #include 
23 #include 
24

 CID 1466649:  Parse warnings  (PARSE_ERROR)
 class template name must be a placeholder for the complete type being 
initialized (not for a component of that type)

25 const OStringLiteral sGlobal("::");
26
27 static OString convertName(const OString& name)
28 {
29 OStringBuffer nameBuffer(name.getLength()+1);
30 sal_Int32 nIndex = 0;

I have contacted Coverity about the above PARSE_ERROR problem.

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


[Libreoffice-commits] core.git: configure.ac sysui/desktop

2020-09-08 Thread Tor Lillqvist (via logerrit)
 configure.ac   |   22 ++
 sysui/desktop/macosx/Info.plist.in |4 ++--
 2 files changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 271297d4fa4a8e045b6dc04942966a1058bed45c
Author: Tor Lillqvist 
AuthorDate: Tue Sep 8 13:19:48 2020 +0300
Commit: Tor Lillqvist 
CommitDate: Tue Sep 8 15:25:27 2020 +0200

Follow the rules when building for the App Store

Apple does enforce that CFBundleVersion and CFBundleShortVersionString
consist of three integers. So make sure that is the case when building
for the App Store. (We infer that when using --enable-macosx-sandbox
we are building for the App Store. So far that is true.)

Change-Id: I677b28f65aa9be9466811a982023e0932dce0893
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102237
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/configure.ac b/configure.ac
index d4e6caa84aae..4a48eea2de28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,6 +209,7 @@ LIBO_VERSION_MICRO=$3
 LIBO_VERSION_PATCH=$4
 
 LIBO_VERSION_SUFFIX=$5
+
 # Split out LIBO_VERSION_SUFFIX_SUFFIX... horrible crack. But apparently 
wanted separately in
 # openoffice.lst as ABOUTBOXPRODUCTVERSIONSUFFIX. Note that the double 
brackets are for m4's sake,
 # they get undoubled before actually passed to sed.
@@ -217,12 +218,33 @@ test -n "$LIBO_VERSION_SUFFIX_SUFFIX" && 
LIBO_VERSION_SUFFIX="${LIBO_VERSION_SUF
 # LIBO_VERSION_SUFFIX, if non-empty, should include the period separator
 test -n "$LIBO_VERSION_SUFFIX" && LIBO_VERSION_SUFFIX=".$LIBO_VERSION_SUFFIX"
 
+# The value for key CFBundleVersion in the Info.plist file must be a 
period-separated list of at most
+# three non-negative integers. Please find more information about 
CFBundleVersion at
+# 
https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion
+
+# The value for key CFBundleShortVersionString in the Info.plist file must be 
a period-separated list
+# of at most three non-negative integers. Please find more information about
+# CFBundleShortVersionString at
+# 
https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring
+
+# But that is enforced only in the App Store, and we apparently want to break 
the rules otherwise.
+
+if test "$enable_macosx_sandbox" = yes; then
+MACOSX_BUNDLE_SHORTVERSION=$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR.`expr 
$LIBO_VERSION_MICRO '*' 1000 + $LIBO_VERSION_PATCH`
+MACOSX_BUNDLE_VERSION=$MACOSX_BUNDLE_SHORTVERSION
+else
+
MACOSX_BUNDLE_SHORTVERSION=$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR.$LIBO_VERSION_MICRO.$LIBO_VERSION_PATCH
+
MACOSX_BUNDLE_VERSION=$MACOSX_BUNDLE_SHORTVERSION$LIBO_VERSION_SUFFIX_SUFFIX
+fi
+
 AC_SUBST(LIBO_VERSION_MAJOR)
 AC_SUBST(LIBO_VERSION_MINOR)
 AC_SUBST(LIBO_VERSION_MICRO)
 AC_SUBST(LIBO_VERSION_PATCH)
 AC_SUBST(LIBO_VERSION_SUFFIX)
 AC_SUBST(LIBO_VERSION_SUFFIX_SUFFIX)
+AC_SUBST(MACOSX_BUNDLE_SHORTVERSION)
+AC_SUBST(MACOSX_BUNDLE_VERSION)
 
 AC_DEFINE_UNQUOTED(LIBO_VERSION_MAJOR,$LIBO_VERSION_MAJOR)
 AC_DEFINE_UNQUOTED(LIBO_VERSION_MINOR,$LIBO_VERSION_MINOR)
diff --git a/sysui/desktop/macosx/Info.plist.in 
b/sysui/desktop/macosx/Info.plist.in
index d3051905058d..a87895078135 100644
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -1921,9 +1921,9 @@
 CFBundleIconFile
 main.icns
 CFBundleShortVersionString
-
@LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@.@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@
+@MACOSX_BUNDLE_SHORTVERSION@
 CFBundleVersion
-
@LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@.@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@
+@MACOSX_BUNDLE_VERSION@
 CFBundleIdentifier
 @MACOSX_BUNDLE_IDENTIFIER@
 CFBundleInfoDictionaryVersion
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Olivier Hallot (via logerrit)
 source/text/scalc/01/04060199.xhp   |  153 ++---
 source/text/swriter/02/1402.xhp |  412 +++-
 2 files changed, 342 insertions(+), 223 deletions(-)

New commits:
commit e1165b2f11d933a273f13631e400f9ad5980d134
Author: Olivier Hallot 
AuthorDate: Tue Sep 8 08:39:41 2020 -0300
Commit: Olivier Hallot 
CommitDate: Tue Sep 8 15:19:17 2020 +0200

tdf#136510 New Writer table functions PRODUCT, ABS.

PRODUCT, ABS, COUNT, SIGN

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

diff --git a/source/text/scalc/01/04060199.xhp 
b/source/text/scalc/01/04060199.xhp
index 2928f11e9..5ad22dbed 100644
--- a/source/text/scalc/01/04060199.xhp
+++ b/source/text/scalc/01/04060199.xhp
@@ -1,7 +1,4 @@
 
-
-
-
 
-
-
-   
+
 
 
 Operators in $[officename] Calc
@@ -39,261 +34,261 @@
 comparisons;operators in Calc
 arithmetical operators
 reference operators
-mw added 7 new index entriesOperators in 
$[officename] Calc
+mw added 7 new index entriesOperators in $[officename] Calc
 You can use 
the following operators in $[officename] Calc:
-Arithmetical Operators
+Arithmetical Operators
 These 
operators return numerical results.
 
 
-
+
 Operator
 
-
+
 Name
 
-
-
+
+Example
 
 
 
-
+
 + 
(Plus)
 
-
+
 Addition
 
-
+
 1+1
 
 
 
-
+
 - 
(Minus)
 
-
+
 Subtraction
 
-
+
 2-1
 
 
 
-
+
 - 
(Minus)
 
-
+
 Negation
 
-
+
 -5
 
 
 
-
+
 * 
(asterisk)
 
-
+
 Multiplication
 
-
+
 2*2
 
 
 
-
+
 / 
(Slash)
 
-
+
 Division
 
-
+
 9/3
 
 
 
-
+
 % 
(Percent)
 
-
+
 Percent
 
-
+
 15%
 
 
 
-
+
 ^ 
(Caret)
 
-
+
 Exponentiation
 
-
+
 3^2
 
 
 
-Comparative operators
+Comparative operators
 These 
operators return either true or false.
 
 
-
+
 Operator
 
-
+
 Name
 
-
-
+
+Example
 
 
 
-
+
 = (equal 
sign)
 
-
+
 Equal
 
-
+
 A1=B1
 
 
 
-
+
 > 
(Greater than)
 
-
+
 Greater 
than
 
-
+
 A1>B1
 
 
 
-
+
 < (Less 
than)
 
-
+
 Less 
than
 
-
+
 A1= 
(Greater than or equal to)
 
-
+
 Greater 
than or equal to
 
-
+
 A1>=B1
 
 
 
-
+
 <= (Less 
than or equal to)
 
-
+
 Less than 
or equal to
 
-
+
 A1<=B1
 
 
 
-
+
 <> 
(Inequality)
 
-
+
 Inequality
 
-
+
 A1<>B1
 
 
 
-Text 
operators
+Text operators
 The operator 
combines separate texts into one text.
 
 
-
+
 Operator
 
-
+
 Name
 
-
-
+
+Example
 
 
 
-
+
 & 
(And)
 
-
+
 text concatenation AND
 
 text 
concatenation AND
 
-
+
 "Sun" & 
"day" is "Sunday"
 
 
 
-Reference operators
+Reference operators
 These 
operators return a cell range of zero, one or more cells.
 Range has the 
highest precedence, then intersection, and then finally union.
 
 
-
+
 Operator
 
-
+
 Name
 
-
-
+
+Example
 
 
 
-
+
 : 
(Colon)
 
-
+
 Range
 
-
+
 A1:C108
 
 
 
-
+
 ! 
(Exclamation point)
 
-
+
 intersection operator
 
 Intersection
 
-
+
 SUM(A1:B6!B5:C12)
 Calculates 
the sum of all cells in the intersection; in this example, the result yields 
the sum of cells B5 and B6.
 
 
 
-
+
 ~ 
(Tilde)
 
-
+
 Concatenation or union
 
-
+
 Takes two 
references and returns a reference list, which is a concatenation of the left 
reference followed by the right reference. Double entries are referenced twice. 
See note below this table.
 
 
 
-Reference 
concatenation using a tilde character was implemented lately. When a formula 
with the tilde operator exists in a document that is opened in old versions of 
the software, an error is returned. A reference list is not allowed inside an 
array expression.
+Reference concatenation using a tilde character was 
implemented lately. When a formula with the tilde operator exists in a document 
that is opened in old versions of the software, an error is returned. A 
reference list is not allowed inside an array expression.
 
 
diff --git a/source/text/swriter/02/1402.xhp 
b/source/text/swriter/02/1402.xhp
index 4526bdf4e..0a6578132 100644
--- a/source/text/swriter/02/1402.xhp
+++ b/source/text/swriter/02/1402.xhp
@@ -1,7 +1,4 @@
 
-
-
-
 
-
-
-   
+
 
 
 Formula
@@ -30,505 +25,634 @@
 
 
 
-operators; in formulas
-statistical functions
-trigonometric functions
-pages;number of
-variables;document properties
+
+formulas; in text documents
+operators; in table formulas
+statistical functions in tables
+mathematical functions in tables
+trigonometric functions in tables
+pages;number of pages in table formulas
+variables;document properties in table 
formulas
 arithmetical operators in formulas
 
 
 
 
-Formula
+Formula
 Opens a submenu, from which you can insert a formula into the cell of a 
table. Place the cursor in a cell in the table or at the position in 
the document where you want the result to appear. Click the Formula 
icon and choose the desired formula from the submenu.
 
 The formula 
appears in the input line. To specify a range of cells in a table, select the 
desired cells with the mouse. The correspon

[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 055c959091e8edcf8396717908b58d87da4c01a3
Author: Olivier Hallot 
AuthorDate: Tue Sep 8 10:19:17 2020 -0300
Commit: Gerrit Code Review 
CommitDate: Tue Sep 8 15:19:17 2020 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to e1165b2f11d933a273f13631e400f9ad5980d134
  - tdf#136510 New Writer table functions PRODUCT, ABS.

PRODUCT, ABS, COUNT, SIGN

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

diff --git a/helpcontent2 b/helpcontent2
index 5b2fdb324ae6..e1165b2f11d9 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 5b2fdb324ae69febd7af11b10ce6882d98894ebd
+Subproject commit e1165b2f11d933a273f13631e400f9ad5980d134
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Caolán McNamara (via logerrit)
 basic/source/runtime/methods.cxx |3 +--
 include/vcl/vclenum.hxx  |3 ++-
 vcl/source/window/layout.cxx |9 -
 vcl/unx/gtk3/gtk3gtkinst.cxx |3 +++
 4 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 50761e3c3da45772473f3329d5a7519b34fb1106
Author: Caolán McNamara 
AuthorDate: Tue Sep 8 11:17:45 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 8 15:16:41 2020 +0200

tdf#134477 add VclMessageType::Other to indicate image-less generic InfoBox

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

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 91c279d477b4..78dcbf5097d6 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -4380,7 +4380,7 @@ void SbRtl_MsgBox(StarBASIC *, SbxArray & rPar, bool)
 vcl::Window* pParentWin = Application::GetDefDialogParent();
 weld::Widget* pParent = pParentWin ? pParentWin->GetFrameWeld() : nullptr;
 
-VclMessageType eType = VclMessageType::Info;
+VclMessageType eType = VclMessageType::Other;
 
 switch (nDialogType)
 {
@@ -4394,7 +4394,6 @@ void SbRtl_MsgBox(StarBASIC *, SbxArray & rPar, bool)
 eType = VclMessageType::Warning;
 break;
 case 64:
-default:
 eType = VclMessageType::Info;
 break;
 }
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index 59f0cb3c9f39..3e8fb266610b 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -258,7 +258,8 @@ enum class VclMessageType
 Info,
 Warning,
 Question,
-Error
+Error,
+Other
 };
 
 enum class VclSizeGroupMode
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index d6b9247b73ed..917723b0c297 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2221,11 +2221,13 @@ void MessageDialog::create_message_area()
 case VclMessageType::Error:
 m_pImage->SetImage(GetStandardErrorBoxImage());
 break;
+case VclMessageType::Other:
+break;
 }
 m_pImage->set_grid_left_attach(0);
 m_pImage->set_grid_top_attach(0);
 m_pImage->set_valign(VclAlign::Start);
-m_pImage->Show();
+m_pImage->Show(m_eMessageType != VclMessageType::Other);
 
 WinBits nWinStyle = WB_CLIPCHILDREN | WB_LEFT | WB_VCENTER | WB_NOLABEL | 
WB_NOTABSTOP;
 
@@ -2376,6 +2378,9 @@ MessageDialog::MessageDialog(vcl::Window* pParent,
 case VclMessageType::Error:
 SetText(GetStandardErrorBoxText());
 break;
+case VclMessageType::Other:
+SetText(Application::GetDisplayName());
+break;
 }
 }
 
@@ -2445,6 +2450,8 @@ bool MessageDialog::set_property(const OString &rKey, 
const OUString &rValue)
 eMode = VclMessageType::Question;
 else if (rValue == "error")
 eMode = VclMessageType::Error;
+else if (rValue == "other")
+eMode = VclMessageType::Other;
 else
 {
 SAL_WARN("vcl.layout", "unknown message type mode" << rValue);
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 8a15f98530d7..5e7f09c22a76 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -5597,6 +5597,9 @@ static GtkMessageType VclToGtk(VclMessageType eType)
 case VclMessageType::Error:
 eRet = GTK_MESSAGE_ERROR;
 break;
+case VclMessageType::Other:
+eRet = GTK_MESSAGE_OTHER;
+break;
 }
 return eRet;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


New Defects reported by Coverity Scan for LibreOffice

2020-09-08 Thread scan-admin
Hi,

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

18 new defect(s) introduced to LibreOffice found with Coverity Scan.


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


** CID 142:  Resource leaks  (RESOURCE_LEAK)
/svx/source/gallery2/galexpl.cxx: 63 in GalleryExplorer::FillObjList(const 
rtl::OUString &, std::vector> &)()



*** CID 142:  Resource leaks  (RESOURCE_LEAK)
/svx/source/gallery2/galexpl.cxx: 63 in GalleryExplorer::FillObjList(const 
rtl::OUString &, std::vector> &)()
57 SfxListener aListener;
58 GalleryTheme*   pTheme = pGal->AcquireTheme( rThemeName, 
aListener );
59 
60 if( pTheme )
61 {
62 for( sal_uInt32 i = 0, nCount = pTheme->GetObjectCount(); i 
< nCount; i++ )
>>> CID 142:  Resource leaks  (RESOURCE_LEAK)
>>> Failing to save or free storage allocated by "pTheme->GetObjectURL(i)" 
>>> leaks it.
63 rObjList.push_back( pTheme->GetObjectURL( i 
).GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
64 
65 pGal->ReleaseTheme( pTheme, aListener );
66 }
67 }
68 

** CID 141:  Parse warnings  (PARSE_ERROR)
/dbaccess/source/ui/dlg/dbfindex.cxx: 39 in ()



*** CID 141:  Parse warnings  (PARSE_ERROR)
/dbaccess/source/ui/dlg/dbfindex.cxx: 39 in ()
33 namespace dbaui
34 {
35 using namespace ::com::sun::star::uno;
36 using namespace ::com::sun::star::ucb;
37 using namespace ::svt;
38 
>>> CID 141:  Parse warnings  (PARSE_ERROR)
>>> class template name must be a placeholder for the complete type being 
>>> initialized (not for a component of that type)
39 const OStringLiteral aGroupIdent("dBase III");
40 
41 
42 ODbaseIndexDialog::ODbaseIndexDialog(weld::Window * pParent, const 
OUString& aDataSrcName)
43 : GenericDialogController(pParent, 
"dbaccess/ui/dbaseindexdialog.ui", "DBaseIndexDialog")
44 , m_aDSN(aDataSrcName)

** CID 140:  Performance inefficiencies  (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 3922 in 
std::find_if<__gnu_cxx::__normal_iterator>>, 
SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const 
SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const 
SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const 
DataRowPointStyle &) (instance 1)]>(T1, T1, T2)()



*** CID 140:  Performance inefficiencies  (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 3922 in 
std::find_if<__gnu_cxx::__normal_iterator>>, 
SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const 
SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const 
SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const 
DataRowPointStyle &) (instance 1)]>(T1, T1, T2)()
3916*  @return   The first iterator @c i in the range @p 
[__first,__last)
3917*  such that @p __pred(*i) is true, or @p __last if no such 
iterator exists.
3918   */
3919   template
3920 inline _InputIterator
3921 find_if(_InputIterator __first, _InputIterator __last,
>>> CID 140:  Performance inefficiencies  (PASS_BY_VALUE)
>>> Passing parameter __pred of type 
>>> "SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, 
>>> SvXMLStylesContext const *, SvXMLStyleContext const *&, rtl::OUString &, 
>>> SchXMLImportHelper const &, SvXMLImport const &, bool, bool, 
>>> bool)::[lambda(DataRowPointStyle const &) (instance 1)]" (size 136 bytes) 
>>> by value.
3922_Predicate __pred)
3923 {
3924   // concept requirements
3925   
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
3926   __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
3927  typename iterator_traits<_InputIterator>::value_type>)

** CID 1466659:  Performance inefficiencies  (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 3922 in 
std::find_if<__gnu_cxx::__normal_iterator>>, 
SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const 
SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const 
SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap, 
com::sun::star::uno::Reference,
 std::less>, 
std::allocator, 
com::sun::star::uno::Reference>>>
 &)::[lambda(const DataRowPointStyle &) (instance 1)]>(T1, T1, T2)()



*** CID 1466659:  Performance inefficiencies  (PAS

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

2020-09-08 Thread Mike Kaganski (via logerrit)
 sw/source/filter/ww8/wrtw8nds.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0603b571230db1a1c6ff9f75f990675883e16717
Author: Mike Kaganski 
AuthorDate: Tue Sep 8 12:27:53 2020 +0200
Commit: Mike Kaganski 
CommitDate: Tue Sep 8 15:12:03 2020 +0200

Add reference to spec to the comment

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

diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index 11f8b88059c5..87ff1d82c701 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2374,7 +2374,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
 // Append bookmarks in this range after flys, exclusive of final
 // position of this range
 AppendBookmarks( rNode, nCurrentPos, nNextAttr - nCurrentPos );
-//Sadly only possible for word in main document text
+// Sadly only possible for main or glossary document parts: 
ECMA-376 Part 1 sect. 11.3.2
 if ( m_nTextTyp == TXT_MAINTEXT )
 AppendAnnotationMarks(aAttrIter, nCurrentPos, nNextAttr - 
nCurrentPos);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'feature/calc-canvas' - 2 commits - loleaflet/src

2020-09-08 Thread Jan Holesovsky (via logerrit)
 loleaflet/src/layer/tile/CanvasTileLayer.js   |   35 +-
 loleaflet/src/map/anim/Map.ZoomAnimation.js   |2 -
 loleaflet/src/map/handler/Map.TouchGesture.js |   12 ++--
 3 files changed, 34 insertions(+), 15 deletions(-)

New commits:
commit 8d9b6f3e8ccea4e6edc26a233ebbe99161f58973
Author: Jan Holesovsky 
AuthorDate: Tue Sep 8 14:28:02 2020 +0200
Commit: Jan Holesovsky 
CommitDate: Tue Sep 8 15:09:58 2020 +0200

calc canvas: Move the canvas during the pinch-to-zoom.

The actual zooming is still missing.

Change-Id: I68f01fee025589952ee4044e7f64caa1c29ee68f

diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js 
b/loleaflet/src/layer/tile/CanvasTileLayer.js
index e44593a9d..4a35b4939 100644
--- a/loleaflet/src/layer/tile/CanvasTileLayer.js
+++ b/loleaflet/src/layer/tile/CanvasTileLayer.js
@@ -180,6 +180,13 @@ L.CanvasTilePainter = L.Class.extend({
this._canvasCtx.scale(1, 1);
this._canvasCtx.translate(-topLeft.x, -topLeft.y);
 
+   // when using the pinch to zoom, set additional 
translation based
+   // on the pinch movement
+   if (this._map._animatingZoom) {
+   var centerOffset = 
this._map._getCenterOffset(this._map._animateToCenter);
+   
this._canvasCtx.translate(-Math.round(centerOffset.x), 
-Math.round(centerOffset.y));
+   }
+
// create a clip for the pane/view.
this._canvasCtx.beginPath();
var paneSize = paneBounds.getSize();
@@ -475,8 +482,10 @@ L.CanvasTileLayer = L.TileLayer.extend({
_animateZoom: function (e) {
var oldAnimatingZoom = this._map._animatingZoom;
var oldAnimateToZoom = this._map._animateToZoom;
+   var oldAnimateToCenter = this._map._animateToCenter;
this._map._animatingZoom = true;
this._map._animateToZoom = e.zoom;
+   this._map._animateToCenter = e.center;
 
this._update(e.center, e.zoom);
this._resetPreFetching(true);
@@ -485,6 +494,7 @@ L.CanvasTileLayer = L.TileLayer.extend({
 
this._map._animatingZoom = oldAnimatingZoom;
this._map._animateToZoom = oldAnimateToZoom;
+   this._map._animateToCenter = oldAnimateToCenter;
},
 
_setZoomTransforms: function () {
commit 7d69c3d55ea49fb10cf0abf20f6997e71cb17974
Author: Jan Holesovsky 
AuthorDate: Tue Sep 8 12:21:04 2020 +0200
Commit: Jan Holesovsky 
CommitDate: Tue Sep 8 15:09:58 2020 +0200

calc canvas: Paint to canvas during the pinch-to-zoom.

Infrastructure work, so that the updates are triggered during that.

Change-Id: I88e75cdc32047a487dd23c9e7be792b14dc097f0

diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js 
b/loleaflet/src/layer/tile/CanvasTileLayer.js
index 6d6aacecd..e44593a9d 100644
--- a/loleaflet/src/layer/tile/CanvasTileLayer.js
+++ b/loleaflet/src/layer/tile/CanvasTileLayer.js
@@ -8,6 +8,7 @@ L.TileCoordData = L.Class.extend({
initialize: function (left, top, zoom, part) {
this.x = left;
this.y = top;
+   // FIXME console.assert(Number.isInteger(zoom));
this.z = zoom;
this.part = part;
},
@@ -215,7 +216,6 @@ L.CanvasTilePainter = L.Class.extend({
},
 
update: function () {
-
var newDpiScale = L.getDpiScaleFactor(true /* useExactDPR */);
var scaleChanged = this._dpiScale != newDpiScale;
 
@@ -225,7 +225,7 @@ L.CanvasTilePainter = L.Class.extend({
}
 
var splitPanesContext = this._layer.getSplitPanesContext();
-   var zoom = Math.round(this._map.getZoom());
+   var zoom = this._map.getZoom();
var pixelBounds = this._map.getPixelBounds();
var newMapSize = pixelBounds.getSize();
var newTopLeft = pixelBounds.getTopLeft();
@@ -272,7 +272,8 @@ L.CanvasTilePainter = L.Class.extend({
if (splitPosChanged)
this._splitPos = newSplitPos;
 
-   this._lastZoom = zoom;
+   if (!this._map._animatingZoom)
+   this._lastZoom = Math.round(zoom);
this._lastPart = part;
 
this._topLeft = newTopLeft;
@@ -412,12 +413,12 @@ L.CanvasTileLayer = L.TileLayer.extend({
movestart: this._moveStart,
moveend: this._move,
// update tiles on move, but not more often than once 
per given interval
-   move: L.Util.throttle(this._move, 
this.options.updateInterval, this),
+   move: L.Util.throttle(this._move, 
this.options.updateInterval, this), // TODO we mig

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

2020-09-08 Thread Stephan Bergmann (via logerrit)
 sal/qa/rtl/strings/test_ostring_concat.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 46964d7bd509b2c75a8a09078d41d71f6523788c
Author: Stephan Bergmann 
AuthorDate: Tue Sep 8 12:26:27 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 8 14:35:02 2020 +0200

Fix typos in comments

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

diff --git a/sal/qa/rtl/strings/test_ostring_concat.cxx 
b/sal/qa/rtl/strings/test_ostring_concat.cxx
index 94f4e8d692cf..f797a15660b5 100644
--- a/sal/qa/rtl/strings/test_ostring_concat.cxx
+++ b/sal/qa/rtl/strings/test_ostring_concat.cxx
@@ -69,12 +69,12 @@ void test::ostring::StringConcat::checkConcat()
 CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringBuffer, const char[ 4 
] > )), typeid( OStringBuffer( "foo" ) + "bar" ));
 CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringLiteral( "foo" 
) + "bar" ));
 CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral<4>, const 
char[ 4 ] > )), typeid( OStringLiteral<4>( "foo" ) + "bar" ));
-//TODO: the explicit OUStringLiteral<4> template argument in the 
unevaluated typeid context
+//TODO: the explicit OStringLiteral<4> template argument in the 
unevaluated typeid context
 // is needed by some GCC versions, see 

 // "Failed class template argument deduction in unevaluated, 
parenthesized context"
 CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringLiteral( "foo" 
) + static_cast("bar") ));
 CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral<4>, const 
char* > )), typeid( OStringLiteral<4>( "foo" ) + static_cast("bar") ));
-//TODO: the explicit OUStringLiteral<4> template argument in the 
unevaluated typeid context
+//TODO: the explicit OStringLiteral<4> template argument in the 
unevaluated typeid context
 // is needed by some GCC versions, see 

 // "Failed class template argument deduction in unevaluated, 
parenthesized context"
 const char d1[] = "xyz";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/css

2020-09-08 Thread Pedro Pinto Silva (via logerrit)
 loleaflet/css/loleaflet.css |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 79d99156dc9a6851b50ef04e96a73894c8ffb19a
Author: Pedro Pinto Silva 
AuthorDate: Tue Sep 8 13:38:14 2020 +0200
Commit: Pedro Silva 
CommitDate: Tue Sep 8 14:34:46 2020 +0200

leaflet: cursor: bucket-cursor fix alignment

Change-Id: Iafe8dea3d379b6c1fe9241063bab4ab4b7c17e8e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102247
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pedro Silva 

diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index a85f43a6b..bbd5aca1f 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -75,7 +75,7 @@
 }
 
 .bucket-cursor {
-   cursor: url('images/cursors/fill.png'), auto !important;
+   cursor: url('images/cursors/fill.png') 14 29, auto !important;/*setting 
coordinates to align the tip of the bucket icon */
 }
 .loleaflet-scrollbar-show {
opacity: 1 !important;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/data/ods/tdf125099.ods  |binary
 sc/qa/unit/subsequent_filters-test.cxx |   23 +++
 2 files changed, 23 insertions(+)

New commits:
commit e29b91e348be22037d9a3bcb3d6fe8ca91d5ee61
Author: Xisco Fauli 
AuthorDate: Tue Sep 8 12:18:42 2020 +0200
Commit: Xisco Fauli 
CommitDate: Tue Sep 8 14:29:32 2020 +0200

tdf#125099: sc_subsequent_filters_test: Add unittest

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

diff --git a/sc/qa/unit/data/ods/tdf125099.ods 
b/sc/qa/unit/data/ods/tdf125099.ods
new file mode 100644
index ..538fa398768f
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf125099.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index bbedc4b46f0b..7ca0f5fa1a25 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -231,6 +231,7 @@ public:
 void testTdf98844();
 void testTdf100458();
 void testTdf118561();
+void testTdf125099();
 void testTdf134455();
 void testTdf119533();
 void testTdf127982();
@@ -398,6 +399,7 @@ public:
 CPPUNIT_TEST(testTdf98844);
 CPPUNIT_TEST(testTdf100458);
 CPPUNIT_TEST(testTdf118561);
+CPPUNIT_TEST(testTdf125099);
 CPPUNIT_TEST(testTdf134455);
 CPPUNIT_TEST(testTdf119533);
 CPPUNIT_TEST(testTdf127982);
@@ -3845,6 +3847,27 @@ void ScFiltersTest::testTdf118561()
 xDocSh->DoClose();
 }
 
+void ScFiltersTest::testTdf125099()
+{
+ScDocShellRef xDocSh = loadDoc("tdf125099.", FORMAT_ODS);
+CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+ScDocument& rDoc = xDocSh->GetDocument();
+
+CPPUNIT_ASSERT_EQUAL(OUString("03:53:46"), 
rDoc.GetString(ScAddress(0,0,0)));
+CPPUNIT_ASSERT_EQUAL(OUString("03:23:59"), 
rDoc.GetString(ScAddress(0,1,0)));
+
+xDocSh->DoHardRecalc();
+
+CPPUNIT_ASSERT_EQUAL(OUString("03:53:46"), 
rDoc.GetString(ScAddress(0,0,0)));
+
+// Without the fix in place, this would have failed with
+// - Expected: 03:24:00
+// - Actual  : 03:23:59
+CPPUNIT_ASSERT_EQUAL(OUString("03:24:00"), 
rDoc.GetString(ScAddress(0,1,0)));
+
+xDocSh->DoClose();
+}
+
 void ScFiltersTest::testTdf134455()
 {
 ScDocShellRef xDocSh = loadDoc("tdf134455.", FORMAT_XLSX);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'feature/calc-canvas' - 2 commits - loleaflet/css loleaflet/src

2020-09-08 Thread Szymon Kłos (via logerrit)
 loleaflet/css/leaflet.css  |1 -
 loleaflet/css/loleaflet.css|5 -
 loleaflet/css/menubar.css  |2 ++
 loleaflet/css/notebookbar.css  |1 +
 loleaflet/css/spreadsheet.css  |1 +
 loleaflet/css/toolbar.css  |3 ++-
 loleaflet/src/layer/vector/SplitterLine.js |   11 ++-
 7 files changed, 20 insertions(+), 4 deletions(-)

New commits:
commit 6672b5412cb4da044bc5df845d10bc05cddf6d75
Author: Szymon Kłos 
AuthorDate: Tue Sep 8 13:52:33 2020 +0200
Commit: Szymon Kłos 
CommitDate: Tue Sep 8 13:52:33 2020 +0200

Split lines only in the corner when set to 0

Change-Id: I6192219cede2d0888ecd77236f72ff734d99d778

diff --git a/loleaflet/css/leaflet.css b/loleaflet/css/leaflet.css
index 67899f262..1083c5b74 100644
--- a/loleaflet/css/leaflet.css
+++ b/loleaflet/css/leaflet.css
@@ -16,7 +16,6 @@
top: 0;
}
 .leaflet-container {
-   overflow: hidden;
-ms-touch-action: none;
}
 .leaflet-tile,
diff --git a/loleaflet/src/layer/vector/SplitterLine.js 
b/loleaflet/src/layer/vector/SplitterLine.js
index 344b91625..547663fe7 100644
--- a/loleaflet/src/layer/vector/SplitterLine.js
+++ b/loleaflet/src/layer/vector/SplitterLine.js
@@ -2,7 +2,7 @@
 /*
  * L.SplitterLine is a draggable L.Rectangle to be used as control for 
split-panes.
  */
-
+/* global $ */
 L.SplitterLine = L.Rectangle.extend({
 
options: {
@@ -43,9 +43,15 @@ L.SplitterLine = L.Rectangle.extend({
var xmin = isHoriz ? splitPos.x - thickness/2 : -size.x;
var xmax = isHoriz ? splitPos.x + thickness/2 : size.x;
 
+   if (!this._dragStarted && splitPos.y == 0 && !isHoriz)
+   xmax = thickness/2;
+
var ymin = !isHoriz ? splitPos.y - thickness/2 : -size.y;
var ymax = !isHoriz ? splitPos.y + thickness/2 : size.y;
 
+   if (!this._dragStarted && splitPos.x == 0 && isHoriz)
+   ymax = thickness/2;
+
return new L.LatLngBounds(
map.unproject(new L.Point(xmin, ymin)),
map.unproject(new L.Point(xmax, ymax))
@@ -66,6 +72,7 @@ L.SplitterLine = L.Rectangle.extend({
}.bind(this));
 
this.addClass('leaflet-pane-splitter');
+   $('.leaflet-pane-splitter').parent().css('overflow', 'visible');
},
 
_onDragStart: function(evt) {
@@ -78,6 +85,8 @@ L.SplitterLine = L.Rectangle.extend({
this._dragStarted = true;
L.DomEvent.stop(evt);
 
+   this.setBounds(this._calculateLatLngBounds());
+
this._pathNodeCollection.forEachNode(function (nodeData) {
var node = nodeData.getNode();
L.DomEvent.on(node, 'mousemove', this._onDrag, this);
commit 7b5805f81e14d2f6beea72cfd7530a425a9436b4
Author: Szymon Kłos 
AuthorDate: Tue Sep 8 13:22:52 2020 +0200
Commit: Szymon Kłos 
CommitDate: Tue Sep 8 13:22:55 2020 +0200

Update css for split panes

Set z-index for all toolbars in calc to allow
enabling overflow of 'map' container content
(eg. split lines). This patch ensures that
lines will not be drawn above other UI elements.

Change-Id: I02511b86545bf3012a8a067236ad04b5dd7b1d02

diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index a85f43a6b..6e4ad7459 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -199,11 +199,14 @@ body {
 }
 
 #toolbar-wrapper {
-   position: relative;
+   position: absolute;
table-layout: fixed;
border-collapse: collapse;
width: 100%;
border-top: none;
+   background-color: white;
+   top: 38px;
+   z-index: 11;
 }
 
 #toolbar-logo {
diff --git a/loleaflet/css/menubar.css b/loleaflet/css/menubar.css
index ad09ffa61..9b9f30f56 100644
--- a/loleaflet/css/menubar.css
+++ b/loleaflet/css/menubar.css
@@ -56,6 +56,8 @@
 background: #ff;
 margin: 3px;
 white-space: nowrap;
+position: absolute;
+z-index: 12;
 }
 
 .main-nav.hasnotebookbar{
diff --git a/loleaflet/css/notebookbar.css b/loleaflet/css/notebookbar.css
index 233742b6c..c84b0b109 100644
--- a/loleaflet/css/notebookbar.css
+++ b/loleaflet/css/notebookbar.css
@@ -181,6 +181,7 @@
 #toolbar-wrapper.hasnotebookbar {
position: fixed;
z-index: 11;
+   top: 32px;
 }
 
 .cell.notebookbar {
diff --git a/loleaflet/css/spreadsheet.css b/loleaflet/css/spreadsheet.css
index abf6cad98..e19052ea9 100644
--- a/loleaflet/css/spreadsheet.css
+++ b/loleaflet/css/spreadsheet.css
@@ -24,6 +24,7 @@
height: 39px;
overflow: hidden;
white-space: nowrap;
+   z-index: 11;
 
background-color: var(--gray-bg-color);
}
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 986290d35..742

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

2020-09-08 Thread Juergen Funk (via logerrit)
 vcl/source/window/printdlg.cxx |   24 +---
 1 file changed, 17 insertions(+), 7 deletions(-)

New commits:
commit 63bf8f042abe3c0f6989f6763d13f5389182b816
Author: Juergen Funk 
AuthorDate: Fri Sep 4 10:53:44 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Sep 8 13:40:28 2020 +0200

tdf#127932 fix wrong page number in print progress

- in ctor, reset start pages to non-inflated value after size
  calculation
- update label, _then_ progress in setProgress()

Change-Id: I66576e339de814922512b68167e6c0a9b1025378
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102031
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index d964390ef062..c210525b17f3 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -2164,6 +2164,15 @@ void PrintDialog::previewLast()
 ActivateHdl(*mxPageEdit);
 }
 
+
+static OUString getNewLabel(const OUString& aLabel, int i_nCurr, int i_nMax)
+{
+OUString aNewText( aLabel.replaceFirst( "%p", OUString::number( i_nCurr ) 
) );
+aNewText = aNewText.replaceFirst( "%n", OUString::number( i_nMax ) );
+
+return aNewText;
+}
+
 // PrintProgressDialog
 PrintProgressDialog::PrintProgressDialog(weld::Window* i_pParent, int i_nMax)
 : GenericDialogController(i_pParent, "vcl/ui/printprogressdialog.ui", 
"PrintProgressDialog")
@@ -2181,15 +2190,17 @@ PrintProgressDialog::PrintProgressDialog(weld::Window* 
i_pParent, int i_nMax)
 
 //just multiply largest value by 10 and take the width of that string as
 //the max size we will want
-OUString aNewText( maStr.replaceFirst( "%p", OUString::number( mnMax * 10 
) ) );
-aNewText = aNewText.replaceFirst( "%n", OUString::number( mnMax * 10 ) );
-mxText->set_label( aNewText );
+mxText->set_label(getNewLabel(maStr, mnMax * 10, mnMax * 10));
 mxText->set_size_request(mxText->get_preferred_size().Width(), -1);
 
 //Pick a useful max width
 mxProgress->set_size_request(mxProgress->get_approximate_digit_width() * 
25, -1);
 
 mxButton->connect_clicked( LINK( this, PrintProgressDialog, ClickHdl ) );
+
+// after this patch f7157f04fab298423e2c4f6a7e5f8e361164b15f, we have seen 
the calc Max string (sometimes) look above
+// now init to the right start vaules
+mxText->set_label(getNewLabel(maStr, mnCur, mnMax));
 }
 
 PrintProgressDialog::~PrintProgressDialog()
@@ -2208,11 +2219,10 @@ void PrintProgressDialog::setProgress( int i_nCurrent )
 if( mnMax < 1 )
 mnMax = 1;
 
-mxProgress->set_percentage(mnCur*100/mnMax);
+mxText->set_label(getNewLabel(maStr, mnCur, mnMax));
 
-OUString aNewText( maStr.replaceFirst( "%p", OUString::number( mnCur ) ) );
-aNewText = aNewText.replaceFirst( "%n", OUString::number( mnMax ) );
-mxText->set_label( aNewText );
+// here view the dialog, with the right label
+mxProgress->set_percentage(mnCur*100/mnMax);
 }
 
 void PrintProgressDialog::tick()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Miklos Vajna (via logerrit)
 include/sfx2/strings.hrc   |4 ++--
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |   15 ++-
 xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui |4 ++--
 3 files changed, 14 insertions(+), 9 deletions(-)

New commits:
commit 2c76fcd6b09b1cea52276a8bf289229f28e0b6e3
Author: Miklos Vajna 
AuthorDate: Wed Sep 2 12:37:18 2020 +0200
Commit: Miklos Vajna 
CommitDate: Tue Sep 8 13:25:43 2020 +0200

xmlsecurity: avoid saying OK when the signature is partial

That's reserved for valid signatures (digest match, certificate
validates and the signature covers the whole document).

Also avoid "invalid" in the dialog when the digest matches and the
signature is just incomplete.

This now uses wording which is closer to Acrobat and also uses the same
wording on the infobar and in the dialog.

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

diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index b6ad69a604cf..7cd612a32a4b 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -293,8 +293,8 @@
 #define STR_READONLY_FINISH_SIGN
NC_("STR_READONLY_FINISH_SIGN", "Finish Signing")
 #define STR_SIGNATURE_BROKENNC_("STR_SIGNATURE_BROKEN", 
"This document has an invalid signature.")
 #define STR_SIGNATURE_INVALID   NC_("STR_SIGNATURE_INVALID", 
"The signature was valid, but the document has been modified")
-#define STR_SIGNATURE_NOTVALIDATED  
NC_("STR_SIGNATURE_NOTVALIDATED", "The signature is OK, but the certificate 
could not be validated.")
-#define STR_SIGNATURE_PARTIAL_OK
NC_("STR_SIGNATURE_PARTIAL_OK", "The signature is OK, but the document is only 
partially signed.")
+#define STR_SIGNATURE_NOTVALIDATED  
NC_("STR_SIGNATURE_NOTVALIDATED", "At least one signature has problems: the 
certificate could not be validated.")
+#define STR_SIGNATURE_PARTIAL_OK
NC_("STR_SIGNATURE_PARTIAL_OK", "At least one signature has problems: the 
document is only partially signed.")
 #define STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK   
NC_("STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK", "The certificate could not be 
validated and the document is only partially signed.")
 #define STR_SIGNATURE_OKNC_("STR_SIGNATURE_OK", "This 
document is digitally signed and the signature is valid.")
 #define STR_SIGNATURE_SHOW  NC_("STR_SIGNATURE_SHOW", 
"Show Signatures")
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 
b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index ff5161fb2754..ef67c7167c04 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -531,6 +531,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 size_t nInfos = 
maSignatureManager.getCurrentSignatureInformations().size();
 size_t nValidSigs = 0, nValidCerts = 0;
 bool bAllNewSignatures = true;
+bool bSomePartial = false;
 
 if( nInfos )
 {
@@ -607,7 +608,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 {
 if (maSignatureManager.getStore().is())
 {
-// XML based.
+// ZIP based.
 bSigValid = 
DocumentSignatureHelper::checkIfAllFilesAreSigned(
   aElementsToBeVerified, rInfo, mode);
 }
@@ -619,6 +620,10 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 
 if( bSigValid )
 nValidSigs++;
+else
+{
+bSomePartial = true;
+}
 }
 
 OUString sImage;
@@ -672,8 +677,8 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 
 bool bShowInvalidState = nInfos && !bAllSigsValid;
 
-m_xSigsInvalidImg->set_visible( bShowInvalidState );
-m_xSigsInvalidFI->set_visible( bShowInvalidState );
+m_xSigsInvalidImg->set_visible( bShowInvalidState && !bSomePartial);
+m_xSigsInvalidFI->set_visible( bShowInvalidState && !bSomePartial);
 
 bool bShowNotValidatedState = nInfos && bAllSigsValid && !bAllCertsValid;
 
@@ -682,8 +687,8 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 
 //bAllNewSignatures is always true if we are not in document mode
 bool bShowOldSignature = nInfos && bAllSigsValid && bAllCertsValid && 
!bAllNewSignatures;
-m_xSigsOldSignatureImg->set_visible(bShowOldSignature);
-m_xSigsOldSignatureFI->set_visible(bShowOldSignature);
+m_xSigsOldSignatureImg->set_visible(bShowOldSignature || bSomePartial);
+m_xSigsOldSignatureFI->set_visible(bShowOldSignature || bSomePartial);
 
 SignatureHighlightHdl(*

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

2020-09-08 Thread Caolán McNamara (via logerrit)
 xmloff/source/chart/SchXMLSeries2Context.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f386cb407c5d780706e224aff9f80a79f36daf01
Author: Caolán McNamara 
AuthorDate: Tue Sep 8 10:36:06 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 8 13:13:26 2020 +0200

cid#1186122 Big parameter passed by value

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

diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx 
b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 58f8a6b28eb3..4bf122fa3b46 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -915,7 +915,7 @@ void SchXMLSeries2Context::setStylesToSeries( 
SeriesDefaultsAndStyles& rSeriesDe
 auto pItLabel
 = 
std::find_if(rSeriesDefaultsAndStyles.maSeriesStyleVector.begin(),

rSeriesDefaultsAndStyles.maSeriesStyleVector.end(),
-   [seriesStyle](const DataRowPointStyle& rStyle) {
+   [&seriesStyle](const DataRowPointStyle& rStyle) 
{
return rStyle.meType == 
DataRowPointStyle::DATA_LABEL_SERIES
   && rStyle.msStyleNameOfParent == 
seriesStyle.msStyleName;
});
@@ -1179,7 +1179,7 @@ void SchXMLSeries2Context::setStylesToDataPoints( 
SeriesDefaultsAndStyles& rSeri
 auto pItLabel = std::find_if(
 rSeriesDefaultsAndStyles.maSeriesStyleVector.begin(),
 rSeriesDefaultsAndStyles.maSeriesStyleVector.end(),
-[seriesStyle](const DataRowPointStyle& rStyle) {
+[&seriesStyle](const DataRowPointStyle& rStyle) {
 return rStyle.meType == 
DataRowPointStyle::DATA_LABEL_POINT
&& rStyle.msStyleNameOfParent == 
seriesStyle.msStyleName;
 });
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src

2020-09-08 Thread Ezinne Nnamani (via logerrit)
 loleaflet/src/layer/tile/ImpressTileLayer.js |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a8cefd617ff203a0e35fe5143f97e69c461fa820
Author: Ezinne Nnamani 
AuthorDate: Fri Sep 4 16:04:13 2020 +0100
Commit: Andras Timar 
CommitDate: Tue Sep 8 13:13:52 2020 +0200

A fix to display the avatar on the comments in Impress slides

Change-Id: I1ba699d5e8583253ec9d14502629218d8714e5aa
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102141
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102118

diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js 
b/loleaflet/src/layer/tile/ImpressTileLayer.js
index b4e77f167..577c078dc 100644
--- a/loleaflet/src/layer/tile/ImpressTileLayer.js
+++ b/loleaflet/src/layer/tile/ImpressTileLayer.js
@@ -405,6 +405,9 @@ L.ImpressTileLayer = L.TileLayer.extend({
_onMessage: function (textMsg, img) {
if (textMsg.startsWith('comment:')) {
var obj = 
JSON.parse(textMsg.substring('comment:'.length + 1));
+   if (obj.comment.author in 
this._map._viewInfoByUserName) {
+   obj.comment.avatar = 
this._map._viewInfoByUserName[obj.comment.author].userextrainfo.avatar;
+   }
if (obj.comment.action === 'Add') {
if (!this._annotations[obj.comment.parthash]) {
this._annotations[obj.comment.parthash] 
= [];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loolkitconfig.xcu

2020-09-08 Thread Andras Timar (via logerrit)
 loolkitconfig.xcu |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit ec6350c379c8c7d3de4d69ae0fcc537f82b3b2f2
Author: Andras Timar 
AuthorDate: Sun Sep 6 22:40:39 2020 +0200
Commit: Andras Timar 
CommitDate: Tue Sep 8 13:13:21 2020 +0200

Set Noto Sans as the default font for new files created from minimal ODF 
templates

Change-Id: I2f145c8d3d934699a3f4c6c8fd6faf06958f323d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102117
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loolkitconfig.xcu b/loolkitconfig.xcu
index a2a711711..5ba589b94 100644
--- a/loolkitconfig.xcu
+++ b/loolkitconfig.xcu
@@ -34,4 +34,10 @@
 
 NeverMatchAnyUrlSuffix
 
+
+Noto 
Sans;Liberation Sans;Albany AMT;Albany;Arial;Arimo;Nimbus Sans L;DejaVu 
Sans;Helvetica;Lucida;Geneva;Helmet;Arial Unicode MS;Lucida Sans 
Unicode;Tahoma;SansSerif
+Noto 
Sans;Liberation Sans;Albany AMT;Albany;Arial;Arimo;Nimbus Sans L;DejaVu 
Sans;Helvetica;Lucida;Geneva;Helmet;Arial Unicode MS;Lucida Sans 
Unicode;Tahoma;SansSerif
+Noto 
Sans;Liberation Sans;Albany AMT;Albany;Arial;Arimo;Nimbus Sans L;DejaVu 
Sans;Helvetica;Lucida;Geneva;Helmet;Arial Unicode MS;Lucida Sans 
Unicode;Tahoma;SansSerif
+Noto 
Sans;Liberation Sans;Albany AMT;Albany;Arial;Arimo;Nimbus Sans L;DejaVu 
Sans;Helvetica;Lucida;Geneva;Helmet;Arial Unicode MS;Lucida Sans 
Unicode;Tahoma;SansSerif
+
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Caolán McNamara (via logerrit)
 include/svx/galleryobjectcollection.hxx |1 +
 svx/source/gallery2/galleryobjectcollection.cxx |3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 70094be161b64d1c5f837054508a6b8ad59ed337
Author: Caolán McNamara 
AuthorDate: Tue Sep 8 10:29:49 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 8 12:59:36 2020 +0200

cid#1466647 Resource leak

and

cid#1466652 Resource leak
cid#1466655 Resource leak
cid#142 Resource leak

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

diff --git a/include/svx/galleryobjectcollection.hxx 
b/include/svx/galleryobjectcollection.hxx
index 8e322549b5eb..a1373a44897a 100644
--- a/include/svx/galleryobjectcollection.hxx
+++ b/include/svx/galleryobjectcollection.hxx
@@ -49,6 +49,7 @@ class SVXCORE_DLLPUBLIC GalleryObjectCollection
 {
 private:
 std::vector> m_aObjectList;
+INetURLObject m_aInvalidURL;
 
 public:
 GalleryObjectCollection();
diff --git a/svx/source/gallery2/galleryobjectcollection.cxx 
b/svx/source/gallery2/galleryobjectcollection.cxx
index c5667eea2dca..4082852ce371 100644
--- a/svx/source/gallery2/galleryobjectcollection.cxx
+++ b/svx/source/gallery2/galleryobjectcollection.cxx
@@ -53,8 +53,7 @@ const INetURLObject& 
GalleryObjectCollection::getURLForPosition(sal_uInt32 nPos)
 {
 if (nPos < size())
 return get(nPos)->getURL();
-INetURLObject* aInvalidURL = new INetURLObject();
-return *aInvalidURL;
+return m_aInvalidURL;
 }
 
 /* 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: sc/source

2020-09-08 Thread Thorsten Behrens (via logerrit)
 sc/source/core/data/table3.cxx  |4 ++--
 sc/source/filter/excel/excrecds.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 42f2c438976ef95c23868af3a997dd971aece7a5
Author: Thorsten Behrens 
AuthorDate: Sun Sep 6 17:07:47 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Sep 8 12:52:48 2020 +0200

Check range before accessing Calc sort userlist

Change-Id: Ib5078dc4ce3f85be9b42320b60ef6fc40b684cb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102140
Tested-by: Jenkins
Tested-by: Serge Krot 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 449a4a900a7e..0308ee3db818 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1492,9 +1492,9 @@ short ScTable::CompareCell(
 bool bNaturalSort = aSortParam.bNaturalSort;// natural sort
 bool bCaseSens= aSortParam.bCaseSens;   // case 
sensitivity
 
-if (bUserDef)
+ScUserList* pList = ScGlobal::GetUserList();
+if (bUserDef && pList && pList->size() > aSortParam.nUserIndex 
)
 {
-ScUserList* pList = ScGlobal::GetUserList();
 const ScUserListData& rData = 
(*pList)[aSortParam.nUserIndex];
 
 if ( bNaturalSort )
diff --git a/sc/source/filter/excel/excrecds.cxx 
b/sc/source/filter/excel/excrecds.cxx
index 40a74528af90..421c0e8f788b 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -951,7 +951,8 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& 
rRoot, SCTAB nTab, const
 ScSortParam aSortParam;
 pData->GetSortParam( aSortParam );
 
-if (aSortParam.bUserDef)
+ScUserList* pList = ScGlobal::GetUserList();
+if (aSortParam.bUserDef && pList && pList->size() > 
aSortParam.nUserIndex)
 {
 // get sorted area without headers
 maSortRef = ScRange(
@@ -959,7 +960,6 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& 
rRoot, SCTAB nTab, const
 aParam.nCol2, aParam.nRow2, aParam.nTab );
 
 // get sorted columns with custom lists
-ScUserList* pList = ScGlobal::GetUserList();
 const ScUserListData& rData = (*pList)[aSortParam.nUserIndex];
 
 // get column index and sorting direction
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Serge Krot (via logerrit)
 sc/inc/dbdata.hxx  |4 
 sc/inc/document.hxx|4 
 sc/qa/unit/data/ods/tdf95640.ods   |binary
 sc/qa/unit/data/ods/tdf95640_standard_list.ods |binary
 sc/qa/unit/data/xlsx/tdf95640.xlsx |binary
 sc/qa/unit/subsequent_export-test.cxx  |   63 +
 sc/source/filter/excel/excrecds.cxx|   64 +
 sc/source/filter/inc/autofilterbuffer.hxx  |   30 ++
 sc/source/filter/inc/autofiltercontext.hxx |   39 
 sc/source/filter/inc/excrecds.hxx  |3 
 sc/source/filter/oox/autofilterbuffer.cxx  |  116 +++--
 sc/source/filter/oox/autofiltercontext.cxx |   68 ++
 sc/source/filter/oox/tablebuffer.cxx   |2 
 13 files changed, 375 insertions(+), 18 deletions(-)

New commits:
commit a9f8f0a484965338221cad4f97d98f418b5ccff1
Author: Serge Krot 
AuthorDate: Mon Jun 29 13:23:34 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Sep 8 12:51:17 2020 +0200

tdf#95640 XLSX: import/export of custom sort lists

Change-Id: If5ffef39770bf7abd6e75e8de998d4a2b4749a0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97399
Tested-by: Jenkins
Tested-by: Serge Krot 
Reviewed-by: Serge Krot 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index 488063cd0a2b..0e31a0f02152 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -172,8 +172,8 @@ public:
 OUString GetSourceString() const;
 OUString GetOperations() const;
 
-voidGetSortParam(ScSortParam& rSortParam) const;
-voidSetSortParam(const ScSortParam& rSortParam);
+SC_DLLPUBLIC void GetSortParam(ScSortParam& rSortParam) const;
+SC_DLLPUBLIC void SetSortParam(const ScSortParam& rSortParam);
 
 /** Remember some more settings of ScSortParam, only to be called at
 anonymous DB ranges as it at least overwrites bHasHeader. */
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 6917d6c47a74..370effa1b01b 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -818,8 +818,8 @@ public:
   bool bRemoveAutoFilter = 
false );
 const ScDBData*  GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB 
nTab, ScDBDataPortion ePortion) const;
 ScDBData*GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB 
nTab, ScDBDataPortion ePortion);
-const ScDBData*  GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow2) const;
-ScDBData*GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow2);
+SC_DLLPUBLIC const ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow2) const;
+SC_DLLPUBLIC ScDBData*   GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow2);
 void RefreshDirtyTableColumnNames();
 SC_DLLPUBLIC sc::ExternalDataMapper& GetExternalDataMapper();
 
diff --git a/sc/qa/unit/data/ods/tdf95640.ods b/sc/qa/unit/data/ods/tdf95640.ods
new file mode 100644
index ..5d435c61cc85
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf95640.ods differ
diff --git a/sc/qa/unit/data/ods/tdf95640_standard_list.ods 
b/sc/qa/unit/data/ods/tdf95640_standard_list.ods
new file mode 100644
index ..37bea8a0c93e
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf95640_standard_list.ods 
differ
diff --git a/sc/qa/unit/data/xlsx/tdf95640.xlsx 
b/sc/qa/unit/data/xlsx/tdf95640.xlsx
new file mode 100644
index ..78c2d32c2cf6
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf95640.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 8c7654c881eb..451d45d99c84 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -206,6 +206,12 @@ public:
 void testTdf129985();
 void testTdf73063();
 
+xmlDocUniquePtr testTdf95640(const OUString& rFileName, sal_Int32 
nSourceFormat,
+ sal_Int32 nDestFormat);
+void testTdf95640_ods_to_xlsx();
+void testTdf95640_ods_to_xlsx_with_standard_list();
+void testTdf95640_xlsx_to_xlsx();
+
 void testRefStringXLSX();
 void testRefStringConfigXLSX();
 void testRefStringUnspecified();
@@ -364,6 +370,9 @@ public:
 CPPUNIT_TEST(testTdf55417);
 CPPUNIT_TEST(testTdf129985);
 CPPUNIT_TEST(testTdf73063);
+CPPUNIT_TEST(testTdf95640_ods_to_xlsx);
+CPPUNIT_TEST(testTdf95640_ods_to_xlsx_with_standard_list);
+CPPUNIT_TEST(testTdf95640_xlsx_to_xlsx);
 
 CPPUNIT_TEST(testRefStringXLSX);
 CPPUNIT_TEST(testRefStringConfigXLSX);
@@ -4292,6 +4301,60 @@ void ScExportTest::testTdf73063()
 xDocSh->DoClose();
 }
 
+xmlDocUniquePtr ScExportTest::testTdf95640(const OUString& rFileName, 
sal_Int32 nSourceFormat,

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

2020-09-08 Thread Caolán McNamara (via logerrit)
 xmloff/source/chart/transporttypes.hxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit aeda22ce8f81c9b79a2d15deb6dcf4ffdf2dcf37
Author: Caolán McNamara 
AuthorDate: Tue Sep 8 10:23:09 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 8 12:38:03 2020 +0200

cid#1466654 Uninitialized scalar field

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

diff --git a/xmloff/source/chart/transporttypes.hxx 
b/xmloff/source/chart/transporttypes.hxx
index 67deb3748cb9..28527c6c06f8 100644
--- a/xmloff/source/chart/transporttypes.hxx
+++ b/xmloff/source/chart/transporttypes.hxx
@@ -199,6 +199,8 @@ struct DataRowPointStyle
 // ctor for use in import of  as child of 
 DataRowPointStyle(StyleType eType, const OUString& sStyleName, sal_Int32 
nAttachedAxis = 0)
 : meType(eType)
+, m_nPointIndex(0)
+, m_nPointRepeat(0)
 , msStyleName(sStyleName)
 , mnAttachedAxis(nAttachedAxis)
 , mbSymbolSizeForSeriesIsMissingInFile(false)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Szabolcs Toth (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf120760_ZOrderInHeader.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx   |   16 +++
 writerfilter/source/dmapper/GraphicImport.cxx   |   17 +---
 3 files changed, 29 insertions(+), 4 deletions(-)

New commits:
commit 7739740ab36a933a134996427132c64dfddac49c
Author: Szabolcs Toth 
AuthorDate: Thu Jun 18 15:58:32 2020 +0200
Commit: Xisco Fauli 
CommitDate: Tue Sep 8 12:36:38 2020 +0200

tdf#120760 DOCX shape import: fix Z-order with behindDoc

DrawingML attribute relativeHeight contains z-indices
for shape Z-order, but this depends on behindDoc, too.

We can use z-index = relativeHeight - MAX_INT32 on shapes
with behindDoc=true, as a simple workaround to get correct
Z-order, because unsigned relativeHeight values stored in
sal_Int32, and MIN_INT32 <= -MAX_INT32, and the temporary
negative z-indices will converted by GraphicZOrderHelper.

Note: this commit doesn't fix the old writerfilter
implementation problem, that DOCX relativeHeight is an
unsignedInt value according to W3C XML Schema, i.e. its
maximal value is 4294967295 (MAX_UINT32), not 2147483647
(MAX_INT32).

Co-authored-by: Balázs Regényi

Change-Id: I54a72a95bc69b307b2835636fff376b0aa9bc45c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96614
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 6479096dc2bd40215ff80273b4d27cadb2688cb1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100947
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf120760_ZOrderInHeader.docx 
b/sw/qa/extras/ooxmlexport/data/tdf120760_ZOrderInHeader.docx
new file mode 100644
index ..77a6d48dd866
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf120760_ZOrderInHeader.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index c2aaec5c64a9..08d4831d1b12 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -1318,6 +1318,22 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf112287, 
"tdf112287.docx")
 assertXPath(pXmlDocument, 
"/w:document/w:body/w:p[2]/w:pPr/w:framePr","vAnchor","margin");
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testZOrderInHeader, 
"tdf120760_ZOrderInHeader.docx")
+{
+// tdf#120760 Check that the Z-Order of the background is smaller than the 
front shape's.
+xmlDocUniquePtr pXml = parseExport("word/header1.xml");
+if (!pXml)
+return;
+
+// Get the Z-Order of the background image and of the shape in front of it.
+sal_Int32 nBackground = getXPath(pXml, 
"/w:hdr/w:p[1]/w:r[1]/w:drawing/wp:anchor", "relativeHeight").toInt32();
+sal_Int32 nFrontShape = getXPath(pXml, 
"/w:hdr/w:p[1]/w:r[1]/mc:AlternateContent[2]"
+"/mc:Choice/w:drawing/wp:anchor", "relativeHeight").toInt32();
+
+// Assert that background is in the back.
+CPPUNIT_ASSERT(nBackground < nFrontShape);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx 
b/writerfilter/source/dmapper/GraphicImport.cxx
index 27acbe045b25..372e9f40870a 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -208,6 +208,7 @@ public:
 bool  bLayoutInCell;
 bool bAllowOverlap = true;
 bool  bOpaque;
+bool  bBehindDoc;
 bool  bContour;
 bool  bContourOutside;
 WrapPolygon::Pointer_t mpWrapPolygon;
@@ -273,6 +274,7 @@ public:
 ,nWrap(text::WrapTextMode_NONE)
 ,bLayoutInCell(true)
 ,bOpaque( !rDMapper.IsInHeaderFooter() )
+,bBehindDoc(false)
 ,bContour(false)
 ,bContourOutside(true)
 ,nLeftMargin(319)
@@ -371,10 +373,15 @@ public:
 {
 if (zOrder >= 0)
 {
+// tdf#120760 Send objects with behinddoc=true to the back.
+sal_Int32 nZOrder = zOrder;
+if (bBehindDoc && rDomainMapper.IsInHeaderFooter())
+nZOrder -= SAL_MAX_INT32;
 GraphicZOrderHelper* pZOrderHelper = 
rDomainMapper.graphicZOrderHelper();
 bool bOldStyle = eGraphicImportType == 
GraphicImportType::IMPORT_AS_DETECTED_INLINE;
-
xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_Z_ORDER), 
uno::makeAny(pZOrderHelper->findZOrder(zOrder, bOldStyle)));
-pZOrderHelper->addItem(xGraphicObjectProperties, zOrder);
+
xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_Z_ORDER),
+uno::makeAny(pZOrderHelper->findZOrder(nZOrder, bOldStyle)));
+pZOrderHelper->addItem(xGraphicObjectProperties, nZOrder);
 }
 }
 
@@ -609,8 +616,11 @@ void GraphicImport::lcl_attribute(Id nName, Value& rV

[Libreoffice-commits] online.git: Changes to 'refs/tags/libreoffice-7.0.1.1'

2020-09-08 Thread Szymon Kłos (via logerrit)
Tag 'libreoffice-7.0.1.1' created by Andras Timar  
at 2020-09-08 10:36 +

libreoffice-7.0.1.1

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


[Libreoffice-commits] online.git: Branch 'libreoffice-7-0' - kit/ChildSession.cpp loleaflet/src test/UnitSession.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp wsd/LOOLWSD.cpp

2020-09-08 Thread Szymon Kłos (via logerrit)
 kit/ChildSession.cpp  |   10 +++-
 loleaflet/src/core/Socket.js  |3 ++
 loleaflet/src/layer/tile/TileLayer.js |2 -
 test/UnitSession.cpp  |   16 +-
 wsd/DocumentBroker.cpp|   27 
 wsd/DocumentBroker.hpp|9 
 wsd/LOOLWSD.cpp   |   38 --
 7 files changed, 72 insertions(+), 33 deletions(-)

New commits:
commit da0be0fdece89af60aad6869bc8f74365abec3cb
Author: Szymon Kłos 
AuthorDate: Thu Sep 3 11:34:13 2020 +0200
Commit: Andras Timar 
CommitDate: Tue Sep 8 12:32:48 2020 +0200

Simplify download process

Use hash to identify download and pass that to the client.
This allows us to reduce parameters for download requests.
DocBroker maps download ids to URL in the file system.

Change-Id: I254d4f0ccaf3cff9f038a817c8162510ae228bc5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101992
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Tested-by: Michael Meeks 
Reviewed-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102184
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 6ab9b6797..b3b7b43e7 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -952,7 +952,8 @@ bool ChildSession::downloadAs(const char* /*buffer*/, int 
/*length*/, const Stri
 
 // The file is removed upon downloading.
 const std::string tmpDir = FileUtil::createRandomDir(jailDoc);
-const std::string url = jailDoc + tmpDir + "/" + 
filenameParam.getFileName();
+const std::string urlToSend = tmpDir + "/" + filenameParam.getFileName();
+const std::string url = jailDoc + urlToSend;
 const std::string urlAnonym = jailDoc + tmpDir + "/" + 
Poco::Path(nameAnonym).getFileName();
 
 LOG_DBG("Calling LOK's saveAs with: url='" << urlAnonym << "', format='" <<
@@ -963,7 +964,12 @@ bool ChildSession::downloadAs(const char* /*buffer*/, int 
/*length*/, const Stri
format.empty() ? nullptr : format.c_str(),
filterOptions.empty() ? nullptr : 
filterOptions.c_str());
 
-sendTextFrame("downloadas: jail=" + _jailId + " dir=" + tmpDir + " name=" 
+ name +
+// Register download id -> URL mapping in the DocumentBroker
+std::string docBrokerMessage = "registerdownload: downloadid=" + tmpDir + 
" url=" + urlToSend;
+_docManager->sendFrame(docBrokerMessage.c_str(), 
docBrokerMessage.length());
+
+// Send download id to the client
+sendTextFrame("downloadas: downloadid=" + tmpDir +
   " port=" + std::to_string(ClientPortNumber) + " id=" + id);
 #endif
 return true;
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 80decbee2..b5757c717 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -1106,6 +1106,9 @@ L.Socket = L.Class.extend({
else if (tokens[i].substring(0, 4) === 'dir=') {
command.dir = tokens[i].substring(4);
}
+   else if (tokens[i].substring(0, 11) === 'downloadid=') {
+   command.downloadid = tokens[i].substring(11);
+   }
else if (tokens[i].substring(0, 5) === 'name=') {
command.name = tokens[i].substring(5);
}
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index ded1b572c..3e2223e88 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -909,7 +909,7 @@ L.TileLayer = L.GridLayer.extend({
wopiSrc = '?WOPISrc=' + this._map.options.wopiSrc;
}
var url = this._map.options.webserver + 
this._map.options.serviceRoot + '/' + this._map.options.urlPrefix + '/' +
-   encodeURIComponent(this._map.options.doc) + '/' + 
command.jail + '/' + command.dir + '/' + command.name + wopiSrc;
+   encodeURIComponent(this._map.options.doc) + 
'/download/' + command.downloadid + wopiSrc;
 
this._map.hideBusy();
if (this._map['wopi'].DownloadAsPostMessage) {
diff --git a/test/UnitSession.cpp b/test/UnitSession.cpp
index f8b859fa1..4f872f982 100644
--- a/test/UnitSession.cpp
+++ b/test/UnitSession.cpp
@@ -185,22 +185,18 @@ UnitBase::TestResult UnitSession::testSlideShow()
!response.empty());
 
 StringVector tokens(LOOLProtocol::tokenize(response.substr(11), ' '));
-// "downloadas: jail= dir= name=slideshow.svg port= id=slideshow"
-const std::string jail = tokens[0].substr(std::string("jail=").size());
-const std::string dir = tokens[1].substr(std:

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

2020-09-08 Thread Stefanenko (via logerrit)
 sw/inc/AccessibilityCheckStrings.hrc |1 
 sw/source/core/access/AccessibilityCheck.cxx |   34 +++
 2 files changed, 35 insertions(+)

New commits:
commit 0655e72add8386642abdf6e2990c5af7532b32a6
Author: Stefanenko 
AuthorDate: Thu Sep 3 13:20:35 2020 +0300
Commit: Mike Kaganski 
CommitDate: Tue Sep 8 12:32:16 2020 +0200

tdf#136468 Added a new check for objects and nodes.

Floating objects with text create problems with reading order
A new check for floating text field inserted into checkObject function and 
into node-checking mechanism.

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

diff --git a/sw/inc/AccessibilityCheckStrings.hrc 
b/sw/inc/AccessibilityCheckStrings.hrc
index 874f910f324d..5583d0fa6419 100644
--- a/sw/inc/AccessibilityCheckStrings.hrc
+++ b/sw/inc/AccessibilityCheckStrings.hrc
@@ -24,6 +24,7 @@
 #define STR_HEADINGS_NOT_IN_ORDER   NC_("STR_HEADINGS_NOT_IN_ORDER", 
"Headings not in order.")
 #define STR_TEXT_FORMATTING_CONVEYS_MEANING 
NC_("STR_TEXT_FORMATTING_CONVEYS_MEANING", "The text formatting conveys 
additional meaning.")
 #define STR_NON_INTERACTIVE_FORMS   NC_("STR_NON_INTERACTIVE_FORMS", "An 
input form is not interactive.")
+#define STR_FLOATING_TEXT   NC_("STR_FLOATING_TEXT", "Avoid 
floating text.")
 
 #define STR_DOCUMENT_DEFAULT_LANGUAGE   NC_("STR_DOCUMENT_DEFAULT_LANGUAGE", 
"Document default language is not set")
 #define STR_STYLE_NO_LANGUAGE   NC_("STR_STYLE_NO_LANGUAGE", "Style 
'%STYLE_NAME%' has no language set")
diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index ab5d5e2aa29a..72c127ae6b8c 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -32,6 +32,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 namespace sw
 {
@@ -664,6 +667,30 @@ public:
 }
 };
 
+/// Check for floating text frames, as it causes problems with reading order.
+class FloatingTextCheck : public NodeCheck
+{
+public:
+FloatingTextCheck(sfx::AccessibilityIssueCollection& rIssueCollection)
+: NodeCheck(rIssueCollection)
+{
+}
+
+void check(SwNode* pCurrent) override
+{
+// if node is a text-node and if it has text, we proceed. Otherwise - 
return.
+const SwTextNode* textNode = pCurrent->GetTextNode();
+if (!textNode || textNode->GetText().isEmpty())
+return;
+
+// If a node is in fly and if it is not anchored as char, throw 
warning.
+const SwNode* startFly = pCurrent->FindFlyStartNode();
+if (startFly
+&& startFly->GetFlyFormat()->GetAnchor().GetAnchorId() != 
RndStdIds::FLY_AS_CHAR)
+lclAddIssue(m_rIssueCollection, SwResId(STR_FLOATING_TEXT));
+}
+};
+
 class DocumentCheck : public BaseCheck
 {
 public:
@@ -772,6 +799,12 @@ void AccessibilityCheck::checkObject(SdrObject* pObject)
 if (!pObject)
 return;
 
+// Checking if there is floating Writer text draw object and if so, 
throwing a warning.
+// (Floating objects with text create problems with reading order)
+if (pObject->HasText()
+&& FindFrameFormat(pObject)->GetAnchor().GetAnchorId() != 
RndStdIds::FLY_AS_CHAR)
+lclAddIssue(m_aIssueCollection, SwResId(STR_FLOATING_TEXT));
+
 if (pObject->GetObjIdentifier() == OBJ_CUSTOMSHAPE || 
pObject->GetObjIdentifier() == OBJ_TEXT)
 {
 OUString sAlternative = pObject->GetTitle();
@@ -809,6 +842,7 @@ void AccessibilityCheck::check()
 aNodeChecks.push_back(std::make_unique(m_aIssueCollection));
 
aNodeChecks.push_back(std::make_unique(m_aIssueCollection));
 
aNodeChecks.push_back(std::make_unique(m_aIssueCollection));
+
aNodeChecks.push_back(std::make_unique(m_aIssueCollection));
 
 auto const& pNodes = m_pDoc->GetNodes();
 SwNode* pNode = nullptr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - kit/ChildSession.cpp loleaflet/src test/UnitSession.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp wsd/LOOLWSD.cpp

2020-09-08 Thread Szymon Kłos (via logerrit)
 kit/ChildSession.cpp  |   10 ++-
 loleaflet/src/core/Socket.js  |3 ++
 loleaflet/src/layer/tile/TileLayer.js |2 -
 test/UnitSession.cpp  |   16 
 wsd/DocumentBroker.cpp|   27 
 wsd/DocumentBroker.hpp|9 ++
 wsd/LOOLWSD.cpp   |   45 --
 7 files changed, 71 insertions(+), 41 deletions(-)

New commits:
commit 3a821c2af65505e0ac6d317d7141dc5475f13730
Author: Szymon Kłos 
AuthorDate: Thu Sep 3 11:34:13 2020 +0200
Commit: Andras Timar 
CommitDate: Tue Sep 8 12:31:21 2020 +0200

Simplify download process

Use hash to identify download and pass that to the client.
This allows us to reduce parameters for download requests.
DocBroker maps download ids to URL in the file system.

Change-Id: I254d4f0ccaf3cff9f038a817c8162510ae228bc5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101992
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Tested-by: Michael Meeks 
Reviewed-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102185
Reviewed-by: Andras Timar 

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 4a5aebcb8..5c7df7272 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -952,7 +952,8 @@ bool ChildSession::downloadAs(const char* /*buffer*/, int 
/*length*/, const Stri
 
 // The file is removed upon downloading.
 const std::string tmpDir = FileUtil::createRandomDir(jailDoc);
-const std::string url = jailDoc + tmpDir + "/" + 
filenameParam.getFileName();
+const std::string urlToSend = tmpDir + "/" + filenameParam.getFileName();
+const std::string url = jailDoc + urlToSend;
 const std::string urlAnonym = jailDoc + tmpDir + "/" + 
Poco::Path(nameAnonym).getFileName();
 
 LOG_DBG("Calling LOK's saveAs with: url='" << urlAnonym << "', format='" <<
@@ -963,7 +964,12 @@ bool ChildSession::downloadAs(const char* /*buffer*/, int 
/*length*/, const Stri
format.empty() ? nullptr : format.c_str(),
filterOptions.empty() ? nullptr : 
filterOptions.c_str());
 
-sendTextFrame("downloadas: jail=" + _jailId + " dir=" + tmpDir + " name=" 
+ name +
+// Register download id -> URL mapping in the DocumentBroker
+std::string docBrokerMessage = "registerdownload: downloadid=" + tmpDir + 
" url=" + urlToSend;
+_docManager->sendFrame(docBrokerMessage.c_str(), 
docBrokerMessage.length());
+
+// Send download id to the client
+sendTextFrame("downloadas: downloadid=" + tmpDir +
   " port=" + std::to_string(ClientPortNumber) + " id=" + id);
 #endif
 return true;
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 95588578e..32a601aca 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -1132,6 +1132,9 @@ L.Socket = L.Class.extend({
else if (tokens[i].substring(0, 4) === 'dir=') {
command.dir = tokens[i].substring(4);
}
+   else if (tokens[i].substring(0, 11) === 'downloadid=') {
+   command.downloadid = tokens[i].substring(11);
+   }
else if (tokens[i].substring(0, 5) === 'name=') {
command.name = tokens[i].substring(5);
}
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index ba0157ac7..7e46e112b 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -914,7 +914,7 @@ L.TileLayer = L.GridLayer.extend({
wopiSrc = '?WOPISrc=' + this._map.options.wopiSrc;
}
var url = this._map.options.webserver + 
this._map.options.serviceRoot + '/' + this._map.options.urlPrefix + '/' +
-   encodeURIComponent(this._map.options.doc) + '/' + 
command.jail + '/' + command.dir + '/' + command.name + wopiSrc;
+   encodeURIComponent(this._map.options.doc) + 
'/download/' + command.downloadid + wopiSrc;
 
this._map.hideBusy();
if (this._map['wopi'].DownloadAsPostMessage) {
diff --git a/test/UnitSession.cpp b/test/UnitSession.cpp
index ec8d1f9bf..bbff4a09e 100644
--- a/test/UnitSession.cpp
+++ b/test/UnitSession.cpp
@@ -185,15 +185,11 @@ UnitBase::TestResult UnitSession::testSlideShow()
!response.empty());
 
 StringVector tokens(Util::tokenize(response.substr(11), ' '));
-// "downloadas: jail= dir= name=slideshow.svg port= id=slideshow"
-const std::string jail = tokens[0].substr(std::string("jail=").size());
-const std::string dir = tokens[1].substr(std::string("dir=").size());
-const std::s

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - filter/qa filter/source

2020-09-08 Thread Miklos Vajna (via logerrit)
 filter/qa/unit/data/shape-nographic.odp |binary
 filter/qa/unit/svg.cxx  |   19 +++
 filter/source/svg/svgexport.cxx |3 ++-
 filter/source/svg/svgwriter.cxx |5 -
 4 files changed, 25 insertions(+), 2 deletions(-)

New commits:
commit 5ebfd7e82fef5c8cf509917ea7f04bc1314be0f7
Author: Miklos Vajna 
AuthorDate: Mon Sep 7 17:00:44 2020 +0200
Commit: Miklos Vajna 
CommitDate: Tue Sep 8 12:27:32 2020 +0200

SVG export: fix failure on trying to read graphic of a 3D shape

Regression from commit 8fc1b60f62c213a0476f3acc9f89cd5eccbf335d (sw SVG
export: try to reuse original bitmap data for JPG and PNG bitmaps,
2020-02-27), which generalized the code that tries to get the original
bitmap of shapes for performance reasons. Originally this worked with
SdrGrafObj, but now we try every XShape which has a Graphic property.

Add the missing check, so shapes without a graphic property just miss
the fast path, but doesn't fail the entire SVG export.

(cherry picked from commit fbcdbfef8664430e15b9429187b58dede992accf)

Conflicts:
filter/qa/unit/svg.cxx
filter/source/svg/svgexport.cxx

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

diff --git a/filter/qa/unit/data/shape-nographic.odp 
b/filter/qa/unit/data/shape-nographic.odp
new file mode 100644
index ..43186d614986
Binary files /dev/null and b/filter/qa/unit/data/shape-nographic.odp differ
diff --git a/filter/qa/unit/svg.cxx b/filter/qa/unit/svg.cxx
index 4ef95bebdc65..36c7e643466d 100644
--- a/filter/qa/unit/svg.cxx
+++ b/filter/qa/unit/svg.cxx
@@ -120,6 +120,25 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testPreserveJpg)
 #endif
 }
 
+CPPUNIT_TEST_FIXTURE(SvgFilterTest, testShapeNographic)
+{
+// Load a document containing a 3D shape.
+load("shape-nographic.odp");
+
+// Export to SVG.
+uno::Reference xStorable(getComponent(), 
uno::UNO_QUERY_THROW);
+SvMemoryStream aStream;
+uno::Reference xOut = new 
utl::OOutputStreamWrapper(aStream);
+utl::MediaDescriptor aMediaDescriptor;
+aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export");
+aMediaDescriptor["OutputStream"] <<= xOut;
+
+// Without the accompanying fix in place, this test would have failed with:
+// An uncaught exception of type com.sun.star.io.IOException
+// - SfxBaseModel::impl_store  failed: 0xc10(Error Area:Io 
Class:Write Code:16)
+xStorable->storeToURL("private:stream", 
aMediaDescriptor.getAsConstPropertyValueList());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index accbab0d6965..ac16f7e754f6 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -56,6 +56,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -602,7 +603,7 @@ bool SVGFilter::implExportImpressOrDraw( const Reference< 
XOutputStream >& rxOSt
 {
 delete mpSVGDoc;
 mpSVGDoc = nullptr;
-OSL_FAIL( "Exception caught" );
+SAL_WARN("filter.svg", "Exception caught");
 }
 
 if( nullptr != pSdrModel )
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 1ea8af01e6eb..1558836a21e9 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2693,7 +2693,10 @@ void GetGraphicFromXShape(const 
css::uno::Reference* pShap
 }
 
 uno::Reference xGraphic;
-xPropertySet->getPropertyValue("Graphic") >>= xGraphic;
+if (xPropertySet->getPropertySetInfo()->hasPropertyByName("Graphic"))
+{
+xPropertySet->getPropertyValue("Graphic") >>= xGraphic;
+}
 rGraphic= Graphic(xGraphic);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - include/sfx2 xmlsecurity/source xmlsecurity/uiconfig

2020-09-08 Thread Miklos Vajna (via logerrit)
 include/sfx2/strings.hrc   |4 ++--
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |   15 ++-
 xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui |4 ++--
 3 files changed, 14 insertions(+), 9 deletions(-)

New commits:
commit 46efad443472679b93b282c8e08b807d7e8f1a78
Author: Miklos Vajna 
AuthorDate: Wed Sep 2 12:37:18 2020 +0200
Commit: Caolán McNamara 
CommitDate: Tue Sep 8 12:23:20 2020 +0200

xmlsecurity: avoid saying OK when the signature is partial

That's reserved for valid signatures (digest match, certificate
validates and the signature covers the whole document).

Also avoid "invalid" in the dialog when the digest matches and the
signature is just incomplete.

This now uses wording which is closer to Acrobat and also uses the same
wording on the infobar and in the dialog.

Change-Id: I26e4781d555b65cf29aa8df2232e286917235dc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101926
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102188
Reviewed-by: Caolán McNamara 

diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index 7e9757e61a78..1f21f0a0f186 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -292,8 +292,8 @@
 #define STR_READONLY_SIGN   NC_("STR_READONLY_SIGN", "Sign 
Document")
 #define STR_SIGNATURE_BROKENNC_("STR_SIGNATURE_BROKEN", 
"This document has an invalid signature.")
 #define STR_SIGNATURE_INVALID   NC_("STR_SIGNATURE_INVALID", 
"The signature was valid, but the document has been modified")
-#define STR_SIGNATURE_NOTVALIDATED  
NC_("STR_SIGNATURE_NOTVALIDATED", "The signature is OK, but the certificate 
could not be validated.")
-#define STR_SIGNATURE_PARTIAL_OK
NC_("STR_SIGNATURE_PARTIAL_OK", "The signature is OK, but the document is only 
partially signed.")
+#define STR_SIGNATURE_NOTVALIDATED  
NC_("STR_SIGNATURE_NOTVALIDATED", "At least one signature has problems: the 
certificate could not be validated.")
+#define STR_SIGNATURE_PARTIAL_OK
NC_("STR_SIGNATURE_PARTIAL_OK", "At least one signature has problems: the 
document is only partially signed.")
 #define STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK   
NC_("STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK", "The certificate could not be 
validated and the document is only partially signed.")
 #define STR_SIGNATURE_OKNC_("STR_SIGNATURE_OK", "This 
document is digitally signed and the signature is valid.")
 #define STR_SIGNATURE_SHOW  NC_("STR_SIGNATURE_SHOW", 
"Show Signatures")
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 
b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index ff5161fb2754..ef67c7167c04 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -531,6 +531,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 size_t nInfos = 
maSignatureManager.getCurrentSignatureInformations().size();
 size_t nValidSigs = 0, nValidCerts = 0;
 bool bAllNewSignatures = true;
+bool bSomePartial = false;
 
 if( nInfos )
 {
@@ -607,7 +608,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 {
 if (maSignatureManager.getStore().is())
 {
-// XML based.
+// ZIP based.
 bSigValid = 
DocumentSignatureHelper::checkIfAllFilesAreSigned(
   aElementsToBeVerified, rInfo, mode);
 }
@@ -619,6 +620,10 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 
 if( bSigValid )
 nValidSigs++;
+else
+{
+bSomePartial = true;
+}
 }
 
 OUString sImage;
@@ -672,8 +677,8 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 
 bool bShowInvalidState = nInfos && !bAllSigsValid;
 
-m_xSigsInvalidImg->set_visible( bShowInvalidState );
-m_xSigsInvalidFI->set_visible( bShowInvalidState );
+m_xSigsInvalidImg->set_visible( bShowInvalidState && !bSomePartial);
+m_xSigsInvalidFI->set_visible( bShowInvalidState && !bSomePartial);
 
 bool bShowNotValidatedState = nInfos && bAllSigsValid && !bAllCertsValid;
 
@@ -682,8 +687,8 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 
 //bAllNewSignatures is always true if we are not in document mode
 bool bShowOldSignature = nInfos && bAllSigsValid && bAllCertsValid && 
!bAllNewSignatures;
-m_xSigsOldSignatureImg->set_visible(bShowOldSignature);
-m_xSigsOldSignatureFI->set_visible(bShowOldSignature);
+m_xSigsOldSignatureImg->set_visible(bShowOldSignature || bSomePartial);
+m_xSigsOldSignatureFI->se

[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - include/vcl svx/source vcl/Library_vcl.mk vcl/qa vcl/source

2020-09-08 Thread Tomaž Vajngerl (via logerrit)
 include/vcl/filter/PDFiumLibrary.hxx   |   43 +
 svx/source/inc/svdpdf.hxx  |4 +++
 svx/source/svdraw/svdpdf.cxx   |   14 +-
 vcl/Library_vcl.mk |1 
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   20 +++
 vcl/source/filter/ipdf/pdfread.cxx |   26 +++
 vcl/source/pdf/PDFiumLibrary.cxx   |   36 +++
 7 files changed, 95 insertions(+), 49 deletions(-)

New commits:
commit 88457a3b5e40e030fe9531f3e2267c653a563d58
Author: Tomaž Vajngerl 
AuthorDate: Sun May 31 11:50:20 2020 +0200
Commit: Caolán McNamara 
CommitDate: Tue Sep 8 12:21:02 2020 +0200

pdfium: only init pdfium library one and destroy on LO exit

With more and more usage of PDFium, it is hard to keep track of
the life-time of the PDFium library, so it can happen that a
FPDF_DestroyLibrary happens when we still have another instance
where PDFium is still use. The result of this is a crash. To
prevent this, just initialize the library once and delete, when
on LO exit.

This can be improved in the future to only keep the library
active when in actual use.

[ Leaving out the vector graphic search bits, the motivation is to just
have this in libreoffice-7-0, so that recent pdf sig verify improvements
can be backported. ]

(cherry picked from commit 067a8a954c8e1d8d6465a4ab5fb61e93f16c26c2)

Conflicts:
vcl/source/graphic/VectorGraphicSearch.cxx

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

diff --git a/include/vcl/filter/PDFiumLibrary.hxx 
b/include/vcl/filter/PDFiumLibrary.hxx
new file mode 100644
index ..bc7912c17e81
--- /dev/null
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include 
+
+#if HAVE_FEATURE_PDFIUM
+
+#include 
+#include 
+#include 
+
+namespace vcl::pdf
+{
+class VCL_DLLPUBLIC PDFium final
+{
+private:
+PDFium(const PDFium&) = delete;
+PDFium& operator=(const PDFium&) = delete;
+
+public:
+PDFium();
+~PDFium();
+};
+
+struct PDFiumLibrary : public rtl::StaticWithInit, 
PDFiumLibrary>
+{
+std::shared_ptr operator()() { return std::make_shared(); }
+};
+
+} // namespace vcl::pdf
+
+#endif // HAVE_FEATURE_PDFIUM
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/inc/svdpdf.hxx b/svx/source/inc/svdpdf.hxx
index 9b48eb1d30c5..1f02b2151594 100644
--- a/svx/source/inc/svdpdf.hxx
+++ b/svx/source/inc/svdpdf.hxx
@@ -42,6 +42,8 @@
 #include 
 #include 
 
+#include 
+
 // Forward Declarations
 
 class SfxItemSet;
@@ -100,6 +102,8 @@ class SVXCORE_DLLPUBLIC ImpSdrPdfImport final
 tools::Rectangle PointsToLogic(double left, double right, double top, 
double bottom) const;
 Point PointsToLogic(double x, double y) const;
 
+std::shared_ptr mpPDFium;
+
 // check for clip and evtl. fill maClip
 void checkClip();
 bool isClip() const;
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 5cd0c0765a29..188651be386c 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -116,6 +116,7 @@ ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, 
SdrLayerID nLay, const tools:
 , mnPageCount(0)
 , mdPageWidthPts(0)
 , mdPageHeightPts(0)
+, mpPDFium(vcl::pdf::PDFiumLibrary::get())
 {
 mpVD->EnableOutput(false);
 mpVD->SetLineColor();
@@ -129,13 +130,6 @@ ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, 
SdrLayerID nLay, const tools:
   svl::Items{});
 checkClip();
 
-FPDF_LIBRARY_CONFIG aConfig;
-aConfig.version = 2;
-aConfig.m_pUserFontPaths = nullptr;
-aConfig.m_pIsolate = nullptr;
-aConfig.m_v8EmbedderSlot = 0;
-FPDF_InitLibraryWithConfig(&aConfig);
-
 // Load the buffer using pdfium.
 auto const& rVectorGraphicData = rGraphic.getVectorGraphicData();
 mpPdfDocument = FPDF_LoadMemDocument(
@@ -170,11 +164,7 @@ ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, 
SdrLayerID nLay, const tools:
 mnPageCount = FPDF_GetPageCount(mpPdfDocument);
 }
 
-ImpSdrPdfImport::~ImpSdrPdfImport()
-{
-FPDF_CloseDocument(mpPdfDocument);
-FPDF_DestroyLibrary();
-}
+ImpSdrPdfImport::~ImpSdrPdfImport() { FPDF_CloseDocument(mpPdfDocument); }
 
 void ImpSdrPdfImport::DoObjects(SvdProgressInfo* pProgrInfo, sal_uInt32* 
pActionsToReport,
 int nPageIndex)
diff --g

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

2020-09-08 Thread Szymon Kłos (via logerrit)
 svx/source/inc/StylesPreviewToolBoxControl.hxx  |2 
 svx/source/inc/StylesPreviewWindow.hxx  |   18 ---
 svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx |   10 +++-
 svx/source/tbxctrls/StylesPreviewWindow.cxx |   47 
 4 files changed, 49 insertions(+), 28 deletions(-)

New commits:
commit e40010a530778efde26ab20b2a2e8f9dbf7d55ee
Author: Szymon Kłos 
AuthorDate: Mon Aug 31 13:05:31 2020 +0200
Commit: Szymon Kłos 
CommitDate: Tue Sep 8 11:22:34 2020 +0200

Styles preview widget language independent

Use both english / universal and translated names
to identify a style.

Change-Id: Ibd8b23e678e8bea5773d1da97adf5201377b4453
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101832
Tested-by: Jenkins CollaboraOffice 
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 

diff --git a/svx/source/inc/StylesPreviewToolBoxControl.hxx 
b/svx/source/inc/StylesPreviewToolBoxControl.hxx
index c42c5ba09fd2..8de721ab0032 100644
--- a/svx/source/inc/StylesPreviewToolBoxControl.hxx
+++ b/svx/source/inc/StylesPreviewToolBoxControl.hxx
@@ -36,7 +36,7 @@ class SVX_DLLPUBLIC StylesPreviewToolBoxControl final
 
 css::uno::Reference m_xDispatchProvider;
 
-std::vector m_aDefaultStyles;
+std::vector> m_aDefaultStyles;
 
 public:
 StylesPreviewToolBoxControl();
diff --git a/svx/source/inc/StylesPreviewWindow.hxx 
b/svx/source/inc/StylesPreviewWindow.hxx
index 5ae857210c6f..26ba93d7be79 100644
--- a/svx/source/inc/StylesPreviewWindow.hxx
+++ b/svx/source/inc/StylesPreviewWindow.hxx
@@ -44,19 +44,19 @@ class StyleItemController : public 
weld::CustomWidgetController
 static constexpr unsigned LEFT_MARGIN = 8;
 
 SfxStyleFamily m_eStyleFamily;
-OUString m_aStyleName;
+std::pair m_aStyleName;
 bool m_bSelected;
 css::uno::Reference m_xDispatchProvider;
 
 public:
-StyleItemController(const OUString& aStyleName,
+StyleItemController(const std::pair& aStyleName,
 css::uno::Reference& 
xDispatchProvider);
 
 void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& 
rRect) override;
 
 bool MouseButtonDown(const MouseEvent&) override;
 
-void SetStyle(const OUString& sStyleName);
+void SetStyle(const std::pair& sStyleName);
 
 void Select(bool bSelect);
 
@@ -83,8 +83,8 @@ protected:
 std::unique_ptr m_xUp;
 std::unique_ptr m_xDown;
 
-std::vector m_aDefaultStyles;
-std::vector m_aAllStyles;
+std::vector> m_aDefaultStyles;
+std::vector> m_aAllStyles;
 
 unsigned m_nStyleIterator;
 OUString m_sSelectedStyle;
@@ -93,7 +93,8 @@ protected:
 DECL_LINK(GoDown, const OString&, void);
 
 public:
-StylesPreviewWindow_Base(weld::Builder& xBuilder, std::vector& 
aDefaultStyles,
+StylesPreviewWindow_Base(weld::Builder& xBuilder,
+ std::vector>& 
aDefaultStyles,
  
css::uno::Reference& xDispatchProvider);
 ~StylesPreviewWindow_Base();
 
@@ -103,13 +104,14 @@ private:
 void Update();
 void UpdateStylesList();
 void MakeCurrentStyleVisible();
-OUString GetVisibleStyle(unsigned nPosition);
+std::pair GetVisibleStyle(unsigned nPosition);
 };
 
 class StylesPreviewWindow_Impl : public InterimItemWindow, public 
StylesPreviewWindow_Base
 {
 public:
-StylesPreviewWindow_Impl(vcl::Window* pParent, std::vector& 
aDefaultStyles,
+StylesPreviewWindow_Impl(vcl::Window* pParent,
+ std::vector>& 
aDefaultStyles,
  
css::uno::Reference& xDispatchProvider);
 ~StylesPreviewWindow_Impl();
 
diff --git a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx 
b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
index 0a95aa5397e5..9acf4a517194 100644
--- a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
+++ b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
@@ -80,7 +80,10 @@ void StylesPreviewToolBoxControl::InitializeStyles(
 OUString sName;
 xStyle->getPropertyValue("DisplayName") >>= sName;
 if (!sName.isEmpty())
-m_aDefaultStyles.push_back(sName);
+m_aDefaultStyles.push_back(std::pair(aStyle, sName));
+}
+catch (const css::container::NoSuchElementException&)
+{
 }
 catch (const css::uno::Exception&)
 {
@@ -104,7 +107,10 @@ void StylesPreviewToolBoxControl::InitializeStyles(
 OUString sName;
 xStyle->getPropertyValue("DisplayName") >>= sName;
 if (!sName.isEmpty())
-m_aDefaultStyles.push_back(sName);
+{
+m_aDefaultStyles.push_back(
+std::pair(sStyleName, 
sName));
+ 

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

2020-09-08 Thread Szymon Kłos (via logerrit)
 sw/source/core/doc/DocumentStylePoolManager.cxx |   11 +++
 sw/source/core/edit/edfcol.cxx  |   13 +
 2 files changed, 24 insertions(+)

New commits:
commit ca435be45f316120b9df6c9d547b781ed975817d
Author: Szymon Kłos 
AuthorDate: Mon Aug 31 12:49:46 2020 +0200
Commit: Szymon Kłos 
CommitDate: Tue Sep 8 11:21:36 2020 +0200

writer: handle styles in multiple languages for online

Use translated name when style is applied and broadcasted.
Avoid using style names created by the first view.

Change-Id: I18abf3388e69f76ec99eda94e0b67782a52ab23f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101831
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx 
b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 23529c16ff9e..f13c55f72dc2 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -69,6 +69,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::editeng;
 using namespace ::com::sun::star;
@@ -583,10 +584,20 @@ SwTextFormatColl* 
DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
 
 SwTextFormatColl* pNewColl;
 sal_uInt16 nOutLvlBits = 0;
+
 for (size_t n = 0, nSize = m_rDoc.GetTextFormatColls()->size(); n < nSize; 
++n)
 {
 if( nId == ( pNewColl = (*m_rDoc.GetTextFormatColls())[ n ] 
)->GetPoolFormatId() )
 {
+// in online we can have multiple languages, use translated name
+if (comphelper::LibreOfficeKit::isActive())
+{
+OUString aName;
+SwStyleNameMapper::GetUIName(nId, aName);
+if (!aName.isEmpty())
+pNewColl->SetName(aName);
+}
+
 return pNewColl;
 }
 
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 2b49ee16ecc8..830402d2d60c 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -100,6 +100,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #define WATERMARK_NAME "PowerPlusWaterMarkObject"
 #define WATERMARK_AUTO_SIZE sal_uInt32(1)
@@ -2196,6 +2198,17 @@ void SwEditShell::SetTextFormatColl(SwTextFormatColl 
*pFormat,
 RedlineFlags eRedlMode = 
GetDoc()->getIDocumentRedlineAccess().GetRedlineFlags(), eOldMode = eRedlMode;
 
 SwRewriter aRewriter;
+
+// in online we can have multiple languages, use universal name then
+if (comphelper::LibreOfficeKit::isActive())
+{
+OUString aName;
+sal_uInt16 nId = 
SwStyleNameMapper::GetPoolIdFromUIName(pLocal->GetName(), 
SwGetPoolIdFromName::TxtColl);
+SwStyleNameMapper::FillProgName(nId, aName);
+if (!aName.isEmpty())
+pLocal->SetName(aName);
+}
+
 aRewriter.AddRule(UndoArg1, pLocal->GetName());
 
 GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::SETFMTCOLL, 
&aRewriter);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Szymon Kłos (via logerrit)
 sw/source/core/doc/DocumentStylePoolManager.cxx |  161 ++--
 sw/source/core/doc/SwStyleNameMapper.cxx|   14 +-
 2 files changed, 135 insertions(+), 40 deletions(-)

New commits:
commit 8ddd66a36e5e54291e56c1a5804d5db3b1ba16bb
Author: Szymon Kłos 
AuthorDate: Fri Aug 28 13:43:13 2020 +0200
Commit: Szymon Kłos 
CommitDate: Tue Sep 8 11:21:13 2020 +0200

writer: translate standard styles for online

in online we can have multiple users with different UI language

Change-Id: I8fac53391832acace29388cdbca2c18853ef1690
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101830
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx 
b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 767af3a22010..23529c16ff9e 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -67,6 +67,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace ::editeng;
 using namespace ::com::sun::star;
@@ -2544,88 +2546,171 @@ lcl_NewUINameArray(const char** pIds, const size_t 
nLen, const size_t nSvxIds =
 
 const std::vector& SwStyleNameMapper::GetTextUINameArray()
 {
-static const std::vector s_aTextUINameArray(
-lcl_NewUINameArray(STR_POOLCOLL_TEXT_ARY, 
SAL_N_ELEMENTS(STR_POOLCOLL_TEXT_ARY)));
-return s_aTextUINameArray;
+LanguageTag aCurrentLanguage = SvtSysLocale().GetUILanguageTag();
+static std::map> s_aTextUINameArray;
+
+auto aFound = s_aTextUINameArray.find(aCurrentLanguage);
+if (aFound == s_aTextUINameArray.end()) {
+s_aTextUINameArray[aCurrentLanguage] =
+lcl_NewUINameArray(STR_POOLCOLL_TEXT_ARY, 
SAL_N_ELEMENTS(STR_POOLCOLL_TEXT_ARY));
+}
+
+return s_aTextUINameArray[aCurrentLanguage];
 }
 
 const std::vector& SwStyleNameMapper::GetListsUINameArray()
 {
-static const std::vector s_aListsUINameArray(
-lcl_NewUINameArray(STR_POOLCOLL_LISTS_ARY, 
SAL_N_ELEMENTS(STR_POOLCOLL_LISTS_ARY)));
-return s_aListsUINameArray;
+LanguageTag aCurrentLanguage = SvtSysLocale().GetUILanguageTag();
+static std::map> s_aListsUINameArray;
+
+auto aFound = s_aListsUINameArray.find(aCurrentLanguage);
+if (aFound == s_aListsUINameArray.end()) {
+s_aListsUINameArray[aCurrentLanguage] =
+lcl_NewUINameArray(STR_POOLCOLL_LISTS_ARY, 
SAL_N_ELEMENTS(STR_POOLCOLL_LISTS_ARY));
+}
+
+return s_aListsUINameArray[aCurrentLanguage];
 }
 
 const std::vector& SwStyleNameMapper::GetExtraUINameArray()
 {
-static const std::vector s_aExtraUINameArray(
-lcl_NewUINameArray(STR_POOLCOLL_EXTRA_ARY, 
SAL_N_ELEMENTS(STR_POOLCOLL_EXTRA_ARY)));
-return s_aExtraUINameArray;
+LanguageTag aCurrentLanguage = SvtSysLocale().GetUILanguageTag();
+static std::map> s_aExtraUINameArray;
+
+auto aFound = s_aExtraUINameArray.find(aCurrentLanguage);
+if (aFound == s_aExtraUINameArray.end()) {
+s_aExtraUINameArray[aCurrentLanguage] =
+lcl_NewUINameArray(STR_POOLCOLL_EXTRA_ARY, 
SAL_N_ELEMENTS(STR_POOLCOLL_EXTRA_ARY));
+}
+
+return s_aExtraUINameArray[aCurrentLanguage];
 }
 
 const std::vector& SwStyleNameMapper::GetRegisterUINameArray()
 {
-static const std::vector s_aRegisterUINameArray(
-lcl_NewUINameArray(STR_POOLCOLL_REGISTER_ARY, 
SAL_N_ELEMENTS(STR_POOLCOLL_REGISTER_ARY)));
-return s_aRegisterUINameArray;
+LanguageTag aCurrentLanguage = SvtSysLocale().GetUILanguageTag();
+static std::map> s_aRegisterUINameArray;
+
+auto aFound = s_aRegisterUINameArray.find(aCurrentLanguage);
+if (aFound == s_aRegisterUINameArray.end()) {
+s_aRegisterUINameArray[aCurrentLanguage] =
+lcl_NewUINameArray(STR_POOLCOLL_REGISTER_ARY, 
SAL_N_ELEMENTS(STR_POOLCOLL_REGISTER_ARY));
+}
+
+return s_aRegisterUINameArray[aCurrentLanguage];
 }
 
 const std::vector& SwStyleNameMapper::GetDocUINameArray()
 {
-static const std::vector s_aDocUINameArray(
-lcl_NewUINameArray(STR_POOLCOLL_DOC_ARY, 
SAL_N_ELEMENTS(STR_POOLCOLL_DOC_ARY)));
-return s_aDocUINameArray;
+LanguageTag aCurrentLanguage = SvtSysLocale().GetUILanguageTag();
+static std::map> s_aDocUINameArray;
+
+auto aFound = s_aDocUINameArray.find(aCurrentLanguage);
+if (aFound == s_aDocUINameArray.end())
+s_aDocUINameArray[aCurrentLanguage] =
+lcl_NewUINameArray(STR_POOLCOLL_DOC_ARY, 
SAL_N_ELEMENTS(STR_POOLCOLL_DOC_ARY));
+
+return s_aDocUINameArray[aCurrentLanguage];
 }
 
 const std::vector& SwStyleNameMapper::GetHTMLUINameArray()
 {
-static const std::vector s_aHTMLUINameArray(
-lcl_NewUINameArray(STR_POOLCOLL_HTML_ARY, 
SAL_N_ELEMENTS(STR_POOLCOLL_HTML_ARY)));
-return s_aHTMLUINameArray;
+LanguageTag aCurrentLanguage = SvtSysLocale().GetUILanguageTag();
+static std::map> s_aHTMLUINameArray;
+
+auto aFound = s_aHTMLUIN

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

2020-09-08 Thread Szymon Kłos (via logerrit)
 framework/inc/uielement/uicommanddescription.hxx   |7 +
 framework/source/uiconfiguration/uicategorydescription.cxx |   11 +-
 framework/source/uielement/uicommanddescription.cxx|   50 +
 3 files changed, 50 insertions(+), 18 deletions(-)

New commits:
commit ce28e812b7b00f1d6c99a0c1ce76ddbd5a1a3a0e
Author: Szymon Kłos 
AuthorDate: Thu Sep 3 21:07:22 2020 +0200
Commit: Szymon Kłos 
CommitDate: Tue Sep 8 10:54:52 2020 +0200

lok: make labels and tooltips translated for commands

In the online we can have multiple sessions with
different languages so load cached translations only
if match current language

Change-Id: I6fcf23f1c340c0c0daffa8862f0b74e4e458c1fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102016
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/framework/inc/uielement/uicommanddescription.hxx 
b/framework/inc/uielement/uicommanddescription.hxx
index d2eb672cd71d..bf575113bbf9 100644
--- a/framework/inc/uielement/uicommanddescription.hxx
+++ b/framework/inc/uielement/uicommanddescription.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_FRAMEWORK_INC_UIELEMENT_UICOMMANDDESCRIPTION_HXX
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -30,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace framework
 {
@@ -81,12 +83,13 @@ public:
 protected:
 UICommandDescription( const css::uno::Reference< 
css::uno::XComponentContext>& rxContext, bool  );
 void impl_fillElements(const sal_Char* _pName);
+void ensureGenericUICommandsForLanguage(const LanguageTag& rLanguage);
 
 OUString  
m_aPrivateResourceURL;
 css::uno::Reference< css::uno::XComponentContext >m_xContext;
 ModuleToCommandFileMap
m_aModuleToCommandFileMap;
-UICommandsHashMap 
m_aUICommandsHashMap;
-css::uno::Reference< css::container::XNameAccess >
m_xGenericUICommands;
+std::map  
m_aUICommandsHashMap;
+std::map > m_xGenericUICommands;
 css::uno::Reference< css::frame::XModuleManager2 >
m_xModuleManager;
 };
 
diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx 
b/framework/source/uiconfiguration/uicategorydescription.cxx
index f7b1d3665033..d390a3e3301a 100644
--- a/framework/source/uiconfiguration/uicategorydescription.cxx
+++ b/framework/source/uiconfiguration/uicategorydescription.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -373,16 +374,18 @@ public:
 UICategoryDescription::UICategoryDescription( const Reference< 
XComponentContext >& rxContext ) :
 UICommandDescription(rxContext,true)
 {
+LanguageTag aCurrentLanguage = SvtSysLocale().GetUILanguageTag();
 Reference< XNameAccess > xEmpty;
 OUString aGenericCategories( "GenericCategories" );
-m_xGenericUICommands = new ConfigurationAccess_UICategory( 
aGenericCategories, xEmpty, rxContext );
+m_xGenericUICommands[aCurrentLanguage] = new 
ConfigurationAccess_UICategory( aGenericCategories, xEmpty, rxContext );
 
 // insert generic categories mappings
 m_aModuleToCommandFileMap.emplace( OUString("generic"), aGenericCategories 
);
 
-UICommandsHashMap::iterator pCatIter = m_aUICommandsHashMap.find( 
aGenericCategories );
-if ( pCatIter != m_aUICommandsHashMap.end() )
-pCatIter->second = m_xGenericUICommands;
+auto& rMap = m_aUICommandsHashMap[aCurrentLanguage];
+UICommandsHashMap::iterator pCatIter = rMap.find( aGenericCategories );
+if ( pCatIter != rMap.end() )
+pCatIter->second = m_xGenericUICommands[aCurrentLanguage];
 
 impl_fillElements("ooSetupFactoryCmdCategoryConfigRef");
 }
diff --git a/framework/source/uielement/uicommanddescription.cxx 
b/framework/source/uielement/uicommanddescription.cxx
index 02e41f47fcb3..73b21626ea32 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -554,21 +555,34 @@ void SAL_CALL ConfigurationAccess_UICommand::disposing( 
const EventObject& aEven
 }
 }
 
+void UICommandDescription::ensureGenericUICommandsForLanguage(const 
LanguageTag& rLanguage)
+{
+auto xGenericUICommands = m_xGenericUICommands.find(rLanguage);
+if (xGenericUICommands == m_xGenericUICommands.end())
+{
+Reference< XNameAccess > xEmpty;
+OUString aGenericUICommand( "GenericCommands" );
+m_xGenericUICommands[rLanguage] = new ConfigurationAccess_UICommand( 
aGenericUICommand, xEmpty, m_xContext );
+}
+}
+
 UICommandDescription::UICommandDescription(const Reference< XComponentContext 
>& rxContext)
 : UICommandDescription_BASE(m_aMutex)
 , m_aPrivateResourceURL(PRIVATE

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

2020-09-08 Thread Miklos Vajna (via logerrit)
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |   13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 1f7a2f913af1173d22a1bb1c9e2d014226f6c4d5
Author: Miklos Vajna 
AuthorDate: Mon Aug 31 13:34:17 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Sep 8 10:50:25 2020 +0200

xmlsecurity: fix infobar vs signature dialog inconsistency

The infobar mentioned if a signature is partial, but the dialog just has
a bool UI for signatures. Then present "good, but partial" as "bad".

(cherry picked from commit 3ba1144cb96c710e665ffb3ada26fb6a48a03472)

Change-Id: I698190aa77702000b11d635bd038d9c9a91614ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101844
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 8696c20cbf5c816ded9fee469616cb693b4572b0)

Conflicts:
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx

diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 
b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index bd2e2dedb3d9..7edf92536e86 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -626,8 +626,17 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 
 if ( bSigValid )
 {
- bSigValid = DocumentSignatureHelper::checkIfAllFilesAreSigned(
-  aElementsToBeVerified, rInfo, mode);
+if (maSignatureManager.getStore().is())
+{
+// XML based.
+bSigValid = 
DocumentSignatureHelper::checkIfAllFilesAreSigned(
+  aElementsToBeVerified, rInfo, mode);
+}
+else
+{
+// Assume PDF.
+bSigValid = !rInfo.bPartialDocumentSignature;
+}
 
 if( bSigValid )
 nValidSigs++;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/css

2020-09-08 Thread Pedro Pinto Silva (via logerrit)
 loleaflet/css/device-mobile.css |8 +---
 loleaflet/css/impress.css   |3 ++-
 loleaflet/css/toolbar.css   |   14 --
 3 files changed, 15 insertions(+), 10 deletions(-)

New commits:
commit 80542f6cf9646c89de54b6c7240ab6edbd7ba0f3
Author: Pedro Pinto Silva 
AuthorDate: Mon Sep 7 15:51:30 2020 +0200
Commit: Pedro Silva 
CommitDate: Tue Sep 8 10:25:57 2020 +0200

Fix inconsistencies wrt slide-sorter between impress and draw

- Inconsistencies between impress and draw (slide-sorter)
- Fix missing slide-sorter divider
- Mobile: Fix white borders
- Read-only mode inconsistencies (slide-sorter)
- Mobile: landscape: divider is present at the left edge of the screen 
(remove)
- #presentation-toolbar misaligned and lack bottom border

Change-Id: Ib45438e955f4e65b35bae67b5d0edbc510a4987c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102182
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pedro Silva 

diff --git a/loleaflet/css/device-mobile.css b/loleaflet/css/device-mobile.css
index 3329c79a0..890c0d612 100644
--- a/loleaflet/css/device-mobile.css
+++ b/loleaflet/css/device-mobile.css
@@ -674,7 +674,7 @@ td[id^=tb_spreadsheet-toolbar_item]:focus table.w2ui-button 
div.w2ui-icon, td[id
 }
 
 #document-container.portrait.readonly.parts-preview-document {
-   bottom: 65px;
+   bottom: 61px;
 }
 
 #document-container.portrait.parts-preview-document {
@@ -686,7 +686,9 @@ td[id^=tb_spreadsheet-toolbar_item]:focus table.w2ui-button 
div.w2ui-icon, td[id
 #document-container.portrait.parts-preview-document.keyboard {
bottom: 33px;
 }
-
+#document-container.portrait.parts-preview-document #map {
+   box-shadow: none;
+}
 #slide-sorter.portrait {
max-height: 60px;
 }
@@ -726,7 +728,7 @@ td[id^=tb_spreadsheet-toolbar_item]:focus table.w2ui-button 
div.w2ui-icon, td[id
 #document-container.landscape.parts-preview-document {
top: 41px;
left: 66px !important;
-   bottom: 33px;
+   bottom: 35px;
 }
 
 #document-container.landscape.readonly.parts-preview-document {
diff --git a/loleaflet/css/impress.css b/loleaflet/css/impress.css
index 13f3763f4..d9b0f296b 100644
--- a/loleaflet/css/impress.css
+++ b/loleaflet/css/impress.css
@@ -1,4 +1,5 @@
-.presentation-doctype #map{
+.presentation-doctype #map, .drawing-doctype #map{
+   border-collapse: separate; /*To use box-shadow in Internet Explorer 9 
or later, you must set border-collapse */
box-shadow: rgb(223, 223, 223) 0px 0px inset, #b6b6b6 1px 0px 0px inset;
 }
 #presentation-controls-wrapper {
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 6494a7e19..8e21f95df 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -87,12 +87,14 @@ w2ui-toolbar {
 }
 
 #presentation-toolbar {
-   background-color: #dfdfdf;
-   text-align: center;
-   position: absolute;
-   z-index: 500;
-   width: 98%;
-   padding: 0px 0px 10px 0px;
+   background-color: #dfdfdf;
+   text-align: center;
+   position: absolute;
+   z-index: 500;
+   width: 98%;
+   padding-bottom: 0px;
+   margin-top: -1px;
+   border-bottom: 1px solid #bb;
 }
 
 /* For MS Edge 40, the select2 combo boxes need to have higher z-index than 
#map
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - canvas/source include/vcl vcl/headless vcl/inc vcl/qt5 vcl/source vcl/unx

2020-09-08 Thread Caolán McNamara (via logerrit)
 canvas/source/cairo/cairo_canvashelper_text.cxx |4 
 canvas/source/cairo/cairo_textlayout.cxx|  227 +++-
 canvas/source/cairo/cairo_textlayout.hxx|5 
 include/vcl/outdev.hxx  |   15 +
 include/vcl/sysdata.hxx |   43 
 include/vcl/vcllayout.hxx   |3 
 vcl/headless/svptext.cxx|   10 +
 vcl/inc/headless/svpgdi.hxx |1 
 vcl/inc/qt5/Qt5Graphics.hxx |1 
 vcl/inc/salgdi.hxx  |6 
 vcl/inc/sallayout.hxx   |6 
 vcl/inc/textrender.hxx  |5 
 vcl/inc/unx/freetypetextrender.hxx  |3 
 vcl/inc/unx/genpspgraphics.h|2 
 vcl/inc/unx/glyphcache.hxx  |3 
 vcl/inc/unx/salgdi.h|1 
 vcl/qt5/Qt5Graphics.cxx |5 
 vcl/source/control/button.cxx   |1 
 vcl/source/gdi/sallayout.cxx|9 
 vcl/source/outdev/font.cxx  |   17 +
 vcl/source/outdev/text.cxx  |   61 ++
 vcl/unx/generic/gdi/font.cxx|9 
 vcl/unx/generic/gdi/freetypetextrender.cxx  |   23 ++
 vcl/unx/generic/print/genpspgraphics.cxx|5 
 24 files changed, 448 insertions(+), 17 deletions(-)

New commits:
commit ee18059ed6402eb0725048b3dd406852120a9faf
Author: Caolán McNamara 
AuthorDate: Mon Sep 7 19:53:02 2020 +0100
Commit: Xisco Fauli 
CommitDate: Tue Sep 8 10:22:17 2020 +0200

tdf#136545 revert cairo canvas uses cairo for text rendering already

This was the fallback path, so the problem must already exist in the 
uncommon
fallback case. I think I know the best approach to take, but for the 7-0 
case
be conservative and restore the historic state.

this reverts 770892a387361067d23ab08ed38690c50b8b9395 and associated
code removal

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

diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx 
b/canvas/source/cairo/cairo_canvashelper_text.cxx
index 830388775670..3b4d161417bd 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -254,7 +254,7 @@ namespace cairocanvas
 mpVirtualDevice->SetLayoutMode( nLayoutMode );
 
 rtl::Reference pTextLayout( new TextLayout(text, textDirection, 0, 
CanvasFont::Reference(dynamic_cast< CanvasFont* >( xFont.get() )), 
mpSurfaceProvider) );
-pTextLayout->draw(*mpVirtualDevice, aOutpos, viewState, 
renderState);
+pTextLayout->draw(mpCairo, *mpVirtualDevice, aOutpos, viewState, 
renderState);
 }
 
 return uno::Reference< rendering::XCachedPrimitive >(nullptr);
@@ -289,7 +289,7 @@ namespace cairocanvas
 return uno::Reference< rendering::XCachedPrimitive 
>(nullptr); // no output necessary
 
 // TODO(F2): What about the offset scalings?
-pTextLayout->draw(*mpVirtualDevice, aOutpos, viewState, 
renderState);
+pTextLayout->draw(mpCairo, *mpVirtualDevice, aOutpos, 
viewState, renderState);
 }
 }
 else
diff --git a/canvas/source/cairo/cairo_textlayout.cxx 
b/canvas/source/cairo/cairo_textlayout.cxx
index d81a739b4956..32a62c5ea790 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -77,6 +77,11 @@ namespace cairocanvas
 // as required at the API spec
 rOutDev.SetLayoutMode( nLayoutMode | 
ComplexTextLayoutFlags::TextOriginLeft );
 }
+
+bool compareFallbacks(const SystemGlyphData&rA, const SystemGlyphData 
&rB)
+{
+return rA.fallbacklevel < rB.fallbacklevel;
+}
 }
 
 TextLayout::TextLayout( const rendering::StringContext& aText,
@@ -256,6 +261,33 @@ namespace cairocanvas
 return maText;
 }
 
+  /**
+   * TextLayout::isCairoRenderable
+   *
+   * Features currently not supported by Cairo (VCL rendering is used as 
fallback):
+   * - vertical glyphs
+   *
+   * @return true, if text/font can be rendered with cairo
+   **/
+bool TextLayout::isCairoRenderable(SystemFontData aSysFontData) const
+{
+#if defined CAIRO_HAS_FT_FONT
+// is font usable?
+if (!aSysFontData.nFontId)
+return false;
+#endif
+
+// vertical glyph rendering is not supported in cairo for now
+if (aSysFontData.bVerticalCharacterType)
+{
+SAL_WARN("canvas.cairo", 
":cairocanvas::TextLayout::isCairoRenderable(): Vertical Character Style not 
supported");
+return false;
+}
+
+return true;
+}
+
+
   /

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

2020-09-08 Thread Samuel Mehrbrodt (via logerrit)
 drawinglayer/source/primitive2d/textlayoutdevice.cxx |   14 --
 1 file changed, 14 deletions(-)

New commits:
commit 60309df3a1d1643a20c29c6d8ea187894e6c45c0
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 19 06:05:46 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Sep 8 10:21:22 2020 +0200

tdf#127471 Remove font width scaling hack

Which causes distorted fonts in certain cases (see bug report).

Fix was suggested by Ilhan Yesil at 
https://bugs.documentfoundation.org/show_bug.cgi?id=127471#c6

Change-Id: Ie644f56f0835ffad9230f981d2927d6b4c17453d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100970
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 8891a2fc2a4bf86add68691b7ac167a07a8add84)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101960
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit b9306c4f721d3833296af144ac07dc2a064d1975)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102129
Tested-by: Thorsten Behrens 

diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx 
b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 9d07e1683d2f..1278f794590c 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -409,20 +409,6 @@ namespace drawinglayer
 aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : 
PITCH_VARIABLE);
 aRetval.SetLanguage(LanguageTag::convertToLanguageType( rLocale, 
false));
 
-#ifdef _WIN32
-// for WIN32 systems, correct the FontWidth if FontScaling is used
-if(bFontIsScaled && nHeight > 0)
-{
-const FontMetric 
aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aRetval));
-
-if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
-{
-const double fScaleFactor(static_cast(nWidth) / 
static_cast(nHeight));
-const sal_uInt32 
nScaledWidth(basegfx::fround(static_cast(aUnscaledFontMetric.GetAverageFontWidth())
 * fScaleFactor));
-aRetval.SetAverageFontWidth(nScaledWidth);
-}
-}
-#endif
 // handle FontRotation (if defined)
 if(!basegfx::fTools::equalZero(fFontRotation))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Miklos Vajna (via logerrit)
 filter/qa/unit/data/shape-nographic.odp |binary
 filter/qa/unit/svg.cxx  |   19 +++
 filter/source/svg/svgexport.cxx |3 ++-
 filter/source/svg/svgwriter.cxx |5 -
 4 files changed, 25 insertions(+), 2 deletions(-)

New commits:
commit ac4030a0ca1aecd15d068b67780b81671c5a9aca
Author: Miklos Vajna 
AuthorDate: Mon Sep 7 17:00:44 2020 +0200
Commit: Miklos Vajna 
CommitDate: Tue Sep 8 10:18:39 2020 +0200

SVG export: fix failure on trying to read graphic of a 3D shape

Regression from commit 8fc1b60f62c213a0476f3acc9f89cd5eccbf335d (sw SVG
export: try to reuse original bitmap data for JPG and PNG bitmaps,
2020-02-27), which generalized the code that tries to get the original
bitmap of shapes for performance reasons. Originally this worked with
SdrGrafObj, but now we try every XShape which has a Graphic property.

Add the missing check, so shapes without a graphic property just miss
the fast path, but doesn't fail the entire SVG export.

(cherry picked from commit fbcdbfef8664430e15b9429187b58dede992accf)

Conflicts:
filter/qa/unit/svg.cxx
filter/source/svg/svgexport.cxx

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

diff --git a/filter/qa/unit/data/shape-nographic.odp 
b/filter/qa/unit/data/shape-nographic.odp
new file mode 100644
index ..43186d614986
Binary files /dev/null and b/filter/qa/unit/data/shape-nographic.odp differ
diff --git a/filter/qa/unit/svg.cxx b/filter/qa/unit/svg.cxx
index a8b177ed11bf..c59d3cf63dca 100644
--- a/filter/qa/unit/svg.cxx
+++ b/filter/qa/unit/svg.cxx
@@ -119,6 +119,25 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testPreserveJpg)
 #endif
 }
 
+CPPUNIT_TEST_FIXTURE(SvgFilterTest, testShapeNographic)
+{
+// Load a document containing a 3D shape.
+load("shape-nographic.odp");
+
+// Export to SVG.
+uno::Reference xStorable(getComponent(), 
uno::UNO_QUERY_THROW);
+SvMemoryStream aStream;
+uno::Reference xOut = new 
utl::OOutputStreamWrapper(aStream);
+utl::MediaDescriptor aMediaDescriptor;
+aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export");
+aMediaDescriptor["OutputStream"] <<= xOut;
+
+// Without the accompanying fix in place, this test would have failed with:
+// An uncaught exception of type com.sun.star.io.IOException
+// - SfxBaseModel::impl_store  failed: 0xc10(Error Area:Io 
Class:Write Code:16)
+xStorable->storeToURL("private:stream", 
aMediaDescriptor.getAsConstPropertyValueList());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index ab1ee9ce647b..50083f7b1f8d 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -58,6 +58,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -604,7 +605,7 @@ bool SVGFilter::implExportImpressOrDraw( const Reference< 
XOutputStream >& rxOSt
 {
 delete mpSVGDoc;
 mpSVGDoc = nullptr;
-OSL_FAIL( "Exception caught" );
+SAL_WARN("filter.svg", "Exception caught");
 }
 
 if( nullptr != pSdrModel )
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 6f4c25c6f0f0..7bc652e58a42 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2691,7 +2691,10 @@ void GetGraphicFromXShape(const 
css::uno::Reference* pShap
 }
 
 uno::Reference xGraphic;
-xPropertySet->getPropertyValue("Graphic") >>= xGraphic;
+if (xPropertySet->getPropertySetInfo()->hasPropertyByName("Graphic"))
+{
+xPropertySet->getPropertyValue("Graphic") >>= xGraphic;
+}
 rGraphic= Graphic(xGraphic);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/inc vcl/qt5

2020-09-08 Thread Michael Weghorn (via logerrit)
 vcl/inc/qt5/Qt5AccessibleWidget.hxx |4 +++-
 vcl/qt5/Qt5AccessibleWidget.cxx |9 +
 2 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 8e6b7d5696378e946e904c1df87da83e139af90d
Author: Michael Weghorn 
AuthorDate: Mon Sep 7 20:08:57 2020 +0200
Commit: Caolán McNamara 
CommitDate: Tue Sep 8 10:05:46 2020 +0200

tdf#136323 qt5: Remember accessible object

'QAccessibleCache::insert' from the Qt library has a
'Q_ASSERT' checking that the corresponding 'QObject' for
which the 'QAccessibleInterface' provides information
is actually the same as the object passed as a parameter:

QAccessible::Id QAccessibleCache::insert(QObject *object, 
QAccessibleInterface *iface) const
{
// ...
QObject *obj = iface->object();
->  Q_ASSERT(object == obj);

However, 'Qt5AccessibleWidget::object' so far was always returning
'nullptr', triggering this assert when using a Qt version
not built with 'QT_NO_DEBUG'.

To fix this, remember and return the object as needed.

Change-Id: I4015b4c37aa8a073b02465df580a7235884e6cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102196
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 4461d49c6cfce22c2c96185b0a1d07bfe9709268)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102126
Reviewed-by: Caolán McNamara 

diff --git a/vcl/inc/qt5/Qt5AccessibleWidget.hxx 
b/vcl/inc/qt5/Qt5AccessibleWidget.hxx
index 6b0d71cba9f5..0f62d2a8a5b8 100644
--- a/vcl/inc/qt5/Qt5AccessibleWidget.hxx
+++ b/vcl/inc/qt5/Qt5AccessibleWidget.hxx
@@ -41,7 +41,8 @@ class VCLPLUG_QT5_PUBLIC Qt5AccessibleWidget : public QObject,
 Q_OBJECT
 
 public:
-Qt5AccessibleWidget(const 
css::uno::Reference xAccessible);
+Qt5AccessibleWidget(const 
css::uno::Reference xAccessible,
+QObject* pObject);
 QWindow* window() const override;
 int childCount() const override;
 int indexOfChild(const QAccessibleInterface* child) const override;
@@ -137,6 +138,7 @@ public:
 private:
 css::uno::Reference m_xAccessible;
 css::uno::Reference 
getAccessibleContextImpl() const;
+QObject* m_pObject;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx
index 6a828865036e..7136e0823790 100644
--- a/vcl/qt5/Qt5AccessibleWidget.cxx
+++ b/vcl/qt5/Qt5AccessibleWidget.cxx
@@ -58,8 +58,9 @@ using namespace css::accessibility;
 using namespace css::beans;
 using namespace css::uno;
 
-Qt5AccessibleWidget::Qt5AccessibleWidget(const Reference 
xAccessible)
+Qt5AccessibleWidget::Qt5AccessibleWidget(const Reference 
xAccessible, QObject* pObject)
 : m_xAccessible(xAccessible)
+, m_pObject(pObject)
 {
 Reference xContext = 
xAccessible->getAccessibleContext();
 Reference xBroadcaster(xContext, UNO_QUERY);
@@ -698,7 +699,7 @@ bool Qt5AccessibleWidget::isValid() const
 return xAc.is();
 }
 
-QObject* Qt5AccessibleWidget::object() const { return nullptr; }
+QObject* Qt5AccessibleWidget::object() const { return m_pObject; }
 
 void Qt5AccessibleWidget::setText(QAccessible::Text /* t */, const QString& /* 
text */) {}
 
@@ -721,13 +722,13 @@ QAccessibleInterface* 
Qt5AccessibleWidget::customFactory(const QString& classnam
 vcl::Window* pWindow = pWidget->frame().GetWindow();
 
 if (pWindow)
-return new Qt5AccessibleWidget(pWindow->GetAccessible());
+return new Qt5AccessibleWidget(pWindow->GetAccessible(), object);
 }
 if (classname == QLatin1String("Qt5XAccessible") && object)
 {
 Qt5XAccessible* pXAccessible = dynamic_cast(object);
 if (pXAccessible && pXAccessible->m_xAccessible.is())
-return new Qt5AccessibleWidget(pXAccessible->m_xAccessible);
+return new Qt5AccessibleWidget(pXAccessible->m_xAccessible, 
object);
 }
 
 return nullptr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/inc vcl/qt5

2020-09-08 Thread Michael Weghorn (via logerrit)
 vcl/inc/qt5/Qt5AccessibleWidget.hxx |4 +++-
 vcl/qt5/Qt5AccessibleWidget.cxx |9 +
 2 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 72549d97c220d63d5fd5f6f38ae14f13c3e3d919
Author: Michael Weghorn 
AuthorDate: Mon Sep 7 20:08:57 2020 +0200
Commit: Caolán McNamara 
CommitDate: Tue Sep 8 10:05:27 2020 +0200

tdf#136323 qt5: Remember accessible object

'QAccessibleCache::insert' from the Qt library has a
'Q_ASSERT' checking that the corresponding 'QObject' for
which the 'QAccessibleInterface' provides information
is actually the same as the object passed as a parameter:

QAccessible::Id QAccessibleCache::insert(QObject *object, 
QAccessibleInterface *iface) const
{
// ...
QObject *obj = iface->object();
->  Q_ASSERT(object == obj);

However, 'Qt5AccessibleWidget::object' so far was always returning
'nullptr', triggering this assert when using a Qt version
not built with 'QT_NO_DEBUG'.

To fix this, remember and return the object as needed.

Change-Id: I4015b4c37aa8a073b02465df580a7235884e6cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102196
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 4461d49c6cfce22c2c96185b0a1d07bfe9709268)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102125
Reviewed-by: Caolán McNamara 

diff --git a/vcl/inc/qt5/Qt5AccessibleWidget.hxx 
b/vcl/inc/qt5/Qt5AccessibleWidget.hxx
index 2cd4840c6dfa..aacaba9a80c8 100644
--- a/vcl/inc/qt5/Qt5AccessibleWidget.hxx
+++ b/vcl/inc/qt5/Qt5AccessibleWidget.hxx
@@ -41,7 +41,8 @@ class Qt5AccessibleWidget final : public QObject,
 Q_OBJECT
 
 public:
-Qt5AccessibleWidget(const 
css::uno::Reference xAccessible);
+Qt5AccessibleWidget(const 
css::uno::Reference xAccessible,
+QObject* pObject);
 QWindow* window() const override;
 int childCount() const override;
 int indexOfChild(const QAccessibleInterface* child) const override;
@@ -137,6 +138,7 @@ public:
 private:
 css::uno::Reference m_xAccessible;
 css::uno::Reference 
getAccessibleContextImpl() const;
+QObject* m_pObject;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx
index 829e7e3a818d..15ebdf36b11d 100644
--- a/vcl/qt5/Qt5AccessibleWidget.cxx
+++ b/vcl/qt5/Qt5AccessibleWidget.cxx
@@ -60,8 +60,9 @@ using namespace css::accessibility;
 using namespace css::beans;
 using namespace css::uno;
 
-Qt5AccessibleWidget::Qt5AccessibleWidget(const Reference 
xAccessible)
+Qt5AccessibleWidget::Qt5AccessibleWidget(const Reference 
xAccessible, QObject* pObject)
 : m_xAccessible(xAccessible)
+, m_pObject(pObject)
 {
 Reference xContext = 
xAccessible->getAccessibleContext();
 Reference xBroadcaster(xContext, UNO_QUERY);
@@ -700,7 +701,7 @@ bool Qt5AccessibleWidget::isValid() const
 return xAc.is();
 }
 
-QObject* Qt5AccessibleWidget::object() const { return nullptr; }
+QObject* Qt5AccessibleWidget::object() const { return m_pObject; }
 
 void Qt5AccessibleWidget::setText(QAccessible::Text /* t */, const QString& /* 
text */) {}
 
@@ -723,13 +724,13 @@ QAccessibleInterface* 
Qt5AccessibleWidget::customFactory(const QString& classnam
 vcl::Window* pWindow = pWidget->frame().GetWindow();
 
 if (pWindow)
-return new Qt5AccessibleWidget(pWindow->GetAccessible());
+return new Qt5AccessibleWidget(pWindow->GetAccessible(), object);
 }
 if (classname == QLatin1String("Qt5XAccessible") && object)
 {
 Qt5XAccessible* pXAccessible = dynamic_cast(object);
 if (pXAccessible && pXAccessible->m_xAccessible.is())
-return new Qt5AccessibleWidget(pXAccessible->m_xAccessible);
+return new Qt5AccessibleWidget(pXAccessible->m_xAccessible, 
object);
 }
 
 return nullptr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loleaflet/css loleaflet/src

2020-09-08 Thread Szymon Kłos (via logerrit)
 loleaflet/css/device-mobile.css   |4 +-
 loleaflet/src/control/Control.Menubar.js  |   10 ---
 loleaflet/src/control/Control.MobileWizard.js |   23 ++---
 loleaflet/src/control/Control.Toolbar.js  |   35 +++---
 loleaflet/src/control/Control.UIManager.js|   25 +-
 5 files changed, 62 insertions(+), 35 deletions(-)

New commits:
commit c780726c52ae08d4e63e9ab5525d62f68532196d
Author: Szymon Kłos 
AuthorDate: Thu Aug 6 12:32:55 2020 +0200
Commit: Szymon Kłos 
CommitDate: Tue Sep 8 09:59:21 2020 +0200

Handle back button on mobile

This patch created states in history when using
mobilewizard, allows to use back button which navigates
back in the menu.

Used History API and popstate event.

Also unified onClose handler to close the app.

Change-Id: Id9da9bf71ee6183525ea20d43a416d3ddabec7c2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100301
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102177
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 074ec743a..7e4788534 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -1250,15 +1250,7 @@ L.Control.Menubar = L.Control.extend({
this._map.fire('postMessage', {msgId: 'rev-history', 
args: {Deprecated: true}});
this._map.fire('postMessage', {msgId: 
'UI_FileVersions'});
} else if (id === 'closedocument') {
-   if (window.ThisIsAMobileApp) {
-   window.postMobileMessage('BYE');
-   } else {
-   this._map.fire('postMessage', {msgId: 'close', 
args: {EverModified: this._map._everModified, Deprecated: true}});
-   this._map.fire('postMessage', {msgId: 
'UI_Close', args: {EverModified: this._map._everModified}});
-   }
-   if (!this._map._disableDefaultAction['UI_Close']) {
-   this._map.remove();
-   }
+   window.onClose();
} else if (id === 'repair') {
this._map._socket.sendMessage('commandvalues 
command=.uno:DocumentRepair');
} else if (id === 'searchdialog') {
diff --git a/loleaflet/src/control/Control.MobileWizard.js 
b/loleaflet/src/control/Control.MobileWizard.js
index 58f405f50..1cd965865 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -11,6 +11,7 @@ L.Control.MobileWizard = L.Control.extend({
 
_inMainMenu: true,
_isActive: false,
+   _inBuilding: false,
_currentDepth: 0,
_mainTitle: '',
_isTabMode: false,
@@ -56,10 +57,9 @@ L.Control.MobileWizard = L.Control.extend({
},
 
_setupBackButton: function() {
-   var that = this;
this.content = $('#mobile-wizard-content');
this.backButton = $('#mobile-wizard-back');
-   this.backButton.click(function() { that.goLevelUp(); });
+   this.backButton.click(function() { history.back(); });
$(this.backButton).addClass('close-button');
},
 
@@ -131,6 +131,10 @@ L.Control.MobileWizard = L.Control.extend({
this._updateMapSize();
},
 
+   isOpen: function() {
+   return $('#mobile-wizard').is(':visible');
+   },
+
_hideKeyboard: function() {
document.activeElement.blur();
},
@@ -201,6 +205,8 @@ L.Control.MobileWizard = L.Control.extend({
$(contentToShow).show();
 
this._currentDepth++;
+   if (!this._inBuilding)
+   history.pushState({context: 'mobile-wizard', level: 
this._currentDepth}, 'mobile-wizard-level-' + this._currentDepth);
this._setTitle(contentToShow.title);
this._inMainMenu = false;
 
@@ -326,6 +332,8 @@ L.Control.MobileWizard = L.Control.extend({
 
_onMobileWizard: function(data) {
if (data) {
+   this._inBuilding = true;
+
var isSidebar = (data.children && data.children.length 
>= 1 &&
 data.children[0].type == 'deck');
 
@@ -337,7 +345,8 @@ L.Control.MobileWizard = L.Control.extend({
return;
}
 
-   if (data.id && !isNaN(data.id) && !isSidebar) {
+   var isMobileDialog = data.id && !isNaN(data.id) && 
!isSidebar;
+   if (isMobileDialog) {
// id

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

2020-09-08 Thread Luboš Luňák (via logerrit)
 vcl/skia/salbmp.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 9b1e31f154d6824fccebe9d1a691f19248f09466
Author: Luboš Luňák 
AuthorDate: Mon Sep 7 21:05:25 2020 +0200
Commit: Luboš Luňák 
CommitDate: Tue Sep 8 09:57:35 2020 +0200

conserve memory used by SkiaSalBitmap buffers also for 32bit builds

Since 32bit builds have limited address space, so with large images
they can come more easily under memory pressure.

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

diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index 83b807e87b15..0c855ef79ebf 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -649,8 +649,11 @@ const sk_sp& SkiaSalBitmap::GetSkImage() const
 // Ideally SalBitmap should be able to say which bitmap formats it supports
 // and VCL code should oblige, which would allow reusing the same data.
 static bool keepBitmapBuffer = getenv("SAL_SKIA_KEEP_BITMAP_BUFFER") != 
nullptr;
+// 32bit builds have limited address space, so try to conserve memory as 
well.
+constexpr bool is32Bit = sizeof(void*) == 4;
 constexpr long maxBufferSize = 2000 * 2000 * 4;
-if (!keepBitmapBuffer && SkiaHelper::renderMethodToUse() == 
SkiaHelper::RenderRaster
+if (!keepBitmapBuffer
+&& (SkiaHelper::renderMethodToUse() == SkiaHelper::RenderRaster || 
is32Bit)
 && mPixelsSize.Height() * mScanlineSize > maxBufferSize
 && (mBitCount > 8 || (mBitCount == 8 && mPalette.IsGreyPalette8Bit(
 thisPtr->ResetToSkImage(mImage);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Luboš Luňák (via logerrit)
 vcl/inc/skia/salbmp.hxx |1 
 vcl/skia/salbmp.cxx |  107 
 2 files changed, 91 insertions(+), 17 deletions(-)

New commits:
commit 6caa412d911e806f805633f1296ddc5908eab868
Author: Luboš Luňák 
AuthorDate: Mon Sep 7 22:38:34 2020 +0200
Commit: Luboš Luňák 
CommitDate: Tue Sep 8 09:57:58 2020 +0200

try harder to not duplicate large memory usage in SkiaSalBitmap

This is an extension of a9f68d9d9ae8d7c8f79152055795044993b252ea.
Try also to drop the image if converting back to buffer, and also
try to do the same with the alpha image if the conversion is simple.

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

diff --git a/vcl/inc/skia/salbmp.hxx b/vcl/inc/skia/salbmp.hxx
index 0a6ed6f1b874..6e325b9c6a62 100644
--- a/vcl/inc/skia/salbmp.hxx
+++ b/vcl/inc/skia/salbmp.hxx
@@ -105,6 +105,7 @@ private:
 bool ComputeScanlineSize();
 void EraseInternal();
 SkBitmap GetAsSkBitmap() const;
+bool ConserveMemory() const;
 void verify() const
 #ifdef DBG_UTIL
 ;
diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index 0c855ef79ebf..c77b80e39bc1 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -578,6 +578,29 @@ static SkColor fromEraseColorToAlphaImageColor(Color color)
 return SkColorSetARGB(color.GetBlue(), 0, 0, 0);
 }
 
+// SkiaSalBitmap can store data in both the SkImage and our mBuffer, which 
with large
+// images can waste quite a lot of memory. Ideally we should store the data in 
Skia's
+// SkBitmap, but LO wants us to support data formats that Skia doesn't support.
+// So try to conserve memory by keeping the data only once in that was the most
+// recently wanted storage, and drop the other one. Usually the other one 
won't be needed
+// for a long time, and especially with raster the conversion is usually fast.
+// Do this only with raster, to avoid GPU->CPU transfer in GPU mode (exception 
is 32bit
+// builds, where memory is more important). Also don't do this with paletted 
bitmaps,
+// where EnsureBitmapData() would be expensive.
+// Ideally SalBitmap should be able to say which bitmap formats it supports
+// and VCL code should oblige, which would allow reusing the same data.
+bool SkiaSalBitmap::ConserveMemory() const
+{
+static bool keepBitmapBuffer = getenv("SAL_SKIA_KEEP_BITMAP_BUFFER") != 
nullptr;
+constexpr bool is32Bit = sizeof(void*) == 4;
+// 16MiB bitmap data at least (set to 0 for easy testing).
+constexpr long maxBufferSize = 2000 * 2000 * 4;
+return !keepBitmapBuffer
+   && (SkiaHelper::renderMethodToUse() == SkiaHelper::RenderRaster || 
is32Bit)
+   && mPixelsSize.Height() * mScanlineSize > maxBufferSize
+   && (mBitCount > 8 || (mBitCount == 8 && 
mPalette.IsGreyPalette8Bit()));
+}
+
 const sk_sp& SkiaSalBitmap::GetSkImage() const
 {
 #ifdef DBG_UTIL
@@ -639,24 +662,13 @@ const sk_sp& SkiaSalBitmap::GetSkImage() const
 assert(image);
 SkiaSalBitmap* thisPtr = const_cast(this);
 thisPtr->mImage = image;
-// The data is now stored both in the SkImage and in our mBuffer, which 
with large
-// images can waste quite a lot of memory. Ideally we should store the 
data in Skia's
-// SkBitmap, but LO wants us to support data formats that Skia doesn't 
support.
-// So just drop our buffer, it usually won't be needed anyway, and it'll 
be converted
-// back by EnsureBitmapData() if yes. Do this only with raster, to avoid 
GPU->CPU
-// transfer in GPU mode. Also don't do this with paletted bitmaps, where 
EnsureBitmapData()
-// would be expensive.
-// Ideally SalBitmap should be able to say which bitmap formats it supports
-// and VCL code should oblige, which would allow reusing the same data.
-static bool keepBitmapBuffer = getenv("SAL_SKIA_KEEP_BITMAP_BUFFER") != 
nullptr;
-// 32bit builds have limited address space, so try to conserve memory as 
well.
-constexpr bool is32Bit = sizeof(void*) == 4;
-constexpr long maxBufferSize = 2000 * 2000 * 4;
-if (!keepBitmapBuffer
-&& (SkiaHelper::renderMethodToUse() == SkiaHelper::RenderRaster || 
is32Bit)
-&& mPixelsSize.Height() * mScanlineSize > maxBufferSize
-&& (mBitCount > 8 || (mBitCount == 8 && mPalette.IsGreyPalette8Bit(
+// The data is now stored both in the SkImage and in our mBuffer, so drop 
the buffer
+// if conserving memory. It'll be converted back by EnsureBitmapData() if 
needed.
+if (ConserveMemory())
+{
+SAL_INFO("vcl.skia.trace", "getskimage(" << this << "): dropping 
buffer");
 thisPtr->ResetToSkImage(mImage);
+}
 SAL_INFO("vcl.skia.trace", "getskimage(" << this << ")");
 return mImage;
 }
@@ -714,6 +726,9 @@ const sk_sp& SkiaSalBitmap::GetAlphaSkImage() const
 

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

2020-09-08 Thread Luboš Luňák (via logerrit)
 compilerplugins/clang/checkconfigmacros.cxx |6 +-
 vcl/skia/zone.cxx   |8 
 vcl/source/app/watchdog.cxx |4 
 3 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit e8eaf5e287efb304590b1821a2a738ddcdebe9fe
Author: Luboš Luňák 
AuthorDate: Sat Sep 5 16:31:37 2020 +0200
Commit: Luboš Luňák 
CommitDate: Tue Sep 8 09:56:36 2020 +0200

longer watchdog timeouts for debug Skia build

Skia runs internal checks, which occassionally actually may take
a bit. Also abort() in dbgutil build already in case the watchdog
disables Skia, to make finding these easier.

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

diff --git a/compilerplugins/clang/checkconfigmacros.cxx 
b/compilerplugins/clang/checkconfigmacros.cxx
index 23f6947a3646..6daa9ed2a17e 100644
--- a/compilerplugins/clang/checkconfigmacros.cxx
+++ b/compilerplugins/clang/checkconfigmacros.cxx
@@ -67,7 +67,11 @@ void CheckConfigMacros::MacroDefined( const Token& 
macroToken, const MacroDirect
 || hasPathnamePrefix(filename, BUILDDIR "/config_build/") ))
 {
 //fprintf(stderr,"DEF: %s %s\n", 
macroToken.getIdentifierInfo()->getName().data(), filename );
-configMacros.insert( macroToken.getIdentifierInfo()->getName().str());
+StringRef macro = macroToken.getIdentifierInfo()->getName();
+// Skia #defines do not have values, but we set them in config_skia.h .
+if( macro.startswith( "SK_" ) && loplugin::isSamePathname(filename, 
BUILDDIR "/config_host/config_skia.h"))
+return;
+configMacros.insert( macro.str());
 }
 }
 
diff --git a/vcl/skia/zone.cxx b/vcl/skia/zone.cxx
index 0271608f5ba4..34e3f80f8b78 100644
--- a/vcl/skia/zone.cxx
+++ b/vcl/skia/zone.cxx
@@ -18,6 +18,8 @@
 
 #include 
 
+#include 
+
 /**
  * Called from a signal handler or watchdog thread if we get
  * a crash or hang in some driver.
@@ -59,7 +61,13 @@ const CrashWatchdogTimingsValues& 
SkiaZone::getCrashWatchdogTimingsValues()
 {
 case SkiaHelper::RenderVulkan:
 {
+#if defined(SK_RELEASE)
 static const CrashWatchdogTimingsValues vulkanValues = { 6, 20 }; 
/* 1.5s,  5s */
+#elif defined(SK_DEBUG)
+static const CrashWatchdogTimingsValues vulkanValues = { 60, 200 
}; /* 15s,  50s */
+#else
+#error Unknown Skia debug/release setting.
+#endif
 return vulkanValues;
 }
 case SkiaHelper::RenderRaster:
diff --git a/vcl/source/app/watchdog.cxx b/vcl/source/app/watchdog.cxx
index f43f708b1eb4..b14611e227ca 100644
--- a/vcl/source/app/watchdog.cxx
+++ b/vcl/source/app/watchdog.cxx
@@ -57,8 +57,12 @@ template  struct WatchdogHelper
 {
 gbWatchdogFiring = true;
 SAL_WARN("vcl.watchdog", "Watchdog triggered: hard disable 
" << Zone::name());
+#ifdef DBG_UTIL
+std::abort();
+#else
 Zone::hardDisable();
 gbWatchdogFiring = false;
+#endif
 }
 bFired = true;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Luboš Luňák (via logerrit)
 vcl/inc/skia/salbmp.hxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 8e7b83e2805a94ff172d167b4b24d05f630cb765
Author: Luboš Luňák 
AuthorDate: Mon Sep 7 21:34:23 2020 +0200
Commit: Luboš Luňák 
CommitDate: Tue Sep 8 09:57:05 2020 +0200

make SkiaSalBitmap debug also log bit count and palette presence

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

diff --git a/vcl/inc/skia/salbmp.hxx b/vcl/inc/skia/salbmp.hxx
index d2599d3e98b5..0a6ed6f1b874 100644
--- a/vcl/inc/skia/salbmp.hxx
+++ b/vcl/inc/skia/salbmp.hxx
@@ -119,9 +119,15 @@ private:
 {
 if (bitmap == nullptr)
 return stream << "(null)";
+// p - has (non-trivial) palette
 // I/i - has SkImage (on GPU/CPU),
 // A/a - has alpha SkImage (on GPU/CPU)
-stream << static_cast(bitmap) << " " << bitmap->GetSize() 
<< "/";
+// E - has erase color
+stream << static_cast(bitmap) << " " << bitmap->GetSize() 
<< "x"
+   << bitmap->GetBitCount();
+if (bitmap->GetBitCount() <= 8 && 
!bitmap->Palette().IsGreyPalette8Bit())
+stream << "p";
+stream << "/";
 if (bitmap->mImage)
 stream << (bitmap->mImage->isTextureBacked() ? "I" : "i");
 if (bitmap->mAlphaImage)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Luboš Luňák (via logerrit)
 vcl/source/outdev/bitmap.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c2275ee554cae1cf4909a4fc12be4be127be011e
Author: Luboš Luňák 
AuthorDate: Mon Sep 7 22:27:17 2020 +0200
Commit: Luboš Luňák 
CommitDate: Tue Sep 8 09:56:03 2020 +0200

prefer 8bit bitmap masks to 1bpp masks

Similarly to df9f0e3cc57fb69ee38918b25ed91d97d1972685, 8bpp bitmaps
are faster.

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

diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index c414a3921789..fc6095812b6c 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1065,7 +1065,7 @@ bool OutputDevice::DrawTransformBitmapExDirect(
 }
 else if (mpAlphaVDev)
 {
-aAlphaBitmap = Bitmap(rBitmapEx.GetSizePixel(), 1);
+aAlphaBitmap = Bitmap(rBitmapEx.GetSizePixel(), 8);
 aAlphaBitmap.Erase(COL_BLACK);
 }
 
@@ -1082,7 +1082,7 @@ bool OutputDevice::DrawTransformBitmapExDirect(
 if (mpAlphaVDev)
 {
 // Merge bitmap alpha to alpha device
-Bitmap aBlack(rBitmapEx.GetSizePixel(), 1);
+Bitmap aBlack(rBitmapEx.GetSizePixel(), 8);
 aBlack.Erase(COL_BLACK);
 mpAlphaVDev->DrawTransformBitmapExDirect(aFullTransform, 
BitmapEx(aBlack, aAlphaBitmap));
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/salgdi.h |8 +---
 vcl/unx/generic/gdi/cairo_xlib_cairo.cxx |7 +--
 vcl/unx/generic/gdi/salgdi.cxx   |   14 +-
 vcl/unx/generic/gdi/salvd.cxx|   11 +++
 vcl/unx/generic/window/salframe.cxx  |4 ++--
 5 files changed, 28 insertions(+), 16 deletions(-)

New commits:
commit f9a8048ed0fa6e2743c7473919a9a189dcda
Author: Caolán McNamara 
AuthorDate: Mon Sep 7 19:51:22 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 8 09:51:28 2020 +0200

tdf#136545 use pre-existing cairo_surface

for the cairo-canvas case which has a surface for the drawable already 
created.
Vaving two of them, one via cairo_xlib_surface_create and one via
cairo_xlib_surface_create_with_xrender_format both alive at the same time 
seems
understandably unreliable.

This aligns the gen+X11 case closer to the gtk3 case wrt the situation of
tdf#127529

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

diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index caef46a1a2e8..027d0aa6f061 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -76,7 +76,8 @@ public:
 virtual ~X11SalGraphics() COVERITY_NOEXCEPT_FALSE 
override;
 
 voidInit( SalFrame *pFrame, Drawable 
aDrawable, SalX11Screen nXScreen );
-voidInit( X11SalVirtualDevice *pVirtualDevice, 
SalColormap* pColormap = nullptr, bool bDeleteColormap = false );
+voidInit( X11SalVirtualDevice *pVirtualDevice, 
cairo_surface_t* pPreExistingTarget = nullptr,
+  SalColormap* pColormap = nullptr, 
bool bDeleteColormap = false );
 voidInit( X11OpenGLSalVirtualDevice 
*pVirtualDevice );
 voidInit( X11SkiaSalVirtualDevice 
*pVirtualDevice );
 voidDeInit();
@@ -86,8 +87,8 @@ public:
 inline  Display*GetXDisplay() const;
 inline  const SalVisual&GetVisual() const;
 SalGeometryProvider*GetGeometryProvider() const;
-DrawableGetDrawable() const { return hDrawable_; }
-voidSetDrawable( Drawable d, SalX11Screen 
nXScreen );
+DrawableGetDrawable() const { return hDrawable_; }
+voidSetDrawable(Drawable d, cairo_surface_t* 
surface, SalX11Screen nXScreen);
 XRenderPictFormat*  GetXRenderFormat() const;
 voidSetXRenderFormat( XRenderPictFormat* 
pXRenderFormat ) { m_pXRenderFormat = pXRenderFormat; }
 const SalColormap&  GetColormap() const { return *m_pColormap; }
@@ -296,6 +297,7 @@ private:
 const SalColormap*  m_pColormap;
 std::unique_ptrm_pDeleteColormap;
 DrawablehDrawable_; // use
+cairo_surface_t*m_pExternalSurface;
 SalX11Screenm_nXScreen;
 mutable XRenderPictFormat*  m_pXRenderFormat;
 XID m_aXRenderPicture;
diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx 
b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
index 3a825052189a..1bbf8d3d5e05 100644
--- a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
+++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
@@ -248,12 +248,15 @@ namespace cairo
 {
 SystemGraphicsData aSystemGraphicsData;
 
+cairo_surface_t* pSurface = mpSurface.get();
+
 aSystemGraphicsData.nSize = sizeof(SystemGraphicsData);
 aSystemGraphicsData.hDrawable = mpPixmap ? mpPixmap->mhDrawable : 
maSysData.hDrawable;
 aSystemGraphicsData.pXRenderFormat = maSysData.pRenderFormat;
+aSystemGraphicsData.pSurface = pSurface;
 
-int width = cairo_xlib_surface_get_width(mpSurface.get());
-int height = cairo_xlib_surface_get_height(mpSurface.get());
+int width = cairo_xlib_surface_get_width(pSurface);
+int height = cairo_xlib_surface_get_height(pSurface);
 
 return VclPtr::Create(aSystemGraphicsData,
   Size(width, height),
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 4b2632087e7d..79037c1b3a2a 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -66,6 +66,7 @@ X11SalGraphics::X11SalGraphics():
 m_pVDev(nullptr),
 m_pColormap(nullptr),
 hDrawable_(None),
+m_pExternalSurface(nullptr),
 m_nXScreen( 0 ),
 m_pXRenderFormat(nullptr),
 m_aXRenderPicture(0),
@@ -144,8 +145,10 @@ SalGraphicsImpl* X11SalGraphics::GetImpl() const
 return mxImpl.get();
 }
 
-void X11SalGraphics::SetDrawable( Drawable aDrawable, SalX11Screen nXScre

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

2020-09-08 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/ooxmlimport/data/tdf120547.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx|   50 +++
 2 files changed, 50 insertions(+)

New commits:
commit cdcbd61a88ea38a8db08274700901d16430c5133
Author: Xisco Fauli 
AuthorDate: Mon Sep 7 19:40:42 2020 +0200
Commit: Xisco Fauli 
CommitDate: Tue Sep 8 09:45:20 2020 +0200

tdf#120547: sw_ooxmlimport2: Add unittest

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

diff --git a/sw/qa/extras/ooxmlimport/data/tdf120547.docx 
b/sw/qa/extras/ooxmlimport/data/tdf120547.docx
new file mode 100644
index ..9d3cf307272b
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf120547.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index b0d0da8ffc1b..c8f8c514c3a6 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -144,6 +144,56 @@ DECLARE_OOXMLIMPORT_TEST(testTdf109524, "tdf109524.docx")
  getProperty(xTables->getByIndex(0), 
"RelativeWidth"));
 }
 
+DECLARE_OOXMLIMPORT_TEST(testTdf120547, "tdf120547.docx")
+{
+uno::Reference xGroupShape = getShape(1);
+uno::Reference xGroup(getShape(1), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(static_cast(3), xGroup->getCount());
+
+awt::Point aPosGroup = xGroupShape->getPosition();
+awt::Size aSizeGroup = xGroupShape->getSize();
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aPosGroup.X);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aPosGroup.Y);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(9091), aSizeGroup.Width);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(27940), aSizeGroup.Height);
+
+// Without the fix in place, this test would have failed at many places
+// as the three shapes in the group would have had an incorrect position,
+// an incorrect width or an incorrect height.
+
+uno::Reference xShape1(xGroup->getByIndex(0), 
uno::UNO_QUERY_THROW);
+awt::Point aPosShape1 = xShape1->getPosition();
+awt::Size aSizeShape1 = xShape1->getSize();
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aPosShape1.X);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aPosShape1.Y);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(9066), aSizeShape1.Width);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(27905), aSizeShape1.Height);
+
+uno::Reference xShape2(xGroup->getByIndex(1), 
uno::UNO_QUERY_THROW);
+awt::Point aPosShape2 = xShape2->getPosition();
+awt::Size aSizeShape2 = xShape2->getSize();
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aPosShape2.X);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(20745), aPosShape2.Y);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(9066), aSizeShape2.Width);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(7195), aSizeShape2.Height);
+
+// The second shape is a group of 3 shapes
+uno::Reference xGroup2(xGroup->getByIndex(1), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(static_cast(3), xGroup2->getCount());
+
+uno::Reference xShape3(xGroup->getByIndex(2), 
uno::UNO_QUERY_THROW);
+awt::Point aPosShape3 = xShape3->getPosition();
+awt::Size aSizeShape3 = xShape3->getSize();
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aPosShape3.X);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aPosShape3.Y);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(9091), aSizeShape3.Width);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(8073), aSizeShape3.Height);
+}
+
 DECLARE_OOXMLIMPORT_TEST(testGroupShapeFontName, "groupshape-fontname.docx")
 {
 // Font names inside a group shape were not imported
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolkitconfig.xcu

2020-09-08 Thread Andras Timar (via logerrit)
 loolkitconfig.xcu |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit c7dbb7541d36e8f7bec70e02b70e96536969b095
Author: Andras Timar 
AuthorDate: Sun Sep 6 22:40:39 2020 +0200
Commit: Andras Timar 
CommitDate: Tue Sep 8 09:24:10 2020 +0200

Set Noto Sans as the default font for new files created from minimal ODF 
templates

Change-Id: I2f145c8d3d934699a3f4c6c8fd6faf06958f323d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102139
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loolkitconfig.xcu b/loolkitconfig.xcu
index 539186947..27a7f61f0 100644
--- a/loolkitconfig.xcu
+++ b/loolkitconfig.xcu
@@ -31,4 +31,10 @@
 
 NeverMatchAnyUrlSuffix
 
+
+Noto 
Sans;Liberation Sans;Albany AMT;Albany;Arial;Arimo;Nimbus Sans L;DejaVu 
Sans;Helvetica;Lucida;Geneva;Helmet;Arial Unicode MS;Lucida Sans 
Unicode;Tahoma;SansSerif
+Noto 
Sans;Liberation Sans;Albany AMT;Albany;Arial;Arimo;Nimbus Sans L;DejaVu 
Sans;Helvetica;Lucida;Geneva;Helmet;Arial Unicode MS;Lucida Sans 
Unicode;Tahoma;SansSerif
+Noto 
Sans;Liberation Sans;Albany AMT;Albany;Arial;Arimo;Nimbus Sans L;DejaVu 
Sans;Helvetica;Lucida;Geneva;Helmet;Arial Unicode MS;Lucida Sans 
Unicode;Tahoma;SansSerif
+Noto 
Sans;Liberation Sans;Albany AMT;Albany;Arial;Arimo;Nimbus Sans L;DejaVu 
Sans;Helvetica;Lucida;Geneva;Helmet;Arial Unicode MS;Lucida Sans 
Unicode;Tahoma;SansSerif
+
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_core_draw.mk|   74 ++
 sw/Module_sw.mk   |1 
 sw/qa/core/draw/data/as-char-textbox.docx |binary
 sw/qa/core/draw/draw.cxx  |   51 
 sw/source/core/draw/dview.cxx |   15 +++---
 5 files changed, 134 insertions(+), 7 deletions(-)

New commits:
commit da4f9b77a6cd39b1ae5babdd476d1575c8b9371c
Author: Miklos Vajna 
AuthorDate: Mon Sep 7 21:23:07 2020 +0200
Commit: Miklos Vajna 
CommitDate: Tue Sep 8 09:11:24 2020 +0200

tdf#135149 sw: fix deleting textbox of as-char shapes

Regression from 7596e26fd259ce5445212949403e7cd32303b2bd (Add
SwTextBoxHelper::findShapes, 2014-06-24), the problem was that in case
the shape is as-char anchored, then DeleteSelection() returns false, and
so the textboxes of the deleted shapes are not deleted.

There is no real reason why deletion should be conditional on the
DeleteSelection() result, so just move it outside that block, so
textboxes are always deleted.

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

diff --git a/sw/CppunitTest_sw_core_draw.mk b/sw/CppunitTest_sw_core_draw.mk
new file mode 100644
index ..7e38fbce1386
--- /dev/null
+++ b/sw/CppunitTest_sw_core_draw.mk
@@ -0,0 +1,74 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_core_draw))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_draw))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_draw, \
+sw/qa/core/draw/draw \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_core_draw, \
+comphelper \
+cppu \
+cppuhelper \
+sal \
+sfx \
+svxcore \
+sw \
+   swqahelper \
+test \
+unotest \
+utl \
+vcl \
+svt \
+tl \
+svl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_core_draw,\
+boost_headers \
+libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_core_draw,\
+-I$(SRCDIR)/sw/inc \
+-I$(SRCDIR)/sw/source/core/inc \
+-I$(SRCDIR)/sw/source/uibase/inc \
+-I$(SRCDIR)/sw/qa/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_core_draw,\
+   udkapi \
+   offapi \
+   oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_core_draw))
+$(eval $(call gb_CppunitTest_use_vcl,sw_core_draw))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_core_draw,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_draw,\
+officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_core_draw))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_draw, \
+modules/swriter \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_draw))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 21930dc487b4..12610ebb6c49 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -121,6 +121,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
 CppunitTest_sw_core_crsr \
 CppunitTest_sw_core_undo \
 CppunitTest_sw_updateall_object_replacements \
+CppunitTest_sw_core_draw \
 ))
 
 ifneq ($(DISABLE_GUI),TRUE)
diff --git a/sw/qa/core/draw/data/as-char-textbox.docx 
b/sw/qa/core/draw/data/as-char-textbox.docx
new file mode 100644
index ..3edf7c632246
Binary files /dev/null and b/sw/qa/core/draw/data/as-char-textbox.docx differ
diff --git a/sw/qa/core/draw/draw.cxx b/sw/qa/core/draw/draw.cxx
new file mode 100644
index ..162bf237d154
--- /dev/null
+++ b/sw/qa/core/draw/draw.cxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+char const DATA_DIRECTORY[] = "/sw/qa/core/draw/data/";
+
+/// Covers sw/source/core/draw/ fixes.
+class SwCoreDrawTest : public SwModelTestBase
+{
+};
+
+CPPUNIT_TEST_FIXTURE(SwCoreDrawTest, testTextboxDeleteAsChar)
+{
+// Load a document with an as-char shape in it that has a textbox and an 
image in it.
+SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "as-char-textbox.docx");
+SwWrt

Re: Crash test update

2020-09-08 Thread Noel Grandin



On 2020/09/07 11:00 am, Caolán McNamara wrote:

On Thu, 2020-09-03 at 15:34 +0200, Noel Grandin wrote:

fixed my crasher with commit 12a7a3d57d3dcf222b13fa9143c37736f8ea3d0b


which worked fine, but ooo53770-1.odt now asserts about : in an
attribute name and the input content.xml does (presumably incorrectly)
have style:style:use-optional-row-height in it



fixed that assert with 9208eab706bfffec306d3611080b86b7bdd27567
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2020-09-08 Thread Stephan Bergmann (via logerrit)
 sdext/source/presenter/PresenterHelper.cxx |6 --
 sdext/source/presenter/PresenterHelper.hxx |6 --
 sw/source/filter/xml/xmlimpit.cxx  |9 +++--
 3 files changed, 7 insertions(+), 14 deletions(-)

New commits:
commit ce76618e83d895fcc57bf271e4684e7df77228d2
Author: Stephan Bergmann 
AuthorDate: Mon Sep 7 22:17:31 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 8 09:07:35 2020 +0200

Remove some unused const variables

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

diff --git a/sdext/source/presenter/PresenterHelper.cxx 
b/sdext/source/presenter/PresenterHelper.cxx
index 33c6cda994e8..8b8f57ea3dcc 100644
--- a/sdext/source/presenter/PresenterHelper.cxx
+++ b/sdext/source/presenter/PresenterHelper.cxx
@@ -36,12 +36,6 @@ const OUStringLiteral PresenterHelper::msViewURLPrefix( 
u"private:resource/view/
 const OUString PresenterHelper::msPresenterScreenURL( msViewURLPrefix + 
"PresenterScreen");
 const OUString PresenterHelper::msSlideSorterURL( msViewURLPrefix + 
"SlideSorter");
 
-const OUStringLiteral PresenterHelper::msResourceActivationEvent( 
u"ResourceActivation");
-const OUStringLiteral PresenterHelper::msResourceDeactivationEvent( 
u"ResourceDeactivation");
-
-const OUStringLiteral PresenterHelper::msDefaultPaneStyle ( 
u"DefaultPaneStyle");
-const OUStringLiteral PresenterHelper::msDefaultViewStyle ( 
u"DefaultViewStyle");
-
 Reference 
PresenterHelper::GetSlideShowController (
 const Reference& rxController)
 {
diff --git a/sdext/source/presenter/PresenterHelper.hxx 
b/sdext/source/presenter/PresenterHelper.hxx
index 6f8a9721c037..0f84bdfd3555 100644
--- a/sdext/source/presenter/PresenterHelper.hxx
+++ b/sdext/source/presenter/PresenterHelper.hxx
@@ -38,12 +38,6 @@ namespace PresenterHelper
 extern const OUString msPresenterScreenURL;
 extern const OUString msSlideSorterURL;
 
-extern const OUStringLiteral msResourceActivationEvent;
-extern const OUStringLiteral msResourceDeactivationEvent;
-
-extern const OUStringLiteral msDefaultPaneStyle;
-extern const OUStringLiteral msDefaultViewStyle;
-
 /** Return the slide show controller of a running presentation that has
 the same document as the given framework controller.
 @return
commit 9208eab706bfffec306d3611080b86b7bdd27567
Author: Noel Grandin 
AuthorDate: Mon Sep 7 22:14:55 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Sep 8 09:07:29 2020 +0200

fix crashtest ooo53770-1.odt

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

diff --git a/sw/source/filter/xml/xmlimpit.cxx 
b/sw/source/filter/xml/xmlimpit.cxx
index be7ffaa95b8f..af8a8b0c2781 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -19,6 +19,7 @@
 
 #include "xmlimpit.hxx"
 
+#include 
 #include 
 #include 
 #include 
@@ -226,8 +227,12 @@ void SvXMLImportItemMapper::importXMLUnknownAttributes( 
SfxItemSet& rSet,
 sPrefix = sName.copy(0, i-1);
 sName = sName.copy(i+1);
 }
-pUnknownItem->AddAttr( sPrefix, rAttribute.NamespaceURL, sName,
-   rAttribute.Value );
+// the sax parser doesn't reject these, strangely
+if (sName.indexOf(':') == -1)
+pUnknownItem->AddAttr( sPrefix, rAttribute.NamespaceURL, 
sName,
+   rAttribute.Value );
+else
+SAL_WARN("sw", "ignoring dodgy attribute: " + 
rAttribute.Name);
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits