New Defects reported by Coverity Scan for LibreOffice

2022-05-27 Thread scan-admin
Hi,

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

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
2 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

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


** CID 1504583:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/txtnode/attrcontentcontrol.cxx: 300 in 
SwContentControl::GetCurrentDateValue() const()



*** CID 1504583:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/txtnode/attrcontentcontrol.cxx: 300 in 
SwContentControl::GetCurrentDateValue() const()
294 {
295 return 0;
296 }
297 
298 double dCurrentDate = 0;
299 OUString aCurrentDate = m_aCurrentDate.replaceAll("T00:00:00Z", "");
>>> CID 1504583:  Error handling issues  (CHECKED_RETURN)
>>> Calling "IsNumberFormat" without checking return value (as is done 
>>> elsewhere 72 out of 78 times).
300 pNumberFormatter->IsNumberFormat(aCurrentDate, nFormat, 
dCurrentDate);
301 return dCurrentDate;
302 }
303 
304 void SwContentControl::dumpAsXml(xmlTextWriterPtr pWriter) const
305 {



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D_exE_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi0q9U6syEGq9OtgX-2BCjfRFrjAgjV1Hi0YvUKA6gYqLGO4MoV9DS573RWddQAUuiLCvDjDcknCmQuSHiLg87CCS83-2BVZqKcgK9EbKfvuVK2q2SOVvvBbAlQrNYLTKpkKgPzXy-2FZ1-2BijzXwtB9QFLVEgjHcs7SMxDhOMyqOq3kgNr9X08Mj3P3iOtTK8ikpTxgO



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

2022-05-27 Thread Luboš Luňák (via logerrit)
 sc/qa/unit/ucalc_formula.cxx   |   92 ++
 sc/source/core/tool/interpr1.cxx   |  130 ++---
 sc/source/core/tool/rangecache.cxx |5 -
 3 files changed, 175 insertions(+), 52 deletions(-)

New commits:
commit 7674399aac661eb503d7badc53b9a4d68bd9839d
Author: Luboš Luňák 
AuthorDate: Fri May 27 19:51:40 2022 +0200
Commit: Luboš Luňák 
CommitDate: Sat May 28 05:44:27 2022 +0200

try to range-reduce even COUNTIFS if not matching empty cells

It's possible to do reduce range of COUNTIFS to non-empty data too,
since empty cells cannot contribute to the result, as long as
the criteria do not require matching empty cells. Without this
queries like =COUNTIFS($A:$A,...) can spend most of their time
clearing and searching the vConditions vector that's big and
not useful for the trailing empty cells in that column.

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

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 14d779d2e4f3..6bad4a40127c 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -308,6 +308,7 @@ public:
 void testFuncRowsHidden();
 void testFuncSUMIFS();
 void testFuncCOUNTIFEmpty();
+void testFuncCOUNTIFSRangeReduce();
 void testFuncRefListArraySUBTOTAL();
 void testFuncJumpMatrixArrayIF();
 void testFuncJumpMatrixArrayOFFSET();
@@ -427,6 +428,7 @@ public:
 CPPUNIT_TEST(testFuncRowsHidden);
 CPPUNIT_TEST(testFuncSUMIFS);
 CPPUNIT_TEST(testFuncCOUNTIFEmpty);
+CPPUNIT_TEST(testFuncCOUNTIFSRangeReduce);
 CPPUNIT_TEST(testFuncRefListArraySUBTOTAL);
 CPPUNIT_TEST(testFuncJumpMatrixArrayIF);
 CPPUNIT_TEST(testFuncJumpMatrixArrayOFFSET);
@@ -9356,6 +9358,56 @@ void TestFormula::testFuncCOUNTIFEmpty()
 m_pDoc->DeleteTab(0);
 }
 
+// Test that COUNTIFS counts properly empty cells if asked to.
+void TestFormula::testFuncCOUNTIFSRangeReduce()
+{
+sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on.
+m_pDoc->InsertTab(0, "Test");
+
+// Data in A1:C9.
+std::vector> aData = {
+{ "" },
+{ "a",  "1", "1" },
+{ "b",  "2", "2" },
+{ "c",  "4", "3" },
+{ "d",  "8", "4" },
+{ "a", "16", "5" },
+{ "" },
+{ "b", "", "6" },
+{ "c", "64", "7" }
+};
+
+insertRangeData(m_pDoc, ScAddress(0,0,0), aData);
+
+constexpr SCROW maxRow = 20; // so that the unittest is not slow in 
dbgutil builds
+ScRange aSubRange( ScAddress( 0, 0, 0 ), ScAddress( 2, maxRow, 0 ));
+m_pDoc->GetDataAreaSubrange(aSubRange);
+// This is the range the data should be reduced to in 
ScInterpreter::IterateParametersIfs().
+CPPUNIT_ASSERT_EQUAL( SCROW(1), aSubRange.aStart.Row());
+CPPUNIT_ASSERT_EQUAL( SCROW(8), aSubRange.aEnd.Row());
+
+m_pDoc->SetFormula( ScAddress(10, 0, 0), "=COUNTIFS($A1:$A" + 
OUString::number(maxRow+1)
++ "; \"\"; $B1:$B" + OUString::number(maxRow+1)
++ "; \"\"; $C1:$C" + OUString::number(maxRow+1) +"; \"\")",
+formula::FormulaGrammar::GRAM_NATIVE_UI);
+// But it should find out that it can't range reduce and must count all 
the empty rows.
+CPPUNIT_ASSERT_EQUAL( double(maxRow + 1 - 7), 
m_pDoc->GetValue(ScAddress(10, 0, 0)));
+
+// Check also with criteria set as cell references, the middle one 
resulting in matching
+// empty cells (which should cause ScInterpreter::IterateParametersIfs() 
to undo
+// the range reduction). This should only match the A8-C8 row, but it also 
shouldn't crash.
+// Matching empty cells using a cell reference needs a formula to set the 
cell to
+// an empty string, plain empty cell wouldn't do, so use K2 for that.
+m_pDoc->SetFormula( ScAddress(10, 1, 0), "=\"\"", 
formula::FormulaGrammar::GRAM_NATIVE_UI );
+m_pDoc->SetFormula( ScAddress(10, 0, 0), "=COUNTIFS($A1:$A" + 
OUString::number(maxRow+1)
++ "; A8; $B1:$B" + OUString::number(maxRow+1)
++ "; K2; $C1:$C" + OUString::number(maxRow+1) + "; C8)",
+formula::FormulaGrammar::GRAM_NATIVE_UI);
+CPPUNIT_ASSERT_EQUAL( double(1), m_pDoc->GetValue(ScAddress(10, 0, 0)));
+
+m_pDoc->DeleteTab(0);
+}
+
 // Test SUBTOTAL with reference lists in array context.
 void TestFormula::testFuncRefListArraySUBTOTAL()
 {
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index c6bcb29b28bb..0b3592976a71 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5844,6 +5844,7 @@ void ScInterpreter::IterateParametersIfs( 
double(*ResultFunc)( const sc::ParamIf
 // matrix formula.
 vConditions.clear();
 
+// Range-reduce optimization
 SCCOL nStartColDiff = 0;
 SCCOL nEndColDiff = 0;
 SCROW nStartRowDiff = 0;
@@ -5851,43 +5852,39 @@ v

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

2022-05-27 Thread Szymon Kłos (via logerrit)
 sw/source/uibase/dochdl/swdtflvr.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit f7dbe354b16f4bbd4301df4de3e2fc5201ba99b3
Author: Szymon Kłos 
AuthorDate: Fri May 27 14:50:21 2022 +0200
Commit: Andras Timar 
CommitDate: Fri May 27 22:23:40 2022 +0200

tdf#145875 don't open Insert section dialog when pasting image

This happens when we "copy image" in Firefox of the resource which
cannot be accessed without logging in on some website.

In that case we used HTML format and that resulted in pasting
login webpage as a section.

This patch detects simple HTML containing only an image while it also
contains BITMAP format in the clipboard which we can use directly.
That way we paste image data from the clipboard.

Change-Id: Ia2ee7e246f8c71e1d0958c6c955ec056a0a96f8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135011
Tested-by: Jenkins
Reviewed-by: Andras Timar 
(cherry picked from commit 0599a73c3c2bffdbfa4e695e2d694f1947215a07)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135012
Tested-by: Jenkins CollaboraOffice 

diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index 542101829162..72885b0f21e0 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1501,6 +1501,11 @@ bool SwTransferable::Paste(SwWrtShell& rSh, 
TransferableDataHelper& rData, RndSt
 &nActionFlags );
 }
 
+// when HTML is just an image don't generate new section
+if (rData.HasFormat(SotClipboardFormatId::HTML_SIMPLE) && 
rData.HasFormat(SotClipboardFormatId::HTML_NO_COMMENT)
+&& rData.HasFormat(SotClipboardFormatId::BITMAP) && nFormat == 
SotClipboardFormatId::FILE_LIST)
+nFormat = SotClipboardFormatId::BITMAP;
+
 // tdf#37223 avoid non-native insertion of Calc worksheets in the 
following cases:
 // content of 1-cell worksheets are inserted as simple text using RTF 
format,
 // bigger worksheets within native (Writer) table cells are inserted as 
native tables,


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

2022-05-27 Thread Louis Possoz (via logerrit)
 xmloff/source/text/XMLSectionFootnoteConfigImport.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bbec710bd25fc5da27636cde73fe4ab23c76904f
Author: Louis Possoz 
AuthorDate: Sat Apr 30 06:39:38 2022 +0100
Commit: Michael Stahl 
CommitDate: Fri May 27 21:11:27 2022 +0200

tdf#145178 Formats in section Foot/Endnotes not read from saved files

Imported, 'num-suffix' & 'num-format' properties generate debug warnings:

warn:xmloff:10220:10220:xmloff/source/text/
   XMLSectionFootnoteConfigImport.cxx:123: unknown attribute urn:oasis
   :names:tc:opendocument:xmlns:style:1.0 style:num-suffix value=]]
warn:xmloff:10220:10220:xmloff/source/text/
   XMLSectionFootnoteConfigImport.cxx:123: unknown attribute urn:oasis
   :names:tc:opendocument:xmlns:style:1.0 style:num-format value=One

The faulty code is within XMLSectionFootnoteConfigImport::startFastElement()

The namespace for these two properties must be set to 'STYLE'
   (it is wrongly set to 'TEXT')

Change-Id: I923f12e19ed15779c67b2159d88d80a2ccb04e17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133605
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx 
b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
index fcdbf2221b5a..ef408c0c13c8 100644
--- a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
+++ b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
@@ -101,13 +101,13 @@ void XMLSectionFootnoteConfigImport::startFastElement(
 bNumOwn = true;
 break;
 }
-case XML_ELEMENT(TEXT, XML_NUM_SUFFIX):
+case XML_ELEMENT(STYLE, XML_NUM_SUFFIX):
 {
 sNumSuffix = aIter.toString();
 bNumOwn = true;
 break;
 }
-case XML_ELEMENT(TEXT, XML_NUM_FORMAT):
+case XML_ELEMENT(STYLE, XML_NUM_FORMAT):
 {
 sNumFormat = aIter.toString();
 bNumOwn = true;


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-2' - 32 commits - configure.ac connectivity/source download.lst editeng/inc editeng/qa editeng/source external/liborcus external/nss external

2022-05-27 Thread Andras Timar (via logerrit)
 configure.ac|   23 
 connectivity/source/drivers/dbase/DTable.cxx|2 
 download.lst|8 
 editeng/inc/editdoc.hxx |   38 
 editeng/qa/unit/core-test.cxx   |4 
 editeng/source/editeng/editdbg.cxx  |   32 
 editeng/source/editeng/editdoc.cxx  |  114 
 editeng/source/editeng/editeng.cxx  |   24 
 editeng/source/editeng/impedit.cxx  |   16 
 editeng/source/editeng/impedit.hxx  |8 
 editeng/source/editeng/impedit2.cxx |  211 
 editeng/source/editeng/impedit3.cxx |  279 
 editeng/source/editeng/impedit4.cxx |   79 
 editeng/source/editeng/impedit5.cxx |   10 
 external/liborcus/UnpackedTarball_liborcus.mk   |   12 
 external/liborcus/forcepoint-83.patch.1 |   16 
 external/liborcus/forcepoint-84.patch.1 |   38 
 external/liborcus/forcepoint-87.patch.1 |   27 
 external/liborcus/forcepoint-95.patch.1 |   11 
 external/nss/ExternalProject_nss.mk |7 
 external/zlib/UnpackedTarball_zlib.mk   |4 
 external/zlib/ubsan.patch   |   11 
 include/sfx2/strings.hrc|2 
 include/sfx2/viewfrm.hxx|1 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs  |   10 
 readlicense_oo/license/CREDITS.fodt | 4462 
+-
 sc/source/ui/docshell/impex.cxx |2 
 sd/source/ui/slideshow/slideshowimpl.cxx|2 
 sfx2/source/view/viewfrm.cxx|   38 
 slideshow/source/engine/activities/simplecontinuousactivitybase.cxx |   12 
 svl/source/numbers/zforfind.cxx |   23 
 svl/source/passwordcontainer/passwordcontainer.cxx  |  126 
 svl/source/passwordcontainer/passwordcontainer.hxx  |   63 
 svx/source/xml/xmlxtimp.cxx |2 
 sw/CppunitTest_sw_core_text.mk  |2 
 sw/qa/core/text/text.cxx|   44 
 sw/qa/extras/uiwriter/uiwriter.cxx  |   51 
 sw/source/core/inc/layfrm.hxx   |1 
 sw/source/core/inc/rootfrm.hxx  |2 
 sw/source/core/layout/findfrm.cxx   |   21 
 sw/source/core/layout/pagechg.cxx   |2 
 sw/source/core/layout/tabfrm.cxx|   42 
 sw/source/core/text/frmform.cxx |   18 
 sw/source/core/text/frmpaint.cxx|9 
 sw/source/core/text/porfld.cxx  |   14 
 sw/source/core/text/porrst.cxx  |2 
 sw/source/core/txtnode/ndtxt.cxx|5 
 vcl/source/filter/itiff/itiff.cxx   |4 
 vcl/source/outdev/text.cxx  |2 
 vcl/unx/gtk3/gtkframe.cxx   |   20 
 50 files changed, 3262 insertions(+), 2694 deletions(-)

New commits:
commit ca5abbfa9eba0843daf66a07513cf6b683f1bff1
Author: Andras Timar 
AuthorDate: Fri May 27 20:32:11 2022 +0200
Commit: Andras Timar 
CommitDate: Fri May 27 20:34:49 2022 +0200

Bump version to 7.2.7.2.M1

Change-Id: I7a78259f40b48e6a2532143ab3b8432ec5a87f3e

diff --git a/configure.ac b/configure.ac
index 043e510dfa3a..fc6a4c1e61bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[7.2.6.2.M2],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[7.2.7.2.M1],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
commit 3ee19fa102f373b633e015e7aa294ba118e58aad
Author: Michael Stahl 
AuthorDate: Fri May 6

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

2022-05-27 Thread Szymon Kłos (via logerrit)
 sw/source/uibase/dochdl/swdtflvr.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 7f9fd86e01f2d4a70c2ce5a2c69994f2eeb05f65
Author: Szymon Kłos 
AuthorDate: Fri May 27 14:50:21 2022 +0200
Commit: Andras Timar 
CommitDate: Fri May 27 20:34:18 2022 +0200

tdf#145875 don't open Insert section dialog when pasting image

This happens when we "copy image" in Firefox of the resource which
cannot be accessed without logging in on some website.

In that case we used HTML format and that resulted in pasting
login webpage as a section.

This patch detects simple HTML containing only an image while it also
contains BITMAP format in the clipboard which we can use directly.
That way we paste image data from the clipboard.

Change-Id: Ia2ee7e246f8c71e1d0958c6c955ec056a0a96f8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135040
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index fadba4319510..f131f6e8091e 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1487,6 +1487,11 @@ bool SwTransferable::Paste(SwWrtShell& rSh, 
TransferableDataHelper& rData, RndSt
 &nActionFlags );
 }
 
+// when HTML is just an image don't generate new section
+if (rData.HasFormat(SotClipboardFormatId::HTML_SIMPLE) && 
rData.HasFormat(SotClipboardFormatId::HTML_NO_COMMENT)
+&& rData.HasFormat(SotClipboardFormatId::BITMAP) && nFormat == 
SotClipboardFormatId::FILE_LIST)
+nFormat = SotClipboardFormatId::BITMAP;
+
 // tdf#37223 avoid non-native insertion of Calc worksheets in the 
following cases:
 // content of 1-cell worksheets are inserted as simple text using RTF 
format,
 // bigger worksheets within native (Writer) table cells are inserted as 
native tables,


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

2022-05-27 Thread Szymon Kłos (via logerrit)
 sw/source/uibase/dochdl/swdtflvr.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 0599a73c3c2bffdbfa4e695e2d694f1947215a07
Author: Szymon Kłos 
AuthorDate: Fri May 27 14:50:21 2022 +0200
Commit: Andras Timar 
CommitDate: Fri May 27 20:32:34 2022 +0200

tdf#145875 don't open Insert section dialog when pasting image

This happens when we "copy image" in Firefox of the resource which
cannot be accessed without logging in on some website.

In that case we used HTML format and that resulted in pasting
login webpage as a section.

This patch detects simple HTML containing only an image while it also
contains BITMAP format in the clipboard which we can use directly.
That way we paste image data from the clipboard.

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

diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index 7768414cb4ba..5c3988e458b7 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1494,6 +1494,11 @@ bool SwTransferable::Paste(SwWrtShell& rSh, 
TransferableDataHelper& rData, RndSt
 &nActionFlags );
 }
 
+// when HTML is just an image don't generate new section
+if (rData.HasFormat(SotClipboardFormatId::HTML_SIMPLE) && 
rData.HasFormat(SotClipboardFormatId::HTML_NO_COMMENT)
+&& rData.HasFormat(SotClipboardFormatId::BITMAP) && nFormat == 
SotClipboardFormatId::FILE_LIST)
+nFormat = SotClipboardFormatId::BITMAP;
+
 // tdf#37223 avoid non-native insertion of Calc worksheets in the 
following cases:
 // content of 1-cell worksheets are inserted as simple text using RTF 
format,
 // bigger worksheets within native (Writer) table cells are inserted as 
native tables,


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

2022-05-27 Thread Michael Stahl (via logerrit)
 framework/source/uielement/recentfilesmenucontroller.cxx |7 +--
 sfx2/source/control/recentdocsviewitem.cxx   |6 +-
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 34eea317c5929d640aa43477c737d26d6b700bdb
Author: Michael Stahl 
AuthorDate: Fri May 27 19:31:01 2022 +0200
Commit: Michael Stahl 
CommitDate: Fri May 27 20:26:52 2022 +0200

tdf#149170 framework,sfx2: don't add ReadOnly=false

There is a non-obvious difference in error handling when opening the
file read/write for type-detection fails in
utl::MediaDescriptor::impl_openStreamWithURL() - if ReadOnly=false is
given, it will abort the file loading, whereas without any ReadOnly it
will fall-back to a read-only opening of the file for type detection.

At this point a StillReadWriteInteraction is used, so the user is never
notified of the failure.

(regression from commit 404c51f3664ffd4f7e2c1c8bb8a12ac70954fec2)

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

diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx 
b/framework/source/uielement/recentfilesmenucontroller.cxx
index 2fbad67becd9..dc4001a1f645 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -264,14 +264,17 @@ void RecentFilesMenuController::executeEntry( sal_Int32 
nIndex )
 Sequence< PropertyValue > aArgsList{
 comphelper::makePropertyValue("Referer", OUString( "private:user" )),
 
-comphelper::makePropertyValue("ReadOnly", 
m_aRecentFilesItems[nIndex].second),
-
 // documents in the picklist will never be opened as templates
 comphelper::makePropertyValue("AsTemplate", false),
 
 // Type detection needs to know which app we are opening it from.
 comphelper::makePropertyValue("DocumentService", m_aModuleName)
 };
+if (m_aRecentFilesItems[nIndex].second) // tdf#149170 only add if true
+{
+aArgsList.realloc(aArgsList.size()+1);
+aArgsList.getArray()[aArgsList.size()-1] = 
comphelper::makePropertyValue("ReadOnly", true);
+}
 dispatchCommand(m_aRecentFilesItems[nIndex].first, aArgsList, "_default");
 }
 
diff --git a/sfx2/source/control/recentdocsviewitem.cxx 
b/sfx2/source/control/recentdocsviewitem.cxx
index 0cdf74418d05..44f103dfbfa4 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -320,9 +320,13 @@ void RecentDocsViewItem::OpenDocument()
 xTrans->parseStrict(aTargetURL);
 
 aArgsList = { comphelper::makePropertyValue("Referer", 
OUString("private:user")),
-  comphelper::makePropertyValue("ReadOnly", m_isReadOnly),
   // documents will never be opened as templates
   comphelper::makePropertyValue("AsTemplate", false) };
+if (m_isReadOnly) // tdf#149170 only add if true
+{
+aArgsList.realloc(aArgsList.size()+1);
+aArgsList.getArray()[aArgsList.size()-1] = 
comphelper::makePropertyValue("ReadOnly", true);
+}
 
 xDispatch = xDesktop->queryDispatch(aTargetURL, "_default", 0);
 


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

2022-05-27 Thread Tibor Nagy (via logerrit)
 include/oox/drawingml/shape.hxx|6 +++
 include/oox/ppt/slidepersist.hxx   |4 ++
 oox/source/ppt/pptshape.cxx|   23 ++--
 oox/source/ppt/presentationfragmenthandler.cxx |   46 +
 oox/source/ppt/slidepersist.cxx|2 +
 sd/qa/unit/data/pptx/tdf148965.pptx|binary
 sd/qa/unit/import-tests.cxx|   37 
 7 files changed, 100 insertions(+), 18 deletions(-)

New commits:
commit 855a56fea4561135a63cb729d7a625a950b210e7
Author: Tibor Nagy 
AuthorDate: Fri May 13 08:12:17 2022 +0200
Commit: László Németh 
CommitDate: Fri May 27 18:32:38 2022 +0200

tdf#148965 PPTX import: fix internal hyperlinks on shapes

Locale dependent code path resulted broken hyperlinks
on shapes in a non-English build.

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

diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index 4318c1e24d2d..e845b399f5f8 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -140,6 +140,9 @@ public:
 voidsetConnectorShape(bool bConnector) { 
mbConnector = bConnector; }
 boolisConnectorShape() const { return 
mbConnector; }
 
+voidsetBookmark(bool bBookmark) { 
mbHasBookmark = bBookmark; }
+boolhasBookmark() const { return 
mbHasBookmark; }
+
 Shape3DProperties&  get3DProperties() { return 
*mp3DPropertiesPtr; }
 const Shape3DProperties&get3DProperties() const { return 
*mp3DPropertiesPtr; }
 
@@ -410,6 +413,9 @@ private:
 // Is this a connector shape?
 bool mbConnector = false;
 
+// Is shape has bookmark?
+bool mbHasBookmark = false;
+
 // temporary space for DiagramHelper in preparation for collecting data
 // Note: I tried to use a unique_ptr here, but existing constructor func 
does not allow that
 svx::diagram::IDiagramHelper* mpDiagramHelper;
diff --git a/include/oox/ppt/slidepersist.hxx b/include/oox/ppt/slidepersist.hxx
index 1b0a92c70783..4ba48637c66a 100644
--- a/include/oox/ppt/slidepersist.hxx
+++ b/include/oox/ppt/slidepersist.hxx
@@ -127,6 +127,9 @@ public:
 
 void createConnectorShapeConnection();
 
+void  addURLShapeId(const OUString& rShapeId) { 
maURLShapeId.push_back(rShapeId); }
+std::vector& getURLShapeId() { return maURLShapeId; }
+
 private:
 OUString
maPath;
 OUString
maLayoutPath;
@@ -160,6 +163,7 @@ private:
 CommentAuthorList   
maCommentAuthors;
 
 std::vector   
maConnectorShapeId;
+std::vector   
maURLShapeId;
 };
 
 }
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index d83737250550..2ec4a3fbe327 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -613,27 +613,14 @@ void PPTShape::addShape(
 // so check here if it's a bookmark or a document
 if (meClickAction == ClickAction_BOOKMARK)
 {
+sal_Int32 nSplitPos;
 if (!sURL.startsWith("#"))
 meClickAction = ClickAction_DOCUMENT;
-else
+else if (-1 != (nSplitPos = sURL.indexOf( ' ' )))
 {
-sURL = sURL.copy(1);
-sal_Int32 nPageNumber = 0;
-static const OUStringLiteral sSlide = u"Slide ";
-if (sURL.match(sSlide))
-nPageNumber = 
o3tl::toInt32(sURL.subView(sSlide.getLength()));
-Reference 
xDPS(rFilterBase.getModel(),
-
uno::UNO_QUERY_THROW);
-Reference 
xDrawPages(xDPS->getDrawPages(),
-  
uno::UNO_SET_THROW);
-sal_Int32 nMaxPages = xDrawPages->getCount();
-if (nPageNumber && nPageNumber <= nMaxPages)
-{
-Reference xDrawPage;
-xDrawPages->getByIndex(nPageNumber - 1) >>= 
xDrawPage;
-Reference xNamed(xDrawPage, 
UNO_QUERY);
-sURL = xNamed->getName();
-}
+ 

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

2022-05-27 Thread Noel Grandin (via logerrit)
 basegfx/source/polygon/b2dpolypolygoncutter.cxx |5 +++--
 basegfx/source/tools/b2dclipstate.cxx   |5 +++--
 basegfx/source/tools/unopolypolygon.cxx |5 +++--
 include/basegfx/DrawCommands.hxx|5 +++--
 include/basegfx/matrix/b2dhommatrixtools.hxx|5 +++--
 include/basegfx/utils/gradienttools.hxx |5 +++--
 include/basegfx/utils/unopolypolygon.hxx|2 +-
 7 files changed, 19 insertions(+), 13 deletions(-)

New commits:
commit b3c965ccaa896b12b33ff5b7ccea0eb20d560116
Author: Noel Grandin 
AuthorDate: Fri May 27 16:36:42 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri May 27 18:20:07 2022 +0200

clang-tidy modernize-pass-by-value in basegfx

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

diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx 
b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index ddec57374649..b548939f3eed 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -513,8 +514,8 @@ namespace basegfx
 impSolve();
 }
 
-explicit solver(const B2DPolyPolygon& rOriginal, size_t* 
pPointLimit = nullptr)
-:   maOriginal(rOriginal),
+explicit solver(B2DPolyPolygon aOriginal, size_t* pPointLimit = 
nullptr)
+:   maOriginal(std::move(aOriginal)),
 mbIsCurve(false),
 mbChanged(false)
 {
diff --git a/basegfx/source/tools/b2dclipstate.cxx 
b/basegfx/source/tools/b2dclipstate.cxx
index 7b8309e0de1c..126235699b4b 100644
--- a/basegfx/source/tools/b2dclipstate.cxx
+++ b/basegfx/source/tools/b2dclipstate.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 namespace basegfx::utils
@@ -39,8 +40,8 @@ namespace basegfx::utils
 mePendingOps(UNION)
 {}
 
-explicit ImplB2DClipState( const B2DPolyPolygon& rPoly ) :
-maClipPoly(rPoly),
+explicit ImplB2DClipState( B2DPolyPolygon aPoly ) :
+maClipPoly(std::move(aPoly)),
 mePendingOps(UNION)
 {}
 
diff --git a/basegfx/source/tools/unopolypolygon.cxx 
b/basegfx/source/tools/unopolypolygon.cxx
index ce61a5d3451b..76341e6ea532 100644
--- a/basegfx/source/tools/unopolypolygon.cxx
+++ b/basegfx/source/tools/unopolypolygon.cxx
@@ -28,13 +28,14 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
 namespace basegfx::unotools
 {
-UnoPolyPolygon::UnoPolyPolygon( const B2DPolyPolygon& rPolyPoly ) :
-maPolyPoly( rPolyPoly ),
+UnoPolyPolygon::UnoPolyPolygon( B2DPolyPolygon aPolyPoly ) :
+maPolyPoly(std::move( aPolyPoly )),
 meFillRule( rendering::FillRule_EVEN_ODD )
 {
 // or else races will haunt us.
diff --git a/include/basegfx/DrawCommands.hxx b/include/basegfx/DrawCommands.hxx
index fef43689b4a9..14d3ad2459cf 100644
--- a/include/basegfx/DrawCommands.hxx
+++ b/include/basegfx/DrawCommands.hxx
@@ -11,6 +11,7 @@
 #define INCLUDED_BASEGFX_DRAWCOMMANDS_H
 
 #include 
+#include 
 #include 
 
 #include 
@@ -141,9 +142,9 @@ public:
 std::shared_ptr mpStrokeColor;
 std::shared_ptr mpFillGradient;
 
-DrawPath(basegfx::B2DPolyPolygon const& rPolyPolygon)
+DrawPath(basegfx::B2DPolyPolygon aPolyPolygon)
 : DrawBase(DrawCommandType::Path)
-, maPolyPolygon(rPolyPolygon)
+, maPolyPolygon(std::move(aPolyPolygon))
 , mnStrokeWidth(1.0)
 , mnOpacity(1.0)
 {
diff --git a/include/basegfx/matrix/b2dhommatrixtools.hxx 
b/include/basegfx/matrix/b2dhommatrixtools.hxx
index 10a0fe0df717..9b81f33d2a44 100644
--- a/include/basegfx/matrix/b2dhommatrixtools.hxx
+++ b/include/basegfx/matrix/b2dhommatrixtools.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 namespace basegfx { class B2DRange; }
@@ -197,8 +198,8 @@ namespace basegfx::utils
 }
 
 public:
-B2DHomMatrixBufferedOnDemandDecompose(const B2DHomMatrix& 
rB2DHomMatrix = B2DHomMatrix())
-:   maB2DHomMatrix(rB2DHomMatrix),
+B2DHomMatrixBufferedOnDemandDecompose(B2DHomMatrix aB2DHomMatrix = 
B2DHomMatrix())
+:   maB2DHomMatrix(std::move(aB2DHomMatrix)),
 mfRotate(0.0),
 mfShearX(0.0),
 mbDecomposed(false)
diff --git a/include/basegfx/utils/gradienttools.hxx 
b/include/basegfx/utils/gradienttools.hxx
index e3d816394b54..03892122b54b 100644
--- a/include/basegfx/utils/gradienttools.hxx
+++ b/include/basegfx/utils/gradienttools.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 namespace basegfx { class B2DRange; }
@@ -72,10 +73,10 @@ namespace basegfx
 }
 
  

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

2022-05-27 Thread Mike Kaganski (via logerrit)
 vcl/source/treelist/treelistbox.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 0779a1a185d2144d13766e6d827f43c0fd1bc814
Author: Mike Kaganski 
AuthorDate: Fri May 27 15:10:52 2022 +0200
Commit: Mike Kaganski 
CommitDate: Fri May 27 16:14:42 2022 +0200

Drop useless text width calculation

It came from SvTreeListBox::GetHeightOffset dropped in commit
7da765dde1800aa607f96e7a5807582ad2894acb
  Author Noel Grandin 
  Date   Thu Oct 27 10:21:42 2016 +0200
loplugin:expandablemethods in svtools

Possibly the calculation was used for something else GetHeightOffset
used before.

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

diff --git a/vcl/source/treelist/treelistbox.cxx 
b/vcl/source/treelist/treelistbox.cxx
index a244e97f809a..5092c64cb83d 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -2029,10 +2029,10 @@ void SvTreeListBox::AdjustEntryHeight( const Image& 
rBmp )
 
 void SvTreeListBox::AdjustEntryHeight()
 {
-Size aSize( GetTextWidth(OUString('X')), GetTextHeight() );
-if( aSize.Height()  >  nEntryHeight )
+tools::Long nHeight = GetTextHeight();
+if( nHeight  >  nEntryHeight )
 {
-nEntryHeight = static_cast(aSize.Height()) + nEntryHeightOffs;
+nEntryHeight = static_cast(nHeight) + nEntryHeightOffs;
 pImpl->SetEntryHeight();
 }
 }


[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - external/pdfium

2022-05-27 Thread Gabor Kelemen (via logerrit)
 external/pdfium/msvc2015.patch.1 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 110c9e90e35b4596939e62f49b5b3c1b843887c3
Author: Gabor Kelemen 
AuthorDate: Fri May 27 16:00:32 2022 +0200
Commit: Gabor Kelemen 
CommitDate: Fri May 27 16:10:19 2022 +0200

Fix pdfium build on Win

Regression from 2094212207c802affa7694fe0ddf3ab8ea56c970

Change-Id: Ifee5f65ed9d21f7e0d770161f56966b11cf0598e

diff --git a/external/pdfium/msvc2015.patch.1 b/external/pdfium/msvc2015.patch.1
index 36cb5332c7b0..eac2ff0f6f5a 100644
--- a/external/pdfium/msvc2015.patch.1
+++ b/external/pdfium/msvc2015.patch.1
@@ -111,7 +111,7 @@ Fix MSVC 2015 build
 --- pdfium/core/fpdfapi/page/cpdf_meshstream.cpp.orig  2020-12-03 
16:54:09.233498800 +0100
 +++ pdfium/core/fpdfapi/page/cpdf_meshstream.cpp   2020-12-03 
16:41:29.173766500 +0100
 @@ -209,7 +209,7 @@
-   func->Call(color_value, 1, result, &nResults);
+   func->Call(pdfium::make_span(color_value, 1), result);
}
  
 -  m_pCS->GetRGB(result, &r, &g, &b);


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

2022-05-27 Thread Seth Chaiklin (via logerrit)
 cui/inc/tipoftheday.hrc |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 74de217a52a15588e3fdf4059d62a384777c66db
Author: Seth Chaiklin 
AuthorDate: Wed May 25 14:57:17 2022 +0200
Commit: Seth Chaiklin 
CommitDate: Fri May 27 13:55:00 2022 +0200

tdf#127294 (related: tdf#147524) add ToD about Customize toolbars

Inspired by tdf#147524
Includes link to relevant help page

Change-Id: Idb2b3da4839a61a5f713400b378babb0c765fb4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134904
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Seth Chaiklin 
Tested-by: Adolfo Jayme Barrientos 
Tested-by: Jenkins

diff --git a/cui/inc/tipoftheday.hrc b/cui/inc/tipoftheday.hrc
index 7f9c7fc858df..7f3213b8c1a0 100644
--- a/cui/inc/tipoftheday.hrc
+++ b/cui/inc/tipoftheday.hrc
@@ -273,6 +273,7 @@ const std::tuple 
TIPOFTHEDAY_STRINGARRAY[] =
  { NC_("RID_CUI_TIPOFTHEDAY", "Developing new XSLT and XML filters?"), 
"https://fridrich.blogspot.com/2013/08/extending-swiss-army-knife-overview.html";,
 ""},
  { NC_("RID_CUI_TIPOFTHEDAY", "Press Shift+F1 to see any available 
extended tooltips in dialog boxes, when \"Extended tips\" is not enabled in 
Tools ▸ Options ▸ %PRODUCTNAME ▸ General."), 
"https://help.libreoffice.org/%PRODUCTVERSION/%LANGUAGENAME/text/shared/05/0120.html";,
 ""},
  { NC_("RID_CUI_TIPOFTHEDAY", "Never use certain arrow styles? Remove them 
by using the Delete button on the Format ▸ Text Box and Shape ▸ Line ▸ Arrow 
Styles tab."), "cui/ui/lineendstabpage/BTN_MODIFY", ""},
+ { NC_("RID_CUI_TIPOFTHEDAY", "Don’t like the position of some icons on 
your toolbar? Change it with Tools ▸ Customize ▸ Toolbars tab ▸ Target."), 
"CUI_HID_SVX_CONFIG_TOOLBAR", ""},
 };
 
 #define STR_HELP_LINK   NC_("STR_HELP_LINK", "%PRODUCTNAME 
Help")


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

2022-05-27 Thread Marco Cecchetti (via logerrit)
 filter/source/svg/presentation_engine.js |  231 ++-
 1 file changed, 226 insertions(+), 5 deletions(-)

New commits:
commit 2b1ede7cdeec0c9569f8dc5b7170afb13f202416
Author: Marco Cecchetti 
AuthorDate: Mon May 23 12:22:19 2022 +0200
Commit: Aron Budea 
CommitDate: Fri May 27 13:52:44 2022 +0200

svg filter: transform animations: support for scale and translate

Now the emphasis grow and shrink animation is supported.
Now the animation engine is able to handle array of values instead of
single value param when computing the next animation state.

Change-Id: Ic200103c6c26a63de8eecc37dcd36ba1a2f0d391
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134870
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit a6ed16394c4a95cf204f38c30cb025bc99f00027)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134994
Reviewed-by: Aron Budea 

diff --git a/filter/source/svg/presentation_engine.js 
b/filter/source/svg/presentation_engine.js
index 201aab2dcf8e..7e6de4282f98 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -7033,6 +7033,8 @@ function matrixToString( aSVGMatrix )
 // eslint-disable-next-line no-unused-vars
 function numberParser( sValue )
 {
+if( typeof sValue !== 'string' )
+return undefined;
 if( sValue === '.' )
 return undefined;
 var reFloatNumber = /^[+-]?[0-9]*[.]?[0-9]*$/;
@@ -7045,6 +7047,9 @@ function numberParser( sValue )
 
 function booleanParser( sValue )
 {
+if( typeof sValue !== 'string' )
+return undefined;
+
 sValue = sValue.toLowerCase();
 if( sValue === 'true' )
 return true;
@@ -7056,6 +7061,9 @@ function booleanParser( sValue )
 
 function colorParser( sValue )
 {
+if( typeof sValue !== 'string' )
+return undefined;
+
 // The following 3 color functions are used in evaluating sValue string
 // so don't remove them.
 
@@ -7989,6 +7997,7 @@ var ENUM_PROPERTY   = 2;
 var COLOR_PROPERTY  = 3;
 var STRING_PROPERTY = 4;
 var BOOL_PROPERTY   = 5;
+var TUPLE_NUMBER_PROPERTY   = 6;
 
 var aValueTypeOutMap = [ 'unknown', 'number', 'enum', 'color', 'string', 
'boolean' ];
 
@@ -8006,6 +8015,14 @@ var aAttributeMap =
 'get':  'getOpacity',
 'set':  'setOpacity'   
 },
 
+'scale':   {   'type':  TUPLE_NUMBER_PROPERTY,
+'get':  'getSize',
+'set':  'setSize'  
 },
+
+'translate':   {   'type':  TUPLE_NUMBER_PROPERTY,
+'get':  'getPos',
+'set':  'setPos'   
 },
+
 'rotate':   {   'type': NUMBER_PROPERTY,
 'get':  'getRotationAngle',
 'set':  'setRotationAngle' 
 },
@@ -11615,10 +11632,21 @@ AnimationTransformNode.prototype.createActivity = 
function()
 var aActivityParamSet = this.fillActivityParams();
 var aAnimation;
 
-aAnimation = createPropertyAnimation( this.getAttributeName(),
-  this.getAnimatedElement(),
-  this.aNodeContext.aSlideWidth,
-  this.aNodeContext.aSlideHeight );
+if( this.getAttributeName() === 'scale' || this.getAttributeName() === 
'translate' )
+{
+aAnimation = createPairPropertyAnimation( this.getAttributeName(),
+  this.getAnimatedElement(),
+  
this.aNodeContext.aSlideWidth,
+  
this.aNodeContext.aSlideHeight );
+
+}
+else
+{
+aAnimation = createPropertyAnimation( this.getAttributeName(),
+  this.getAnimatedElement(),
+  this.aNodeContext.aSlideWidth,
+  this.aNodeContext.aSlideHeight );
+}
 
 var aInterpolator = null;  // createActivity will compute it;
 return createActivity( aActivityParamSet, this, aAnimation, aInterpolator 
);
@@ -12049,6 +12077,41 @@ function createPropertyAnimation( sAttrName, 
aAnimatedElement, nWidth, nHeight )
 
 
 
+function createPairPropertyAnimation( sTransformType, aAnimatedElement, 
nWidth, nHeight )
+{
+var aFunctorSet = aAttributeMap[ sTransformType ];
+var sGetValueMethod = aFunctorSet.get;
+var sSetValueMethod = aFunctorSet.set;
+
+var aDefaultValue = [];
+var aSizeReference = [];
+if( sTransformType === 'scale' )
+{
+aDe

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

2022-05-27 Thread Miklos Vajna (via logerrit)
 sw/inc/formatcontentcontrol.hxx   |   47 
 sw/inc/unoprnms.hxx   |5 
 sw/qa/core/unocore/unocore.cxx|   20 +++
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx|   12 ++
 sw/source/core/txtnode/attrcontentcontrol.cxx |   10 +
 sw/source/core/unocore/unocontentcontrol.cxx  |  140 ++
 sw/source/core/unocore/unomap1.cxx|6 +
 sw/source/filter/ww8/docxattributeoutput.cxx  |   22 
 8 files changed, 262 insertions(+)

New commits:
commit 0f70f4d76b5f68e5b1d81f0e300435ccef893c9a
Author: Miklos Vajna 
AuthorDate: Fri May 27 12:35:20 2022 +0200
Commit: Miklos Vajna 
CommitDate: Fri May 27 13:42:59 2022 +0200

sw content controls, date: preserve more properties

While working on the DOCX import for dates, it turns out there is a need
to store more properties for DOCX export purposes. Given that these are
potentially useful for full support, add dedicated UNO API and DOCX
export for these (i.e. not just grab-bag), but omit UI or ODT filter for
now. This includes:

- 

- 

- 

And tests for all these.

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

diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index 36f0b01a527e..91b5ba011100 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -139,6 +139,21 @@ class SW_DLLPUBLIC SwContentControl : public 
sw::BroadcastingModify
 /// Date in -MM-DDT00:00:00Z format.
 OUString m_aCurrentDate;
 
+/// The placeholder's doc part: just remembered.
+OUString m_aPlaceholderDocPart;
+
+/// The data bindings's prefix mappings: just remembered.
+OUString m_aDataBindingPrefixMappings;
+
+/// The data bindings's XPath: just remembered.
+OUString m_aDataBindingXpath;
+
+/// The data bindings's store item ID: just remembered.
+OUString m_aDataBindingStoreItemID;
+
+/// The color: just remembered.
+OUString m_aColor;
+
 /// Stores a list item index, in case the doc model is not yet updated.
 std::optional m_oSelectedListItem;
 
@@ -233,6 +248,13 @@ public:
 /// Formats m_oSelectedDate, taking m_aDateFormat and m_aDateLanguage into 
account.
 OUString GetDateString() const;
 
+void SetPlaceholderDocPart(const OUString& rPlaceholderDocPart)
+{
+m_aPlaceholderDocPart = rPlaceholderDocPart;
+}
+
+OUString GetPlaceholderDocPart() const { return m_aPlaceholderDocPart; }
+
 void SetSelectedListItem(std::optional oSelectedListItem)
 {
 m_oSelectedListItem = oSelectedListItem;
@@ -245,6 +267,31 @@ public:
 std::optional GetSelectedDate() const { return m_oSelectedDate; }
 
 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
+
+void SetDataBindingPrefixMappings(const OUString& 
rDataBindingPrefixMappings)
+{
+m_aDataBindingPrefixMappings = rDataBindingPrefixMappings;
+}
+
+OUString GetDataBindingPrefixMappings() const { return 
m_aDataBindingPrefixMappings; }
+
+void SetDataBindingXpath(const OUString& rDataBindingXpath)
+{
+m_aDataBindingXpath = rDataBindingXpath;
+}
+
+OUString GetDataBindingXpath() const { return m_aDataBindingXpath; }
+
+void SetDataBindingStoreItemID(const OUString& rDataBindingStoreItemID)
+{
+m_aDataBindingStoreItemID = rDataBindingStoreItemID;
+}
+
+OUString GetDataBindingStoreItemID() const { return 
m_aDataBindingStoreItemID; }
+
+void SetColor(const OUString& rColor) { m_aColor = rColor; }
+
+OUString GetColor() const { return m_aColor; }
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 90921cbc655d..14da263acd96 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -883,6 +883,11 @@
 #define UNO_NAME_DATE_FORMAT "DateFormat"
 #define UNO_NAME_DATE_LANGUAGE "DateLanguage"
 #define UNO_NAME_CURRENT_DATE "CurrentDate"
+#define UNO_NAME_PLACEHOLDER_DOC_PART "PlaceholderDocPart"
+#define UNO_NAME_DATA_BINDING_PREFIX_MAPPINGS "DataBindingPrefixMappings"
+#define UNO_NAME_DATA_BINDING_XPATH "DataBindingXpath"
+#define UNO_NAME_DATA_BINDING_STORE_ITEM_ID "DataBindingStoreItemID"
+#define UNO_NAME_COLOR "Color"
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 1ccd8b250ec3..56b9ed4c74de 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -603,6 +603,17 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testContentControlDate)
 xContentControlProps->setPropertyValue("DateLanguage", 
uno::Any(OUString("en-US")));
 xContentControlProps->setPropertyValue("CurrentDate",

uno::Any(OUS

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

2022-05-27 Thread Noel Grandin (via logerrit)
 include/sax/fastattribs.hxx|4 ++--
 sax/source/fastparser/fastparser.cxx   |8 +---
 sax/source/fastparser/legacyfastparser.cxx |3 ++-
 sax/source/tools/fastattribs.cxx   |9 +
 4 files changed, 14 insertions(+), 10 deletions(-)

New commits:
commit d203d3aeb29a46bd85eb320d4ebcd7325ec4a1ab
Author: Noel Grandin 
AuthorDate: Fri May 27 10:25:58 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri May 27 12:55:23 2022 +0200

clang-tidy modernize-pass-by-value in sax

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

diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx
index 4ac958d882fc..57619b922518 100644
--- a/include/sax/fastattribs.hxx
+++ b/include/sax/fastattribs.hxx
@@ -43,8 +43,8 @@ struct UnknownAttribute
 OString maName;
 OString maValue;
 
-UnknownAttribute( const OUString& rNamespaceURL, const OString& rName, 
const OString& value );
-UnknownAttribute( const OString& rName, const OString& value );
+UnknownAttribute( OUString sNamespaceURL, OString aName, OString value );
+UnknownAttribute( OString sName, OString value );
 
 void FillAttribute( css::xml::Attribute* pAttrib ) const;
 };
diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index 47f3da4a2ba6..250078bc5054 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -98,8 +99,8 @@ struct NameWithToken
 OUString msName;
 sal_Int32 mnToken;
 
-NameWithToken(const OUString& sName, sal_Int32 nToken) :
-msName(sName), mnToken(nToken) {}
+NameWithToken(OUString sName, sal_Int32 nToken) :
+msName(std::move(sName)), mnToken(nToken) {}
 };
 
 struct SaxContext
@@ -136,7 +137,8 @@ struct NamespaceDefine
 sal_Int32   mnToken;
 OUStringmaNamespaceURL;
 
-NamespaceDefine( const OString& rPrefix, sal_Int32 nToken, const OUString& 
rNamespaceURL ) : maPrefix( rPrefix ), mnToken( nToken ), maNamespaceURL( 
rNamespaceURL ) {}
+NamespaceDefine( OString aPrefix, sal_Int32 nToken, OUString aNamespaceURL 
)
+: maPrefix(std::move( aPrefix )), mnToken( nToken ), 
maNamespaceURL(std::move( aNamespaceURL )) {}
 NamespaceDefine() : mnToken(-1) {}
 };
 
diff --git a/sax/source/fastparser/legacyfastparser.cxx 
b/sax/source/fastparser/legacyfastparser.cxx
index d32b12d8a5f9..e4c425bd07d3 100644
--- a/sax/source/fastparser/legacyfastparser.cxx
+++ b/sax/source/fastparser/legacyfastparser.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace ::cppu;
@@ -46,7 +47,7 @@ private:
 OUStringm_aPrefix;
 OUStringm_aNamespaceURI;
 
-NamespaceDefine( const OUString& rPrefix, const OUString& 
rNamespaceURI ) : m_aPrefix( rPrefix ), m_aNamespaceURI( rNamespaceURI ) {}
+NamespaceDefine( OUString aPrefix, OUString aNamespaceURI ) : 
m_aPrefix(std::move( aPrefix )), m_aNamespaceURI(std::move( aNamespaceURI )) {}
 };
 std::vector< std::unique_ptr< NamespaceDefine > > m_aNamespaceDefines;
 
diff --git a/sax/source/tools/fastattribs.cxx b/sax/source/tools/fastattribs.cxx
index 1af7821cba24..9b309d5fb422 100644
--- a/sax/source/tools/fastattribs.cxx
+++ b/sax/source/tools/fastattribs.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml;
@@ -34,13 +35,13 @@ FastTokenHandlerBase::~FastTokenHandlerBase()
 {
 }
 
-UnknownAttribute::UnknownAttribute( const OUString& rNamespaceURL, const 
OString& rName, const OString& value )
-: maNamespaceURL( rNamespaceURL ), maName( rName ), maValue( value )
+UnknownAttribute::UnknownAttribute( OUString aNamespaceURL, OString aName, 
OString value )
+: maNamespaceURL(std::move( aNamespaceURL )), maName(std::move( aName )), 
maValue(std::move( value ))
 {
 }
 
-UnknownAttribute::UnknownAttribute( const OString& rName, const OString& value 
)
-: maName( rName ), maValue( value )
+UnknownAttribute::UnknownAttribute( OString aName, OString value )
+: maName(std::move( aName )), maValue(std::move( value ))
 {
 }
 


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

2022-05-27 Thread Noel Grandin (via logerrit)
 include/tools/inetmsg.hxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit ba8502545fb5519a5cd13a673ee72d82f0fd8852
Author: Noel Grandin 
AuthorDate: Fri May 27 10:22:35 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri May 27 12:55:06 2022 +0200

clang-tidy modernize-pass-by-value in tools

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

diff --git a/include/tools/inetmsg.hxx b/include/tools/inetmsg.hxx
index 79c7aca936b4..8617b0b91bf1 100644
--- a/include/tools/inetmsg.hxx
+++ b/include/tools/inetmsg.hxx
@@ -26,6 +26,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -42,9 +43,8 @@ public:
 INetMessageHeader()
 {}
 
-INetMessageHeader (
-const OString& rName, const OString& rValue)
-: m_aName (rName), m_aValue (rValue)
+INetMessageHeader(OString aName, OString aValue)
+: m_aName (std::move(aName)), m_aValue (std::move(aValue))
 {}
 
 INetMessageHeader (


[Libreoffice-commits] core.git: schema/libreoffice sw/inc sw/qa sw/source xmloff/qa xmloff/source

2022-05-27 Thread Miklos Vajna (via logerrit)
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |5 
 sw/inc/formatcontentcontrol.hxx |   13 ++
 sw/inc/unoprnms.hxx |1 
 sw/qa/core/unocore/unocore.cxx  |3 
 sw/qa/uibase/wrtsh/wrtsh.cxx|2 
 sw/source/core/crsr/datecontentcontrolbutton.cxx|   12 ++
 sw/source/core/txtnode/attrcontentcontrol.cxx   |   63 +++-
 sw/source/core/unocore/unocontentcontrol.cxx|   28 +
 sw/source/core/unocore/unomap1.cxx  |2 
 sw/source/filter/ww8/docxattributeoutput.cxx|   10 +
 sw/source/uibase/wrtsh/wrtsh3.cxx   |5 
 xmloff/qa/unit/data/content-control-date.fodt   |2 
 xmloff/qa/unit/text.cxx |6 +
 xmloff/source/text/txtparae.cxx |6 +
 xmloff/source/text/xmlcontentcontrolcontext.cxx |9 +
 xmloff/source/text/xmlcontentcontrolcontext.hxx |1 
 16 files changed, 163 insertions(+), 5 deletions(-)

New commits:
commit 79baafccf3d390810f516b2cf9cb3ad2b4e9e63b
Author: Miklos Vajna 
AuthorDate: Fri May 27 11:38:42 2022 +0200
Commit: Miklos Vajna 
CommitDate: Fri May 27 12:11:46 2022 +0200

sw content controls, date: add current date handling

While working on the DOCX import for dates, it turns out there is a need
to store the selected date in machine-readable format as well. This is
useful, because once the timestamp is formatted, the user is allowed to
hand-edit the result, so otherwise the selected date would be lost.

This commit adds:

- doc model & UNO API

- click handler (store the selected date, default to the current date in
  the date picker if possible)

- ODT filter

- DOCX export

And tests for all these.

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

diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng 
b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index 0f2ea32c300e..d5857c132e37 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -2887,6 +2887,11 @@ 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
   
 
   
+  
+
+  
+
+  
   
 
   
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index b7f3c02f9f04..36f0b01a527e 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -136,6 +136,9 @@ class SW_DLLPUBLIC SwContentControl : public 
sw::BroadcastingModify
 /// If m_bDate is true, the date's BCP 47 language tag.
 OUString m_aDateLanguage;
 
+/// Date in -MM-DDT00:00:00Z format.
+OUString m_aCurrentDate;
+
 /// Stores a list item index, in case the doc model is not yet updated.
 std::optional m_oSelectedListItem;
 
@@ -217,6 +220,16 @@ public:
 
 OUString GetDateLanguage() const { return m_aDateLanguage; }
 
+void SetCurrentDate(const OUString& rCurrentDate) { m_aCurrentDate = 
rCurrentDate; }
+
+OUString GetCurrentDate() const { return m_aCurrentDate; }
+
+/// Formats fCurrentDate and sets it.
+void SetCurrentDateValue(double fCurrentDate);
+
+/// Parses m_aCurrentDate and returns it.
+double GetCurrentDateValue() const;
+
 /// Formats m_oSelectedDate, taking m_aDateFormat and m_aDateLanguage into 
account.
 OUString GetDateString() const;
 
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 6e3330e65126..90921cbc655d 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -882,6 +882,7 @@
 #define UNO_NAME_PICTURE "Picture"
 #define UNO_NAME_DATE_FORMAT "DateFormat"
 #define UNO_NAME_DATE_LANGUAGE "DateLanguage"
+#define UNO_NAME_CURRENT_DATE "CurrentDate"
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index a998810e6029..1ccd8b250ec3 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -601,6 +601,8 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testContentControlDate)
 xContentControlProps->setPropertyValue("Date", uno::Any(true));
 xContentControlProps->setPropertyValue("DateFormat", 
uno::Any(OUString("M/d/")));
 xContentControlProps->setPropertyValue("DateLanguage", 
uno::Any(OUString("en-US")));
+xContentControlProps->setPropertyValue("CurrentDate",
+   
uno::Any(OUString("2022-05-25T00:00:00Z")));
 xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/tru

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

2022-05-27 Thread tagezi (via logerrit)
 sc/qa/uitest/calc_tests8/tdf119343.py|2 +-
 sc/qa/uitest/calc_tests8/tdf124829.py|   10 ++
 sc/qa/uitest/calc_tests9/tdf142763.py|2 +-
 sc/qa/uitest/chart/chartGrids.py |2 +-
 sc/qa/uitest/chart/chartXAxis.py |2 +-
 sc/qa/uitest/chart/chartYAxis.py |3 +--
 sc/qa/uitest/chart/copyPaste.py  |5 +++--
 sc/qa/uitest/chart/tdf93506_trendline.py |3 +--
 sc/qa/uitest/conditional_format/tdf105351.py |   10 +-
 sc/qa/uitest/conditional_format/tdf81696.py  |2 +-
 sc/qa/uitest/sort/stableSorting.py   |2 +-
 sc/qa/uitest/statistics/fTest.py |6 ++
 sc/qa/uitest/statistics/tdf76731.py  |2 +-
 13 files changed, 21 insertions(+), 30 deletions(-)

New commits:
commit bd6cb0d8219b117b1a72774c26d54774c72602da
Author: tagezi 
AuthorDate: Fri May 27 11:04:25 2022 +0300
Commit: Xisco Fauli 
CommitDate: Fri May 27 11:59:12 2022 +0200

tdf#132293: Removing unused imports from uitests files.

This is the final cleanup of imports in the sc module.
'pyflakes sc' is now empty.
It seems, the most imports were copy-pasted from a file to a new one.
Additionally, the import block and surrounding area made more readable.

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

diff --git a/sc/qa/uitest/calc_tests8/tdf119343.py 
b/sc/qa/uitest/calc_tests8/tdf119343.py
index 0debe6aea848..0d4581f18b11 100644
--- a/sc/qa/uitest/calc_tests8/tdf119343.py
+++ b/sc/qa/uitest/calc_tests8/tdf119343.py
@@ -7,7 +7,7 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import get_url_for_data_file
 
 from libreoffice.calc.document import get_cell_by_position
 from libreoffice.uno.propertyvalue import mkPropertyValues
diff --git a/sc/qa/uitest/calc_tests8/tdf124829.py 
b/sc/qa/uitest/calc_tests8/tdf124829.py
index ef2a0213f93b..43e90d1f818c 100644
--- a/sc/qa/uitest/calc_tests8/tdf124829.py
+++ b/sc/qa/uitest/calc_tests8/tdf124829.py
@@ -7,16 +7,10 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_sheet_from_doc
-from libreoffice.calc.conditional_format import 
get_conditional_format_from_sheet
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_url_for_data_file
 
-#Bug 124829 - CRASH: cutting and undoing a sheet with external links
 
+# Bug 124829 - CRASH: cutting and undoing a sheet with external links
 class tdf124829(UITestCase):
 def test_tdf124829_Crash_cutting_undo_sheet_external_links(self):
 #numberingformatpage.ui
diff --git a/sc/qa/uitest/calc_tests9/tdf142763.py 
b/sc/qa/uitest/calc_tests9/tdf142763.py
index 238d30833eb1..548be27b4148 100644
--- a/sc/qa/uitest/calc_tests9/tdf142763.py
+++ b/sc/qa/uitest/calc_tests9/tdf142763.py
@@ -7,7 +7,7 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, 
select_pos
+from uitest.uihelper.common import get_state_as_dict, select_pos
 
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
diff --git a/sc/qa/uitest/chart/chartGrids.py b/sc/qa/uitest/chart/chartGrids.py
index dda37675c4cc..ba25f1662d26 100644
--- a/sc/qa/uitest/chart/chartGrids.py
+++ b/sc/qa/uitest/chart/chartGrids.py
@@ -7,7 +7,7 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, 
type_text
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
 
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
diff --git a/sc/qa/uitest/chart/chartXAxis.py b/sc/qa/uitest/chart/chartXAxis.py
index 61fb5c11b78b..eafb350862f7 100644
--- a/sc/qa/uitest/chart/chartXAxis.py
+++ b/sc/qa/uitest/chart/chartXAxis.py
@@ -7,7 +7,7 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 from uitest.framework import UITestCase
-from uitest.uihelper.common import change_measurement_unit, type_text
+from uitest.uihelper.common import change_measurement_unit
 from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
 from uitest.uihelper.common import select_by_text, select_pos
 
diff --git a/sc/qa/uitest/chart/chartYAxis.py b/sc/qa/uitest/chart/chartYAxis.py
index 6d8383a4fa

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

2022-05-27 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/data/tdf149268.odt |binary
 sw/qa/uitest/navigator/tdf149268.py |   43 
 2 files changed, 43 insertions(+)

New commits:
commit 7a8a25456b39eb6238571c7932eef8e44291ed84
Author: Xisco Fauli 
AuthorDate: Thu May 26 12:51:54 2022 +0200
Commit: Xisco Fauli 
CommitDate: Fri May 27 11:56:40 2022 +0200

tdf#149268: sw: Add UItest

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

diff --git a/sw/qa/uitest/data/tdf149268.odt b/sw/qa/uitest/data/tdf149268.odt
new file mode 100644
index ..a68b81f4ab50
Binary files /dev/null and b/sw/qa/uitest/data/tdf149268.odt differ
diff --git a/sw/qa/uitest/navigator/tdf149268.py 
b/sw/qa/uitest/navigator/tdf149268.py
new file mode 100644
index ..3a0943c76fed
--- /dev/null
+++ b/sw/qa/uitest/navigator/tdf149268.py
@@ -0,0 +1,43 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
+#
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+
+class tdf149268(UITestCase):
+
+def test_tdf149268(self):
+with self.ui_test.load_file(get_url_for_data_file("tdf149268.odt")):
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+self.xUITest.executeCommand(".uno:Sidebar")
+
+# Without the fix in place, this test would have crashed here
+xWriterEdit.executeAction("SIDEBAR", mkPropertyValues({"PANEL": 
"SwNavigatorPanel"}))
+
+# wait until the navigator panel is available
+xNavigatorPanel = 
self.ui_test.wait_until_child_is_available('NavigatorPanel')
+
+xContentTree = xNavigatorPanel.getChild("contenttree")
+xHyperlinks = xContentTree.getChild('7')
+self.assertEqual('Hyperlinks', 
get_state_as_dict(xHyperlinks)['Text'])
+
+xHyperlinks.executeAction("EXPAND", tuple())
+
+self.assertEqual("4", get_state_as_dict(xHyperlinks)['Children'])
+self.assertEqual('Internet', 
get_state_as_dict(xHyperlinks.getChild('0'))['Text'])
+self.assertEqual('1234567', 
get_state_as_dict(xHyperlinks.getChild('1'))['Text'])
+self.assertEqual('', 
get_state_as_dict(xHyperlinks.getChild('2'))['Text'])
+self.assertEqual('zzz', 
get_state_as_dict(xHyperlinks.getChild('3'))['Text'])
+
+self.xUITest.executeCommand(".uno:Sidebar")
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:


[Libreoffice-commits] core.git: helpcontent2

2022-05-27 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c716f3541205d295e1a5c23495db3dc931f491db
Author: Seth Chaiklin 
AuthorDate: Fri May 27 11:32:25 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Fri May 27 11:32:25 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to a6112298c946828a9d93b52384972f5e5f6c0538
  - tdf#148486  clarify "Vertical" and "by" controls in Position and Size

   also, adjustment to "Character" in "to", to indicate when it is
   available and to correct the description of its referent.

Change-Id: Ic8ff382342503091dc9334aa72d05ea322d3e420
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/134361
Tested-by: Jenkins
Reviewed-by: Rafael Lima 
Reviewed-by: Ming Hua 
Reviewed-by: Seth Chaiklin 

diff --git a/helpcontent2 b/helpcontent2
index 60d9df79df10..a6112298c946 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 60d9df79df1071d5ad299464a4705abb237810ca
+Subproject commit a6112298c946828a9d93b52384972f5e5f6c0538


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

2022-05-27 Thread Seth Chaiklin (via logerrit)
 source/text/swriter/01/05060100.xhp |   46 +++-
 1 file changed, 40 insertions(+), 6 deletions(-)

New commits:
commit a6112298c946828a9d93b52384972f5e5f6c0538
Author: Seth Chaiklin 
AuthorDate: Mon May 16 10:18:19 2022 +0200
Commit: Seth Chaiklin 
CommitDate: Fri May 27 11:32:24 2022 +0200

tdf#148486  clarify "Vertical" and "by" controls in Position and Size

   also, adjustment to "Character" in "to", to indicate when it is
   available and to correct the description of its referent.

Change-Id: Ic8ff382342503091dc9334aa72d05ea322d3e420
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/134361
Tested-by: Jenkins
Reviewed-by: Rafael Lima 
Reviewed-by: Ming Hua 
Reviewed-by: Seth Chaiklin 

diff --git a/source/text/swriter/01/05060100.xhp 
b/source/text/swriter/01/05060100.xhp
index 20224d16c..511a48a4c 100644
--- a/source/text/swriter/01/05060100.xhp
+++ b/source/text/swriter/01/05060100.xhp
@@ -144,14 +144,48 @@
   
 
 Vertical
-Select the vertical alignment option for the object.
-If you anchor an object to a 
frame with a fixed height, only the "Bottom" and "Center" alignment options are 
available.
+Select the vertical alignment option for the object. The 
selection specifies the position of the object relative to the region or 
reference line selected in the to dropdown 
list.
+
 
 by
-Enter the amount of space to leave between the top edge of the selected 
object and the reference point that you select in the To 
box. This option is only available if you select "From Top" or "From 
Bottom" (as character) in the Vertical box. 
+Enter the amount of 
space to leave from the top edge of the object to the region or reference line 
selected in the to dropdown list. This option is active 
only when the following combinations of Vertical and 
Anchor are selected. For these combinations, you can 
specify the amount of space to leave from:
+
+
+  
+
+  Vertical
+
+
+  with 
Anchor
+
+  
+  
+
+  From 
top
+
+
+  Top edge of 
selected region. Positive values move the object down, negative values 
up.
+
+
+   To 
page, To paragraph, To 
character or To frame
+
+  
+  
+
+  From 
bottom
+
+
+  Selected 
reference line.  Positive values move the object up, negative values 
down.
+
+
+  To 
character or As character
+
+  
+
+
 
 to
-Select the region or reference point for the  vertical 
alignment. The object can be positioned in relation to the following 
regions or reference points:
+Select the region or reference line for the vertical alignment. 
The object can be positioned in relation to the following regions or reference 
lines:
 
   
 Margin: Depending on the anchoring type, the 
object is positioned considering the space between the top margin and the 
character ("To character" anchoring) or bottom edge of the paragraph ("To 
paragraph" anchoring) where the anchor is placed.
@@ -170,7 +204,7 @@
   
 
   
-Character: the object is positioned considering 
the vertical space used by the character.
+Character: available only for "To 
character" or "As character" anchoring, the object is positioned relative to 
the region between the top border and bottom border of the character 
immediately before where the anchor is placed. A character formatted with a 
common border with other characters or objects uses the region for the highest 
character or object in the common border.
   
   
 Line 
of text: available only for "To character" anchoring, the object is 
positioned considering the height of the line of text where the anchor is 
placed.
@@ -189,8 +223,8 @@
   
 
 
-
 
+If you anchor an object to a frame 
with a fixed height, only the "Bottom" and "Center" alignment options are 
available.
   
 
   


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

2022-05-27 Thread Michael Stahl (via logerrit)
 svl/qa/unit/svl.cxx |   15 ++-
 sw/source/filter/ww8/ww8atr.cxx |5 +
 2 files changed, 19 insertions(+), 1 deletion(-)

New commits:
commit 5c7f4b83c207b909312ed5a28282015fdcdd12da
Author: Michael Stahl 
AuthorDate: Thu May 19 13:23:33 2022 +0200
Commit: Michael Stahl 
CommitDate: Fri May 27 10:59:52 2022 +0200

sw: language fallback in MSWordExportBase::GetNumberFormat()

There is this number format:


  
  .
  
  .
  


in a paragraph which has fo:language="zxx", so the field has
LANGUAGE_NONE.

MSWordExportBase::GetNumberFormat() exports as: DATE \@"dd/MM/"

But should be: DATE \@"dd.MM."

Follow Eike's suggestion to use the number format's language in case the
field doesn't have one.

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

diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 523e998c60c1..f125305783c5 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -93,7 +93,7 @@ public:
 CPPUNIT_TEST(testExcelExportFormats);
 CPPUNIT_TEST_SUITE_END();
 
-private:
+protected:
 uno::Reference< uno::XComponentContext > m_xContext;
 void checkPreviewString(SvNumberFormatter& aFormatter,
 const OUString& sCode,
@@ -1920,6 +1920,19 @@ void Test::testExcelExportFormats()
 CPPUNIT_ASSERT_EQUAL( OUString("[$R-1C09]\\ #,##0.0;[$R-1C09]\\-#,##0.0"), 
aCode);
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testLanguageNone)
+{
+SvNumberFormatter aFormatter(m_xContext, LANGUAGE_ENGLISH_US);
+NfKeywordTable keywords;
+aFormatter.FillKeywordTableForExcel(keywords);
+OUString code("TT.MM.");
+sal_uInt32 nKey = aFormatter.GetEntryKey(code, LANGUAGE_GERMAN);
+CPPUNIT_ASSERT(nKey != NUMBERFORMAT_ENTRY_NOT_FOUND);
+SvNumberformat const*const pFormat = aFormatter.GetEntry(nKey);
+LocaleDataWrapper ldw(m_xContext, LanguageTag(pFormat->GetLanguage()));
+CPPUNIT_ASSERT_EQUAL(OUString("dd.mm."), 
pFormat->GetMappedFormatstring(keywords, ldw));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 }
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index b5f354e46d84..78bbb5219e57 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2601,6 +2601,11 @@ bool MSWordExportBase::GetNumberFormat(const SwField& 
rField, OUString& rStr)
 if( pNumFormat )
 {
 LanguageType nLng = rField.GetLanguage();
+SAL_WARN_IF(nLng == LANGUAGE_DONTKNOW, "sw.ww8", "unexpected 
LANGUAGE_DONTKNOW");
+if (nLng == LANGUAGE_NONE || nLng == LANGUAGE_DONTKNOW)
+{
+nLng = pNumFormat->GetLanguage();
+}
 LocaleDataWrapper aLocDat(pNFormatr->GetComponentContext(),
   LanguageTag(nLng));
 


[Libreoffice-commits] core.git: Branch 'feature/cib_contract3753' - 2 commits - svl/qa svl/source sw/source

2022-05-27 Thread Michael Stahl (via logerrit)
 svl/qa/unit/svl.cxx |5 ++---
 svl/source/numbers/zformat.cxx  |9 +
 sw/source/filter/ww8/ww8atr.cxx |5 +
 3 files changed, 8 insertions(+), 11 deletions(-)

New commits:
commit 7dc49d024c23ef2b4a41484427a4dd18e6690756
Author: Michael Stahl 
AuthorDate: Thu May 19 13:23:33 2022 +0200
Commit: Michael Stahl 
CommitDate: Wed May 25 21:10:12 2022 +0200

sw: language fallback in MSWordExportBase::GetNumberFormat()

There is this number format:


  
  .
  
  .
  


in a paragraph which has fo:language="zxx", so the field has
LANGUAGE_NONE.

MSWordExportBase::GetNumberFormat() exports as: DATE \@"dd/MM/"

But should be: DATE \@"dd.MM."

Follow Eike's suggestion to use the number format's language in case the
field doesn't have one.

Change-Id: I596bea5daa75c717931b3c5d5506103b87b8ee08

diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index d30a7b6279ec..4304875b8088 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -90,7 +90,7 @@ public:
 CPPUNIT_TEST(testExcelExportFormats);
 CPPUNIT_TEST_SUITE_END();
 
-private:
+protected:
 uno::Reference< uno::XComponentContext > m_xContext;
 void checkPreviewString(SvNumberFormatter& aFormatter,
 const OUString& sCode,
@@ -1728,6 +1728,19 @@ void Test::testExcelExportFormats()
 CPPUNIT_ASSERT_EQUAL( OUString("[$R-1C09]\\ #,##0.0;[$R-1C09]\\-#,##0.0"), 
aCode);
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testLanguageNone)
+{
+SvNumberFormatter aFormatter(m_xContext, LANGUAGE_ENGLISH_US);
+NfKeywordTable keywords;
+aFormatter.FillKeywordTableForExcel(keywords);
+OUString code("TT.MM.");
+sal_uInt32 nKey = aFormatter.GetEntryKey(code, LANGUAGE_GERMAN);
+CPPUNIT_ASSERT(nKey != NUMBERFORMAT_ENTRY_NOT_FOUND);
+SvNumberformat const*const pFormat = aFormatter.GetEntry(nKey);
+LocaleDataWrapper ldw(m_xContext, LanguageTag(pFormat->GetLanguage()));
+CPPUNIT_ASSERT_EQUAL(OUString("dd.mm."), 
pFormat->GetMappedFormatstring(keywords, ldw));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 }
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index b2c3b35d7ae1..1327f78d645a 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2581,6 +2581,11 @@ bool MSWordExportBase::GetNumberFormat(const SwField& 
rField, OUString& rStr)
 if( pNumFormat )
 {
 LanguageType nLng = rField.GetLanguage();
+SAL_WARN_IF(nLng == LANGUAGE_DONTKNOW, "sw.ww8", "unexpected 
LANGUAGE_DONTKNOW");
+if (nLng == LANGUAGE_NONE || nLng == LANGUAGE_DONTKNOW)
+{
+nLng = pNumFormat->GetLanguage();
+}
 LocaleDataWrapper aLocDat(pNFormatr->GetComponentContext(),
   LanguageTag(nLng));
 
commit 7483d54d45b9931064dc20adc6fdb28597667859
Author: Michael Stahl 
AuthorDate: Wed May 25 21:09:43 2022 +0200
Commit: Michael Stahl 
CommitDate: Wed May 25 21:09:43 2022 +0200

Revert "svl: SvNumberformat::GetMappedFormatstring() vs. LANGUAGE_DONTKNOW"

This reverts commit 712b7e578292e521c64e6de117dbf7d11e38ba7a.

diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 2e4f21099d0d..d30a7b6279ec 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -34,7 +34,6 @@
 #include 
 #include 
 #include 
-#include  // for CPPUNIT_TEST_FIXTURE
 
 #include 
 #include 
@@ -91,7 +90,7 @@ public:
 CPPUNIT_TEST(testExcelExportFormats);
 CPPUNIT_TEST_SUITE_END();
 
-protected:
+private:
 uno::Reference< uno::XComponentContext > m_xContext;
 void checkPreviewString(SvNumberFormatter& aFormatter,
 const OUString& sCode,
@@ -1729,19 +1728,6 @@ void Test::testExcelExportFormats()
 CPPUNIT_ASSERT_EQUAL( OUString("[$R-1C09]\\ #,##0.0;[$R-1C09]\\-#,##0.0"), 
aCode);
 }
 
-CPPUNIT_TEST_FIXTURE(Test, testLanguageDontknow)
-{
-SvNumberFormatter aFormatter(m_xContext, LANGUAGE_ENGLISH_US);
-NfKeywordTable keywords;
-aFormatter.FillKeywordTableForExcel(keywords);
-OUString code("TT.MM.");
-sal_uInt32 nKey = aFormatter.GetEntryKey(code, LANGUAGE_GERMAN);
-CPPUNIT_ASSERT(nKey != NUMBERFORMAT_ENTRY_NOT_FOUND);
-SvNumberformat const*const pFormat = aFormatter.GetEntry(nKey);
-LocaleDataWrapper ldw(m_xContext, LanguageTag(LANGUAGE_DONTKNOW));
-CPPUNIT_ASSERT_EQUAL(OUString("dd.mm."), 
pFormat->GetMappedFormatstring(keywords, ldw));
-}
-
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 }
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index acbea945cd88..23c0919aecf2 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -5291,14 +5291,7 @@ OUString SvNumberformat::GetMappedFormatstring( const 
NfKeywordTable& rKeywords,
 aStr.append( "-" );
   

Re: 'make check' fails when building with gcov code coverage

2022-05-27 Thread Maarten Hoes
On Fri, May 27, 2022 at 8:13 AM Miklos Vajna  wrote:

> Hi Maarten,
>
> On Wed, May 25, 2022 at 02:38:27PM +0200, Maarten Hoes <
> hoes.maar...@gmail.com> wrote:
> > I've been trying to run 'make check' in combination with building
> > LibreOffice with gcov code coverage, and get failures for the following
> > tests :
> >
> >
> > gb_GCOV=YES verbose=t make UITest_solver
> > gb_GCOV=YES verbose=t make CppunitTest_sccomp_solver
> > gb_GCOV=YES verbose=t make CppunitTest_sccomp_swarmsolvertest
> >
> >
> > I set the required *FLAGS on the autogen commandline, and ran make with
> > 'gb_GCOV=YES'.
>
> Could you please be more specific, exactly what environment variables
> do you set in your autogen.input?
>
> FWIW I usually just run coverage for some area of the codebase, using:
>
>
> https://cgit.freedesktop.org/libreoffice/contrib/dev-tools/tree/lcov/coverage.sh
>
> There we do not set any coverage-related environment variables in
> autogen.input, just use gb_GCOV=YES when building the relevant files as
> you already do.
>
>
Hi,


The complete commandline's that I run are :

CFLAGS='-fprofile-arcs -ftest-coverage' CXXFLAGS='-fprofile-arcs
-ftest-coverage' LDFLAGS='-fprofile-arcs -lgcov' ./autogen.sh
--enable-python=internal --without-system-libs --without-system-headers
gb_GCOV=YES verbose=t make --output-sync=target
gb_GCOV=YES verbose=t make check -k --output-sync=target

I recently started a thread [1] that is about the (complete, not partial)
build with gcov failing for me if I only set 'gb_GCOV=YES' on the make
commandline. The build succeeds for me if I also set the required *FLAGS on
the autogen commandline. The failing parts when only using 'gb_GCOV=YES'
were/are 'liborcus' and 'expat'. Skia (I think) initially also broke the
build, but that was because of conflicts between clang and gcc [2], which
was resolved when I uninstalled clang. If I understand correctly, it was
intended to force skia to always be built with clang, but - intended or not
- at least on Linux it falls back on gcc (or skia gets skipped perhaps).

When looking at 'coverage.sh', it seems it only covers specific parts of
the build, and not everything, so perhaps it doesn't build the parts that
fail for me when not setting the additional *FLAGS ?

Anyway, if you feel that setting the additional *FLAGS in addition to
'gb_GCOV=YES' is not the right way to address the problem of the full build
with gcov failing for me, then perhaps we should revisit that thread [1],
before we continue looking at why 'make check' fails for me ?



- Maarten


[1]
See: "Compiling LO for lcov/gcov code coverage fails (gb_GCOV=YES)"
https://lists.freedesktop.org/archives/libreoffice/2022-May/thread.html

[2]
https://lists.freedesktop.org/archives/libreoffice/2022-May/088867.html


[Libreoffice-commits] core.git: helpcontent2

2022-05-27 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a8df5c815c8b002b7083b8777e3dd8beac573bf3
Author: Seth Chaiklin 
AuthorDate: Fri May 27 10:08:26 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Fri May 27 10:08:26 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 60d9df79df1071d5ad299464a4705abb237810ca
  - tdf#89131 add explanation about adding Heading rows to Insert - Table

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

diff --git a/helpcontent2 b/helpcontent2
index bdaeee88ae63..60d9df79df10 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit bdaeee88ae63c1107b6c7db0dbcabb5347554397
+Subproject commit 60d9df79df1071d5ad299464a4705abb237810ca


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

2022-05-27 Thread Seth Chaiklin (via logerrit)
 source/text/swriter/01/0415.xhp |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 60d9df79df1071d5ad299464a4705abb237810ca
Author: Seth Chaiklin 
AuthorDate: Thu May 26 23:47:05 2022 +0200
Commit: Seth Chaiklin 
CommitDate: Fri May 27 10:08:25 2022 +0200

tdf#89131 add explanation about adding Heading rows to Insert - Table

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

diff --git a/source/text/swriter/01/0415.xhp 
b/source/text/swriter/01/0415.xhp
index 426ac68d0..8d26d5e4e 100644
--- a/source/text/swriter/01/0415.xhp
+++ b/source/text/swriter/01/0415.xhp
@@ -51,7 +51,7 @@
 $[officename] 
can automatically format numbers that you enter in a table cell, for example, 
dates and times. To activate this feature, choose %PRODUCTNAME - 
PreferencesTools - 
Options - %PRODUCTNAME Writer - 
Table and click the Number recognition check box in the 
Input in tables area.
 
 
-Name
+Name
 Enter a name for the 
table.
 
 Columns
@@ -68,10 +68,10 @@
 Repeat 
heading rows on new pages
 Repeats the heading of the table 
at the top of subsequent page if the table spans more than one 
page.
 
-Heading 
rows
-Select the number of rows 
that you want to use for the heading.
+Heading rows
+Select the number of rows 
that you want to use for the heading. The spinbox accepts values up to 
one less than the number of rows being inserted.
 
-Don't 
split the table over pages
+Don't split the table over pages
 Prevents the table from 
spanning more than one page.
 
 List of 
table styles


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

2022-05-27 Thread Tibor Nagy (via logerrit)
 oox/source/ppt/slidepersist.cxx |8 
 sd/qa/unit/data/pptx/tdf149124.pptx |binary
 sd/qa/unit/import-tests.cxx |   18 ++
 3 files changed, 26 insertions(+)

New commits:
commit 25e747ed39a3742d26c1128b6823679de279d5df
Author: Tibor Nagy 
AuthorDate: Wed May 25 15:52:55 2022 +0200
Commit: László Németh 
CommitDate: Fri May 27 09:59:59 2022 +0200

tdf#149124 PPTX import: fix broken connectors in grouped shapes

Previously connector lines of grouped shapes were detached
after the import losing the original layout (without
ungrouping and moving the shapes).

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

diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 81a0fd7991a7..24ce2f9da464 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -150,6 +150,14 @@ void SlidePersist::createXShapes( XmlFilterBase& 
rFilterBase )
 pPPTShape->addShape( rFilterBase, *this, getTheme().get(), 
xShapes, aTransformation, &getShapeMap() );
 if (pPPTShape->isConnectorShape())
 maConnectorShapeId.push_back(pPPTShape->getId());
+if (!pPPTShape->getChildren().empty())
+{
+for (size_t i = 0; i < pPPTShape->getChildren().size(); 
i++)
+{
+if (pPPTShape->getChildren()[i]->isConnectorShape())
+
maConnectorShapeId.push_back(pPPTShape->getChildren()[i]->getId());
+}
+}
 }
 else
 child->addShape( rFilterBase, getTheme().get(), xShapes, 
aTransformation, maShapesPtr->getFillProperties(), &getShapeMap() );
diff --git a/sd/qa/unit/data/pptx/tdf149124.pptx 
b/sd/qa/unit/data/pptx/tdf149124.pptx
new file mode 100644
index ..9c43c43ce09b
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf149124.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 100c9e784875..9e60c8886dec 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -81,6 +81,7 @@ public:
 virtual void setUp() override;
 
 void testDocumentLayout();
+void testTdf149124();
 void testTdf89449();
 void testTdf147459();
 void testTdf146223();
@@ -149,6 +150,7 @@ public:
 CPPUNIT_TEST_SUITE(SdImportTest);
 
 CPPUNIT_TEST(testDocumentLayout);
+CPPUNIT_TEST(testTdf149124);
 CPPUNIT_TEST(testTdf89449);
 CPPUNIT_TEST(testTdf147459);
 CPPUNIT_TEST(testTdf146223);
@@ -295,6 +297,22 @@ void SdImportTest::testDocumentLayout()
 }
 }
 
+void SdImportTest::testTdf149124()
+{
+sd::DrawDocShellRef xDocShRef
+= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf149124.pptx"), 
PPTX);
+
+uno::Reference xGroupShape(getShapeFromPage(0, 0, 
xDocShRef), uno::UNO_QUERY_THROW);
+uno::Reference 
xStandardConnector(xGroupShape->getByIndex(2), uno::UNO_QUERY_THROW);
+
+sal_Int32 nStartGlueId = 
xStandardConnector->getPropertyValue("StartGluePointIndex").get();
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), nStartGlueId);
+sal_Int32 nEndGlueId = 
xStandardConnector->getPropertyValue("EndGluePointIndex").get();
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nEndGlueId);
+
+xDocShRef->DoClose();
+}
+
 void SdImportTest::testTdf89449()
 {
 sd::DrawDocShellRef xDocShRef


Re: trigger MapMode ScaleX change in writer

2022-05-27 Thread Caolán McNamara
On Fri, 2022-05-27 at 09:02 +0800, Mark Hung wrote:
> Now I can make both bPrt and bStretch true, if I ... insert some code
> in  PrintOrPDFExport to set ScaleX and ScaleY ... Interestingly, I
> didn't find any place it is set for the printer. 
> I wonder if it is something that is no longer useful. In that case,
> we may remove the code completely.

I don't really know. I'd check the case of inserting a comment into the
document, then printing with the print dialog "comment: Place in
margins" option enabled. That does some sort of scaling to squeeze the
comments into the print output, but I don't know if it has anything to
do with this particular ScaleX/Y. Likewise the "Pages per sheet" I
don't immediately know if that scaling is done by anything related to
this case, or a separate post processing step.



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

2022-05-27 Thread Attila Bakos (NISZ) (via logerrit)
 sw/source/core/layout/flycnt.cxx |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 182d2a47a2b4ed0affdc828a534c1659cc2e926d
Author: Attila Bakos (NISZ) 
AuthorDate: Tue May 17 15:28:59 2022 +0200
Commit: László Németh 
CommitDate: Fri May 27 09:38:03 2022 +0200

tdf#148365 sw: fix freezing with FrameIsAutomaticHeight

Lock layout update temporarily during setting horizontal
and after that, vertical orientations of textboxes
with FrameIsAutomaticHeight to avoid freezing
SwObjectFormatter, and depending on the platform,
freezing Writer completely.

Regression from commit 3b0a0e70cb67fc2e1fd2e8cbb9cfcd8c670e
"Related tdf#66039 DOCX import: fix Z-order of group shapes".

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

diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index cf6aa1f41029..f7611392d345 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -548,8 +548,14 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 aHOri.SetPos(aHOri.GetPos() + aTextRectangle.Left());
 aVOri.SetPos(aVOri.GetPos() + aTextRectangle.Top());
 // save the new position for the shape
-GetFormat()->SetFormatAttr(aHOri);
-GetFormat()->SetFormatAttr(aVOri);
+auto pFormat = GetFormat();
+const bool bLocked = pFormat->IsModifyLocked();
+if (!bLocked)
+pFormat->LockModify();
+pFormat->SetFormatAttr(aHOri);
+pFormat->SetFormatAttr(aVOri);
+if (!bLocked)
+pFormat->UnlockModify();
 }
 if ( bOsz || bConsiderWrapInfluenceDueToOverlapPrevCol ||
  // #i40444#


[Libreoffice-commits] core.git: instsetoo_native/CustomTarget_install.mk

2022-05-27 Thread Thorsten Behrens (via logerrit)
 instsetoo_native/CustomTarget_install.mk |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit c9d018df610b7bd7d5794231b2ccb0d8090573a6
Author: Thorsten Behrens 
AuthorDate: Fri May 27 00:45:18 2022 +0200
Commit: Thorsten Behrens 
CommitDate: Fri May 27 09:33:45 2022 +0200

make_installer: convert Win to Unix path for cygwin

Usual cygwin auto-conversion magic doesn't work for PATH variable,
which requires proper /cygdrive/foo/bar entries.

Change-Id: Ic07ffcdf7cb28c5e5702964c331f337ee811c063
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135032
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/instsetoo_native/CustomTarget_install.mk 
b/instsetoo_native/CustomTarget_install.mk
index 37b177ab94c2..e4642c6ed6d2 100644
--- a/instsetoo_native/CustomTarget_install.mk
+++ b/instsetoo_native/CustomTarget_install.mk
@@ -71,7 +71,10 @@ $(if $(GNUPARALLEL), \
 , \
 $(call gb_Helper_print_on_error, \
 cd $(dir $@) \
-&& PATH="$(SRCDIR)/solenv/bin:$$PATH" \
+$(if $(filter WNT,$(OS)), \
+   && PATH="$(shell cygpath -u $(SRCDIR)/solenv/bin):$$PATH" \
+, \
+   && PATH="$(SRCDIR)/solenv/bin:$$PATH") \
 $(foreach curpkg,$(1),\
 && call_installer.sh $(if $(verbose),-verbose,-quiet) $(curpkg) \
 ),$@.log))


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

2022-05-27 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/utlui/content.cxx |   20 
 1 file changed, 8 insertions(+), 12 deletions(-)

New commits:
commit ba0a713fe76da5ee40ad34b375d3a900bff4e01a
Author: Jim Raykowski 
AuthorDate: Wed May 25 23:17:02 2022 -0800
Commit: Jim Raykowski 
CommitDate: Fri May 27 09:06:47 2022 +0200

tdf#149268 avoid null pointer dereference

Change-Id: Iff3aece9eaed40c31764616504f1a4229db57e01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134978
Tested-by: Jenkins
Tested-by: Xisco Fauli 
Reviewed-by: Jim Raykowski 

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 91ce874b1553..584b80dfe0c5 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -651,15 +651,13 @@ void SwContentType::FillMemberList(bool* pbContentChanged)
 SwPosition bPos(bTextNode, b->GetStart());
 // use anchor position for entries that are located in 
flys
 if (nEndOfExtrasIndex >= aTextNode.GetIndex())
-{
 if (auto pFlyFormat = aTextNode.GetFlyFormat())
-aPos = 
*pFlyFormat->GetAnchor().GetContentAnchor();
-}
+if (const SwPosition* pPos = 
pFlyFormat->GetAnchor().GetContentAnchor())
+aPos = *pPos;
 if (nEndOfExtrasIndex >= bTextNode.GetIndex())
-{
 if (auto pFlyFormat = bTextNode.GetFlyFormat())
-bPos = 
*pFlyFormat->GetAnchor().GetContentAnchor();
-}
+if (const SwPosition* pPos = 
pFlyFormat->GetAnchor().GetContentAnchor())
+bPos = *pPos;
 return aPos < bPos;});
 }
 }
@@ -856,15 +854,13 @@ void SwContentType::FillMemberList(bool* pbContentChanged)
 SwPosition bPos(const_cast(bTextNode), 
b->rINetAttr.GetStart());
 // use anchor position for entries that are located in flys
 if (nEndOfExtrasIndex >= aTextNode.GetIndex())
-{
 if (auto pFlyFormat = aTextNode.GetFlyFormat())
-aPos = *pFlyFormat->GetAnchor().GetContentAnchor();
-}
+if (const SwPosition* pPos = 
pFlyFormat->GetAnchor().GetContentAnchor())
+aPos = *pPos;
 if (nEndOfExtrasIndex >= bTextNode.GetIndex())
-{
 if (auto pFlyFormat = bTextNode.GetFlyFormat())
-bPos = *pFlyFormat->GetAnchor().GetContentAnchor();
-}
+if (const SwPosition* pPos = 
pFlyFormat->GetAnchor().GetContentAnchor())
+bPos = *pPos;
 return aPos < bPos;});
 }
 


[Libreoffice-commits] core.git: helpcontent2

2022-05-27 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4b5de4684fab255a1a69ecab9ece0384947a29c4
Author: Seth Chaiklin 
AuthorDate: Fri May 27 09:01:22 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Fri May 27 09:01:22 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to bdaeee88ae63c1107b6c7db0dbcabb5347554397
  - (related) tdf#149018  add to OLE explanation in Glossary

Can link to this explanation when discussing OLE objects in
other help pages.

Technical note: Needed to add a variable to the relevant heading
in shared/optionen/01010200.xhp to be able to get a
useful id to link to from the Glossary.  Also embedded that
heading (which is the name of the control) into the Glossary so
that if the control name is changed in the future, then the
Glossary should remain up-to-date.

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

diff --git a/helpcontent2 b/helpcontent2
index 35e3b240996d..bdaeee88ae63 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 35e3b240996d1ad5f3011d72f92e8623665a09e2
+Subproject commit bdaeee88ae63c1107b6c7db0dbcabb5347554397


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

2022-05-27 Thread Seth Chaiklin (via logerrit)
 source/text/shared/00/0005.xhp   |2 +-
 source/text/shared/optionen/01010200.xhp |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bdaeee88ae63c1107b6c7db0dbcabb5347554397
Author: Seth Chaiklin 
AuthorDate: Tue May 24 16:51:43 2022 +0200
Commit: Seth Chaiklin 
CommitDate: Fri May 27 09:01:21 2022 +0200

(related) tdf#149018  add to OLE explanation in Glossary

Can link to this explanation when discussing OLE objects in
other help pages.

Technical note: Needed to add a variable to the relevant heading
in shared/optionen/01010200.xhp to be able to get a
useful id to link to from the Glossary.  Also embedded that
heading (which is the name of the control) into the Glossary so
that if the control name is changed in the future, then the
Glossary should remain up-to-date.

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

diff --git a/source/text/shared/00/0005.xhp 
b/source/text/shared/00/0005.xhp
index a73267098..4866ec144 100644
--- a/source/text/shared/00/0005.xhp
+++ b/source/text/shared/00/0005.xhp
@@ -199,7 +199,7 @@
 
OLE
Object 
Linking and Embedding (OLE) objects can be linked to a target document or may 
also be embedded. Embedding inserts a copy of the object and details of the 
source program in the target document. If you want to edit the object, simply 
activate the source program by double-clicking on the object.
-
+   If an OLE object is 
linked to a target document, then the target document must be available in the 
location specified in the link. Deleting or moving the target document will 
make it impossible to open the linked OLE object. You can use the  option 
in the General section of Load/Save Options to 
configure your system to save links relative to your filesystem.
   
   
 
diff --git a/source/text/shared/optionen/01010200.xhp 
b/source/text/shared/optionen/01010200.xhp
index 22fcbc0d7..c709475bf 100644
--- a/source/text/shared/optionen/01010200.xhp
+++ b/source/text/shared/optionen/01010200.xhp
@@ -93,7 +93,7 @@
 
 Automatically save the document too
   Specifies that %PRODUCTNAME saves all open documents when saving 
auto recovery information. Uses the same time interval as AutoRecovery 
does.
-Save URLs relative to file system
+Save URLs relative 
to file system
   This option 
allows you to select the default for relative addressing of URLs in the file 
system and on the Internet. Relative addressing is only possible if the source 
document and the referenced document are both on the same drive.
   A relative 
address always starts from the directory in which the current document is 
located. In contrast, absolute addressing always starts from a root directory. 
The following table demonstrates the difference in syntax between relative and 
absolute referencing: