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

2022-04-04 Thread Caolán McNamara (via logerrit)
 sw/source/core/txtnode/fntcache.cxx |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit a52b1610009096c171b7571b9c2e8c307cada90b
Author: Caolán McNamara 
AuthorDate: Mon Apr 4 13:15:05 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 15:54:57 2022 +0200

Resolves: tdf#148336 portion width can be zero

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

diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index e1c33c85cf2f..e4009930bfbb 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2001,11 +2001,12 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
 else
 rInf.SetKanaDiff( 0 );
 
-aTextSize.setWidth(aKernArray[sal_Int32(nLn) - 1]);
-
-
-if ( rInf.GetKern() && nLn )
-aTextSize.AdjustWidth((sal_Int32(nLn) - 1) * rInf.GetKern());
+if (nLn)
+{
+aTextSize.setWidth(aKernArray[sal_Int32(nLn) - 1]);
+if (rInf.GetKern())
+aTextSize.AdjustWidth((sal_Int32(nLn) - 1) * rInf.GetKern());
+}
 
 OSL_ENSURE( !rInf.GetShell() ||
 ( USHRT_MAX != GetGuessedLeading() && USHRT_MAX != 
GetExternalLeading() ),


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

2022-04-04 Thread Tünde Tóth (via logerrit)
 oox/source/export/drawingml.cxx |4 ++--
 sd/qa/unit/data/odp/tdf53970_linked.odp |binary
 sd/qa/unit/export-tests-ooxml2.cxx  |   27 +--
 3 files changed, 23 insertions(+), 8 deletions(-)

New commits:
commit 85adc43540f75f2e3ce51fb438e5efd777a5b8f7
Author: Tünde Tóth 
AuthorDate: Thu Mar 31 13:11:04 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon Apr 4 17:05:04 2022 +0200

tdf#53970 PPTX: fix broken export of linked media files

Missing TargetMode="External" in the export of
linked media files resulted corrupted PPTX.

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

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 4d0317be921d..d4dbef899b96 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1378,8 +1378,8 @@ void DrawingML::WriteMediaNonVisualProperties(const 
css::uno::ReferenceaddRelation(mpFS->getOutputStream(), 
oox::getRelationship(eMediaType), rURL);
-aMediaRelId = mpFB->addRelation(mpFS->getOutputStream(), 
oox::getRelationship(Relationship::MEDIA), rURL);
+aVideoFileRelId = mpFB->addRelation(mpFS->getOutputStream(), 
oox::getRelationship(eMediaType), rURL, true);
+aMediaRelId = mpFB->addRelation(mpFS->getOutputStream(), 
oox::getRelationship(Relationship::MEDIA), rURL, true);
 }
 
 GetFS()->startElementNS(XML_p, XML_nvPr);
diff --git a/sd/qa/unit/data/odp/tdf53970_linked.odp 
b/sd/qa/unit/data/odp/tdf53970_linked.odp
new file mode 100644
index ..3ddb7933463f
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf53970_linked.odp differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index 6afe97292ea8..dc6498ec614d 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -1814,15 +1814,30 @@ void SdOOXMLExportTest2::testTdf59323_slideFooters()
 
 void SdOOXMLExportTest2::testTdf53970()
 {
-::sd::DrawDocShellRef xDocShRef
-= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf53970.odp"), ODP);
-xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
+// Embedded media file
+{
+::sd::DrawDocShellRef xDocShRef
+= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf53970.odp"), ODP);
+xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
 
+// Without fix in place, the media shape was lost on export.
+CPPUNIT_ASSERT(getPage(0, xDocShRef)->hasElements());
 
-// Without fix in place, the media shape was lost on export.
-CPPUNIT_ASSERT(getPage(0, xDocShRef)->hasElements());
+xDocShRef->DoClose();
+}
 
-xDocShRef->DoClose();
+// Linked media file
+{
+::sd::DrawDocShellRef xDocShRef = loadURL(
+
m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf53970_linked.odp"), ODP);
+utl::TempFile tempFile;
+xDocShRef = saveAndReload(xDocShRef.get(), PPTX, );
+xDocShRef->DoClose();
+
+xmlDocUniquePtr pXmlRels = parseExport(tempFile, 
"ppt/slides/_rels/slide1.xml.rels");
+CPPUNIT_ASSERT(pXmlRels);
+assertXPath(pXmlRels, 
"/rels:Relationships/rels:Relationship[@TargetMode='External']", 2);
+}
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);


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

2022-04-04 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/check.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 88bba21f83ce47a517dabc637fb421ac9bad5416
Author: Stephan Bergmann 
AuthorDate: Mon Apr 4 15:41:16 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Apr 4 17:30:52 2022 +0200

Fix GlobalNamespace check

...so that e.g. building on F36 with -stdlib=libc++ doesn't fail with

> i18nutil/source/utility/paper.cxx:311:75: error: NullToPointer 
ValueDependentIsNotNull ZeroLiteral -> nullptr [loplugin:nullptr]
> locale_t loc = newlocale(LC_PAPER_MASK, "", 
static_cast(0));
>   
^

when the locale_t typedef declaration is nested in extern "C" (from
/usr/include/stdlib.h) which in turn is nested in extern "C++" (from LLVM's
include/c++/v1/math.h)

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

diff --git a/compilerplugins/clang/check.cxx b/compilerplugins/clang/check.cxx
index 003224a21ba1..9952e285b2b5 100644
--- a/compilerplugins/clang/check.cxx
+++ b/compilerplugins/clang/check.cxx
@@ -191,7 +191,10 @@ namespace {
 
 bool isGlobalNamespace(clang::DeclContext const * context) {
 assert(context != nullptr);
-return (context->isLookupContext() ? context : 
context->getLookupParent())->isTranslationUnit();
+while (!context->isLookupContext()) {
+context = context->getLookupParent();
+}
+return context->isTranslationUnit();
 }
 
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - distro-configs/CPAndroidBranding.conf

2022-04-04 Thread Andras Timar (via logerrit)
Rebased ref, commits from common ancestor:
commit 8f79cb7306049c16e48d68b81eb0e67e3f5cb209
Author: Andras Timar 
AuthorDate: Mon Apr 4 15:01:44 2022 +0200
Commit: Andras Timar 
CommitDate: Mon Apr 4 16:43:37 2022 +0200

add a few more languages to Android build

Change-Id: If505c84658504af64a70797ec33fcd4b707a5255

diff --git a/distro-configs/CPAndroidBranding.conf 
b/distro-configs/CPAndroidBranding.conf
index f34f642fdf5d..bae1d088dc1e 100644
--- a/distro-configs/CPAndroidBranding.conf
+++ b/distro-configs/CPAndroidBranding.conf
@@ -7,7 +7,7 @@
 --with-vendor=Collabora
 --disable-scripting-beanshell
 --disable-scripting-javascript
---with-lang=de en-US es fr pt-BR zh-CN zh-TW
+--with-lang=ar cs de en-US es fr he hu it nl pl pt-BR sk sl zh-CN zh-TW
 --with-myspell-dicts
 --enable-pdfimport
 --enable-release-build


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

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 sc/Library_sc.mk  |2 
 sc/inc/SparklineData.hxx  |   42 +++
 sc/inc/globstr.hrc|2 
 sc/qa/unit/SparklineTest.cxx  |   78 ++---
 sc/source/ui/dialogs/SparklineDialog.cxx  |   95 ++
 sc/source/ui/docshell/docfunc.cxx |   82 ++
 sc/source/ui/inc/docfunc.hxx  |7 +
 sc/source/ui/inc/undo/UndoInsertSparkline.hxx |   45 
 sc/source/ui/sparklines/SparklineData.cxx |   30 
 sc/source/ui/undo/UndoInsertSparkline.cxx |   78 +
 10 files changed, 364 insertions(+), 97 deletions(-)

New commits:
commit 54536bca332651051dc8a5ba02995c069cb75fd2
Author: Tomaž Vajngerl 
AuthorDate: Sun Mar 20 20:49:18 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Apr 4 09:52:09 2022 +0200

sc: add Undo/Redo for inserting Sparklines

Move the code to insert a sparkline from the SparklineDialog to
DocFunc and inside the UndoInsertSparkline, so there is no code
duplication and the code can be tested.

Change-Id: I85f4020190ae835b33e706ec9cb2cda9fd6fc752
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132474
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index f145d3a7fbf2..2a9c6f659a0a 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -512,6 +512,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/ui/sidebar/NumberFormatControl \
 sc/source/ui/sidebar/NumberFormatPropertyPanel \
 sc/source/ui/sidebar/ScPanelFactory \
+sc/source/ui/sparklines/SparklineData \
 sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog \
 sc/source/ui/StatisticsDialogs/CorrelationDialog \
 sc/source/ui/StatisticsDialogs/CovarianceDialog \
@@ -549,6 +550,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/ui/undo/undostyl \
 sc/source/ui/undo/undotab \
 sc/source/ui/undo/undoutil \
+sc/source/ui/undo/UndoInsertSparkline \
 sc/source/ui/unoobj/ChartRangeSelectionListener \
 sc/source/ui/unoobj/addruno \
 sc/source/ui/unoobj/afmtuno \
diff --git a/sc/inc/SparklineData.hxx b/sc/inc/SparklineData.hxx
new file mode 100644
index ..80cc8a0329c2
--- /dev/null
+++ b/sc/inc/SparklineData.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include "address.hxx"
+#include "scdllapi.h"
+
+namespace sc
+{
+struct SC_DLLPUBLIC SparklineData
+{
+ScAddress maPosition;
+ScRange maData;
+
+SparklineData(ScAddress const& rPosition, ScRange const& rData)
+: maPosition(rPosition)
+, maData(rData)
+{
+}
+};
+
+enum class RangeOrientation
+{
+Unknown,
+Row,
+Col
+};
+
+SC_DLLPUBLIC RangeOrientation calculateOrientation(sal_Int32 nOutputSize,
+   ScRange const& rInputRange);
+
+} // end sc
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 793d3cb95d55..6ae26c9d4a0f 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -539,7 +539,7 @@
 #define STR_HYPHENATECELL_ONNC_("STR_HYPHENATECELL_ON", 
"Hyphenate: On")
 #define STR_HYPHENATECELL_OFF   NC_("STR_HYPHENATECELL_OFF", 
"Hyphenate: Off")
 #define STR_INDENTCELL  NC_("STR_INDENTCELL", "Indent: 
")
-
+#define STR_UNDO_INSERT_SPARKLINE_GROUP 
NC_("STR_UNDO_INSERT_SPARKLINE", "Insert Sparkline Group")
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/SparklineTest.cxx b/sc/qa/unit/SparklineTest.cxx
index 167c4e4d9e3d..7fafeef861ef 100644
--- a/sc/qa/unit/SparklineTest.cxx
+++ b/sc/qa/unit/SparklineTest.cxx
@@ -11,6 +11,8 @@
 #include 
 #include 
 #include 
+#include 
+
 #include 
 #include 
 
@@ -21,8 +23,6 @@ class SparklineTest : public ScBootstrapFixture
 private:
 uno::Reference m_xCalcComponent;
 
-sc::Sparkline* createTestSparkline(ScDocument& rDocument);
-
 public:
 SparklineTest()
 : ScBootstrapFixture("sc/qa/unit/data")
@@ -50,29 +50,38 @@ public:
 void testDeleteSprkline();
 void testCopyPasteSparkline();
 void testCutPasteSparkline();
+void testUndoRedoInsertSparkline();
 
 CPPUNIT_TEST_SUITE(SparklineTest);
 CPPUNIT_TEST(testAddSparkline);
 CPPUNIT_TEST(testDeleteSprkline);
 CPPUNIT_TEST(testCopyPasteSparkline);
 CPPUNIT_TEST(testCutPasteSparkline);
+CPPUNIT_TEST(testUndoRedoInsertSparkline);
 

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

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 sc/Library_sc.mk  |1 
 sc/inc/document.hxx   |1 
 sc/inc/globstr.hrc|2 
 sc/qa/unit/SparklineTest.cxx  |   69 ++-
 sc/source/core/data/document.cxx  |5 +
 sc/source/ui/docshell/docfunc.cxx |   16 +
 sc/source/ui/inc/docfunc.hxx  |2 
 sc/source/ui/inc/undo/UndoDeleteSparkline.hxx |   43 ++
 sc/source/ui/undo/UndoDeleteSparkline.cxx |   76 ++
 9 files changed, 212 insertions(+), 3 deletions(-)

New commits:
commit 20ed714f87dd22e5f11a65c4208045037dc20017
Author: Tomaž Vajngerl 
AuthorDate: Mon Mar 21 17:26:30 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Apr 4 09:52:29 2022 +0200

sc: add Undo/Redo for deleting a Sparkline

Adds the code to delete the Sparkline via DocFunc + test.

Change-Id: I710a1ee59a5fe5f2bfb91f8bf487501ef39ce949
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132475
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 2a9c6f659a0a..7a7cf817e004 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -551,6 +551,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/ui/undo/undotab \
 sc/source/ui/undo/undoutil \
 sc/source/ui/undo/UndoInsertSparkline \
+sc/source/ui/undo/UndoDeleteSparkline \
 sc/source/ui/unoobj/ChartRangeSelectionListener \
 sc/source/ui/unoobj/addruno \
 sc/source/ui/unoobj/afmtuno \
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 979f6d6985f1..3ae441f895e3 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1250,6 +1250,7 @@ public:
 
 /** Spaklines */
 SC_DLLPUBLIC std::shared_ptr GetSparkline(ScAddress const & 
rPosition);
+SC_DLLPUBLIC bool HasSparkline(ScAddress const & rPosition);
 SC_DLLPUBLIC sc::Sparkline* CreateSparkline(ScAddress const & rPosition, 
std::shared_ptr const& pSparklineGroup);
 SC_DLLPUBLIC sc::SparklineList* GetSparklineList(SCTAB nTab);
 SC_DLLPUBLIC bool DeleteSparkline(ScAddress const& rPosition);
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 6ae26c9d4a0f..bed2e10f9b51 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -540,6 +540,8 @@
 #define STR_HYPHENATECELL_OFF   NC_("STR_HYPHENATECELL_OFF", 
"Hyphenate: Off")
 #define STR_INDENTCELL  NC_("STR_INDENTCELL", "Indent: 
")
 #define STR_UNDO_INSERT_SPARKLINE_GROUP 
NC_("STR_UNDO_INSERT_SPARKLINE", "Insert Sparkline Group")
+#define STR_UNDO_DELETE_SPARKLINE   
NC_("STR_UNDO_DELETE_SPARKLINE", "Delete Sparkline")
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/SparklineTest.cxx b/sc/qa/unit/SparklineTest.cxx
index 7fafeef861ef..6173cea5f297 100644
--- a/sc/qa/unit/SparklineTest.cxx
+++ b/sc/qa/unit/SparklineTest.cxx
@@ -47,17 +47,19 @@ public:
 }
 
 void testAddSparkline();
-void testDeleteSprkline();
+void testClearContentSprkline();
 void testCopyPasteSparkline();
 void testCutPasteSparkline();
 void testUndoRedoInsertSparkline();
+void testUndoRedoDeleteSparkline();
 
 CPPUNIT_TEST_SUITE(SparklineTest);
 CPPUNIT_TEST(testAddSparkline);
-CPPUNIT_TEST(testDeleteSprkline);
+CPPUNIT_TEST(testClearContentSprkline);
 CPPUNIT_TEST(testCopyPasteSparkline);
 CPPUNIT_TEST(testCutPasteSparkline);
 CPPUNIT_TEST(testUndoRedoInsertSparkline);
+CPPUNIT_TEST(testUndoRedoDeleteSparkline);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -117,7 +119,7 @@ void SparklineTest::testAddSparkline()
 xDocSh->DoClose();
 }
 
-void SparklineTest::testDeleteSprkline()
+void SparklineTest::testClearContentSprkline()
 {
 ScDocShellRef xDocSh = loadEmptyDocument();
 CPPUNIT_ASSERT(xDocSh);
@@ -288,6 +290,67 @@ void SparklineTest::testUndoRedoInsertSparkline()
 xDocSh->DoClose();
 }
 
+void SparklineTest::testUndoRedoDeleteSparkline()
+{
+ScDocShellRef xDocSh = loadEmptyDocument();
+CPPUNIT_ASSERT(xDocSh);
+
+ScDocument& rDocument = xDocSh->GetDocument();
+ScTabViewShell* pViewShell = xDocSh->GetBestViewShell(false);
+CPPUNIT_ASSERT(pViewShell);
+
+auto& rDocFunc = xDocSh->GetDocFunc();
+
+// Try to delete sparkline that doesn't exist - returns false
+CPPUNIT_ASSERT(!rDocFunc.DeleteSparkline(ScAddress(0, 6, 0)));
+
+// insert test data - A1:A6
+insertTestData(rDocument);
+
+// Sparkline range
+ScRange aRange(0, 6, 0, 0, 6, 0);
+
+// Check Sparkline at cell A7 doesn't exists
+auto pSparkline = rDocument.GetSparkline(aRange.aStart);
+CPPUNIT_ASSERT(!pSparkline);
+
+auto pSparklineGroup = std::make_shared();
+CPPUNIT_ASSERT(rDocFunc.InsertSparklines(ScRange(0, 0, 0, 0, 5, 0), 
aRange, pSparklineGroup));
+
+// Check Sparkline at cell A7 exists
+

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

2022-04-04 Thread Szymon Kłos (via logerrit)
 vcl/source/app/salvtables.cxx |2 +-
 vcl/source/window/paint.cxx   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 788599c7df58546900874ff0443be8522f9b4a04
Author: Szymon Kłos 
AuthorDate: Fri Apr 1 13:20:02 2022 +0200
Commit: Szymon Kłos 
CommitDate: Mon Apr 4 11:22:46 2022 +0200

lok: fix formulabar rendering

While forwardporting it was not taken into account that
no pixel/logic conversion is needed.

regression in:
commit cf5b0d5972b02809e9b7f35780885445242b3f12
Author: Szymon Kłos 
Date:   Mon Jan 17 13:11:19 2022 +0100

RTL: lok: render correctly interim windows

Change-Id: Ic6716bf9335d4a9297e3e5edfeb161702b846efb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132424
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tumer 

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 9eb7ff7fe665..9f40b770ffbb 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1351,7 +1351,7 @@ void SalInstanceWidget::DoRecursivePaint(vcl::Window* 
pWindow, const Point& rRen
 = pChild->GetOutDev()->GetOutOffYPixel() - 
pWindow->GetOutDev()->GetOutOffYPixel();
 
 Point aPos(rRenderLogicPos);
-aPos += rOutput.PixelToLogic(Point(nDeltaX, nDeltaY));
+aPos += Point(nDeltaX, nDeltaY);
 
 DoRecursivePaint(pChild, aPos, rOutput);
 }
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 49fd65f8c5fe..40172ade6a9e 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1421,7 +1421,7 @@ void Window::ImplPaintToDevice( OutputDevice* 
i_pTargetOutDev, const Point& i_rP
 if( bHasMirroredGraphics )
 nDeltaX = GetOutDev()->mnOutWidth - nDeltaX - 
pChild->GetOutDev()->mnOutWidth;
 
-tools::Long nDeltaY = pChild->GetOutDev()->mnOutOffY - 
GetOutDev()->mnOutOffY;
+tools::Long nDeltaY = pChild->GetOutOffYPixel() - 
GetOutOffYPixel();
 
 Point aPos( i_rPos );
 aPos += Point(nDeltaX, nDeltaY);


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

2022-04-04 Thread Caolán McNamara (via logerrit)
 source/text/shared/01/0218.xhp |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8dfebaba1d7e2874af4001ce15d807b436891925
Author: Caolán McNamara 
AuthorDate: Mon Apr 4 12:45:39 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 14:03:35 2022 +0200

add a warning about data exfiltration on allowing update of links/webservice

Change-Id: I7c5cbcc7ffbf831d5266df196d56f7940fc7765c
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/132507
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/source/text/shared/01/0218.xhp 
b/source/text/shared/01/0218.xhp
index a0adb2661..31e3b4d65 100644
--- a/source/text/shared/01/0218.xhp
+++ b/source/text/shared/01/0218.xhp
@@ -74,5 +74,6 @@
 
 When you open a file that contains 
links, you are prompted to update the links. Depending on where the linked 
files are stored, the update process can take several minutes to 
complete.
 If you are loading a file that 
contains DDE links, you are prompted to update the links. Decline the update if 
you do not want to establish a connection to the DDE server.
+Links to remote 
locations can be constructed that transmit local data to the remote server. 
Decline the prompt to update if you do not trust the document.
 
 


[Libreoffice-commits] core.git: helpcontent2

2022-04-04 Thread Caolán McNamara (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1af123a588306419a9d22d6ee31ea8ee5f35a4f7
Author: Caolán McNamara 
AuthorDate: Mon Apr 4 13:03:36 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Apr 4 14:03:36 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 8dfebaba1d7e2874af4001ce15d807b436891925
  - add a warning about data exfiltration on allowing update of 
links/webservice

Change-Id: I7c5cbcc7ffbf831d5266df196d56f7940fc7765c
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/132507
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/helpcontent2 b/helpcontent2
index 9fcf9e1c7100..8dfebaba1d7e 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 9fcf9e1c710086a70bdd339ca60baead658a2cda
+Subproject commit 8dfebaba1d7e2874af4001ce15d807b436891925


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

2022-04-04 Thread Jan-Marek Glogowski (via logerrit)
 vcl/qt5/QtFrame.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cec215e0e3adaf26c89c4ffbaa53f87481772f0c
Author: Jan-Marek Glogowski 
AuthorDate: Mon Apr 4 11:25:22 2022 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Mon Apr 4 17:35:21 2022 +0200

tdf#147523 Qt use inner QWidget to set pointer pos

Regression from commit e63fe68fb1d0915b64fdf63f7fa6eed866fa3a0d
("Qt use asChild for pointer positioning"), which should just have
been a cleanup for commit ca28826a087245686d7fca3ffc8ca1f03307924d
("tdf#131467 Qt set default position on first resize").

And scale the requested position by the device scale factor.

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

diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index a70b6616c0a7..6c2e4757f84a 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -883,7 +883,7 @@ void QtFrame::SetPointerPos(tools::Long nX, tools::Long nY)
 {
 // some cursor already exists (and it has m_ePointerStyle shape)
 // so here we just reposition it
-QCursor::setPos(asChild()->mapToGlobal(QPoint(nX, nY)));
+QCursor::setPos(m_pQWidget->mapToGlobal(QPoint(nX, nY) / 
devicePixelRatioF()));
 }
 
 void QtFrame::Flush()


[Libreoffice-commits] core.git: Branch 'feature/sparklines' - sc/uiconfig

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 sc/uiconfig/scalc/menubar/menubar.xml |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 4633b77fd0a16a493ffb619a83eb0c2d0a87a876
Author: Tomaž Vajngerl 
AuthorDate: Mon Apr 4 22:20:05 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Apr 4 22:20:05 2022 +0900

sc: add sparklines commands to main menu

Change-Id: Ie69d78162fb0d845f8ffd181397569c3cd3276f1

diff --git a/sc/uiconfig/scalc/menubar/menubar.xml 
b/sc/uiconfig/scalc/menubar/menubar.xml
index 01710700db98..0bec8ed64b59 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -572,6 +572,16 @@
   
 
   
+  
+
+  
+  
+  
+  
+  
+  
+
+  
   
   
   


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

2022-04-04 Thread Caolán McNamara (via logerrit)
 sc/inc/globstr.hrc   |2 +-
 sc/inc/helpids.h |2 ++
 sc/inc/strings.hrc   |2 ++
 sc/source/ui/docshell/docsh4.cxx |   20 
 4 files changed, 25 insertions(+), 1 deletion(-)

New commits:
commit 321dac0b80c875247ae064e023d107d3ac1caef3
Author: Caolán McNamara 
AuthorDate: Mon Apr 4 12:30:40 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 15:54:24 2022 +0200

clarify that the link warning is a security relevant one

add a tooltip to the "allow button" about trust and add a help button
that links to documentation on the risk

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

diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index bed2e10f9b51..0eb0e7929625 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -345,7 +345,7 @@
 #define STR_DOC_PRINTED NC_("STR_DOC_PRINTED", 
"Printed")
 #define STR_BY  NC_("STR_BY", "by")
 #define STR_ON  NC_("STR_ON", "on")
-#define STR_RELOAD_TABLES   NC_("STR_RELOAD_TABLES", 
"Automatic update of external links has been disabled.")
+#define STR_RELOAD_TABLES   NC_("STR_RELOAD_TABLES", 
"Security Warning: Automatic update of external links has been disabled.")
 #define STR_REIMPORT_AFTER_LOAD NC_("STR_REIMPORT_AFTER_LOAD", 
"This file contains queries. The results of these queries were not saved.\nDo 
you want these queries to be repeated?")
 #define STR_INSERT_FULL NC_("STR_INSERT_FULL", "Filled 
cells cannot be shifted\nbeyond the sheet.")
 #define STR_TABINSERT_ERROR NC_("STR_TABINSERT_ERROR", 
"The table could not be inserted.")
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index d677f133edf0..bb9ff1c2faed 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -168,6 +168,8 @@ inline constexpr OStringLiteral HID_SELECTTABLES = 
"SC_HID_SELECTTABLES";
 #define HID_AAI_FUNC_IMSECH 
"SC_HID_AAI_FUNC_IMSECH"
 #define HID_AAI_FUNC_IMCSCH 
"SC_HID_AAI_FUNC_IMCSCH"
 
+#define HID_UPDATE_LINK_WARNING 
"cui/ui/baselinksdialog/UPDATE_NOW"
+
 // DateFunc Addin Functions (max.20) -
 #define HID_DAI_FUNC_DAYSINMONTH
"SC_HID_DAI_FUNC_DAYSINMONTH"
 #define HID_DAI_FUNC_DAYSINYEAR 
"SC_HID_DAI_FUNC_DAYSINYEAR"
diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index 2e5f646af476..8f94d9a94104 100644
--- a/sc/inc/strings.hrc
+++ b/sc/inc/strings.hrc
@@ -361,6 +361,8 @@
 #define STR_INPUT_DATA_RANGE
NC_("STR_INPUT_DATA_RANGE", "Input data range")
 /*infobar for allowing links to update or not*/
 #define STR_ENABLE_CONTENT  NC_("STR_ENABLE_CONTENT", 
"Allow updating")
+/*tooltip for the "Allow updating" infobar button*/
+#define STR_ENABLE_CONTENT_TOOLTIP  
NC_("STR_ENABLE_CONTENT_TOOLTIP", "Only allow updating if you trust this 
document.")
 /*Insert image dialog*/
 #define STR_ANCHOR_TO_CELL  NC_("STR_ANCHOR_TO_CELL", 
"To cell")
 #define STR_ANCHOR_TO_CELL_RESIZE   
NC_("STR_ANCHOR_TO_CELL_RESIZE", "To cell (resize with cell)")
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 3d69269d5a36..15ba7c8abba4 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -40,6 +40,7 @@ using namespace ::com::sun::star;
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -206,6 +207,21 @@ IMPL_LINK_NOARG( ScDocShell, ReloadAllLinksHdl, 
weld::Button&, void )
 SAL_WARN_IF(!pViewFrame, "sc", "expected there to be a ViewFrame");
 }
 
+namespace
+{
+class LinkHelp
+{
+public:
+DECL_STATIC_LINK(LinkHelp, DispatchHelpLinksHdl, weld::Button&, void);
+};
+}
+
+IMPL_STATIC_LINK(LinkHelp, DispatchHelpLinksHdl, weld::Button&, rBtn, void)
+{
+if (Help* pHelp = Application::GetHelp())
+pHelp->Start(HID_UPDATE_LINK_WARNING, );
+}
+
 void ScDocShell::Execute( SfxRequest& rReq )
 {
 const SfxItemSet* pReqArgs = rReq.GetArgs();
@@ -525,8 +541,12 @@ void ScDocShell::Execute( SfxRequest& rReq )
 auto pInfoBar = 
pViewFrame->AppendInfoBar("enablecontent", "", ScResId(STR_RELOAD_TABLES), 
InfobarType::WARNING);
 if (pInfoBar)
 {
+weld::Button& rHelpBtn = pInfoBar->addButton();
+
rHelpBtn.set_label(GetStandardText(StandardButtonType::Help).replaceFirst("~", 
""));
+

[Libreoffice-commits] core.git: include/xmloff sc/CppunitTest_sc_sparkline_test.mk schema/libreoffice sc/inc sc/Library_sc.mk sc/qa sc/source xmloff/source

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 include/xmloff/xmltoken.hxx |   26 
 sc/CppunitTest_sc_sparkline_test.mk |6 
 sc/Library_sc.mk|2 
 sc/inc/SparklineGroup.hxx   |1 
 sc/qa/unit/SparklineImportExportTest.cxx|   84 ++-
 sc/source/filter/xml/SparklineGroupsExport.cxx  |  222 
 sc/source/filter/xml/SparklineGroupsExport.hxx  |   48 +
 sc/source/filter/xml/SparklineGroupsImportContext.cxx   |  332 
 sc/source/filter/xml/SparklineGroupsImportContext.hxx   |   61 ++
 sc/source/filter/xml/xmlexprt.cxx   |   15 
 sc/source/filter/xml/xmlexprt.hxx   |1 
 sc/source/filter/xml/xmltabi.cxx|5 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |  165 +
 xmloff/source/core/xmltoken.cxx |   28 -
 xmloff/source/token/tokens.txt  |   26 
 15 files changed, 1016 insertions(+), 6 deletions(-)

New commits:
commit bd992ae1228b2f7e556f89f95949da0aeade5b91
Author: Tomaž Vajngerl 
AuthorDate: Fri Mar 25 14:53:48 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Apr 4 16:22:11 2022 +0200

sc: sparkline import/export for ODF

Change-Id: I0d8293cdd35cc8c7afab98efac0a28a3613d122b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132505
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 22e2459387ec..86cc93f9a3a2 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -449,8 +449,16 @@ namespace xmloff::token {
 XML_CODEBASE,
 XML_COLLAPSE,
 XML_COLOR,
+XML_COLOR_AXIS,
+XML_COLOR_FIRST,
+XML_COLOR_HIGH,
 XML_COLOR_INVERSION,
+XML_COLOR_LAST,
+XML_COLOR_LOW,
+XML_COLOR_MARKERS,
 XML_COLOR_MODE,
+XML_COLOR_NEGATIVE,
+XML_COLOR_SERIES,
 XML_COLOR_SCALE,
 XML_COLOR_SCALE_ENTRY,
 XML_COLOR_TABLE,
@@ -593,6 +601,7 @@ namespace xmloff::token {
 XML_DATA_PILOT_TABLE,
 XML_DATA_PILOT_TABLES,
 XML_DATA_POINT,
+XML_DATA_RANGE,
 XML_DATA_STREAM_SOURCE,
 XML_DATA_STYLE,
 XML_DATA_STYLE_NAME,
@@ -609,6 +618,7 @@ namespace xmloff::token {
 XML_DATABASE_SOURCE_TABLE,
 XML_DATABASE_TABLE_NAME,
 XML_DATE,
+XML_DATE_AXIS,
 XML_DATE_IS,
 XML_DATE_ADJUST,
 XML_DATE_STYLE,
@@ -668,12 +678,15 @@ namespace xmloff::token {
 XML_DISPLAY_DETAILS,
 XML_DISPLAY_DUPLICATES,
 XML_DISPLAY_EMPTY,
+XML_DISPLAY_EMPTY_CELLS_AS,
 XML_DISPLAY_FILTER_BUTTONS,
 XML_DISPLAY_FORMULA,
+XML_DISPLAY_HIDDEN,
 XML_DISPLAY_LABEL,
 XML_DISPLAY_LEVELS,
 XML_DISPLAY_NAME,
 XML_DISPLAY_OUTLINE_LEVEL,
+XML_DISPLAY_X_AXIS,
 XML_DISSOLVE,
 XML_DISTANCE,
 XML_DISTANCE_AFTER_SEP,
@@ -1181,6 +1194,7 @@ namespace xmloff::token {
 XML_LINE_SKEW,
 XML_LINE_SPACING,
 XML_LINE_STYLE,
+XML_LINE_WIDTH,
 XML_LINEAR,
 XML_LINEARGRADIENT,
 XML_LINENUMBERING_CONFIGURATION,
@@ -1208,6 +1222,7 @@ namespace xmloff::token {
 XML_LOGARITHMIC,
 XML_LOGBASE,
 XML_LONG,
+XML_LOW,
 XML_LOWLIMIT,
 XML_LR_TB,
 XML_LT,
@@ -1221,6 +1236,8 @@ namespace xmloff::token {
 XML_MALIGNGROUP,
 XML_MALIGNMARK,
 XML_MANUAL,
+XML_MANUAL_MIN,
+XML_MANUAL_MAX,
 XML_MAP,
 XML_MARGIN_BOTTOM,
 XML_MARGIN_LEFT,
@@ -1228,6 +1245,7 @@ namespace xmloff::token {
 XML_MARGIN_TOP,
 XML_MARGINS,
 XML_MARKER,
+XML_MARKERS,
 XML_MARKER_END,
 XML_MARKER_END_CENTER,
 XML_MARKER_END_WIDTH,
@@ -1246,6 +1264,7 @@ namespace xmloff::token {
 XML_MATRIX_COVERED,
 XML_MATRIXROW,
 XML_MAX,
+XML_MAX_AXIS_TYPE,
 XML_MAX_EDGE,
 XML_MAX_HEIGHT,
 XML_MAX_LENGTH,
@@ -1271,6 +1290,7 @@ namespace xmloff::token {
 XML_MIDDLE,
 XML_MIME_TYPE,
 XML_MIN,
+XML_MIN_AXIS_TYPE,
 XML_MIN_DENOMINATOR_DIGITS,
 XML_MIN_EDGE,
 XML_MIN_EXPONENT_DIGITS,
@@ -1345,6 +1365,7 @@ namespace xmloff::token {
 XML_NAMED_RANGE,
 XML_NAVIGATION_MODE,
 XML_NAVY,
+XML_NEGATIVE,
 XML_NEGATIVE_COLOR,
 XML_NEQ,
 XML_NEW,
@@ -1606,6 +1627,7 @@ namespace xmloff::token {
 XML_RIGHT,
 XML_RIGHT_OUTSIDE,
 XML_RIGHT_TEXT,
+XML_RIGHT_TO_LEFT,
 XML_RIGHTARC,
 XML_RIGHTCIRCLE,
 XML_RING,
@@ -1760,6 +1782,10 @@ namespace xmloff::token {

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - distro-configs/CPAndroidBranding.conf

2022-04-04 Thread Andras Timar (via logerrit)
Rebased ref, commits from common ancestor:
commit 73365d977ea12dabf36237058702105cce3ba894
Author: Andras Timar 
AuthorDate: Mon Apr 4 15:01:44 2022 +0200
Commit: Andras Timar 
CommitDate: Mon Apr 4 15:57:12 2022 +0200

add a few more languages to Android build

Change-Id: If505c84658504af64a70797ec33fcd4b707a5255

diff --git a/distro-configs/CPAndroidBranding.conf 
b/distro-configs/CPAndroidBranding.conf
index f34f642fdf5d..553baa9d51cd 100644
--- a/distro-configs/CPAndroidBranding.conf
+++ b/distro-configs/CPAndroidBranding.conf
@@ -7,7 +7,7 @@
 --with-vendor=Collabora
 --disable-scripting-beanshell
 --disable-scripting-javascript
---with-lang=de en-US es fr pt-BR zh-CN zh-TW
+--with-lang=ar cz de en-US es fr he hu it nl pl pt-BR sk sl zh-CN zh-TW
 --with-myspell-dicts
 --enable-pdfimport
 --enable-release-build


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - external/liborcus

2022-04-04 Thread Caolán McNamara (via logerrit)
 external/liborcus/forcepoint-83.patch.1 |   16 
 external/liborcus/forcepoint-84.patch.1 |   16 
 2 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 3e57f46c67ae06c30ec2da2c37c602d34af24dab
Author: Caolán McNamara 
AuthorDate: Thu Mar 24 08:56:39 2022 +
Commit: Michael Stahl 
CommitDate: Mon Apr 4 17:46:09 2022 +0200

forcepoint#83 forcepoint#84 update to upstream fix

Change-Id: I5add09b4379a1f86a720af75b758389424f4f50b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132055
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 2323fa29617e4919226517d50abbb9ad33b320ca)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132412
Reviewed-by: Michael Stahl 

diff --git a/external/liborcus/forcepoint-83.patch.1 
b/external/liborcus/forcepoint-83.patch.1
index bfd3bb86fcf9..644c0dcfff4e 100644
--- a/external/liborcus/forcepoint-83.patch.1
+++ b/external/liborcus/forcepoint-83.patch.1
@@ -1,4 +1,4 @@
-From 283b45ba3bcb22dc28303a09a96c9b94f86d1ba2 Mon Sep 17 00:00:00 2001
+From 4d58816e995a562f26f3cc5006ae9ddd46b1bbed Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= 
 Date: Wed, 23 Mar 2022 16:44:00 +
 Subject: [PATCH] forcepoint#83 Invalid read of size 1
@@ -17,22 +17,22 @@ Subject: [PATCH] forcepoint#83 Invalid read of size 1
 ==343916==by 0x30E60945: (anonymous 
namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence&)
 (filterdetect.cxx:83)
 ==343916==by 0x30E60ABE: non-virtual thunk to (anonymous 
namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence&)
 (filterdetect.cxx:0)
 ---
- include/orcus/sax_parser.hpp | 2 ++
- 1 file changed, 2 insertions(+)
+ include/orcus/sax_parser.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/include/orcus/sax_parser.hpp b/include/orcus/sax_parser.hpp
-index 15e8d917..d0fc45b5 100644
+index 15e8d917..2e707568 100644
 --- a/include/orcus/sax_parser.hpp
 +++ b/include/orcus/sax_parser.hpp
-@@ -255,6 +255,8 @@ void 
sax_parser<_Handler,_Config>::element_open(std::ptrdiff_t begin_pos)
+@@ -255,7 +255,7 @@ void 
sax_parser<_Handler,_Config>::element_open(std::ptrdiff_t begin_pos)
  while (true)
  {
  skip_space_and_control();
-+if (!has_char())
-+return;
- char c = cur_char();
+-char c = cur_char();
++char c = cur_char_checked();
  if (c == '/')
  {
+ // Self-closing element: 
 -- 
 2.35.1
 
diff --git a/external/liborcus/forcepoint-84.patch.1 
b/external/liborcus/forcepoint-84.patch.1
index 3bd8e26465a9..462fc8bd972d 100644
--- a/external/liborcus/forcepoint-84.patch.1
+++ b/external/liborcus/forcepoint-84.patch.1
@@ -1,4 +1,4 @@
-From 0fee6c0e3074be11874f1911a76f10eef5f59985 Mon Sep 17 00:00:00 2001
+From ec469f774bb91302c4df21eff1314dfd508d37c8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= 
 Date: Wed, 23 Mar 2022 20:04:31 +
 Subject: [PATCH] forcepoint#84 Invalid read of size 1
@@ -17,22 +17,22 @@ Subject: [PATCH] forcepoint#84 Invalid read of size 1
 ==356879==by 0x11BE3855: orcus::orcus_xlsx::detect(unsigned char const*, 
unsigned long) (orcus_xlsx.cpp:188)
 ==356879==by 0x11AB2492: orcus::detect(unsigned char const*, unsigned 
long) (format_detection.cpp:60)
 ---
- src/parser/sax_parser_base.cpp | 2 ++
- 1 file changed, 2 insertions(+)
+ src/parser/sax_parser_base.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/parser/sax_parser_base.cpp b/src/parser/sax_parser_base.cpp
-index 46acb81d..11791edc 100644
+index 46acb81d..1cee821e 100644
 --- a/src/parser/sax_parser_base.cpp
 +++ b/src/parser/sax_parser_base.cpp
-@@ -298,6 +298,8 @@
+@@ -298,7 +298,7 @@ void parser_base::value_with_encoded_char(cell_buffer& 
buf, std::string_view& st
  
  bool parser_base::value(pstring& str, bool decode)
  {
-+if (!has_char())
-+throw malformed_xml_error("value must be quoted", offset());
- char c = cur_char();
+-char c = cur_char();
++char c = cur_char_checked();
  if (c != '"' && c != '\'')
  throw malformed_xml_error("value must be quoted", offset());
+ 
 -- 
 2.35.1
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - distro-configs/CPAndroidBranding.conf

2022-04-04 Thread Andras Timar (via logerrit)
 distro-configs/CPAndroidBranding.conf |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit eaa046325dae7d171c6edc96cb82938263e586fd
Author: Andras Timar 
AuthorDate: Mon Apr 4 15:01:44 2022 +0200
Commit: Andras Timar 
CommitDate: Mon Apr 4 15:01:44 2022 +0200

add a few more languages to Android build

Change-Id: If505c84658504af64a70797ec33fcd4b707a5255

diff --git a/distro-configs/CPAndroidBranding.conf 
b/distro-configs/CPAndroidBranding.conf
index f34f642fdf5d..553baa9d51cd 100644
--- a/distro-configs/CPAndroidBranding.conf
+++ b/distro-configs/CPAndroidBranding.conf
@@ -7,7 +7,7 @@
 --with-vendor=Collabora
 --disable-scripting-beanshell
 --disable-scripting-javascript
---with-lang=de en-US es fr pt-BR zh-CN zh-TW
+--with-lang=ar cz de en-US es fr he hu it nl pl pt-BR sk sl zh-CN zh-TW
 --with-myspell-dicts
 --enable-pdfimport
 --enable-release-build


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

2022-04-04 Thread Miklos Vajna (via logerrit)
 sw/inc/deletelistener.hxx|   16 ++--
 sw/source/filter/ww8/ww8scan.cxx |  144 +++
 sw/source/filter/ww8/ww8scan.hxx |   20 ++---
 3 files changed, 90 insertions(+), 90 deletions(-)

New commits:
commit 85d5113dc0472f59b60ce34ccf70c21a0edbe097
Author: Miklos Vajna 
AuthorDate: Mon Apr 4 08:07:18 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon Apr 4 09:01:44 2022 +0200

sw: prefix members of SfxDeleteListener, SvtDeleteListener, ...

... WW8PLCFx_AtnBook and WW8PLCFx_Book

See tdf#94879 for motivation.

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

diff --git a/sw/inc/deletelistener.hxx b/sw/inc/deletelistener.hxx
index 2b212e418fef..4d0b142c3561 100644
--- a/sw/inc/deletelistener.hxx
+++ b/sw/inc/deletelistener.hxx
@@ -50,11 +50,11 @@ public:
 class SvtDeleteListener final : public SvtListener
 {
 private:
-bool bObjectDeleted;
+bool m_bObjectDeleted;
 
 public:
 explicit SvtDeleteListener(SvtBroadcaster& rNotifier)
-: bObjectDeleted(false)
+: m_bObjectDeleted(false)
 {
 StartListening(rNotifier);
 }
@@ -62,20 +62,20 @@ public:
 virtual void Notify(const SfxHint& rHint) override
 {
 if (rHint.GetId() == SfxHintId::Dying)
-bObjectDeleted = true;
+m_bObjectDeleted = true;
 }
 
-bool WasDeleted() const { return bObjectDeleted; }
+bool WasDeleted() const { return m_bObjectDeleted; }
 };
 
 class SfxDeleteListener final : public SfxListener
 {
 private:
-bool bObjectDeleted;
+bool m_bObjectDeleted;
 
 public:
 explicit SfxDeleteListener(SfxBroadcaster& rNotifier)
-: bObjectDeleted(false)
+: m_bObjectDeleted(false)
 {
 StartListening(rNotifier);
 }
@@ -83,10 +83,10 @@ public:
 virtual void Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) override
 {
 if (rHint.GetId() == SfxHintId::Dying)
-bObjectDeleted = true;
+m_bObjectDeleted = true;
 }
 
-bool WasDeleted() const { return bObjectDeleted; }
+bool WasDeleted() const { return m_bObjectDeleted; }
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 1c6df69dc0dd..9bace0021bda 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -4281,31 +4281,31 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, 
sal_uInt32 nStart, sal_Int32 nLen
 }
 
 WW8PLCFx_Book::WW8PLCFx_Book(SvStream* pTableSt, const WW8Fib& rFib)
-: WW8PLCFx(rFib, false), nIsEnd(0), nBookmarkId(1)
+: WW8PLCFx(rFib, false), m_nIsEnd(0), m_nBookmarkId(1)
 {
 if( !rFib.m_fcPlcfbkf || !rFib.m_lcbPlcfbkf || !rFib.m_fcPlcfbkl ||
 !rFib.m_lcbPlcfbkl || !rFib.m_fcSttbfbkmk || !rFib.m_lcbSttbfbkmk )
 {
-nIMax = 0;
+m_nIMax = 0;
 }
 else
 {
-pBook[0].reset( new 
WW8PLCFspecial(pTableSt,rFib.m_fcPlcfbkf,rFib.m_lcbPlcfbkf,4) );
+m_pBook[0].reset( new 
WW8PLCFspecial(pTableSt,rFib.m_fcPlcfbkf,rFib.m_lcbPlcfbkf,4) );
 
-pBook[1].reset( new 
WW8PLCFspecial(pTableSt,rFib.m_fcPlcfbkl,rFib.m_lcbPlcfbkl,0) );
+m_pBook[1].reset( new 
WW8PLCFspecial(pTableSt,rFib.m_fcPlcfbkl,rFib.m_lcbPlcfbkl,0) );
 
 rtl_TextEncoding eStructChrSet = 
WW8Fib::GetFIBCharset(rFib.m_chseTables, rFib.m_lid);
 
 WW8ReadSTTBF( (7 < rFib.m_nVersion), *pTableSt, rFib.m_fcSttbfbkmk,
-rFib.m_lcbSttbfbkmk, 0, eStructChrSet, aBookNames );
+rFib.m_lcbSttbfbkmk, 0, eStructChrSet, m_aBookNames );
 
-nIMax = aBookNames.size();
+m_nIMax = m_aBookNames.size();
 
-if( pBook[0]->GetIMax() < nIMax )   // Count of Bookmarks
-nIMax = pBook[0]->GetIMax();
-if( pBook[1]->GetIMax() < nIMax )
-nIMax = pBook[1]->GetIMax();
-aStatus.resize(nIMax);
+if( m_pBook[0]->GetIMax() < m_nIMax )   // Count of Bookmarks
+m_nIMax = m_pBook[0]->GetIMax();
+if( m_pBook[1]->GetIMax() < m_nIMax )
+m_nIMax = m_pBook[1]->GetIMax();
+m_aStatus.resize(m_nIMax);
 }
 }
 
@@ -4315,44 +4315,44 @@ WW8PLCFx_Book::~WW8PLCFx_Book()
 
 sal_uInt32 WW8PLCFx_Book::GetIdx() const
 {
-return nIMax ? pBook[0]->GetIdx() : 0;
+return m_nIMax ? m_pBook[0]->GetIdx() : 0;
 }
 
 void WW8PLCFx_Book::SetIdx(sal_uInt32 nI)
 {
-if( nIMax )
-pBook[0]->SetIdx( nI );
+if( m_nIMax )
+m_pBook[0]->SetIdx( nI );
 }
 
 sal_uInt32 WW8PLCFx_Book::GetIdx2() const
 {
-return nIMax ? ( pBook[1]->GetIdx() | ( nIsEnd ? 0x8000 : 0 ) ) : 0;
+return m_nIMax ? ( m_pBook[1]->GetIdx() | ( m_nIsEnd ? 0x8000 : 0 ) ) 
: 0;
 }
 
 void WW8PLCFx_Book::SetIdx2(sal_uInt32 nI)
 {
-if( nIMax )
+

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

2022-04-04 Thread Caolán McNamara (via logerrit)
 sw/source/core/doc/doctxm.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 602eb74e50685c27f34e6bf64a600519a52105cb
Author: Caolán McNamara 
AuthorDate: Mon Apr 4 09:02:01 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 11:43:35 2022 +0200

cid#1503776 Explicit null dereferenced

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

diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index df997eb34a43..9e6990247484 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -762,8 +762,8 @@ static bool IsHeadingContained(const SwTextNode* pChptrNd, 
const SwNode& rNd)
 Point aPt(0, 0);
 std::pair const tmp(aPt, false);
 
-const SwFrame* pChptrFrame = pChptrNd->getLayoutFrame(
-
pChptrNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, 
);
+const SwFrame* pChptrFrame = pChptrNd ? pChptrNd->getLayoutFrame(
+
pChptrNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, 
) : nullptr;
 const SwPageFrame* pChptrPgFrame = pChptrFrame ? 
pChptrFrame->FindPageFrame() : nullptr;
 const SwFrame* pNdFrame
 = pCNd ? pCNd->getLayoutFrame(


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

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 sc/Library_sc.mk|2 
 sc/inc/SparklineAttributes.hxx  |  145 
 sc/inc/SparklineGroup.hxx   |  118 --
 sc/qa/unit/SparklineImportExportTest.cxx|  124 +-
 sc/source/filter/excel/export/SparklineExt.cxx  |   94 
 sc/source/filter/inc/export/SparklineExt.hxx|6 
 sc/source/filter/oox/SparklineFragment.cxx  |   80 +++
 sc/source/ui/dialogs/SparklineDialog.cxx|   70 +++---
 sc/source/ui/sparklines/SparklineAttributes.cxx |  273 
 sc/source/ui/sparklines/SparklineGroup.cxx  |   25 ++
 sc/source/ui/view/output.cxx|   79 +++---
 11 files changed, 684 insertions(+), 332 deletions(-)

New commits:
commit 634399594cfd1672caaf412ed4bc945f12aa4913
Author: Tomaž Vajngerl 
AuthorDate: Tue Mar 22 15:12:55 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Apr 4 14:25:40 2022 +0200

sc: split attrs out of SparklineGroup into a COW class

The attributes can be independent of the actual SparklineGroup,
so they can be shared through multiple SparklineGroups and with
the attributes being COW, they can be safely changed without the
fear that it will impact a different SparklineGroup insstance.

Change-Id: I274b1243d014288ea34a213326ef765ceff86a58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132502
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 7a7cf817e004..2c78147abf62 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -512,7 +512,9 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/ui/sidebar/NumberFormatControl \
 sc/source/ui/sidebar/NumberFormatPropertyPanel \
 sc/source/ui/sidebar/ScPanelFactory \
+sc/source/ui/sparklines/SparklineAttributes \
 sc/source/ui/sparklines/SparklineData \
+sc/source/ui/sparklines/SparklineGroup \
 sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog \
 sc/source/ui/StatisticsDialogs/CorrelationDialog \
 sc/source/ui/StatisticsDialogs/CovarianceDialog \
diff --git a/sc/inc/SparklineAttributes.hxx b/sc/inc/SparklineAttributes.hxx
new file mode 100644
index ..e89e15bc1a1b
--- /dev/null
+++ b/sc/inc/SparklineAttributes.hxx
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include "scdllapi.h"
+#include 
+#include 
+#include 
+#include 
+
+namespace sc
+{
+/** Supported sparkline types */
+enum class SparklineType
+{
+Line,
+Column,
+Stacked
+};
+
+/** The method of calculating the axis min or max value */
+enum class AxisType
+{
+Individual, // calculate the min/max of a sparkline
+Group, // calculate the min or max of the whole sparkline group
+Custom // user defined
+};
+
+/** Determines how to display the empty cells */
+enum class DisplayEmptyCellsAs
+{
+Span,
+Gap,
+Zero // empty cell equals zero
+};
+
+/** Common properties for a group of sparklines */
+class SC_DLLPUBLIC SparklineAttributes
+{
+private:
+class Implementation;
+o3tl::cow_wrapper m_aImplementation;
+
+public:
+SparklineAttributes();
+~SparklineAttributes();
+SparklineAttributes(const SparklineAttributes& rOther);
+SparklineAttributes(SparklineAttributes&& rOther);
+SparklineAttributes& operator=(const SparklineAttributes& rOther);
+SparklineAttributes& operator=(SparklineAttributes&& rOther);
+
+bool operator==(const SparklineAttributes& rOther) const;
+bool operator!=(const SparklineAttributes& rOther) const
+{
+return !(SparklineAttributes::operator==(rOther));
+}
+
+Color getColorSeries() const;
+void setColorSeries(Color aColorSeries);
+
+Color getColorNegative() const;
+void setColorNegative(Color aColorSeries);
+
+Color getColorAxis() const;
+void setColorAxis(Color aColorSeries);
+
+Color getColorMarkers() const;
+void setColorMarkers(Color aColorSeries);
+
+Color getColorFirst() const;
+void setColorFirst(Color aColorSeries);
+
+Color getColorLast() const;
+void setColorLast(Color aColorSeries);
+
+Color getColorHigh() const;
+void setColorHigh(Color aColorSeries);
+
+Color getColorLow() const;
+void setColorLow(Color aColorSeries);
+
+AxisType getMinAxisType() const;
+void setMinAxisType(AxisType eAxisType);
+
+AxisType getMaxAxisType() const;
+void setMaxAxisType(AxisType eAxisType);
+
+/** Line weigth or width in points */
+double getLineWeight() const;
+void setLineWeight(double nWeight);
+
+SparklineType getType() const;
+

Re: autogen.sh error

2022-04-04 Thread Ilmari Lauhakangas

On 3.4.2022 19.23, 徐恩华 wrote:

Hello everyone,
there is some error, when I try build on macos 12.3 with apple M1 pro.  
I have installed autoconf、automake and libtool, but some errors occours 
when run autogen.sh .


It sounds like you did not follow the lode method: 
https://wiki.documentfoundation.org/Development/lode


Maybe you should try it. Be sure to do the changes in ~/.zprofile

Ilmari


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

2022-04-04 Thread Miklos Vajna (via logerrit)
 sw/inc/cmdid.h |1 
 sw/inc/unoprnms.hxx|1 
 sw/qa/core/unocore/unocore.cxx |   35 ++
 sw/source/core/inc/unoport.hxx |9 +
 sw/source/core/unocore/unomap1.cxx |1 
 sw/source/core/unocore/unoport.cxx |6 +++
 sw/source/core/unocore/unoportenum.cxx |   52 -
 7 files changed, 103 insertions(+), 2 deletions(-)

New commits:
commit cb35526e9221d9781abb3cee2ba6971736b6b333
Author: Miklos Vajna 
AuthorDate: Mon Apr 4 08:23:06 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon Apr 4 09:14:57 2022 +0200

sw content controls: include this in the UNO API text portion enum

Which is how UNO API clients (e.g. ODT export) will be able to read
RES_TXTATR_CONTENTCONTROL.

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

diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 4add360583bb..27a3763c1d64 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -642,6 +642,7 @@ class SwUINumRuleItem;
 #define FN_UNO_TRANSFORMED_GRAPHIC  (FN_EXTRA2 + 129)
 #define FN_UNO_GRAPHIC_PREVIEW  (FN_EXTRA2 + 130)
 #define FN_UNO_LINEBREAK (FN_EXTRA2 + 131)
+#define FN_UNO_CONTENT_CONTROL (FN_EXTRA2 + 132)
 
 // Area: Help
 // Region: Traveling & Selection
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 6a04072fdae5..3e6516b3551c 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -870,6 +870,7 @@
 #define UNO_NAME_ALLOW_OVERLAP "AllowOverlap"
 #define UNO_NAME_CLEAR "Clear"
 #define UNO_NAME_LINEBREAK "LineBreak"
+#define UNO_NAME_CONTENT_CONTROL "ContentControl"
 #define UNO_NAME_SHOWING_PLACE_HOLDER "ShowingPlaceHolder"
 #endif
 
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index b03c91b39425..c9bca82ae2f8 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -371,6 +371,41 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testImageTooltip)
 CPPUNIT_ASSERT_EQUAL(aExpected, getProperty(xImageProps, 
"Tooltip"));
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlTextPortionEnum)
+{
+// Given a document with a content control around one or more text 
portions:
+createSwDoc();
+uno::Reference xMSF(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xText = xTextDocument->getText();
+uno::Reference xCursor = xText->createTextCursor();
+xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+xCursor->gotoStart(/*bExpand=*/false);
+xCursor->gotoEnd(/*bExpand=*/true);
+uno::Reference xContentControl(
+xMSF->createInstance("com.sun.star.text.ContentControl"), 
uno::UNO_QUERY);
+xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+// When enumerating the text portions of the only paragraph in the 
document:
+uno::Reference xTextPortion = 
getRun(getParagraph(1), 1);
+
+// Then make sure that the text portion type is correct + the content can 
be read:
+auto aPortionType = getProperty(xTextPortion, "TextPortionType");
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: ContentControl
+// - Actual  : Text
+// i.e. the content control text attribute was ignored.
+CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+xContentControl
+= getProperty>(xTextPortion, 
"ContentControl");
+uno::Reference xContentControlRange(xContentControl, 
uno::UNO_QUERY);
+xText = xContentControlRange->getText();
+uno::Reference xContentEnumAccess(xText, 
uno::UNO_QUERY);
+uno::Reference xContentEnum = 
xContentEnumAccess->createEnumeration();
+uno::Reference xContent(xContentEnum->nextElement(), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("test"), xContent->getString());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/unoport.hxx b/sw/source/core/inc/unoport.hxx
index 76cf877db70b..936bc01e0521 100644
--- a/sw/source/core/inc/unoport.hxx
+++ b/sw/source/core/inc/unoport.hxx
@@ -75,7 +75,8 @@ enum SwTextPortionType
 PORTION_FIELD_START_END,
 PORTION_ANNOTATION,
 PORTION_ANNOTATION_END,
-PORTION_LINEBREAK
+PORTION_LINEBREAK,
+PORTION_CONTENT_CONTROL
 };
 
 class SwXTextPortion : public cppu::WeakImplHelper
@@ -109,6 +110,7 @@ private:
 css::uno::Reference< css::text::XTextContent >
 m_xMeta;
 css::uno::Reference m_xLineBreak;
+css::uno::Reference m_xContentControl;
 std::unique_ptr< css::uno::Any > m_pRubyText;
 std::unique_ptr< css::uno::Any > m_pRubyStyle;
 std::unique_ptr< css::uno::Any > m_pRubyAdjust;
@@ -229,6 +231,11 @@ public:
 m_xLineBreak = xLineBreak;
 }
 
+void 

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

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 sc/inc/column.hxx  |2 -
 sc/inc/table.hxx   |1 
 sc/qa/unit/SparklineTest.cxx   |   65 +
 sc/source/core/data/table2.cxx |   17 ++
 sc/source/ui/undo/undoblk3.cxx |2 +
 5 files changed, 86 insertions(+), 1 deletion(-)

New commits:
commit af38d84380ee78f61822e8e080a56e955842b71e
Author: Tomaž Vajngerl 
AuthorDate: Tue Mar 22 11:03:24 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Apr 4 09:53:21 2022 +0200

sc: undo/redo for sparklines when deleting the cell content

This adds support for undo/redo when clearing the content of a
cell, which includes a sparkline.

Change-Id: I79d9ef965e21cf5b35de84aa3b5cb93b644777ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132476
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 3afda2acd885..f60ea22cbc30 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -674,7 +674,7 @@ public:
 void DeleteSparklineCells(sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, 
SCROW nRow2);
 bool DeleteSparkline(SCROW nRow);
 bool IsSparklinesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
-void CopyCellSparklinesToDocument(SCROW nRow1, SCROW nRow2, ScColumn& 
rDestCol, SCROW nRowOffsetDest) const;
+void CopyCellSparklinesToDocument(SCROW nRow1, SCROW nRow2, ScColumn& 
rDestCol, SCROW nRowOffsetDest = 0) const;
 void DuplicateSparklines(SCROW nStartRow, size_t nDataSize, ScColumn& 
rDestCol,
  sc::ColumnBlockPosition& rDestBlockPos, SCROW 
nRowOffsetDest = 0) const;
 
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 14eb33fa50f7..7a3ce91a43a0 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -477,6 +477,7 @@ public:
 bool DeleteSparkline(SCCOL nCol, SCROW nRow);
 
 sc::SparklineList& GetSparklineList();
+void CopySparklinesToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW 
nRow2, ScTable* pDestTab);
 
 // Notes / Comments
 std::unique_ptr ReleaseNote( SCCOL nCol, SCROW nRow );
diff --git a/sc/qa/unit/SparklineTest.cxx b/sc/qa/unit/SparklineTest.cxx
index 6173cea5f297..ac9c0996ac59 100644
--- a/sc/qa/unit/SparklineTest.cxx
+++ b/sc/qa/unit/SparklineTest.cxx
@@ -52,6 +52,7 @@ public:
 void testCutPasteSparkline();
 void testUndoRedoInsertSparkline();
 void testUndoRedoDeleteSparkline();
+void testUndoRedoClearContentForSparkline();
 
 CPPUNIT_TEST_SUITE(SparklineTest);
 CPPUNIT_TEST(testAddSparkline);
@@ -60,6 +61,7 @@ public:
 CPPUNIT_TEST(testCutPasteSparkline);
 CPPUNIT_TEST(testUndoRedoInsertSparkline);
 CPPUNIT_TEST(testUndoRedoDeleteSparkline);
+CPPUNIT_TEST(testUndoRedoClearContentForSparkline);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -351,6 +353,69 @@ void SparklineTest::testUndoRedoDeleteSparkline()
 xDocSh->DoClose();
 }
 
+void SparklineTest::testUndoRedoClearContentForSparkline()
+{
+ScDocShellRef xDocSh = loadEmptyDocument();
+CPPUNIT_ASSERT(xDocSh);
+
+ScDocument& rDocument = xDocSh->GetDocument();
+ScTabViewShell* pViewShell = xDocSh->GetBestViewShell(false);
+CPPUNIT_ASSERT(pViewShell);
+
+auto& rDocFunc = xDocSh->GetDocFunc();
+
+// Try to delete sparkline that doesn't exist - returns false
+CPPUNIT_ASSERT(!rDocFunc.DeleteSparkline(ScAddress(0, 6, 0)));
+
+// insert test data - A1:A6
+insertTestData(rDocument);
+
+// Sparkline range
+ScRange aRange(0, 6, 0, 0, 6, 0);
+
+// Check Sparkline at cell A7 doesn't exists
+auto pSparkline = rDocument.GetSparkline(aRange.aStart);
+CPPUNIT_ASSERT(!pSparkline);
+
+auto pSparklineGroup = std::make_shared();
+CPPUNIT_ASSERT(rDocFunc.InsertSparklines(ScRange(0, 0, 0, 0, 5, 0), 
aRange, pSparklineGroup));
+
+// Check Sparkline at cell A7 exists
+pSparkline = rDocument.GetSparkline(aRange.aStart);
+CPPUNIT_ASSERT(pSparkline);
+CPPUNIT_ASSERT_EQUAL(SCCOL(0), pSparkline->getColumn());
+CPPUNIT_ASSERT_EQUAL(SCROW(6), pSparkline->getRow());
+
+// Clear content - including sparkline
+ScMarkData aMark(rDocument.GetSheetLimits());
+aMark.SetMarkArea(aRange.aStart);
+rDocFunc.DeleteContents(aMark, InsertDeleteFlags::CONTENTS, true, true);
+
+// Check Sparkline at cell A7 doesn't exists
+pSparkline = rDocument.GetSparkline(aRange.aStart);
+CPPUNIT_ASSERT(!pSparkline);
+
+// Undo
+rDocument.GetUndoManager()->Undo();
+
+// Check Sparkline at cell A7 exists
+pSparkline = rDocument.GetSparkline(aRange.aStart);
+CPPUNIT_ASSERT(pSparkline);
+CPPUNIT_ASSERT_EQUAL(SCCOL(0), pSparkline->getColumn());
+CPPUNIT_ASSERT_EQUAL(SCROW(6), pSparkline->getRow());
+
+// Redo
+rDocument.GetUndoManager()->Redo();
+
+// Check Sparkline at cell A7 doesn't exists
+pSparkline = rDocument.GetSparkline(aRange.aStart);
+CPPUNIT_ASSERT(!pSparkline);
+
+

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

2022-04-04 Thread Caolán McNamara (via logerrit)
 sc/source/core/data/documen4.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ad352fee880c006a5ca57354b0552bc1f81a28fb
Author: Caolán McNamara 
AuthorDate: Mon Apr 4 09:14:10 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 11:44:49 2022 +0200

ofz: Timeout

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

diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index d19f9cedf91b..04732630b629 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -274,9 +274,9 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW 
nRow1,
 if (utl::ConfigManager::IsFuzzing())
 {
 // just too slow
-if (nCol2 - nCol1 > 256)
+if (nCol2 - nCol1 > 128)
 return;
-if (nRow2 - nRow1 > 256)
+if (nRow2 - nRow1 > 128)
 return;
 }
 assert( ValidColRow( nCol1, nRow1) && ValidColRow( nCol2, nRow2));


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

2022-04-04 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/svm/SvmConverter.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8a13488f19a8be3bdaa58c7a08fbd26ed08e6e29
Author: Caolán McNamara 
AuthorDate: Mon Apr 4 09:11:18 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 11:44:12 2022 +0200

ofz: Invalid-enum-value

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

diff --git a/vcl/source/filter/svm/SvmConverter.cxx 
b/vcl/source/filter/svm/SvmConverter.cxx
index 78ba871d448e..7dffac6dc4a1 100644
--- a/vcl/source/filter/svm/SvmConverter.cxx
+++ b/vcl/source/filter/svm/SvmConverter.cxx
@@ -673,7 +673,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, 
GDIMetaFile& rMtf )
 aFont.SetCharSet( static_cast(nCharSet) );
 aFont.SetFamily( static_cast(nFamily) );
 aFont.SetPitch( static_cast(nPitch) );
-aFont.SetAlignment( static_cast(nAlign) );
+aFont.SetAlignment( static_cast(nAlign & 
SAL_MAX_ENUM) );
 aFont.SetWeight( ( nWeight == 1 ) ? WEIGHT_LIGHT : ( nWeight 
== 2 ) ? WEIGHT_NORMAL :
  ( nWeight == 3 ) ? WEIGHT_BOLD : 
WEIGHT_DONTKNOW );
 aFont.SetUnderline( static_cast(nUnderline & 
SAL_MAX_ENUM) );


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

2022-04-04 Thread Caolán McNamara (via logerrit)
 hwpfilter/source/hwpreader.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6905434f40a1b3a58955b3b444d69f239be1b14e
Author: Caolán McNamara 
AuthorDate: Mon Apr 4 09:08:52 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 11:43:57 2022 +0200

ofz#46331 Null-dereference READ

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

diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 8c84970867ba..7ab6689f8df3 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -4442,7 +4442,7 @@ void HwpReader::makeHidden(Hidden * hbox)
 
 while (para)
 {
-for (int n = 0; n < para->nch && para->hhstr[n]->hh;
+for (int n = 0; n < para->nch && para->hhstr.count(n) && 
para->hhstr[n]->hh;
 n += para->hhstr[n]->WSize())
 {
   res = hcharconv(para->hhstr[n]->hh, dest, UNICODE);


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

2022-04-04 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/forcepoint103.html |binary
 sw/qa/extras/layout/layout.cxx  |6 ++
 sw/source/core/layout/layact.cxx|   12 +++-
 sw/source/core/layout/tabfrm.cxx|1 +
 4 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 7ca71fdb06af29429e749a2aa89dff57dd932635
Author: Caolán McNamara 
AuthorDate: Sun Apr 3 17:07:45 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 09:48:24 2022 +0200

forcepoint#103 avoid crash on layout of specific html

return early if the prev frame was unexpectedly deleted

and another similar case to forcepoint#100 and drop a
SwBorderAttrAccess to allow the cache entry to be removed
in SwCache::DeleteObj

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

diff --git a/sw/qa/extras/layout/data/forcepoint103.html 
b/sw/qa/extras/layout/data/forcepoint103.html
new file mode 100644
index ..006a6d340ef0
Binary files /dev/null and b/sw/qa/extras/layout/data/forcepoint103.html differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index a788bd9171d1..e02f0202f406 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2548,6 +2548,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint102)
 createSwDoc(DATA_DIRECTORY, "forcepoint102.rtf");
 }
 
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint103)
+{
+createSwWebDoc(DATA_DIRECTORY, "forcepoint103.html");
+}
+
 //just care it doesn't crash/assert
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf147485Forcepoint)
 {
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 558cbdff22f8..bb46c23e11a3 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -60,6 +60,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1694,7 +1695,10 @@ bool SwLayAction::FormatContent(SwPageFrame *const pPage)
 // We do this so we don't have to search later on.
 const bool bNxtCnt = IsCalcLayout() && !pContent->GetFollow();
 const SwContentFrame *pContentNext = bNxtCnt ? 
pContent->GetNextContentFrame() : nullptr;
-const SwContentFrame *pContentPrev = pContent->GetPrev() ? 
pContent->GetPrevContentFrame() : nullptr;
+SwContentFrame* const pContentPrev = pContent->GetPrev() ? 
pContent->GetPrevContentFrame() : nullptr;
+std::optional oPrevDeleteListener;
+if (pContentPrev)
+oPrevDeleteListener.emplace(*pContentPrev);
 
 const SwLayoutFrame*pOldUpper  = pContent->GetUpper();
 const SwTabFrame *pTab = pContent->FindTabFrame();
@@ -1773,6 +1777,12 @@ bool SwLayAction::FormatContent(SwPageFrame *const pPage)
 bool bSetContent = true;
 if ( pContentPrev )
 {
+if (oPrevDeleteListener->WasDeleted())
+{
+SAL_WARN("sw", "ContentPrev was deleted");
+return false;
+}
+
 if ( !pContentPrev->isFrameAreaDefinitionValid() && 
pPage->IsAnLower( pContentPrev ) )
 {
 pPage->InvalidateContent();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index f9f655392521..e092db0286ef 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2550,6 +2550,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 }
 }
 
+oAccess.reset();
 const bool bSplitError = !Split( nDeadLine, bTryToSplit, ( 
bTableRowKeep && !(bAllowSplitOfRow || bEmulateTableKeepSplitAllowed) ) );
 
 // tdf#130639 don't start table on a new page after the 
fallback "switch off repeating header"


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

2022-04-04 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/svm/SvmConverter.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ab53399cb80de649eb3752bf8984733c40ba1eba
Author: Caolán McNamara 
AuthorDate: Mon Apr 4 09:25:03 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 11:45:08 2022 +0200

ofz#46332 Invalid-enum-value

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

diff --git a/vcl/source/filter/svm/SvmConverter.cxx 
b/vcl/source/filter/svm/SvmConverter.cxx
index 7dffac6dc4a1..c22b41b236b0 100644
--- a/vcl/source/filter/svm/SvmConverter.cxx
+++ b/vcl/source/filter/svm/SvmConverter.cxx
@@ -671,8 +671,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, 
GDIMetaFile& rMtf )
 
 aFont.SetFontSize( Size( nWidth, nHeight ) );
 aFont.SetCharSet( static_cast(nCharSet) );
-aFont.SetFamily( static_cast(nFamily) );
-aFont.SetPitch( static_cast(nPitch) );
+aFont.SetFamily( static_cast(nFamily & 
SAL_MAX_ENUM) );
+aFont.SetPitch( static_cast(nPitch & SAL_MAX_ENUM) 
);
 aFont.SetAlignment( static_cast(nAlign & 
SAL_MAX_ENUM) );
 aFont.SetWeight( ( nWeight == 1 ) ? WEIGHT_LIGHT : ( nWeight 
== 2 ) ? WEIGHT_NORMAL :
  ( nWeight == 3 ) ? WEIGHT_BOLD : 
WEIGHT_DONTKNOW );


New Defects reported by Coverity Scan for LibreOffice

2022-04-04 Thread scan-admin
Hi,

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

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

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


** CID 1503776:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1503776:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/doc/doctxm.cxx: 950 in SwTOXBaseSection::Update(const 
SfxItemSet *, const SwRootFrame *, bool)()
944 const_cast(pSectNd)->DelFrames();
945 
946 // This would be a good time to update the Numbering
947 rDoc.UpdateNumRule();
948 
949 if( GetCreateType() & SwTOXElement::Mark )
>>> CID 1503776:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pOwnChapterNode" to "UpdateMarks", which 
>>> dereferences it.
950 UpdateMarks( aIntl, pOwnChapterNode, pLayout );
951 
952 if( GetCreateType() & SwTOXElement::OutlineLevel )
953 UpdateOutline( pOwnChapterNode, pLayout );
954 
955 if( GetCreateType() & SwTOXElement::Template )



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DdMpA_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi0ZQgbs0gB9SLdoJTGYbzKUhXkVBARAt2g81Sgh5yeqTwdcqyLp7nb43tn0o-2Fsa31GnkDTMyXYY3mObPIKaLJw7YuDvVwUMNHlXbTIKof7izda6ouN3duLZcuFOl11Lbo3HZx-2Fpwu2cjEw6yarnqkqLanY27Po-2BHia8iKmipHRqk-3D



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

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 sc/inc/SparklineGroup.hxx   |   31 +-
 sc/inc/clipcontext.hxx  |7 +-
 sc/inc/column.hxx   |   11 +++
 sc/inc/mtvcellfunc.hxx  |8 ++
 sc/qa/unit/SparklineTest.cxx|  110 
 sc/source/core/data/clipcontext.cxx |   21 ++
 sc/source/core/data/column.cxx  |1 
 sc/source/core/data/column2.cxx |   87 +---
 sc/source/core/data/column3.cxx |   14 
 sc/source/core/data/column4.cxx |   50 ++--
 sc/source/core/data/document10.cxx  |3 
 sc/source/ui/inc/cliputil.hxx   |6 +
 12 files changed, 327 insertions(+), 22 deletions(-)

New commits:
commit b8cf500ed8ac7bd01a351e2815ce8251e506d79c
Author: Tomaž Vajngerl 
AuthorDate: Sat Mar 19 12:52:21 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Apr 4 09:51:36 2022 +0200

sc: add support for copy/cut and paste of Sparklines

Currently cut,copy and paste will copy the Sparkline and create
a new SparklineGroup for each cell in the new cell range. This
probably need to be adjusted so the SparklineGroup is shared.

Change-Id: I6f86bb026753b2b4b5bfa46aca4ca9794721f311
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132473
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/inc/SparklineGroup.hxx b/sc/inc/SparklineGroup.hxx
index 0d3935492d04..9f00985e9f61 100644
--- a/sc/inc/SparklineGroup.hxx
+++ b/sc/inc/SparklineGroup.hxx
@@ -105,7 +105,36 @@ public:
 {
 }
 
-SparklineGroup(const SparklineGroup&) = delete;
+SparklineGroup(SparklineGroup const& pOtherSparkline)
+: m_aColorSeries(pOtherSparkline.m_aColorSeries)
+, m_aColorNegative(pOtherSparkline.m_aColorNegative)
+, m_aColorAxis(pOtherSparkline.m_aColorAxis)
+, m_aColorMarkers(pOtherSparkline.m_aColorMarkers)
+, m_aColorFirst(pOtherSparkline.m_aColorFirst)
+, m_aColorLast(pOtherSparkline.m_aColorLast)
+, m_aColorHigh(pOtherSparkline.m_aColorHigh)
+, m_aColorLow(pOtherSparkline.m_aColorLow)
+, m_eMinAxisType(pOtherSparkline.m_eMinAxisType)
+, m_eMaxAxisType(pOtherSparkline.m_eMaxAxisType)
+, m_fLineWeight(pOtherSparkline.m_fLineWeight)
+, m_eType(pOtherSparkline.m_eType)
+, m_bDateAxis(pOtherSparkline.m_bDateAxis)
+, m_eDisplayEmptyCellsAs(pOtherSparkline.m_eDisplayEmptyCellsAs)
+, m_bMarkers(pOtherSparkline.m_bMarkers)
+, m_bHigh(pOtherSparkline.m_bHigh)
+, m_bLow(pOtherSparkline.m_bLow)
+, m_bFirst(pOtherSparkline.m_bFirst)
+, m_bLast(pOtherSparkline.m_bLast)
+, m_bNegative(pOtherSparkline.m_bNegative)
+, m_bDisplayXAxis(pOtherSparkline.m_bDisplayXAxis)
+, m_bDisplayHidden(pOtherSparkline.m_bDisplayHidden)
+, m_bRightToLeft(pOtherSparkline.m_bRightToLeft)
+, m_aManualMax(pOtherSparkline.m_aManualMax)
+, m_aManualMin(pOtherSparkline.m_aManualMin)
+, m_sUID(pOtherSparkline.m_sUID)
+{
+}
+
 SparklineGroup& operator=(const SparklineGroup&) = delete;
 };
 
diff --git a/sc/inc/clipcontext.hxx b/sc/inc/clipcontext.hxx
index 32e2dd97767a..b09e1be78761 100644
--- a/sc/inc/clipcontext.hxx
+++ b/sc/inc/clipcontext.hxx
@@ -12,6 +12,7 @@
 #include "address.hxx"
 #include "cellvalue.hxx"
 #include "celltextattr.hxx"
+#include "Sparkline.hxx"
 
 #include 
 #include 
@@ -60,11 +61,11 @@ class SC_DLLPUBLIC CopyFromClipContext final : public 
ClipContextBase
 std::vector maSingleCellAttrs;
 std::vector maSinglePatterns;
 std::vector maSingleNotes;
+std::vector> maSingleSparkline;
 
 ScConditionalFormatList* mpCondFormatList;
 bool mbAsLink:1;
 bool mbSkipEmptyCells:1;
-bool mbCloneNotes:1;
 bool mbTableProtected:1;
 
 public:
@@ -119,6 +120,9 @@ public:
 const ScPostIt* getSingleCellNote( size_t nColOffset ) const;
 void setSingleCellNote( size_t nColOffset, const ScPostIt* pNote );
 
+std::shared_ptr const& getSingleSparkline(size_t 
nColOffset) const;
+void setSingleSparkline(size_t nColOffset, std::shared_ptr 
const& pSparkline);
+
 void setCondFormatList( ScConditionalFormatList* pCondFormatList );
 ScConditionalFormatList* getCondFormatList();
 
@@ -135,6 +139,7 @@ public:
  */
 bool isSkipEmptyCells() const;
 bool isCloneNotes() const;
+bool isCloneSparklines() const;
 bool isDateCell( const ScColumn& rCol, SCROW nRow ) const;
 };
 
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 36ea217a481a..3afda2acd885 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -229,6 +229,9 @@ friend class sc::CellStoreEvent;
 SCROW nRow, SCTAB nTab, const OUString& rString, 
formula::FormulaGrammar::AddressConvention eConv,
 const ScSetStringParam* pParam );
 
+void duplicateSparkline(sc::CopyFromClipContext& rContext, 
sc::ColumnBlockPosition* pBlockPos,
+  

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

2022-04-04 Thread Mike Kaganski (via logerrit)
 basic/source/classes/sb.cxx   |   16 
 basic/source/inc/sbunoobj.hxx |2 +-
 basic/source/sbx/sbxvar.cxx   |9 +
 include/basic/sbxdef.hxx  |1 +
 include/basic/sbxvar.hxx  |6 +++---
 5 files changed, 22 insertions(+), 12 deletions(-)

New commits:
commit de81c2545aec06a1b269218b7d00656e97d8b66c
Author: Mike Kaganski 
AuthorDate: Mon Apr 4 09:58:53 2022 +0300
Commit: Mike Kaganski 
CommitDate: Mon Apr 4 11:06:00 2022 +0200

Related: tdf#144245 Optimize case-insensitive handling

1. Make BasicCollection::implGetIndexForName take OUString again,
after commit f7de7de1189ae4e63f73468076da47b37fe61ede made it take
std::u16string_view. All call sites pass OUStrings, and commit
ef32c3b4f9b80918d6018e14297fa41245afd381 made it create OUString
from the argument.
2. Have SbxVariable cache a case-insensitive variant of the name.
It is currently only used in the Collection implementation, but
may be used in other places; Tthe names are case-insensitive in
Basic, and VBA allows non-ASCII characters in names, so this
caching might be useful elsewhere.
3. Skip non-ASCII characters when calculating name hash, to allow
non-ASCII-containing strings still have some hash variance, when
at least some of the first 6 characters are ASCII.

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

diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 5c99408847b6..902f7adfd91f 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -2065,26 +2065,26 @@ sal_Int32 BasicCollection::implGetIndex( SbxVariable 
const * pIndexVar )
 return nIndex;
 }
 
-sal_Int32 BasicCollection::implGetIndexForName(std::u16string_view rName)
+sal_Int32 BasicCollection::implGetIndexForName(const OUString& rName)
 {
-sal_Int32 nIndex = -1;
 sal_Int32 nCount = xItemArray->Count();
 sal_Int32 nNameHash = MakeHashCode( rName );
 
 // tdf#144245 - case-insensitive operation for non-ASCII characters
-utl::TransliterationWrapper& rTransliteration = 
SbGlobal::GetTransliteration();
+OUString aNameCI; // Only initialize when matching hash found
 
 for( sal_Int32 i = 0 ; i < nCount ; i++ )
 {
 SbxVariable* pVar = xItemArray->Get(i);
-if (pVar->GetHashCode() == nNameHash
-&& rTransliteration.isEqual(pVar->GetName(), OUString(rName)))
+if (pVar->GetHashCode() == nNameHash)
 {
-nIndex = i;
-break;
+if (aNameCI.isEmpty() && !rName.isEmpty())
+aNameCI = SbGlobal::GetTransliteration().transliterate(rName, 
0, rName.getLength());
+if (aNameCI == pVar->GetName(SbxNameType::CaseInsensitive))
+return i;
 }
 }
-return nIndex;
+return -1;
 }
 
 void BasicCollection::CollAdd( SbxArray* pPar_ )
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index 1f3042951e51..1fc8ebe4e6c1 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -350,7 +350,7 @@ class BasicCollection final : public SbxObject
 virtual ~BasicCollection() override;
 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
 sal_Int32 implGetIndex( SbxVariable const * pIndexVar );
-sal_Int32 implGetIndexForName(std::u16string_view rName);
+sal_Int32 implGetIndexForName(const OUString& rName);
 void CollAdd( SbxArray* pPar_ );
 void CollItem( SbxArray* pPar_ );
 void CollRemove( SbxArray* pPar_ );
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 8fb11bf9f2a2..a08122961b66 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -30,6 +30,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 using namespace com::sun::star::uno;
@@ -183,6 +185,7 @@ void SbxVariable::SetName( const OUString& rName )
 {
 maName = rName;
 nHash = MakeHashCode( rName );
+maNameCI.clear();
 }
 
 const OUString& SbxVariable::GetName( SbxNameType t ) const
@@ -192,6 +195,12 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
 {
 return maName;
 }
+if (t == SbxNameType::CaseInsensitive)
+{
+if (maNameCI.isEmpty() && !maName.isEmpty())
+maNameCI = SbGlobal::GetTransliteration().transliterate(maName, 0, 
maName.getLength());
+return maNameCI;
+}
 // Request parameter-information (not for objects)
 const_cast(this)->GetInfo();
 // Append nothing, if it is a simple property (no empty brackets)
diff --git a/include/basic/sbxdef.hxx b/include/basic/sbxdef.hxx
index b52b0beb3c7d..e85f1a209664 100644
--- a/include/basic/sbxdef.hxx
+++ b/include/basic/sbxdef.hxx
@@ -122,6 +122,7 @@ enum SbxOperator {
 
 enum class SbxNameType {  // 

[Libreoffice-commits] core.git: translations

2022-04-04 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c84e166de3ba993eb4d1c01d6b0fbe00d5f6572e
Author: Christian Lohmaier 
AuthorDate: Mon Apr 4 12:40:31 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Mon Apr 4 12:40:31 2022 +0200

Update git submodules

* Update translations from branch 'master'
  to 4f65f25bc54fc4078363522caa2623c5de387c6f
  - update translations for master

and force-fix errors using pocheck

Change-Id: Iaad2f8d129208996bc1fef023045616b51aeff05

diff --git a/translations b/translations
index 149fb7cb5fbb..4f65f25bc54f 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 149fb7cb5fbb3f555c66b2c93d057776f63e9ce3
+Subproject commit 4f65f25bc54fc4078363522caa2623c5de387c6f


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

2022-04-04 Thread Mike Kaganski (via logerrit)
 sw/source/uibase/dbui/mailmergehelper.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 9e889c39feef8bc8da0adc498f9ad7f5bad4542d
Author: Mike Kaganski 
AuthorDate: Sat Apr 2 11:10:22 2022 +0300
Commit: Xisco Fauli 
CommitDate: Mon Apr 4 13:12:37 2022 +0200

tdf#148338: allow single-letter lowest-level domain

The check that required lowest-level domain name to be at least
two characters long, was introduced for #i25107# in 2004 in the
commit dfcb4aa47b81ebd9affddefda88bf9b451508221
  Author Rüdiger Timm 
  Date   Mon Sep 20 12:13:22 2004 +
INTEGRATION: CWS swmailmerge (1.1.2); FILE ADDED

(See also related #i20057# for feature specification.)
It didn't mention a rationale behind that check; but obviously,
it's unjustified. There are single-letter second-level domain
names [1], like 'x.com', and also under many other TLDs. Also
the check prevented single-character third-level names like
"a.foo.bar", etc. Plus, RFC 5322 (and its predecessors) do not
restrict these lengths in 'Addr-Spec Specification' (and RFCs
referenced from there).

This does not enable dotless domains [2]; if justified, they
should be enabled separately.

[1] https://en.wikipedia.org/wiki/Single-letter_second-level_domain
[2] https://en.wikipedia.org/wiki/Top-level_domain#Dotless_domains

Change-Id: I03cc26a90c08b94b9c1f70e0a0f1746192cb7afe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132482
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 1ea95f05ee8ec496c628bd11750d23cc012c7fe4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132382
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx 
b/sw/source/uibase/dbui/mailmergehelper.cxx
index 5e802b8a6efc..888a1394fc3a 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -73,8 +73,9 @@ OUString CallSaveAsDialog(weld::Window* pParent, OUString& 
rFilter)
 
 /*
 simple address check: check for '@'
-for at least one '.' after the '@'
-and for at least two characters before and after 
the dot
+for at least one '.' after the '@',
+for at least one character before the dot
+and for at least two characters after the dot
 */
 bool CheckMailAddress( const OUString& rMailAddress )
 {
@@ -82,7 +83,7 @@ bool CheckMailAddress( const OUString& rMailAddress )
 if (nPosAt<0 || rMailAddress.lastIndexOf('@')!=nPosAt)
 return false;
 const sal_Int32 nPosDot = rMailAddress.indexOf('.', nPosAt);
-return !(nPosDot<0 || nPosDot-nPosAt<3 || 
rMailAddress.getLength()-nPosDot<3);
+return !(nPosDot<0 || nPosDot-nPosAt<2 || 
rMailAddress.getLength()-nPosDot<3);
 }
 
 uno::Reference< mail::XSmtpService > ConnectToSmtpServer(


[Libreoffice-commits] core.git: comphelper/qa comphelper/source dbaccess/source include/comphelper sd/qa sw/inc sw/qa sw/source vcl/source writerfilter/source

2022-04-04 Thread Noel Grandin (via logerrit)
 comphelper/qa/string/test_string.cxx   |2 
 comphelper/source/misc/string.cxx  |   55 +++--
 dbaccess/source/filter/hsqldb/createparser.cxx |4 -
 dbaccess/source/filter/hsqldb/createparser.hxx |2 
 include/comphelper/string.hxx  |4 -
 sd/qa/unit/tiledrendering/CallbackRecorder.hxx |2 
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |2 
 sw/inc/shellio.hxx |   14 +++---
 sw/qa/extras/uiwriter/uiwriter.cxx |2 
 sw/source/core/doc/swserv.cxx  |4 -
 sw/source/core/swg/SwXMLTextBlocks.cxx |2 
 sw/source/filter/ascii/wrtasc.cxx  |   15 --
 sw/source/filter/ascii/wrtasc.hxx  |2 
 sw/source/filter/basflt/fltini.cxx |   12 ++---
 sw/source/filter/html/wrthtml.cxx  |   14 +++---
 sw/source/filter/html/wrthtml.hxx  |4 -
 sw/source/filter/inc/fltini.hxx|2 
 sw/source/filter/ww8/rtfexport.cxx |4 -
 sw/source/filter/ww8/wrtww8.cxx|4 -
 sw/source/filter/ww8/wrtww8.hxx|2 
 sw/source/filter/xml/wrtxml.cxx|2 
 sw/source/uibase/app/docsh.cxx |6 +-
 sw/source/uibase/app/docsh2.cxx|4 -
 sw/source/uibase/dochdl/swdtflvr.cxx   |4 -
 sw/source/uibase/uiview/srcview.cxx|2 
 vcl/source/uitest/uiobject.cxx |2 
 writerfilter/source/dmapper/SdtHelper.cxx  |2 
 27 files changed, 112 insertions(+), 62 deletions(-)

New commits:
commit 5de24375515bc2932d299047e9cb8c9c9bf3ee1d
Author: Noel Grandin 
AuthorDate: Sun Apr 3 21:28:08 2022 +0200
Commit: Noel Grandin 
CommitDate: Mon Apr 4 13:48:11 2022 +0200

use string_view in comphelper::string::split

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

diff --git a/comphelper/qa/string/test_string.cxx 
b/comphelper/qa/string/test_string.cxx
index 0619b873e0fb..5d3132756ad5 100644
--- a/comphelper/qa/string/test_string.cxx
+++ b/comphelper/qa/string/test_string.cxx
@@ -373,7 +373,7 @@ void TestString::testReverseString()
 
 void TestString::testSplit()
 {
-std::vector aRet = ::comphelper::string::split("CTRL+ALT+F1", 
'+');
+std::vector aRet = ::comphelper::string::split(u"CTRL+ALT+F1", 
'+');
 CPPUNIT_ASSERT_EQUAL(size_t(3), aRet.size());
 CPPUNIT_ASSERT_EQUAL(OUString("CTRL"), aRet[0]);
 CPPUNIT_ASSERT_EQUAL(OUString("ALT"), aRet[1]);
diff --git a/comphelper/source/misc/string.cxx 
b/comphelper/source/misc/string.cxx
index a3ee9bc58521..acdb6c88adcb 100644
--- a/comphelper/source/misc/string.cxx
+++ b/comphelper/source/misc/string.cxx
@@ -261,15 +261,62 @@ OUString convertCommaSeparated(
 return buf.makeStringAndClear();
 }
 
+/* copy of getToken from sal/, modified to take a string_view */
+static sal_Int32 getToken( OUString& ppThis,
+std::u16string_view pStr,
+sal_Int32 nToken,
+sal_Unicode cTok,
+sal_Int32 nIndex )
+{
+assert(nIndex <= static_cast(pStr.size()));
+
+// Set ppThis to an empty string and return -1 if either nToken or nIndex 
is
+// negative:
+if (nIndex >= 0 && nToken >= 0)
+{
+const auto* pOrgCharStr = pStr.data();
+const auto* pCharStr = pOrgCharStr + nIndex;
+sal_Int32 nLen = pStr.size() - nIndex;
+sal_Int32 nTokCount = 0;
+const auto* pCharStrStart = pCharStr;
+while (nLen > 0)
+{
+if (*pCharStr == cTok)
+{
+nTokCount++;
+
+if (nTokCount > nToken)
+break;
+if (nTokCount == nToken)
+pCharStrStart = pCharStr + 1;
+}
+
+pCharStr++;
+nLen--;
+}
+if (nTokCount >= nToken)
+{
+ppThis = OUString(pCharStrStart, pCharStr - pCharStrStart);
+if (nLen > 0)
+return pCharStr - pOrgCharStr + 1;
+else
+return -1;
+}
+}
+
+ppThis.clear();
+return -1;
+}
+
 std::vector
-split(const OUString& rStr, sal_Unicode cSeparator)
+split(std::u16string_view rStr, sal_Unicode cSeparator)
 {
 std::vector< OUString > vec;
 sal_Int32 idx = 0;
 do
 {
-OUString kw =
-rStr.getToken(0, cSeparator, idx);
+OUString kw;
+idx = getToken(kw, rStr, 0, cSeparator, idx);
 kw = kw.trim();
 if (!kw.isEmpty())
 {
@@ -282,7 +329,7 @@ std::vector
 }
 
 uno::Sequence< OUString >
-convertCommaSeparated( OUString const& i_rString )
+convertCommaSeparated( std::u16string_view i_rString )
 {
 std::vector< OUString > vec = 

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

2022-04-04 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/forcepoint99.html |binary
 sw/qa/extras/layout/layout.cxx |6 ++
 sw/source/core/text/itrform2.cxx   |   15 +++
 sw/source/core/text/itrform2.hxx   |2 ++
 sw/source/core/text/porlay.cxx |4 +++-
 5 files changed, 22 insertions(+), 5 deletions(-)

New commits:
commit b46baea4d1cce81c56ee0d82fbdc352921445fa7
Author: Caolán McNamara 
AuthorDate: Fri Apr 1 16:52:06 2022 +0100
Commit: Miklos Vajna 
CommitDate: Mon Apr 4 08:25:50 2022 +0200

forcepoint#99 SwTextFormatter unaware that FirstOfBorderMerge was deleted

READ of size 8 at 0x606000a49e50 thread T0
#0 0x7f7ab6214bf5 in SwPosSize::Height() const 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/possiz.hxx:49:37
#1 0x7f7ab636c311 in 
SwTextFormatter::MergeCharacterBorder(SwLinePortion&, SwLinePortion const*, 
SwTextFormatInfo&) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/itrform2.cxx:2807:43
#2 0x7f7ab636ae08 in SwTextFormatter::InsertPortion(SwTextFormatInfo&, 
SwLinePortion*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/itrform2.cxx:354:13
#3 0x7f7ab6371db1 in SwTextFormatter::BuildPortions(SwTextFormatInfo&) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/itrform2.cxx:709:9
#4 0x7f7ab638b2ac in SwTextFormatter::FormatLine(o3tl::strong_int) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/itrform2.cxx:1701:9
#5 0x7f7ab62a8ad1 in SwTextFrame::FormatLine(SwTextFormatter&, bool) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1212:44
#6 0x7f7ab62af1cc in SwTextFrame::Format_(SwTextFormatter&, 
SwTextFormatInfo&, bool) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1571:23
#7 0x7f7ab62b1f17 in SwTextFrame::Format_(OutputDevice*, 
SwParaPortion*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1743:5
#8 0x7f7ab62b5260 in SwTextFrame::Format(OutputDevice*, SwBorderAttrs 
const*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1932:17
#9 0x7f7ab5dbdabd in SwContentFrame::MakeAll(OutputDevice*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/layout/calcmove.cxx:1514:17

0x606000a49e50 is located 16 bytes inside of 56-byte region 
[0x606000a49e40,0x606000a49e78)
freed by thread T0 here:
#0 0x4fe1f7 in operator delete(void*) 
(/home/caolan/LibreOffice/core-asan/instdir/program/soffice.bin+0x4fe1f7)
#1 0x7f7ab6486d35 in SwTextPortion::~SwTextPortion() 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/portxt.hxx:26:7
#2 0x7f7ab63da0c9 in SwLineLayout::CalcLine(SwTextFormatter&, 
SwTextFormatInfo&) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/porlay.cxx:430:21
#3 0x7f7ab6435413 in SwMultiPortion::CalcSize(SwTextFormatter&, 
SwTextFormatInfo&) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/pormulti.cxx:75:15
#4 0x7f7ab6457749 in 
SwTextFormatter::BuildMultiPortion(SwTextFormatInfo&, SwMultiPortion&) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/pormulti.cxx:2090:16
#5 0x7f7ab636f12c in SwTextFormatter::BuildPortions(SwTextFormatInfo&) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/itrform2.cxx:550:21
#6 0x7f7ab638b2ac in SwTextFormatter::FormatLine(o3tl::strong_int) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/itrform2.cxx:1701:9
#7 0x7f7ab62a8ad1 in SwTextFrame::FormatLine(SwTextFormatter&, bool) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1212:44
#8 0x7f7ab62af1cc in SwTextFrame::Format_(SwTextFormatter&, 
SwTextFormatInfo&, bool) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1571:23
#9 0x7f7ab62b1f17 in SwTextFrame::Format_(OutputDevice*, 
SwParaPortion*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1743:5
#10 0x7f7ab62b5260 in SwTextFrame::Format(OutputDevice*, SwBorderAttrs 
const*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1932:17
#11 0x7f7ab5dbdabd in SwContentFrame::MakeAll(OutputDevice*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/layout/calcmove.cxx:1514:17

similar seen in the past as:

commit 96acebb72211b4718eb3038c427df37b55b17b0b
Date:   Tue May 14 01:49:03 2019 +0800

tdf#124937 reset m_pFirstOfBorderMerge before truncate.

commit ecd855794b22c0f7e6fb2f362b566c4d9c5f624a
Date:   Mon Jan 15 22:29:31 2018 +0100

tdf#114536 sw: fix use-after-free in 
SwTextFormatter::MergeCharacterBorder()

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

diff --git a/sw/qa/extras/layout/data/forcepoint99.html 
b/sw/qa/extras/layout/data/forcepoint99.html
new file mode 100644
index ..6eb36a616e26

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

2022-04-04 Thread Tünde Tóth (via logerrit)
 oox/source/export/drawingml.cxx |4 ++--
 sd/qa/unit/data/odp/tdf53970_linked.odp |binary
 sd/qa/unit/export-tests-ooxml2.cxx  |   27 +--
 3 files changed, 23 insertions(+), 8 deletions(-)

New commits:
commit c2e8a96a8107a37901e475c65a8e61211fc3b132
Author: Tünde Tóth 
AuthorDate: Thu Mar 31 13:11:04 2022 +0200
Commit: László Németh 
CommitDate: Mon Apr 4 13:01:08 2022 +0200

tdf#53970 PPTX: fix broken export of linked media files

Missing TargetMode="External" in the export of
linked media files resulted corrupted PPTX.

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

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index a99a0474a458..54f94278d782 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1490,8 +1490,8 @@ void DrawingML::WriteMediaNonVisualProperties(const 
css::uno::ReferenceaddRelation(mpFS->getOutputStream(), 
oox::getRelationship(eMediaType), rURL);
-aMediaRelId = mpFB->addRelation(mpFS->getOutputStream(), 
oox::getRelationship(Relationship::MEDIA), rURL);
+aVideoFileRelId = mpFB->addRelation(mpFS->getOutputStream(), 
oox::getRelationship(eMediaType), rURL, true);
+aMediaRelId = mpFB->addRelation(mpFS->getOutputStream(), 
oox::getRelationship(Relationship::MEDIA), rURL, true);
 }
 
 GetFS()->startElementNS(XML_p, XML_nvPr);
diff --git a/sd/qa/unit/data/odp/tdf53970_linked.odp 
b/sd/qa/unit/data/odp/tdf53970_linked.odp
new file mode 100644
index ..3ddb7933463f
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf53970_linked.odp differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index a620386ad22d..5fac35ea1833 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -1804,15 +1804,30 @@ void SdOOXMLExportTest2::testTdf59323_slideFooters()
 
 void SdOOXMLExportTest2::testTdf53970()
 {
-::sd::DrawDocShellRef xDocShRef
-= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf53970.odp"), ODP);
-xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
+// Embedded media file
+{
+::sd::DrawDocShellRef xDocShRef
+= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf53970.odp"), ODP);
+xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
 
+// Without fix in place, the media shape was lost on export.
+CPPUNIT_ASSERT(getPage(0, xDocShRef)->hasElements());
 
-// Without fix in place, the media shape was lost on export.
-CPPUNIT_ASSERT(getPage(0, xDocShRef)->hasElements());
+xDocShRef->DoClose();
+}
 
-xDocShRef->DoClose();
+// Linked media file
+{
+::sd::DrawDocShellRef xDocShRef = loadURL(
+
m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf53970_linked.odp"), ODP);
+utl::TempFile tempFile;
+xDocShRef = saveAndReload(xDocShRef.get(), PPTX, );
+xDocShRef->DoClose();
+
+xmlDocUniquePtr pXmlRels = parseExport(tempFile, 
"ppt/slides/_rels/slide1.xml.rels");
+CPPUNIT_ASSERT(pXmlRels);
+assertXPath(pXmlRels, 
"/rels:Relationships/rels:Relationship[@TargetMode='External']", 2);
+}
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);


[Libreoffice-commits] core.git: 2 commits - officecfg/registry oox/source sc/inc sc/qa sc/sdi sc/source sc/uiconfig test/source

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |   16 ++
 oox/source/core/xmlfilterbase.cxx |2 
 oox/source/token/namespaces-strict.txt|1 
 oox/source/token/namespaces.hxx.tail  |1 
 oox/source/token/namespaces.txt   |1 
 oox/source/token/tokens.txt   |1 
 sc/inc/SparklineGroup.hxx |5 
 sc/inc/document.hxx   |2 
 sc/inc/sc.hrc |3 
 sc/qa/unit/SparklineImportExportTest.cxx  |3 
 sc/sdi/cellsh.sdi |1 
 sc/sdi/scalc.sdi  |   17 ++
 sc/source/core/data/document.cxx  |   28 
 sc/source/filter/excel/excdoc.cxx |1 
 sc/source/filter/excel/export/SparklineExt.cxx|6 
 sc/source/filter/oox/SparklineFragment.cxx|3 
 sc/source/ui/dialogs/SparklineDialog.cxx  |   61 
+++---
 sc/source/ui/inc/SparklineDialog.hxx  |   12 +
 sc/source/ui/view/cellsh.cxx  |   35 -
 sc/source/ui/view/cellsh1.cxx |2 
 sc/uiconfig/scalc/popupmenu/cell.xml  |9 +
 test/source/xmltesttools.cxx  |2 
 22 files changed, 152 insertions(+), 60 deletions(-)

New commits:
commit 1d25d32b4dcfbc750b8344cd79279aad0d621edf
Author: Tomaž Vajngerl 
AuthorDate: Sat Mar 26 01:33:29 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Apr 4 14:27:12 2022 +0200

sc: add support for xr2 namespace and read uid of sparkline group

Change-Id: I470819a89338f4fb1d9b2486ffb4d93f8eb42844
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132504
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/oox/source/core/xmlfilterbase.cxx 
b/oox/source/core/xmlfilterbase.cxx
index 7c5fe9188b81..73e6d90e1649 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -146,6 +146,8 @@ const Sequence< beans::Pair< OUString, sal_Int32 > >& 
NamespaceIds()
  NMSP_x12ac},
 {"http://schemas.microsoft.com/office/drawing/2012/chart;,
  NMSP_c15},
+
{"http://schemas.microsoft.com/office/spreadsheetml/2015/revision2;,
+ NMSP_xr2},
 };
 return SINGLETON;
 };
diff --git a/oox/source/token/namespaces-strict.txt 
b/oox/source/token/namespaces-strict.txt
index 5024249bfacc..7449dca99a33 100644
--- a/oox/source/token/namespaces-strict.txt
+++ b/oox/source/token/namespaces-strict.txt
@@ -88,6 +88,7 @@ w15 
http://schemas.microsoft.com/office/word/2012/wordml
 p15 
http://schemas.microsoft.com/office/powerpoint/2012/main
 x12ac   
http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac
 c15 http://schemas.microsoft.com/office/drawing/2012/chart
+xr2 
http://schemas.microsoft.com/office/spreadsheetml/2015/revision2
 
 # extlst namespaces
 
diff --git a/oox/source/token/namespaces.hxx.tail 
b/oox/source/token/namespaces.hxx.tail
index fdea5b96f1b4..382955683d7d 100644
--- a/oox/source/token/namespaces.hxx.tail
+++ b/oox/source/token/namespaces.hxx.tail
@@ -62,6 +62,7 @@ inline sal_Int32 getNamespace( sal_Int32 nToken ) { return 
nToken & NMSP_MASK; }
 #define W_TOKEN( token )OOX_TOKEN( doc, token )
 #define LOEXT_TOKEN( token )OOX_TOKEN( loext, token )
 #define M_TOKEN(token)  OOX_TOKEN(officeMath, token)
+#define XR2_TOKEN(token)OOX_TOKEN(xr2, token)
 
 
 
diff --git a/oox/source/token/namespaces.txt b/oox/source/token/namespaces.txt
index f18e0833f31d..849caa547695 100644
--- a/oox/source/token/namespaces.txt
+++ b/oox/source/token/namespaces.txt
@@ -88,6 +88,7 @@ w15 
http://schemas.microsoft.com/office/word/2012/wordml
 p15 
http://schemas.microsoft.com/office/powerpoint/2012/main
 x12ac   
http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac
 c15 http://schemas.microsoft.com/office/drawing/2012/chart
+xr2 
http://schemas.microsoft.com/office/spreadsheetml/2015/revision2
 
 # extlst namespaces
 
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index 593ef0b23a5d..d1a40140add9 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -5848,6 +5848,7 @@ xmlDataType
 xmlPr
 xmlns
 xpath
+xr2
 xrange
 xsc
 xscale
diff --git a/sc/inc/SparklineGroup.hxx b/sc/inc/SparklineGroup.hxx
index 

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

2022-04-04 Thread Michael Stahl (via logerrit)
 sw/qa/extras/odfimport/data/forcepoint101.fodt  |   13 +
 sw/qa/extras/odfimport/odfimport.cxx|6 ++
 sw/source/core/unocore/unodraw.cxx  |4 +++-
 sw/source/core/unocore/unoframe.cxx |1 +
 xmloff/source/text/XMLTextShapeImportHelper.cxx |   12 +---
 5 files changed, 32 insertions(+), 4 deletions(-)

New commits:
commit 8fbe27a53c038cd32c45bad1f0b417e79d483185
Author: Michael Stahl 
AuthorDate: Mon Apr 4 17:19:51 2022 +0200
Commit: Michael Stahl 
CommitDate: Mon Apr 4 20:23:15 2022 +0200

forcepoint#101 sw: fix inserting at-page shapes to not set anchor pos

The problem is that for an at-page anchor SwXDrawPage::add() sets an
anchor position, but then a fieldmark is inserted and the node with the
anchor position is deleted.

The code that sets the surprising anchor position for at-page shape was
added in commit cf345e026fc0378c4436173c8064717c7db4d538 "Fix #91289#:
Draw objects anchored at page but without page number" and is similar to
the code for fly-frames added in commit
2e6d999cf8ceacabb94b11feee6ee0808c2a75bc "If no page number is given for
page bound frames, calculate it using cursor" except that it is missing
a check for GetPageNum() == 0, for no obvious reason.

The matching code to replace the anchor position with a page number is
in SwFlyFrameFormat::MakeFrames() and was added in commit
572a48cd16f6ce3a68ffead44a975698954dfe11 "Fix #85019#: Insertion of
flyframes without correct pagenumber"; it's not clear if this is only
needed for shapes inserted via the above 2 UNO APIs or also for shapes
inserted via UI.

Then there is the issue that the page number is set in
XMLTextShapeImportHelper::addShape() only after the shape is inserted,
which was added and commented in commit
b5fc47fe5c2892dd712e2bda922656eacbd932f1, earlier than all the above
commits; testing shows that if the page number is set before inserting
the shape, the shape ends up on the expected page anyway.

Let's change this:
1. the page number is set before inserting the shape
2. at-page anchor with page number is left as is
3. at-page anchor without page number gets anchor position and is changed
   to at-char

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

diff --git a/sw/qa/extras/odfimport/data/forcepoint101.fodt 
b/sw/qa/extras/odfimport/data/forcepoint101.fodt
new file mode 100644
index ..7210888262dc
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/forcepoint101.fodt
@@ -0,0 +1,13 @@
+
+http://openoffice.org/2009/office; 
xmlns:css3t="http://www.w3.org/TR/css3-text/; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns
 :config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="ur
 n:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:xforms="http://www.w3.org/2002/xforms; office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.text">
+ 
+  
+   
+
+   
+   
+   
+   foobar
+  
+ 
+
diff 

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

2022-04-04 Thread László Németh (via logerrit)
 download.lst|4 ++--
 sw/qa/extras/uiwriter/uiwriter4.cxx |   35 +++
 2 files changed, 37 insertions(+), 2 deletions(-)

New commits:
commit 09dfe214a30f58ddcd7a857db8f5eee68d4cef2a
Author: László Németh 
AuthorDate: Mon Apr 4 10:26:50 2022 +0200
Commit: László Németh 
CommitDate: Mon Apr 4 19:06:44 2022 +0200

tdf#147546 bump libnumbertext to 1.0.10

fixing only regression of hu_Hung
transliteration of punctuation marks.
Add unit test for the fix.

Regression from commit 98fd4fcdc61202846e0957cb6aaed9e4a2d2c520
"tdf#136368 bump to libnumbertext 1.0.8".

(cherry picked from commit d925d1ca9e03863650dd3e450331598624f21724)
Change-Id: Ie92cad96f48f0a7f735bc9cde93a0fded4681800

Conflicts:
sw/qa/extras/uiwriter/uiwriter6.cxx

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

diff --git a/download.lst b/download.lst
index 081ea2ad1e5f..f3cdbb1dafa1 100644
--- a/download.lst
+++ b/download.lst
@@ -160,8 +160,8 @@ export LIBGPGERROR_SHA256SUM := 
a9ab83ca7acc442a5bd846a75b920285ff79bdb4e3d34aa3
 export LIBGPGERROR_TARBALL := libgpg-error-1.43.tar.bz2
 export LIBLANGTAG_SHA256SUM := 
1f12a20a02ec3a8d22e54dedb8b683a43c9c160bda1ba337bf1060607ae733bd
 export LIBLANGTAG_TARBALL := liblangtag-0.6.3.tar.bz2
-export LIBNUMBERTEXT_SHA256SUM := 
db9060d208501bd7bc06300a55d8489d29dd560ee0fbbd0f41b78af56816680c
-export LIBNUMBERTEXT_TARBALL := libnumbertext-1.0.8.tar.xz
+export LIBNUMBERTEXT_SHA256SUM := 
a285573864eaac8d36a0f66d946e9b1d3cf01c5d93d31fda00264a76f2633beb
+export LIBNUMBERTEXT_TARBALL := libnumbertext-1.0.10.tar.xz
 export LIBTOMMATH_SHA256SUM := 
083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304f7281f8f7347483
 export LIBTOMMATH_TARBALL := ltm-1.0.zip
 export XMLSEC_SHA256SUM := 
26041d35a20a245ed5a2fb9ee075f10825664d274220cb5190340fa87a4d0931
diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx 
b/sw/qa/extras/uiwriter/uiwriter4.cxx
index aa807418e348..fc7bd27e3124 100644
--- a/sw/qa/extras/uiwriter/uiwriter4.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter4.cxx
@@ -3963,6 +3963,41 @@ void SwUiWriterTest4::testTdf133589()
 pWrtShell->AutoCorrect(corr, ' ');
 sReplaced += u"೺೺೿೼೼ ";
 CPPUNIT_ASSERT_EQUAL(sReplaced, 
static_cast(pDoc->GetNodes()[nIndex])->GetText());
+
+// tdf#147546 transliterate punctuation marks
+
+// question mark
+pWrtShell->Insert(u"Kérdőjel");
+pWrtShell->AutoCorrect(corr, '?');
+sReplaced += u"ಓೋೢೇ೟೒೉ೖ";
+OUString sReplaced2(sReplaced + "?");
+CPPUNIT_ASSERT_EQUAL(sReplaced2, 
static_cast(pDoc->GetNodes()[nIndex])->GetText());
+pWrtShell->AutoCorrect(corr, ' ');
+sReplaced += u"⸮ ";
+CPPUNIT_ASSERT_EQUAL(sReplaced, 
static_cast(pDoc->GetNodes()[nIndex])->GetText());
+// comma
+pWrtShell->Insert(u"Vessző");
+pWrtShell->AutoCorrect(corr, ',');
+sReplaced += u"ಮ೉೥೥೟";
+sReplaced2 = sReplaced + ",";
+CPPUNIT_ASSERT_EQUAL(sReplaced2, 
static_cast(pDoc->GetNodes()[nIndex])->GetText());
+pWrtShell->AutoCorrect(corr, ' ');
+sReplaced += u"⹁ ";
+CPPUNIT_ASSERT_EQUAL(sReplaced, 
static_cast(pDoc->GetNodes()[nIndex])->GetText());
+// semicolon
+pWrtShell->Insert(u"pontosvessző");
+pWrtShell->AutoCorrect(corr, ';');
+sReplaced += u"ೠ೛೙೦೛೤೮೉೥೥೟";
+sReplaced2 = sReplaced + ";";
+CPPUNIT_ASSERT_EQUAL(sReplaced2, 
static_cast(pDoc->GetNodes()[nIndex])->GetText());
+pWrtShell->AutoCorrect(corr, ' ');
+sReplaced += u"⁏ ";
+CPPUNIT_ASSERT_EQUAL(sReplaced, 
static_cast(pDoc->GetNodes()[nIndex])->GetText());
+// quotation marks
+pWrtShell->Insert(u"„idézőjel”");
+pWrtShell->AutoCorrect(corr, ' ');
+sReplaced += u"⹂೐ೇೋ೯೟೒೉ೖ‟ ";
+CPPUNIT_ASSERT_EQUAL(sReplaced, 
static_cast(pDoc->GetNodes()[nIndex])->GetText());
 }
 
 void SwUiWriterTest4::testTdf143176()


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

2022-04-04 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   39 +
 sw/source/core/doc/docredln.cxx|9 +
 2 files changed, 48 insertions(+)

New commits:
commit 81bcee981ee0558474467d83c0fa929e932c
Author: Miklos Vajna 
AuthorDate: Mon Apr 4 16:01:57 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon Apr 4 19:45:58 2022 +0200

sw lok: fix missing cache invalidation in SwRedlineTable::Insert()

The trouble is that the FillRects() call in
SwRedlineTable::LOKRedlineNotification() builds a text portion list, but
that's not yet correct, and later we don't build a text portion list as
we already have one.

Fix this similar to the frame size problem by invalidating the cache
after we got our rectangles.

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

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index a5083731c5a3..9d603643e652 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -166,6 +166,7 @@ public:
 void testBulletMultiDeleteInvalidation();
 void testCondCollCopy();
 void testMoveShapeHandle();
+void testRedlinePortions();
 
 CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
 CPPUNIT_TEST(testRegisterCallback);
@@ -252,6 +253,7 @@ public:
 CPPUNIT_TEST(testBulletMultiDeleteInvalidation);
 CPPUNIT_TEST(testCondCollCopy);
 CPPUNIT_TEST(testMoveShapeHandle);
+CPPUNIT_TEST(testRedlinePortions);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -3554,6 +3556,43 @@ void SwTiledRenderingTest::testCondCollCopy()
 xTransferable->getTransferData(aFlavor);
 }
 
+void SwTiledRenderingTest::testRedlinePortions()
+{
+// Given a document with 3 portions: before insert redline (foo), the 
insert redline (ins) and after insert
+// redline (bar):
+SwXTextDocument* pXTextDocument = createDoc();
+SwDocShell* pDocShell = pXTextDocument->GetDocShell();
+SwView* pView = pDocShell->GetView();
+pView->SetRedlineAuthor("first");
+pDocShell->SetView(pView);
+SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+pWrtShell->Insert("foo");
+pDocShell->SetChangeRecording(true);
+pWrtShell->Insert("ins");
+pDocShell->SetChangeRecording(false);
+pWrtShell->Insert("bar after");
+
+// When deleting "fooinsbar":
+pView->SetRedlineAuthor("second");
+pDocShell->SetView(pView);
+pWrtShell->SttEndDoc(/*bStt*/true);
+pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, /*nCount=*/9, 
/*bBasicCall=*/false);
+pDocShell->SetChangeRecording(true);
+pWrtShell->Delete();
+
+// Then make sure that the portion list is updated, so "bar" can be marked 
as deleted without
+// marking " after" as well:
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwLinePortion[1]", 
"portion", "foo");
+assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwLinePortion[2]", 
"portion", "ins");
+// Without the accompanying fix in place, this test would have failed 
width:
+// - Expected: bar
+// - Actual  : bar after
+// i.e. the portion list was outdated, even " after" was marked as deleted.
+assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwLinePortion[3]", 
"portion", "bar");
+assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwLinePortion[4]", 
"portion", " after");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwTiledRenderingTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 428f67026f29..107d6f9afc95 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -58,6 +58,7 @@
 #include 
 
 #include 
+#include 
 
 using namespace com::sun::star;
 
@@ -287,6 +288,14 @@ void lcl_LOKInvalidateFrames(const sw::BroadcastingModify& 
rMod, const SwRootFra
 if (pPoint)
 {
 pTmpFrame->InvalidateSize();
+
+// Also empty the text portion cache, so it gets rebuilt, 
taking the new redlines
+// into account.
+if (pTmpFrame->IsTextFrame())
+{
+auto pTextFrame = static_cast(pTmpFrame);
+pTextFrame->ClearPara();
+}
 }
 }
 }


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

2022-04-04 Thread Caolán McNamara (via logerrit)
 sw/source/core/layout/tabfrm.cxx |   42 ---
 1 file changed, 26 insertions(+), 16 deletions(-)

New commits:
commit 37f39a4156069ba5f099045ce93370507d9ba215
Author: Caolán McNamara 
AuthorDate: Sat Apr 2 20:20:10 2022 +0100
Commit: Michael Stahl 
CommitDate: Mon Apr 4 20:21:58 2022 +0200

forcepoint#100 drop SwBorderAttrAccess to allow cache entry to be removed

for SwBorderAttr which gets deleted during this call

also includes...

Related: forcepoint#100 we don't need pAttrs for the duration of the full 
scope

similar to the case of

commit 6b1eae0334ba8bad7656a859695551ce51b62f95
Date:   Fri May 18 08:26:14 2001 +

Fix #87058#: Locked boraderattribut

the SwCache object cannot be deleted if its locked, leading to a leak,
we don't need pAttrs for the entire scope here so we can defer to the
end of the scope the reacquire the lock to set pAttrs

and also includes...

Related: forcepoint#100 don't reacquire after every release

instead release when we have to, and only reacquire if necessary
before use of pAttrs

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

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index adc0491b88ba..e836bfb73a01 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2023,8 +2023,6 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 pAccess.reset();
 m_bCalcLowers |= pLayout->Resize(
 pLayout->GetBrowseWidthByTabFrame( *this ) );
-pAccess = 
std::make_unique(SwFrame::GetCache(), this);
-pAttrs = pAccess->Get();
 }
 
 setFramePrintAreaValid(false);
@@ -2059,6 +2057,12 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 const tools::Long nOldPrtWidth = 
aRectFnSet.GetWidth(getFramePrintArea());
 const tools::Long nOldFrameWidth = 
aRectFnSet.GetWidth(getFrameArea());
 const Point aOldPrtPos  = aRectFnSet.GetPos(getFramePrintArea());
+
+if (!pAccess)
+{
+pAccess = 
std::make_unique(SwFrame::GetCache(), this);
+pAttrs = pAccess->Get();
+}
 Format( getRootFrame()->GetCurrShell()->GetOut(), pAttrs );
 
 SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
@@ -2069,8 +2073,6 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 pAccess.reset();
 m_bCalcLowers |= pLayout->Resize(
 pLayout->GetBrowseWidthByTabFrame( *this ) );
-pAccess = 
std::make_unique(SwFrame::GetCache(), this);
-pAttrs = pAccess->Get();
 }
 if ( aOldPrtPos != aRectFnSet.GetPos(getFramePrintArea()) )
 aNotify.SetLowersComplete( false );
@@ -2119,15 +2121,22 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 pAccess.reset();
 m_bCalcLowers |= pHTMLLayout->Resize(
 pHTMLLayout->GetBrowseWidthByTabFrame( *this ) 
);
+}
+
+setFramePrintAreaValid(false);
 
+if (!pAccess)
+{
 pAccess = 
std::make_unique(SwFrame::GetCache(), this);
 pAttrs = pAccess->Get();
 }
-
-setFramePrintAreaValid(false);
 Format( getRootFrame()->GetCurrShell()->GetOut(), 
pAttrs );
 }
+
+pAccess.reset();
+
 lcl_RecalcTable( *this, nullptr, aNotify );
+
 m_bLowersFormatted = true;
 if ( bKeep && KEEPTAB )
 {
@@ -2291,11 +2300,18 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 // 6. There is no section change behind the table (see 
IsKeep)
 // 7. The last table row wants to keep with its next.
 const SwRowFrame* pLastRow = static_cast(GetLastLower());
-if (pLastRow
-&& IsKeep(pAttrs->GetAttrSet().GetKeep(), 
GetBreakItem(), true)
-&& pLastRow->ShouldRowKeepWithNext())
+if (pLastRow)
 {
-bFormat = true;
+if (!pAccess)
+{
+pAccess = 
std::make_unique(SwFrame::GetCache(), this);
+pAttrs = pAccess->Get();
+}
+  

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

2022-04-04 Thread Regina Henschel (via logerrit)
 oox/qa/unit/data/tdf100391_TextAreaRect.odp |binary
 oox/qa/unit/export.cxx  |   21 ++
 oox/source/export/drawingml.cxx |   98 +++-
 3 files changed, 116 insertions(+), 3 deletions(-)

New commits:
commit 1ad58c77352e418124387b804b18da2aeea22c8b
Author: Regina Henschel 
AuthorDate: Mon Apr 4 01:55:29 2022 +0200
Commit: Regina Henschel 
CommitDate: Mon Apr 4 20:21:14 2022 +0200

tdf#100391 calculate true textarea rect for custGeom

Without the fix the attributes for  were set to 'l', 't', 'r'
and 'b'. That means that the textarea rectangle equals the shape
rectangle. That is the default and works for many shapes. But 'Puzzle'
has a smaller textarea rectangle, for example.

Because the values in draw:text-areas are relative to the internal
coordinate system given by draw:viewBox in ODF, but the values in
 are relative to the shape coordinate system in OOXML, we
cannot simple write the current absolute values but need to calculate
them depending on actual width and height. For that we need guides.

The patch introduces a guide list. Currently the list contains only the
guides for the textarea rectangle, but it can be extended when export
of handles will be implemented one day.

Change-Id: I1050627ef6459ab5f8fafa939d7905122870c903
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132489
Tested-by: Jenkins
Reviewed-by: Regina Henschel 

diff --git a/oox/qa/unit/data/tdf100391_TextAreaRect.odp 
b/oox/qa/unit/data/tdf100391_TextAreaRect.odp
new file mode 100755
index ..b9b9e5b39e4a
Binary files /dev/null and b/oox/qa/unit/data/tdf100391_TextAreaRect.odp differ
diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx
index 60e20e2d933a..91b8d7608c24 100644
--- a/oox/qa/unit/export.cxx
+++ b/oox/qa/unit/export.cxx
@@ -590,6 +590,27 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_subpath)
 assertXPath(pXmlDoc, "//a:pathLst/a:path[4]", "w", "80");
 assertXPath(pXmlDoc, "//a:pathLst/a:path[4]", "h", "80");
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf100391TextAreaRect)
+{
+// The document has a custom shape of type "non-primitive" to trigger the 
custGeom export
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf100391_TextAreaRect.odp";
+// When saving to PPTX the textarea rect was set to default instead of 
using the actual area
+loadAndSave(aURL, "Impress Office Open XML");
+
+// Verify the markup. Without fix the values were l="l", t="t", r="r", 
b="b"
+std::unique_ptr pStream = parseExportStream(getTempFile(), 
"ppt/slides/slide1.xml");
+xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+assertXPath(pXmlDoc, "//a:custGeom/a:rect", "l", "textAreaLeft");
+assertXPath(pXmlDoc, "//a:custGeom/a:rect", "t", "textAreaTop");
+assertXPath(pXmlDoc, "//a:custGeom/a:rect", "r", "textAreaRight");
+assertXPath(pXmlDoc, "//a:custGeom/a:rect", "b", "textAreaBottom");
+// The values are calculated in guides, for example
+assertXPath(pXmlDoc, "//a:custGeom/a:gdLst/a:gd[1]", "name", 
"textAreaLeft");
+assertXPath(pXmlDoc, "//a:custGeom/a:gdLst/a:gd[1]", "fmla", "*/ 144 w 
288");
+// The test reflects the state of Apr 2022. It needs to be adapted when 
export of handles and
+// guides is implemented.
+}
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 54f94278d782..1d2d601a40f0 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3857,6 +3857,83 @@ sal_Int32 GetCustomGeometryPointValue(const 
css::drawing::EnhancedCustomShapePar
 
 return nValue;
 }
+
+struct TextAreaRect
+{
+OString left;
+OString top;
+OString right;
+OString bottom;
+};
+
+struct Guide
+{
+OString sName;
+OString sFormula;
+};
+
+void prepareTextArea(const EnhancedCustomShape2d& rEnhancedCustomShape2d,
+std::vector& rGuideList, TextAreaRect& 
rTextAreaRect)
+{
+tools::Rectangle aTextAreaLO(rEnhancedCustomShape2d.GetTextRect());
+tools::Rectangle aLogicRectLO(rEnhancedCustomShape2d.GetLogicRect());
+if (aTextAreaLO == aLogicRectLO)
+{
+rTextAreaRect.left = "l";
+rTextAreaRect.top = "t";
+rTextAreaRect.right = "r";
+rTextAreaRect.bottom = "b";
+return;
+}
+// Flip aTextAreaLO if shape is flipped
+if (rEnhancedCustomShape2d.IsFlipHorz())
+aTextAreaLO.Move((aLogicRectLO.Center().X() - 
aTextAreaLO.Center().X()) * 2, 0);
+if (rEnhancedCustomShape2d.IsFlipVert())
+aTextAreaLO.Move(0, (aLogicRectLO.Center().Y() - 
aTextAreaLO.Center().Y()) * 2);
+
+Guide aGuide;
+// horizontal
+const sal_Int32 nWidth = aLogicRectLO.Right() - aLogicRectLO.Left();
+const OString sWidth = 
OString::number(oox::drawingml::convertHmmToEmu(nWidth));
+
+// left
+

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

2022-04-04 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/forcepoint89.html|binary
 sw/qa/extras/layout/data/forcepoint91.html|binary
 sw/qa/extras/layout/data/tdf147485-forcepoint.doc |binary
 sw/qa/extras/layout/layout.cxx|   25 --
 sw/source/core/layout/tabfrm.cxx  |2 +
 5 files changed, 25 insertions(+), 2 deletions(-)

New commits:
commit 4abce69fca83f5c98bb1fc0678cc1ce9cedd4750
Author: Caolán McNamara 
AuthorDate: Fri Mar 25 21:26:43 2022 +
Commit: Michael Stahl 
CommitDate: Mon Apr 4 19:14:34 2022 +0200

forcepoint#91 fix crash on layout of specific html

Change-Id: I145649e18f382c67ea34290f44fa219b7926127f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132129
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit be04a8072e4af30ca6ead36aa92d5f380cd9feb9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132483
Reviewed-by: Michael Stahl 

diff --git a/sw/qa/extras/layout/data/forcepoint89.html 
b/sw/qa/extras/layout/data/forcepoint89.html
new file mode 100644
index ..7998a2b0b979
Binary files /dev/null and b/sw/qa/extras/layout/data/forcepoint89.html differ
diff --git a/sw/qa/extras/layout/data/forcepoint91.html 
b/sw/qa/extras/layout/data/forcepoint91.html
new file mode 100644
index ..eacbd2e05ab8
Binary files /dev/null and b/sw/qa/extras/layout/data/forcepoint91.html differ
diff --git a/sw/qa/extras/layout/data/tdf147485-forcepoint.doc 
b/sw/qa/extras/layout/data/tdf147485-forcepoint.doc
new file mode 100644
index ..cb630efb8717
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf147485-forcepoint.doc 
differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 72db33e49b7c..489518c693ef 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2493,8 +2493,17 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, 
testForcepointFootnoteFrame)
 createSwDoc(DATA_DIRECTORY, "forcepoint-swfootnoteframe-1.rtf");
 }
 
-//FIXME: disabled after failing again with fixed layout
-//CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76) { 
createSwDoc(DATA_DIRECTORY, "forcepoint76-1.rtf"); }
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76)
+{
+createSwDoc(DATA_DIRECTORY, "forcepoint76-1.rtf");
+}
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint89)
+{
+createSwWebDoc(DATA_DIRECTORY, "forcepoint89.html");
+}
 
 //just care it doesn't crash/assert
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint90)
@@ -2502,6 +2511,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint90)
 createSwDoc(DATA_DIRECTORY, "forcepoint90.rtf");
 }
 
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint91)
+{
+createSwWebDoc(DATA_DIRECTORY, "forcepoint91.html");
+}
+
 //just care it doesn't crash/assert
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint92)
 {
@@ -2514,6 +2529,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint94)
 createSwWebDoc(DATA_DIRECTORY, "forcepoint94.html");
 }
 
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf147485Forcepoint)
+{
+createSwDoc(DATA_DIRECTORY, "tdf147485-forcepoint.doc");
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118058)
 {
 SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf118058.fodt");
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 7ee960a5684c..98f5229d4ba5 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1616,6 +1616,8 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame,
 if ( pFrame->IsLayoutFrame() &&
  ( !_bOnlyRowsAndCells || pFrame->IsRowFrame() || 
pFrame->IsCellFrame() ) )
 {
+SwFrameDeleteGuard aDeleteGuard(pFrame);
+
 // #130744# An invalid locked table frame will
 // not be calculated => It will not become valid =>
 // Loop in lcl_RecalcRow(). Therefore we do not consider them for 
bRet.


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

2022-04-04 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/forcepoint102.rtf |  178 +
 sw/qa/extras/layout/layout.cxx |   18 +-
 sw/source/core/text/txtfrm.cxx |8 +
 3 files changed, 197 insertions(+), 7 deletions(-)

New commits:
commit 1c4ebab83edb8fe70282f6467700a56c3aff6c1b
Author: Caolán McNamara 
AuthorDate: Sun Apr 3 17:07:45 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 20:53:44 2022 +0200

forcepoint#102 refetch pPara if it might have been destroyed

by SwTextFly::Relax

READ of size 8 at 0x616006d9ab08 thread T0
#0 0x7f5c56a0fbe5 in Size::Height() const include/tools/gen.hxx:213:52
#1 0x7f5c56a0fb98 in Size::getHeight() const 
include/tools/gen.hxx:219:55
#2 0x7f5c56a040f0 in SwRect::IsEmpty() const sw/inc/swrect.hxx:306:21
#3 0x7f5c56dbb018 in SwRect::HasArea() const sw/inc/swrect.hxx:302:13
#4 0x7f5c58571d04 in SwTextFrame::Prepare(PrepareHint, void const*, 
bool) sw/source/core/text/txtfrm.cxx:2986:45

0x616006d9ab08 is located 136 bytes inside of 608-byte region 
[0x616006d9aa80,0x616006d9ace0)
freed by thread T0 here:
#0 0x4fe1f7 in operator delete(void*) 
(instdir/program/soffice.bin+0x4fe1f7)
#1 0x7f5c584602c5 in SwParaPortion::~SwParaPortion() 
sw/source/core/text/porlay.cxx:2557:1
#2 0x7f5c5850b997 in 
std::default_delete::operator()(SwParaPortion*) const 
/usr/bin/../lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/bits/unique_ptr.h:85:2
#3 0x7f5c5850b826 in std::__uniq_ptr_impl >::reset(SwParaPortion*) 
/usr/bin/../lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/bits/unique_ptr.h:182:4
#4 0x7f5c5850b630 in std::unique_ptr >::reset(SwParaPortion*) 
/usr/bin/../lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/bits/unique_ptr.h:456:7
#5 0x7f5c5850960d in SwTextLine::SetPara(SwParaPortion*, bool) 
sw/source/core/text/txtcache.hxx:45:17
#6 0x7f5c58509e7d in SwTextFrame::ClearPara() 
sw/source/core/text/txtcache.cxx:113:24
#7 0x7f5c5855606e in SwTextFrame::Init() 
sw/source/core/text/txtfrm.cxx:758:9
#8 0x7f5c585735c4 in SwTextFrame::Prepare(PrepareHint, void const*, 
bool) sw/source/core/text/txtfrm.cxx:3090:17
#9 0x7f5c57ecafb4 in lcl_NotifyContent(SdrObject const*, 
SwContentFrame*, SwRect const&, PrepareHint) 
sw/source/core/layout/frmtool.cxx:3367:15
#10 0x7f5c57ec968b in Notify_Background(SdrObject const*, SwPageFrame*, 
SwRect const&, PrepareHint, bool) sw/source/core/layout/frmtool.cxx:3443:9
#11 0x7f5c57958669 in lcl_NotifyBackgroundOfObj(SwDrawContact const&, 
SdrObject const&, tools::Rectangle const*) 
sw/source/core/draw/dcontact.cxx:951:13
#12 0x7f5c579556bc in SwDrawContact::Changed_(SdrObject const&, 
SdrUserCallType, tools::Rectangle const*) 
sw/source/core/draw/dcontact.cxx:1233:21
#13 0x7f5c57953b8d in SwDrawContact::Changed(SdrObject const&, 
SdrUserCallType, tools::Rectangle const&) 
sw/source/core/draw/dcontact.cxx:1009:5
#14 0x7f5c96008baf in SdrObject::SendUserCall(SdrUserCallType, 
tools::Rectangle const&) const svx/source/svdraw/svdobj.cxx:2767:22
#15 0x7f5c9601befa in SdrObject::Resize(Point const&, Fraction const&, 
Fraction const&, bool) svx/source/svdraw/svdobj.cxx:1561:5
#16 0x7f5c57da650c in SwAnchoredDrawObject::GetObjBoundRect() const 
sw/source/core/layout/anchoreddrawobject.cxx:733:22
#17 0x7f5c57dae236 in SwAnchoredObject::GetObjRectWithSpaces() const 
sw/source/core/layout/anchoredobject.cxx:569:31
#18 0x7f5c5853c39e in SwTextFly::InitAnchoredObjList() 
sw/source/core/text/txtfly.cxx:900:48
#19 0x7f5c58537b0c in SwTextFly::GetAnchoredObjList() const 
sw/source/core/inc/txtfly.hxx:311:44
#20 0x7f5c58532a5d in SwTextFly::ForEach(SwRect const&, SwRect*, bool) 
const sw/source/core/text/txtfly.cxx:1067:56
#21 0x7f5c58533eec in SwTextFly::IsAnyFrame() const 
sw/source/core/text/txtfly.cxx:405:12
#22 0x7f5c5832ccbe in SwTextFly::Relax() 
sw/source/core/inc/txtfly.hxx:337:17
#23 0x7f5c58571af5 in SwTextFrame::Prepare(PrepareHint, void const*, 
bool) sw/source/core/text/txtfrm.cxx:2976:48

Change-Id: Ibd0d4af69d2a8d74ad538afba7da53c864fa27b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132480
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit f49d218a671df5f7a956ccb219dc46a5c8d0a53c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132485
Reviewed-by: Michael Stahl 

diff --git a/sw/qa/extras/layout/data/forcepoint102.rtf 
b/sw/qa/extras/layout/data/forcepoint102.rtf
new file mode 100644
index ..2a830ff73c10
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint102.rtf
@@ -0,0 +1,178 @@
+{\rtf1\ansh\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0 
Times New Roman;}{\f1 Courier New;}{\f2 

[Libreoffice-commits] core.git: basic/Library_sb.mk

2022-04-04 Thread Jan-Marek Glogowski (via logerrit)
 basic/Library_sb.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit be7d84a3fbd47bf9a078ac7e6854bc4927e84933
Author: Jan-Marek Glogowski 
AuthorDate: Mon Apr 4 15:11:10 2022 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Mon Apr 4 21:36:10 2022 +0200

Fix --disable-scripting build (WASM)

Simply include the global transliterator in all builds.

Regression from commit de81c2545aec06a1b269218b7d00656e97d8b66c
("Related: tdf#144245 Optimize case-insensitive handling").

Change-Id: Ica1c6e5d67c8458f9977f2ff87d9594a43b4cff2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132517
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk
index 17fbcbd1010e..28effaaae0e1 100644
--- a/basic/Library_sb.mk
+++ b/basic/Library_sb.mk
@@ -66,7 +66,6 @@ $(eval $(call gb_Library_add_exception_objects,sb,\
basic/source/basmgr/vbahelper \
basic/source/classes/codecompletecache \
basic/source/classes/eventatt \
-   basic/source/classes/global \
basic/source/classes/image \
basic/source/classes/propacc \
basic/source/classes/sb \
@@ -104,6 +103,7 @@ endif
 
 $(eval $(call gb_Library_add_exception_objects,sb,\
basic/source/runtime/basrdll \
+   basic/source/classes/global \
basic/source/runtime/methods \
basic/source/runtime/methods1 \
basic/source/classes/sbintern \


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

2022-04-04 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/data/ods/tdf85553.ods   |binary
 sc/qa/unit/subsequent_export_test2.cxx |   21 +
 2 files changed, 21 insertions(+)

New commits:
commit 0225f1dd04e49191bbf1fa787bb15d1617ab996c
Author: Xisco Fauli 
AuthorDate: Mon Apr 4 16:50:43 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon Apr 4 20:19:18 2022 +0200

tdf#85553: subsequent_export_test2: Add unittest

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

diff --git a/sc/qa/unit/data/ods/tdf85553.ods b/sc/qa/unit/data/ods/tdf85553.ods
new file mode 100644
index ..37cebbd42fe0
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf85553.ods differ
diff --git a/sc/qa/unit/subsequent_export_test2.cxx 
b/sc/qa/unit/subsequent_export_test2.cxx
index ee3c14117307..b0ffb138c51f 100644
--- a/sc/qa/unit/subsequent_export_test2.cxx
+++ b/sc/qa/unit/subsequent_export_test2.cxx
@@ -139,6 +139,7 @@ public:
 
 void testXltxExport();
 void testRotatedImageODS();
+void testTdf85553();
 void testTdf128976();
 void testTdf143979();
 void testTdf120502();
@@ -259,6 +260,7 @@ public:
 
 CPPUNIT_TEST(testXltxExport);
 CPPUNIT_TEST(testRotatedImageODS);
+CPPUNIT_TEST(testTdf85553);
 CPPUNIT_TEST(testTdf128976);
 CPPUNIT_TEST(testTdf143979);
 CPPUNIT_TEST(testTdf120502);
@@ -1765,6 +1767,25 @@ void ScExportTest2::testRotatedImageODS()
 xDocSh->DoClose();
 }
 
+void ScExportTest2::testTdf85553()
+{
+ScDocShellRef xShell = loadDoc(u"tdf85553.", FORMAT_ODS);
+CPPUNIT_ASSERT(xShell.is());
+
+ScDocShellRef xDocSh = saveAndReload(*xShell, FORMAT_XLS);
+xShell->DoClose();
+CPPUNIT_ASSERT(xDocSh.is());
+
+ScDocument& rDoc = xDocSh->GetDocument();
+
+// Without the fix in place, this test would have failed with
+// - Expected: 4.5
+// - Actual  : #N/A
+CPPUNIT_ASSERT_EQUAL(OUString("4.5"), rDoc.GetString(ScAddress(2, 2, 0)));
+
+xDocSh->DoClose();
+}
+
 void ScExportTest2::testTdf128976()
 {
 ScDocShellRef xShell = loadDoc(u"tdf128976.", FORMAT_XLS);


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

2022-04-04 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/forcepoint100.html |binary
 sw/qa/extras/layout/data/forcepoint98.html  |binary
 sw/qa/extras/layout/layout.cxx  |   12 
 sw/source/core/layout/sectfrm.cxx   |3 +-
 sw/source/core/layout/tabfrm.cxx|   42 +---
 5 files changed, 40 insertions(+), 17 deletions(-)

New commits:
commit ff6ca44405e0f472441bfa3902f6a3d614028029
Author: Caolán McNamara 
AuthorDate: Fri Apr 1 15:49:13 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 20:53:26 2022 +0200

forcepoint#98 don't delete SwFrame flagged as IsDeleteForbidden

Change-Id: I1ac2db4bf96afc4bdc8e0646576f5fa0bcd9e410
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132435
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 3644508aceee6019842bea1fee6c177eabd61681)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132484
Reviewed-by: Michael Stahl 

diff --git a/sw/qa/extras/layout/data/forcepoint98.html 
b/sw/qa/extras/layout/data/forcepoint98.html
new file mode 100644
index ..9d4b76c53e76
Binary files /dev/null and b/sw/qa/extras/layout/data/forcepoint98.html differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index bc80f22d0094..046b6da50650 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2548,6 +2548,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118058)
 pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()->CalcLayout();
 }
 
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint98)
+{
+createSwWebDoc(DATA_DIRECTORY, "forcepoint98.html");
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf128611)
 {
 createSwDoc(DATA_DIRECTORY, "tdf128611.fodt");
diff --git a/sw/source/core/layout/sectfrm.cxx 
b/sw/source/core/layout/sectfrm.cxx
index 9b33ceeadd63..34e86e51808b 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -2885,7 +2885,8 @@ void SwRootFrame::DeleteEmptySct_()
 mpDestroy->erase( mpDestroy->begin() );
 OSL_ENSURE( !pSect->IsColLocked() && !pSect->IsJoinLocked(),
 "DeleteEmptySct: Locked SectionFrame" );
-if( !pSect->getFrameArea().HasArea() && !pSect->ContainsContent() )
+SAL_WARN_IF(pSect->IsDeleteForbidden(), "sw.layout", "not allowed 
delete SwFrame");
+if( !pSect->getFrameArea().HasArea() && !pSect->ContainsContent() && 
!pSect->IsDeleteForbidden() )
 {
 SwLayoutFrame* pUp = pSect->GetUpper();
 pSect->RemoveFromLayout();
commit 697a695dbddd9bcea60e3c65de7d91e88308e557
Author: Caolán McNamara 
AuthorDate: Sat Apr 2 20:20:10 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 20:53:09 2022 +0200

forcepoint#100 drop SwBorderAttrAccess to allow cache entry to be removed

for SwBorderAttr which gets deleted during this call

also includes...

Related: forcepoint#100 we don't need pAttrs for the duration of the full 
scope

similar to the case of

commit 6b1eae0334ba8bad7656a859695551ce51b62f95
Date:   Fri May 18 08:26:14 2001 +

Fix #87058#: Locked boraderattribut

the SwCache object cannot be deleted if its locked, leading to a leak,
we don't need pAttrs for the entire scope here so we can defer to the
end of the scope the reacquire the lock to set pAttrs

and also includes...

Related: forcepoint#100 don't reacquire after every release

instead release when we have to, and only reacquire if necessary
before use of pAttrs

Change-Id: Ie52aab7e5933d76b0c055389798104e4d93f39e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132461
Reviewed-by: Michael Stahl 
Tested-by: Caolán McNamara 

diff --git a/sw/qa/extras/layout/data/forcepoint100.html 
b/sw/qa/extras/layout/data/forcepoint100.html
new file mode 100644
index ..6e9b83a6c95e
Binary files /dev/null and b/sw/qa/extras/layout/data/forcepoint100.html differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 489518c693ef..bc80f22d0094 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2529,6 +2529,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint94)
 createSwWebDoc(DATA_DIRECTORY, "forcepoint94.html");
 }
 
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint100)
+{
+createSwWebDoc(DATA_DIRECTORY, "forcepoint100.html");
+}
+
 //just care it doesn't crash/assert
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf147485Forcepoint)
 {
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 98f5229d4ba5..c9683f6956e4 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2059,8 +2059,6 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 

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

2022-04-04 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/forcepoint99.html |binary
 sw/qa/extras/layout/layout.cxx |6 ++
 sw/source/core/text/itrform2.cxx   |   15 +++
 sw/source/core/text/itrform2.hxx   |2 ++
 sw/source/core/text/porlay.cxx |4 +++-
 5 files changed, 22 insertions(+), 5 deletions(-)

New commits:
commit 0a34ac386187c5ca328aebc27851c2a2ff38f293
Author: Caolán McNamara 
AuthorDate: Fri Apr 1 16:52:06 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 20:57:24 2022 +0200

forcepoint#99 SwTextFormatter unaware that FirstOfBorderMerge was deleted

READ of size 8 at 0x606000a49e50 thread T0
#0 0x7f7ab6214bf5 in SwPosSize::Height() const 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/possiz.hxx:49:37
#1 0x7f7ab636c311 in 
SwTextFormatter::MergeCharacterBorder(SwLinePortion&, SwLinePortion const*, 
SwTextFormatInfo&) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/itrform2.cxx:2807:43
#2 0x7f7ab636ae08 in SwTextFormatter::InsertPortion(SwTextFormatInfo&, 
SwLinePortion*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/itrform2.cxx:354:13
#3 0x7f7ab6371db1 in SwTextFormatter::BuildPortions(SwTextFormatInfo&) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/itrform2.cxx:709:9
#4 0x7f7ab638b2ac in SwTextFormatter::FormatLine(o3tl::strong_int) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/itrform2.cxx:1701:9
#5 0x7f7ab62a8ad1 in SwTextFrame::FormatLine(SwTextFormatter&, bool) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1212:44
#6 0x7f7ab62af1cc in SwTextFrame::Format_(SwTextFormatter&, 
SwTextFormatInfo&, bool) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1571:23
#7 0x7f7ab62b1f17 in SwTextFrame::Format_(OutputDevice*, 
SwParaPortion*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1743:5
#8 0x7f7ab62b5260 in SwTextFrame::Format(OutputDevice*, SwBorderAttrs 
const*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1932:17
#9 0x7f7ab5dbdabd in SwContentFrame::MakeAll(OutputDevice*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/layout/calcmove.cxx:1514:17

0x606000a49e50 is located 16 bytes inside of 56-byte region 
[0x606000a49e40,0x606000a49e78)
freed by thread T0 here:
#0 0x4fe1f7 in operator delete(void*) 
(/home/caolan/LibreOffice/core-asan/instdir/program/soffice.bin+0x4fe1f7)
#1 0x7f7ab6486d35 in SwTextPortion::~SwTextPortion() 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/portxt.hxx:26:7
#2 0x7f7ab63da0c9 in SwLineLayout::CalcLine(SwTextFormatter&, 
SwTextFormatInfo&) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/porlay.cxx:430:21
#3 0x7f7ab6435413 in SwMultiPortion::CalcSize(SwTextFormatter&, 
SwTextFormatInfo&) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/pormulti.cxx:75:15
#4 0x7f7ab6457749 in 
SwTextFormatter::BuildMultiPortion(SwTextFormatInfo&, SwMultiPortion&) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/pormulti.cxx:2090:16
#5 0x7f7ab636f12c in SwTextFormatter::BuildPortions(SwTextFormatInfo&) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/itrform2.cxx:550:21
#6 0x7f7ab638b2ac in SwTextFormatter::FormatLine(o3tl::strong_int) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/itrform2.cxx:1701:9
#7 0x7f7ab62a8ad1 in SwTextFrame::FormatLine(SwTextFormatter&, bool) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1212:44
#8 0x7f7ab62af1cc in SwTextFrame::Format_(SwTextFormatter&, 
SwTextFormatInfo&, bool) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1571:23
#9 0x7f7ab62b1f17 in SwTextFrame::Format_(OutputDevice*, 
SwParaPortion*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1743:5
#10 0x7f7ab62b5260 in SwTextFrame::Format(OutputDevice*, SwBorderAttrs 
const*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/text/frmform.cxx:1932:17
#11 0x7f7ab5dbdabd in SwContentFrame::MakeAll(OutputDevice*) 
/home/caolan/LibreOffice/core-asan/sw/source/core/layout/calcmove.cxx:1514:17

similar seen in the past as:

commit 96acebb72211b4718eb3038c427df37b55b17b0b
Date:   Tue May 14 01:49:03 2019 +0800

tdf#124937 reset m_pFirstOfBorderMerge before truncate.

commit ecd855794b22c0f7e6fb2f362b566c4d9c5f624a
Date:   Mon Jan 15 22:29:31 2018 +0100

tdf#114536 sw: fix use-after-free in 
SwTextFormatter::MergeCharacterBorder()

Change-Id: Iad855f382a0daf50dac2537d4a91bfeaa9ff3799
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132439
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit b46baea4d1cce81c56ee0d82fbdc352921445fa7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132380
Reviewed-by: 

[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-21.06.24-1'

2022-04-04 Thread Andras Timar (via logerrit)
Tag 'cp-21.06.24-1' created by Andras Timar  at 
2022-04-04 19:27 +

cp-21.06.24-1

Changes since co-21.06.24-1:
Andras Timar (1):
  add a few more languages to Android build

---
 distro-configs/CPAndroidBranding.conf |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---


Daniel Kamil Kozar license statement

2022-04-04 Thread Daniel Kamil Kozar
All of my past & future contributions to LibreOffice may be
licensed under the MPLv2/LGPLv3+ dual license.

Lots of love,
dkk


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - 2 commits - external/liborcus

2022-04-04 Thread Caolán McNamara (via logerrit)
 external/liborcus/UnpackedTarball_liborcus.mk |   14 +
 external/liborcus/forcepoint-87.patch.1   |   27 ++
 external/liborcus/forcepoint-95.patch.1   |   11 ++
 3 files changed, 48 insertions(+), 4 deletions(-)

New commits:
commit 50f0dc8d49d52a9c8bc2079c69bd5feb150cd71a
Author: Caolán McNamara 
AuthorDate: Fri Mar 25 10:14:19 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 19:13:45 2022 +0200

forcepoint#95 read past end of malformed document

Change-Id: I8b2c558c733af3d7662f668af47e962e252ee339
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132311
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 0b9892fee990b7f6d0457ab6191f87c3991580e6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132414
Reviewed-by: Michael Stahl 

diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 3dbcef54ee52..e9ce3f16c356 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -15,10 +15,14 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,1))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,liborcus))
 
-# forcepoint-83.patch.1 submitted as
-# https://gitlab.com/orcus/orcus/-/merge_requests/117
-# forcepoint-84.patch.1 submitted as
-# https://gitlab.com/orcus/orcus/-/merge_requests/118
+# forcepoint-83.patch.1 merged as
+# 
https://gitlab.com/orcus/orcus/-/commit/9f6400b8192e39fefd475a96222713e9e9c60038
+# forcepoint-84.patch.1 merged as
+# 
https://gitlab.com/orcus/orcus/-/commit/223defe95d6f20f1bc5fd22fecc80a79a9519028
+# forcepoint-87.patch.1 merged as
+# 
https://gitlab.com/orcus/orcus/-/commit/a718524ca424fb8a7e7931345a118342d1d4a507
+# forcepoint-95.patch.1 submitted as
+# https://gitlab.com/orcus/orcus/-/merge_requests/124
 
 $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/rpath.patch.0 \
@@ -34,6 +38,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/forcepoint-83.patch.1 \
external/liborcus/forcepoint-84.patch.1 \
external/liborcus/forcepoint-87.patch.1 \
+   external/liborcus/forcepoint-95.patch.1 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/forcepoint-95.patch.1 
b/external/liborcus/forcepoint-95.patch.1
new file mode 100644
index ..93dc822298b0
--- /dev/null
+++ b/external/liborcus/forcepoint-95.patch.1
@@ -0,0 +1,11 @@
+--- a/include/orcus/sax_parser.hpp 2022-03-30 10:54:44.043568760 +0100
 b/include/orcus/sax_parser.hpp 2022-03-30 10:54:55.645037322 +0100
+@@ -547,7 +547,7 @@
+ 
+ skip_space_and_control();
+ 
+-char c = cur_char();
++char c = cur_char_checked();
+ if (c != '=')
+ {
+ std::ostringstream os;
commit efed5861b51cd54182e2c173a0fc98dee2a7742f
Author: Caolán McNamara 
AuthorDate: Fri Mar 25 09:12:30 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 19:13:31 2022 +0200

forcepoint#87 Assertion 'mp_char <= mp_end' failed

Change-Id: I434928cb2425a2e8eb9440dff67f52cda241b2d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132097
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 32019baffa19a8f79cacf93d5dd5a95c7d416657)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132413
Reviewed-by: Michael Stahl 
Tested-by: Caolán McNamara 

diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 0c54dd5e5ef2..3dbcef54ee52 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/allow-utf-8-in-xml-names.patch \
external/liborcus/forcepoint-83.patch.1 \
external/liborcus/forcepoint-84.patch.1 \
+   external/liborcus/forcepoint-87.patch.1 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/forcepoint-87.patch.1 
b/external/liborcus/forcepoint-87.patch.1
new file mode 100644
index ..ddc9118a43ed
--- /dev/null
+++ b/external/liborcus/forcepoint-87.patch.1
@@ -0,0 +1,27 @@
+From e4f3741197a3af6d434850d388483b523138a214 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= 
+Date: Thu, 24 Mar 2022 21:31:14 +
+Subject: [PATCH] forcepoint#87 Assertion `mp_char <= mp_end' failed
+
+soffice.bin: ../../include/orcus/parser_base.hpp:65: bool 
orcus::parser_base::has_char() const: Assertion `mp_char <= mp_end' failed.
+---
+ src/parser/sax_parser_base.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/parser/sax_parser_base.cpp b/src/parser/sax_parser_base.cpp
+index 46acb81d..cb7a9c04 100644
+--- a/src/parser/sax_parser_base.cpp
 b/src/parser/sax_parser_base.cpp
+@@ -293,7 +293,8 @@
+ 
+ // Skip the closing 

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

2022-04-04 Thread Michael Stahl (via logerrit)
 xmloff/source/text/XMLTextShapeImportHelper.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit b812150696c574aea0a173d11f178e8d458b1a3e
Author: Michael Stahl 
AuthorDate: Mon Apr 4 20:29:07 2022 +0200
Commit: Michael Stahl 
CommitDate: Mon Apr 4 20:30:18 2022 +0200

oops, forgot to fix the comment

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

diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx 
b/xmloff/source/text/XMLTextShapeImportHelper.cxx
index 1c567b689632..f4a62f4ad9b7 100644
--- a/xmloff/source/text/XMLTextShapeImportHelper.cxx
+++ b/xmloff/source/text/XMLTextShapeImportHelper.cxx
@@ -119,8 +119,7 @@ void XMLTextShapeImportHelper::addShape(
 // anchor type
 xPropSet->setPropertyValue( gsAnchorType, Any(eAnchorType) );
 
-// page number (must be set after the frame is inserted, because it
-// will be overwritten then inserting the frame.
+// page number must be set before the frame is inserted
 switch( eAnchorType )
 {
 case TextContentAnchorType_AT_PAGE:


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

2022-04-04 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/forcepoint103.html |binary
 sw/qa/extras/layout/layout.cxx  |6 ++
 sw/source/core/layout/layact.cxx|   12 +++-
 sw/source/core/layout/tabfrm.cxx|1 +
 4 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 934b5a9cd658be0dabe18fec0f7bc29943050bd2
Author: Caolán McNamara 
AuthorDate: Sun Apr 3 17:07:45 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 4 20:54:38 2022 +0200

forcepoint#103 avoid crash on layout of specific html

return early if the prev frame was unexpectedly deleted

and another similar case to forcepoint#100 and drop a
SwBorderAttrAccess to allow the cache entry to be removed
in SwCache::DeleteObj

Change-Id: Ia83fe8911e2f6071a28d69c3089a96e3b87cc548
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132487
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132494
Reviewed-by: Michael Stahl 

diff --git a/sw/qa/extras/layout/data/forcepoint103.html 
b/sw/qa/extras/layout/data/forcepoint103.html
new file mode 100644
index ..006a6d340ef0
Binary files /dev/null and b/sw/qa/extras/layout/data/forcepoint103.html differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 18c766904615..9ba5927f3e41 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2547,6 +2547,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint102)
 createSwDoc(DATA_DIRECTORY, "forcepoint102.rtf");
 }
 
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint103)
+{
+createSwWebDoc(DATA_DIRECTORY, "forcepoint103.html");
+}
+
 //just care it doesn't crash/assert
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf147485Forcepoint)
 {
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index da6e7c938f6b..b2b246e5eb2f 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -59,6 +59,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1693,7 +1694,10 @@ bool SwLayAction::FormatContent(SwPageFrame *const pPage)
 // We do this so we don't have to search later on.
 const bool bNxtCnt = IsCalcLayout() && !pContent->GetFollow();
 const SwContentFrame *pContentNext = bNxtCnt ? 
pContent->GetNextContentFrame() : nullptr;
-const SwContentFrame *pContentPrev = pContent->GetPrev() ? 
pContent->GetPrevContentFrame() : nullptr;
+SwContentFrame* const pContentPrev = pContent->GetPrev() ? 
pContent->GetPrevContentFrame() : nullptr;
+std::optional oPrevDeleteListener;
+if (pContentPrev)
+oPrevDeleteListener.emplace(*pContentPrev);
 
 const SwLayoutFrame*pOldUpper  = pContent->GetUpper();
 const SwTabFrame *pTab = pContent->FindTabFrame();
@@ -1772,6 +1776,12 @@ bool SwLayAction::FormatContent(SwPageFrame *const pPage)
 bool bSetContent = true;
 if ( pContentPrev )
 {
+if (oPrevDeleteListener->WasDeleted())
+{
+SAL_WARN("sw", "ContentPrev was deleted");
+return false;
+}
+
 if ( !pContentPrev->isFrameAreaDefinitionValid() && 
pPage->IsAnLower( pContentPrev ) )
 {
 pPage->InvalidateContent();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index c9683f6956e4..a650663de659 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2548,6 +2548,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 }
 }
 
+oAccess.reset();
 const bool bSplitError = !Split( nDeadLine, bTryToSplit, ( 
bTableRowKeep && !(bAllowSplitOfRow || bEmulateTableKeepSplitAllowed) ) );
 
 // tdf#130639 don't start table on a new page after the 
fallback "switch off repeating header"


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

2022-04-04 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/utlui/content.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 097bcd530c7facde50c7fe21e1cee9b4bf4a7949
Author: Jim Raykowski 
AuthorDate: Mon Apr 4 12:48:39 2022 -0800
Commit: Jim Raykowski 
CommitDate: Tue Apr 5 04:20:51 2022 +0200

tdf#148103 SwNavigator: fix outline levels shown

fixes regression introduced in commit
3771a81060f9e1f60ada37c3b7fa0a51b3042952

Change-Id: Ie9a839f0de32177f06bd47a204c55b38eb9371f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132533
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 36f7801f375a..281821d183ad 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -4480,13 +4480,18 @@ void SwContentTree::DeleteOutlineSelections()
 
 void SwContentTree::SetOutlineLevel(sal_uInt8 nSet)
 {
+if (nSet == m_nOutlineLevel)
+return;
 m_nOutlineLevel = nSet;
 m_pConfig->SetOutlineLevel( m_nOutlineLevel );
 std::unique_ptr& rpContentT = (State::ACTIVE == m_eState)
 ? m_aActiveContentArr[ContentTypeId::OUTLINE]
 : m_aHiddenContentArr[ContentTypeId::OUTLINE];
 if(rpContentT)
+{
 rpContentT->SetOutlineLevel(m_nOutlineLevel);
+rpContentT->FillMemberList();
+}
 Display(State::ACTIVE == m_eState);
 }
 


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

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 sc/source/ui/dialogs/SparklineDialog.cxx |  174 
 sc/source/ui/inc/SparklineDialog.hxx |   18 
 sc/uiconfig/scalc/ui/sparklinedialog.ui  | 1095 ---
 3 files changed, 929 insertions(+), 358 deletions(-)

New commits:
commit d97d1f2643d30ebcab149854137cd3c4f46004d2
Author: Tomaž Vajngerl 
AuthorDate: Tue Mar 29 09:31:08 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Apr 5 05:17:23 2022 +0200

sc: edit all sparkline attributes in SparklineDialog

Change-Id: I6ca9e3436e0dd807b30585576ae2067076c3b7ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132516
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/source/ui/dialogs/SparklineDialog.cxx 
b/sc/source/ui/dialogs/SparklineDialog.cxx
index ba01a64912c6..59068077b969 100644
--- a/sc/source/ui/dialogs/SparklineDialog.cxx
+++ b/sc/source/ui/dialogs/SparklineDialog.cxx
@@ -16,6 +16,7 @@
 #include 
 
 #include 
+#include 
 
 namespace sc
 {
@@ -56,9 +57,20 @@ SparklineDialog::SparklineDialog(SfxBindings* pBindings, 
SfxChildWindow* pChildW
 , mxCheckButtonLow(m_xBuilder->weld_check_button("check-low"))
 , mxCheckButtonFirst(m_xBuilder->weld_check_button("check-first"))
 , mxCheckButtonLast(m_xBuilder->weld_check_button("check-last"))
+, mxSpinLineWidth(m_xBuilder->weld_spin_button("spin-line-width"))
 , mxRadioLine(m_xBuilder->weld_radio_button("line-radiobutton"))
 , mxRadioColumn(m_xBuilder->weld_radio_button("column-radiobutton"))
 , mxRadioStacked(m_xBuilder->weld_radio_button("stacked-radiobutton"))
+, 
mxCheckDisplayXAxis(m_xBuilder->weld_check_button("check-display-x-axis"))
+, 
mxCheckDisplayHidden(m_xBuilder->weld_check_button("check-display-hidden"))
+, mxCheckRightToLeft(m_xBuilder->weld_check_button("check-right-to-left"))
+, 
mxRadioDisplayEmptyGap(m_xBuilder->weld_radio_button("display-empty-radiobutton-gap"))
+, 
mxRadioDisplayEmptyZero(m_xBuilder->weld_radio_button("display-empty-radiobutton-zero"))
+, 
mxRadioDisplayEmptySpan(m_xBuilder->weld_radio_button("display-empty-radiobutton-span"))
+, mxComboMinAxisType(m_xBuilder->weld_combo_box("combo-min-axis-type"))
+, mxComboMaxAxisType(m_xBuilder->weld_combo_box("combo-max-axis-type"))
+, 
mxSpinCustomMin(m_xBuilder->weld_formatted_spin_button("spin-custom-min"))
+, 
mxSpinCustomMax(m_xBuilder->weld_formatted_spin_button("spin-custom-max"))
 , mbEditMode(false)
 {
 mxInputRangeEdit->SetReferences(this, mxInputRangeLabel.get());
@@ -94,6 +106,9 @@ SparklineDialog::SparklineDialog(SfxBindings* pBindings, 
SfxChildWindow* pChildW
 mxRadioLine->connect_toggled(aRadioButtonLink);
 mxRadioColumn->connect_toggled(aRadioButtonLink);
 mxRadioStacked->connect_toggled(aRadioButtonLink);
+mxRadioDisplayEmptyGap->connect_toggled(aRadioButtonLink);
+mxRadioDisplayEmptyZero->connect_toggled(aRadioButtonLink);
+mxRadioDisplayEmptySpan->connect_toggled(aRadioButtonLink);
 
 Link aLink = LINK(this, SparklineDialog, 
ToggleHandler);
 mxCheckButtonNegative->connect_toggled(aLink);
@@ -102,6 +117,26 @@ SparklineDialog::SparklineDialog(SfxBindings* pBindings, 
SfxChildWindow* pChildW
 mxCheckButtonLow->connect_toggled(aLink);
 mxCheckButtonFirst->connect_toggled(aLink);
 mxCheckButtonLast->connect_toggled(aLink);
+mxCheckDisplayXAxis->connect_toggled(aLink);
+mxCheckDisplayHidden->connect_toggled(aLink);
+mxCheckRightToLeft->connect_toggled(aLink);
+
+mxSpinLineWidth->connect_value_changed(LINK(this, SparklineDialog, 
SpinLineWidthChanged));
+
+mxComboMinAxisType->connect_changed(LINK(this, SparklineDialog, 
ComboValueChanged));
+mxComboMaxAxisType->connect_changed(LINK(this, SparklineDialog, 
ComboValueChanged));
+
+mxSpinCustomMin->connect_value_changed(LINK(this, SparklineDialog, 
SpinCustomChanged));
+Formatter& rSpinCustomMinFormatter = mxSpinCustomMin->GetFormatter();
+rSpinCustomMinFormatter.ClearMinValue();
+rSpinCustomMinFormatter.ClearMaxValue();
+rSpinCustomMinFormatter.UseInputStringForFormatting();
+
+mxSpinCustomMax->connect_value_changed(LINK(this, SparklineDialog, 
SpinCustomChanged));
+Formatter& rSpinCustomMaxFormatter = mxSpinCustomMax->GetFormatter();
+rSpinCustomMaxFormatter.ClearMinValue();
+rSpinCustomMaxFormatter.ClearMaxValue();
+rSpinCustomMaxFormatter.UseInputStringForFormatting();
 
 setupValues();
 
@@ -145,7 +180,7 @@ void SparklineDialog::setupValues()
 
 setInputSelection();
 
-auto& rAttribute = mpLocalSparklineGroup->getAttributes();
+auto const& rAttribute = mpLocalSparklineGroup->getAttributes();
 
 switch (rAttribute.getType())
 {
@@ -160,6 +195,19 @@ void SparklineDialog::setupValues()
 break;
 }
 
+switch (rAttribute.getDisplayEmptyCellsAs())
+{
+case sc::DisplayEmptyCellsAs::Gap:
+mxRadioDisplayEmptyGap->set_active(true);
+break;
+   

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

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 sc/inc/SparklineGroup.hxx |7 ---
 sc/inc/document.hxx   |7 +--
 sc/qa/unit/SparklineImportExportTest.cxx  |4 ++--
 sc/qa/unit/SparklineTest.cxx  |   11 +++
 sc/source/core/data/column2.cxx   |7 ---
 sc/source/core/data/column4.cxx   |7 +--
 sc/source/core/data/document.cxx  |   16 
 sc/source/filter/excel/export/SparklineExt.cxx|2 +-
 sc/source/filter/oox/SparklineFragment.cxx|5 +++--
 sc/source/filter/xml/SparklineGroupsExport.cxx|7 ++-
 sc/source/filter/xml/SparklineGroupsImportContext.cxx |4 +++-
 sc/source/ui/sparklines/SparklineGroup.cxx|7 +--
 12 files changed, 61 insertions(+), 23 deletions(-)

New commits:
commit 5ff13a0866fe5c408f9e9c7441a9d052b383d99c
Author: Tomaž Vajngerl 
AuthorDate: Mon Mar 28 22:51:08 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Apr 5 05:16:59 2022 +0200

sc: use GUID for the SparklineGroup ID and use that

This adds tools::Guid as the SparklineGroup ID. At import the
Guid is parsed by tools::Guid and later it is used to identify
the SparklineGroup.
This is useful when copying sparklines so we can preserve to
which group it belongs, when that is desired.

Change-Id: I4f2b560d5ea74552e8add57bb05469be57cf4a69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132515
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/inc/SparklineGroup.hxx b/sc/inc/SparklineGroup.hxx
index 5a3bda62b6ab..c5e917f059f3 100644
--- a/sc/inc/SparklineGroup.hxx
+++ b/sc/inc/SparklineGroup.hxx
@@ -13,6 +13,7 @@
 #include "scdllapi.h"
 #include "SparklineAttributes.hxx"
 #include 
+#include 
 #include 
 
 namespace sc
@@ -22,15 +23,15 @@ class SC_DLLPUBLIC SparklineGroup
 {
 private:
 SparklineAttributes m_aAttributes;
-OUString m_sUID;
+tools::Guid m_aGUID;
 
 public:
 SparklineAttributes& getAttributes() { return m_aAttributes; }
 SparklineAttributes const& getAttributes() const { return m_aAttributes; }
 
-OUString getID() { return m_sUID; }
+tools::Guid& getID() { return m_aGUID; }
 
-void setID(OUString const& rID) { m_sUID = rID; }
+void setID(tools::Guid const& rGuid) { m_aGUID = rGuid; }
 
 SparklineGroup();
 SparklineGroup(SparklineGroup const& pOtherSparkline);
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index e31900dee7cd..1cde9b95fe4c 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -69,12 +69,12 @@ enum class EEHorizontalTextDirection;
 namespace editeng { class SvxBorderLine; }
 namespace formula { struct VectorRefArray; }
 namespace svl {
-
 class SharedString;
 class SharedStringPool;
-
 }
 
+namespace tools { class Guid; }
+
 namespace sc {
 
 struct FormulaGroupContext;
@@ -208,6 +208,7 @@ typedef o3tl::sorted_vector ScCondFormatIndexes;
 struct ScSheetLimits;
 struct ScDataAreaExtras;
 
+
 namespace sc {
 
 typedef std::map IconSetBitmapMap;
@@ -1255,6 +1256,8 @@ public:
 SC_DLLPUBLIC sc::SparklineList* GetSparklineList(SCTAB nTab);
 SC_DLLPUBLIC bool DeleteSparkline(ScAddress const& rPosition);
 SC_DLLPUBLIC bool HasOneSparklineGroup(ScRange const& rRange);
+SC_DLLPUBLIC std::shared_ptr 
SearchSparklineGroup(tools::Guid const& rGuid);
+
 /** Notes **/
 SC_DLLPUBLIC ScPostIt*   GetNote(const ScAddress& rPos);
 SC_DLLPUBLIC ScPostIt*   GetNote(SCCOL nCol, SCROW nRow, SCTAB nTab);
diff --git a/sc/qa/unit/SparklineImportExportTest.cxx 
b/sc/qa/unit/SparklineImportExportTest.cxx
index 6da76fb2dcfb..7060a120c49a 100644
--- a/sc/qa/unit/SparklineImportExportTest.cxx
+++ b/sc/qa/unit/SparklineImportExportTest.cxx
@@ -69,8 +69,8 @@ void checkSparklines(ScDocument& rDocument)
 {
 auto pSparkline = rDocument.GetSparkline(ScAddress(0, 1, 0)); // A2
 CPPUNIT_ASSERT(pSparkline);
-
CPPUNIT_ASSERT_EQUAL(OUString("{1C5C5DE0-3C09-4CB3-A3EC-9E763301EC82}"),
- pSparkline->getSparklineGroup()->getID());
+CPPUNIT_ASSERT_EQUAL(OString("{1C5C5DE0-3C09-4CB3-A3EC-9E763301EC82}"),
+ 
pSparkline->getSparklineGroup()->getID().getString());
 
 auto& rAttributes = pSparkline->getSparklineGroup()->getAttributes();
 CPPUNIT_ASSERT_EQUAL(sc::SparklineType::Line, rAttributes.getType());
diff --git a/sc/qa/unit/SparklineTest.cxx b/sc/qa/unit/SparklineTest.cxx
index ac9c0996ac59..6e203131e9c5 100644
--- a/sc/qa/unit/SparklineTest.cxx
+++ b/sc/qa/unit/SparklineTest.cxx
@@ -153,6 +153,7 @@ void SparklineTest::testCopyPasteSparkline()
 
 ScRange aSourceRange(0, 6, 0, 0, 6, 0);
 auto pSparkline = rDocument.GetSparkline(aSourceRange.aStart);
+auto const& pOriginalGroup = pSparkline->getSparklineGroup();
 
 CPPUNIT_ASSERT(pSparkline);
   

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

2022-04-04 Thread Andrea Gelmini (via logerrit)
 oox/source/drawingml/diagram/datamodel.hxx |4 ++--
 sc/inc/SparklineAttributes.hxx |2 +-
 sc/qa/unit/SparklineImportExportTest.cxx   |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 50b56ee25b119fb18480d7c9c670ec3986b725cd
Author: Andrea Gelmini 
AuthorDate: Mon Apr 4 23:04:20 2022 +0200
Commit: Julien Nabet 
CommitDate: Tue Apr 5 07:06:44 2022 +0200

Fix typos

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

diff --git a/oox/source/drawingml/diagram/datamodel.hxx 
b/oox/source/drawingml/diagram/datamodel.hxx
index eef345edb630..3f410e5d9033 100644
--- a/oox/source/drawingml/diagram/datamodel.hxx
+++ b/oox/source/drawingml/diagram/datamodel.hxx
@@ -71,8 +71,8 @@ protected:
 PointShapeMap maPointShapeMap;
 };
 
-// Oox-lcal definiitkion of DiagramData. Doing and using this onm Oox
-// allows to do much less static_cast(s) - if at all  from 
svx::diagram::DiagramData
+// Oox-local definition of DiagramData. Doing and using this on Oox
+// allows to do much less static_cast(s) - if at all from 
svx::diagram::DiagramData
 typedef std::shared_ptr< DiagramData > OoxDiagramDataPtr;
 
 }
diff --git a/sc/inc/SparklineAttributes.hxx b/sc/inc/SparklineAttributes.hxx
index e89e15bc1a1b..d1baf732ced3 100644
--- a/sc/inc/SparklineAttributes.hxx
+++ b/sc/inc/SparklineAttributes.hxx
@@ -93,7 +93,7 @@ public:
 AxisType getMaxAxisType() const;
 void setMaxAxisType(AxisType eAxisType);
 
-/** Line weigth or width in points */
+/** Line weight or width in points */
 double getLineWeight() const;
 void setLineWeight(double nWeight);
 
diff --git a/sc/qa/unit/SparklineImportExportTest.cxx 
b/sc/qa/unit/SparklineImportExportTest.cxx
index 7060a120c49a..f6969831ee17 100644
--- a/sc/qa/unit/SparklineImportExportTest.cxx
+++ b/sc/qa/unit/SparklineImportExportTest.cxx
@@ -187,7 +187,7 @@ void SparklineImportExportTest::testSparklinesExportODS()
 std::shared_ptr pXPathFile = 
ScBootstrapFixture::exportTo(*xDocSh, FORMAT_ODS);
 xmlDocUniquePtr pXmlDoc = XPathHelper::parseExport(pXPathFile, 
m_xSFactory, "content.xml");
 
-// We have 3 sparkline groups = 3 tables that contain spakrlines
+// We have 3 sparkline groups = 3 tables that contain sparklines
 assertXPath(pXmlDoc, "//table:table/calcext:sparkline-groups", 3);
 
 // Check the number of sparkline groups in table[1]


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

2022-04-04 Thread Andrea Gelmini (via logerrit)
 0 files changed

New commits:
commit d48b472372f3d0b04338455ea8615f9af6e29169
Author: Andrea Gelmini 
AuthorDate: Mon Apr 4 22:53:38 2022 +0200
Commit: Julien Nabet 
CommitDate: Tue Apr 5 07:05:34 2022 +0200

Removed execution bits on odp file

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

diff --git a/oox/qa/unit/data/tdf100391_TextAreaRect.odp 
b/oox/qa/unit/data/tdf100391_TextAreaRect.odp
old mode 100755
new mode 100644


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

2022-04-04 Thread Andrea Gelmini (via logerrit)
 sw/source/core/text/pormulti.cxx   |2 +-
 vcl/source/gdi/CommonSalLayout.cxx |2 +-
 wizards/source/sfdialogs/SF_Dialog.xba |6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 684ec4b870ad13b2eff3e10ef429f4e19bb57441
Author: Andrea Gelmini 
AuthorDate: Mon Apr 4 23:04:27 2022 +0200
Commit: Julien Nabet 
CommitDate: Tue Apr 5 07:08:04 2022 +0200

Fix typos

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

diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index c798a0dfc519..3fb6a3091ad0 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -139,7 +139,7 @@ void SwMultiPortion::dumpAsXml(xmlTextWriterPtr pWriter, 
const OUString& rText,
 {
 (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwMultiPortion"));
 dumpAsXmlAttributes(pWriter, rText, nOffset);
-// Indentionally not incrementing nOffset here, one of the child portions 
will do that.
+// Intentionally not incrementing nOffset here, one of the child portions 
will do that.
 
 const SwLineLayout* pLine = ();
 while (pLine)
diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index 74478e0ef268..be6480bfde1a 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -437,7 +437,7 @@ bool 
GenericSalLayout::LayoutText(vcl::text::ImplLayoutArgs& rArgs, const SalLay
 }
 }
 
-// Charters with U and Tu vertical orientation should
+// Characters with U and Tu vertical orientation should
 // be shaped in vertical direction. But characters
 // with Tr should be shaped in vertical direction
 // only if they have vertical alternates, otherwise
diff --git a/wizards/source/sfdialogs/SF_Dialog.xba 
b/wizards/source/sfdialogs/SF_Dialog.xba
index c772c9d1a4b4..fea3eac98f8f 100644
--- a/wizards/source/sfdialogs/SF_Dialog.xba
+++ b/wizards/source/sfdialogs/SF_Dialog.xba
@@ -341,7 +341,7 @@ Dim oParentPosSize As Object  Parent 
com.sun.star.awt.Rectangle
 Dim lParentX As Long X position of parent 
dialog
 Dim lParentY As Long Y position of parent 
dialog
 Dim oPosSize As Object   Dialog 
com.sun.star.awt.Rectangle
-Dim iFlags As Integer
com.sun.star.awt.PosSize conatnts
+Dim iFlags As Integer
com.sun.star.awt.PosSize constants
 Const cstThisSub = SFDialogs.Dialog.Center
 Const cstSubArgs = [Parent]
 
@@ -756,7 +756,7 @@ Public Function Resize(Optional ByVal Left As Variant _
 
 Dim bResize As Boolean   Return value
 Dim oPosSize As Object   
com.sun.star.awt.Rectangle
-Dim iFlags As Integer
com.sun.star.awt.PosSize conatnts
+Dim iFlags As Integer
com.sun.star.awt.PosSize constants
 Const cstThisSub = SFDialogs.Dialog.Resize
 Const cstSubArgs = [Left], [Top], [Width], [Height]
 
@@ -1108,4 +1108,4 @@ Private Function _Repr() As String
 End Function SFDialogs.SF_Dialog._Repr
 
 REM  END OF SFDIALOGS.SF_DIALOG
-
\ No newline at end of file
+


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

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 sc/Library_sc.mk |1 
 sc/inc/SparklineGroup.hxx|3 
 sc/inc/globstr.hrc   |1 
 sc/qa/unit/SparklineTest.cxx |   69 ++
 sc/source/ui/dialogs/SparklineDialog.cxx |  146 ++-
 sc/source/ui/docshell/docfunc.cxx|   12 +
 sc/source/ui/inc/SparklineDialog.hxx |6 
 sc/source/ui/inc/docfunc.hxx |4 
 sc/source/ui/inc/undo/UndoEditSparklineGroup.hxx |   44 ++
 sc/source/ui/sparklines/SparklineGroup.cxx   |6 
 sc/source/ui/undo/UndoEditSparklineGroup.cxx |   65 ++
 11 files changed, 279 insertions(+), 78 deletions(-)

New commits:
commit 12bb0d897d97c9231e86d6b0071f8a0d29c7e660
Author: Tomaž Vajngerl 
AuthorDate: Thu Mar 31 23:07:44 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Apr 5 06:42:05 2022 +0200

sc: add SparklineGroup Undo/Redo

As SparklineAttributes are COW, we can just exchange them around
in the SparklineGroup when undoing and redoing.

This also changes SparklineDialog to work with a local copy of
SparklineAttributes when editing, or an empty initial copy when
inserting a new Sparkline into the sheet.

Change-Id: I36e9c887ca640f40266f381e98e57f027a5ca07f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132542
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index e97f6e04b4c2..294c36b4578c 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -555,6 +555,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/ui/undo/undotab \
 sc/source/ui/undo/undoutil \
 sc/source/ui/undo/UndoInsertSparkline \
+sc/source/ui/undo/UndoEditSparklineGroup \
 sc/source/ui/undo/UndoDeleteSparkline \
 sc/source/ui/unoobj/ChartRangeSelectionListener \
 sc/source/ui/unoobj/addruno \
diff --git a/sc/inc/SparklineGroup.hxx b/sc/inc/SparklineGroup.hxx
index c5e917f059f3..7d2e75e6e9e3 100644
--- a/sc/inc/SparklineGroup.hxx
+++ b/sc/inc/SparklineGroup.hxx
@@ -29,12 +29,15 @@ public:
 SparklineAttributes& getAttributes() { return m_aAttributes; }
 SparklineAttributes const& getAttributes() const { return m_aAttributes; }
 
+void setAttributes(SparklineAttributes const& rAttributes) { m_aAttributes 
= rAttributes; };
+
 tools::Guid& getID() { return m_aGUID; }
 
 void setID(tools::Guid const& rGuid) { m_aGUID = rGuid; }
 
 SparklineGroup();
 SparklineGroup(SparklineGroup const& pOtherSparkline);
+SparklineGroup(SparklineAttributes const& rSparklineAttributes);
 
 SparklineGroup& operator=(const SparklineGroup&) = delete;
 };
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 0eb0e7929625..de33f2d4e61b 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -541,6 +541,7 @@
 #define STR_INDENTCELL  NC_("STR_INDENTCELL", "Indent: 
")
 #define STR_UNDO_INSERT_SPARKLINE_GROUP 
NC_("STR_UNDO_INSERT_SPARKLINE", "Insert Sparkline Group")
 #define STR_UNDO_DELETE_SPARKLINE   
NC_("STR_UNDO_DELETE_SPARKLINE", "Delete Sparkline")
+#define STR_UNDO_EDIT_SPARKLINE_GROUP   
NC_("STR_UNDO_EDIT_SPARKLINE_GROUP", "Edit Sparkline Group")
 
 #endif
 
diff --git a/sc/qa/unit/SparklineTest.cxx b/sc/qa/unit/SparklineTest.cxx
index 6e203131e9c5..42ac88467b6d 100644
--- a/sc/qa/unit/SparklineTest.cxx
+++ b/sc/qa/unit/SparklineTest.cxx
@@ -53,6 +53,7 @@ public:
 void testUndoRedoInsertSparkline();
 void testUndoRedoDeleteSparkline();
 void testUndoRedoClearContentForSparkline();
+void testUndoRedoEditSparklineGroup();
 
 CPPUNIT_TEST_SUITE(SparklineTest);
 CPPUNIT_TEST(testAddSparkline);
@@ -62,6 +63,7 @@ public:
 CPPUNIT_TEST(testUndoRedoInsertSparkline);
 CPPUNIT_TEST(testUndoRedoDeleteSparkline);
 CPPUNIT_TEST(testUndoRedoClearContentForSparkline);
+CPPUNIT_TEST(testUndoRedoEditSparklineGroup);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -427,6 +429,73 @@ void SparklineTest::testUndoRedoClearContentForSparkline()
 xDocSh->DoClose();
 }
 
+void SparklineTest::testUndoRedoEditSparklineGroup()
+{
+ScDocShellRef xDocSh = loadEmptyDocument();
+CPPUNIT_ASSERT(xDocSh);
+
+ScDocument& rDocument = xDocSh->GetDocument();
+ScTabViewShell* pViewShell = xDocSh->GetBestViewShell(false);
+CPPUNIT_ASSERT(pViewShell);
+
+auto& rDocFunc = xDocSh->GetDocFunc();
+
+auto pSparklineGroup = std::make_shared();
+{
+sc::SparklineAttributes& rAttibutes = pSparklineGroup->getAttributes();
+rAttibutes.setType(sc::SparklineType::Column);
+rAttibutes.setColorSeries(COL_YELLOW);
+rAttibutes.setColorAxis(COL_GREEN);
+}
+
+rDocument.CreateSparkline(ScAddress(0, 6, 0), pSparklineGroup);
+
+sc::SparklineAttributes aNewAttributes;
+aNewAttributes.setType(sc::SparklineType::Stacked);
+

[Libreoffice-commits] core.git: comphelper/source include/tools sc/source tools/CppunitTest_tools_test.mk tools/qa

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 comphelper/source/xml/xmltools.cxx   |   13 --
 include/tools/Guid.hxx   |  166 +++
 sc/source/filter/xcl97/XclExpChangeTrack.cxx |   20 +--
 tools/CppunitTest_tools_test.mk  |1 
 tools/qa/cppunit/test_guid.cxx   |  123 
 5 files changed, 300 insertions(+), 23 deletions(-)

New commits:
commit cf4d5ed026c8799a70432a832a8a707c2e316216
Author: Tomaž Vajngerl 
AuthorDate: Sun Mar 27 22:52:48 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Apr 5 01:57:21 2022 +0200

add tools::Guid class to generate, parse GUID values

Change-Id: Ie4d8fad4d8f22c8277c22c21b7a9eb3e7c9e4f1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132513
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/comphelper/source/xml/xmltools.cxx 
b/comphelper/source/xml/xmltools.cxx
index 366321076bad..1b10964b1a35 100644
--- a/comphelper/source/xml/xmltools.cxx
+++ b/comphelper/source/xml/xmltools.cxx
@@ -9,7 +9,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 using namespace com::sun::star;
@@ -92,15 +92,8 @@ namespace comphelper::xml
 
 OString generateGUIDString()
 {
-sal_uInt8 aSeq[16];
-rtl_createUuid(aSeq, nullptr, true);
-
-char str[39];
-sprintf(str, 
"{%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
-aSeq[0], aSeq[1], aSeq[2], aSeq[3], aSeq[4], aSeq[5], 
aSeq[6], aSeq[7], aSeq[8],
-aSeq[9], aSeq[10], aSeq[11], aSeq[12], aSeq[13], aSeq[14], 
aSeq[15]);
-
-return OString(str);
+tools::Guid aGuid(tools::Guid::Generate);
+return aGuid.getString();
 }
 }
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/tools/Guid.hxx b/include/tools/Guid.hxx
new file mode 100644
index ..980048d9415d
--- /dev/null
+++ b/include/tools/Guid.hxx
@@ -0,0 +1,166 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace tools
+{
+class Guid
+{
+private:
+typedef std::array GuidArrayType;
+
+GuidArrayType maGuidArray;
+
+static sal_uInt8 gethex(char nChar)
+{
+if (nChar >= '0' && nChar <= '9')
+return nChar - '0';
+else if (nChar >= 'a' && nChar <= 'f')
+return nChar - 'a' + 10;
+else if (nChar >= 'A' && nChar <= 'F')
+return nChar - 'A' + 10;
+else
+return 0;
+}
+
+static sal_uInt8 covertHexChar(char high, char low)
+{
+return (gethex(high) << 4) + gethex(low);
+}
+
+void parse(OString const& rString)
+{
+if (rString.getLength() != 38)
+return;
+
+if (rString[0] != '{' || rString[37] != '}' || rString[9] != '-' || 
rString[14] != '-'
+|| rString[19] != '-' || rString[24] != '-')
+return;
+
+for (size_t x = 1; x <= 8; x++)
+if (!std::isxdigit(rString[x]))
+return;
+for (size_t x = 10; x <= 13; x++)
+if (!std::isxdigit(rString[x]))
+return;
+for (size_t x = 15; x <= 18; x++)
+if (!std::isxdigit(rString[x]))
+return;
+for (size_t x = 20; x <= 23; x++)
+if (!std::isxdigit(rString[x]))
+return;
+for (size_t x = 25; x <= 36; x++)
+if (!std::isxdigit(rString[x]))
+return;
+
+maGuidArray[0] = covertHexChar(rString[1], rString[2]);
+maGuidArray[1] = covertHexChar(rString[3], rString[4]);
+maGuidArray[2] = covertHexChar(rString[5], rString[6]);
+maGuidArray[3] = covertHexChar(rString[7], rString[8]);
+
+maGuidArray[4] = covertHexChar(rString[10], rString[11]);
+maGuidArray[5] = covertHexChar(rString[12], rString[13]);
+
+maGuidArray[6] = covertHexChar(rString[15], rString[16]);
+maGuidArray[7] = covertHexChar(rString[17], rString[18]);
+
+maGuidArray[8] = covertHexChar(rString[20], rString[21]);
+maGuidArray[9] = covertHexChar(rString[22], rString[23]);
+
+maGuidArray[10] = covertHexChar(rString[25], rString[26]);
+maGuidArray[11] = covertHexChar(rString[27], rString[28]);
+maGuidArray[12] = covertHexChar(rString[29], rString[30]);
+maGuidArray[13] = covertHexChar(rString[31], rString[32]);
+maGuidArray[14] = covertHexChar(rString[33], rString[34]);
+maGuidArray[15] = covertHexChar(rString[35], rString[36]);
+}
+

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

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 sc/inc/column.hxx   |3 +
 sc/source/core/data/column2.cxx |   31 
 sc/source/core/data/table1.cxx  |   61 +++-
 sc/source/core/data/table2.cxx  |4 ++
 sc/source/ui/view/printfun.cxx  |2 +
 5 files changed, 100 insertions(+), 1 deletion(-)

New commits:
commit c07d2ea9589cf794bd300697e8a40bf9f94a8346
Author: Tomaž Vajngerl 
AuthorDate: Mon Mar 28 14:31:21 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Apr 5 03:45:59 2022 +0200

sc: make printing of Sparklines work

Sparkline cells don't contain any data, so they would be ignored
if we don't include them in the function that determine if there
is any data in a cell or not.
This is the main reason why the cells weren't drawn when printing
as they had no data so they were ignored.

Change-Id: I7849f1a00c9421616b8af90bdac368fd63ae1087
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132514
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index f60ea22cbc30..0a2b16c809d9 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -677,6 +677,9 @@ public:
 void CopyCellSparklinesToDocument(SCROW nRow1, SCROW nRow2, ScColumn& 
rDestCol, SCROW nRowOffsetDest = 0) const;
 void DuplicateSparklines(SCROW nStartRow, size_t nDataSize, ScColumn& 
rDestCol,
  sc::ColumnBlockPosition& rDestBlockPos, SCROW 
nRowOffsetDest = 0) const;
+bool HasSparklines() const;
+SCROW GetSparklinesMaxRow() const;
+SCROW GetSparklinesMinRow() const;
 
 // cell notes
 ScPostIt* GetCellNote( SCROW nRow );
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 787059376f44..d8e1003beaff 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -2088,6 +2088,37 @@ void ScColumn::DuplicateSparklines(SCROW nStartRow, 
size_t nDataSize, ScColumn&
 rDestBlockPos.miSparklinePos = rDestCol.maSparklines.begin();
 }
 
+bool ScColumn::HasSparklines() const
+{
+if (maSparklines.block_size() == 1 && maSparklines.begin()->type == 
sc::element_type_empty)
+return false; // all elements are empty
+return true; // otherwise some must be sparklines
+}
+
+SCROW ScColumn::GetSparklinesMaxRow() const
+{
+SCROW maxRow = 0;
+for (const auto& rSparkline : maSparklines)
+{
+if (rSparkline.type == sc::element_type_sparkline)
+maxRow = rSparkline.position + rSparkline.size - 1;
+}
+return maxRow;
+}
+
+SCROW ScColumn::GetSparklinesMinRow() const
+{
+SCROW minRow = 0;
+sc::SparklineStoreType::const_iterator it = 
std::find_if(maSparklines.begin(), maSparklines.end(),
+[](const auto& rSparkline)
+{
+return rSparkline.type == sc::element_type_sparkline;
+});
+if (it != maSparklines.end())
+minRow = it->position;
+return minRow;
+}
+
 // Notes
 
 ScPostIt* ScColumn::GetCellNote(SCROW nRow)
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 51f6d35710a7..5c35eba2fb9c 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -539,6 +539,20 @@ bool ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow 
) const
 nMaxX = i;
 }
 }
+if (aCol[i].HasSparklines())
+{
+SCROW maxSparklineRow = aCol[i].GetSparklinesMaxRow();
+if (maxSparklineRow >= nMaxY)
+{
+bFound = true;
+nMaxY = maxSparklineRow;
+}
+if (i > nMaxX)
+{
+bFound = true;
+nMaxX = i;
+}
+}
 }
 
 rEndCol = nMaxX;
@@ -608,6 +622,20 @@ bool ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& 
rEndRow, bool bNotes, bool bC
 nMaxX = i;
 }
 }
+if (aCol[i].HasSparklines())
+{
+SCROW maxSparklineRow = aCol[i].GetSparklinesMaxRow();
+if (maxSparklineRow >= nMaxY)
+{
+bFound = true;
+nMaxY = maxSparklineRow;
+}
+if (i > nMaxX)
+{
+bFound = true;
+nMaxX = i;
+}
+}
 }
 }
 
@@ -695,8 +723,16 @@ bool ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW 
nEndRow,
 if (!aCol[i].IsEmptyBlock( nStartRow, nEndRow ))//TODO: bNotes 
??
 {
 bFound = true;
-if (i>nMaxX)
+if (i > nMaxX)
+nMaxX = i;
+}
+else if (aCol[i].HasSparklines())
+{
+if (i > nMaxX)
+{
+bFound = true;
 nMaxX = i;
+}
 }

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

2022-04-04 Thread Tomaž Vajngerl (via logerrit)
 sc/source/ui/inc/SparklineRenderer.hxx |  572 +
 sc/source/ui/view/output.cxx   |  256 +-
 2 files changed, 590 insertions(+), 238 deletions(-)

New commits:
commit 574384e90fdb24aed40e0dcffd17adae3443aa04
Author: Tomaž Vajngerl 
AuthorDate: Thu Mar 31 21:47:53 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Apr 5 06:39:41 2022 +0200

sc: Sparkline rendering improvement, take all attrs. into account

This change moves Sparkline rendering into a new class and into
a separate file - SparklineRenderer, and improve the rendering by
taking all the sparkline attributes into account.
Improvements:
- render correct line width for lines
- take hidden cells into account
- draw the X axis
- allow to override the min, max values (custom X axis limits)
- handle empty cells (interpret as zero, as a gap or interpolate)
- correctly handle first and last value
- take marker attribute and color into account (missing before)
- simplify range iteration (with RangeTraverser class)
- show min, max also for stacked sparkline type
- ...

Change-Id: Id855f775677aa309b42174e086ad4f5d7de079c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132541
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/source/ui/inc/SparklineRenderer.hxx 
b/sc/source/ui/inc/SparklineRenderer.hxx
new file mode 100644
index ..9f697a6002b2
--- /dev/null
+++ b/sc/source/ui/inc/SparklineRenderer.hxx
@@ -0,0 +1,572 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+namespace sc
+{
+/** Contains the marker polygon and the color of a marker */
+struct SparklineMarker
+{
+basegfx::B2DPolygon maPolygon;
+Color maColor;
+};
+
+/** Sparkline value and action that needs to me performed on the value */
+struct SparklineValue
+{
+enum class Action
+{
+None, // No action on the value
+Skip, // Skip the value
+Interpolate // Intrpolate the value
+};
+
+double maValue;
+Action meAction;
+
+SparklineValue(double aValue, Action eAction)
+: maValue(aValue)
+, meAction(eAction)
+{
+}
+};
+
+/** Contains and manages the values of the sparkline.
+ *
+ * It automatically keeps track of the minimums and maximums, and
+ * skips or interpolates the sparkline values if needed, depending on
+ * the input. This is done so it is easier to handle the sparkline
+ * values later on.
+ */
+class SparklineValues
+{
+private:
+double mfPreviousValue = 0.0;
+size_t mnPreviousIndex = std::numeric_limits::max();
+
+std::vector maToInterpolateIndex;
+
+std::vector maValueList;
+
+public:
+size_t mnFirstIndex = std::numeric_limits::max();
+size_t mnLastIndex = 0;
+
+double mfMinimum = std::numeric_limits::max();
+double mfMaximum = std::numeric_limits::min();
+
+std::vector const& getValuesList() const { return 
maValueList; }
+
+void add(double fValue, SparklineValue::Action eAction)
+{
+maValueList.emplace_back(fValue, eAction);
+size_t nCurrentIndex = maValueList.size() - 1;
+
+if (eAction == SparklineValue::Action::None)
+{
+mnLastIndex = nCurrentIndex;
+
+if (mnLastIndex < mnFirstIndex)
+mnFirstIndex = mnLastIndex;
+
+if (fValue < mfMinimum)
+mfMinimum = fValue;
+
+if (fValue > mfMaximum)
+mfMaximum = fValue;
+
+interpolatePastValues(fValue, nCurrentIndex);
+
+mnPreviousIndex = nCurrentIndex;
+mfPreviousValue = fValue;
+}
+else if (eAction == SparklineValue::Action::Interpolate)
+{
+maToInterpolateIndex.push_back(nCurrentIndex);
+maValueList.back().meAction = SparklineValue::Action::Skip;
+}
+}
+
+static constexpr double interpolate(double x1, double y1, double x2, 
double y2, double x)
+{
+return (y1 * (x2 - x) + y2 * (x - x1)) / (x2 - x1);
+}
+
+void interpolatePastValues(double nCurrentValue, size_t nCurrentIndex)
+{
+if (maToInterpolateIndex.empty())
+return;
+
+if (mnPreviousIndex == std::numeric_limits::max())
+{
+for (size_t nIndex : maToInterpolateIndex)
+{
+auto& rValue = maValueList[nIndex];
+rValue.meAction = SparklineValue::Action::Skip;
+}
+}
+else
+{
+for (size_t nIndex : maToInterpolateIndex)
+   

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

2022-04-04 Thread László Németh (via logerrit)
 sw/qa/extras/uiwriter/uiwriter3.cxx |   53 
 sw/source/uibase/app/docsh2.cxx |   42 
 2 files changed, 95 insertions(+)

New commits:
commit d4e2ed9324bd736275f07577ba81c974a0a70eb1
Author: László Németh 
AuthorDate: Mon Apr 4 18:46:17 2022 +0200
Commit: László Németh 
CommitDate: Tue Apr 5 07:48:18 2022 +0200

tdf#148345 sw: reject all tracked row deletion in Hide Changes

In Hide Changes mode, undeleted rows didn't reappear at applying
Reject All for tracked row deletions.

See also commit a74c51025fa4519caaf461492e4ed8e68bd34885
"tdf#146962 sw: hide deleted row at deletion in Hide Changes".

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

diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 839106e5d41c..654e08ace527 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -2416,6 +2416,59 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf147347)
 assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf148345)
+{
+// load a 2-row table, set Hide Changes mode and delete the first row with 
change tracking
+SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf116789.fodt");
+CPPUNIT_ASSERT(pDoc);
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+CPPUNIT_ASSERT(pWrtShell);
+
+// enable redlining
+dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+   pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+// hide changes
+dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+
+// Without the fix in place, the deleted row would be visible
+
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+// This was 2
+assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 1);
+
+// check it in Show Changes mode
+
+dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+CPPUNIT_ASSERT(!pWrtShell->GetLayout()->IsHideRedlines());
+
+discardDumpedLayout();
+pXmlDoc = parseLayoutDump();
+// 2 rows are visible now
+assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
+
+// check it in Hide Changes mode again
+
+dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+discardDumpedLayout();
+pXmlDoc = parseLayoutDump();
+// only a single row is visible again
+assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 1);
+
+// tdf#148227 check Reject All of tracked table row deletion
+
+dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+discardDumpedLayout();
+pXmlDoc = parseLayoutDump();
+// This was 1
+assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135014)
 {
 createSwDoc();
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index a443e1574c78..92514a5e1486 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -69,6 +69,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1296,6 +1297,39 @@ void SwDocShell::Execute(SfxRequest& rReq)
 break;
 }
 
+// tables with tracked deletion need Show Changes
+bool bHideChanges = pWrtShell && pWrtShell->GetLayout() &&
+pWrtShell->GetLayout()->IsHideRedlines();
+bool bChangedHideChanges = false;
+if ( bHideChanges )
+{
+SwTableNode* pOldTableNd = nullptr;
+const SwRedlineTable& aRedlineTable = 
rRedlineAccess.GetRedlineTable();
+for (SwRedlineTable::size_type n = 0; n < 
aRedlineTable.size(); ++n)
+{
+const SwRangeRedline* pRedline = aRedlineTable[n];
+if ( pRedline->GetType() == RedlineType::Delete )
+{
+SwTableNode* pTableNd =
+
pRedline->GetPoint()->nNode.GetNode().FindTableNode();
+if ( pTableNd && pTableNd !=
+pOldTableNd && 
pTableNd->GetTable().HasDeletedRow() )
+{
+SfxBoolItem aShow(FN_REDLINE_SHOW, true);
+SfxViewShell* pViewShell = GetView()
+? GetView()
+: SfxViewShell::Current();
+

[Libreoffice-bugs] [Bug 148352] Provide access to the Data Provider in the UI

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148352

--- Comment #4 from Heiko Tietze  ---
Don't have a strong opinion. Was just looking for the function today for bug
141380, and having it available for customization but not in the UI was
surprising. We can also keep the ticket as reminder.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148212] Math equation completely breaks document rendering

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148212

--- Comment #3 from freew...@poczta.fm ---
I was wrong stating I said before Writer wasn't the root of the problem.

apparently the issue goes away if in Writer I set the bottom margin (spacing)
for the equation object to a non-zero value (I had everything zero'ed out to
conserve space).

I can live with this work-around, and thank God I've found this out, because I
was just about to lose my mind over this and ditch Writer\Libreoffice for
anything less annoying.

and no, latex was never an option, since it's too slow and has no comfortable
WYSIWYG editor allowing me to do both text DTP and equations.

anyway, I believe the bug still stands despite the work-around.
please, do something about it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148367] EDITING MS Access through ODBC doesn't work and returns an Invalid Bookmark error

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148367

Robert Großkopf  changed:

   What|Removed |Added

 CC||rob...@familiegrosskopf.de

--- Comment #2 from Robert Großkopf  ---
Have no Access and Windows here, but are you sure it is a bug of Base? I have
searched for 'Access "not a valid bookmark"' and get many results. Some try to
repair the database through ODBC-GUI, some says the file is corrupted …

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148369] Redo of deleting a row track and changes enabled behaves wrong

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148369

--- Comment #1 from Telesto  ---
Created attachment 179307
  --> https://bugs.documentfoundation.org/attachment.cgi?id=179307=edit
Example file

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148332] Undo deleting a row restores the wrong data information (track changes involved)

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148332

Telesto  changed:

   What|Removed |Added

   See Also||https://bugs.documentfounda
   ||tion.org/show_bug.cgi?id=14
   ||8369

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148369] Redo of deleting a row track and changes enabled behaves wrong

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148369

Telesto  changed:

   What|Removed |Added

   See Also||https://bugs.documentfounda
   ||tion.org/show_bug.cgi?id=14
   ||8332

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148361] FILEOPEN: DOCX: Incorrect information in placeholder

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148361

Vasily Melenchuk (CIB)  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|libreoffice-b...@lists.free |vasily.melenc...@cib.de
   |desktop.org |

--- Comment #2 from Vasily Melenchuk (CIB)  ---
Confirmed.

My fault: data binding stuff was not cleared correctly for next sdt blocks, so
were reused from previous fields. Fix is in gerrit.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148346] Writer track changes: missing Redo of tracked table row deletion in Hide Changes mode

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148346

László Németh  changed:

   What|Removed |Added

   Assignee|libreoffice-b...@lists.free |nem...@numbertext.org
   |desktop.org |
 Status|NEW |ASSIGNED

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148345] Writer track changes: not visible Reject Changes of tracked table row deletion in Hide Changes mode

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148345

László Németh  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|libreoffice-b...@lists.free |nem...@numbertext.org
   |desktop.org |

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148234] symbol bar in Calc while editing

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148234

--- Comment #6 from ThP  ---
Disabling hardware acceleration doesn't solve it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148365] CRASH: Writer 7.4 enters infinite loop while opening DOCX file (works fine in 7.3)

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148365

--- Comment #2 from Xisco Faulí  ---
Not with

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 9f0e19721bb598c75835cfa94f4158085f81288e
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: x11
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148362] Writer changes saved files, changes have to be made every time I open a document

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148362

--- Comment #3 from Aron Budea  ---
Thanks, could you attach a sample file as well?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148221] LibreOffice Writer hang on Apple Silicon

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148221

--- Comment #7 from David Snow  ---
Created attachment 179309
  --> https://bugs.documentfoundation.org/attachment.cgi?id=179309=edit
LibreOffice is an iOS application?

Could this be part of the high number of crashes?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 139875] Page preview, need toggle button for system colours <> real colours

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=139875

--- Comment #2 from Heiko Tietze  ---
The function does not much, it changes the background and font color to
white/black for the page preview. Point is that you configured the
"easy-on-the-eyes scheme" for working with the document and inspecting the
result, the page preview, should more or less always be a true
what-you-see-is-what-you-print version. Adding an option to the preview toolbar
to toggle the b/w mode on/off makes only sense if you frequently use the two
modes for some purpose. And I don't see it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-ux-advise] [Bug 139875] Page preview, need toggle button for system colours <> real colours

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=139875

--- Comment #2 from Heiko Tietze  ---
The function does not much, it changes the background and font color to
white/black for the page preview. Point is that you configured the
"easy-on-the-eyes scheme" for working with the document and inspecting the
result, the page preview, should more or less always be a true
what-you-see-is-what-you-print version. Adding an option to the preview toolbar
to toggle the b/w mode on/off makes only sense if you frequently use the two
modes for some purpose. And I don't see it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Libreoffice-bugs] [Bug 147546] Transliteration with punctuation marks

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=147546

László Németh  changed:

   What|Removed |Added

   Assignee|nem...@numbertext.org   |libreoffice-b...@lists.free
   ||desktop.org
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148347] New: In logical operators AND + OR blanks are inserted when cells are addressed.

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148347

Bug ID: 148347
   Summary: In logical operators AND + OR blanks are inserted when
cells are addressed.
   Product: LibreOffice
   Version: 3.4 all versions
  Hardware: All
OS: Linux (All)
Status: UNCONFIRMED
  Severity: normal
  Priority: medium
 Component: Calc
  Assignee: libreoffice-bugs@lists.freedesktop.org
  Reporter: tumann2...@yahoo.com

Description:
The content of a cell: IF((A=5) AND (B=6),27,29) will as time passes change to:
IF((A=5)  AND   (B=6),27,29)

I have seen this for the operators AND and OR.
It only happens if there is at least 1 space next to the operator AND / OR.
So IF((A=5)AND(B=6),27,29) will remain as written.

Actual Results:
Write a statement with AND or OR and a blank next to the operator. Then you
will see that the number of blanks is increasing. Why I do not know.

Expected Results:
It is not a bug created by any setting of my PC, it is a bug in the handling of
AND and OR functions.


Reproducible: Always


User Profile Reset: No



Additional Info:
No other info available

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 146047] UI: Orientation Landscape in Print dialog doesn't do anything

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=146047

Telesto  changed:

   What|Removed |Added

 Resolution|--- |WORKSFORME
 Status|NEEDINFO|RESOLVED

--- Comment #13 from Telesto  ---
Can't repro it either
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 52ef78f4923283e6e52d575bec81985b031cb30b
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL Jumbo

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 103309] [META] Print dialog bugs and enhancements

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=103309
Bug 103309 depends on bug 146047, which changed state.

Bug 146047 Summary: UI: Orientation Landscape in Print dialog doesn't do 
anything
https://bugs.documentfoundation.org/show_bug.cgi?id=146047

   What|Removed |Added

 Status|NEEDINFO|RESOLVED
 Resolution|--- |WORKSFORME

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 103030] [META] Navigator sidebar deck and floating window

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=103030

Eyal Rozenberg  changed:

   What|Removed |Added

 Depends on||148357


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=148357
[Bug 148357] When deleting a comment in Navigator, it changes position
needlessly
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148357] New: When deleting a comment in Navigator, it changes position needlessly

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148357

Bug ID: 148357
   Summary: When deleting a comment in Navigator, it changes
position needlessly
   Product: LibreOffice
   Version: 7.4.0.0 alpha0+ Master
  Hardware: All
OS: All
Status: UNCONFIRMED
  Keywords: needsUXEval
  Severity: normal
  Priority: medium
 Component: Writer
  Assignee: libreoffice-bugs@lists.freedesktop.org
  Reporter: eyalr...@gmx.com
Blocks: 103030

Suppose you have a document open with many comments, and possibly other
navigator entries, so that there's room to scroll both up and down from the
middle of the list of comments.

Now, 


1. Open the navigator in the side-bar.
2. Scroll so that the middle comment is at about the center of the navigator
tree view.
3. Select some comment near the middle.
4. Right-click the comment, and Delete it


Expected behavior:

One additional item now fits into the bottom of the Nabigator tree view;
existing items do not move/change position.

Actual behavior:

The Navigator is re-scrolled so that the item (comment) just before the one you
deleted is now selected, and is at the top of the tree view with no items
visible above it.

This is not useful, and disorienting.


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=103030
[Bug 103030] [META] Navigator sidebar deck and floating window
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148353] Menu "protect structure" translation to Russian is wrong

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148353

--- Comment #2 from Dmitry INEC  ---
> the word "spreadsheet" is the "whole Calc document" in our small LibreOffice 
> world

Two problems though

1) there is an outside world of OOo/LOO users

2) even in "your small world" people tend to mistake, as that Heiko's comment
hint at.
Just because even a "small world" is large enough that few human beings (if any
at all) have fine details of every dusty corner live in their memory.

"unambiguous by default" can be a better approach than "we can memorize all the
details, and they should too"

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148347] In logical operators AND + OR blanks are inserted when cells are addressed.

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148347

m.a.riosv  changed:

   What|Removed |Added

 CC||miguelangelrv@libreoffice.o
   ||rg

--- Comment #2 from m.a.riosv  ---
Function AND() does not work in that way, the formula should be:

IF(AND(A=5,B=6),27,29)

you also can get it without AND, using product '*' instead 'and' and '+'
instead 'or', because the result of a comparison it's '1' true or '0' false,
IF((A=5)*(B=6),27,29)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148353] Menu "protect structure" translation to Russian is wrong

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148353

--- Comment #4 from Serg Bormant  ---
Done for Russian:
https://translations.documentfoundation.org/languages/ru/libo_ui-7-3/search/?q=protect+structure

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148367] New: EDITING MS Access through ODBC doesn't work and returns an Invalid Bookmark error

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148367

Bug ID: 148367
   Summary: EDITING MS Access through ODBC doesn't work and
returns an Invalid Bookmark error
   Product: LibreOffice
   Version: 7.4.0.0 alpha0+ Master
  Hardware: All
OS: Windows (All)
Status: UNCONFIRMED
  Severity: normal
  Priority: medium
 Component: Base
  Assignee: libreoffice-bugs@lists.freedesktop.org
  Reporter: cla...@qunect.com

Description:
If you try to edit an MS Access table using LO Base and an ODBC connection you
get an error message saying the the bookmark is invalid.

Steps to Reproduce:
Use LO Base to connect via ODBC to an MS Access .accdb file using the 
Microsoft Access Driver version 16.000.15028.20050 ACEODBC.DLL
Edit a record and then move off the record to commit the edit.

Please watch this YouTube video:
https://youtu.be/M_hqZegXcXM


Actual Results:
Error message blocking the edit of the record

Expected Results:
Record is edited


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Please watch this video to see how to reproduce the bug:
https://youtu.be/M_hqZegXcXM

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148234] symbol bar in Calc while editing

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148234

ThP  changed:

   What|Removed |Added

Version|7.3.1.3 release |7.3.2.2 release

--- Comment #7 from ThP  ---
Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148362] Writer changes saved files, changes have to be made every time I open a document

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148362

--- Comment #2 from Tom  ---
1 open document
2 delete paragraphs that I already deleted before saving
3 save document
4 open document
5 delete paragraphs that I already deleted before saving
6 ad infinitum

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 148370] New: In Calc, Autocomplete places black marks in cell where letters should be, instead of previously used characters

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=148370

Bug ID: 148370
   Summary: In Calc, Autocomplete places black marks in cell where
letters should be, instead of previously used
characters
   Product: LibreOffice
   Version: 7.3.1.3 release
  Hardware: All
OS: Windows (All)
Status: UNCONFIRMED
  Severity: minor
  Priority: medium
 Component: Calc
  Assignee: libreoffice-bugs@lists.freedesktop.org
  Reporter: hugsr4every...@live.com

Description:
I recently purchased a new laptop running Windows 11 Pro. My old ran Windows 10
Pro. I downloaded and installed the latest edition of LibreOffice and copied my
Windows 10 files over to my new computer. I have noticed that in my LibreOffice
Calc program when I type a word in a column that is repeated from before a
black mark shows up where the completed word would have been. When I hit tab
the auto-complete function completes the word correctly. Not a big problem but
would be useless in situations where different cells started the same.

Steps to Reproduce:
1.Typing in a cell in a column below a cell which contained the same characters
2.
3.

Actual Results:
After typing in a few characters, of a repeated word from a previous cell,
black marks appear instead of the characters used in previous cell. When TAB is
depressed, the correct phrase is used.

Expected Results:
Normally, when repeating an entry into a cell the previously used entry is
printed in the cell legibly allowing you to accept the entry by hitting the TAB
key. 


Reproducible: Always


User Profile Reset: No



Additional Info:
Would be a problem at times when multiple phrases start the same.

Version: 7.3.1.3 (x64) / LibreOffice Community
Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 8; OS: Windows 10.0 Build 22000; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

My processor info:11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz   1.69 GHz
Hardware: 64-bit operating system, x64-based processor

NOTE: If I had seen the following 2 questions earlier, I might have tried them
before filling this out. Since this is a new computer, I assume that these
items must be ok. Did I miss it? Maybe, it was suggested and I didn't read it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 144000] MAILMERGE: LO crashes on any mailmerge attempt - because of three-letter registered database name?

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=144000

Timur  changed:

   What|Removed |Added

   See Also||https://bugs.documentfounda
   ||tion.org/show_bug.cgi?id=14
   ||8338

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 94283] LibreOffice can't start on Windows XP SP2

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=94283

--- Comment #22 from Dikosta Sachin  ---
I am aware of Microsoft's end of support for Windows XP but it has nothing to
do with this bug > https://livingtricky.com/how-to-win-a-free-iphone/

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 36582] "Find and replace" finds/replaces text deleted with "record/track changes"

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=36582

--- Comment #31 from Lars Jødal  ---
(In reply to Hussam Al-Tayeb from comment #30)
> Please don't spread incorrect information.
> 
> It does not resemble the Microsoft Word behavior. I just tested on both
> Sharepoint and desktop MS Office 365.
> Please test again. You probably did not understand the bug.
> Libreoffice replaces the deleted text with each recursion while
> Microsoft Office does not replace deleted text.

Just tested once again with Word from MS Office 365, confirming that a variant
of this bug is indeed present in MS Office: Opening some text, deleting with
track-changes on and shown, and then using search: the searched text is
found also in the deleted text and replaced with non-deleted text. I have
reported it to MS Office as a bug.

Well, to get back to the point of a LibreOffice forum: The bug is still present
in LO 7.3.2.2

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 109530] [META] File opening issues

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=109530
Bug 109530 depends on bug 148336, which changed state.

Bug 148336 Summary: Crash in SwFntObj::GetTextSize(SwDrawTextInfo&) on file open
https://bugs.documentfoundation.org/show_bug.cgi?id=148336

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 143264] [ToD] inconsistency in %MOD1 usage

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=143264

sdc.bla...@youmail.dk changed:

   What|Removed |Added

 CC||sdc.bla...@youmail.dk

--- Comment #5 from sdc.bla...@youmail.dk ---
https://gerrit.libreoffice.org/c/core/+/132385

1. Changed tip into a question.
2. Used %MOD1++ and %MOD1+-  to be consistent with appearance in Tool>Customize
UI
3. iiuc no change is needed in cui/inc/tipofday.hrc for %MOD1+;

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 147523] unable to expand formula region in calc using mouse in 7.4 (kf5)

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=147523

--- Comment #14 from Commit Notification 
 ---
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/cec215e0e3adaf26c89c4ffbaa53f87481772f0c

tdf#147523 Qt use inner QWidget to set pointer pos

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 147523] unable to expand formula region in calc using mouse in 7.4 (kf5)

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=147523

Commit Notification  changed:

   What|Removed |Added

 Whiteboard||target:7.4.0

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 147846] A bar is missing if I want to make a border for characters, that are at the beginning of a line.

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=147846

Timur  changed:

   What|Removed |Added

 Ever confirmed|1   |0
   Severity|normal  |minor
   Priority|medium  |low
 Status|NEW |UNCONFIRMED

--- Comment #1 from Timur  ---
You may not set New yourself. Just wait.
I tried to reproduce and did once but not later.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 133092] [META] Crash bugs

2022-04-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=133092
Bug 133092 depends on bug 148336, which changed state.

Bug 148336 Summary: Crash in SwFntObj::GetTextSize(SwDrawTextInfo&) on file open
https://bugs.documentfoundation.org/show_bug.cgi?id=148336

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.

  1   2   3   4   >