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

2022-06-23 Thread Luboš Luňák (via logerrit)
 sc/source/core/data/queryevaluator.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9e170a35eebbe86e6137510bc8ea34e5a45dbd8d
Author: Luboš Luňák 
AuthorDate: Thu Jun 23 16:39:39 2022 +0200
Commit: Luboš Luňák 
CommitDate: Fri Jun 24 08:38:32 2022 +0200

handle nullptr SharedString in ScQueryEvaluator (tdf#149679)

This may be the case if the string comes from ScMatrix::Get()
for ScMatValType::Empty.

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

diff --git a/sc/source/core/data/queryevaluator.cxx 
b/sc/source/core/data/queryevaluator.cxx
index 4e35eeffcd62..d0b30a9942fd 100644
--- a/sc/source/core/data/queryevaluator.cxx
+++ b/sc/source/core/data/queryevaluator.cxx
@@ -491,8 +491,9 @@ std::pair 
ScQueryEvaluator::compareByString(const ScQueryEntry& rEnt
 const rtl_uString* pQuer = 
rItem.maString.getDataIgnoreCase();
 const rtl_uString* pCellStr = rSource.getDataIgnoreCase();
 
-assert(pQuer != nullptr);
 assert(pCellStr != nullptr);
+if (pQuer == nullptr)
+pQuer = 
svl::SharedString::getEmptyString().getDataIgnoreCase();
 
 const sal_Int32 nIndex
 = (rEntry.eOp == SC_ENDS_WITH || rEntry.eOp == 
SC_DOES_NOT_END_WITH)


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

2022-06-23 Thread Noel Grandin (via logerrit)
 helpcompiler/source/HelpLinker.cxx   |2 +-
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2df577b1a89d153da78b6c333e741082cf969086
Author: Noel Grandin 
AuthorDate: Mon Jun 13 18:46:45 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Jun 24 08:22:44 2022 +0200

loplugin:moveit

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

diff --git a/helpcompiler/source/HelpLinker.cxx 
b/helpcompiler/source/HelpLinker.cxx
index f7acc30ecc7d..e95b9168bf17 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -346,7 +346,7 @@ void HelpLinker::link()
 xhpFile = fs::path(xhpFileName, fs::native);
 }
 
-HelpCompiler hc( streamTable, xhpFile, langsourceRoot, zipdir,
+HelpCompiler hc( streamTable, std::move(xhpFile), 
std::move(langsourceRoot), zipdir,
 compactStylesheet, embeddStylesheet, module, lang, 
bExtensionMode );
 
 HCDBG(std::cerr << "before compile of " << xhpFileName << 
std::endl);
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx 
b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index 04b6a16163a4..331fe74b99dc 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -294,7 +294,7 @@ void SlideBackgroundFillPrimitive2D::create2DDecomposition(
 // create MaskPrimitive2D to limit display to PolygonGeometry
 const Primitive2DReference aMasked(
 new MaskPrimitive2D(
-aPolyPolygon,
+std::move(aPolyPolygon),
 std::move(rContainer)));
 
 rContainer = Primitive2DContainer { aMasked };


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

2022-06-23 Thread Samuel Mehrbrodt (via logerrit)
 include/svx/sidebar/AreaPropertyPanelBase.hxx |2 
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |  636 --
 2 files changed, 249 insertions(+), 389 deletions(-)

New commits:
commit adc536e9efc77690df62177aa722f9252bdbf96b
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jun 23 10:10:11 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Fri Jun 24 08:12:25 2022 +0200

tdf#128150 Properly show/hide widgets when "use slide background" is 
selected

And cleanup the logic a bit

Change-Id: I9d866fd63ea622ac5eb706185b3277c21f40d7cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136301
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx 
b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index 00519eed91e6..ed028d7b8698 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -162,10 +162,10 @@ protected:
 DECL_DLLPRIVATE_LINK(ClickImportBitmapHdl, weld::Button&, void);
 DECL_DLLPRIVATE_LINK(ToolbarHdl_Impl, const OString&, void);
 
-void Update();
 void ImpUpdateTransparencies();
 void SetTransparency(sal_uInt16 nVal);
 void SelectFillAttrHdl_Impl();
+void FillStyleChanged(bool bUpdateModel);
 };
 
 } // end of namespace svx::sidebar
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx 
b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index f94264c210fa..d4e7e507f2ef 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -232,221 +232,7 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, 
ClickImportBitmapHdl, weld::Button&, void
 
 IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, weld::ComboBox&, 
void)
 {
-sal_Int32 nPos = static_cast(mxLbFillType->get_active());
-mxLbFillAttr->clear();
-SfxObjectShell* pSh = SfxObjectShell::Current();
-if(!pSh)
-return;
-
-// #i122676# Do no longer trigger two Execute calls, one for 
SID_ATTR_FILL_STYLE
-// and one for setting the fill attribute itself, but add two SfxPoolItems 
to the
-// call to get just one action at the SdrObject and to create only one 
Undo action, too.
-// Checked that this works in all apps.
-switch( nPos )
-{
-default:
-case NONE:
-{
-mxLbFillAttr->show();
-mxLbFillGradFrom->hide();
-mxLbFillGradTo->hide();
-mxGradientStyle->hide();
-mxMTRAngle->hide();
-mxToolBoxColor->hide();
-mxBmpImport->hide();
-mxLbFillAttr->set_sensitive(false);
-
-const XFillStyleItem aXFillStyleItem(drawing::FillStyle_NONE);
-// Need to disable the XFillUseSlideBackgroundItem
-const XFillUseSlideBackgroundItem 
aXFillUseSlideBackgroundItem(false);
-setFillUseBackground(&aXFillStyleItem, 
aXFillUseSlideBackgroundItem);
-break;
-}
-case SOLID:
-{
-mxLbFillAttr->hide();
-mxLbFillGradFrom->hide();
-mxLbFillGradTo->hide();
-mxGradientStyle->hide();
-mxMTRAngle->hide();
-mxBmpImport->hide();
-mxToolBoxColor->show();
-const Color aColor = mpColorItem ? mpColorItem->GetColorValue() : 
COL_AUTO;
-const XFillColorItem aXFillColorItem( "", aColor );
-
-// #i122676# change FillStyle and Color in one call
-XFillStyleItem aXFillStyleItem(drawing::FillStyle_SOLID);
-setFillStyleAndColor(&aXFillStyleItem, aXFillColorItem);
-break;
-}
-case GRADIENT:
-{
-mxLbFillAttr->hide();
-mxLbFillGradFrom->show();
-mxLbFillGradTo->show();
-mxGradientStyle->show();
-mxMTRAngle->show();
-mxToolBoxColor->hide();
-mxBmpImport->hide();
-
-mxLbFillAttr->set_sensitive(true);
-mxLbFillGradTo->set_sensitive(true);
-mxLbFillGradFrom->set_sensitive(true);
-mxGradientStyle->set_sensitive(true);
-mxMTRAngle->set_sensitive(true);
-mxLbFillAttr->clear();
-
-const SvxGradientListItem * pItem = 
pSh->GetItem(SID_GRADIENT_LIST);
-
-if(0 < pItem->GetGradientList()->Count())
-{
-const XGradient aGradient = 
pItem->GetGradientList()->GetGradient(0)->GetGradient();
-const OUString aName = 
pItem->GetGradientList()->GetGradient(0)->GetName();
-const XFillGradientItem aXFillGradientItem(aName, aGradient);
-
-// #i122676# change FillStyle and Gradient in one call
-XFillStyleItem aXFillStyleItem(drawing::FillStyle_GRADIENT);
-setFillStyleAndGradient(&aXFillStyleItem, aXFillGradientItem);
-mxLbFillGradFrom->SelectEntry(aGrad

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

2022-06-23 Thread Mahdyar M. M. Sadeghi (via logerrit)
 vcl/source/fontsubset/xlat.hxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 073b1aeb8c02500b8cf8844a1ac774a693e0d39f
Author: Mahdyar M. M. Sadeghi 
AuthorDate: Wed Jun 22 19:41:23 2022 +0430
Commit: Hossein 
CommitDate: Fri Jun 24 08:11:20 2022 +0200

tdf#143148 Use pragma once instead of include guards

Change-Id: I8d42e4873a5cce88f2d8c3a471894c4b990890ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136289
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/vcl/source/fontsubset/xlat.hxx b/vcl/source/fontsubset/xlat.hxx
index 61e8534b1ae5..89eba1b7f460 100644
--- a/vcl/source/fontsubset/xlat.hxx
+++ b/vcl/source/fontsubset/xlat.hxx
@@ -19,8 +19,7 @@
 
 /*| Author: Alexander Gelfenbain|*/
 
-#ifndef INCLUDED_VCL_SOURCE_FONTSUBSET_XLAT_HXX
-#define INCLUDED_VCL_SOURCE_FONTSUBSET_XLAT_HXX
+#pragma once
 
 #include 
 
@@ -35,6 +34,4 @@ sal_uInt16 TranslateChar15(sal_uInt16);
 sal_uInt16 TranslateChar16(sal_uInt16);
 }
 
-#endif // INCLUDED_VCL_SOURCE_FONTSUBSET_XLAT_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2022-06-23 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/layout/layout.cxx |  284 +
 sw/source/core/text/porfld.cxx |6 
 2 files changed, 180 insertions(+), 110 deletions(-)

New commits:
commit 7e134e4e80ce609aeaccd2fe0d61c34d5891804c
Author: Miklos Vajna 
AuthorDate: Thu Jun 23 19:24:32 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jun 24 08:04:21 2022 +0200

CppunitTest_sw_layoutwriter: use more SwParaPortion::dumpAsXml()

See commit feeed3e762cf077fbd9cf48f82e949365108ccc1
(CppunitTest_sw_layoutwriter: avoid some a11y-based layout testing,
2022-04-07) for motivation.

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

diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 2c422a617856..ea21d9f4b174 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -1346,9 +1346,14 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, 
testRedlineFlysInFootnote)
 discardDumpedLayout();
 xmlDocUniquePtr pXmlDoc = parseLayoutDump();
 assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/merged", 
"paraPropsNodeIndex", "25");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Special[1]", "nType",
-"PortionType::Footnote");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Special[1]", "rText", 
"1");
+assertXPath(pXmlDoc,
+"/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout/"
+"child::*[@type='PortionType::Footnote']",
+"type", "PortionType::Footnote");
+assertXPath(pXmlDoc,
+"/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout/"
+"child::*[@type='PortionType::Footnote']",
+"expand", "1");
 assertXPath(pXmlDoc, "/root/page[1]/ftncont/ftn[1]/txt[1]/merged", 
"paraPropsNodeIndex",
 "7");
 assertXPath(pXmlDoc, 
"/root/page[1]/ftncont/ftn[1]/txt[1]/anchored/fly[1]/txt[1]/merged",
@@ -1745,12 +1750,22 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, 
testRedlineFlysInFootnote)
 xmlXPathFreeObject(pXmlObj);
 }
 
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Special[1]", "nType",
-"PortionType::Footnote");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Special[1]", "rText", 
"1");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Special[2]", "nType",
-"PortionType::Footnote");
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Special[2]", "rText", 
"2");
+assertXPath(pXmlDoc,
+"/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout/"
+"child::*[@type='PortionType::Footnote'][1]",
+"type", "PortionType::Footnote");
+assertXPath(pXmlDoc,
+"/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout/"
+"child::*[@type='PortionType::Footnote'][1]",
+"expand", "1");
+assertXPath(pXmlDoc,
+"/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout/"
+"child::*[@type='PortionType::Footnote'][2]",
+"type", "PortionType::Footnote");
+assertXPath(pXmlDoc,
+"/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout/"
+"child::*[@type='PortionType::Footnote'][2]",
+"expand", "2");
 assertXPath(pXmlDoc,
 
"/root/page[1]/ftncont/ftn[1]/txt[1]/anchored/fly[1]/txt[1]/SwParaPortion/"
 "SwLineLayout/SwParaPortion[1]",
@@ -1967,7 +1982,9 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116486)
 {
 SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf116486.docx");
 CPPUNIT_ASSERT(pDoc);
-OUString aTop = parseDump("/root/page/body/txt/Special[1]", "nHeight");
+OUString aTop = parseDump(
+
"/root/page/body/txt/SwParaPortion/SwLineLayout[1]/child::*[@type='PortionType::Fly']",
+"height");
 CPPUNIT_ASSERT_EQUAL(OUString("4006"), aTop);
 }
 
@@ -1997,10 +2014,11 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf128198)
 xmlDocUniquePtr pLayout = parseLayoutDump();
 // the problem was that line 5 was truncated at "this  "
 // due to the fly anchored in previous paragraph
-assertXPath(pLayout, "/root/page/body/txt[2]/LineBreak[5]", "Line",
+assertXPath(pLayout, 
"/root/page/body/txt[2]/SwParaPortion/SwLineLayout[5]", "portion",
 "to access any service, any time, anywhere. From this  
perspective, satellite "
 "boasts some ");
-assertXPath(pLayout, "/root/page/body/txt[2]/LineBreak[6]", "Line", 
"significant advantages. ");
+assertXPath(pLayout, 
"/root/page/body/txt[2]/SwParaPortion/SwLineLayout[6]", "portion",
+"significant advantages. ");
 }
 
 CP

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

2022-06-23 Thread Stephan Bergmann (via logerrit)
 sal/rtl/strtmpl.hxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit ab627d300d0346d1f55b15687b56bdd8df3e2116
Author: Stephan Bergmann 
AuthorDate: Thu Jun 23 22:36:49 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jun 24 07:56:34 2022 +0200

Let rtl_[u]stringbuffer_insert throw std::bad_alloc on overflow

Prior to a95c585433246813096e8890b7ed6ef4fe30c621 "Pump XInputStream into an
SvMemoryStream rather than an OStringBuffer", this change would have caused

> $ truncate -s 3G test.xml
> $ instdir/program/soffice test.xml

to open an effectively empty draw document (after apparently catching the
std::bad_alloc now thrown from within OrcusFormatDetect::detect; see that
commit's commit message for details) rather than crashing.  This works 
because
rtl_[u]stringbuffer_insert happen not to be decorated with 
SAL_THROW_EXTERN_C().
But even if they were (or when they are called from an external C program), 
it
wouldn't be worse to let the process terminate due to the unexpected C++
std::bad_alloc exception than to let it crash due to an overflown signed 
integer
computation and out-of-bounds memory write.

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

diff --git a/sal/rtl/strtmpl.hxx b/sal/rtl/strtmpl.hxx
index e1389ce6ad1b..eb9371219178 100644
--- a/sal/rtl/strtmpl.hxx
+++ b/sal/rtl/strtmpl.hxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1405,6 +1406,9 @@ void stringbuffer_insert(IMPL_RTL_STRINGDATA** ppThis, 
sal_Int32* capacity, sal_
 assert(len >= 0);
 if (len == 0)
 return;
+if (len > std::numeric_limits::max() - (*ppThis)->length) {
+throw std::bad_alloc();
+}
 
 stringbuffer_ensureCapacity(ppThis, capacity, (*ppThis)->length + len);
 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - svgio/qa

2022-06-23 Thread Stephan Bergmann (via logerrit)
 svgio/qa/cppunit/SvgImportTest.cxx |3 ++-
 svgio/qa/cppunit/data/CssClassRedefinition.svg |2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 3c4acc718549ab027be5465d60c8d5a0e3b8feaa
Author: Stephan Bergmann 
AuthorDate: Thu Jun 23 21:52:52 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jun 24 07:55:36 2022 +0200

Make CppunitTest_svgio CPPUNIT_TEST_NAME=Test::testCssClassRedefinition 
robust

That recently introduced test systematically failed on my Fedora 36 machine 
with

> /home/sbergman/lo2/core/test/source/xmltesttools.cxx:89:(anonymous 
namespace)::Test::testCssClassRedefinition
> equality assertion failed
> - Expected: 1
> - Actual  : 0
> - In <>, XPath '/primitive2D/transform/textsimpleportion[1]' number of 
nodes is incorrect

because the dumped data was

> 
> 
>  
>   
>
> 
>  
>  
>  
>  
> 
>
>
>   
>  
> 

rather than the expected

> 
> 
>  
>   
>   
>
> 0,0 50,0 50,100 0,100
>
>   
>  
> 

because in SvgSvgNode::decomposeSvgNode 
(svgio/source/svgreader/svgsvgnode.cxx)
aSvgCanvasRange = 50x100@(0,0) vs. aContentRange = 31x11@(20,9) did not 
match
the

> if(aSvgCanvasRange.isInside(aContentRange))

branch ("no clip needed, but an invisible HiddenGeometryPrimitive2D...") but
rather the

> else if(aSvgCanvasRange.overlaps(aContentRange))

branch ("Clip is necessary") introducing the additional  element.  The
size of aContentRange (and thus whether it is contained in or merely 
overlaps
aSvgCanvasRange) is apparently affected by what actual font gets 
substituted for
"Sans" in any given environment.

The only font that is guaranteed to always be available and is not subject 
to
--with-fonts (which isn't already demanded via 
gb_CppunitTest_use_more_fonts in
svgio/CppunitTest_svgio.mk) appears to be "Open Symbol" (cf.
extras/Package_fonts.mk), so use that (even if it doesn't have glyphs for 
the
given text, but which should be irrelevant for this test).

Change-Id: If6f6fdc481b313aa08803b4b3f406e01ff0be1ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136350
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit a817e83be44d82f259dc857dbca57f05da89b984)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136330

diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index 650dbdde67f6..4b5af1e54d84 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -852,7 +852,8 @@ void Test::testCssClassRedefinition()
 CPPUNIT_ASSERT (pDocument);
 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"text", "test");
 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"fontcolor", "#ff");
-assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"familyname", "Sans");
+assertXPath(
+pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"familyname", "Open Symbol");
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
diff --git a/svgio/qa/cppunit/data/CssClassRedefinition.svg 
b/svgio/qa/cppunit/data/CssClassRedefinition.svg
index 87eb2023384b..384cf88482f9 100644
--- a/svgio/qa/cppunit/data/CssClassRedefinition.svg
+++ b/svgio/qa/cppunit/data/CssClassRedefinition.svg
@@ -2,7 +2,7 @@
 

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

2022-06-23 Thread Eike Rathke (via logerrit)
 sc/source/core/tool/compiler.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a7c9101b1a932c0d481dd3d39108a26548895be6
Author: Eike Rathke 
AuthorDate: Fri Jun 24 00:06:13 2022 +0200
Commit: Eike Rathke 
CommitDate: Fri Jun 24 02:26:30 2022 +0200

Avoid i18n uppercase overhead also for OOXML

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

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 2945062f1b37..1f83d27d3c3f 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4314,10 +4314,10 @@ void ScCompiler::AutoCorrectParsedSymbol()
 
 bool ScCompiler::ToUpperAsciiOrI18nIsAscii( OUString& rUpper, const OUString& 
rOrg ) const
 {
-if (FormulaGrammar::isODFF( meGrammar ))
+if (FormulaGrammar::isODFF( meGrammar) || FormulaGrammar::isOOXML( 
meGrammar))
 {
-// ODFF has a defined set of English function names, avoid i18n
-// overhead.
+// ODFF and OOXML have defined sets of English function names, avoid
+// i18n overhead.
 rUpper = rOrg.toAsciiUpperCase();
 return true;
 }


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - svgio/qa

2022-06-23 Thread offtkp (via logerrit)
 svgio/qa/cppunit/SvgImportTest.cxx |   22 ++
 svgio/qa/cppunit/data/CssClassRedefinition.svg |   13 +
 2 files changed, 35 insertions(+)

New commits:
commit d931e8876cbaf8e409ebbba97d991d0099124de4
Author: offtkp 
AuthorDate: Mon Jun 20 15:23:14 2022 +0300
Commit: Stephan Bergmann 
CommitDate: Thu Jun 23 23:08:24 2022 +0200

tdf#149449 Add unit test for CSS class redefinition inside SVGs

Tests what happens when a CSS class is redefined with new attributes
and with already defined attributes

Change-Id: I5996fa4dce6c98c1792001a11387bf570d159a8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136151
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit eedc5b1c576fcaaea85a5278762efc8ba8c5a084)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136315
Reviewed-by: Stephan Bergmann 

diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index 4f9ee58f68db..650dbdde67f6 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -70,6 +70,7 @@ class Test : public test::BootstrapFixture, public 
XmlTestTools
 void testTdf94765();
 void testBehaviourWhenWidthAndHeightIsOrIsNotSet();
 void testTdf97663();
+void testCssClassRedefinition();
 
 Primitive2DSequence parseSvg(std::u16string_view aSource);
 
@@ -106,6 +107,7 @@ public:
 CPPUNIT_TEST(testTdf94765);
 CPPUNIT_TEST(testBehaviourWhenWidthAndHeightIsOrIsNotSet);
 CPPUNIT_TEST(testTdf97663);
+CPPUNIT_TEST(testCssClassRedefinition);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -833,6 +835,26 @@ void Test::testTdf97663()
 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "y", 
"236");
 }
 
+void Test::testCssClassRedefinition()
+{
+// Tests for svg css class redefinition behavior
+// Example:
+// .c1 {fill:#00ff00}
+// .c1 {font-family:Sans}
+// .c1 {fill:#ff}
+// Expected result is .c1 {font-family:Sans; fill:#ff} because
+// the second redefinition appends attributes to the class and the
+// third redefinition replaces the already existing
+// attribute in the original definition
+Primitive2DSequence aSequence = 
parseSvg(u"/svgio/qa/cppunit/data/CssClassRedefinition.svg");
+drawinglayer::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = 
dumper.dumpAndParse(Primitive2DContainer(aSequence));
+CPPUNIT_ASSERT (pDocument);
+assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"text", "test");
+assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"fontcolor", "#ff");
+assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"familyname", "Sans");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 }
diff --git a/svgio/qa/cppunit/data/CssClassRedefinition.svg 
b/svgio/qa/cppunit/data/CssClassRedefinition.svg
new file mode 100644
index ..87eb2023384b
--- /dev/null
+++ b/svgio/qa/cppunit/data/CssClassRedefinition.svg
@@ -0,0 +1,13 @@
+http://www.w3.org/2000/svg"; width="50 px" height="100 px">
+
+.c1 {fill:#00ff00}
+
+.c1 {font-family:Sans}
+
+.c1 {fill:#ff}
+
+
+
+test
+
+


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

2022-06-23 Thread Stephan Bergmann (via logerrit)
 svgio/qa/cppunit/SvgImportTest.cxx |3 ++-
 svgio/qa/cppunit/data/CssClassRedefinition.svg |2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 9e83d35c4a22bcb465f0736dda9b752b29f83959
Author: Stephan Bergmann 
AuthorDate: Thu Jun 23 21:52:52 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jun 23 23:03:21 2022 +0200

Make CppunitTest_svgio CPPUNIT_TEST_NAME=Test::testCssClassRedefinition 
robust

That recently introduced test systematically failed on my Fedora 36 machine 
with

> /home/sbergman/lo2/core/test/source/xmltesttools.cxx:89:(anonymous 
namespace)::Test::testCssClassRedefinition
> equality assertion failed
> - Expected: 1
> - Actual  : 0
> - In <>, XPath '/primitive2D/transform/textsimpleportion[1]' number of 
nodes is incorrect

because the dumped data was

> 
> 
>  
>   
>
> 
>  
>  
>  
>  
> 
>
>
>   
>  
> 

rather than the expected

> 
> 
>  
>   
>   
>
> 0,0 50,0 50,100 0,100
>
>   
>  
> 

because in SvgSvgNode::decomposeSvgNode 
(svgio/source/svgreader/svgsvgnode.cxx)
aSvgCanvasRange = 50x100@(0,0) vs. aContentRange = 31x11@(20,9) did not 
match
the

> if(aSvgCanvasRange.isInside(aContentRange))

branch ("no clip needed, but an invisible HiddenGeometryPrimitive2D...") but
rather the

> else if(aSvgCanvasRange.overlaps(aContentRange))

branch ("Clip is necessary") introducing the additional  element.  The
size of aContentRange (and thus whether it is contained in or merely 
overlaps
aSvgCanvasRange) is apparently affected by what actual font gets 
substituted for
"Sans" in any given environment.

The only font that is guaranteed to always be available and is not subject 
to
--with-fonts (which isn't already demanded via 
gb_CppunitTest_use_more_fonts in
svgio/CppunitTest_svgio.mk) appears to be "Open Symbol" (cf.
extras/Package_fonts.mk), so use that (even if it doesn't have glyphs for 
the
given text, but which should be irrelevant for this test).

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

diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index 650dbdde67f6..4b5af1e54d84 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -852,7 +852,8 @@ void Test::testCssClassRedefinition()
 CPPUNIT_ASSERT (pDocument);
 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"text", "test");
 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"fontcolor", "#ff");
-assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"familyname", "Sans");
+assertXPath(
+pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"familyname", "Open Symbol");
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
diff --git a/svgio/qa/cppunit/data/CssClassRedefinition.svg 
b/svgio/qa/cppunit/data/CssClassRedefinition.svg
index 87eb2023384b..384cf88482f9 100644
--- a/svgio/qa/cppunit/data/CssClassRedefinition.svg
+++ b/svgio/qa/cppunit/data/CssClassRedefinition.svg
@@ -2,7 +2,7 @@
 

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

2022-06-23 Thread Luboš Luňák (via logerrit)
 sc/inc/scmatrix.hxx |   16 ++--
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |5 +
 2 files changed, 7 insertions(+), 14 deletions(-)

New commits:
commit b901fd3b27191d5565376c5a708da43a2ac0f6ee
Author: Luboš Luňák 
AuthorDate: Thu Jun 23 16:00:50 2022 +0200
Commit: Luboš Luňák 
CommitDate: Thu Jun 23 21:37:54 2022 +0200

no need to explicitly spell out bodies of default functions

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

diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index 9026288c55cf..fdb870f40a1d 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -65,9 +65,8 @@ struct ScMatrixValue
 bool GetBoolean() const { return fVal != 0.0; }
 
 ScMatrixValue() : fVal(0.0), nType(ScMatValType::Empty) {}
-
-ScMatrixValue(const ScMatrixValue& r) :
-fVal(r.fVal), aStr(r.aStr), nType(r.nType) {}
+ScMatrixValue(const ScMatrixValue& r) = default;
+ScMatrixValue& operator= (const ScMatrixValue& r) = default;
 
 bool operator== (const ScMatrixValue& r) const
 {
@@ -91,17 +90,6 @@ struct ScMatrixValue
 {
 return !operator==(r);
 }
-
-ScMatrixValue& operator= (const ScMatrixValue& r)
-{
-if (this == &r)
-return *this;
-
-nType = r.nType;
-fVal = r.fVal;
-aStr = r.aStr;
-return *this;
-}
 };
 
 /**
commit d4eee72ea39f02ad8a63a592feb3553771bf9bbe
Author: Caolán McNamara 
AuthorDate: Thu Jun 23 16:52:37 2022 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 23 21:37:42 2022 +0200

ofz#48264 Timeout

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

diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx 
b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 9a5aff5bea6a..7b53511f6cfb 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -273,6 +273,11 @@ static void CalculateHorizontalScalingFactor(
 nFontSize = std::max(16, std::ceil(5 * 
nEstimatedFinalFontSize));
 SAL_WARN("svx", "CalculateHorizontalScalingFactor 
skipping direct to: " << nFontSize << " from " << rFontHeight.GetHeight());
 }
+else if (nEstimatedFinalFontSize < nOnePercentFontSize * 
10)
+{
+nFontSize = std::max(16, std::ceil(2 * 
nEstimatedFinalFontSize));
+SAL_WARN("svx", "CalculateHorizontalScalingFactor 
skipping direct to: " << nFontSize << " from " << rFontHeight.GetHeight());
+}
 }
 }
 nFontSize--;


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

2022-06-23 Thread Andrea Gelmini (via logerrit)
 l10ntools/inc/xmlparse.hxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 4eeb12bb83d5d90eadd14ab5e57950613fcc5fc3
Author: Andrea Gelmini 
AuthorDate: Thu Jun 23 12:57:12 2022 +0200
Commit: Julien Nabet 
CommitDate: Thu Jun 23 20:48:07 2022 +0200

Removed duplicated include

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

diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx
index a1fc321c05ec..0495883a5311 100644
--- a/l10ntools/inc/xmlparse.hxx
+++ b/l10ntools/inc/xmlparse.hxx
@@ -25,7 +25,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/inc sw/source

2022-06-23 Thread Michael Stahl (via logerrit)
 sw/inc/dcontact.hxx   |4 +--
 sw/source/core/draw/dcontact.cxx  |   42 ++
 sw/source/core/layout/frmtool.cxx |2 -
 3 files changed, 37 insertions(+), 11 deletions(-)

New commits:
commit c6586b8f923c1c6e011ecd804e31f71f6c1dc452
Author: Michael Stahl 
AuthorDate: Fri Apr 9 12:08:24 2021 +0200
Commit: Michael Stahl 
CommitDate: Thu Jun 23 18:36:17 2022 +0200

tdf#141549 sw: fix ordering of virtual SdrObjects for textboxes

In header/footer it turns out that not only can the text box be inserted
after the shape, it can also be inserted before the shape.

This is because SwDrawFrameFormat::MakeFrames() ends up first destroying
all the SwDrawVirtObj and then creating them from scratch again, while
the SwVirtFlyDrawObj survives.

4  SwDrawContact::DisconnectFromLayout(bool) (this=0x6ed0200, 
_bMoveMasterToInvisibleLayer=false) at sw/source/core/draw/dcontact.cxx:1664
5  SwDrawContact::ConnectToLayout(SwFormatAnchor const*) (this=0x6ed0200, 
pAnch=0x0) at sw/source/core/draw/dcontact.cxx:1791
6  SwDrawContact::SwClientNotify(SwModify const&, SfxHint const&) 
(this=0x6ed0200, rMod=..., rHint=...) at sw/source/core/draw/dcontact.cxx:1521
7  SwModify::CallSwClientNotify(SfxHint const&) const (this=0x6ecfd80, 
rHint=...) at sw/source/core/attr/calbck.cxx:321
8  sw::BroadcastingModify::CallSwClientNotify(SfxHint const&) const 
(this=0x6ecfd80, rHint=...) at sw/source/core/attr/calbck.cxx:326
9  SwDrawFrameFormat::MakeFrames() (this=0x6ecfd80) at 
sw/source/core/layout/atrfrm.cxx:3394
10 AppendAllObjs(SwFrameFormats const*, SwFrame const*) (pTable=0x69c1920, 
pSib=0x38c6100) at sw/source/core/layout/frmtool.cxx:1349
11 InsertCnt_(SwLayoutFrame*, SwDoc*, unsigned long, bool, unsigned long, 
SwFrame*, sw::FrameMode) (pLay=0x6be4320, pDoc=0x69af7c0, nIndex=157, 
bPages=true, nEndIndex=0, pPrv=0x6baedc0, eMode=sw::FrameMode::New) at 
sw/source/core/layout/frmtool.cxx:1927

Fix this by searching for the existing SwVirtFlyDrawObj in
SwDrawVirtObj::AddToDrawingPage().

(regression from 3bc8f90e9693f710f12632f69b9348c1c833c906)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113844
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit c2eae4998b3ae79210ef0b5c064e9833218c22de)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113853
Reviewed-by: Miklos Vajna 
(cherry picked from commit ad8ddc0bb2535b6d6bad53dd137c3d8e682dfd1f)

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

diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index 8d0e03d66e50..504c512d1c8e 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -248,7 +248,7 @@ class SwDrawVirtObj final : public SdrVirtObj
 void RemoveFromWriterLayout();
 
 /// connection to drawing layer
-void AddToDrawingPage();
+void AddToDrawingPage(SwFrame const& rAnchorFrame);
 void RemoveFromDrawingPage();
 
 /** is 'virtual' drawing object connected to writer layout and
@@ -398,7 +398,7 @@ class SAL_DLLPUBLIC_RTTI SwDrawContact final : public 
SwContact
 /// Moves all SW-connections to new Master)
 void ChangeMasterObject( SdrObject *pNewMaster );
 
-SwDrawVirtObj* AddVirtObj();
+SwDrawVirtObj* AddVirtObj(SwFrame const& rAnchorFrame);
 
 void NotifyBackgrdOfAllVirtObjs( const tools::Rectangle* pOldBoundRect 
);
 
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index d9e7ce725ed1..5f05c4d21cd7 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -825,7 +825,7 @@ SwFrame* SwDrawContact::GetAnchorFrame(SdrObject const 
*const pDrawObj)
 
 /** add a 'virtual' drawing object to drawing page.
  */
-SwDrawVirtObj* SwDrawContact::AddVirtObj()
+SwDrawVirtObj* SwDrawContact::AddVirtObj(SwFrame const& rAnchorFrame)
 {
 maDrawVirtObjs.push_back(
 SwDrawVirtObjPtr(
@@ -833,7 +833,7 @@ SwDrawVirtObj* SwDrawContact::AddVirtObj()
 GetMaster()->getSdrModelFromSdrObject(),
 *GetMaster(),
 *this)));
-maDrawVirtObjs.back()->AddToDrawingPage();
+maDrawVirtObjs.back()->AddToDrawingPage(rAnchorFrame);
 return maDrawVirtObjs.back().get();
 }
 
@@ -1892,7 +1892,7 @@ void SwDrawContact::ConnectToLayout( const 
SwFormatAnchor* pAnch )
 else
 {
 // append 'virtual' drawing object
-SwDrawVirtObj* pDrawVirtObj = AddVirtObj();
+SwDrawVirtObj* pDrawVirtObj = AddVirtObj(*pFrame);
 if ( pAnch->GetAnchorId() == 
RndStdIds::FLY_AS_CHAR )
 {
   

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

2022-06-23 Thread Miklos Vajna (via logerrit)
 sw/qa/core/edit/data/textbox-undo-ordnum.docx |binary
 sw/qa/core/edit/edit.cxx  |   51 ++
 2 files changed, 51 insertions(+)

New commits:
commit b767771e505851553e80e27ebdd5ac5d7973b831
Author: Miklos Vajna 
AuthorDate: Mon Mar 8 21:06:10 2021 +0100
Commit: Michael Stahl 
CommitDate: Thu Jun 23 18:35:46 2022 +0200

tdf#140292 sw: fix z-order of textbox on undo

Regression from commit 200cd2b99bee18962a970edc5d059286f6c3ea0e
(tdf#138995 DOCX import: fix handling of textbox zorders, 2021-01-11),
the problem was already fixed by Michael Stahl, this just adds a test
for it.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112181
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112273
(cherry picked from commit 291bc2799e4d384cb3ccbb429e82a8ea52d3ea2f)

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

diff --git a/sw/qa/core/edit/data/textbox-undo-ordnum.docx 
b/sw/qa/core/edit/data/textbox-undo-ordnum.docx
new file mode 100644
index ..96b00973289a
Binary files /dev/null and b/sw/qa/core/edit/data/textbox-undo-ordnum.docx 
differ
diff --git a/sw/qa/core/edit/edit.cxx b/sw/qa/core/edit/edit.cxx
index 5f6dff479e73..c13e348ad831 100644
--- a/sw/qa/core/edit/edit.cxx
+++ b/sw/qa/core/edit/edit.cxx
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -52,6 +53,56 @@ CPPUNIT_TEST_FIXTURE(Test, testRedlineHidden)
 pWrtShell->SetAttrSet(aSet, SetAttrMode::DEFAULT, nullptr, true);
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTextboxUndoOrdNum)
+{
+// Given a document with 5 frame formats:
+// - picture
+// - draw format + fly format and a picture in it
+// - picture
+SwDoc* pDoc = createSwDoc("textbox-undo-ordnum.docx");
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+// Test the state before del + undo.
+for (const auto& pFormat : rFormats)
+{
+const SwFrameFormat* pFlyFormat
+= SwTextBoxHelper::getOtherTextBoxFormat(pFormat, RES_DRAWFRMFMT);
+if (!pFlyFormat)
+{
+continue;
+}
+
+sal_Int32 nDrawOrdNum = pFormat->FindRealSdrObject()->GetOrdNum();
+sal_Int32 nFlyOrdNum = pFlyFormat->FindRealSdrObject()->GetOrdNum();
+CPPUNIT_ASSERT_EQUAL(nDrawOrdNum + 1, nFlyOrdNum);
+}
+
+// When selecting the first page, deleting the selection and undoing:
+pWrtShell->Down(true, 3);
+pWrtShell->DelLeft();
+pWrtShell->Undo();
+
+// Then the z-order of the fly format should be still the z-order of the 
draw format + 1, when
+// the fly and draw formats form a textbox pair.
+for (const auto& pFormat : rFormats)
+{
+const SwFrameFormat* pFlyFormat
+= SwTextBoxHelper::getOtherTextBoxFormat(pFormat, RES_DRAWFRMFMT);
+if (!pFlyFormat)
+{
+continue;
+}
+
+sal_Int32 nDrawOrdNum = pFormat->FindRealSdrObject()->GetOrdNum();
+sal_Int32 nFlyOrdNum = pFlyFormat->FindRealSdrObject()->GetOrdNum();
+// Without the accompanying fix in place, this test would have failed 
with:
+// - Expected: 4
+// - Actual  : 2
+// i.e. the fly format was behind the draw format, not visible.
+CPPUNIT_ASSERT_EQUAL(nDrawOrdNum + 1, nFlyOrdNum);
+}
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/inc sw/qa sw/source

2022-06-23 Thread Michael Stahl (via logerrit)
 sw/inc/dcontact.hxx  |4 ++--
 sw/qa/extras/mailmerge/mailmerge.cxx |2 +-
 sw/source/core/draw/dcontact.cxx |   27 ---
 sw/source/core/inc/flyfrm.hxx|2 +-
 sw/source/core/layout/fly.cxx|6 +++---
 5 files changed, 31 insertions(+), 10 deletions(-)

New commits:
commit 9471458c66ad5eb52552bd65b4ac8c405682d051
Author: Michael Stahl 
AuthorDate: Fri Mar 5 21:06:28 2021 +0100
Commit: Michael Stahl 
CommitDate: Thu Jun 23 18:34:42 2022 +0200

tdf#140292: (related: tdf#133487) sw: fix ordering of virtual SdrObjects 
for textboxes

Calling XShapes3::sort() on export of the testTdf130314 fails because of
2 consecutive textboxes; the function requires a textbox to immediately
follow its shape in the list (i.e. textbox has OrdNum of shape + 1).

This is because for shapes in header/footer, one virtual SdrVirtObj is
created per page where the header/footer is shown, and the
SwFlyDrawContact::GetOrdNumForNewRef() does not take textbox ordering
into account.

It's not clear if the assumption that the shape's SdrVirtObj is created
before the textbox's always holds, but let's try this for now.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112029
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112272
(cherry picked from commit 18397b2ede1e6c3feb54bd2bf59da57fd8c4d13a)

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

diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index daec75ea300f..8d0e03d66e50 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -179,13 +179,13 @@ private:
 
 SwFlyDrawObjPtr mpMasterObj;
 void SwClientNotify(const SwModify&, const SfxHint& rHint) override;
-sal_uInt32 GetOrdNumForNewRef(const SwFlyFrame* pFly);
+sal_uInt32 GetOrdNumForNewRef(const SwFlyFrame* pFly, SwFrame const& 
rAnchorFrame);
 
 public:
 
 /// Creates DrawObject and registers it with the Model.
 SwFlyDrawContact(SwFlyFrameFormat* pToRegisterIn, SdrModel& rTargetModel);
-static SwVirtFlyDrawObj* CreateNewRef(SwFlyFrame* pFly, SwFlyFrameFormat* 
pFormat);
+static SwVirtFlyDrawObj* CreateNewRef(SwFlyFrame* pFly, SwFlyFrameFormat* 
pFormat, SwFrame const& rAnchorFrame);
 virtual ~SwFlyDrawContact() override;
 
 virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj 
) const override;
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx 
b/sw/qa/extras/mailmerge/mailmerge.cxx
index c1743bf5d911..340c69dc2ce4 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -394,7 +394,7 @@ DECLARE_FILE_MAILMERGE_TEST(testMissingDefaultLineColor, 
"missing-default-line-c
 // (see XMLGraphicsDefaultStyle::SetDefaults()).
 uno::Reference xDrawPageSupplier(mxComponent, 
uno::UNO_QUERY);
 uno::Reference xDraws = 
xDrawPageSupplier->getDrawPage();
-uno::Reference xPropertySet(xDraws->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xPropertySet(xDraws->getByIndex(4), 
uno::UNO_QUERY);
 // Lines do not have a line color.
 CPPUNIT_ASSERT( !xPropertySet->getPropertySetInfo()->hasPropertyByName( 
"LineColor" ));
 SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 9d057bcabc7d..d9e7ce725ed1 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -476,8 +476,28 @@ SwFlyDrawContact::~SwFlyDrawContact()
 }
 }
 
-sal_uInt32 SwFlyDrawContact::GetOrdNumForNewRef(const SwFlyFrame* pFly)
+sal_uInt32 SwFlyDrawContact::GetOrdNumForNewRef(const SwFlyFrame* pFly,
+SwFrame const& rAnchorFrame)
 {
+// maintain invariant that a shape's textbox immediately follows the shape
+// also for the multiple SdrVirtObj created for shapes in header/footer
+if (SwFrameFormat const*const pDrawFormat =
+SwTextBoxHelper::getOtherTextBoxFormat(GetFormat(), RES_FLYFRMFMT))
+{
+// assume that the draw SdrVirtObj is always created before the 
flyframe one
+if (SwSortedObjs const*const pObjs = rAnchorFrame.GetDrawObjs())
+{
+for (SwAnchoredObject const*const pAnchoredObj : *pObjs)
+{
+if (&pAnchoredObj->GetFrameFormat() == pDrawFormat)
+{
+return pAnchoredObj->GetDrawObj()->GetOrdNum() + 1;
+}
+}
+}
+// if called from AppendObjs(), this is a problem; if called from 
lcl_SetFlyFrameAttr() it's not
+SAL_INFO("sw", "GetOrdNumForNewRef: cannot find SdrObject for text 
box's shape");
+}
 // search for another Writer fly frame registered at same frame f

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/CppunitTest_sw_core_doc.mk sw/qa writerfilter/source

2022-06-23 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_core_doc.mk  |1 +
 sw/qa/core/doc/data/textbox-zorder.docx|binary
 sw/qa/core/doc/doc.cxx |   16 
 writerfilter/source/dmapper/GraphicHelpers.cxx |   14 ++
 4 files changed, 31 insertions(+)

New commits:
commit 1b85634e315263b0aa51da8aa07033b802073078
Author: Miklos Vajna 
AuthorDate: Mon Jan 11 21:03:34 2021 +0100
Commit: Michael Stahl 
CommitDate: Thu Jun 23 18:33:21 2022 +0200

tdf#138995 DOCX import: fix handling of textbox zorders

Regression from commit d379d18666aa42031359ca8eb34b0021960347ae (oox:
import WPS shape with text as shape with textbox, 2014-06-18), the
problem was that a textbox's shape + textframe are internally 2 sdr
objects, so once GraphicZOrderHelper knows the current shape should be
on top of a shape+frame pair, it should suggest a larger ZOrder.

This is necessary till there is no setter version of
SwTextBoxHelper::getOrdNum(), which would allow import filters to ignore
this complexity, but that would be a larger change.

(cherry picked from commit 200cd2b99bee18962a970edc5d059286f6c3ea0e)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109184
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit a4a301c67f4de992d2f4bc66721abd21ebd67494)

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

diff --git a/sw/CppunitTest_sw_core_doc.mk b/sw/CppunitTest_sw_core_doc.mk
index 856f007cb9b1..071d2901122a 100644
--- a/sw/CppunitTest_sw_core_doc.mk
+++ b/sw/CppunitTest_sw_core_doc.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_core_doc, \
 editeng \
 sal \
 sfx \
+svxcore \
 sw \
 test \
 unotest \
diff --git a/sw/qa/core/doc/data/textbox-zorder.docx 
b/sw/qa/core/doc/data/textbox-zorder.docx
new file mode 100644
index ..d5263f8bbd6b
Binary files /dev/null and b/sw/qa/core/doc/data/textbox-zorder.docx differ
diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx
index 72895861f713..381e873ed7b9 100644
--- a/sw/qa/core/doc/doc.cxx
+++ b/sw/qa/core/doc/doc.cxx
@@ -82,6 +82,22 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, 
testTextboxTextRotateAngle)
 ErrorRegistry::Reset();
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextBoxZOrder)
+{
+SwDoc* pDoc = createDoc("textbox-zorder.docx");
+SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+CPPUNIT_ASSERT_EQUAL(static_cast(3), rFormats.size());
+const SwFrameFormat* pEllipse = rFormats[2];
+const SdrObject* pEllipseShape = pEllipse->FindRealSdrObject();
+// Make sure we test the right shape.
+CPPUNIT_ASSERT_EQUAL(OUString("Shape3"), pEllipseShape->GetName());
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 2
+// - Actual  : 1
+// i.e. the ellipse was under the frame of the shape-frame pair, not on 
top of it.
+CPPUNIT_ASSERT_EQUAL(static_cast(2), 
pEllipseShape->GetOrdNum());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx 
b/writerfilter/source/dmapper/GraphicHelpers.cxx
index 9168ad51eebd..0ea364cbff85 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -291,6 +291,20 @@ sal_Int32 GraphicZOrderHelper::findZOrder( sal_Int32 
relativeHeight, bool bOldSt
 return 0;
 --it;
 itemZOrderOffset = 1; // after the topmost
+
+// Check if this shape has a textbox. If so, the textbox will have its 
own ZOrder, so
+// suggest a larger offset.
+bool bTextBox = false;
+uno::Reference xShape = it->second;
+uno::Reference xInfo = 
xShape->getPropertySetInfo();
+if (xInfo->hasPropertyByName("TextBox"))
+{
+xShape->getPropertyValue("TextBox") >>= bTextBox;
+}
+if (bTextBox)
+{
+++itemZOrderOffset;
+}
 }
 // SwXFrame::getPropertyValue throws uno::RuntimeException
 // when its GetFrameFormat() returns nullptr


[Libreoffice-commits] core.git: 2 commits - lotuswordpro/inc lotuswordpro/source svx/source

2022-06-23 Thread Noel Grandin (via logerrit)
 lotuswordpro/inc/xfilter/xfstylecont.hxx|2 
 lotuswordpro/inc/xfilter/xftextcontent.hxx  |2 
 lotuswordpro/source/filter/LotusWordProImportFilter.cxx |7 -
 lotuswordpro/source/filter/LotusWordProImportFilter.hxx |5 -
 lotuswordpro/source/filter/benname.cxx  |6 -
 lotuswordpro/source/filter/bento.hxx|2 
 lotuswordpro/source/filter/lwpnumericfmt.hxx|9 +-
 lotuswordpro/source/filter/lwptblformula.cxx|3 
 lotuswordpro/source/filter/lwptblformula.hxx|2 
 lotuswordpro/source/filter/xfilter/xfstylecont.cxx  |5 -
 lotuswordpro/source/filter/xfilter/xftextcontent.cxx|3 
 svx/source/sdr/overlay/overlaytools.cxx |   66 
 12 files changed, 60 insertions(+), 52 deletions(-)

New commits:
commit 535cdff8127426ce8accdb6049f90b6b2fd754a2
Author: Noel Grandin 
AuthorDate: Thu Jun 23 15:38:21 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 23 18:24:40 2022 +0200

tdf#149655 Crash: "Helplines while moving" crashes debug-build

regression from
commit a447b5b6d1114111c92e5e3e3f3ae83d4c2f3bca
Author: Noel Grandin 
Date:   Mon Jun 13 18:46:45 2022 +0200
loplugin:moveit

calling std::move() on an otl::cow_wrapper apparently leaves it in a
state where calling anything else on it will SIGSEGV.

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

diff --git a/svx/source/sdr/overlay/overlaytools.cxx 
b/svx/source/sdr/overlay/overlaytools.cxx
index c669f5220ccd..6e29d9c0d235 100644
--- a/svx/source/sdr/overlay/overlaytools.cxx
+++ b/svx/source/sdr/overlay/overlaytools.cxx
@@ -529,50 +529,50 @@ sal_uInt32 
OverlayStaticRectanglePrimitive::getPrimitive2DID() const
 if(getViewport().isEmpty())
 return;
 
-basegfx::B2DPolygon aLine;
 
 // Left lines
-aLine.append(basegfx::B2DPoint(getViewport().getMinX(), 
getRollingRectangle().getMinY()));
-aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), 
getRollingRectangle().getMinY()));
-rContainer.push_back(new 
PolygonMarkerPrimitive2D(std::move(aLine), getRGBColorA(), getRGBColorB(), 
getDiscreteDashLength()));
+basegfx::B2DPolygon aLine1;
+aLine1.append(basegfx::B2DPoint(getViewport().getMinX(), 
getRollingRectangle().getMinY()));
+aLine1.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), 
getRollingRectangle().getMinY()));
+rContainer.push_back(new 
PolygonMarkerPrimitive2D(std::move(aLine1), getRGBColorA(), getRGBColorB(), 
getDiscreteDashLength()));
 
-aLine.clear();
-aLine.append(basegfx::B2DPoint(getViewport().getMinX(), 
getRollingRectangle().getMaxY()));
-aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), 
getRollingRectangle().getMaxY()));
-rContainer.push_back(new 
PolygonMarkerPrimitive2D(std::move(aLine), getRGBColorA(), getRGBColorB(), 
getDiscreteDashLength()));
+basegfx::B2DPolygon aLine2;
+aLine2.append(basegfx::B2DPoint(getViewport().getMinX(), 
getRollingRectangle().getMaxY()));
+aLine2.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), 
getRollingRectangle().getMaxY()));
+rContainer.push_back(new 
PolygonMarkerPrimitive2D(std::move(aLine2), getRGBColorA(), getRGBColorB(), 
getDiscreteDashLength()));
 
 // Right lines
-aLine.clear();
-aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), 
getRollingRectangle().getMinY()));
-aLine.append(basegfx::B2DPoint(getViewport().getMaxX(), 
getRollingRectangle().getMinY()));
-rContainer.push_back(new 
PolygonMarkerPrimitive2D(std::move(aLine), getRGBColorA(), getRGBColorB(), 
getDiscreteDashLength()));
+basegfx::B2DPolygon aLine3;
+aLine3.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), 
getRollingRectangle().getMinY()));
+aLine3.append(basegfx::B2DPoint(getViewport().getMaxX(), 
getRollingRectangle().getMinY()));
+rContainer.push_back(new 
PolygonMarkerPrimitive2D(std::move(aLine3), getRGBColorA(), getRGBColorB(), 
getDiscreteDashLength()));
 
-aLine.clear();
-aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), 
getRollingRectangle().getMaxY()));
-aLine.append(basegfx::B2DPoint(getViewport().getMaxX(), 
getRollingRectangle().getMaxY()));
-rContainer.push_back(new 
PolygonMarkerPrimitive2D(std::move(aLine), getRGBColorA(), getRGBColorB(), 
getDiscreteDashLength()));
+basegfx::B2DPolygon aLine4;
+aLine4.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), 
getRollingRectangle().getMaxY(

[Libreoffice-commits] core.git: 2 commits - package/inc package/source scripting/source

2022-06-23 Thread Noel Grandin (via logerrit)
 package/inc/ZipFile.hxx|8 +++---
 package/inc/ZipOutputEntry.hxx |4 +--
 package/inc/ZipPackage.hxx |2 -
 package/source/manifest/ManifestImport.hxx |5 ++--
 package/source/xstor/ocompinstream.cxx |9 ---
 package/source/xstor/ocompinstream.hxx |4 +--
 package/source/xstor/ohierarchyholder.hxx  |9 ---
 package/source/xstor/owriteablestream.cxx  |9 ---
 package/source/xstor/owriteablestream.hxx  |4 +--
 package/source/xstor/switchpersistencestream.cxx   |   25 ++---
 package/source/xstor/switchpersistencestream.hxx   |4 +--
 package/source/xstor/xstorage.cxx  |9 ---
 package/source/xstor/xstorage.hxx  |4 +--
 package/source/zipapi/XUnbufferedStream.cxx|9 ---
 package/source/zipapi/XUnbufferedStream.hxx|4 +--
 package/source/zipapi/ZipFile.cxx  |   17 +++---
 package/source/zipapi/ZipOutputEntry.cxx   |   13 +-
 package/source/zippackage/ZipPackage.cxx   |5 ++--
 package/source/zippackage/wrapstreamforshare.cxx   |9 ---
 package/source/zippackage/wrapstreamforshare.hxx   |4 +--
 scripting/source/basprov/baslibnode.cxx|9 ---
 scripting/source/basprov/baslibnode.hxx|4 +--
 scripting/source/basprov/basmethnode.cxx   |5 ++--
 scripting/source/basprov/basmethnode.hxx   |2 -
 scripting/source/basprov/basmodnode.cxx|5 ++--
 scripting/source/basprov/basmodnode.hxx|2 -
 scripting/source/basprov/basscript.cxx |   13 +-
 scripting/source/basprov/basscript.hxx |8 +++---
 scripting/source/dlgprov/dlgevtatt.cxx |   11 +
 scripting/source/dlgprov/dlgevtatt.hxx |5 ++--
 scripting/source/stringresource/stringresource.hxx |3 +-
 31 files changed, 121 insertions(+), 103 deletions(-)

New commits:
commit 74ff1a4355090c227f4bdcdddb20482a4abd6064
Author: Noel Grandin 
AuthorDate: Thu Jun 23 15:06:10 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 23 18:24:16 2022 +0200

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

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

diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx
index 15b800430555..7fe15f70ff99 100644
--- a/package/inc/ZipFile.hxx
+++ b/package/inc/ZipFile.hxx
@@ -84,14 +84,14 @@ class ZipFile
 
 public:
 
-ZipFile( const rtl::Reference& aMutexHolder,
+ZipFile( rtl::Reference aMutexHolder,
  css::uno::Reference < css::io::XInputStream > const &xInput,
- const css::uno::Reference < css::uno::XComponentContext > 
&rxContext,
+ css::uno::Reference < css::uno::XComponentContext > xContext,
  bool bInitialise );
 
-ZipFile( const rtl::Reference& aMutexHolder,
+ZipFile( rtl::Reference aMutexHolder,
  css::uno::Reference < css::io::XInputStream > const &xInput,
- const css::uno::Reference < css::uno::XComponentContext > 
&rxContext,
+ css::uno::Reference < css::uno::XComponentContext > xContext,
  bool bInitialise,
  bool bForceRecover );
 
diff --git a/package/inc/ZipOutputEntry.hxx b/package/inc/ZipOutputEntry.hxx
index 078c07359de5..678a073c6746 100644
--- a/package/inc/ZipOutputEntry.hxx
+++ b/package/inc/ZipOutputEntry.hxx
@@ -63,8 +63,8 @@ public:
 
 protected:
 ZipOutputEntryBase(
-const css::uno::Reference< css::io::XOutputStream >& rxOutStream,
-const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+css::uno::Reference< css::io::XOutputStream > xOutStream,
+css::uno::Reference< css::uno::XComponentContext > xContext,
 ZipEntry& rEntry, ZipPackageStream* pStream, bool bEncrypt, bool 
checkStream);
 
 // Inherited classes call this with deflated data buffer.
diff --git a/package/inc/ZipPackage.hxx b/package/inc/ZipPackage.hxx
index e6cf614ad503..a4eeed261d1e 100644
--- a/package/inc/ZipPackage.hxx
+++ b/package/inc/ZipPackage.hxx
@@ -117,7 +117,7 @@ class ZipPackage final : public cppu::WeakImplHelper
 const css::uno::Reference< css::io::XInputStream >& xTempStream );
 
 public:
-ZipPackage( const css::uno::Reference < css::uno::XComponentContext > 
&xContext );
+ZipPackage( css::uno::Reference < css::uno::XComponentContext > xContext );
 virtual ~ZipPackage() override;
 ZipFile& getZipFile() { return *m_pZipFile;}
 sal_Int32 getFormat() const { return m_nFormat; }
diff --git a/package/source/manifest/ManifestImport.hxx 
b/package/source/manifest/ManifestImport.hxx
index 0240146395a8..fd86e02e4f5a 100644
--- a/packa

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

2022-06-23 Thread Stephan Bergmann (via logerrit)
 vcl/win/window/salframe.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5bb5763e2f208cddd114fe96466bdfa2ed3bdbf3
Author: Stephan Bergmann 
AuthorDate: Thu Jun 23 13:45:29 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jun 23 18:18:22 2022 +0200

Silence another unhelpful loplugin:redundantfcast

...after 37ec4442d70339dc8ec5fb8e4ec8984420b6e14d "o3tl: ensure that the
initializer of enumarray contains enough elements", in Windows-only code

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

diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index fac5bbfac242..9306d35d77fe 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -2024,6 +2024,7 @@ void WinSalFrame::SetPointer( PointerStyle ePointerStyle )
 
 static o3tl::enumarray aImplPtrTab =
 {
+// [-loplugin:redundantfcast]:
 ImplPtrData{ nullptr, IDC_ARROW, 0 },   // 
POINTER_ARROW
 ImplPtrData{ nullptr, nullptr, SAL_RESID_POINTER_NULL },// POINTER_NULL
 ImplPtrData{ nullptr, IDC_WAIT, 0 },// POINTER_WAIT


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

2022-06-23 Thread Caolán McNamara (via logerrit)
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   29 +-
 1 file changed, 18 insertions(+), 11 deletions(-)

New commits:
commit 05cd9a73542f0865639711e808771385ca835e66
Author: Caolán McNamara 
AuthorDate: Thu Jun 23 14:35:35 2022 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 23 18:16:41 2022 +0200

crashtesting: assert on loading forum-mso-en-11942.docx

with getToken index past end

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

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 30f07b351ca5..9ce28108c9ce 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -6743,19 +6743,26 @@ void DomainMapper_Impl::CloseFieldCommand()
 break;
 case FIELD_MACROBUTTON:
 {
-//extract macro name
-sal_Int32 nIndex = sizeof(" MACROBUTTON ");
-OUString sMacro = pContext->GetCommand().getToken( 0, ' ', 
nIndex);
 if (xFieldProperties.is())
-xFieldProperties->setPropertyValue(
-getPropertyName(PROP_MACRO_NAME), uno::Any( 
sMacro ));
-
-//extract quick help text
-if(xFieldProperties.is() && 
pContext->GetCommand().getLength() > nIndex + 1)
 {
-xFieldProperties->setPropertyValue(
-getPropertyName(PROP_HINT),
-uno::Any( pContext->GetCommand().copy( nIndex )));
+sal_Int32 nIndex = sizeof(" MACROBUTTON ");
+OUString sCommand = pContext->GetCommand();
+
+//extract macro name
+if (sCommand.getLength() >= nIndex)
+{
+OUString sMacro = sCommand.getToken(0, ' ', 
nIndex);
+xFieldProperties->setPropertyValue(
+getPropertyName(PROP_MACRO_NAME), 
uno::Any( sMacro ));
+}
+
+//extract quick help text
+if (sCommand.getLength() > nIndex + 1)
+{
+xFieldProperties->setPropertyValue(
+getPropertyName(PROP_HINT),
+uno::Any( sCommand.copy( nIndex )));
+}
 }
 }
 break;


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

2022-06-23 Thread Armin Le Grand (Allotropia) (via logerrit)
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |   28 +++
 1 file changed, 28 insertions(+)

New commits:
commit a564dcff859e817015a87825cea3ad29b2d370ba
Author: Armin Le Grand (Allotropia) 
AuthorDate: Thu Jun 23 11:47:03 2022 +0200
Commit: Armin Le Grand 
CommitDate: Thu Jun 23 17:45:12 2022 +0200

tdf#149650 avoid potential recursion with SdrPage content hierarchy

Change-Id: I27e064eeedfb45a2fe96892f1d31da94b9976c50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136303
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx 
b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index f05c0c92f2d9..04b6a16163a4 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -60,6 +60,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace com::sun::star;
 
@@ -330,8 +331,35 @@ void SlideBackgroundFillPrimitive2D::get2DDecomposition(
 const_cast< SlideBackgroundFillPrimitive2D* >(this)->mpLastVC = 
pViewContact;
 }
 
+// tdf#149650 allow remember/detect of potential recursion for content 
creation.
+// use a std::set association - instead of a single bool or adress - due 
to the
+// possibility of multiple SlideBackgroundFillPrimitive2D's being used at 
the same
+// refresh. Also possible would be a local member (bool), but that just 
makes the
+// class more complicated. Working wth the adress is not a problem here 
since below
+// it reliably gets added/removed while being incarnated only.
+static std::set 
potentiallyActiveRecursion;
+
+if(potentiallyActiveRecursion.end() != 
potentiallyActiveRecursion.find(this))
+{
+// The method getPrimitive2DSequenceSubHierarchy used in 
create2DDecomposition
+// above has the potential to create a recursion, e.g. when the 
content of a page
+// contains a SdrPageObj that again displays the page content (and 
potentially so
+// on).
+// This is valid, but works like a fractal, showing page content
+// smaller and smaller inside a page. This needs to be controlled here 
to avoid
+// the recursion. In this case just allow one single step since
+// we are mainly interested in the page's BG fill anyways
+return;
+}
+
+// remember that we enter a potential recursion
+potentiallyActiveRecursion.insert(this);
+
 // use parent implementation
 BufferedDecompositionPrimitive2D::get2DDecomposition(rVisitor, 
rViewInformation);
+
+// forget about potential recursion
+potentiallyActiveRecursion.extract(this);
 }
 
 bool SlideBackgroundFillPrimitive2D::operator==(const BasePrimitive2D& 
rPrimitive) const


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

2022-06-23 Thread Tünde Tóth (via logerrit)
 cui/source/options/optsave.cxx   |   16 +---
 include/svtools/restartdialog.hxx|3 +++
 svtools/source/dialogs/restartdialog.cxx |3 +++
 svtools/uiconfig/ui/restartdialog.ui |   19 +--
 4 files changed, 36 insertions(+), 5 deletions(-)

New commits:
commit 18cc891483fef63ad168273658a30bff72b87a95
Author: Tünde Tóth 
AuthorDate: Tue May 31 16:11:03 2022 +0200
Commit: László Németh 
CommitDate: Thu Jun 23 17:07:00 2022 +0200

tdf#149401 show "Restart LibreOffice" dialog changing AutoRecovery

Changing "Save Autorecovery... information every ... minutes"
option in Tools->Options...->Load/Save->General shows that
dialog window to warn about its work.

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

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 717fa623a668..43468715cd3a 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include "optsave.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -37,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -225,7 +227,7 @@ void SvxSaveTabPage::DetectHiddenControls()
 bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 {
 auto xChanges = comphelper::ConfigurationChanges::create();
-bool bModified = false;
+bool bModified = false, bRequestRestart = false;
 if(m_xLoadUserSettingsCB->get_state_changed_from_saved())
 
officecfg::Office::Common::Load::UserDefinedSettings::set(m_xLoadUserSettingsCB->get_active(),
 xChanges);
 
@@ -255,7 +257,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 {
 rSet->Put( SfxBoolItem( SID_ATTR_AUTOSAVE,
m_xAutoSaveCB->get_active() ) );
-bModified = true;
+bModified = bRequestRestart = true;
 }
 if ( m_xWarnAlienFormatCB->get_state_changed_from_saved() )
 {
@@ -268,7 +270,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 {
 rSet->Put( SfxUInt16Item( SID_ATTR_AUTOSAVEMINUTE,
  
static_cast(m_xAutoSaveEdit->get_value()) ) );
-bModified = true;
+bModified = bRequestRestart = true;
 }
 
 if ( m_xUserAutoSaveCB->get_state_changed_from_saved() )
@@ -322,6 +324,14 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 
aModuleOpt.SetFactoryDefaultFilter(SvtModuleOptions::EFactory::WRITERGLOBAL, 
pImpl->aDefaultArr[APP_WRITER_GLOBAL]);
 
 xChanges->commit();
+
+if (bRequestRestart)
+{
+OfaTreeOptionsDialog* 
pParentDlg(static_cast(GetDialogController()));
+if (pParentDlg)
+pParentDlg->SetNeedsRestart(svtools::RESTART_REASON_SAVE);
+}
+
 return bModified;
 }
 
diff --git a/include/svtools/restartdialog.hxx 
b/include/svtools/restartdialog.hxx
index 95ca3ef4356d..001f322772a5 100644
--- a/include/svtools/restartdialog.hxx
+++ b/include/svtools/restartdialog.hxx
@@ -65,6 +65,9 @@ enum RestartReason {
 // For restructuring the Form menu,
 // %PRODUCTNAME must be restarted:
 RESTART_REASON_MSCOMPATIBLE_FORMS_MENU,
+// For the modified save settings to take effect,
+// %PRODUCTNAME must be restarted:
+RESTART_REASON_SAVE,
 // To apply changes, %PRODUCTNAME,
 // %PRODUCTNAME must be restarted:
 RESTART_REASON_UI_CHANGE,
diff --git a/svtools/source/dialogs/restartdialog.cxx 
b/svtools/source/dialogs/restartdialog.cxx
index ba5c7d2a3304..30954f17638b 100644
--- a/svtools/source/dialogs/restartdialog.cxx
+++ b/svtools/source/dialogs/restartdialog.cxx
@@ -71,6 +71,9 @@ public:
 case svtools::RESTART_REASON_MSCOMPATIBLE_FORMS_MENU:
 reason_ = m_xBuilder->weld_widget("reason_mscompatible_formsmenu");
 break;
+case svtools::RESTART_REASON_SAVE:
+reason_ = m_xBuilder->weld_widget("reason_save");
+break;
 case svtools::RESTART_REASON_UI_CHANGE:
 reason_ = m_xBuilder->weld_widget("reason_uichange");
 break;
diff --git a/svtools/uiconfig/ui/restartdialog.ui 
b/svtools/uiconfig/ui/restartdialog.ui
index c49218c03bc8..9772c1659ad7 100644
--- a/svtools/uiconfig/ui/restartdialog.ui
+++ b/svtools/uiconfig/ui/restartdialog.ui
@@ -273,6 +273,21 @@
 13
   
 
+
+  
+False
+True
+For the modified save settings to take 
effect, %PRODUCTNAME must be restarted.
+True
+50
+0
+  
+  
+False
+True
+14
+  
+
 
   
 True
@@ -284,7 +299,7 @@
   
  

ESC meeting minutes: 2022-06-23

2022-06-23 Thread Stephan Bergmann

* Present:
+ Ilmari, Hossein, Thorsten, Xisco, Stephan, Eike, Heiko, Michael 
S., Cloph, Lubos,

  Caolan, anonymous guest, Tomaz

* Completed Action Items:
+ ask Italo what version the marketing wants for 7.5 vs 8.0 (Xisco)
  + no real feature/change that would warrant a bump (italo)

 + for 7.6 / version after the next the plan is to change the 
build-baseline, so that might be enough reason to switch to 8.0 (cloph)



* Pending Action Items:

* Release Engineering update (Cloph)
+ 7.4 status: rc1 in 2 weeks; UI and string freeze
+ 7.3 status: 7.3.5 rc1 in 1 week
+ app store: builds in verification state in the Apple/MS stores

* Documentation (Olivier, missing)
+ Bugzilla Documentation statistics
245(245) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created 19(9) 48(0)123(3)  330(5)
 commented 41(35)   150(11)   303(11)1497(29)
  resolved  6(6) 14(6) 61(4)  204(5)
+ top 10 contributors:
  Seth Chaiklin made 110 changes in 1 month, and 310 changes in 
1 year
  Olivier Hallot made 35 changes in 1 month, and 469 changes in 
1 year
  Heiko Tietze made 22 changes in 1 month, and 112 changes in 1 
year

  Timur made 22 changes in 1 month, and 22 changes in 1 year
  Rathke, Eike made 11 changes in 1 month, and 32 changes in 1 year
  Kaganski, Mike made 11 changes in 1 month, and 93 changes in 
1 year

  Rafael Lima made 8 changes in 1 month, and 312 changes in 1 year
  Dieter made 6 changes in 1 month, and 98 changes in 1 year
  Ilmari Lauhakangas made 5 changes in 1 month, and 110 changes 
in 1 year

  Justin Luth made 5 changes in 1 month, and 7 changes in 1 year

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
273(273) (topicUI) bugs open, 71(71) (needsUXEval) needs to be 
evaluated by the UXteam

+ Updates:
BZ changes   1 week   1 month3 months   12 months
 added  4(1)  7(-1) 25(-3)  52(-3)
 commented 42(10)   205(-32)   644(-15)   2447(-67)
   removed  0(0)  0(0)  10(-2)  32(0)
  resolved  6(-2)29(-2) 76(2)  340(-4)
+ top 10 contributors:
  Heiko Tietze made 114 changes in 1 month, and 1719 changes in 
1 year

  Rafael Lima made 49 changes in 1 month, and 94 changes in 1 year
  Seth Chaiklin made 29 changes in 1 month, and 192 changes in 
1 year

  Timur made 24 changes in 1 month, and 37 changes in 1 year
  Dieter made 21 changes in 1 month, and 223 changes in 1 year
  Németh, László made 19 changes in 1 month, and 35 changes in 
1 year
  Eyal Rozenberg made 16 changes in 1 month, and 90 changes in 
1 year
  Ilmari Lauhakangas made 12 changes in 1 month, and 259 
changes in 1 year
  Henschel, Regina made 11 changes in 1 month, and 52 changes 
in 1 year

  *UNKNOWN* made 9 changes in 1 month, and 9 changes in 1 year
+ [Bug 149693] Improve Google Drive service setup
+ [Bug 149681] UI: the arrangement of setting defining position of 
a shape

  is kind of odd
+ [Bug 149682] Run Macro dialog should be able to run a macro without
   immediately closing the dialog
+ [Bug 149600] Hue band in color picker dialog doesn't react to clicks
   before picking a color
+ [Bug 149661] [Feature request] Automatic table-background-coloring
   ported from Calc to Writer.
 -> + [Bug 149635] FEATURE REQUEST: remove "after" separator in 
cross-reference

   to numbered list item
 + missing configuration in cross-references to get rid the 
"after" character

 + inner separators are always dots, eg. "Ch.1:2-3" = "1.2.3"
+ [Bug 149643] Group and Ungroup in wrong menu
+ [Bug 149597] ENHANCEMENT: Multi-color line attribute (dashed 
lines with

   alternate background color
+ [Bug 149591] WORD COMPLETION: Make it visible, if there is more than
   one option for word completion
 -> + Scale picture beyond page boundaries
  + https://bugs.documentfoundation.org/show_bug.cgi?id=149566
  + question whether scaling beyond page boundaries is possible at all

* Crash Testing (Caolan)
+ 121(-27) import failure, 53(-9) export failures
+ 5 coverity issues
- new build getting processed
+ 7 ossfuzz issues

* Crash Reporting (Xisco)
   + https://crashreport.libreoffice.org/stats/version/7.2.7.2
 + (+17) 410 396 382 314 268 167 0
   + https://crashreport.libreoffice.org/stats/version/7.3.3.2
 + (-375) 1063 1438 1797 1583 1417 1055 555 0
   + https://crashreport.libreoffice.org/stats/version/7.3.4.2
 + (+288) 963 675 0


- 7.3.4.2 report in .ods file

- 
https://lists.freedesktop.org/archives/libreoffice/2022-June/089076.html


- Some crashes already spot

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891' - 9 commits - download.lst external/curl external/nss solenv/gbuild

2022-06-23 Thread Michael Stahl (via logerrit)
 download.lst  |8 +-
 external/curl/CVE-2018-14618.patch|   34 -
 external/curl/CVE-2018-16890.patch|   30 
 external/curl/CVE-2019-3822.patch |   35 -
 external/curl/ExternalPackage_curl.mk |2 
 external/curl/ExternalProject_curl.mk |   31 ++--
 external/curl/UnpackedTarball_curl.mk |   10 +-
 external/curl/clang-cl.patch.0|   11 ++
 external/curl/curl-msvc.patch.1   |8 +-
 external/curl/zlib.patch.0|   90 
 external/nss/UnpackedTarball_nss.mk   |1 
 external/nss/nss-no-c99.patch |   44 ---
 external/nss/nss.aix.patch|2 
 external/nss/nss.patch|  125 +-
 external/nss/nss.windowbuild.patch.0  |   55 --
 solenv/gbuild/UnpackedTarball.mk  |   11 ++
 16 files changed, 190 insertions(+), 307 deletions(-)

New commits:
commit b4a3da2b8d37d609aac5f1a73ea611229b20e0b4
Author: Michael Stahl 
AuthorDate: Mon Nov 25 12:34:28 2019 +0100
Commit: Gabor Kelemen 
CommitDate: Sun Jun 19 10:53:27 2022 +0200

nss: upgrade to release 3.47.1

Fixes CVE-2019-11745.

Remove nss.fix-freebl-add-lcc-support.patch.1, fixed upstream.

Reviewed-on: https://gerrit.libreoffice.org/83673
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit a6238c3fba80889f9090d997e2a4979b78b34ac7)

Change-Id: I72e35c90fabb0a83f547a787dbaee774e35f9c08

diff --git a/download.lst b/download.lst
index f5f3fbefbecd..12fea73facdd 100644
--- a/download.lst
+++ b/download.lst
@@ -34,8 +34,8 @@ LIBEOT_MD5SUM := aa24f5dd2a2992f4a116aa72af817548
 export LIBEOT_TARBALL := libeot-0.01.tar.bz2
 LANGTAGREG_MD5SUM := 504af523f5d1a5590bbeb6a4b55e8a97
 export LANGTAGREG_TARBALL := language-subtag-registry-2014-03-27.tar.bz2
-NSS_MD5SUM := 2f7dab8f5b85b1494f6bec2cc32a1f5c
-export NSS_TARBALL := nss-3.45-with-nspr-4.21.tar.gz
+NSS_MD5SUM := 9bc54feb6f1e39c60932f668d3caab5e
+export NSS_TARBALL := nss-3.47.1-with-nspr-4.23.tar.gz
 PYTHON_MD5SUM := 803a75927f8f241ca78633890c798021
 export PYTHON_TARBALL := Python-3.3.5.tgz
 OPENSSL_MD5SUM := 44279b8557c3247cbe324e2322ecd114
diff --git a/external/nss/nss.aix.patch b/external/nss/nss.aix.patch
index da9aacb10e84..4b0c6bfb3261 100644
--- a/external/nss/nss.aix.patch
+++ b/external/nss/nss.aix.patch
@@ -38,7 +38,7 @@ diff -ru a/nspr/pr/src/Makefile.in b/nspr/pr/src/Makefile.in
 --- a/a/nspr/pr/src/Makefile.in2014-09-29 16:46:35.281395079 +0100
 +++ b/b/nspr/pr/src/Makefile.in2014-09-29 16:50:33.909375948 +0100
 @@ -74,7 +74,6 @@
- endif
+ endif # SunOS
  
  ifeq ($(OS_ARCH),AIX)
 -DSO_LDOPTS+= -binitfini::_PR_Fini
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index 62e4bc769073..a58152bb1dc5 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -12,14 +12,14 @@
 --- a/nss.orig/nspr/pr/src/misc/prnetdb.c  2017-08-29 23:44:13.690045031 
+0530
 +++ b/nss/nspr/pr/src/misc/prnetdb.c   2017-08-29 23:47:03.810814019 +0530
 @@ -438,7 +438,7 @@
-   char *buf = *bufp;
-   PRIntn buflen = *buflenp;
+ char *buf = *bufp;
+ PRIntn buflen = *buflenp;
  
--  if (align && ((long)buf & (align - 1))) {
-+  if (align && ((ptrdiff_t)buf & (align - 1))) {
-   PRIntn skip = align - ((ptrdiff_t)buf & (align - 1));
-   if (buflen < skip) {
-   return 0;
+-if (align && ((long)buf & (align - 1))) {
++if (align && ((ptrdiff_t)buf & (align - 1))) {
+ PRIntn skip = align - ((ptrdiff_t)buf & (align - 1));
+ if (buflen < skip) {
+ return 0;
 --- a/a/nss/cmd/platlibs.mk2017-08-29 23:44:13.554044416 +0530
 +++ b/b/nss/cmd/platlibs.mk2017-08-29 23:46:09.638569150 +0530
 @@ -10,17 +10,22 @@
commit 45350846d10771570ddd591adf8df2655624249a
Author: Michael Stahl 
AuthorDate: Wed Jul 10 12:20:00 2019 +0200
Commit: Gabor Kelemen 
CommitDate: Sun Jun 19 10:40:46 2022 +0200

nss: upgrade to release 3.45

Fixes CVE-2019-11729 CVE-2019-11719 CVE-2019-11727, and the less
important CVE-2018-12384 and CVE-2018-12404 from intermediate releases.

Since NSS 3.44 it's possible to build as static libraries and for iOS;
drop the nss-chromium-nss-static.patch and nss-more-static.patch and
hope that it works.

Drop one hunk from nss.patch that looks fixed upstream.

Reviewed-on: https://gerrit.libreoffice.org/75344
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 6efc8a33f69bc7f4be45b7b81f67cd74c163b99e)

Change-Id: I7f37ac36f7f8dfd49d0bfb4a6185ca49d4f618a3
Reviewed-on: https://gerrit.libreoffice.org/75410
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index 03778a89e941..f5f3fbefbecd 100644
--- a/download.lst
+++ b/download.lst
@@ -34,8 +34,8 @@ LIBEOT_MD5SUM := aa24f

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

2022-06-23 Thread Tibor Nagy (via logerrit)
 oox/inc/ooxresid.hxx   |1 
 oox/inc/strings.hrc|1 
 oox/source/helper/ooxresid.cxx |1 
 oox/source/ppt/presentationfragmenthandler.cxx |7 -
 sd/qa/unit/data/pptx/tdf149314.pptx|binary
 sd/qa/unit/import-tests.cxx|   31 +
 6 files changed, 40 insertions(+), 1 deletion(-)

New commits:
commit 4142d728f003166ebe520bfdaf672505e585b807
Author: Tibor Nagy 
AuthorDate: Wed Jun 1 16:10:42 2022 +0200
Commit: László Németh 
CommitDate: Thu Jun 23 16:20:43 2022 +0200

tdf#149314 PPTX import: fix internal hyperlink in editor

Hyperlinks on text weren't imported correctly if the linked
slides have default slide name, resulting broken links
in the editor (hyperlinks work well in slide shows without
this fix, too).

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

diff --git a/oox/inc/ooxresid.hxx b/oox/inc/ooxresid.hxx
index 473e13407ac3..c374b664525c 100644
--- a/oox/inc/ooxresid.hxx
+++ b/oox/inc/ooxresid.hxx
@@ -14,6 +14,7 @@
 #include 
 
 OUString OoxResId(TranslateId aId);
+OUString URLResId(TranslateId aId);
 
 #endif
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/oox/inc/strings.hrc b/oox/inc/strings.hrc
index c9b4f3cf7230..cd107aa36a02 100644
--- a/oox/inc/strings.hrc
+++ b/oox/inc/strings.hrc
@@ -14,5 +14,6 @@
 
 #define STR_DIAGRAM_TITLENC_("STR_DIAGRAM_TITLE", 
"Chart Title")
 #define STR_DIAGRAM_AXISTITLENC_("STR_DIAGRAM_AXISTITLE", 
"Axis Title")
+#define STR_SLIDE_NAME   NC_("STR_SLIDE_NAME", "Slide" 
)
 #endif
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/oox/source/helper/ooxresid.cxx b/oox/source/helper/ooxresid.cxx
index 58e0e8cb33e0..6ad02a70b056 100644
--- a/oox/source/helper/ooxresid.cxx
+++ b/oox/source/helper/ooxresid.cxx
@@ -12,5 +12,6 @@
 #include 
 
 OUString OoxResId(TranslateId aId) { return Translate::get(aId, 
Translate::Create("oox")); }
+OUString URLResId(TranslateId aId) { return Translate::get(aId, 
Translate::Create("sd")); }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx 
b/oox/source/ppt/presentationfragmenthandler.cxx
index 43b7f105a1c4..ac1e32e533ec 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -60,6 +60,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::oox::core;
@@ -197,7 +199,10 @@ static void ResolveTextFields( XmlFilterBase const & 
rFilter )
 xDrawPage = xPresentationPage->getNotesPage();
 }
 Reference< container::XNamed > xNamed( xDrawPage, 
UNO_QUERY_THROW );
-aURL = "#" + xNamed->getName();
+if (!xNamed->getName().startsWith("page"))
+aURL = "#" + xNamed->getName();
+else
+aURL = "#" + URLResId(STR_SLIDE_NAME) + " " + 
OUString::number(nPageNumber);
 xPropSet->setPropertyValue( sURL, Any( aURL ) );
 Reference< text::XTextContent > xContent( 
rTextField.xTextField);
 Reference< text::XTextRange > xTextRange = 
rTextField.xTextCursor;
diff --git a/sd/qa/unit/data/pptx/tdf149314.pptx 
b/sd/qa/unit/data/pptx/tdf149314.pptx
new file mode 100644
index ..3138c1ddaf78
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf149314.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index aa329dfddec6..68161536da93 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -83,6 +83,7 @@ public:
 virtual void setUp() override;
 
 void testDocumentLayout();
+void testTdf149314();
 void testTdf149124();
 void testTdf148965();
 void testTdf89449();
@@ -153,6 +154,7 @@ public:
 CPPUNIT_TEST_SUITE(SdImportTest);
 
 CPPUNIT_TEST(testDocumentLayout);
+CPPUNIT_TEST(testTdf149314);
 CPPUNIT_TEST(testTdf149124);
 CPPUNIT_TEST(testTdf148965);
 CPPUNIT_TEST(testTdf89449);
@@ -301,6 +303,35 @@ void SdImportTest::testDocumentLayout()
 }
 }
 
+void SdImportTest::testTdf149314()
+{
+sd::DrawDocShellRef xDocShRef
+= 
loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf149314.pptx"), 
PPTX);
+
+OUString aURL;
+uno::Reference xShape(getShapeFromPage(0, 1, 
xDocShRef));
+
+uno::Reference const 
xParagraph1(getParagraphFromShape(0, xShape));
+uno::Reference xRun1(ge

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

2022-06-23 Thread Caolán McNamara (via logerrit)
 sc/source/core/tool/interpr1.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 05299b4205fa0960c3b2ed55a8c4963ee76238be
Author: Caolán McNamara 
AuthorDate: Wed Jun 22 19:56:15 2022 +0100
Commit: Eike Rathke 
CommitDate: Thu Jun 23 16:14:12 2022 +0200

crashtesting: assert in rtl_uString_iterateCodePoints with 
forum-en-32401.ods

probably since:

commit 78b7e5f76e72647e0cab662ad2c9342d4538704f
Date:   Thu Nov 23 18:21:19 2017 +0100

tdf#97198 Make Calc function SEARCH work with UniCode non-BMP 
characters.

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

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 13745246a8b2..dbffd939d53d 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -9046,12 +9046,12 @@ void ScInterpreter::ScFind()
 {
 sal_Int32 nIdx = 0;
 nCnt = 0;
-while ( nIdx <= nPos )
+while ( nIdx < nPos )
 {
 sStr.iterateCodePoints( &nIdx );
 ++nCnt;
 }
-PushDouble( static_cast(nCnt) );
+PushDouble( static_cast(nCnt + 1) );
 }
 }
 }
@@ -9445,12 +9445,12 @@ void ScInterpreter::ScSearch()
 {
 sal_Int32 nIdx = 0;
 sal_Int32 nCnt = 0;
-while ( nIdx <= nPos )
+while ( nIdx < nPos )
 {
 sStr.iterateCodePoints( &nIdx );
 ++nCnt;
 }
-PushDouble( static_cast(nCnt) );
+PushDouble( static_cast(nCnt + 1) );
 }
 }
 }


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

2022-06-23 Thread Tibor Nagy (via logerrit)
 oox/source/export/shapes.cxx   |3 -
 sd/qa/unit/data/odp/tdf149126.odp  |binary
 sd/qa/unit/data/xml/tdf92001_0.xml |   32 +++-
 sd/qa/unit/export-tests-ooxml2.cxx |   59 -
 4 files changed, 51 insertions(+), 43 deletions(-)

New commits:
commit db39e5359d7f9b4e42c6101dd75bc5e8d809ad41
Author: Tibor Nagy 
AuthorDate: Fri Jun 3 15:32:50 2022 +0200
Commit: László Németh 
CommitDate: Thu Jun 23 16:02:58 2022 +0200

tdf#149126 fix export of PPTX preset shapes

Follow-up to commit 63cd67e5e18f01aca303131e148c80398a181a41
"tdf#92525 tdf#142398: fix export of simple custom shapes" and
commit 744e6c0b758fefe6011f09860b44f03ab70fbcfe
"tdf#147459 PPTX: add "glue points" to some basic shapes".

Thanks to Regina Henschel for the code pointer.

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

diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 305bc2e78f53..79691c338985 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -926,8 +926,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const 
Reference< XShape >& xShape )
 bool bPresetWriteSuccessful = false;
 // Let the custom shapes what has name and preset information in OOXML, to 
be written
 // as preset ones with parameters. Try that with this converter class.
-if (!sShapeType.startsWith("ooxml") && sShapeType != "non-primitive"
-&& GetDocumentType() == DOCUMENT_DOCX && !mbUserShapes
+if (!sShapeType.startsWith("ooxml") && sShapeType != "non-primitive" && 
!mbUserShapes
 && xShape->getShapeType() == "com.sun.star.drawing.CustomShape"
 && !lcl_IsOnAllowlist(sShapeType))
 {
diff --git a/sd/qa/unit/data/odp/tdf149126.odp 
b/sd/qa/unit/data/odp/tdf149126.odp
new file mode 100644
index ..1d9c3c8c2318
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf149126.odp differ
diff --git a/sd/qa/unit/data/xml/tdf92001_0.xml 
b/sd/qa/unit/data/xml/tdf92001_0.xml
index 1bacf2f2559c..08d9622583d3 100644
--- a/sd/qa/unit/data/xml/tdf92001_0.xml
+++ b/sd/qa/unit/data/xml/tdf92001_0.xml
@@ -15,7 +15,10 @@
   
   

-
+
+ 
+ 
+



@@ -27,31 +30,31 @@
   

 
-
+


-
-
+
+


-
+
 


-
-
+
+


-
-
+
+


-
-
+
+


 
-
+

   
  
@@ -63,11 +66,12 @@

   
  
- 
  
 

-   
+   
+   
+   

 

diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index b9c1f437c64c..0029f882463b 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -70,6 +70,7 @@ static void assertMotionPath(std::u16string_view rStr1, 
std::u16string_view rStr
 class SdOOXMLExportTest2 : public SdModelTestBaseXML
 {
 public:
+void testTdf149126();
 void testTdf131905();
 void testTdf93883();
 void testTdf91378();
@@ -137,6 +138,7 @@ public:
 
 CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
 
+CPPUNIT_TEST(testTdf149126);
 CPPUNIT_TEST(testTdf131905);
 CPPUNIT_TEST(testTdf93883);
 CPPUNIT_TEST(testTdf91378);
@@ -210,6 +212,20 @@ public:
 }
 };
 
+void SdOOXMLExportTest2::testTdf149126()
+{
+::sd::DrawDocShellRef xDocShRef
+= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf149126.odp"), 
ODP);
+utl::TempFile tempFile;
+xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+
+xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, 
"ppt/slides/slide1.xml");
+assertXPath(pXmlDocContent, 
"/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom", "prst",
+"triangle");
+
+xDocShRef->DoClose();
+}
+
 void SdOOXMLExportTest2::testTdf131905()
 {
 ::sd::DrawDocShellRef xDocShRef
@@ -661,7 +677,7 @@ void SdOOXMLExportTest2::testPresetShapesExport()
 "donut",
 "adj","val 9601",
 "bevel",
-"adj","val 42587",
+"adj","val 42592",
 "foldedCorner",
 "adj","val 10750",
 "verticalScroll",
@@ -692,9 +708,9 @@ void SdOOXMLExportTest2::testPresetShapesExport()
 "adj5","val -22375",
 "adj6","val -134550",
 "blockArc",
-"adj1","val 1302",
-"adj2","val 1938",
-"adj3","val 3773",
+"adj1","val 12975429",
+"adj2","val 19424571",
+"adj3","val 3770",
 };
 
 utl::TempFile tempFile;
@@ -720,9 +736,8 @@ void SdOOXMLExportTest2::testPresetShapesExport()
 
 void SdOOXMLExportTest2::testTdf92527()
 {
-// We

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

2022-06-23 Thread Samuel Mehrbrodt (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8052708c2269b010c47f1b017e13467712ddb55b
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jun 23 15:52:30 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Thu Jun 23 15:52:30 2022 +0200

Update git submodules

* Update translations from branch 'distro/cib/libreoffice-6-4'
  to 91b93f03789db5b9802c3249cd609d08bd39615a
  - Add translation for 4ec2c9816b8f4012bb7a760a85a46d8a1e530089

Change-Id: Ib54eb5ada8122662e0f58e9a706c20fb4b2aa202

  - Add translation for b17a6f6b083e56b23a3a4e3e647c512f4044154a

Change-Id: I205206d9c27478378cc8d2576259ffe50cd8860c

diff --git a/translations b/translations
index e7299888f4e7..91b93f03789d 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit e7299888f4e78d879a603685118e321a5a9ce8a7
+Subproject commit 91b93f03789db5b9802c3249cd609d08bd39615a


[Libreoffice-commits] translations.git: Branch 'distro/cib/libreoffice-6-4' - 2 commits - source/de

2022-06-23 Thread Samuel Mehrbrodt (via logerrit)
 source/de/sw/messages.po |   14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 91b93f03789db5b9802c3249cd609d08bd39615a
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jun 23 13:16:26 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jun 23 15:52:06 2022 +0200

Add translation for 4ec2c9816b8f4012bb7a760a85a46d8a1e530089

Change-Id: Ib54eb5ada8122662e0f58e9a706c20fb4b2aa202

diff --git a/source/de/sw/messages.po b/source/de/sw/messages.po
index c5e78403540..bf204ef5198 100644
--- a/source/de/sw/messages.po
+++ b/source/de/sw/messages.po
@@ -16314,8 +16314,8 @@ msgstr "Ge_schützten Zeichen"
 #. SAtNj
 #: sw/uiconfig/swriter/ui/optformataidspage.ui:104
 msgctxt "optformataidspage|tabs"
-msgid "Ta_bs"
-msgstr "_Tabulatoren"
+msgid "Tabs"
+msgstr "Tabulatoren"
 
 #. rBxLK
 #: sw/uiconfig/swriter/ui/optformataidspage.ui:119
@@ -16335,6 +16335,10 @@ msgctxt "optformataidspage|displayfl"
 msgid "Display formatting"
 msgstr "Formatierung anzeigen"
 
+msgctxt "optformataidspage|bookmarks"
+msgid "Bookmarks"
+msgstr "Lesezeichen"
+
 msgctxt "optformataidspage|bookmarks_label|tooltip_text"
 msgid "| indicates a point bookmark
 [ ] indicate the start and end of a bookmark on a text range"
commit 28860653e5fd27d33011f8e32fd7b348657c8d57
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jun 23 13:14:02 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jun 23 15:51:55 2022 +0200

Add translation for b17a6f6b083e56b23a3a4e3e647c512f4044154a

Change-Id: I205206d9c27478378cc8d2576259ffe50cd8860c

diff --git a/source/de/sw/messages.po b/source/de/sw/messages.po
index c14e877c68a..c5e78403540 100644
--- a/source/de/sw/messages.po
+++ b/source/de/sw/messages.po
@@ -16335,6 +16335,12 @@ msgctxt "optformataidspage|displayfl"
 msgid "Display formatting"
 msgstr "Formatierung anzeigen"
 
+msgctxt "optformataidspage|bookmarks_label|tooltip_text"
+msgid "| indicates a point bookmark
+[ ] indicate the start and end of a bookmark on a text range"
+msgstr "| kennzeichnet ein Punkt-Lesezeichen
+[ ] kennzeichnet den Beginn und das Ende eines Lesezeichens in einem 
Textbereich"
+
 #. ufN3R
 #: sw/uiconfig/swriter/ui/optformataidspage.ui:248
 msgctxt "optformataidspage|mathbaseline"


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

2022-06-23 Thread Attila Szűcs (via logerrit)
 sc/source/ui/view/viewdata.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 12fd3f7ba73d2fd03b88513160545fab8edc8a20
Author: Attila Szűcs 
AuthorDate: Tue Jun 21 15:27:35 2022 +0200
Commit: László Németh 
CommitDate: Thu Jun 23 15:43:00 2022 +0200

tdf#149574 sc: fix missing nullptr check

Regression from commit 605b4ba57b2daa447af9d43d3759079e15df8148
"tdf#43958 sc: fix fill by selecting merged cell".

Check if GetPattern(actual cell) is not nullptr, before using it.
This is not the real problem of Bug 149574, but it is a problem
anyway, and it fixes this bug. The real problem is the wrong
ViewData::nTabNo, that point to an already deleted table,
(fixed in 954d119db932434dc976ef739c643be0d9c7023c
"tdf#149502 sc: crash fix: Change in Table destruction").

Co-authored-by: Tibor Nagy (NISZ)

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

diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 88d57f106a3b..69ebe09d22d4 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1155,7 +1155,7 @@ ScMarkType ScViewData::GetSimpleArea( ScRange & rRange, 
ScMarkData & rNewMark )
 if (eMarkType == SC_MARK_NONE)
 eMarkType = SC_MARK_SIMPLE;
 const ScPatternAttr* pMarkPattern = mrDoc.GetPattern(GetCurX(), 
GetCurY(), GetTabNo());
-if (pMarkPattern->GetItemSet().GetItemState(ATTR_MERGE, false) == 
SfxItemState::SET)
+if (pMarkPattern && 
pMarkPattern->GetItemSet().GetItemState(ATTR_MERGE, false) == SfxItemState::SET)
 {
 SCROW nRow = pMarkPattern->GetItem(ATTR_MERGE).GetRowMerge();
 SCCOL nCol = pMarkPattern->GetItem(ATTR_MERGE).GetColMerge();


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - helpcontent2

2022-06-23 Thread Christian Lohmaier (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 696ffe98419131cb110f6402ec8469cd29454344
Author: Christian Lohmaier 
AuthorDate: Thu Jun 23 15:37:47 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Thu Jun 23 15:37:47 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'libreoffice-7-4'
  to ea2cf3377aa00f5b6b48ceb00252ea135acdd95c
  - make generated help files deterministic/reproducible

generate-id() is only stable within a single invocation, the results
vary from run to run, causing two builds of the same codebase result in
different output.
Due to help including snippets from different files, a simple count
won't be unique enough, but combining it with the sourcefile's topic-ID
does the trick.

Change-Id: I2ab8988bc34c9136fcd99d074cf0b189a8f40eb7
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136197
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit b48ace599e8c109c4090c178823c6718f78103da)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136248
Reviewed-by: Caolán McNamara 

diff --git a/helpcontent2 b/helpcontent2
index 98083915835f..ea2cf3377aa0 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 98083915835fafdea99aec70c624b91c1a204b38
+Subproject commit ea2cf3377aa00f5b6b48ceb00252ea135acdd95c


[Libreoffice-commits] help.git: Branch 'libreoffice-7-4' - help3xsl/online_transform.xsl

2022-06-23 Thread Christian Lohmaier (via logerrit)
 help3xsl/online_transform.xsl |   73 +++---
 1 file changed, 41 insertions(+), 32 deletions(-)

New commits:
commit ea2cf3377aa00f5b6b48ceb00252ea135acdd95c
Author: Christian Lohmaier 
AuthorDate: Mon Jun 20 21:36:02 2022 +0200
Commit: Caolán McNamara 
CommitDate: Thu Jun 23 15:37:45 2022 +0200

make generated help files deterministic/reproducible

generate-id() is only stable within a single invocation, the results
vary from run to run, causing two builds of the same codebase result in
different output.
Due to help including snippets from different files, a simple count
won't be unique enough, but combining it with the sourcefile's topic-ID
does the trick.

Change-Id: I2ab8988bc34c9136fcd99d074cf0b189a8f40eb7
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136197
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit b48ace599e8c109c4090c178823c6718f78103da)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/136248
Reviewed-by: Caolán McNamara 

diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index efce9b608..3d6ba7387 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -659,16 +659,17 @@
 
 
 
+
+
+
 
 
-
-
+
 
 
 
 
-
-
+
 
 
 
@@ -678,16 +679,17 @@
 
 
 
+
+
+
 
 
-
-
+
 
 
 
 
-
-
+
 
 
 
@@ -699,16 +701,17 @@
 
 
 
+
+
+
 
 
-
-
+
 
 
 
 
-
-
+
 
 
 
@@ -718,16 +721,17 @@
 
 
 
+
+
+
 
 
-
-
+
 
 
 
 
-
-
+
 
 
 
@@ -1101,13 +1105,15 @@
 
 
 
-
+
+
+
 
 
-
+
 
 
-
+
 
 
 
@@ -1115,26 +1121,27 @@
 
 
 
+
+
+
 
 
-
 
 
-
+
 
 
-
+
 
 
 
 
-
 
 
-
+
 
 
-
+
 
 
 
@@ -1270,6 +1277,9 @@
 
 
 
+
+
+
 
 
 
@@ -1282,7 +1292,6 @@
 
 
 
-
 
 
 
@@ -1310,7 +1319,7 @@
 
 
 
-
+
 
 
 
@@ -1321,7 +1330,7 @@
 
 
 
-
+
 
 
 
@@ -1332,7 +1341,7 @@
 
 
 
-
+
 
 
 
@@ -1343,7 +1352,7 @@
 
 
 
-
+
 
 
 
@@ -1354,7 +1363,7 @@
 
 
 
-
+
 
 
 
@@ -1365,7 +1374,7 @@
 
 
 
-
+
 
 
 


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

2022-06-23 Thread Attila Szűcs (via logerrit)
 sc/qa/unit/uicalc/data/tdf149502_HangOnDeletingSheet1.ods |binary
 sc/qa/unit/uicalc/uicalc.cxx  |   17 ++
 sc/source/core/data/document.cxx  |7 +
 3 files changed, 24 insertions(+)

New commits:
commit 954d119db932434dc976ef739c643be0d9c7023c
Author: Attila Szűcs 
AuthorDate: Wed Jun 22 14:43:04 2022 +0200
Commit: László Németh 
CommitDate: Thu Jun 23 15:34:02 2022 +0200

tdf#149502 sc: crash fix: Change in Table destruction

Postpone ScTable destruction a bit, when ScTable::nTab is synchronized
with ScDocument::maTabs[] to avoid crashing.

Before the fix random crashing occurred if the ScTable::nTab was
already updated when ~ScTable() called, but the ScDocument::maTabs[]
was not reordered yet, so nTab could have pointed to the actually
deleted table in mTabs[].

Co-authored-by: Tibor Nagy (NISZ)

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

diff --git a/sc/qa/unit/uicalc/data/tdf149502_HangOnDeletingSheet1.ods 
b/sc/qa/unit/uicalc/data/tdf149502_HangOnDeletingSheet1.ods
new file mode 100644
index ..e34a75c32308
Binary files /dev/null and 
b/sc/qa/unit/uicalc/data/tdf149502_HangOnDeletingSheet1.ods differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index a6f648ce9766..2e48f42f2e73 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -1512,6 +1512,23 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf86166)
 CPPUNIT_ASSERT_EQUAL(static_cast(1), pDoc->GetTableCount());
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf149502_HangOnDeletingSheet1)
+{
+ScModelObj* pModelObj = createDoc("tdf149502_HangOnDeletingSheet1.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+
+CPPUNIT_ASSERT_EQUAL(static_cast(4), pDoc->GetTableCount());
+
+uno::Sequence aArgs(
+comphelper::InitPropertySequence({ { "Index", uno::Any(sal_uInt16(0)) 
} }));
+
+// Before the fix in place, this test frozen here
+dispatchCommand(mxComponent, ".uno:Remove", aArgs);
+
+CPPUNIT_ASSERT_EQUAL(static_cast(3), pDoc->GetTableCount());
+}
+
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf149503)
 {
 ScModelObj* pModelObj = createDoc("tdf149503.xls");
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 15f44a1ef4d5..db6500e5b390 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -727,7 +727,14 @@ bool ScDocument::DeleteTab( SCTAB nTab )
 if (pTab)
 pTab->UpdateDeleteTab(aCxt);
 
+// tdf#149502 make sure ScTable destructor called after the 
erase is finished, when
+// maTabs[x].nTab==x is true again, as it should be always 
true.
+// In the end of maTabs.erase, maTabs indexes change, but nTab 
updated before erase.
+// ~ScTable expect that maTabs[x].nTab==x so it shouldn't be 
called during erase.
+ScTableUniquePtr pErasedTab = std::move(maTabs[nTab]);
 maTabs.erase(maTabs.begin() + nTab);
+delete pErasedTab.release();
+
 // UpdateBroadcastAreas must be called between UpdateDeleteTab,
 // which ends listening, and StartAllListeners, to not modify
 // areas that are to be inserted by starting listeners.


[Libreoffice-commits] core.git: external/pdfium

2022-06-23 Thread Stephan Bergmann (via logerrit)
 external/pdfium/UnpackedTarball_pdfium.mk |2 ++
 external/pdfium/abseil-trivial.patch  |   27 +++
 2 files changed, 29 insertions(+)

New commits:
commit a2fad16357309f1eba4346dc826bc5ad7012b1aa
Author: Stephan Bergmann 
AuthorDate: Thu Jun 23 13:48:24 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jun 23 15:27:13 2022 +0200

external/pdfium: Adapt bundled abseil-cpp to Clang 15 trunk change


...
"[clang] Fix trivially copyable for copy constructor and copy assignment
operator", which caused my build on Windows with clang-cl against the MSVC
standard library to fail with

> In file included from 
workdir/UnpackedTarball/pdfium/core/fxge/win32/cgdi_plus_ext.cpp:19:
> In file included from 
workdir/UnpackedTarball/pdfium\core/fxcrt/fx_string.h:14:
> In file included from 
workdir/UnpackedTarball/pdfium\core/fxcrt/bytestring.h:23:
> In file included from 
workdir/UnpackedTarball/pdfium\core/fxcrt/string_view_template.h:18:
> In file included from 
workdir/UnpackedTarball/pdfium\third_party/abseil-cpp/absl/types/optional.h:39:
> In file included from 
workdir/UnpackedTarball/pdfium/third_party/abseil-cpp\absl/utility/utility.h:51:
> 
workdir/UnpackedTarball/pdfium/third_party/abseil-cpp\absl/meta/type_traits.h(501,3):
 error: static_assert failed due to requirement 'compliant || 
std::is_trivially_copy_assignable>::value' "Not compliant with std::is_trivially_copy_assignable; Standard: 
false, Implementation: true"
>   static_assert(compliant || std::is_trivially_copy_assignable::value,
>   ^ 
> 
workdir/UnpackedTarball/pdfium/third_party/abseil-cpp\absl/types/internal/optional.h(175,21):
 note: in instantiation of template class 
'absl::is_trivially_copy_assignable>' requested here
>   absl::is_trivially_copy_assignable ^
> 
workdir/UnpackedTarball/pdfium\third_party/abseil-cpp/absl/types/optional.h(119,45):
 note: in instantiation of default argument for 
'optional_data>' required here
> class optional : private optional_internal::optional_data,
> ^~~~
> workdir/UnpackedTarball/pdfium/core/fxge/win32/cgdi_plus_ext.cpp(384,43): 
note: in instantiation of template class 'absl::optional>' requested here
> absl::optional> IsSmallTriangle(
>   ^

because the behavior of Clang's built-in __has_trivial_assign no longer 
matches
the behavior of std::is_trivially_copy_assignable for std::pair, which in 
MSVC
happens to be implemented with a deleted copy assignment op

> pair& operator=(const volatile pair&) = delete;

in
c:/Program Files/Microsoft Visual 
Studio/2022/Community/VC/Tools/MSVC/14.32.31326/include/utility.

(See the comments starting at 
"[clang] Fix trivially copyable for copy constructor and copy assignment
operator" for further details.)

The easiest workaround appears to be to switch the implementation of
absl::is_trivially_copy_assignable from __has_trivial_assign to
std::is_trivially_copy_assignable, which should always be available in our
C++17-based toolchain baselines.

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

diff --git a/external/pdfium/UnpackedTarball_pdfium.mk 
b/external/pdfium/UnpackedTarball_pdfium.mk
index 06b94e4d064d..072d45b4767b 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -26,6 +26,8 @@ pdfium_patches += gcc-c++20-comparison.patch
 
 pdfium_patches += include.patch
 
+pdfium_patches += abseil-trivial.patch
+
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,pdfium,$(PDFIUM_TARBALL)))
diff --git a/external/pdfium/abseil-trivial.patch 
b/external/pdfium/abseil-trivial.patch
new file mode 100644
index ..f3e929a5843a
--- /dev/null
+++ b/external/pdfium/abseil-trivial.patch
@@ -0,0 +1,27 @@
+--- third_party/abseil-cpp/absl/meta/type_traits.h
 third_party/abseil-cpp/absl/meta/type_traits.h
+@@ -489,23 +489,7 @@
+ // operation that is not trivial. `is_trivially_copy_assignable` is simply
+ // `is_trivially_assignable`.
+ template 
+-struct is_trivially_copy_assignable
+-: std::integral_constant<
+-  bool, __has_trivial_assign(typename std::remove_reference::type) 
&&
+-absl::is_copy_assignable::value> {
+-#ifdef ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE
+- private:
+-  static constexpr bool compliant =
+-  std::is_trivially_copy_assignable::value ==
+- 

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

2022-06-23 Thread Miklos Vajna (via logerrit)
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx |   16 
+++---
 1 file changed, 6 insertions(+), 10 deletions(-)

New commits:
commit 74d545ee8e4f8c9a1317decd3352ce97e0e24913
Author: Miklos Vajna 
AuthorDate: Wed Jun 22 19:26:59 2022 +0100
Commit: Miklos Vajna 
CommitDate: Thu Jun 23 15:13:31 2022 +0200

lingucomponent: use comphelper::makePropertyValue() in languagetoolimp

This allows giving aColor an actual type.

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

diff --git a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx 
b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
index d4f73c8ee4bc..ef56578c9825 100644
--- a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
+++ b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace osl;
 using namespace com::sun::star;
@@ -53,28 +54,23 @@ using namespace linguistic;
 
 namespace
 {
-PropertyValue lcl_MakePropertyValue(const OUString& rName, uno::Any& rValue)
-{
-return PropertyValue(rName, -1, rValue, 
css::beans::PropertyState_DIRECT_VALUE);
-}
-
 Sequence lcl_GetLineColorPropertyFromErrorId(const std::string& 
rErrorId)
 {
-uno::Any aColor;
+Color aColor;
 if (rErrorId == "TYPOS")
 {
-aColor <<= COL_LIGHTRED;
+aColor = COL_LIGHTRED;
 }
 else if (rErrorId == "STYLE")
 {
-aColor <<= COL_LIGHTBLUE;
+aColor = COL_LIGHTBLUE;
 }
 else
 {
 // Same color is used for other errorId's such as GRAMMAR, TYPOGRAPHY..
-aColor <<= COL_ORANGE;
+aColor = COL_ORANGE;
 }
-Sequence aProperties{ lcl_MakePropertyValue("LineColor", 
aColor) };
+Sequence aProperties{ 
comphelper::makePropertyValue("LineColor", aColor) };
 return aProperties;
 }
 }


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

2022-06-23 Thread Nathan Pratta Teodosio (via logerrit)
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |   29 ++
 sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx|   10 ++
 2 files changed, 39 insertions(+)

New commits:
commit 0d0469b4302dfe95b016a6f04b145834b79d5ed3
Author: Nathan Pratta Teodosio 
AuthorDate: Tue Jun 21 08:47:14 2022 -0300
Commit: Michael Stahl 
CommitDate: Thu Jun 23 14:29:13 2022 +0200

Update for Poppler 22.06

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

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 02b6fe6a1b9e..d9efa39d8a54 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -474,12 +474,21 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* 
gfxFont, const GfxState* st
 {
 // TODO(P3): Unfortunately, need to read stream twice, since
 // we must write byte count to stdout before
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+std::optional> pBuf = 
gfxFont->readEmbFontFile( m_pDoc->getXRef() );
+nSize = pBuf->size();
+if ( nSize > 0 )
+{
+aNewFont.isEmbedded = true;
+}
+#else
 char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
 if( pBuf )
 {
 aNewFont.isEmbedded = true;
 gfree(pBuf);
 }
+#endif
 }
 
 m_aFontMap[ nNewId ] = aNewFont;
@@ -492,13 +501,28 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const
 return;
 
 int nSize = 0;
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+std::optional> pBuf = gfxFont->readEmbFontFile( 
m_pDoc->getXRef() );
+nSize = pBuf->size();
+if ( nSize == 0 )
+return;
+#else
 char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
 if( !pBuf )
 return;
+#endif
 
 // ---sync point--- see SYNC STREAMS above
 fflush(stdout);
 
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+if( fwrite(pBuf->data(), sizeof(*pBuf->data()), nSize, g_binary_out) != 
static_cast(nSize) )
+{
+exit(1); // error
+}
+// ---sync point--- see SYNC STREAMS above
+fflush(g_binary_out);
+#else
 if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != 
static_cast(nSize) )
 {
 gfree(pBuf);
@@ -507,6 +531,7 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const
 // ---sync point--- see SYNC STREAMS above
 fflush(g_binary_out);
 gfree(pBuf);
+#endif
 }
 
 #if POPPLER_CHECK_VERSION(0, 83, 0)
@@ -759,7 +784,11 @@ void PDFOutDev::updateFont(GfxState *state)
 {
 assert(state);
 
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+GfxFont *gfxFont = state->getFont().get();
+#else
 GfxFont *gfxFont = state->getFont();
+#endif
 if( !gfxFont )
 return;
 
diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx 
b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
index ad6320139473..e924547e9357 100644
--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
@@ -138,6 +138,15 @@ int main(int argc, char **argv)
 _setmode( _fileno( g_binary_out ), _O_BINARY );
 #endif
 
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+PDFDoc aDoc( std::make_unique(pFileName),
+ std::optional(pOwnerPasswordStr),
+ std::optional(pUserPasswordStr) );
+
+PDFDoc aErrDoc( std::make_unique(pErrFileName),
+ std::optional(pOwnerPasswordStr),
+ std::optional(pUserPasswordStr) );
+#else
 PDFDoc aDoc( pFileName,
  pOwnerPasswordStr,
  pUserPasswordStr );
@@ -145,6 +154,7 @@ int main(int argc, char **argv)
 PDFDoc aErrDoc( pErrFileName,
  pOwnerPasswordStr,
  pUserPasswordStr );
+#endif
 
 // Check various permissions for aDoc.
 PDFDoc &rDoc = aDoc.isOk()? aDoc: aErrDoc;


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

2022-06-23 Thread Stephan Bergmann (via logerrit)
 sc/source/filter/orcus/filterdetect.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 5a0b9af53650c8a54f159d6677fc653d28539a54
Author: Stephan Bergmann 
AuthorDate: Wed Jun 22 20:37:34 2022 +0200
Commit: Michael Stahl 
CommitDate: Thu Jun 23 13:37:07 2022 +0200

Pump XInputStream into an SvMemoryStream rather than an OStringBuffer

...to avoid overflow with streams >= 2^31 bytes.  This should fix


which I could reproduce with a recent master Linux build with

> $ truncate -s 3G test.xml
> $ instdir/program/soffice test.xml

causing a SIGSEGV at

> #0  0x77f193a0 in rtl::str::stringbuffer_insert<_rtl_String, 
char>(_rtl_String**, int*, int, char const*, int) (ppThis=0x7fffb330, 
capacity=, offset=2147479552, pStr=0x20a92e8 "", len=4096) at 
sal/rtl/strtmpl.hxx:1424
> #1  0x7fffb6af04e5 in rtl::OStringBuffer::append(char const*, int) 
(len=4096, str=, this=0x7fffb330) at 
include/rtl/strbuf.hxx:594
> #2  (anonymous 
namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence&)
 (this=, rMediaDescSeq=) at 
sc/source/filter/orcus/filterdetect.cxx:80
[...]

(Ideally, orcus::detect would only need a short prefix of the stream's 
content,
but the implementation in
workdir/UnpackedTarball/liborcus/src/liborcus/format_detection.cpp 
delegates to
functions like orcus_ods::detect in
workdir/UnpackedTarball/liborcus/src/liborcus/orcus_ods.cpp, which passes 
the
content through some zip_archive that presumably needs the full content.)

Change-Id: Ifaa37ee887d8296cbcf971313bde347ddfb17c12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136297
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit a95c585433246813096e8890b7ed6ef4fe30c621)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136253
Reviewed-by: Michael Stahl 

diff --git a/sc/source/filter/orcus/filterdetect.cxx 
b/sc/source/filter/orcus/filterdetect.cxx
index 4e299f1d9371..21eb1d492440 100644
--- a/sc/source/filter/orcus/filterdetect.cxx
+++ b/sc/source/filter/orcus/filterdetect.cxx
@@ -14,7 +14,7 @@
 
 #include 
 
-#include 
+#include 
 
 #include 
 
@@ -68,7 +68,7 @@ OUString 
OrcusFormatDetect::detect(css::uno::Sequence
 return OUString();
 
 css::uno::Reference 
xInputStream(aMediaDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM], 
css::uno::UNO_QUERY );
-OStringBuffer aContent(xInputStream->available());
+SvMemoryStream aContent(xInputStream->available());
 
 static const sal_Int32 nBytes = 4096;
 css::uno::Sequence aSeq(nBytes);
@@ -77,10 +77,10 @@ OUString 
OrcusFormatDetect::detect(css::uno::Sequence
 {
 sal_Int32 nReadBytes = xInputStream->readBytes(aSeq, nBytes);
 bEnd = (nReadBytes != nBytes);
-aContent.append(reinterpret_cast(aSeq.getConstArray()), 
nReadBytes);
+aContent.WriteBytes(aSeq.getConstArray(), nReadBytes);
 }
 
-orcus::format_t eFormat = orcus::detect(reinterpret_cast(aContent.getStr()), aContent.getLength());
+orcus::format_t eFormat = orcus::detect(static_cast(aContent.GetData()), aContent.GetSize());
 
 switch (eFormat)
 {


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

2022-06-23 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 08166a27b1c1fb1b2058a3bfc4304cbfc7bad258
Author: Caolán McNamara 
AuthorDate: Mon May 23 12:23:22 2022 +0100
Commit: Michael Stahl 
CommitDate: Thu Jun 23 13:33:27 2022 +0200

gtk: fix leak in treeview tooltip

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index e71e5d7c0673..9529668c5639 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -13906,12 +13906,13 @@ private:
 return false;
 #endif
 OUString aTooltip = 
pThis->signal_query_tooltip(GtkInstanceTreeIter(iter));
-if (aTooltip.isEmpty())
-return false;
-gtk_tooltip_set_text(tooltip, OUStringToOString(aTooltip, 
RTL_TEXTENCODING_UTF8).getStr());
-gtk_tree_view_set_tooltip_row(pTreeView, tooltip, pPath);
+if (!aTooltip.isEmpty())
+{
+gtk_tooltip_set_text(tooltip, OUStringToOString(aTooltip, 
RTL_TEXTENCODING_UTF8).getStr());
+gtk_tree_view_set_tooltip_row(pTreeView, tooltip, pPath);
+}
 gtk_tree_path_free(pPath);
-return true;
+return !aTooltip.isEmpty();
 }
 
 void last_child(GtkTreeModel* pModel, GtkTreeIter* result, GtkTreeIter* 
pParent, int nChildren) const


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - wizards/source

2022-06-23 Thread Jean-Pierre Ledure (via logerrit)
 wizards/source/scriptforge/SF_String.xba |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f79501f6fd42f58da091b525321f81495fd798fb
Author: Jean-Pierre Ledure 
AuthorDate: Thu Jun 23 12:22:48 2022 +0200
Commit: Jean-Pierre Ledure 
CommitDate: Thu Jun 23 13:14:34 2022 +0200

ScriptForge - (SF_String) FIX Unquote() with "'" as quoting char

The quoting character (2nd argument of the method)
can be the single or the double quote.

The single quote was erroneously ignored.

Additionally comments are added in the code
about non-symmetrical escaping approaches:
"" or \'
(maybe to be added in help texts ?)

Cfr. commit on master: https://gerrit.libreoffice.org/c/core/+/136292

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

diff --git a/wizards/source/scriptforge/SF_String.xba 
b/wizards/source/scriptforge/SF_String.xba
index 10ce48045ab8..888cf672c5da 100644
--- a/wizards/source/scriptforge/SF_String.xba
+++ b/wizards/source/scriptforge/SF_String.xba
@@ -2539,6 +2539,9 @@ Public Function Unquote(Optional ByRef InputStr As 
Variant _
) As String
 ''' Reset a quoted string to its original content
 ''' (used f.i. for parsing of csv-like records)
+''' When the input string contains the quote character, the 
latter must be escaped:
+''' - QuoteChar = double quote, by doubling it 
("")
+''' - QuoteChar = single quote, with a preceding 
backslash (\')
 ''' Args:
 ''' InputStr: the input string
 ''' QuoteChar: either " (default) or '
@@ -2567,7 +2570,7 @@ Check:
End If
 
 Try:
-   If Left(InputStr, 1) <>  Then '  
No need to parse further
+   If Left(InputStr, 1) <> QuoteChar Then'  No need 
to parse further
sUnquote = InputStr
Else
Set oCharacterClass = 
SF_Utils._GetUNOService("CharacterClass")


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

2022-06-23 Thread Mike Kaganski (via logerrit)
 sc/qa/unit/scshapetest.cxx |   12 
 1 file changed, 12 deletions(-)

New commits:
commit 7b7fc499c889277c6977dcf71f673880ebfb342e
Author: Mike Kaganski 
AuthorDate: Wed Jun 22 20:46:11 2022 +0300
Commit: Xisco Fauli 
CommitDate: Thu Jun 23 13:02:29 2022 +0200

Re-enable the test

After commit 7d5dcf5f547e29d61e788b88f7a3f7b4feafb6b2
  Author Mike Kaganski 
  Date   Wed Jun 22 16:22:50 2022 +0300
Fix shape rectangle calculation

the test should not fail anymore, both on macOS, and with
non-default DPI.

This reverts commit 5c6139ac36134a21345525c21e167a356b0892b9
  Author Caolán McNamara 
  Date   Thu Dec 31 19:40:17 2020 +
disable contantly failing test

and commit d0f6c9f924fdbeed4c466e3a6eff7d6980ebc659
  Author Noel Grandin 
  Date   Wed Jan 06 09:22:57 2021 +0200
exclude more tests for non-default DPI

Change-Id: I8e4b872d8ef0b3e695c7ce0b87598c4a7effe94a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136294
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 424a293664cbdffcceaa79756d59bb2d29080613)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136316
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index dc47be21b0d3..8417d0bf51b9 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -55,10 +55,7 @@ public:
 void testTdf137033_FlipHori_Resize();
 void testTdf137033_RotShear_ResizeHide();
 void testTdf137033_RotShear_Hide();
-// this test has starting failing under OSX
-#if !defined MACOSX
 void testTdf137576_LogicRectInDefaultMeasureline();
-#endif
 void testTdf137576_LogicRectInNewMeasureline();
 void testMeasurelineHideColSave();
 void testHideColsShow();
@@ -85,10 +82,7 @@ public:
 CPPUNIT_TEST(testTdf137033_FlipHori_Resize);
 CPPUNIT_TEST(testTdf137033_RotShear_ResizeHide);
 CPPUNIT_TEST(testTdf137033_RotShear_Hide);
-// this test has starting failing under OSX
-#if !defined MACOSX
 CPPUNIT_TEST(testTdf137576_LogicRectInDefaultMeasureline);
-#endif
 CPPUNIT_TEST(testTdf137576_LogicRectInNewMeasureline);
 CPPUNIT_TEST(testMeasurelineHideColSave);
 CPPUNIT_TEST(testHideColsShow);
@@ -769,13 +763,8 @@ void ScShapeTest::testTdf137033_RotShear_Hide()
 pDocSh->DoClose();
 }
 
-// this test has starting failing under OSX
-#if !defined MACOSX
 void ScShapeTest::testTdf137576_LogicRectInDefaultMeasureline()
 {
-if (!IsDefaultDPI())
-return;
-
 // Error was, that the empty logical rectangle of a default measure line 
(Ctrl+Click)
 // resulted in zeros in NonRotatedAnchor and a wrong position when 
reloading.
 
@@ -828,7 +817,6 @@ void 
ScShapeTest::testTdf137576_LogicRectInDefaultMeasureline()
 
 pDocSh->DoClose();
 }
-#endif
 
 void ScShapeTest::testTdf137576_LogicRectInNewMeasureline()
 {


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

2022-06-23 Thread Andrea Gelmini (via logerrit)
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |2 +-
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 351c25e9bc882c65746720fe4ada286d39aab1c5
Author: Andrea Gelmini 
AuthorDate: Mon Jun 20 14:20:15 2022 +0200
Commit: Julien Nabet 
CommitDate: Thu Jun 23 12:56:21 2022 +0200

Fix typo

Change-Id: I0482fc4379beb51495e1450a51a0e28f9b324299
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136150
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx 
b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index de621c1367e7..9a5aff5bea6a 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -258,7 +258,7 @@ static void CalculateHorizontalScalingFactor(
 pVirDev->Pop();
 
 const bool bHopeLess = fScalingFactor < 1.0;
-// if its hopeless then just continue on with this FontSize of 
2, otherwise
+// if it's hopeless then just continue on with this FontSize 
of 2, otherwise
 // continue to try smaller sizes
 if (!bHopeLess)
 {
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx 
b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index 5b20497d476f..f05c0c92f2d9 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -273,7 +273,7 @@ void SlideBackgroundFillPrimitive2D::create2DDecomposition(
 // since the defining geometry is the getB2DPolyPolygon() one.
 // We have already checked above that it's no empty and overlaps
 // somehow.
-// It also might be completely insinde the PageRange. If not, we
+// It also might be completely inside the PageRange. If not, we
 // additionally would need to mask the content against PageBounds,
 // so using potentially two different MaskPrimitive2D's.
 // Since in this case we have a PolyPolygon and a B2DRange it is 
cheaper


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

2022-06-23 Thread Julien Nabet (via logerrit)
 sw/source/ui/chrdlg/pardlg.cxx |2 +-
 sw/source/ui/fmtui/tmpdlg.cxx  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b6dfa2b7472a55b92de95732a0067c3a2f586c51
Author: Julien Nabet 
AuthorDate: Sun Jun 19 23:19:12 2022 +0200
Commit: Julien Nabet 
CommitDate: Thu Jun 23 12:53:26 2022 +0200

tdf#149615: "No list" twice in Outline & Style tab (non English UI only)

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

diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 232b9f8154df..e465cb7e84f3 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -215,7 +215,7 @@ void SwParaDlg::PageCreated(const OString& rId, SfxTabPage& 
rPage)
 aNames.insert(pBase->GetName());
 pBase = pPool->Next();
 }
-aNames.erase("No List");
+aNames.erase(SwResId(STR_POOLNUMRULE_NOLIST));
 for (const auto& rName : aNames)
 rBox.append_text(rName);
 }
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 184401b134f8..aa3c9e5eacf6 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -457,7 +457,7 @@ void SwTemplateDlgController::PageCreated(const OString& 
rId, SfxTabPage &rPage
 aNames.insert(pBase->GetName());
 pBase = pPool->Next();
 }
-aNames.erase("No List");
+aNames.erase(SwResId(STR_POOLNUMRULE_NOLIST));
 for(std::set::const_iterator it = aNames.begin(); it != 
aNames.end(); ++it)
 rBox.append_text(*it);
 }


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

2022-06-23 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/writer_tests7/tdf128744.py |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 46129115aa507609f97058fcf6f00786718b8c68
Author: Xisco Fauli 
AuthorDate: Wed Jun 22 18:39:20 2022 +0200
Commit: Xisco Fauli 
CommitDate: Thu Jun 23 12:50:03 2022 +0200

uitest: remove print

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

diff --git a/sw/qa/uitest/writer_tests7/tdf128744.py 
b/sw/qa/uitest/writer_tests7/tdf128744.py
index 34201e858675..5e38bc548a1c 100644
--- a/sw/qa/uitest/writer_tests7/tdf128744.py
+++ b/sw/qa/uitest/writer_tests7/tdf128744.py
@@ -33,7 +33,6 @@ class tdf128744(UITestCase):
 
self.assertEqual(get_state_as_dict(xPasswordDialog)["DisplayText"], "Enter 
Password")
 xPassword = xPasswordDialog.getChild("pass1ed")
 xPassword.executeAction("TYPE", mkPropertyValues({"TEXT": 
"bad password"}))
-print(xPasswordDialog.getChildren())
 xOkBtn = xPasswordDialog.getChild("ok")
 with 
self.ui_test.execute_blocking_action(xOkBtn.executeAction, args=('CLICK', ())) 
as xInfoBox:
 # "Invalid password" infobox


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

2022-06-23 Thread Michael Stahl (via logerrit)
 sw/qa/extras/uiwriter/uiwriter2.cxx |   22 +-
 sw/source/core/docnode/nodes.cxx|1 -
 sw/source/core/edit/edatmisc.cxx|   34 ++
 sw/source/core/edit/edfcol.cxx  |   15 ---
 4 files changed, 3 insertions(+), 69 deletions(-)

New commits:
commit c0008da4f9884c92b8403823c935750d59b9552b
Author: Michael Stahl 
AuthorDate: Thu Jun 16 19:38:43 2022 +0200
Commit: Michael Stahl 
CommitDate: Thu Jun 23 12:33:36 2022 +0200

tdf#134759 sw: do CopyToModify() for both start and end node

... in SwNodes::MoveRange().

SwRangeRedline::Hide() does CopyToSection()/DelCopyOfSection() so the
previous commit fixed it, and SwRangeRedline::Show() does
MoveFromSection() so hopefully this should fix it to restore the
situation before hiding.

This caused several tests to fail, and the reason appears to be that
they pretty much tested exactly the problem that's being fixed with this
commit, but the pre-existing fixes and the new one cancel each other
out.

In all cases the pre-exising fix moves all redlines and moves them back
again, which is the sort of thing that sw_redlinehide wanted to get rid
of; not sure why i didn't notice this earlier.

The check for the 3rd paragraph where the style was applied still
succeeds with the new bugfix, but the one for the 1st paragraph fails;
it is unclear why applying a style to the 3rd paragraph should have an
effect on the 1st one.

Hence:

Revert code changes of commit 1d65ffc5a37be21e0316019b1c96eb9a1c871ac0
"tdf#105413 track changes: keep paragraph styles"

Revert code changes of commit d97fc64a819f834302e384792668507df4cc412c
"tdf#122893 track changes: keep paragraph alignment"

Revert code changes of commit 6a54dd844d1821165642bbcc16bd12a01a23393d
"tdf#122901 track changes: keep paragraph top and bottom borders"

Change-Id: I0b70134902a7993c7bb11a3c619e45742764c8ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136056
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 2ba5363d19e8229bfe8948a4ac8473d794dba5e9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136246

diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 0ff16f74e59d..8e78a70f97c1 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -2147,9 +2147,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf105413)
 
IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
 
 // Set Heading 1 paragraph style in the 3th paragraph.
-// Because of the tracked deleted region between them,
-// this sets also the same style in the first paragraph automatically
-// to keep the changed paragraph style at hiding tracked changes or saving 
the document
 SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
 pWrtShell->Down(/*bSelect=*/false);
 pWrtShell->Down(/*bSelect=*/false);
@@ -2165,9 +2162,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf105413)
  getProperty(getParagraph(3), 
"ParaStyleName"));
 CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
  getProperty(getParagraph(2), 
"ParaStyleName"));
-// first paragraph gets the same heading style
-CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
- getProperty(getParagraph(1), 
"ParaStyleName"));
 }
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf76817)
@@ -2589,9 +2583,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf122893)
 
IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
 
 // Set center-aligned paragraph with preset double line spacing in the 3th 
paragraph.
-// Because of the tracked deleted region between them,
-// this sets also the same formatting in the first paragraph automatically
-// to keep the changed paragraph formatting at hiding tracked changes or 
saving the document
 SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
 pWrtShell->Down(/*bSelect=*/false);
 pWrtShell->Down(/*bSelect=*/false);
@@ -2610,10 +2601,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf122893)
 CPPUNIT_ASSERT_EQUAL(sal_Int16(100),
  getProperty(getParagraph(2), 
"ParaLineSpacing")
  .Height); // single line spacing
-// first paragraph is also center-aligned with double line spacing
-CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty(getParagraph(1), 
"ParaAdjust"));
-CPPUNIT_ASSERT_EQUAL(
-sal_Int16(200), getProperty(getParagraph(1), 
"ParaLineSpacing").Height);
 }
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf122901)
@@ -2639,9 +2626,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf122901)
 
IDocumentRedlineAccess::IsShowChanges

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

2022-06-23 Thread Jean-Pierre Ledure (via logerrit)
 wizards/source/scriptforge/SF_String.xba |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 30a6bf3960c37124c9c3cdbaec4794153e24c83a
Author: Jean-Pierre Ledure 
AuthorDate: Wed Jun 22 18:10:36 2022 +0200
Commit: Jean-Pierre Ledure 
CommitDate: Thu Jun 23 12:14:01 2022 +0200

ScriptForge - (SF_String) FIX Unquote() with "'" as quoting char

The quoting character (2nd argument of the method)
can be the single or the double quote.

The single quote was erroneously ignored.

Additionally comments are added in the code
about non-symmetrical escaping approaches:
"" or \'
(maybe to be added in help texts ?)

Commit to push to libreoffice-7-4 branch too.

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

diff --git a/wizards/source/scriptforge/SF_String.xba 
b/wizards/source/scriptforge/SF_String.xba
index 10ce48045ab8..888cf672c5da 100644
--- a/wizards/source/scriptforge/SF_String.xba
+++ b/wizards/source/scriptforge/SF_String.xba
@@ -2539,6 +2539,9 @@ Public Function Unquote(Optional ByRef InputStr As 
Variant _
) As String
 ''' Reset a quoted string to its original content
 ''' (used f.i. for parsing of csv-like records)
+''' When the input string contains the quote character, the 
latter must be escaped:
+''' - QuoteChar = double quote, by doubling it 
("")
+''' - QuoteChar = single quote, with a preceding 
backslash (\')
 ''' Args:
 ''' InputStr: the input string
 ''' QuoteChar: either " (default) or '
@@ -2567,7 +2570,7 @@ Check:
End If
 
 Try:
-   If Left(InputStr, 1) <>  Then '  
No need to parse further
+   If Left(InputStr, 1) <> QuoteChar Then'  No need 
to parse further
sUnquote = InputStr
Else
Set oCharacterClass = 
SF_Utils._GetUNOService("CharacterClass")


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

2022-06-23 Thread Mike Kaganski (via logerrit)
 sc/qa/unit/data/ods/LargeAnchorOffset.ods |binary
 sc/qa/unit/scshapetest.cxx|   34 ++
 sc/source/filter/xml/xmlexprt.cxx |8 ++-
 3 files changed, 37 insertions(+), 5 deletions(-)

New commits:
commit f1c29d11f99dd8166086b7fea8e43c0f15413b9d
Author: Mike Kaganski 
AuthorDate: Wed Jun 22 16:22:50 2022 +0300
Commit: Xisco Fauli 
CommitDate: Thu Jun 23 11:55:21 2022 +0200

Fix shape rectangle calculation

At specific screen resolutions, caused failed CppunitTest_sc_shapetest:

  C:/lo/src/core/sc/qa/unit/scshapetest.cxx(169) : error : Assertion
  Test name: 
sc_apitest::ScShapeTest::testTdf137576_LogicRectInDefaultMeasureline
  assertion failed
  - Expression: std::abs(rExpected.Y() - rActual.Y()) <= nTolerance
  - after reload Y expected 9731 actual 10287 Tolerance 1

which manifested the actual wrong position of shape written into ODF.
Commit cd966aac6ecd8ce606ac3f2ccd602e467114ba3f
  Author Regina Henschel 
  Date   Fri Dec 25 19:27:51 2020 +0100
tdf#137033 improve save of cell anchored shapes

had corrected the calculation of anchor point, but the overlook was
that in some cases of non-transformed shapes, rMyCell.maCellAddress
may differ from pObjData->maStart. Since aSnapStartAddress could be
not set to pObjData->maStart for such shapes, the wrong cell range
could be calculated for resized-with-cell objects.

Fix this by using pObjData->maStart whenever there is pObjData. If
it turns out that in some cases, rMyCell.maCellAddress is needed in
calculations before the 'if (rShape.bResizeWithCell && pObjData)',
aSnapStartAddress should be assigned to pObjData->maStart after the
check.

Change-Id: I7e0dc834c2ffb147430fb5b2cb8bdb4dca201b3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136285
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 7d5dcf5f547e29d61e788b88f7a3f7b4feafb6b2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136252
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/unit/data/ods/LargeAnchorOffset.ods 
b/sc/qa/unit/data/ods/LargeAnchorOffset.ods
new file mode 100644
index ..c7e44527e235
Binary files /dev/null and b/sc/qa/unit/data/ods/LargeAnchorOffset.ods differ
diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index 761db2da687c..dc47be21b0d3 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -71,6 +71,7 @@ public:
 void testCustomShapeCellAnchoredRotatedShape();
 void testTdf144242_Line_noSwapWH();
 void testTdf144242_OpenBezier_noSwapWH();
+void testLargeAnchorOffset();
 
 CPPUNIT_TEST_SUITE(ScShapeTest);
 CPPUNIT_TEST(testTdf143619_validation_circle_pos);
@@ -100,6 +101,7 @@ public:
 CPPUNIT_TEST(testCustomShapeCellAnchoredRotatedShape);
 CPPUNIT_TEST(testTdf144242_Line_noSwapWH);
 CPPUNIT_TEST(testTdf144242_OpenBezier_noSwapWH);
+CPPUNIT_TEST(testLargeAnchorOffset);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -1234,6 +1236,38 @@ void 
ScShapeTest::testCustomShapeCellAnchoredRotatedShape()
 pDocSh->DoClose();
 }
 
+void ScShapeTest::testLargeAnchorOffset()
+{
+// The example doc contains a resize-with-cell-anchored measure line
+// with a large vertical offset that shifts the start point onto the
+// next cell below.
+OUString aFileURL;
+createFileURL(u"LargeAnchorOffset.ods", aFileURL);
+uno::Reference xComponent = 
loadFromDesktop(aFileURL);
+
+ScDocShell* pDocSh = lcl_getScDocShellWithAssert(xComponent);
+SdrObject* pObj = lcl_getSdrObjectWithAssert(pDocSh->GetDocument(), 0);
+
+const Point aOldPos = pObj->GetRelativePos();
+// Just to check that it imports correctly
+lcl_AssertPointEqualWithTolerance("before reload", { 9504, 9089 }, 
aOldPos, 1);
+
+saveAndReload(xComponent, "calc8");
+
+pDocSh = lcl_getScDocShellWithAssert(xComponent);
+pObj = lcl_getSdrObjectWithAssert(pDocSh->GetDocument(), 0);
+
+// Without the fix, this would fail:
+//   Test name: sc_apitest::ScShapeTest::testLargeAnchorOffset
+//   assertion failed
+//   - Expression: std::abs(rExpected.Y() - rActual.Y()) <= nTolerance
+//   - after reload Y expected 9089 actual 9643 Tolerance 1
+const Point aNewPos = pObj->GetRelativePos();
+lcl_AssertPointEqualWithTolerance("after reload", aOldPos, aNewPos, 1);
+
+pDocSh->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScShapeTest);
 }
 
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 023165f56c95..44abae0ee455 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3481,14 +3481,12 @@ void ScXMLExport::WriteShapes(const ScMyCell& rMyCell)
 // end cell address of snap rect. In case of a transformed shape, 
it is not in rMyCell.
 ScAddress aSnapStartAddr

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

2022-06-23 Thread Mike Kaganski (via logerrit)
 sc/qa/unit/data/ods/LargeAnchorOffset.ods |binary
 sc/qa/unit/scshapetest.cxx|   34 ++
 sc/source/filter/xml/xmlexprt.cxx |8 ++-
 3 files changed, 37 insertions(+), 5 deletions(-)

New commits:
commit 2f5f43d2f4c337c51173ee665991671b0def5e1f
Author: Mike Kaganski 
AuthorDate: Wed Jun 22 16:22:50 2022 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jun 23 11:54:37 2022 +0200

Fix shape rectangle calculation

At specific screen resolutions, caused failed CppunitTest_sc_shapetest:

  C:/lo/src/core/sc/qa/unit/scshapetest.cxx(169) : error : Assertion
  Test name: 
sc_apitest::ScShapeTest::testTdf137576_LogicRectInDefaultMeasureline
  assertion failed
  - Expression: std::abs(rExpected.Y() - rActual.Y()) <= nTolerance
  - after reload Y expected 9731 actual 10287 Tolerance 1

which manifested the actual wrong position of shape written into ODF.
Commit cd966aac6ecd8ce606ac3f2ccd602e467114ba3f
  Author Regina Henschel 
  Date   Fri Dec 25 19:27:51 2020 +0100
tdf#137033 improve save of cell anchored shapes

had corrected the calculation of anchor point, but the overlook was
that in some cases of non-transformed shapes, rMyCell.maCellAddress
may differ from pObjData->maStart. Since aSnapStartAddress could be
not set to pObjData->maStart for such shapes, the wrong cell range
could be calculated for resized-with-cell objects.

Fix this by using pObjData->maStart whenever there is pObjData. If
it turns out that in some cases, rMyCell.maCellAddress is needed in
calculations before the 'if (rShape.bResizeWithCell && pObjData)',
aSnapStartAddress should be assigned to pObjData->maStart after the
check.

Change-Id: I7e0dc834c2ffb147430fb5b2cb8bdb4dca201b3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136285
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 7d5dcf5f547e29d61e788b88f7a3f7b4feafb6b2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136314
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/qa/unit/data/ods/LargeAnchorOffset.ods 
b/sc/qa/unit/data/ods/LargeAnchorOffset.ods
new file mode 100644
index ..c7e44527e235
Binary files /dev/null and b/sc/qa/unit/data/ods/LargeAnchorOffset.ods differ
diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index 8784fb1a125a..d755bb2b02f2 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -73,6 +73,7 @@ public:
 void testCustomShapeCellAnchoredRotatedShape();
 void testTdf144242_Line_noSwapWH();
 void testTdf144242_OpenBezier_noSwapWH();
+void testLargeAnchorOffset();
 
 CPPUNIT_TEST_SUITE(ScShapeTest);
 CPPUNIT_TEST(testTdf143619_validation_circle_pos);
@@ -102,6 +103,7 @@ public:
 CPPUNIT_TEST(testCustomShapeCellAnchoredRotatedShape);
 CPPUNIT_TEST(testTdf144242_Line_noSwapWH);
 CPPUNIT_TEST(testTdf144242_OpenBezier_noSwapWH);
+CPPUNIT_TEST(testLargeAnchorOffset);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -1234,6 +1236,38 @@ void 
ScShapeTest::testCustomShapeCellAnchoredRotatedShape()
 pDocSh->DoClose();
 }
 
+void ScShapeTest::testLargeAnchorOffset()
+{
+// The example doc contains a resize-with-cell-anchored measure line
+// with a large vertical offset that shifts the start point onto the
+// next cell below.
+OUString aFileURL;
+createFileURL(u"LargeAnchorOffset.ods", aFileURL);
+uno::Reference xComponent = 
loadFromDesktop(aFileURL);
+
+ScDocShell* pDocSh = lcl_getScDocShellWithAssert(xComponent);
+SdrObject* pObj = lcl_getSdrObjectWithAssert(pDocSh->GetDocument(), 0);
+
+const Point aOldPos = pObj->GetRelativePos();
+// Just to check that it imports correctly
+lcl_AssertPointEqualWithTolerance("before reload", { 9504, 9089 }, 
aOldPos, 1);
+
+saveAndReload(xComponent, "calc8");
+
+pDocSh = lcl_getScDocShellWithAssert(xComponent);
+pObj = lcl_getSdrObjectWithAssert(pDocSh->GetDocument(), 0);
+
+// Without the fix, this would fail:
+//   Test name: sc_apitest::ScShapeTest::testLargeAnchorOffset
+//   assertion failed
+//   - Expression: std::abs(rExpected.Y() - rActual.Y()) <= nTolerance
+//   - after reload Y expected 9089 actual 9643 Tolerance 1
+const Point aNewPos = pObj->GetRelativePos();
+lcl_AssertPointEqualWithTolerance("after reload", aOldPos, aNewPos, 1);
+
+pDocSh->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScShapeTest);
 }
 
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 8e9e03fca80c..ee05befe0f3f 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3475,14 +3475,12 @@ void ScXMLExport::WriteShapes(const ScMyCell& rMyCell)
 // end cell address of snap rect. In case of a transformed shape, 
it is not in rMyCell.
 ScAddress aS

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

2022-06-23 Thread Stephan Bergmann (via logerrit)
 sc/source/filter/orcus/filterdetect.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 928349f84eff4b5340170519d090b12b5f077153
Author: Stephan Bergmann 
AuthorDate: Wed Jun 22 20:37:34 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jun 23 11:20:36 2022 +0200

Pump XInputStream into an SvMemoryStream rather than an OStringBuffer

...to avoid overflow with streams >= 2^31 bytes.  This should fix


which I could reproduce with a recent master Linux build with

> $ truncate -s 3G test.xml
> $ instdir/program/soffice test.xml

causing a SIGSEGV at

> #0  0x77f193a0 in rtl::str::stringbuffer_insert<_rtl_String, 
char>(_rtl_String**, int*, int, char const*, int) (ppThis=0x7fffb330, 
capacity=, offset=2147479552, pStr=0x20a92e8 "", len=4096) at 
sal/rtl/strtmpl.hxx:1424
> #1  0x7fffb6af04e5 in rtl::OStringBuffer::append(char const*, int) 
(len=4096, str=, this=0x7fffb330) at 
include/rtl/strbuf.hxx:594
> #2  (anonymous 
namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence&)
 (this=, rMediaDescSeq=) at 
sc/source/filter/orcus/filterdetect.cxx:80
[...]

(Ideally, orcus::detect would only need a short prefix of the stream's 
content,
but the implementation in
workdir/UnpackedTarball/liborcus/src/liborcus/format_detection.cpp 
delegates to
functions like orcus_ods::detect in
workdir/UnpackedTarball/liborcus/src/liborcus/orcus_ods.cpp, which passes 
the
content through some zip_archive that presumably needs the full content.)

Change-Id: Ifaa37ee887d8296cbcf971313bde347ddfb17c12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136297
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit a95c585433246813096e8890b7ed6ef4fe30c621)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136251

diff --git a/sc/source/filter/orcus/filterdetect.cxx 
b/sc/source/filter/orcus/filterdetect.cxx
index 4e299f1d9371..21eb1d492440 100644
--- a/sc/source/filter/orcus/filterdetect.cxx
+++ b/sc/source/filter/orcus/filterdetect.cxx
@@ -14,7 +14,7 @@
 
 #include 
 
-#include 
+#include 
 
 #include 
 
@@ -68,7 +68,7 @@ OUString 
OrcusFormatDetect::detect(css::uno::Sequence
 return OUString();
 
 css::uno::Reference 
xInputStream(aMediaDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM], 
css::uno::UNO_QUERY );
-OStringBuffer aContent(xInputStream->available());
+SvMemoryStream aContent(xInputStream->available());
 
 static const sal_Int32 nBytes = 4096;
 css::uno::Sequence aSeq(nBytes);
@@ -77,10 +77,10 @@ OUString 
OrcusFormatDetect::detect(css::uno::Sequence
 {
 sal_Int32 nReadBytes = xInputStream->readBytes(aSeq, nBytes);
 bEnd = (nReadBytes != nBytes);
-aContent.append(reinterpret_cast(aSeq.getConstArray()), 
nReadBytes);
+aContent.WriteBytes(aSeq.getConstArray(), nReadBytes);
 }
 
-orcus::format_t eFormat = orcus::detect(reinterpret_cast(aContent.getStr()), aContent.getLength());
+orcus::format_t eFormat = orcus::detect(static_cast(aContent.GetData()), aContent.GetSize());
 
 switch (eFormat)
 {


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - formula/source

2022-06-23 Thread Caolán McNamara (via logerrit)
 formula/source/core/api/token.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit dff039e61ac737c779b538d20a57a5e0a401cf60
Author: Caolán McNamara 
AuthorDate: Wed Jun 22 16:05:53 2022 +0100
Commit: Xisco Fauli 
CommitDate: Thu Jun 23 11:17:54 2022 +0200

crashtesting: assert seen with forum-mso-de-53682

not reproducible for me, but appears to be an empty string here
sometimes.

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

diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index 89ae03162778..a7d44f897a24 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1249,8 +1249,12 @@ bool FormulaMissingContext::AddMissingExternal( 
FormulaTokenArray *pNewArr ) con
 
 const OUString &rName = mpFunc->GetExternal();
 
-// initial (fast) check:
-sal_Unicode nLastChar = rName[ rName.getLength() - 1];
+// initial (fast) checks:
+sal_Int32 nLength = rName.getLength();
+if (!nLength)
+return false;
+
+sal_Unicode nLastChar = rName[ nLength - 1];
 if ( nLastChar != 't' && nLastChar != 'm' )
 return false;
 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - svgio/inc svgio/source

2022-06-23 Thread offtkp (via logerrit)
 svgio/inc/svgstylenode.hxx  |4 ++--
 svgio/source/svgreader/svgstylenode.cxx |   31 ++-
 2 files changed, 16 insertions(+), 19 deletions(-)

New commits:
commit 34e08a82a317e06d2526f5a16a522323c3902bd7
Author: offtkp 
AuthorDate: Sun Jun 19 23:52:58 2022 +0300
Commit: Xisco Fauli 
CommitDate: Thu Jun 23 11:11:21 2022 +0200

tdf#149449 Don't ignore CSS class redefinition inside SVGs

Previously if a css class was redefined like so:

.cls2,.cls3{fill:#fff;}.cls-2{opacity:0.1;}

the second definition of .cls-2 would get ignored and opacity would
remain 1.

This patch keeps track of the names of each previously defined class and
makes sure to append the future redefinition instead of ignoring it.

Change-Id: I20b55aea247d11774cd743505a90f1466f622b1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136109
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 99f8e8aa0ccb741c2b5ede6cab75798c1793d899)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136244
Reviewed-by: Xisco Fauli 

diff --git a/svgio/inc/svgstylenode.hxx b/svgio/inc/svgstylenode.hxx
index 320b4fa17dcc..1a5a43ca858c 100644
--- a/svgio/inc/svgstylenode.hxx
+++ b/svgio/inc/svgstylenode.hxx
@@ -19,6 +19,7 @@
 
 #pragma once
 
+#include 
 #include "svgnode.hxx"
 #include "svgstyleattributes.hxx"
 
@@ -28,7 +29,7 @@ namespace svgio::svgreader
 {
 private:
 /// use styles
-std::vector< SvgStyleAttributes* >  maSvgStyleAttributes;
+std::unordered_map< OUString, std::unique_ptr 
> maSvgStyleAttributes;
 
 boolmbTextCss : 1; // true == 
type is 'text/css'
 
@@ -36,7 +37,6 @@ namespace svgio::svgreader
 SvgStyleNode(
 SvgDocument& rDocument,
 SvgNode* pParent);
-virtual ~SvgStyleNode() override;
 
 /// #i125258# tell if this node is allowed to have a parent style 
(e.g. defs do not)
 virtual bool supportsParentStyle() const override;
diff --git a/svgio/source/svgreader/svgstylenode.cxx 
b/svgio/source/svgreader/svgstylenode.cxx
index 89f6200138bd..f9d33d61ced3 100644
--- a/svgio/source/svgreader/svgstylenode.cxx
+++ b/svgio/source/svgreader/svgstylenode.cxx
@@ -31,15 +31,6 @@ namespace svgio::svgreader
 {
 }
 
-SvgStyleNode::~SvgStyleNode()
-{
-while(!maSvgStyleAttributes.empty())
-{
-delete *(maSvgStyleAttributes.end() - 1);
-maSvgStyleAttributes.pop_back();
-}
-}
-
 // #i125258# no parent when we are a CssStyle holder to break 
potential loops because
 // when using CssStyles we jump uncontrolled inside the node tree 
hierarchy
 bool SvgStyleNode::supportsParentStyle() const
@@ -148,13 +139,6 @@ namespace svgio::svgreader
 if(aSelectors.isEmpty() || aContent.isEmpty())
 return;
 
-// create new style and add to local list (for ownership control)
-SvgStyleAttributes* pNewStyle = new SvgStyleAttributes(*this);
-maSvgStyleAttributes.push_back(pNewStyle);
-
-// fill with content
-pNewStyle->readCssStyle(aContent);
-
 // comma-separated split (Css abbreviation for same style for 
multiple selectors)
 const sal_Int32 nLen(aSelectors.getLength());
 sal_Int32 nPos(0);
@@ -168,9 +152,22 @@ namespace svgio::svgreader
 
 const OUString aSingleName(aToken.makeStringAndClear().trim());
 
+// add the current css class only if wasn't previously added
+auto [aIterator, bIsNew] = 
maSvgStyleAttributes.try_emplace(aSingleName);
+if (bIsNew)
+{
+// create new style and add to local list (for ownership 
control) and
+// in case it's written to again in future classes to 
prevent overwrites
+aIterator->second = 
std::make_unique(*this);
+}
+const std::unique_ptr& pCurrentStyle = 
aIterator->second;
+
+// fill with content
+pCurrentStyle->readCssStyle(aContent);
+
 if(aSingleName.getLength())
 {
-addCssStyleSheet(aSingleName, *pNewStyle);
+addCssStyleSheet(aSingleName, *pCurrentStyle);
 }
 
 if(nInitPos == nPos)


Re: Crash test update

2022-06-23 Thread Xisco Fauli

Hello,

On 22/6/22 14:10, crashtest wrote:

Hi,

New crashtest update available at 
.

121 files have crashed during import.


In order to help a bit with the investigation of these import crashes, I 
reported and bisected those that are reproducible with the bisect 
builds. These are the reports:


- https://bugs.documentfoundation.org/show_bug.cgi?id=149679
    - forum-de3-9186.ods
    - forum-en-29634.ods
- https://bugs.documentfoundation.org/show_bug.cgi?id=149546
    - forum-mso-en-11679.docx
- https://bugs.documentfoundation.org/show_bug.cgi?id=149691
    - forum-mso-de-55780.docx
- https://bugs.documentfoundation.org/show_bug.cgi?id=149649
    - forum-mso-en-16226.docx
    - forum-mso-en-16228.docx
- https://bugs.documentfoundation.org/show_bug.cgi?id=149692
    - forum-mso-en-14071.docx
- https://bugs.documentfoundation.org/show_bug.cgi?id=149548

    - forum-mso-en-13192.docx

Regards

--
Xisco Faulí
LibreOffice QA Team
IRC: x1sc0



Re: More information about hung Jenkins builds

2022-06-23 Thread Stephan Bergmann

On 19/06/2020 12:38, Stephan Bergmann wrote:
With 
 
"Print backtraces of leftover processes from kill-wrapper" (and its 
follow-up 
 
"Don't generate full backtraces, for performance reasons") we now get 
backtraces of hung processes, for those Jenkins jobs that use kill-wrapper.


And with 
 
"kill-wrapper: Also dump content of any log files" we now get the 
content of gbuild's log files that capture the stdout/-err of the hung 
processes (and which gbuild would only print out when those processes 
fail, so which was lost when the processes got killed by kill-wrapper).


I rolled that out manually across tb75, tb76, and tb79.  But I 
unfortunately forgot again how to reach the other relevant Jenkins Linux 
machines, so I tried to update them with 
 instead.  That succeeded 
for tb88-linux.  But it failed for tb85, tb87, tb89-linux, and tb91, due 
to either "error: cannot pull with rebase: You have unstaged changes." 
or "You are not currently on a branch.  Please specify which branch you 
want to rebase against."


So it would be great if
* someone can update the remaining machines, and
* the lode checkout on the Jenkins machines would generally be in a 
state so that  can do its job.




Mahdyar M. M. Sadeghi license statement

2022-06-23 Thread Mahdyar Sadeghi
 All of my past & future contributions to LibreOffice may be
   licensed under the MPLv2/LGPLv3+ dual license.



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

2022-06-23 Thread Mike Kaganski (via logerrit)
 svx/source/table/svdotable.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 69647b59544a072c78504e88af94c8ee1dd5de0a
Author: Mike Kaganski 
AuthorDate: Thu Jun 23 10:15:58 2022 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jun 23 10:08:05 2022 +0200

Copypasta

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

diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 1b1d643d26d9..4cfa65900ac1 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -2372,7 +2372,7 @@ void SdrTableObj::SaveGeoData(SdrObjGeoData& rGeo) const
 
 void SdrTableObj::RestoreGeoData(const SdrObjGeoData& rGeo)
 {
-DBG_ASSERT( dynamic_cast< const TableObjectGeoData* >( &rGeo ), 
"svx::SdrTableObj::SaveGeoData(), illegal geo data!" );
+DBG_ASSERT( dynamic_cast< const TableObjectGeoData* >( &rGeo ), 
"svx::SdrTableObj::RestoreGeoData(), illegal geo data!" );
 
 maLogicRect = static_cast(rGeo).maLogicRect;
 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - chart2/source

2022-06-23 Thread Tomaž Vajngerl (via logerrit)
 chart2/source/view/charttypes/VSeriesPlotter.cxx |   21 +++--
 chart2/source/view/inc/VSeriesPlotter.hxx|4 +++-
 2 files changed, 18 insertions(+), 7 deletions(-)

New commits:
commit 9a03e2b5ed80ff4f50ff3cc85fd75e32fe42b3f1
Author: Tomaž Vajngerl 
AuthorDate: Wed Jun 22 13:01:52 2022 +0200
Commit: Xisco Fauli 
CommitDate: Thu Jun 23 10:05:29 2022 +0200

tdf#149204 revert getSeriesNames method to the original behaviour

The VSeriesPlotter::getSeriesNames returned a filtered list of
series names without the z-axis names, which is not expected from
the name, so when refactoring the assumption was to return all of
them names. This wasn't correct and has broken rendering of some
charts. This change reverts the method to the original behaviour.

Change-Id: I42464495a1a2b68a34efbc8409ae6c1417ff072d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136280
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit c5c1cbe485b2a24e5964c3e09e8d654e7dfe42c3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136249

diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx 
b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 50ee67dd473b..640abfebb1ab 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2316,20 +2316,29 @@ std::vector VSeriesPlotter::getAllSeries()
 return aAllSeries;
 }
 
-uno::Sequence< OUString > VSeriesPlotter::getSeriesNames() const
+uno::Sequence VSeriesPlotter::getSeriesNames() const
 {
 std::vector aRetVector;
 
 OUString aRole;
-if( m_xChartTypeModel.is() )
+if (m_xChartTypeModel.is())
 aRole = m_xChartTypeModel->getRoleOfSequenceForSeriesLabel();
 
-for (VDataSeries const* pSeries : getAllSeries())
+for (auto const& rGroup : m_aZSlots)
 {
-if (pSeries)
+if (!rGroup.empty())
 {
-OUString aSeriesName( DataSeriesHelper::getDataSeriesLabel( 
pSeries->getModel(), aRole ) );
-aRetVector.push_back( aSeriesName );
+VDataSeriesGroup const & rSeriesGroup(rGroup[0]);
+if (!rSeriesGroup.m_aSeriesVector.empty())
+{
+VDataSeries const * pSeries = 
rSeriesGroup.m_aSeriesVector[0].get();
+rtl::Reference< DataSeries > xSeries( pSeries ? 
pSeries->getModel() : nullptr );
+if( xSeries.is() )
+{
+OUString aSeriesName( 
DataSeriesHelper::getDataSeriesLabel( xSeries, aRole ) );
+aRetVector.push_back( aSeriesName );
+}
+}
 }
 }
 return comphelper::containerToSequence( aRetVector );
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx 
b/chart2/source/view/inc/VSeriesPlotter.hxx
index 90a73f1ee504..ac911be46120 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -234,8 +234,10 @@ public:
 
 void setExplicitCategoriesProvider( ExplicitCategoriesProvider* 
pExplicitCategoriesProvider );
 
+ExplicitCategoriesProvider* getExplicitCategoriesProvider() { return 
m_pExplicitCategoriesProvider; }
+
 //get series names for the z axis labels
-css::uno::Sequence< OUString > getSeriesNames() const;
+css::uno::Sequence getSeriesNames() const;
 
 void setPageReferenceSize( const css::awt::Size & rPageRefSize );
 //better performance for big data


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

2022-06-23 Thread Samuel Mehrbrodt (via logerrit)
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 5491a82854e3e6dd2dbb4b0012cb4bbeb4ee22e0
Author: Samuel Mehrbrodt 
AuthorDate: Wed Jun 22 17:34:00 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jun 23 10:02:57 2022 +0200

tdf#128150 Disable UseSlideBackground item when setting style back to None

from Sidebar

Change-Id: I883330ac7323c4758ca8cbd46f4567a2ea780fc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136290
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx 
b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 801970514854..f94264c210fa 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -256,8 +256,10 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, 
weld::ComboBox&, void)
 mxBmpImport->hide();
 mxLbFillAttr->set_sensitive(false);
 
-// #i122676# need to call a single SID_ATTR_FILL_STYLE change
-setFillStyle(XFillStyleItem(drawing::FillStyle_NONE));
+const XFillStyleItem aXFillStyleItem(drawing::FillStyle_NONE);
+// Need to disable the XFillUseSlideBackgroundItem
+const XFillUseSlideBackgroundItem 
aXFillUseSlideBackgroundItem(false);
+setFillUseBackground(&aXFillStyleItem, 
aXFillUseSlideBackgroundItem);
 break;
 }
 case SOLID:


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

2022-06-23 Thread Noel Grandin (via logerrit)
 formula/source/core/api/token.cxx |9 +
 include/formula/token.hxx |   13 +++--
 2 files changed, 12 insertions(+), 10 deletions(-)

New commits:
commit 26fbf6eef19e2746c28d2f1584505d5e10a295cc
Author: Noel Grandin 
AuthorDate: Wed Jun 22 09:00:52 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 23 09:58:23 2022 +0200

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

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

diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index 9a22d9cd2205..04078302efa1 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace formula
 {
@@ -1933,8 +1934,8 @@ bool FormulaTypedDoubleToken::operator==( const 
FormulaToken& r ) const
 return FormulaDoubleToken::operator==( r ) && mnType == r.GetDoubleType();
 }
 
-FormulaStringToken::FormulaStringToken( const svl::SharedString& r ) :
-FormulaToken( svString ), maString( r )
+FormulaStringToken::FormulaStringToken( svl::SharedString r ) :
+FormulaToken( svString ), maString(std::move( r ))
 {
 }
 
@@ -1961,8 +1962,8 @@ bool FormulaStringToken::operator==( const FormulaToken& 
r ) const
 return FormulaToken::operator==( r ) && maString == r.GetString();
 }
 
-FormulaStringOpToken::FormulaStringOpToken( OpCode e, const svl::SharedString& 
r ) :
-FormulaByteToken( e, 0, svString, ParamClass::Unknown ), maString( r ) {}
+FormulaStringOpToken::FormulaStringOpToken( OpCode e, svl::SharedString r ) :
+FormulaByteToken( e, 0, svString, ParamClass::Unknown ), 
maString(std::move( r )) {}
 
 FormulaStringOpToken::FormulaStringOpToken( const FormulaStringOpToken& r ) :
 FormulaByteToken( r ), maString( r.maString ) {}
diff --git a/include/formula/token.hxx b/include/formula/token.hxx
index ebb08e6d7c17..f534b2c5c801 100644
--- a/include/formula/token.hxx
+++ b/include/formula/token.hxx
@@ -24,6 +24,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -336,7 +337,7 @@ class FORMULA_DLLPUBLIC FormulaStringToken final : public 
FormulaToken
 {
 svl::SharedString maString;
 public:
-FormulaStringToken( const svl::SharedString& r );
+FormulaStringToken( svl::SharedString r );
 FormulaStringToken( const FormulaStringToken& r );
 
 virtual FormulaToken* Clone() const override;
@@ -352,7 +353,7 @@ class FORMULA_DLLPUBLIC FormulaStringOpToken final : public 
FormulaByteToken
 {
 svl::SharedString maString;
 public:
-FormulaStringOpToken( OpCode e, const svl::SharedString& r );
+FormulaStringOpToken( OpCode e, svl::SharedString r );
 FormulaStringOpToken( const FormulaStringOpToken& r );
 
 virtual FormulaToken* Clone() const override;
@@ -386,12 +387,12 @@ class FORMULA_DLLPUBLIC FormulaExternalToken final : 
public FormulaByteToken
 private:
 OUStringaExternal;
 public:
-FormulaExternalToken( OpCode e, sal_uInt8 n, 
const OUString& r ) :
+FormulaExternalToken( OpCode e, sal_uInt8 n, 
OUString  r ) :
 FormulaByteToken( e, n, svExternal, 
ParamClass::Unknown ),
-aExternal( r ) {}
-FormulaExternalToken( OpCode e, const 
OUString& r ) :
+aExternal(std::move( r )) {}
+FormulaExternalToken( OpCode e, OUString  r ) :
 FormulaByteToken( e, 0, svExternal, 
ParamClass::Unknown ),
-aExternal( r ) {}
+aExternal(std::move( r )) {}
 FormulaExternalToken( const 
FormulaExternalToken& r ) :
 FormulaByteToken( r ), aExternal( 
r.aExternal ) {}
 


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

2022-06-23 Thread Stephan Bergmann (via logerrit)
 sc/source/filter/orcus/filterdetect.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit a95c585433246813096e8890b7ed6ef4fe30c621
Author: Stephan Bergmann 
AuthorDate: Wed Jun 22 20:37:34 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jun 23 09:43:24 2022 +0200

Pump XInputStream into an SvMemoryStream rather than an OStringBuffer

...to avoid overflow with streams >= 2^31 bytes.  This should fix


which I could reproduce with a recent master Linux build with

> $ truncate -s 3G test.xml
> $ instdir/program/soffice test.xml

causing a SIGSEGV at

> #0  0x77f193a0 in rtl::str::stringbuffer_insert<_rtl_String, 
char>(_rtl_String**, int*, int, char const*, int) (ppThis=0x7fffb330, 
capacity=, offset=2147479552, pStr=0x20a92e8 "", len=4096) at 
sal/rtl/strtmpl.hxx:1424
> #1  0x7fffb6af04e5 in rtl::OStringBuffer::append(char const*, int) 
(len=4096, str=, this=0x7fffb330) at 
include/rtl/strbuf.hxx:594
> #2  (anonymous 
namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence&)
 (this=, rMediaDescSeq=) at 
sc/source/filter/orcus/filterdetect.cxx:80
[...]

(Ideally, orcus::detect would only need a short prefix of the stream's 
content,
but the implementation in
workdir/UnpackedTarball/liborcus/src/liborcus/format_detection.cpp 
delegates to
functions like orcus_ods::detect in
workdir/UnpackedTarball/liborcus/src/liborcus/orcus_ods.cpp, which passes 
the
content through some zip_archive that presumably needs the full content.)

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

diff --git a/sc/source/filter/orcus/filterdetect.cxx 
b/sc/source/filter/orcus/filterdetect.cxx
index 4e299f1d9371..21eb1d492440 100644
--- a/sc/source/filter/orcus/filterdetect.cxx
+++ b/sc/source/filter/orcus/filterdetect.cxx
@@ -14,7 +14,7 @@
 
 #include 
 
-#include 
+#include 
 
 #include 
 
@@ -68,7 +68,7 @@ OUString 
OrcusFormatDetect::detect(css::uno::Sequence
 return OUString();
 
 css::uno::Reference 
xInputStream(aMediaDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM], 
css::uno::UNO_QUERY );
-OStringBuffer aContent(xInputStream->available());
+SvMemoryStream aContent(xInputStream->available());
 
 static const sal_Int32 nBytes = 4096;
 css::uno::Sequence aSeq(nBytes);
@@ -77,10 +77,10 @@ OUString 
OrcusFormatDetect::detect(css::uno::Sequence
 {
 sal_Int32 nReadBytes = xInputStream->readBytes(aSeq, nBytes);
 bEnd = (nReadBytes != nBytes);
-aContent.append(reinterpret_cast(aSeq.getConstArray()), 
nReadBytes);
+aContent.WriteBytes(aSeq.getConstArray(), nReadBytes);
 }
 
-orcus::format_t eFormat = orcus::detect(reinterpret_cast(aContent.getStr()), aContent.getLength());
+orcus::format_t eFormat = orcus::detect(static_cast(aContent.GetData()), aContent.GetSize());
 
 switch (eFormat)
 {