core.git: Branch 'distro/collabora/co-24.04' - sc/inc sc/source

2024-02-29 Thread Kohei Yoshida (via logerrit)
 sc/inc/column.hxx   |3 +-
 sc/inc/mtvelements.hxx  |5 ++-
 sc/source/core/data/column.cxx  |6 +++-
 sc/source/core/data/column2.cxx |4 --
 sc/source/core/data/column3.cxx |1 
 sc/source/core/data/column4.cxx |   51 
 sc/source/core/data/mtvelements.cxx |6 
 7 files changed, 53 insertions(+), 23 deletions(-)

New commits:
commit ed05777e5ad2772d5e869095547a65c7c776855f
Author: Kohei Yoshida 
AuthorDate: Mon Feb 26 19:50:19 2024 -0500
Commit: Caolán McNamara 
CommitDate: Thu Feb 29 09:59:54 2024 +0100

Make ScColumn::HasCellNotes() less expensive

It's essentially the same idea as checking if the column has formula cells; 
by keeping track of the block creation and deletion events to
count the number of cell notes block instances at any given moment, and
use that information to see if the column has any cell notes.

Change-Id: I95c5186bf1f21f23f85fa10ff3c2135388949c72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163996
Tested-by: Kohei Yoshida 
Reviewed-by: Kohei Yoshida 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164006
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 733923b0f58c..0ae88bea61bb 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -205,7 +205,8 @@ class ScColumn : protected ScColumnData
 // Sparklines
 sc::SparklineStoreType maSparklines;
 
-size_t mnBlkCountFormula;
+sal_uInt32 mnBlkCountFormula;
+sal_uInt32 mnBlkCountCellNotes;
 
 SCCOL   nCol;
 SCTAB   nTab;
diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
index 156346a945ba..9a7b525fb82a 100644
--- a/sc/inc/mtvelements.hxx
+++ b/sc/inc/mtvelements.hxx
@@ -114,8 +114,9 @@ struct SparklineTraits : public mdds::mtv::default_traits
 using block_funcs = mdds::mtv::element_block_funcs;
 };
 
-struct CellNodeTraits : public mdds::mtv::default_traits
+struct CellNoteTraits : public mdds::mtv::default_traits
 {
+using event_func = CellStoreEvent;
 using block_funcs = mdds::mtv::element_block_funcs;
 };
 
@@ -140,7 +141,7 @@ struct CellStoreTraits : public mdds::mtv::default_traits
 typedef mdds::mtv::soa::multi_type_vector SparklineStoreType;
 
 /// Cell note container
-typedef mdds::mtv::soa::multi_type_vector CellNoteStoreType;
+typedef mdds::mtv::soa::multi_type_vector CellNoteStoreType;
 
 /// Broadcaster storage container
 typedef mdds::mtv::soa::multi_type_vector 
BroadcasterStoreType;
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 5bae9b7b9de7..1deffbf0adbf 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -82,15 +82,17 @@ ScNeededSizeOptions::ScNeededSizeOptions() :
 
 ScColumn::ScColumn(ScSheetLimits const & rSheetLimits) :
 maCellTextAttrs(rSheetLimits.GetMaxRowCount()),
-maCellNotes(rSheetLimits.GetMaxRowCount()),
+maCellNotes(sc::CellStoreEvent(this)),
 maBroadcasters(rSheetLimits.GetMaxRowCount()),
 maCells(sc::CellStoreEvent(this)),
 maSparklines(rSheetLimits.GetMaxRowCount()),
 mnBlkCountFormula(0),
+mnBlkCountCellNotes(0),
 nCol( 0 ),
 nTab( 0 ),
 mbEmptyBroadcastersPending( false )
 {
+maCellNotes.resize(rSheetLimits.GetMaxRowCount());
 maCells.resize(rSheetLimits.GetMaxRowCount());
 }
 
@@ -1834,7 +1836,9 @@ void ScColumn::SwapCol(ScColumn& rCol)
 
 // Swap all CellStoreEvent mdds event_func related.
 maCells.event_handler().swap(rCol.maCells.event_handler());
+maCellNotes.event_handler().swap(rCol.maCellNotes.event_handler());
 std::swap( mnBlkCountFormula, rCol.mnBlkCountFormula);
+std::swap(mnBlkCountCellNotes, rCol.mnBlkCountCellNotes);
 
 // notes update caption
 UpdateNoteCaptions(0, GetDoc().MaxRow());
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 0592c97e580c..c8a0c0821889 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -2273,9 +2273,7 @@ void ScColumn::DeleteCellNotes( sc::ColumnBlockPosition& 
rBlockPos, SCROW nRow1,
 
 bool ScColumn::HasCellNotes() const
 {
-if (maCellNotes.block_size() == 1 && maCellNotes.begin()->type == 
sc::element_type_empty)
-return false; // all elements are empty
-return true; // otherwise some must be notes
+return mnBlkCountCellNotes != 0;
 }
 
 SCROW ScColumn::GetCellNotesMaxRow() const
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 79027226387e..e515ff21e69d 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -238,6 +238,7 @@ void ScColumn::Delete( SCROW nRow )
 void ScColumn::FreeAll()
 {
 maCells.event_handler().stop();
+maCellNotes.event_handler().stop();
 
 auto maxRowCount = GetDoc().GetMaxRowCount();
 // Keep a logical empty 

core.git: sc/source

2024-02-27 Thread Kohei Yoshida (via logerrit)
 sc/source/core/data/column3.cxx |1 
 sc/source/core/data/column4.cxx |   59 ++--
 2 files changed, 34 insertions(+), 26 deletions(-)

New commits:
commit 5234ef71c7459506236d4d0dfe7beb5f00d8cc41
Author: Kohei Yoshida 
AuthorDate: Mon Feb 26 22:59:32 2024 -0500
Commit: Kohei Yoshida 
CommitDate: Wed Feb 28 02:31:27 2024 +0100

Make the code tidier & stop event handling during destruction

This is a follow-up to 25ffb54c6d8a5b52dca6b782282962766e7791de.

Change-Id: Ifc87323dd5085cdac08efac5fd9d22ae8b94d641
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163997
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 3481abfe8e9e..e01d6312506f 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -238,6 +238,7 @@ void ScColumn::Delete( SCROW nRow )
 void ScColumn::FreeAll()
 {
 maCells.event_handler().stop();
+maCellNotes.event_handler().stop();
 
 auto maxRowCount = GetDoc().GetMaxRowCount();
 // Keep a logical empty range of 0-rDoc.MaxRow() at all times.
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index bd9bba3df1f4..7b1299d7bae6 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -2212,39 +2212,46 @@ void ScColumn::RestoreFromCache(SvStream& rStrm)
 
 void ScColumn::CheckIntegrity() const
 {
-const ScColumn* pColTest = maCells.event_handler().getColumn();
+auto checkEventHandlerColumnRef = [this](const auto& rStore, 
std::string_view pStoreName)
+{
+if (const ScColumn* pColTest = rStore.event_handler().getColumn(); 
pColTest != this)
+{
+std::ostringstream os;
+os << pStoreName << "'s event handler references wrong column 
instance (this=" << this
+<< "; stored=" << pColTest << ")";
+throw std::runtime_error(os.str());
+}
+};
 
-if (pColTest != this)
+auto countBlocks = [](const auto& rStore, mdds::mtv::element_t nBlockType)
 {
-std::ostringstream os;
-os << "cell store's event handler references wrong column instance 
(this=" << this
-<< "; stored=" << pColTest << ")";
-throw std::runtime_error(os.str());
-}
+std::size_t nCount = std::count_if(rStore.cbegin(), rStore.cend(),
+[nBlockType](const auto& blk) { return blk.type == nBlockType; }
+);
 
-size_t nCount = std::count_if(maCells.cbegin(), maCells.cend(),
-[](const auto& blk) { return blk.type == sc::element_type_formula; }
-);
+return nCount;
+};
 
-if (mnBlkCountFormula != nCount)
+auto checkCachedBlockCount = [countBlocks](
+const auto& rStore, mdds::mtv::element_t nBlockType, std::size_t 
nCachedBlkCount,
+std::string_view pName)
 {
-std::ostringstream os;
-os << "incorrect cached formula block count (expected=" << nCount << 
"; actual="
-<< mnBlkCountFormula << ")";
-throw std::runtime_error(os.str());
-}
+std::size_t nCount = countBlocks(rStore, nBlockType);
 
-nCount = std::count_if(maCellNotes.cbegin(), maCellNotes.cend(),
-[](const auto& blk) { return blk.type == sc::element_type_cellnote; }
-);
+if (nCachedBlkCount != nCount)
+{
+std::ostringstream os;
+os << "incorrect cached " << pName << " block count (expected=" << 
nCount << "; actual="
+<< nCachedBlkCount << ")";
+throw std::runtime_error(os.str());
+}
+};
 
-if (mnBlkCountCellNotes != nCount)
-{
-std::ostringstream os;
-os << "incorrect cached cell note block count (expected=" << nCount << 
"; actual="
-<< mnBlkCountCellNotes << ")";
-throw std::runtime_error(os.str());
-}
+checkEventHandlerColumnRef(maCells, "cell store");
+checkEventHandlerColumnRef(maCellNotes, "cell-note store");
+
+checkCachedBlockCount(maCells, sc::element_type_formula, 
mnBlkCountFormula, "formula");
+checkCachedBlockCount(maCellNotes, sc::element_type_cellnote, 
mnBlkCountCellNotes, "cell note");
 }
 
 void ScColumn::CollectBroadcasterState(sc::BroadcasterState& rState) const


core.git: sc/inc sc/source

2024-02-26 Thread Kohei Yoshida (via logerrit)
 sc/inc/column.hxx   |3 ++-
 sc/inc/mtvelements.hxx  |5 +++--
 sc/source/core/data/column.cxx  |6 +-
 sc/source/core/data/column2.cxx |4 +---
 sc/source/core/data/column4.cxx |   12 
 sc/source/core/data/mtvelements.cxx |6 ++
 6 files changed, 29 insertions(+), 7 deletions(-)

New commits:
commit 25ffb54c6d8a5b52dca6b782282962766e7791de
Author: Kohei Yoshida 
AuthorDate: Mon Feb 26 19:50:19 2024 -0500
Commit: Kohei Yoshida 
CommitDate: Tue Feb 27 04:02:57 2024 +0100

Make ScColumn::HasCellNotes() less expensive

It's essentially the same idea as checking if the column has formula cells; 
by keeping track of the block creation and deletion events to
count the number of cell notes block instances at any given moment, and
use that information to see if the column has any cell notes.

Change-Id: I95c5186bf1f21f23f85fa10ff3c2135388949c72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163996
Tested-by: Kohei Yoshida 
Reviewed-by: Kohei Yoshida 

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 0e07ed8142b0..7b07f310b23e 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -206,7 +206,8 @@ class ScColumn : protected ScColumnData
 // Sparklines
 sc::SparklineStoreType maSparklines;
 
-size_t mnBlkCountFormula;
+std::size_t mnBlkCountFormula;
+std::size_t mnBlkCountCellNotes;
 
 SCCOL   nCol;
 SCTAB   nTab;
diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
index 156346a945ba..9a7b525fb82a 100644
--- a/sc/inc/mtvelements.hxx
+++ b/sc/inc/mtvelements.hxx
@@ -114,8 +114,9 @@ struct SparklineTraits : public mdds::mtv::default_traits
 using block_funcs = mdds::mtv::element_block_funcs;
 };
 
-struct CellNodeTraits : public mdds::mtv::default_traits
+struct CellNoteTraits : public mdds::mtv::default_traits
 {
+using event_func = CellStoreEvent;
 using block_funcs = mdds::mtv::element_block_funcs;
 };
 
@@ -140,7 +141,7 @@ struct CellStoreTraits : public mdds::mtv::default_traits
 typedef mdds::mtv::soa::multi_type_vector SparklineStoreType;
 
 /// Cell note container
-typedef mdds::mtv::soa::multi_type_vector CellNoteStoreType;
+typedef mdds::mtv::soa::multi_type_vector CellNoteStoreType;
 
 /// Broadcaster storage container
 typedef mdds::mtv::soa::multi_type_vector 
BroadcasterStoreType;
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 4df322def537..22d8cec28bc3 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -82,15 +82,17 @@ ScNeededSizeOptions::ScNeededSizeOptions() :
 
 ScColumn::ScColumn(ScSheetLimits const & rSheetLimits) :
 maCellTextAttrs(rSheetLimits.GetMaxRowCount()),
-maCellNotes(rSheetLimits.GetMaxRowCount()),
+maCellNotes(sc::CellStoreEvent(this)),
 maBroadcasters(rSheetLimits.GetMaxRowCount()),
 maCells(sc::CellStoreEvent(this)),
 maSparklines(rSheetLimits.GetMaxRowCount()),
 mnBlkCountFormula(0),
+mnBlkCountCellNotes(0),
 nCol( 0 ),
 nTab( 0 ),
 mbEmptyBroadcastersPending( false )
 {
+maCellNotes.resize(rSheetLimits.GetMaxRowCount());
 maCells.resize(rSheetLimits.GetMaxRowCount());
 }
 
@@ -1829,7 +1831,9 @@ void ScColumn::SwapCol(ScColumn& rCol)
 
 // Swap all CellStoreEvent mdds event_func related.
 maCells.event_handler().swap(rCol.maCells.event_handler());
+maCellNotes.event_handler().swap(rCol.maCellNotes.event_handler());
 std::swap( mnBlkCountFormula, rCol.mnBlkCountFormula);
+std::swap(mnBlkCountCellNotes, rCol.mnBlkCountCellNotes);
 
 // notes update caption
 UpdateNoteCaptions(0, GetDoc().MaxRow());
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 20e365acb06c..b9dcbf68bef2 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -2275,9 +2275,7 @@ void ScColumn::DeleteCellNotes( sc::ColumnBlockPosition& 
rBlockPos, SCROW nRow1,
 
 bool ScColumn::HasCellNotes() const
 {
-if (maCellNotes.block_size() == 1 && maCellNotes.begin()->type == 
sc::element_type_empty)
-return false; // all elements are empty
-return true; // otherwise some must be notes
+return mnBlkCountCellNotes != 0;
 }
 
 SCROW ScColumn::GetCellNotesMaxRow() const
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 2f9c46deb838..bd9bba3df1f4 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -2233,6 +2233,18 @@ void ScColumn::CheckIntegrity() const
 << mnBlkCountFormula << ")";
 throw std::runtime_error(os.str());
 }
+
+nCount = std::count_if(maCellNotes.cbegin(), maCellNotes.cend(),
+[](const auto& blk) { return blk.type == sc::element_type_cellnote; }
+);
+
+if (mnBlkCountCellNotes != nCount)
+{
+std::ostringstream os;
+os << "incorrect cached cell note block 

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

2023-12-02 Thread Kohei Yoshida (via logerrit)
 download.lst   |4 +-
 external/liborcus/UnpackedTarball_liborcus.mk  |3 -
 external/liborcus/gnumeric-set-grammar.patch.1 |   17 
 external/liborcus/liborcus_newline.patch.1 |   17 
 external/liborcus/msvc-int-narrowing.patch.1   |   50 -
 external/liborcus/windows-constants-hack.patch |2 -
 6 files changed, 3 insertions(+), 90 deletions(-)

New commits:
commit 77e15d0471e239ad94054d3aff403207ecac2764
Author: Kohei Yoshida 
AuthorDate: Thu Nov 9 20:26:47 2023 -0500
Commit: Xisco Fauli 
CommitDate: Sat Dec 2 12:33:32 2023 +0100

Upgrade orcus to 0.19.2

Change-Id: I2cbf5f93c3b8b2235828affdef7309c3611b19b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159258
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160231

diff --git a/download.lst b/download.lst
index 0c44c0247789..adadeabbbc24 100644
--- a/download.lst
+++ b/download.lst
@@ -428,8 +428,8 @@ OPENSSL_TARBALL := openssl-3.0.11.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-ORCUS_SHA256SUM := 
6c9a8c03e8187f2749a84f2786d86a88ae45c99ed3a2d5fea36ba556b40c342d
-ORCUS_TARBALL := liborcus-0.19.1.tar.xz
+ORCUS_SHA256SUM := 
69ed26a00d4aaa7688e62a6e003cbc81928521a45e96605e53365aa499719e39
+ORCUS_TARBALL := liborcus-0.19.2.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 5968c7bb1845..3de24f0135d7 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -19,7 +19,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/rpath.patch.0 \
external/liborcus/gcc9.patch.0 \
external/liborcus/libtool.patch.0 \
-   external/liborcus/liborcus_newline.patch.1 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/liborcus_newline.patch.1 
b/external/liborcus/liborcus_newline.patch.1
deleted file mode 100644
index 5b2038d5cc12..
--- a/external/liborcus/liborcus_newline.patch.1
+++ /dev/null
@@ -1,17 +0,0 @@
-Add newline at end of KRHangulMapping.h
-
-without this, compiling output of GCC 11 -E -fdirectives-only fails with:
-
-ooxml_tokens.inl:3524:32: error: stray '#' in program
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100392
-
 liborcus/src/liborcus/ooxml_tokens.inl.orig2021-05-01 
18:12:37.490131155 +0200
-+++ liborcus/src/liborcus/ooxml_tokens.inl 2021-05-01 18:12:50.994119453 
+0200
-@@ -3521,4 +3521,4 @@
- "zoomToFit"  // 3517
- };
- 
--size_t token_name_count = 3518;
-\ No newline at end of file
-+size_t token_name_count = 3518;
diff --git a/external/liborcus/windows-constants-hack.patch 
b/external/liborcus/windows-constants-hack.patch
index 68e57857826d..28cf0997a168 100644
--- a/external/liborcus/windows-constants-hack.patch
+++ b/external/liborcus/windows-constants-hack.patch
@@ -9,7 +9,7 @@ index ae571f5..539ce18 100644
 -#include "constants.inl"
 +#define ORCUS_MAJOR_VERSION 0
 +#define ORCUS_MINOR_VERSION 19
-+#define ORCUS_MICRO_VERSION 0
++#define ORCUS_MICRO_VERSION 2
 
  namespace orcus {
 
commit 9a9ba74f318c59f739033bdaeaacf1e3cc790638
Author: Kohei Yoshida 
AuthorDate: Tue Oct 24 18:31:52 2023 -0400
Commit: Xisco Fauli 
CommitDate: Sat Dec 2 12:33:27 2023 +0100

Upgrade liborcus to 0.19.1

Change-Id: I2190419e88323bbf000602a7762e850a33b5dfdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158409
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160230

diff --git a/download.lst b/download.lst
index ecb87c819ee1..0c44c0247789 100644
--- a/download.lst
+++ b/download.lst
@@ -428,8 +428,8 @@ OPENSSL_TARBALL := openssl-3.0.11.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-ORCUS_SHA256SUM := 
1b68f54bb08face4c3dc83c912d921373c44aed817b37d879b7a4e47f2f15e09
-ORCUS_TARBALL := liborcus-0.19.0.tar.xz
+ORCUS_SHA256SUM := 
6c9a8c03e8187f2749a84f2786d86a88ae45c99ed3a2d5fea36ba556b40c342d
+ORCUS_TARBALL := liborcus-0.19.1.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 292435dfd00d..5968c7bb1845 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -20,8 +20,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/gcc9.patch.0 \
external/liborcus/libtool.patch.0 \
external/liborcus/liborcus_newline.patch.1 \
-   external/liborcus/msvc-int-narrowing.patch.1 \
-   

[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - 3 commits - download.lst external/liborcus

2023-12-02 Thread Kohei Yoshida (via logerrit)
 download.lst   |4 +-
 external/liborcus/Library_orcus-parser.mk  |1 
 external/liborcus/Library_orcus.mk |   10 -
 external/liborcus/UnpackedTarball_liborcus.mk  |3 +
 external/liborcus/fix-pch.patch.0  |   11 -
 external/liborcus/gnumeric-set-grammar.patch.1 |   17 
 external/liborcus/msvc-int-narrowing.patch.1   |   50 +
 external/liborcus/windows-constants-hack.patch |   12 +++---
 8 files changed, 85 insertions(+), 23 deletions(-)

New commits:
commit 644170fe0cf6a53d9aa7fcc296004c1e17165f06
Author: Kohei Yoshida 
AuthorDate: Fri Sep 29 17:45:14 2023 -0400
Commit: Xisco Fauli 
CommitDate: Sat Dec 2 12:33:22 2023 +0100

Set grammar type to gnumeric before loading the content

Without this, the document model side would not know what grammer
to use to parse formula expressions.

Change-Id: I7e921f9c0f9b088fb98fe126ad4a84db006c8747
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157413
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160229

diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index b8c44479765b..292435dfd00d 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/libtool.patch.0 \
external/liborcus/liborcus_newline.patch.1 \
external/liborcus/msvc-int-narrowing.patch.1 \
+   external/liborcus/gnumeric-set-grammar.patch.1 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/gnumeric-set-grammar.patch.1 
b/external/liborcus/gnumeric-set-grammar.patch.1
new file mode 100644
index ..42bc46177737
--- /dev/null
+++ b/external/liborcus/gnumeric-set-grammar.patch.1
@@ -0,0 +1,17 @@
+diff --git a/src/liborcus/orcus_gnumeric.cpp b/src/liborcus/orcus_gnumeric.cpp
+index 76c13682..849759ba 100644
+--- a/src/liborcus/orcus_gnumeric.cpp
 b/src/liborcus/orcus_gnumeric.cpp
+@@ -144,6 +144,12 @@ void orcus_gnumeric::read_stream(std::string_view stream)
+ if (!decompress_gzip(stream.data(), stream.size(), file_content))
+ return;
+ 
++if (auto* gs = mp_impl->mp_factory->get_global_settings(); gs)
++{
++gs->set_origin_date(1899, 12, 30);
++
gs->set_default_formula_grammar(spreadsheet::formula_grammar_t::gnumeric);
++}
++
+ mp_impl->read_content_xml(file_content, get_config());
+ mp_impl->mp_factory->finalize();
+ }
commit ffeed48bed5c31203978a070b3c758c180589e7c
Author: Kohei Yoshida 
AuthorDate: Thu Sep 28 20:29:52 2023 -0400
Commit: Xisco Fauli 
CommitDate: Sat Dec 2 12:33:18 2023 +0100

Set the correct version number of orcus

Ideally we should fix the Windows build properly, but cmake isn't
available to us.

Change-Id: I3f612604195212ba3a699c0b76785b5aa5f7925b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157391
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160228

diff --git a/external/liborcus/windows-constants-hack.patch 
b/external/liborcus/windows-constants-hack.patch
index e86c74a722f3..68e57857826d 100644
--- a/external/liborcus/windows-constants-hack.patch
+++ b/external/liborcus/windows-constants-hack.patch
@@ -3,13 +3,13 @@ index ae571f5..539ce18 100644
 --- a/src/liborcus/info.cpp
 +++ b/src/liborcus/info.cpp
 @@ -7,7 +7,9 @@
- 
+
  #include "orcus/info.hpp"
- 
+
 -#include "constants.inl"
 +#define ORCUS_MAJOR_VERSION 0
-+#define ORCUS_MINOR_VERSION 17
-+#define ORCUS_MICRO_VERSION 2
- 
++#define ORCUS_MINOR_VERSION 19
++#define ORCUS_MICRO_VERSION 0
+
  namespace orcus {
- 
+
commit 0c2f023eb039d27b8ff3dd3b0baaf7b3c04547cf
Author: Kohei Yoshida 
AuthorDate: Wed Sep 27 22:15:22 2023 -0400
Commit: Xisco Fauli 
CommitDate: Sat Dec 2 12:33:12 2023 +0100

Upgrade liborcus to 0.19.0

Change-Id: I57b92a86a155f244742fd70b1ab9a1acbc206a29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157345
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160227

diff --git a/download.lst b/download.lst
index 1c3562bdc248..ecb87c819ee1 100644
--- a/download.lst
+++ b/download.lst
@@ -428,8 +428,8 @@ OPENSSL_TARBALL := openssl-3.0.11.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-ORCUS_SHA256SUM := 
6006b9f1576315e313df715a7e72a17f3e0b17d7b6bd119cfa8a0b608ce971eb
-ORCUS_TARBALL := liborcus-0.18.1.tar.xz
+ORCUS_SHA256SUM := 
1b68f54bb08face4c3dc83c912d921373c44aed817b37d879b7a4e47f2f15e09
+ORCUS_TARBALL := liborcus-0.19.0.tar.xz
 # three static lines
 # so that git cherry-pick
 

[Libreoffice-commits] core.git: download.lst external/liborcus

2023-11-10 Thread Kohei Yoshida (via logerrit)
 download.lst   |4 ++--
 external/liborcus/UnpackedTarball_liborcus.mk  |1 -
 external/liborcus/liborcus_newline.patch.1 |   17 -
 external/liborcus/windows-constants-hack.patch |2 +-
 4 files changed, 3 insertions(+), 21 deletions(-)

New commits:
commit e890b0f0a90316b69f49e0e9d3cb2b1b4528084a
Author: Kohei Yoshida 
AuthorDate: Thu Nov 9 20:26:47 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Fri Nov 10 15:35:47 2023 +0100

Upgrade orcus to 0.19.2

Change-Id: I2cbf5f93c3b8b2235828affdef7309c3611b19b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159258
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index 468e2e39f1ec..d4c3eed3b9c6 100644
--- a/download.lst
+++ b/download.lst
@@ -503,8 +503,8 @@ OPENSSL_TARBALL := openssl-3.0.11.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-ORCUS_SHA256SUM := 
6c9a8c03e8187f2749a84f2786d86a88ae45c99ed3a2d5fea36ba556b40c342d
-ORCUS_TARBALL := liborcus-0.19.1.tar.xz
+ORCUS_SHA256SUM := 
69ed26a00d4aaa7688e62a6e003cbc81928521a45e96605e53365aa499719e39
+ORCUS_TARBALL := liborcus-0.19.2.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 5968c7bb1845..3de24f0135d7 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -19,7 +19,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/rpath.patch.0 \
external/liborcus/gcc9.patch.0 \
external/liborcus/libtool.patch.0 \
-   external/liborcus/liborcus_newline.patch.1 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/liborcus_newline.patch.1 
b/external/liborcus/liborcus_newline.patch.1
deleted file mode 100644
index 5b2038d5cc12..
--- a/external/liborcus/liborcus_newline.patch.1
+++ /dev/null
@@ -1,17 +0,0 @@
-Add newline at end of KRHangulMapping.h
-
-without this, compiling output of GCC 11 -E -fdirectives-only fails with:
-
-ooxml_tokens.inl:3524:32: error: stray '#' in program
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100392
-
 liborcus/src/liborcus/ooxml_tokens.inl.orig2021-05-01 
18:12:37.490131155 +0200
-+++ liborcus/src/liborcus/ooxml_tokens.inl 2021-05-01 18:12:50.994119453 
+0200
-@@ -3521,4 +3521,4 @@
- "zoomToFit"  // 3517
- };
- 
--size_t token_name_count = 3518;
-\ No newline at end of file
-+size_t token_name_count = 3518;
diff --git a/external/liborcus/windows-constants-hack.patch 
b/external/liborcus/windows-constants-hack.patch
index 68e57857826d..28cf0997a168 100644
--- a/external/liborcus/windows-constants-hack.patch
+++ b/external/liborcus/windows-constants-hack.patch
@@ -9,7 +9,7 @@ index ae571f5..539ce18 100644
 -#include "constants.inl"
 +#define ORCUS_MAJOR_VERSION 0
 +#define ORCUS_MINOR_VERSION 19
-+#define ORCUS_MICRO_VERSION 0
++#define ORCUS_MICRO_VERSION 2
 
  namespace orcus {
 


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

2023-10-31 Thread Kohei Yoshida (via logerrit)
 sc/source/filter/inc/orcusinterface.hxx |3 +++
 sc/source/filter/orcus/interface.cxx|   15 +++
 2 files changed, 18 insertions(+)

New commits:
commit 21513faa972d72813a8e2932515a81341bab55a9
Author: Kohei Yoshida 
AuthorDate: Mon Jul 17 22:22:48 2023 -0400
Commit: Xisco Fauli 
CommitDate: Tue Oct 31 09:41:13 2023 +0100

Make the reference resolver really available for orcus

It was there, but was never really made available.

Change-Id: Id7093c4c6b52aa1831f42046a83991b923c70781
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154569
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
(cherry picked from commit 9a96c395d52984628b759104f9ce2a7781d0e139)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158681
Tested-by: René Engelhard 
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/filter/inc/orcusinterface.hxx 
b/sc/source/filter/inc/orcusinterface.hxx
index 44318d0b1149..ed3966a2e136 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -706,6 +706,7 @@ class ScOrcusFactory : public 
orcus::spreadsheet::iface::import_factory
 
 CellStoreTokensType maCellStoreTokens;
 ScOrcusGlobalSettings maGlobalSettings;
+ScOrcusRefResolver maRefResolver;
 ScOrcusSharedStrings maSharedStrings;
 ScOrcusNamedExpression maNamedExpressions;
 std::vector> maSheets;
@@ -726,6 +727,8 @@ public:
 virtual orcus::spreadsheet::iface::import_shared_strings* 
get_shared_strings() override;
 virtual orcus::spreadsheet::iface::import_named_expression* 
get_named_expression() override;
 virtual orcus::spreadsheet::iface::import_styles* get_styles() override;
+virtual orcus::spreadsheet::iface::import_reference_resolver* 
get_reference_resolver(
+orcus::spreadsheet::formula_ref_context_t cxt) override;
 virtual void finalize() override;
 
 ScDocumentImport& getDoc();
diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index e53d2d004e95..ec1250334ecd 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -307,6 +307,7 @@ ScOrcusFactory::CellStoreToken::CellStoreToken(const 
ScAddress& rPos, OUString a
 ScOrcusFactory::ScOrcusFactory(ScDocument& rDoc, bool bSkipDefaultStyles) :
 maDoc(rDoc),
 maGlobalSettings(maDoc),
+maRefResolver(maGlobalSettings),
 maSharedStrings(*this),
 maNamedExpressions(maDoc, maGlobalSettings),
 maStyles(*this, bSkipDefaultStyles),
@@ -406,6 +407,20 @@ orcus::spreadsheet::iface::import_styles* 
ScOrcusFactory::get_styles()
 return 
 }
 
+os::iface::import_reference_resolver* 
ScOrcusFactory::get_reference_resolver(os::formula_ref_context_t cxt)
+{
+switch (cxt)
+{
+case os::formula_ref_context_t::global:
+return 
+case os::formula_ref_context_t::named_expression_base:
+case os::formula_ref_context_t::named_range:
+return nullptr;
+}
+
+return nullptr;
+}
+
 void ScOrcusFactory::finalize()
 {
 auto toFormulaCell = [this]( const CellStoreToken& rToken ) -> 
std::unique_ptr


[Libreoffice-commits] core.git: configure.ac filter/Configuration_filter.mk filter/source sc/inc sc/source

2023-10-24 Thread Kohei Yoshida (via logerrit)
 configure.ac|2 
 filter/Configuration_filter.mk  |2 
 filter/source/config/cache/typedetection.cxx|1 
 filter/source/config/fragments/filters/calc_Parquet.xcu |   19 
 filter/source/config/fragments/types/calc_Parquet.xcu   |   17 +++
 sc/inc/orcusfilters.hxx |   18 ++--
 sc/source/filter/inc/orcusfiltersimpl.hxx   |7 -
 sc/source/filter/orcus/filterdetect.cxx |2 
 sc/source/filter/orcus/orcusfiltersimpl.cxx |   70 +---
 sc/source/ui/docshell/docsh.cxx |   63 +-
 10 files changed, 102 insertions(+), 99 deletions(-)

New commits:
commit b14583ba37a6d7ce398ccd3cf339f954785b03d8
Author: Kohei Yoshida 
AuthorDate: Wed May 31 21:33:56 2023 -0400
Commit: Kohei Yoshida 
CommitDate: Wed Oct 25 03:59:57 2023 +0200

Support conditional loading of Apache Parquet files into Calc

Also, use orcus::create_filter() and simplify the logic a bit.  This
requires orcus 0.19.1 or newer.

Note that this change makes it possible to load Apache Parquet files
if and only if orcus has been built with the parquet import filter
enabled.  Using orcus without the parquet import filter enabled will
not break the build or run-time behavior; you just can't load parquet
files.

Change-Id: I9f8820998b7b0667d1e7cd532c32b1c7e55ca999
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158411
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/configure.ac b/configure.ac
index 999ab64289e8..c8466ae65e01 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10878,7 +10878,7 @@ fi
 dnl ===
 dnl Orcus
 dnl ===
-libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.18 >= 0.18.0])
+libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.18 >= 0.19.1])
 if test "$with_system_orcus" != "yes"; then
 if test "$SYSTEM_BOOST" = "TRUE"; then
 dnl Link with Boost.System
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index bd3d3486234e..8a323e83fd54 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -477,6 +477,7 @@ $(eval $(call 
filter_Configuration_add_types,fcfg_langpack,fcfg_calc_types.xcu,f
generic_Text \
calc_Gnumeric \
calc_Lotus \
+   calc_Parquet \
calc_QPro \
calc_MS_Excel_40 \
calc_MS_Excel_40_VorlageTemplate \
@@ -535,6 +536,7 @@ $(eval $(call 
filter_Configuration_add_filters,fcfg_langpack,fcfg_calc_filters.x
calc_HTML_WebQuery \
calc_StarOffice_XML_Calc_Template \
calc_pdf_Export \
+   calc_Parquet \
dBase \
calc8 \
calc8_template \
diff --git a/filter/source/config/cache/typedetection.cxx 
b/filter/source/config/cache/typedetection.cxx
index 18d13a8f7796..a83a1406d0c1 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -211,6 +211,7 @@ int getFlatTypeRank(std::u16string_view rType)
 "calc_SYLK",
 "calc_DIF",
 "calc_dBase",
+"Apache Parquet",
 
 // Binary (raster and vector image files)
 "emf_MS_Windows_Metafile",
diff --git a/filter/source/config/fragments/filters/calc_Parquet.xcu 
b/filter/source/config/fragments/filters/calc_Parquet.xcu
new file mode 100644
index ..5b0fea8257bb
--- /dev/null
+++ b/filter/source/config/fragments/filters/calc_Parquet.xcu
@@ -0,0 +1,19 @@
+
+
+IMPORT ALIEN PREFERRED
+
+
+
+Apache Parquet
+
+com.sun.star.sheet.SpreadsheetDocument
+
+Apache Parquet Spreadsheet
+
+
diff --git a/filter/source/config/fragments/types/calc_Parquet.xcu 
b/filter/source/config/fragments/types/calc_Parquet.xcu
new file mode 100644
index ..6c29d886c92f
--- /dev/null
+++ b/filter/source/config/fragments/types/calc_Parquet.xcu
@@ -0,0 +1,17 @@
+
+
+com.sun.star.comp.sc.OrcusFilterDetect
+
+parquet
+
+true
+Apache Parquet 
Spreadsheet
+Apache 
Parquet
+
+
diff --git a/sc/inc/orcusfilters.hxx b/sc/inc/orcusfilters.hxx
index 6d17f3741ebb..f13f5cc630d2 100644
--- a/sc/inc/orcusfilters.hxx
+++ b/sc/inc/orcusfilters.hxx
@@ -25,17 +25,17 @@ namespace weld { class TreeView; }
 class ScOrcusFilters
 {
 public:
-virtual ~ScOrcusFilters() {}
-
-virtual bool importCSV(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
-
-virtual bool importGnumeric(ScDocument& rDoc, SfxMedium& rMedium) const = 
0;
+enum class ImportResult
+{
+NotSupported,
+Success,
+Failure
+};
 
-virtual bool importExcel2003XML(ScDocument& rDoc, SfxMedium& rMedium) 
const = 0;
-
-virtual bool importXLSX(ScDocument& rDoc, SfxMedium& 

[Libreoffice-commits] core.git: download.lst external/liborcus

2023-10-24 Thread Kohei Yoshida (via logerrit)
 download.lst   |4 +-
 external/liborcus/UnpackedTarball_liborcus.mk  |2 -
 external/liborcus/gnumeric-set-grammar.patch.1 |   17 
 external/liborcus/msvc-int-narrowing.patch.1   |   50 -
 4 files changed, 2 insertions(+), 71 deletions(-)

New commits:
commit b5d194d1d37131f921853b78d659c63178de2bc6
Author: Kohei Yoshida 
AuthorDate: Tue Oct 24 18:31:52 2023 -0400
Commit: Kohei Yoshida 
CommitDate: Wed Oct 25 01:33:12 2023 +0200

Upgrade liborcus to 0.19.1

Change-Id: I2190419e88323bbf000602a7762e850a33b5dfdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158409
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index 07b4934cf760..5aeeb74a6cdc 100644
--- a/download.lst
+++ b/download.lst
@@ -498,8 +498,8 @@ OPENSSL_TARBALL := openssl-3.0.11.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-ORCUS_SHA256SUM := 
1b68f54bb08face4c3dc83c912d921373c44aed817b37d879b7a4e47f2f15e09
-ORCUS_TARBALL := liborcus-0.19.0.tar.xz
+ORCUS_SHA256SUM := 
6c9a8c03e8187f2749a84f2786d86a88ae45c99ed3a2d5fea36ba556b40c342d
+ORCUS_TARBALL := liborcus-0.19.1.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 292435dfd00d..5968c7bb1845 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -20,8 +20,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/gcc9.patch.0 \
external/liborcus/libtool.patch.0 \
external/liborcus/liborcus_newline.patch.1 \
-   external/liborcus/msvc-int-narrowing.patch.1 \
-   external/liborcus/gnumeric-set-grammar.patch.1 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/gnumeric-set-grammar.patch.1 
b/external/liborcus/gnumeric-set-grammar.patch.1
deleted file mode 100644
index 42bc46177737..
--- a/external/liborcus/gnumeric-set-grammar.patch.1
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/src/liborcus/orcus_gnumeric.cpp b/src/liborcus/orcus_gnumeric.cpp
-index 76c13682..849759ba 100644
 a/src/liborcus/orcus_gnumeric.cpp
-+++ b/src/liborcus/orcus_gnumeric.cpp
-@@ -144,6 +144,12 @@ void orcus_gnumeric::read_stream(std::string_view stream)
- if (!decompress_gzip(stream.data(), stream.size(), file_content))
- return;
- 
-+if (auto* gs = mp_impl->mp_factory->get_global_settings(); gs)
-+{
-+gs->set_origin_date(1899, 12, 30);
-+
gs->set_default_formula_grammar(spreadsheet::formula_grammar_t::gnumeric);
-+}
-+
- mp_impl->read_content_xml(file_content, get_config());
- mp_impl->mp_factory->finalize();
- }
diff --git a/external/liborcus/msvc-int-narrowing.patch.1 
b/external/liborcus/msvc-int-narrowing.patch.1
deleted file mode 100644
index 1075cebfdef3..
--- a/external/liborcus/msvc-int-narrowing.patch.1
+++ /dev/null
@@ -1,50 +0,0 @@
-Fix
-
-  error C2398: Element '2': conversion from 'int' to 'const 
std::basic_string_view>::size_type'
-  requires a narrowing conversion
-
-diff --git a/src/liborcus/gnumeric_value_format_parser.cpp 
b/src/liborcus/gnumeric_value_format_parser.cpp
-index 822c1ba1..014068e9 100644
 a/src/liborcus/gnumeric_value_format_parser.cpp
-+++ b/src/liborcus/gnumeric_value_format_parser.cpp
-@@ -12,6 +12,10 @@
- #include 
- #include 
-
-+#include 
-+
-+using boost::numeric_cast;
-+
- namespace orcus {
-
- std::size_t gnumeric_value_format_parser::get_pos() const
-@@ -41,7 +45,8 @@ void gnumeric_value_format_parser::segment()
- if (pos != 2)
- throw parse_error("value format segment is not formatted 
properly", get_pos());
-
--std::string_view s{p0, std::distance(p0, m_cur)};
-+auto n = std::distance(p0, m_cur);
-+std::string_view s{p0, numeric_cast(n)};
- if (s.empty())
- throw parse_error("segment value is empty", get_pos());
-
-@@ -51,7 +56,8 @@ void gnumeric_value_format_parser::segment()
- }
- case '=':
- {
--std::string_view s{p0, std::distance(p0, m_cur)};
-+auto n = std::distance(p0, m_cur);
-+std::string_view s{p0, numeric_cast(n)};
- seg.type = to_gnumeric_value_format_type(s);
- if (seg.type == gnumeric_value_format_type::unknown)
- {
-@@ -65,7 +71,8 @@ void gnumeric_value_format_parser::segment()
- }
- case ':':
- {
--std::string_view s{p0, std::distance(p0, m_cur)};
-+auto n = std::distance(p0, m_cur);
-+std::string_view s{p0, numeric_cast(n)};
-
- switch (pos)
- {


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

2023-09-29 Thread Kohei Yoshida (via logerrit)
 external/liborcus/UnpackedTarball_liborcus.mk  |1 +
 external/liborcus/gnumeric-set-grammar.patch.1 |   17 +
 2 files changed, 18 insertions(+)

New commits:
commit cba8c933d1ff2e31ec55544f46d6fff99e8a5ccd
Author: Kohei Yoshida 
AuthorDate: Fri Sep 29 17:45:14 2023 -0400
Commit: Kohei Yoshida 
CommitDate: Sat Sep 30 00:52:06 2023 +0200

Set grammar type to gnumeric before loading the content

Without this, the document model side would not know what grammer
to use to parse formula expressions.

Change-Id: I7e921f9c0f9b088fb98fe126ad4a84db006c8747
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157413
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index b8c44479765b..292435dfd00d 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/libtool.patch.0 \
external/liborcus/liborcus_newline.patch.1 \
external/liborcus/msvc-int-narrowing.patch.1 \
+   external/liborcus/gnumeric-set-grammar.patch.1 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/gnumeric-set-grammar.patch.1 
b/external/liborcus/gnumeric-set-grammar.patch.1
new file mode 100644
index ..42bc46177737
--- /dev/null
+++ b/external/liborcus/gnumeric-set-grammar.patch.1
@@ -0,0 +1,17 @@
+diff --git a/src/liborcus/orcus_gnumeric.cpp b/src/liborcus/orcus_gnumeric.cpp
+index 76c13682..849759ba 100644
+--- a/src/liborcus/orcus_gnumeric.cpp
 b/src/liborcus/orcus_gnumeric.cpp
+@@ -144,6 +144,12 @@ void orcus_gnumeric::read_stream(std::string_view stream)
+ if (!decompress_gzip(stream.data(), stream.size(), file_content))
+ return;
+ 
++if (auto* gs = mp_impl->mp_factory->get_global_settings(); gs)
++{
++gs->set_origin_date(1899, 12, 30);
++
gs->set_default_formula_grammar(spreadsheet::formula_grammar_t::gnumeric);
++}
++
+ mp_impl->read_content_xml(file_content, get_config());
+ mp_impl->mp_factory->finalize();
+ }


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

2023-09-28 Thread Kohei Yoshida (via logerrit)
 external/liborcus/windows-constants-hack.patch |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit e9a0c97de95688b2f86bbb4dd8c823af5442401c
Author: Kohei Yoshida 
AuthorDate: Thu Sep 28 20:29:52 2023 -0400
Commit: Kohei Yoshida 
CommitDate: Fri Sep 29 03:50:42 2023 +0200

Set the correct version number of orcus

Ideally we should fix the Windows build properly, but cmake isn't
available to us.

Change-Id: I3f612604195212ba3a699c0b76785b5aa5f7925b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157391
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/external/liborcus/windows-constants-hack.patch 
b/external/liborcus/windows-constants-hack.patch
index e86c74a722f3..68e57857826d 100644
--- a/external/liborcus/windows-constants-hack.patch
+++ b/external/liborcus/windows-constants-hack.patch
@@ -3,13 +3,13 @@ index ae571f5..539ce18 100644
 --- a/src/liborcus/info.cpp
 +++ b/src/liborcus/info.cpp
 @@ -7,7 +7,9 @@
- 
+
  #include "orcus/info.hpp"
- 
+
 -#include "constants.inl"
 +#define ORCUS_MAJOR_VERSION 0
-+#define ORCUS_MINOR_VERSION 17
-+#define ORCUS_MICRO_VERSION 2
- 
++#define ORCUS_MINOR_VERSION 19
++#define ORCUS_MICRO_VERSION 0
+
  namespace orcus {
- 
+


[Libreoffice-commits] core.git: download.lst external/liborcus

2023-09-28 Thread Kohei Yoshida (via logerrit)
 download.lst  |6 +--
 external/liborcus/Library_orcus-parser.mk |1 
 external/liborcus/Library_orcus.mk|   10 -
 external/liborcus/UnpackedTarball_liborcus.mk |2 -
 external/liborcus/fix-pch.patch.0 |   11 -
 external/liborcus/msvc-int-narrowing.patch.1  |   50 ++
 6 files changed, 62 insertions(+), 18 deletions(-)

New commits:
commit a593e018d4e3033ae95353a5ac3063a8c651a158
Author: Kohei Yoshida 
AuthorDate: Wed Sep 27 22:15:22 2023 -0400
Commit: Kohei Yoshida 
CommitDate: Fri Sep 29 01:46:30 2023 +0200

Upgrade liborcus to 0.19.0

Change-Id: I57b92a86a155f244742fd70b1ab9a1acbc206a29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157345
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index 7ded51ff5450..b5418e4a8862 100644
--- a/download.lst
+++ b/download.lst
@@ -498,8 +498,8 @@ OPENSSL_TARBALL := openssl-3.0.10.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-ORCUS_SHA256SUM := 
6006b9f1576315e313df715a7e72a17f3e0b17d7b6bd119cfa8a0b608ce971eb
-ORCUS_TARBALL := liborcus-0.18.1.tar.xz
+ORCUS_SHA256SUM := 
1b68f54bb08face4c3dc83c912d921373c44aed817b37d879b7a4e47f2f15e09
+ORCUS_TARBALL := liborcus-0.19.0.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
@@ -577,7 +577,7 @@ RHINO_TARBALL := 
798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
 # so that git cherry-pick
 # will not run into conflicts
 SKIA_SHA256SUM := 
2223ebce534458a37826e8fe4f24635b0712cde7ed1bd3208f089f6fdd796e01
-SKIA_TARBALL := skia-m116-2ddcf183eb260f63698aa74d1bb380f247ad7ccd.tar.xz 
+SKIA_TARBALL := skia-m116-2ddcf183eb260f63698aa74d1bb380f247ad7ccd.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/liborcus/Library_orcus-parser.mk 
b/external/liborcus/Library_orcus-parser.mk
index f26657756273..b7b459f36b7f 100644
--- a/external/liborcus/Library_orcus-parser.mk
+++ b/external/liborcus/Library_orcus-parser.mk
@@ -54,7 +54,6 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,orcus-parser,\
UnpackedTarball/liborcus/src/parser/json_parser_thread \
UnpackedTarball/liborcus/src/parser/parser_base \
UnpackedTarball/liborcus/src/parser/parser_global \
-   UnpackedTarball/liborcus/src/parser/pstring \
UnpackedTarball/liborcus/src/parser/sax_parser_base \
UnpackedTarball/liborcus/src/parser/sax_token_parser \
UnpackedTarball/liborcus/src/parser/sax_token_parser_thread \
diff --git a/external/liborcus/Library_orcus.mk 
b/external/liborcus/Library_orcus.mk
index 785cd440aab1..28ef13612260 100644
--- a/external/liborcus/Library_orcus.mk
+++ b/external/liborcus/Library_orcus.mk
@@ -62,11 +62,15 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,orcus,\
UnpackedTarball/liborcus/src/liborcus/gnumeric_cell_context \
UnpackedTarball/liborcus/src/liborcus/gnumeric_context \
UnpackedTarball/liborcus/src/liborcus/gnumeric_detection_handler \
+   UnpackedTarball/liborcus/src/liborcus/gnumeric_filter_context \
UnpackedTarball/liborcus/src/liborcus/gnumeric_handler \
-   UnpackedTarball/liborcus/src/liborcus/gnumeric_helper \
+   UnpackedTarball/liborcus/src/liborcus/gnumeric_names_context \
UnpackedTarball/liborcus/src/liborcus/gnumeric_namespace_types \
UnpackedTarball/liborcus/src/liborcus/gnumeric_sheet_context \
+   UnpackedTarball/liborcus/src/liborcus/gnumeric_styles_context \
UnpackedTarball/liborcus/src/liborcus/gnumeric_tokens \
+   UnpackedTarball/liborcus/src/liborcus/gnumeric_types \
+   UnpackedTarball/liborcus/src/liborcus/gnumeric_value_format_parser \
UnpackedTarball/liborcus/src/liborcus/info \
UnpackedTarball/liborcus/src/liborcus/interface \
UnpackedTarball/liborcus/src/liborcus/json_document_tree \
@@ -75,6 +79,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,orcus,\
UnpackedTarball/liborcus/src/liborcus/json_structure_tree \
UnpackedTarball/liborcus/src/liborcus/json_util \
UnpackedTarball/liborcus/src/liborcus/measurement \
+   UnpackedTarball/liborcus/src/liborcus/number_utils \
UnpackedTarball/liborcus/src/liborcus/odf_document_styles_context \
UnpackedTarball/liborcus/src/liborcus/odf_helper \
UnpackedTarball/liborcus/src/liborcus/odf_namespace_types \
@@ -114,7 +119,6 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,orcus,\
UnpackedTarball/liborcus/src/liborcus/string_helper \
UnpackedTarball/liborcus/src/liborcus/xlsx_autofilter_context \
UnpackedTarball/liborcus/src/liborcus/xlsx_conditional_format_context \
-   UnpackedTarball/liborcus/src/liborcus/xlsx_context \
UnpackedTarball/liborcus/src/liborcus/xlsx_drawing_context \

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

2023-09-01 Thread Kohei Yoshida (via logerrit)
 sc/source/filter/orcus/interface.cxx |   15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 78d9d0d8dccb6fd8952435b8a13d525c7606f467
Author: Kohei Yoshida 
AuthorDate: Fri Sep 1 16:44:51 2023 -0400
Commit: Kohei Yoshida 
CommitDate: Sat Sep 2 02:31:29 2023 +0200

Apply font names and sizes to formatted strings via orcus

Change-Id: I6809a184652b278eb66ee104558af19ea4a22ed7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156459
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index c2c784a5a016..b349016355b7 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -1357,12 +1357,23 @@ void ScOrcusSharedStrings::set_segment_italic(bool b)
 maCurFormat.Put(SvxPostureItem(eItalic, EE_CHAR_ITALIC));
 }
 
-void ScOrcusSharedStrings::set_segment_font_name(std::string_view /*s*/)
+void ScOrcusSharedStrings::set_segment_font_name(std::string_view s)
 {
+OUString aName = toOUString(s);
+maCurFormat.Put(
+SvxFontItem(
+FAMILY_DONTKNOW, aName, aName, PITCH_DONTKNOW,
+mrFactory.getGlobalSettings().getTextEncoding(),
+EE_CHAR_FONTINFO
+)
+);
 }
 
-void ScOrcusSharedStrings::set_segment_font_size(double /*point*/)
+void ScOrcusSharedStrings::set_segment_font_size(double point)
 {
+// points to 100th of millimeters
+tools::Long nMM = o3tl::convert(point, o3tl::Length::pt, 
o3tl::Length::mm100);
+maCurFormat.Put(SvxFontHeightItem(nMM, 100, EE_CHAR_FONTHEIGHT));
 }
 
 void ScOrcusSharedStrings::set_segment_font_color(


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

2023-08-30 Thread Kohei Yoshida (via logerrit)
 sc/source/filter/inc/orcusinterface.hxx   |   15 
 sc/source/filter/orcus/interface.cxx  |   82 --
 sc/source/ui/dataprovider/xmldataprovider.cxx |2 
 3 files changed, 79 insertions(+), 20 deletions(-)

New commits:
commit 695ae365dcab7c7dd59b39411299c5c200081885
Author: Kohei Yoshida 
AuthorDate: Tue Aug 29 22:13:32 2023 -0400
Commit: Kohei Yoshida 
CommitDate: Thu Aug 31 03:03:29 2023 +0200

Add support for rich-text string import via orcus interface

It was previously imported only as non-formatted strings.  Font names
and sizes are to be imported later.

Change-Id: I93a313851e87f1d6d9ccc409ca9a9f1abff3de0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156271
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/filter/inc/orcusinterface.hxx 
b/sc/source/filter/inc/orcusinterface.hxx
index ed3966a2e136..2fd1d5ed40f3 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -11,10 +11,12 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 #include 
+#include 
 
 #include "sharedformulagroups.hxx"
 
@@ -30,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class ScOrcusSheet;
 class ScOrcusStyles;
@@ -103,8 +106,13 @@ public:
 class ScOrcusSharedStrings : public 
orcus::spreadsheet::iface::import_shared_strings
 {
 ScOrcusFactory& mrFactory;
+ScFieldEditEngine& mrEditEngine;
+
+SfxItemSet maCurFormat;
+std::vector> maFormatSegments;
+
+OUString toOUString(std::string_view s);
 
-OStringBuffer maCurSegment;
 public:
 ScOrcusSharedStrings(ScOrcusFactory& rFactory);
 
@@ -696,12 +704,13 @@ class ScOrcusFactory : public 
orcus::spreadsheet::iface::import_factory
 CellStoreToken( const ScAddress& rPos, OUString aFormula, 
formula::FormulaGrammar::Grammar eGrammar );
 };
 
+using StringValueType = std::variant>;
 typedef std::unordered_map StringHashType;
 typedef std::vector CellStoreTokensType;
 
 ScDocumentImport maDoc;
 
-std::vector maStrings;
+std::vector maStrings;
 StringHashType maStringHash;
 
 CellStoreTokensType maCellStoreTokens;
@@ -735,6 +744,8 @@ public:
 
 size_t appendString(const OUString& rStr);
 size_t addString(const OUString& rStr);
+std::size_t appendFormattedString(std::unique_ptr 
pEditText);
+
 const OUString* getString(size_t nIndex) const;
 
 void pushCellStoreAutoToken( const ScAddress& rPos, const OUString& rVal );
diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index a61d545d9151..c2c784a5a016 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -455,7 +456,16 @@ void ScOrcusFactory::finalize()
 // String index out-of-bound!  Something is up.
 break;
 
-maDoc.setStringCell(rToken.maPos, maStrings[rToken.mnIndex1]);
+const auto& s = maStrings[rToken.mnIndex1];
+switch (s.index())
+{
+case 0: // OUString
+maDoc.setStringCell(rToken.maPos, std::get<0>(s));
+break;
+case 1: // std::unique_ptr
+maDoc.setEditCell(rToken.maPos, 
std::get<1>(s)->Clone());
+break;
+}
 ++nCellCount;
 break;
 }
@@ -577,9 +587,23 @@ size_t ScOrcusFactory::addString(const OUString& rStr)
 return appendString(rStr);
 }
 
+std::size_t 
ScOrcusFactory::appendFormattedString(std::unique_ptr pEditText)
+{
+std::size_t nPos = maStrings.size();
+maStrings.push_back(std::move(pEditText));
+return nPos;
+}
+
 const OUString* ScOrcusFactory::getString(size_t nIndex) const
 {
-return nIndex < maStrings.size() ? [nIndex] : nullptr;
+if (nIndex >= maStrings.size())
+return nullptr;
+
+const StringValueType& rStr = maStrings[nIndex];
+if (rStr.index() != 0)
+return nullptr;
+
+return ::get(rStr);
 }
 
 void ScOrcusFactory::pushCellStoreAutoToken( const ScAddress& rPos, const 
OUString& rVal )
@@ -1294,31 +1318,43 @@ ScOrcusFactory& ScOrcusSheet::getFactory()
 return mrFactory;
 }
 
+OUString ScOrcusSharedStrings::toOUString(std::string_view s)
+{
+return {s.data(), sal_Int32(s.size()), 
mrFactory.getGlobalSettings().getTextEncoding()};
+}
+
 ScOrcusSharedStrings::ScOrcusSharedStrings(ScOrcusFactory& rFactory) :
-mrFactory(rFactory) {}
+mrFactory(rFactory),
+mrEditEngine(rFactory.getDoc().getDoc().GetEditEngine()),
+maCurFormat(mrEditEngine.GetEmptyItemSet())
+{
+mrEditEngine.Clear();
+}
 
 size_t ScOrcusSharedStrings::append(std::string_view s)
 {
-OUString aNewString(s.data(), s.size(), 

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

2023-07-18 Thread Kohei Yoshida (via logerrit)
 sc/source/filter/inc/orcusinterface.hxx |3 +++
 sc/source/filter/orcus/interface.cxx|   15 +++
 2 files changed, 18 insertions(+)

New commits:
commit 9a96c395d52984628b759104f9ce2a7781d0e139
Author: Kohei Yoshida 
AuthorDate: Mon Jul 17 22:22:48 2023 -0400
Commit: Kohei Yoshida 
CommitDate: Tue Jul 18 14:34:16 2023 +0200

Make the reference resolver really available for orcus

It was there, but was never really made available.

Change-Id: Id7093c4c6b52aa1831f42046a83991b923c70781
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154569
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/filter/inc/orcusinterface.hxx 
b/sc/source/filter/inc/orcusinterface.hxx
index 44318d0b1149..ed3966a2e136 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -706,6 +706,7 @@ class ScOrcusFactory : public 
orcus::spreadsheet::iface::import_factory
 
 CellStoreTokensType maCellStoreTokens;
 ScOrcusGlobalSettings maGlobalSettings;
+ScOrcusRefResolver maRefResolver;
 ScOrcusSharedStrings maSharedStrings;
 ScOrcusNamedExpression maNamedExpressions;
 std::vector> maSheets;
@@ -726,6 +727,8 @@ public:
 virtual orcus::spreadsheet::iface::import_shared_strings* 
get_shared_strings() override;
 virtual orcus::spreadsheet::iface::import_named_expression* 
get_named_expression() override;
 virtual orcus::spreadsheet::iface::import_styles* get_styles() override;
+virtual orcus::spreadsheet::iface::import_reference_resolver* 
get_reference_resolver(
+orcus::spreadsheet::formula_ref_context_t cxt) override;
 virtual void finalize() override;
 
 ScDocumentImport& getDoc();
diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index dac336ad35b8..52907f5f69c2 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -310,6 +310,7 @@ ScOrcusFactory::CellStoreToken::CellStoreToken(const 
ScAddress& rPos, OUString a
 ScOrcusFactory::ScOrcusFactory(ScDocument& rDoc, bool bSkipDefaultStyles) :
 maDoc(rDoc),
 maGlobalSettings(maDoc),
+maRefResolver(maGlobalSettings),
 maSharedStrings(*this),
 maNamedExpressions(maDoc, maGlobalSettings),
 maStyles(*this, bSkipDefaultStyles),
@@ -409,6 +410,20 @@ orcus::spreadsheet::iface::import_styles* 
ScOrcusFactory::get_styles()
 return 
 }
 
+os::iface::import_reference_resolver* 
ScOrcusFactory::get_reference_resolver(os::formula_ref_context_t cxt)
+{
+switch (cxt)
+{
+case os::formula_ref_context_t::global:
+return 
+case os::formula_ref_context_t::named_expression_base:
+case os::formula_ref_context_t::named_range:
+return nullptr;
+}
+
+return nullptr;
+}
+
 void ScOrcusFactory::finalize()
 {
 auto toFormulaCell = [this]( const CellStoreToken& rToken ) -> 
std::unique_ptr


[Libreoffice-commits] core.git: download.lst

2023-05-01 Thread Kohei Yoshida (via logerrit)
 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit fb3a6b82b55a298eabf8f431f1451dc826642acd
Author: Kohei Yoshida 
AuthorDate: Mon May 1 18:19:39 2023 -0400
Commit: Kohei Yoshida 
CommitDate: Tue May 2 02:03:07 2023 +0200

Update mdds to 2.1.1

Change-Id: I4f708faa5b0017e7852e3b085825b6637f6fa988
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151244
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index f2ea92d5..5dee8cfce9ab 100644
--- a/download.lst
+++ b/download.lst
@@ -366,8 +366,8 @@ MARIADB_CONNECTOR_C_TARBALL := 
mariadb-connector-c-3.1.8-src.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-MDDS_SHA256SUM := 
9bd8ba6c81a560723e869486850c374bae4e897d6024698452de0738c3adb354
-MDDS_TARBALL := mdds-2.1.0.tar.xz
+MDDS_SHA256SUM := 
1483d90cefb8aa4563c4d0a85cb7b243aa95217d235d422e9ca6722fd5b97e56
+MDDS_TARBALL := mdds-2.1.1.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts


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

2023-03-06 Thread Kohei Yoshida (via logerrit)
 sc/inc/columnspanset.hxx  |1 +
 sc/source/core/data/columnspanset.cxx |4 
 2 files changed, 5 insertions(+)

New commits:
commit b032101f1e253e83dbed58632882853021d11647
Author: Kohei Yoshida 
AuthorDate: Thu Mar 2 23:29:15 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Mon Mar 6 13:38:28 2023 +

tdf#148143: Reset the position hint when flat_segment_tree gets copied

std::optional stores the wrapped object as part of its memory footprint,
and when it gets copied, it copy-constructs the wrapped object too.  We
need to be aware of this when using std::optional inside std::vector
which may reallocate its internal buffer and copy the stored elements.

Change-Id: Ib8fab1295388ae2ee9ef3d044943ac3c2bc8e529
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148152
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
(cherry picked from commit c4187189060a104cf36d8a8c9b2958b8c28cde0b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148233

diff --git a/sc/inc/columnspanset.hxx b/sc/inc/columnspanset.hxx
index d8cfc41f524b..5a3dc7645a43 100644
--- a/sc/inc/columnspanset.hxx
+++ b/sc/inc/columnspanset.hxx
@@ -58,6 +58,7 @@ private:
 ColumnSpansType::const_iterator miPos;
 
 ColumnType(SCROW nStart, SCROW nEnd, bool bInit);
+ColumnType(const ColumnType& rOther);
 };
 
 typedef std::vector> TableType;
diff --git a/sc/source/core/data/columnspanset.cxx 
b/sc/source/core/data/columnspanset.cxx
index eb09ea26be98..bec9c8a7e270 100644
--- a/sc/source/core/data/columnspanset.cxx
+++ b/sc/source/core/data/columnspanset.cxx
@@ -53,6 +53,9 @@ ColRowSpan::ColRowSpan(SCCOLROW nStart, SCCOLROW nEnd) : 
mnStart(nStart), mnEnd(
 ColumnSpanSet::ColumnType::ColumnType(SCROW nStart, SCROW nEnd, bool bInit) :
 maSpans(nStart, nEnd+1, bInit), miPos(maSpans.begin()) {}
 
+ColumnSpanSet::ColumnType::ColumnType(const ColumnType& rOther) :
+maSpans(rOther.maSpans), miPos(maSpans.begin()) {} // NB: copying maSpans 
invalidates miPos - reset it
+
 ColumnSpanSet::Action::~Action() {}
 void ColumnSpanSet::Action::startColumn(SCTAB /*nTab*/, SCCOL /*nCol*/) {}
 
@@ -142,6 +145,7 @@ void ColumnSpanSet::scan(
 
 ColumnNonEmptyRangesScanner aScanner(rCol.maSpans, bVal);
 ParseBlock(rSrcCells.begin(), rSrcCells, aScanner, nRow1, nRow2);
+rCol.miPos = rCol.maSpans.begin();
 }
 }
 


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

2023-03-03 Thread Kohei Yoshida (via logerrit)
 sc/inc/columnspanset.hxx  |1 +
 sc/source/core/data/columnspanset.cxx |4 
 2 files changed, 5 insertions(+)

New commits:
commit c4187189060a104cf36d8a8c9b2958b8c28cde0b
Author: Kohei Yoshida 
AuthorDate: Thu Mar 2 23:29:15 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Fri Mar 3 16:10:21 2023 +

tdf#148143: Reset the position hint when flat_segment_tree gets copied

std::optional stores the wrapped object as part of its memory footprint,
and when it gets copied, it copy-constructs the wrapped object too.  We
need to be aware of this when using std::optional inside std::vector
which may reallocate its internal buffer and copy the stored elements.

Change-Id: Ib8fab1295388ae2ee9ef3d044943ac3c2bc8e529
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148152
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/inc/columnspanset.hxx b/sc/inc/columnspanset.hxx
index d8cfc41f524b..5a3dc7645a43 100644
--- a/sc/inc/columnspanset.hxx
+++ b/sc/inc/columnspanset.hxx
@@ -58,6 +58,7 @@ private:
 ColumnSpansType::const_iterator miPos;
 
 ColumnType(SCROW nStart, SCROW nEnd, bool bInit);
+ColumnType(const ColumnType& rOther);
 };
 
 typedef std::vector> TableType;
diff --git a/sc/source/core/data/columnspanset.cxx 
b/sc/source/core/data/columnspanset.cxx
index eb09ea26be98..bec9c8a7e270 100644
--- a/sc/source/core/data/columnspanset.cxx
+++ b/sc/source/core/data/columnspanset.cxx
@@ -53,6 +53,9 @@ ColRowSpan::ColRowSpan(SCCOLROW nStart, SCCOLROW nEnd) : 
mnStart(nStart), mnEnd(
 ColumnSpanSet::ColumnType::ColumnType(SCROW nStart, SCROW nEnd, bool bInit) :
 maSpans(nStart, nEnd+1, bInit), miPos(maSpans.begin()) {}
 
+ColumnSpanSet::ColumnType::ColumnType(const ColumnType& rOther) :
+maSpans(rOther.maSpans), miPos(maSpans.begin()) {} // NB: copying maSpans 
invalidates miPos - reset it
+
 ColumnSpanSet::Action::~Action() {}
 void ColumnSpanSet::Action::startColumn(SCTAB /*nTab*/, SCCOL /*nCol*/) {}
 
@@ -142,6 +145,7 @@ void ColumnSpanSet::scan(
 
 ColumnNonEmptyRangesScanner aScanner(rCol.maSpans, bVal);
 ParseBlock(rSrcCells.begin(), rSrcCells, aScanner, nRow1, nRow2);
+rCol.miPos = rCol.maSpans.begin();
 }
 }
 


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

2023-03-03 Thread Kohei Yoshida (via logerrit)
 sc/inc/clipcontext.hxx  |   15 +
 sc/inc/column.hxx   |   19 +---
 sc/inc/document.hxx |3 +
 sc/source/core/data/clipcontext.cxx |   47 ++
 sc/source/core/data/column3.cxx |   55 +---
 sc/source/core/data/column4.cxx |   18 +++
 sc/source/core/data/document.cxx|   31 +---
 7 files changed, 157 insertions(+), 31 deletions(-)

New commits:
commit cc66f335931b9cf088805bfc4cab25bb8cc4ee44
Author: Kohei Yoshida 
AuthorDate: Tue Feb 21 22:16:30 2023 -0500
Commit: Christian Lohmaier 
CommitDate: Fri Mar 3 15:43:42 2023 +

tdf#153669: Track formulas that stopped listening ...

... then have them start listening again after the copy from
clipboard is complete.  Note that in case the pasted cells
are formula cells, those will be handled together as well.

Change-Id: Ia4be814b888734267a39f7c89435011968570b7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147940
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
(cherry picked from commit e83c243018c1c7f6662f9a8ecdc731c5c071ea31)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147912
(cherry picked from commit 33b6c065a1629afd36c9ae0fe5daa18b972620e5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147983
(cherry picked from commit 268ab12ef987f0c1d34db78060ac6b80f25d9408)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148106
Reviewed-by: Xisco Fauli 
Tested-by: Christian Lohmaier 
Reviewed-by: Christian Lohmaier 

diff --git a/sc/inc/clipcontext.hxx b/sc/inc/clipcontext.hxx
index b09e1be78761..b3ce874a6a7f 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 "columnspanset.hxx"
 #include "Sparkline.hxx"
 
 #include 
@@ -45,6 +46,9 @@ public:
 
 class SC_DLLPUBLIC CopyFromClipContext final : public ClipContextBase
 {
+/** Tracks modified formula group spans. */
+sc::ColumnSpanSet maListeningFormulaSpans;
+
 SCCOL mnDestCol1;
 SCCOL mnDestCol2;
 SCROW mnDestRow1;
@@ -101,6 +105,17 @@ public:
 void setDeleteFlag( InsertDeleteFlags nFlag );
 InsertDeleteFlags getDeleteFlag() const;
 
+/**
+ * Record a range of formula cells that need to start listening after the
+ * copy-from-clip is complete.
+ */
+void setListeningFormulaSpans( SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2 );
+
+/**
+ * Have the formula cells in the recorded ranges start listening.
+ */
+void startListeningFormulas();
+
 /**
  * Set the column size of a "single cell" row, which is used when copying
  * a single row of cells in a clip doc and pasting it into multiple
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index aa5a5c689c01..111aa5c543d8 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -22,6 +22,7 @@
 #include "global.hxx"
 #include "address.hxx"
 #include "cellvalue.hxx"
+#include "columnspanset.hxx"
 #include "rangelst.hxx"
 #include "types.hxx"
 #include "mtvelements.hxx"
@@ -48,8 +49,6 @@ class CopyFromClipContext;
 class CopyToClipContext;
 class CopyToDocContext;
 class MixDocContext;
-class ColumnSpanSet;
-class SingleColumnSpanSet;
 struct RefUpdateContext;
 struct RefUpdateInsertTabContext;
 struct RefUpdateDeleteTabContext;
@@ -839,9 +838,19 @@ private:
 
 void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& 
rDestCol) const;
 
-void DeleteCells(
-sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, 
InsertDeleteFlags nDelFlag,
-sc::SingleColumnSpanSet& rDeleted );
+struct DeleteCellsResult
+{
+/** cell ranges that have been deleted. */
+sc::SingleColumnSpanSet aDeletedRows;
+/** formula cell range that has stopped listening. */
+std::vector> aFormulaRanges;
+
+DeleteCellsResult( const ScDocument& rDoc );
+DeleteCellsResult( const DeleteCellsResult& ) = delete;
+};
+
+std::unique_ptr DeleteCells(
+sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, 
InsertDeleteFlags nDelFlag );
 
 /**
  * Get all non-grouped formula cells and formula cell groups in the whole
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index b4552e792000..748e9c03c795 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1672,6 +1672,9 @@ public:
   SCCOL nCol2, SCROW nRow2, const ScMarkData& 
rMark, SCCOL nDx,
   SCROW& rClipStartRow, SCROW nClipEndRow);
 
+void StartListeningFromClip(
+sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt,
+SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
 void StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
  

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

2023-03-02 Thread Kohei Yoshida (via logerrit)
 sc/Library_sc.mk   |1 
 sc/inc/broadcast.hxx   |   86 +++
 sc/inc/calcmacros.hxx  |4 
 sc/inc/column.hxx  |3 
 sc/inc/document.hxx|7 -
 sc/inc/grouparealistener.hxx   |3 
 sc/inc/table.hxx   |3 
 sc/qa/unit/ucalc_formula.cxx   |   85 +--
 sc/source/core/data/bcaslot.cxx|   59 -
 sc/source/core/data/broadcast.cxx  |  164 +
 sc/source/core/data/column4.cxx|   31 ++
 sc/source/core/data/document.cxx   |8 -
 sc/source/core/data/document10.cxx |   15 +++
 sc/source/core/data/table7.cxx |6 +
 sc/source/core/inc/bcaslot.hxx |   15 +--
 15 files changed, 400 insertions(+), 90 deletions(-)

New commits:
commit 687b950702c49c90cff9a43655ea97a0343799a0
Author: Kohei Yoshida 
AuthorDate: Tue Feb 21 22:16:30 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Thu Mar 2 23:35:56 2023 +

Add a means to query the internal broadcaster state ...

... and use it in one unit test case.  Also, remove the code inside
DEBUG_AREA_BROADCASTER macro since it no longer builds & has been
superceded by this new state query method.

Change-Id: I38691a76df5c63034ff488522936dd566bf8b4e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148079
Tested-by: Kohei Yoshida 
Reviewed-by: Kohei Yoshida 

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 4d3c7398b43d..49c36cf27d3c 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -104,6 +104,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/core/data/attrib \
 sc/source/core/data/autonamecache \
 sc/source/core/data/bcaslot \
+sc/source/core/data/broadcast \
 sc/source/core/data/bigrange \
 sc/source/core/data/celltextattr \
 sc/source/core/data/cellvalue \
diff --git a/sc/inc/broadcast.hxx b/sc/inc/broadcast.hxx
new file mode 100644
index ..b095f819acb7
--- /dev/null
+++ b/sc/inc/broadcast.hxx
@@ -0,0 +1,86 @@
+/* -*- 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 
+#include 
+#include 
+
+class ScFormulaCell;
+class SvtListener;
+
+namespace sc
+{
+class FormulaGroupAreaListener;
+
+struct BroadcasterState
+{
+enum class CellListenerType
+{
+FormulaCell,
+Generic,
+};
+
+enum class AreaListenerType
+{
+FormulaCell,
+FormulaGroup,
+Generic,
+};
+
+struct CellListener
+{
+using DataType = std::variant;
+
+CellListenerType eType;
+DataType pData;
+
+CellListener(const ScFormulaCell* p);
+CellListener(const SvtListener* p);
+};
+
+struct AreaListener
+{
+using DataType = std::variant;
+
+AreaListenerType eType;
+DataType pData;
+
+AreaListener(const ScFormulaCell* p);
+AreaListener(const sc::FormulaGroupAreaListener* p);
+AreaListener(const SvtListener* p);
+};
+
+std::map> aCellListenerStore;
+std::map> aAreaListenerStore;
+
+/**
+ * Check if a formula cell listens on a single cell.
+ */
+bool hasFormulaCellListener(const ScAddress& rBroadcasterPos,
+const ScAddress& rFormulaPos) const;
+
+/**
+ * Check if a formula cell listens on a single range.
+ */
+bool hasFormulaCellListener(const ScRange& rBroadcasterRange,
+const ScAddress& rFormulaPos) const;
+
+/**
+ * Dump all broadcaster state in YAML format.
+ */
+void dump(std::ostream& rStrm, const ScDocument* pDoc = nullptr) const;
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/calcmacros.hxx b/sc/inc/calcmacros.hxx
index c0c68d4487cf..ebe96654804a 100644
--- a/sc/inc/calcmacros.hxx
+++ b/sc/inc/calcmacros.hxx
@@ -12,7 +12,6 @@
 #define DEBUG_COLUMN_STORAGE 0
 #define DEBUG_PIVOT_TABLE 0
 #define DEBUG_FORMULA_COMPILER 0
-#define DEBUG_AREA_BROADCASTER 0
 
 #define DUMP_COLUMN_STORAGE 0
 #define DUMP_PIVOT_TABLE 0
@@ -26,8 +25,7 @@
 
 #if DUMP_PIVOT_TABLE || DEBUG_PIVOT_TABLE || \
 DUMP_COLUMN_STORAGE || DEBUG_COLUMN_STORAGE || \
-DEBUG_FORMULA_COMPILER || \
-DEBUG_AREA_BROADCASTER
+DEBUG_FORMULA_COMPILER
 #include 
 using std::cout;
 using std::cerr;
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 949ca30dd137..5c42f02794ab 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -42,6 +42,7 @@ namespace formula { struct VectorRefArray; }
 
 namespace sc {
 
+struct BroadcasterState;
 struct FormulaGroupEntry;
 

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

2023-03-01 Thread Kohei Yoshida (via logerrit)
 sc/inc/clipcontext.hxx  |   15 +
 sc/inc/column.hxx   |   19 +---
 sc/inc/document.hxx |3 +
 sc/source/core/data/clipcontext.cxx |   47 ++
 sc/source/core/data/column3.cxx |   55 +---
 sc/source/core/data/column4.cxx |   18 +++
 sc/source/core/data/document.cxx|   31 +---
 7 files changed, 157 insertions(+), 31 deletions(-)

New commits:
commit 268ab12ef987f0c1d34db78060ac6b80f25d9408
Author: Kohei Yoshida 
AuthorDate: Tue Feb 21 22:16:30 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Wed Mar 1 14:08:19 2023 +

tdf#153669: Track formulas that stopped listening ...

... then have them start listening again after the copy from
clipboard is complete.  Note that in case the pasted cells
are formula cells, those will be handled together as well.

Change-Id: Ia4be814b888734267a39f7c89435011968570b7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147940
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
(cherry picked from commit e83c243018c1c7f6662f9a8ecdc731c5c071ea31)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147912
(cherry picked from commit 33b6c065a1629afd36c9ae0fe5daa18b972620e5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147983

diff --git a/sc/inc/clipcontext.hxx b/sc/inc/clipcontext.hxx
index b09e1be78761..b3ce874a6a7f 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 "columnspanset.hxx"
 #include "Sparkline.hxx"
 
 #include 
@@ -45,6 +46,9 @@ public:
 
 class SC_DLLPUBLIC CopyFromClipContext final : public ClipContextBase
 {
+/** Tracks modified formula group spans. */
+sc::ColumnSpanSet maListeningFormulaSpans;
+
 SCCOL mnDestCol1;
 SCCOL mnDestCol2;
 SCROW mnDestRow1;
@@ -101,6 +105,17 @@ public:
 void setDeleteFlag( InsertDeleteFlags nFlag );
 InsertDeleteFlags getDeleteFlag() const;
 
+/**
+ * Record a range of formula cells that need to start listening after the
+ * copy-from-clip is complete.
+ */
+void setListeningFormulaSpans( SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2 );
+
+/**
+ * Have the formula cells in the recorded ranges start listening.
+ */
+void startListeningFormulas();
+
 /**
  * Set the column size of a "single cell" row, which is used when copying
  * a single row of cells in a clip doc and pasting it into multiple
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index aa5a5c689c01..111aa5c543d8 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -22,6 +22,7 @@
 #include "global.hxx"
 #include "address.hxx"
 #include "cellvalue.hxx"
+#include "columnspanset.hxx"
 #include "rangelst.hxx"
 #include "types.hxx"
 #include "mtvelements.hxx"
@@ -48,8 +49,6 @@ class CopyFromClipContext;
 class CopyToClipContext;
 class CopyToDocContext;
 class MixDocContext;
-class ColumnSpanSet;
-class SingleColumnSpanSet;
 struct RefUpdateContext;
 struct RefUpdateInsertTabContext;
 struct RefUpdateDeleteTabContext;
@@ -839,9 +838,19 @@ private:
 
 void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& 
rDestCol) const;
 
-void DeleteCells(
-sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, 
InsertDeleteFlags nDelFlag,
-sc::SingleColumnSpanSet& rDeleted );
+struct DeleteCellsResult
+{
+/** cell ranges that have been deleted. */
+sc::SingleColumnSpanSet aDeletedRows;
+/** formula cell range that has stopped listening. */
+std::vector> aFormulaRanges;
+
+DeleteCellsResult( const ScDocument& rDoc );
+DeleteCellsResult( const DeleteCellsResult& ) = delete;
+};
+
+std::unique_ptr DeleteCells(
+sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, 
InsertDeleteFlags nDelFlag );
 
 /**
  * Get all non-grouped formula cells and formula cell groups in the whole
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index b4552e792000..748e9c03c795 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1672,6 +1672,9 @@ public:
   SCCOL nCol2, SCROW nRow2, const ScMarkData& 
rMark, SCCOL nDx,
   SCROW& rClipStartRow, SCROW nClipEndRow);
 
+void StartListeningFromClip(
+sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt,
+SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
 void StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
  SCCOL nCol2, SCROW nRow2,
  const ScMarkData& rMark, InsertDeleteFlags 
nInsFlag );
diff --git a/sc/source/core/data/clipcontext.cxx 
b/sc/source/core/data/clipcontext.cxx
index 

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

2023-02-28 Thread Kohei Yoshida (via logerrit)
 sc/inc/clipcontext.hxx  |   15 +
 sc/inc/column.hxx   |   19 +---
 sc/inc/document.hxx |3 +
 sc/source/core/data/clipcontext.cxx |   47 ++
 sc/source/core/data/column3.cxx |   55 +---
 sc/source/core/data/column4.cxx |   18 +++
 sc/source/core/data/document.cxx|   31 +---
 7 files changed, 157 insertions(+), 31 deletions(-)

New commits:
commit 33b6c065a1629afd36c9ae0fe5daa18b972620e5
Author: Kohei Yoshida 
AuthorDate: Tue Feb 21 22:16:30 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Tue Feb 28 21:13:25 2023 +

tdf#153669: Track formulas that stopped listening ...

... then have them start listening again after the copy from
clipboard is complete.  Note that in case the pasted cells
are formula cells, those will be handled together as well.

Change-Id: Ia4be814b888734267a39f7c89435011968570b7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147940
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
(cherry picked from commit e83c243018c1c7f6662f9a8ecdc731c5c071ea31)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147912

diff --git a/sc/inc/clipcontext.hxx b/sc/inc/clipcontext.hxx
index b09e1be78761..b3ce874a6a7f 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 "columnspanset.hxx"
 #include "Sparkline.hxx"
 
 #include 
@@ -45,6 +46,9 @@ public:
 
 class SC_DLLPUBLIC CopyFromClipContext final : public ClipContextBase
 {
+/** Tracks modified formula group spans. */
+sc::ColumnSpanSet maListeningFormulaSpans;
+
 SCCOL mnDestCol1;
 SCCOL mnDestCol2;
 SCROW mnDestRow1;
@@ -101,6 +105,17 @@ public:
 void setDeleteFlag( InsertDeleteFlags nFlag );
 InsertDeleteFlags getDeleteFlag() const;
 
+/**
+ * Record a range of formula cells that need to start listening after the
+ * copy-from-clip is complete.
+ */
+void setListeningFormulaSpans( SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2 );
+
+/**
+ * Have the formula cells in the recorded ranges start listening.
+ */
+void startListeningFormulas();
+
 /**
  * Set the column size of a "single cell" row, which is used when copying
  * a single row of cells in a clip doc and pasting it into multiple
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 69f0d12d8273..949ca30dd137 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -22,6 +22,7 @@
 #include "global.hxx"
 #include "address.hxx"
 #include "cellvalue.hxx"
+#include "columnspanset.hxx"
 #include "rangelst.hxx"
 #include "types.hxx"
 #include "mtvelements.hxx"
@@ -48,8 +49,6 @@ class CopyFromClipContext;
 class CopyToClipContext;
 class CopyToDocContext;
 class MixDocContext;
-class ColumnSpanSet;
-class SingleColumnSpanSet;
 struct RefUpdateContext;
 struct RefUpdateInsertTabContext;
 struct RefUpdateDeleteTabContext;
@@ -837,9 +836,19 @@ private:
 
 void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& 
rDestCol) const;
 
-void DeleteCells(
-sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, 
InsertDeleteFlags nDelFlag,
-sc::SingleColumnSpanSet& rDeleted );
+struct DeleteCellsResult
+{
+/** cell ranges that have been deleted. */
+sc::SingleColumnSpanSet aDeletedRows;
+/** formula cell range that has stopped listening. */
+std::vector> aFormulaRanges;
+
+DeleteCellsResult( const ScDocument& rDoc );
+DeleteCellsResult( const DeleteCellsResult& ) = delete;
+};
+
+std::unique_ptr DeleteCells(
+sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, 
InsertDeleteFlags nDelFlag );
 
 /**
  * Get all non-grouped formula cells and formula cell groups in the whole
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 20e42a999ac8..4873307ea01d 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1672,6 +1672,9 @@ public:
   SCCOL nCol2, SCROW nRow2, const ScMarkData& 
rMark, SCCOL nDx,
   SCROW& rClipStartRow, SCROW nClipEndRow);
 
+void StartListeningFromClip(
+sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt,
+SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
 void StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
  SCCOL nCol2, SCROW nRow2,
  const ScMarkData& rMark, InsertDeleteFlags 
nInsFlag );
diff --git a/sc/source/core/data/clipcontext.cxx 
b/sc/source/core/data/clipcontext.cxx
index d291c7c91f49..ce6974d42334 100644
--- a/sc/source/core/data/clipcontext.cxx
+++ b/sc/source/core/data/clipcontext.cxx
@@ -21,6 +21,7 @@
 #include 
 

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

2023-02-27 Thread Kohei Yoshida (via logerrit)
 sc/inc/clipcontext.hxx  |   15 +
 sc/inc/column.hxx   |   19 +---
 sc/inc/document.hxx |3 +
 sc/source/core/data/clipcontext.cxx |   47 ++
 sc/source/core/data/column3.cxx |   55 +---
 sc/source/core/data/column4.cxx |   18 +++
 sc/source/core/data/document.cxx|   31 +---
 7 files changed, 157 insertions(+), 31 deletions(-)

New commits:
commit e83c243018c1c7f6662f9a8ecdc731c5c071ea31
Author: Kohei Yoshida 
AuthorDate: Tue Feb 21 22:16:30 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Tue Feb 28 03:46:24 2023 +

tdf#153669: Track formulas that stopped listening ...

... then have them start listening again after the copy from
clipboard is complete.  Note that in case the pasted cells
are formula cells, those will be handled together as well.

Change-Id: Ia4be814b888734267a39f7c89435011968570b7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147940
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/inc/clipcontext.hxx b/sc/inc/clipcontext.hxx
index b09e1be78761..b3ce874a6a7f 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 "columnspanset.hxx"
 #include "Sparkline.hxx"
 
 #include 
@@ -45,6 +46,9 @@ public:
 
 class SC_DLLPUBLIC CopyFromClipContext final : public ClipContextBase
 {
+/** Tracks modified formula group spans. */
+sc::ColumnSpanSet maListeningFormulaSpans;
+
 SCCOL mnDestCol1;
 SCCOL mnDestCol2;
 SCROW mnDestRow1;
@@ -101,6 +105,17 @@ public:
 void setDeleteFlag( InsertDeleteFlags nFlag );
 InsertDeleteFlags getDeleteFlag() const;
 
+/**
+ * Record a range of formula cells that need to start listening after the
+ * copy-from-clip is complete.
+ */
+void setListeningFormulaSpans( SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2 );
+
+/**
+ * Have the formula cells in the recorded ranges start listening.
+ */
+void startListeningFormulas();
+
 /**
  * Set the column size of a "single cell" row, which is used when copying
  * a single row of cells in a clip doc and pasting it into multiple
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 69f0d12d8273..949ca30dd137 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -22,6 +22,7 @@
 #include "global.hxx"
 #include "address.hxx"
 #include "cellvalue.hxx"
+#include "columnspanset.hxx"
 #include "rangelst.hxx"
 #include "types.hxx"
 #include "mtvelements.hxx"
@@ -48,8 +49,6 @@ class CopyFromClipContext;
 class CopyToClipContext;
 class CopyToDocContext;
 class MixDocContext;
-class ColumnSpanSet;
-class SingleColumnSpanSet;
 struct RefUpdateContext;
 struct RefUpdateInsertTabContext;
 struct RefUpdateDeleteTabContext;
@@ -837,9 +836,19 @@ private:
 
 void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& 
rDestCol) const;
 
-void DeleteCells(
-sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, 
InsertDeleteFlags nDelFlag,
-sc::SingleColumnSpanSet& rDeleted );
+struct DeleteCellsResult
+{
+/** cell ranges that have been deleted. */
+sc::SingleColumnSpanSet aDeletedRows;
+/** formula cell range that has stopped listening. */
+std::vector> aFormulaRanges;
+
+DeleteCellsResult( const ScDocument& rDoc );
+DeleteCellsResult( const DeleteCellsResult& ) = delete;
+};
+
+std::unique_ptr DeleteCells(
+sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, 
InsertDeleteFlags nDelFlag );
 
 /**
  * Get all non-grouped formula cells and formula cell groups in the whole
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index c6b2f2289ddb..092d9ba0d9a9 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1672,6 +1672,9 @@ public:
   SCCOL nCol2, SCROW nRow2, const ScMarkData& 
rMark, SCCOL nDx,
   SCROW& rClipStartRow, SCROW nClipEndRow);
 
+void StartListeningFromClip(
+sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt,
+SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
 void StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
  SCCOL nCol2, SCROW nRow2,
  const ScMarkData& rMark, InsertDeleteFlags 
nInsFlag );
diff --git a/sc/source/core/data/clipcontext.cxx 
b/sc/source/core/data/clipcontext.cxx
index d291c7c91f49..ce6974d42334 100644
--- a/sc/source/core/data/clipcontext.cxx
+++ b/sc/source/core/data/clipcontext.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace sc {
 
@@ -113,6 +114,52 @@ InsertDeleteFlags CopyFromClipContext::getDeleteFlag() 
const

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

2023-02-14 Thread Kohei Yoshida (via logerrit)
 sc/source/filter/orcus/interface.cxx |  157 +++
 1 file changed, 50 insertions(+), 107 deletions(-)

New commits:
commit 99bad52f534b0f9e5aebcf0a65e1787ac9f09d94
Author: Kohei Yoshida 
AuthorDate: Tue Feb 14 21:30:45 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Wed Feb 15 03:14:03 2023 +

Switch to static rules table and add a few more entries

Hopefully it's easier to add new rules.

Change-Id: I893ea5de5bcc5535f2f49a682de33ff2fcfffd48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147035
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index 7e283e89e119..e53d2d004e95 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace com::sun::star;
 
@@ -99,113 +100,55 @@ void ScOrcusGlobalSettings::set_origin_date(int year, int 
month, int day)
 
 void ScOrcusGlobalSettings::set_character_set(orcus::character_set_t cs)
 {
-switch (cs)
-{
-case orcus::character_set_t::big5:
-mnTextEncoding = RTL_TEXTENCODING_BIG5;
-break;
-case orcus::character_set_t::euc_jp:
-mnTextEncoding = RTL_TEXTENCODING_EUC_JP;
-break;
-case orcus::character_set_t::euc_kr:
-mnTextEncoding = RTL_TEXTENCODING_EUC_KR;
-break;
-case orcus::character_set_t::gb2312:
-mnTextEncoding = RTL_TEXTENCODING_GB_2312;
-break;
-case orcus::character_set_t::gbk:
-mnTextEncoding = RTL_TEXTENCODING_GBK;
-break;
-case orcus::character_set_t::iso_8859_1:
-case orcus::character_set_t::iso_8859_1_windows_3_0_latin_1:
-case orcus::character_set_t::iso_8859_1_windows_3_1_latin_1:
-mnTextEncoding = RTL_TEXTENCODING_ISO_8859_1;
-break;
-case orcus::character_set_t::iso_8859_2:
-case orcus::character_set_t::iso_8859_2_windows_latin_2:
-mnTextEncoding = RTL_TEXTENCODING_ISO_8859_2;
-break;
-case orcus::character_set_t::iso_8859_3:
-mnTextEncoding = RTL_TEXTENCODING_ISO_8859_3;
-break;
-case orcus::character_set_t::iso_8859_4:
-mnTextEncoding = RTL_TEXTENCODING_ISO_8859_4;
-break;
-case orcus::character_set_t::iso_8859_5:
-mnTextEncoding = RTL_TEXTENCODING_ISO_8859_5;
-break;
-case orcus::character_set_t::iso_8859_6:
-case orcus::character_set_t::iso_8859_6_e:
-case orcus::character_set_t::iso_8859_6_i:
-mnTextEncoding = RTL_TEXTENCODING_ISO_8859_6;
-break;
-case orcus::character_set_t::iso_8859_7:
-mnTextEncoding = RTL_TEXTENCODING_ISO_8859_7;
-break;
-case orcus::character_set_t::iso_8859_8:
-case orcus::character_set_t::iso_8859_8_e:
-case orcus::character_set_t::iso_8859_8_i:
-mnTextEncoding = RTL_TEXTENCODING_ISO_8859_8;
-break;
-case orcus::character_set_t::iso_8859_9:
-case orcus::character_set_t::iso_8859_9_windows_latin_5:
-mnTextEncoding = RTL_TEXTENCODING_ISO_8859_9;
-break;
-case orcus::character_set_t::iso_8859_14:
-mnTextEncoding = RTL_TEXTENCODING_ISO_8859_14;
-break;
-case orcus::character_set_t::iso_8859_15:
-mnTextEncoding = RTL_TEXTENCODING_ISO_8859_15;
-break;
-case orcus::character_set_t::iso_2022_jp:
-case orcus::character_set_t::iso_2022_jp_2:
-mnTextEncoding = RTL_TEXTENCODING_ISO_2022_JP;
-break;
-case orcus::character_set_t::jis_x0201:
-mnTextEncoding = RTL_TEXTENCODING_JIS_X_0201;
-break;
-case orcus::character_set_t::shift_jis:
-mnTextEncoding = RTL_TEXTENCODING_SHIFT_JIS;
-break;
-case orcus::character_set_t::us_ascii:
-mnTextEncoding = RTL_TEXTENCODING_ASCII_US;
-break;
-case orcus::character_set_t::utf_7:
-mnTextEncoding = RTL_TEXTENCODING_UTF7;
-break;
-case orcus::character_set_t::utf_8:
-mnTextEncoding = RTL_TEXTENCODING_UTF8;
-break;
-case orcus::character_set_t::windows_1250:
-mnTextEncoding = RTL_TEXTENCODING_MS_1250;
-break;
-case orcus::character_set_t::windows_1251:
-mnTextEncoding = RTL_TEXTENCODING_MS_1251;
-break;
-case orcus::character_set_t::windows_1252:
-mnTextEncoding = RTL_TEXTENCODING_MS_1252;
-break;
-case orcus::character_set_t::windows_1253:
-mnTextEncoding = RTL_TEXTENCODING_MS_1253;
-break;
-case 

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

2023-02-14 Thread Kohei Yoshida (via logerrit)
 sc/source/filter/orcus/interface.cxx |   41 +++
 1 file changed, 41 insertions(+)

New commits:
commit e5b55f8e05f0f3172340ee377c7dabfb714dd66c
Author: Kohei Yoshida 
AuthorDate: Tue Feb 14 19:53:58 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Wed Feb 15 03:13:45 2023 +

tdf#153444: map iso-8859-* encoding range

Change-Id: I6eed711e788955f17c7b8a40db77370e0dc57213
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147033
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index 2cee042305b2..7e283e89e119 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -116,6 +116,47 @@ void 
ScOrcusGlobalSettings::set_character_set(orcus::character_set_t cs)
 case orcus::character_set_t::gbk:
 mnTextEncoding = RTL_TEXTENCODING_GBK;
 break;
+case orcus::character_set_t::iso_8859_1:
+case orcus::character_set_t::iso_8859_1_windows_3_0_latin_1:
+case orcus::character_set_t::iso_8859_1_windows_3_1_latin_1:
+mnTextEncoding = RTL_TEXTENCODING_ISO_8859_1;
+break;
+case orcus::character_set_t::iso_8859_2:
+case orcus::character_set_t::iso_8859_2_windows_latin_2:
+mnTextEncoding = RTL_TEXTENCODING_ISO_8859_2;
+break;
+case orcus::character_set_t::iso_8859_3:
+mnTextEncoding = RTL_TEXTENCODING_ISO_8859_3;
+break;
+case orcus::character_set_t::iso_8859_4:
+mnTextEncoding = RTL_TEXTENCODING_ISO_8859_4;
+break;
+case orcus::character_set_t::iso_8859_5:
+mnTextEncoding = RTL_TEXTENCODING_ISO_8859_5;
+break;
+case orcus::character_set_t::iso_8859_6:
+case orcus::character_set_t::iso_8859_6_e:
+case orcus::character_set_t::iso_8859_6_i:
+mnTextEncoding = RTL_TEXTENCODING_ISO_8859_6;
+break;
+case orcus::character_set_t::iso_8859_7:
+mnTextEncoding = RTL_TEXTENCODING_ISO_8859_7;
+break;
+case orcus::character_set_t::iso_8859_8:
+case orcus::character_set_t::iso_8859_8_e:
+case orcus::character_set_t::iso_8859_8_i:
+mnTextEncoding = RTL_TEXTENCODING_ISO_8859_8;
+break;
+case orcus::character_set_t::iso_8859_9:
+case orcus::character_set_t::iso_8859_9_windows_latin_5:
+mnTextEncoding = RTL_TEXTENCODING_ISO_8859_9;
+break;
+case orcus::character_set_t::iso_8859_14:
+mnTextEncoding = RTL_TEXTENCODING_ISO_8859_14;
+break;
+case orcus::character_set_t::iso_8859_15:
+mnTextEncoding = RTL_TEXTENCODING_ISO_8859_15;
+break;
 case orcus::character_set_t::iso_2022_jp:
 case orcus::character_set_t::iso_2022_jp_2:
 mnTextEncoding = RTL_TEXTENCODING_ISO_2022_JP;


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

2023-02-14 Thread Kohei Yoshida (via logerrit)
 sc/source/ui/xmlsource/xmlsourcedlg.cxx |   34 
 1 file changed, 18 insertions(+), 16 deletions(-)

New commits:
commit bad4f41a69fe3fb08191b839f0c9389683685855
Author: Kohei Yoshida 
AuthorDate: Mon Feb 13 22:12:59 2023 -0500
Commit: Xisco Fauli 
CommitDate: Tue Feb 14 20:14:49 2023 +

tdf#153604: include the root element when traversing the tree

Change-Id: I35098e687eea832c075f68861e04be7b492ed25e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146966
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
(cherry picked from commit 4d9a8f07b77917b0756dc2d8d8082c6e63e560a2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146982

diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx 
b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 902c8c0a0bec..663db63475d8 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -448,31 +448,33 @@ void getFieldLinks(
 ScOrcusImportXMLParam::RangeLink& rRangeLink, std::vector& 
rNamespaces,
 const weld::TreeView& rTree, const weld::TreeIter& rEntry)
 {
+OUString aPath = getXPath(rTree, rEntry, rNamespaces);
+const ScOrcusXMLTreeParam::EntryData* pUserData = 
ScOrcusXMLTreeParam::getUserData(rTree, rEntry);
+
+if (pUserData)
+{
+if (pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat)
+// nested repeat element automatically becomes a row-group node.
+rRangeLink.maRowGroups.push_back(
+OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
+
+if (pUserData->mbLeafNode && !aPath.isEmpty())
+// XPath should never be empty anyway, but it won't hurt to 
check...
+rRangeLink.maFieldPaths.push_back(OUStringToOString(aPath, 
RTL_TEXTENCODING_UTF8));
+}
+
 std::unique_ptr xChild(rTree.make_iterator());
+
 if (!rTree.iter_children(*xChild))
 // No more children.  We're done.
 return;
 
 do
 {
-OUString aPath = getXPath(rTree, *xChild, rNamespaces);
-const ScOrcusXMLTreeParam::EntryData* pUserData = 
ScOrcusXMLTreeParam::getUserData(rTree, *xChild);
-
-if (pUserData)
-{
-if (pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat)
-// nested repeat element automatically becomes a row-group 
node.
-rRangeLink.maRowGroups.push_back(
-OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
-
-if (pUserData->mbLeafNode && !aPath.isEmpty())
-// XPath should never be empty anyway, but it won't hurt to 
check...
-rRangeLink.maFieldPaths.push_back(OUStringToOString(aPath, 
RTL_TEXTENCODING_UTF8));
-}
-
 // Walk recursively.
 getFieldLinks(rRangeLink, rNamespaces, rTree, *xChild);
-} while (rTree.iter_next_sibling(*xChild));
+}
+while (rTree.iter_next_sibling(*xChild));
 }
 
 void removeDuplicates(std::vector& rArray)


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

2023-02-13 Thread Kohei Yoshida (via logerrit)
 sc/source/ui/xmlsource/xmlsourcedlg.cxx |   34 
 1 file changed, 18 insertions(+), 16 deletions(-)

New commits:
commit 4d9a8f07b77917b0756dc2d8d8082c6e63e560a2
Author: Kohei Yoshida 
AuthorDate: Mon Feb 13 22:12:59 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Tue Feb 14 04:09:44 2023 +

tdf#153604: include the root element when traversing the tree

Change-Id: I35098e687eea832c075f68861e04be7b492ed25e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146966
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx 
b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 902c8c0a0bec..663db63475d8 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -448,31 +448,33 @@ void getFieldLinks(
 ScOrcusImportXMLParam::RangeLink& rRangeLink, std::vector& 
rNamespaces,
 const weld::TreeView& rTree, const weld::TreeIter& rEntry)
 {
+OUString aPath = getXPath(rTree, rEntry, rNamespaces);
+const ScOrcusXMLTreeParam::EntryData* pUserData = 
ScOrcusXMLTreeParam::getUserData(rTree, rEntry);
+
+if (pUserData)
+{
+if (pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat)
+// nested repeat element automatically becomes a row-group node.
+rRangeLink.maRowGroups.push_back(
+OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
+
+if (pUserData->mbLeafNode && !aPath.isEmpty())
+// XPath should never be empty anyway, but it won't hurt to 
check...
+rRangeLink.maFieldPaths.push_back(OUStringToOString(aPath, 
RTL_TEXTENCODING_UTF8));
+}
+
 std::unique_ptr xChild(rTree.make_iterator());
+
 if (!rTree.iter_children(*xChild))
 // No more children.  We're done.
 return;
 
 do
 {
-OUString aPath = getXPath(rTree, *xChild, rNamespaces);
-const ScOrcusXMLTreeParam::EntryData* pUserData = 
ScOrcusXMLTreeParam::getUserData(rTree, *xChild);
-
-if (pUserData)
-{
-if (pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat)
-// nested repeat element automatically becomes a row-group 
node.
-rRangeLink.maRowGroups.push_back(
-OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
-
-if (pUserData->mbLeafNode && !aPath.isEmpty())
-// XPath should never be empty anyway, but it won't hurt to 
check...
-rRangeLink.maFieldPaths.push_back(OUStringToOString(aPath, 
RTL_TEXTENCODING_UTF8));
-}
-
 // Walk recursively.
 getFieldLinks(rRangeLink, rNamespaces, rTree, *xChild);
-} while (rTree.iter_next_sibling(*xChild));
+}
+while (rTree.iter_next_sibling(*xChild));
 }
 
 void removeDuplicates(std::vector& rArray)


[Libreoffice-commits] core.git: download.lst external/liborcus

2023-02-11 Thread Kohei Yoshida (via logerrit)
 download.lst|4 
 external/liborcus/ExternalProject_liborcus.mk   |2 
 external/liborcus/UnpackedTarball_liborcus.mk   |2 
 external/liborcus/bugfix-0.18.0-unset-border-colors.patch.1 |  236 
 external/liborcus/liborcus-no-benchmark.patch.1 |   19 
 5 files changed, 4 insertions(+), 259 deletions(-)

New commits:
commit 3c988ef450b809767ca7f897c59041758af53f4b
Author: Kohei Yoshida 
AuthorDate: Sat Feb 11 17:05:45 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Sat Feb 11 23:04:29 2023 +

Update liborcus to 0.18.1

Change-Id: I0439640789e59e4dd6e92d7f2975538de2f42f53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146826
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index 0f42585bb7c8..4b8e212456e2 100644
--- a/download.lst
+++ b/download.lst
@@ -423,8 +423,8 @@ OPENSSL_TARBALL := openssl-3.0.8.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-ORCUS_SHA256SUM := 
0a8c55a227f13dbda08da8a1f6e18f27ba873da55a2cdd23bd0825989d1abff8
-ORCUS_TARBALL := liborcus-0.18.0.tar.xz
+ORCUS_SHA256SUM := 
6006b9f1576315e313df715a7e72a17f3e0b17d7b6bd119cfa8a0b608ce971eb
+ORCUS_TARBALL := liborcus-0.18.1.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/liborcus/ExternalProject_liborcus.mk 
b/external/liborcus/ExternalProject_liborcus.mk
index b07df31a34d0..7f2e5f24083f 100644
--- a/external/liborcus/ExternalProject_liborcus.mk
+++ b/external/liborcus/ExternalProject_liborcus.mk
@@ -99,6 +99,8 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
$(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
--disable-spreadsheet-model \
--without-tools \
+   --without-benchmark \
+   --without-doc-example \
--disable-python \
--disable-werror \
$(if $(filter 
MACOSX,$(OS)),--prefix=/@.__OOO)
 \
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 48b7fb4743e9..ca4a40acf4e5 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -21,8 +21,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/libtool.patch.0 \
external/liborcus/fix-pch.patch.0 \
external/liborcus/liborcus_newline.patch.1 \
-   external/liborcus/liborcus-no-benchmark.patch.1 \
-   external/liborcus/bugfix-0.18.0-unset-border-colors.patch.1 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/bugfix-0.18.0-unset-border-colors.patch.1 
b/external/liborcus/bugfix-0.18.0-unset-border-colors.patch.1
deleted file mode 100644
index 5b8a04069e99..
--- a/external/liborcus/bugfix-0.18.0-unset-border-colors.patch.1
+++ /dev/null
@@ -1,236 +0,0 @@
-diff --git a/src/liborcus/xls_xml_context.cpp 
b/src/liborcus/xls_xml_context.cpp
-index 85916fc7..739678ee 100644
 a/src/liborcus/xls_xml_context.cpp
-+++ b/src/liborcus/xls_xml_context.cpp
-@@ -1292,7 +1292,7 @@ void xls_xml_context::start_element_border(const 
xml_token_attrs_t& attrs)
- {
- ss::border_direction_t dir = ss::border_direction_t::unknown;
- ss::border_style_t style = ss::border_style_t::unknown;
--ss::color_rgb_t color;
-+std::optional color;
- long weight = 0;
- 
- for (const xml_token_attr_t& attr : attrs)
-@@ -1950,8 +1950,14 @@ void xls_xml_context::commit_default_style()
- {
- for (const border_style_type& b : m_default_style->borders)
- {
--border_style->set_style(b.dir, b.style);
--border_style->set_color(b.dir, 255, b.color.red, b.color.green, 
b.color.blue);
-+if (b.dir == ss::border_direction_t::unknown)
-+continue;
-+
-+if (b.style != ss::border_style_t::unknown)
-+border_style->set_style(b.dir, b.style);
-+
-+if (b.color)
-+border_style->set_color(b.dir, 255, b.color->red, 
b.color->green, b.color->blue);
- }
- }
- 
-@@ -2109,8 +2115,14 @@ void xls_xml_context::commit_styles()
- 
- for (const border_style_type& b : style->borders)
- {
--border_style->set_style(b.dir, b.style);
--border_style->set_color(b.dir, 255, b.color.red, 
b.color.green, b.color.blue);
-+if (b.dir == ss::border_direction_t::unknown)
-+continue;
-+
-+if (b.style != ss::border_style_t::unknown)
-+border_style->set_style(b.dir, b.style);
-+
-+if (b.color)
-+border_style->set_color(b.dir, 255, b.color->red, 

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

2023-01-26 Thread Kohei Yoshida (via logerrit)
 sc/source/filter/orcus/interface.cxx |   18 ++
 1 file changed, 18 insertions(+)

New commits:
commit edcfb4632a514c5595540d69f7b217b4a12bac5c
Author: Kohei Yoshida 
AuthorDate: Thu Jan 26 21:52:01 2023 -0500
Commit: Noel Grandin 
CommitDate: Fri Jan 27 07:29:58 2023 +

tdf#146260: Add more mapping rules on character encoding

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

diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index 1563a46f6299..2cee042305b2 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -101,6 +101,21 @@ void 
ScOrcusGlobalSettings::set_character_set(orcus::character_set_t cs)
 {
 switch (cs)
 {
+case orcus::character_set_t::big5:
+mnTextEncoding = RTL_TEXTENCODING_BIG5;
+break;
+case orcus::character_set_t::euc_jp:
+mnTextEncoding = RTL_TEXTENCODING_EUC_JP;
+break;
+case orcus::character_set_t::euc_kr:
+mnTextEncoding = RTL_TEXTENCODING_EUC_KR;
+break;
+case orcus::character_set_t::gb2312:
+mnTextEncoding = RTL_TEXTENCODING_GB_2312;
+break;
+case orcus::character_set_t::gbk:
+mnTextEncoding = RTL_TEXTENCODING_GBK;
+break;
 case orcus::character_set_t::iso_2022_jp:
 case orcus::character_set_t::iso_2022_jp_2:
 mnTextEncoding = RTL_TEXTENCODING_ISO_2022_JP;
@@ -117,6 +132,9 @@ void 
ScOrcusGlobalSettings::set_character_set(orcus::character_set_t cs)
 case orcus::character_set_t::utf_7:
 mnTextEncoding = RTL_TEXTENCODING_UTF7;
 break;
+case orcus::character_set_t::utf_8:
+mnTextEncoding = RTL_TEXTENCODING_UTF8;
+break;
 case orcus::character_set_t::windows_1250:
 mnTextEncoding = RTL_TEXTENCODING_MS_1250;
 break;


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

2023-01-26 Thread Kohei Yoshida (via logerrit)
 sc/qa/unit/data/xml/wrap-and-shrink.xml |   82 
 sc/qa/unit/subsequent_filters_test2.cxx |   34 +
 sc/source/filter/orcus/interface.cxx|6 ++
 3 files changed, 122 insertions(+)

New commits:
commit 14c0efccba84a002050d081c961bb0b6e90b009f
Author: Kohei Yoshida 
AuthorDate: Thu Jan 26 19:41:16 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Fri Jan 27 01:38:03 2023 +

tdf#147620: Pick up wrap-text and shrink-to-fit flags in Excel 2003 XML

Change-Id: I8afd0522b441a90b431ff433ff87e0c095c8cb95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146222
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/qa/unit/data/xml/wrap-and-shrink.xml 
b/sc/qa/unit/data/xml/wrap-and-shrink.xml
new file mode 100644
index ..429110c64399
--- /dev/null
+++ b/sc/qa/unit/data/xml/wrap-and-shrink.xml
@@ -0,0 +1,82 @@
+
+
+http://www.w3.org/TR/REC-html40;>
+ 
+  Kohei Yoshida
+  Kohei Yoshida
+  2022-05-18T00:46:32Z
+  2022-05-18T01:44:54Z
+  16.00
+ 
+ 
+  
+ 
+ 
+  15990
+  29040
+  32767
+  32767
+  False
+  False
+ 
+ 
+  
+   
+   
+   
+   
+   
+   
+  
+  
+   
+  
+  
+   
+  
+ 
+ 
+  
+   
+   
+   
+Default
+Text long enough to spill over
+   
+   
+Wrap text
+Text long enough to spill 
over
+   
+   
+Shrink to fit
+Text long enough to spill 
over
+   
+  
+  
+   
+
+
+
+   
+   
+
+0
+   
+   
+   
+
+ 3
+ 9
+ 14
+
+   
+   False
+   False
+  
+ 
+
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index da79b48af6b5..56e5e85ecdf6 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -153,6 +153,7 @@ public:
 void testHiddenRowsColumnsXLSXML();
 void testColumnWidthRowHeightXLSXML();
 void testCharacterSetXLSXML();
+void testWrapAndShrinkXLSXML();
 void testTdf137091();
 void testTdf141495();
 void testTdf70455();
@@ -272,6 +273,7 @@ public:
 CPPUNIT_TEST(testHiddenRowsColumnsXLSXML);
 CPPUNIT_TEST(testColumnWidthRowHeightXLSXML);
 CPPUNIT_TEST(testCharacterSetXLSXML);
+CPPUNIT_TEST(testWrapAndShrinkXLSXML);
 CPPUNIT_TEST(testCondFormatFormulaListenerXLSX);
 CPPUNIT_TEST(testTdf137091);
 CPPUNIT_TEST(testTdf141495);
@@ -1986,6 +1988,38 @@ void ScFiltersTest2::testCharacterSetXLSXML()
 CPPUNIT_ASSERT_EQUAL(aExpected, aVal);
 }
 
+void ScFiltersTest2::testWrapAndShrinkXLSXML()
+{
+createScDoc("xml/wrap-and-shrink.xml");
+ScDocument* pDoc = getScDoc();
+
+CPPUNIT_ASSERT_EQUAL(SCTAB(1), pDoc->GetTableCount());
+
+struct Check
+{
+SCCOL nCol;
+SCROW nRow;
+
+bool bWrapText;
+bool bShrinkToFit;
+};
+
+constexpr Check aChecks[] = {
+{ 1, 0, false, false },
+{ 1, 1, true, false },
+{ 1, 2, false, true },
+};
+
+for (const auto& rC : aChecks)
+{
+const ScLineBreakCell* pLB = pDoc->GetAttr(rC.nCol, rC.nRow, 0, 
ATTR_LINEBREAK);
+CPPUNIT_ASSERT_EQUAL(pLB->GetValue(), rC.bWrapText);
+
+const ScShrinkToFitCell* pSTF = pDoc->GetAttr(rC.nCol, rC.nRow, 0, 
ATTR_SHRINKTOFIT);
+CPPUNIT_ASSERT_EQUAL(pSTF->GetValue(), rC.bShrinkToFit);
+}
+}
+
 void ScFiltersTest2::testCondFormatXLSB()
 {
 createScDoc("xlsb/cond_format.xlsb");
diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index a26beeb5a19c..1563a46f6299 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -2258,6 +2258,12 @@ void ScOrcusStyles::applyXfToItemSet( SfxItemSet& rSet, 
const ScOrcusXf& rXf )
 rSet.Put(SvxJustifyMethodItem(rXf.meHorAlignMethod, 
ATTR_HOR_JUSTIFY_METHOD));
 rSet.Put(SvxJustifyMethodItem(rXf.meVerAlignMethod, 
ATTR_VER_JUSTIFY_METHOD));
 }
+
+if (rXf.mbWrapText)
+rSet.Put(ScLineBreakCell(*rXf.mbWrapText));
+
+if (rXf.mbShrinkToFit)
+rSet.Put(ScShrinkToFitCell(*rXf.mbShrinkToFit));
 }
 
 void ScOrcusStyles::applyXfToItemSet( SfxItemSet& rSet, std::size_t xfId )


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

 external/liborcus/UnpackedTarball_liborcus.mk |1 
 external/liborcus/std-get-busted.patch.1  |  418 --
 2 files changed, 419 deletions(-)

New commits:
commit 27653feb30911d0f1dfe14ff0cb5373d4c87bcdd
Author: Kohei Yoshida 
AuthorDate: Wed Jan 25 22:09:55 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Thu Jan 26 13:52:54 2023 +

Just use std::variant and std::get

Change-Id: If467225fae07a9d33e324cac9ff32300d6c56534
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146151
Tested-by: Kohei Yoshida 
Reviewed-by: Kohei Yoshida 

diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 5b1f542a4cb9..48b7fb4743e9 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -21,7 +21,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/libtool.patch.0 \
external/liborcus/fix-pch.patch.0 \
external/liborcus/liborcus_newline.patch.1 \
-   external/liborcus/std-get-busted.patch.1 \
external/liborcus/liborcus-no-benchmark.patch.1 \
external/liborcus/bugfix-0.18.0-unset-border-colors.patch.1 \
 ))
diff --git a/external/liborcus/std-get-busted.patch.1 
b/external/liborcus/std-get-busted.patch.1
deleted file mode 100644
index e0158114f227..
--- a/external/liborcus/std-get-busted.patch.1
+++ /dev/null
@@ -1,418 +0,0 @@
-From f917ed284c52ae12fb0d752c17141f355158470e Mon Sep 17 00:00:00 2001
-From: Kohei Yoshida 
-Date: Tue, 2 Nov 2021 22:07:51 -0400
-Subject: [PATCH] std::get(...) may be flaky with some version of clang.
-
-As workaround, use boost::variant and boost::get.
-
-c.f. 
https://stackoverflow.com/questions/52521388/stdvariantget-does-not-compile-with-apple-llvm-10-0

- include/orcus/config.hpp|  4 ++--
- include/orcus/css_selector.hpp  |  5 +++--
- include/orcus/json_parser_thread.hpp|  4 ++--
- include/orcus/sax_token_parser_thread.hpp   |  5 +++--
- include/orcus/spreadsheet/pivot.hpp |  7 ---
- include/orcus/threaded_json_parser.hpp  |  8 
- include/orcus/threaded_sax_token_parser.hpp |  8 
- src/liborcus/css_document_tree.cpp  |  2 +-
- src/liborcus/css_selector.cpp   | 12 ++--
- src/liborcus/orcus_csv.cpp  |  4 ++--
- src/orcus_csv_main.cpp  |  2 +-
- src/orcus_test_csv.cpp  |  8 
- src/orcus_test_xlsx.cpp |  4 ++--
- src/parser/json_parser_thread.cpp   |  8 
- src/python/sheet_rows.cpp   |  3 +++
- 15 files changed, 45 insertions(+), 39 deletions(-)
-
-diff --git a/include/orcus/config.hpp b/include/orcus/config.hpp
-index 17743e6a..fe9a7d81 100644
 a/include/orcus/config.hpp
-+++ b/include/orcus/config.hpp
-@@ -12,7 +12,7 @@
- #include "orcus/types.hpp"
-
- #include 
--#include 
-+#include 
-
- namespace orcus {
-
-@@ -37,7 +37,7 @@ struct ORCUS_DLLPUBLIC config
- };
-
- // TODO: add config for other formats as needed.
--using data_type = std::variant;
-+using data_type = boost::variant;
-
- /**
-  * Enable or disable runtime debug output to stdout or stderr.
-diff --git a/include/orcus/css_selector.hpp b/include/orcus/css_selector.hpp
-index 1e41d544..dafeddf5 100644
 a/include/orcus/css_selector.hpp
-+++ b/include/orcus/css_selector.hpp
-@@ -12,11 +12,12 @@
- #include "css_types.hpp"
-
- #include 
--#include 
- #include 
- #include 
- #include 
-
-+#include 
-+
- namespace orcus {
-
- struct ORCUS_DLLPUBLIC css_simple_selector_t
-@@ -73,7 +74,7 @@ struct ORCUS_DLLPUBLIC css_selector_t
-  */
- struct ORCUS_DLLPUBLIC css_property_value_t
- {
--using value_type = std::variant;
-+using value_type = boost::variant;
-
- css::property_value_t type;
- value_type value;
-diff --git a/include/orcus/json_parser_thread.hpp 
b/include/orcus/json_parser_thread.hpp
-index 8328ef11..565008da 100644
 a/include/orcus/json_parser_thread.hpp
-+++ b/include/orcus/json_parser_thread.hpp
-@@ -14,7 +14,7 @@
- #include 
- #include 
- #include 
--#include 
-+#include 
-
- namespace orcus {
-
-@@ -47,7 +47,7 @@ enum class parse_token_t
-
- struct ORCUS_PSR_DLLPUBLIC parse_token
- {
--using value_type = std::variant;
-+using value_type = boost::variant;
-
- parse_token_t type;
- value_type value;
-diff --git a/include/orcus/sax_token_parser_thread.hpp 
b/include/orcus/sax_token_parser_thread.hpp
-index b3645735..e0842013 100644
 a/include/orcus/sax_token_parser_thread.hpp
-+++ b/include/orcus/sax_token_parser_thread.hpp
-@@ -12,10 +12,11 @@
- #include "types.hpp"
-
- #include 
--#include 
- #include 
- #include 
-
-+#include 
-+
- namespace orcus {
-
- class tokens;
-@@ -36,7 +37,7 @@ enum class parse_token_t
-
- struct ORCUS_PSR_DLLPUBLIC parse_token
- {
--using value_type = 

[Libreoffice-commits] core.git: configure.ac cui/source download.lst external/liborcus external/mdds RepositoryExternal.mk sc/inc sc/qa sc/source svl/source

 RepositoryExternal.mk   |4 
 configure.ac|4 
 cui/source/dialogs/AdditionsDialog.cxx  |2 
 download.lst|8 
 external/liborcus/ExternalPackage_liborcus.mk   |8 
 external/liborcus/ExternalProject_liborcus.mk   |4 
 external/liborcus/Library_orcus.mk  |   21 
 external/liborcus/UnpackedTarball_liborcus.mk   |   21 
 external/liborcus/bugfix-0.18.0-unset-border-colors.patch.1 |  236 +++
 external/liborcus/forcepoint-83.patch.1 |   38 
 external/liborcus/forcepoint-84.patch.1 |   38 
 external/liborcus/forcepoint-87.patch.1 |   27 
 external/liborcus/forcepoint-88.patch.1 |   42 
 external/liborcus/forcepoint-95.patch.1 |   11 
 external/liborcus/gcc9.patch.0  |   17 
 external/liborcus/inc/pch/precompiled_orcus-parser.hxx  |8 
 external/liborcus/inc/pch/precompiled_orcus.hxx |9 
 external/liborcus/include.patch.0   |   20 
 external/liborcus/liborcus-no-benchmark.patch.1 |8 
 external/liborcus/overrun.patch.0   |   63 
 external/liborcus/std-get-busted.patch.1|   88 -
 external/mdds/UnpackedTarball_mdds.mk   |2 
 external/mdds/speedup-erase-2.patch |   18 
 external/mdds/speedup-erase-begin.patch |  140 -
 sc/inc/mtvelements.hxx  |   43 
 sc/qa/unit/helper/csv_handler.hxx   |   27 
 sc/qa/unit/helper/qahelper.cxx  |8 
 sc/source/core/tool/scmatrix.cxx|   13 
 sc/source/filter/html/htmlpars.cxx  |   74 
 sc/source/filter/inc/orcusinterface.hxx |  431 +++--
 sc/source/filter/orcus/filterdetect.cxx |3 
 sc/source/filter/orcus/interface.cxx|  893 +++-
 sc/source/filter/orcus/xmlcontext.cxx   |   37 
 sc/source/ui/dataprovider/csvdataprovider.cxx   |8 
 sc/source/ui/docshell/datastream.cxx|   10 
 svl/source/misc/gridprinter.cxx |7 
 36 files changed, 1242 insertions(+), 1149 deletions(-)

New commits:
commit 516bc904e94971b61e4b13af632bf321b0a4a640
Author: Kohei Yoshida 
AuthorDate: Tue Jan 17 17:10:07 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Thu Jan 26 02:27:57 2023 +

Upgrade mdds and orcus to 2.1.0 and 0.18.0, respectively

Change-Id: I288b5b54bd07d951bcc68afda7514bde730193dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146107
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 92ea4ba17670..0f7c77f443d6 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3306,7 +3306,7 @@ $(call gb_LinkTarget_set_include,$(1),\
 )
 
 $(call gb_LinkTarget_add_libs,$(1),\
-   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs 
-lorcus-0.17 \
+   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs 
-lorcus-0.18 \
 )
 
 $(if $(SYSTEM_BOOST), \
@@ -3325,7 +3325,7 @@ $(call gb_LinkTarget_set_include,$(1),\
 )
 
 $(call gb_LinkTarget_add_libs,$(1),\
-   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs 
-lorcus-parser-0.17 \
+   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs 
-lorcus-parser-0.18 \
 )
 
 endef
diff --git a/configure.ac b/configure.ac
index 41518fdc533c..321cc06acbdb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10532,7 +10532,7 @@ dnl 
===
 dnl Check for system mdds
 dnl ===
 MDDS_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/mdds/include"
-libo_CHECK_SYSTEM_MODULE([mdds],[MDDS],[mdds-2.0 >= 2.0.0])
+libo_CHECK_SYSTEM_MODULE([mdds],[MDDS],[mdds-2.1 >= 2.1.0])
 
 dnl ===
 dnl Check for system dragonbox
@@ -10839,7 +10839,7 @@ AC_SUBST(DEFAULT_CRASHDUMP_VALUE)
 dnl ===
 dnl Orcus
 dnl ===
-libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.17 >= 0.17.2])
+libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.18 >= 0.18.0])
 if test "$with_system_orcus" != "yes"; then
 if test "$SYSTEM_BOOST" = "TRUE"; then
 dnl Link with Boost.System
diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index ffbe02a344e2..7c76f9c9872a 

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

 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit dff967f47a9bd7b3ff141925585ae9ced2aed01f
Author: Kohei Yoshida 
AuthorDate: Tue May 10 22:07:16 2022 -0400
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed May 11 11:23:20 2022 +0200

Update mdds to 2.0.3.

This release includes a revised block position search implementation
that shouldn't touch the internal STL iterators so that even if you
pass an invalid position hint, it should not trigger process
termination.

Change-Id: I8c76eb012ba7ce304ff10b38de468b7c9c6cce2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134140
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134152
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/download.lst b/download.lst
index fb8edd9fd634..912e557aaec2 100644
--- a/download.lst
+++ b/download.lst
@@ -178,8 +178,8 @@ export LXML_SHA256SUM := 
940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a
 export LXML_TARBALL := lxml-4.1.1.tgz
 export MARIADB_CONNECTOR_C_SHA256SUM := 
431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b
 export MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.1.8-src.tar.gz
-export MDDS_SHA256SUM := 
3ab33fce58e6acf9540cc1a52264be6863ef80f55ac287194cc98cda48e71fe6
-export MDDS_TARBALL := mdds-2.0.1.tar.bz2
+export MDDS_SHA256SUM := 
9771fe42e133443c13ca187253763e17c8bc96a1a02aec9e1e8893367ffa9ce5
+export MDDS_TARBALL := mdds-2.0.3.tar.bz2
 export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba


[Libreoffice-commits] core.git: download.lst

 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1729da22a7f57eba6531d15388c67cb710fc3c30
Author: Kohei Yoshida 
AuthorDate: Tue May 10 22:07:16 2022 -0400
Commit: Kohei Yoshida 
CommitDate: Wed May 11 05:09:18 2022 +0200

Update mdds to 2.0.3.

This release includes a revised block position search implementation
that shouldn't touch the internal STL iterators so that even if you
pass an invalid position hint, it should not trigger process
termination.

Change-Id: I8c76eb012ba7ce304ff10b38de468b7c9c6cce2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134140
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index c648a5323edb..a532607e465e 100644
--- a/download.lst
+++ b/download.lst
@@ -174,8 +174,8 @@ export LXML_SHA256SUM := 
940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a
 export LXML_TARBALL := lxml-4.1.1.tgz
 export MARIADB_CONNECTOR_C_SHA256SUM := 
431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b
 export MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.1.8-src.tar.gz
-export MDDS_SHA256SUM := 
13211f2f2e387ef3b74d73a1dcee52a1ad5ce06df8f8e6647679df9278a3116a
-export MDDS_TARBALL := mdds-2.0.2.tar.bz2
+export MDDS_SHA256SUM := 
9771fe42e133443c13ca187253763e17c8bc96a1a02aec9e1e8893367ffa9ce5
+export MDDS_TARBALL := mdds-2.0.3.tar.bz2
 export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba


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

 sc/inc/document.hxx  |3 ++-
 sc/source/core/data/document.cxx |5 +
 sc/source/ui/view/spelleng.cxx   |4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit ce911276b87b86b58c45ac4b7e9f5226a7ef95c5
Author: Kohei Yoshida 
AuthorDate: Fri May 6 23:11:17 2022 -0400
Commit: Kohei Yoshida 
CommitDate: Sat May 7 16:48:12 2022 +0200

tdf#107765: Use the correct sheet index.

This is a follow-up to f15e6293cf78d67963a6e512f60a11ae58da72c5.

Change-Id: I3f1e6bbb1fe83fab48a0c3889fb53c6919f6351d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133967
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index f83b021393f2..8e79d31e5ff3 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1919,7 +1919,8 @@ public:
  SCTAB nTab, ScMF nFlags );
 
 SC_DLLPUBLIC voidSetPattern( const ScAddress&, const ScPatternAttr& 
rAttr );
-SC_DLLPUBLIC const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, 
SCTAB nTab, std::unique_ptr );
+SC_DLLPUBLIC const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, 
SCTAB nTab, std::unique_ptr pAttr );
+SC_DLLPUBLIC const ScPatternAttr* SetPattern( const ScAddress& rPos, 
std::unique_ptr pAttr );
 SC_DLLPUBLIC voidSetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const 
ScPatternAttr& rAttr );
 
 void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL 
nEndCol, SCROW nEndRow,
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 5acd603f006e..1675f21a6afa 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -5097,6 +5097,11 @@ const ScPatternAttr* ScDocument::SetPattern( SCCOL nCol, 
SCROW nRow, SCTAB nTab,
 return nullptr;
 }
 
+const ScPatternAttr* ScDocument::SetPattern( const ScAddress& rPos, 
std::unique_ptr pAttr )
+{
+return SetPattern(rPos.Col(), rPos.Row(), rPos.Tab(), std::move(pAttr));
+}
+
 void ScDocument::SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const 
ScPatternAttr& rAttr )
 {
 if (ValidTab(nTab) && nTab < static_cast(maTabs.size()))
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 615960ff0703..cb3c4f4ad974 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -134,7 +134,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
 // Set the new string and update the language with the 
cell.
 mrDoc.SetString(aPos, aNewStr);
 
-const ScPatternAttr* pAttr = mrDoc.GetPattern(mnCurrCol, 
mnCurrRow, mnStartTab);
+const ScPatternAttr* pAttr = mrDoc.GetPattern(aPos);
 std::unique_ptr pNewAttr;
 
 if (pAttr)
@@ -143,7 +143,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
 pNewAttr = 
std::make_unique(mrDoc.GetPool());
 
 pNewAttr->GetItemSet().Put(SvxLanguageItem(aLang.nLang, 
EE_CHAR_LANGUAGE), ATTR_FONT_LANGUAGE);
-mrDoc.SetPattern(mnCurrCol, mnCurrRow, mnStartTab, 
std::move(pNewAttr));
+mrDoc.SetPattern(aPos, std::move(pNewAttr));
 }
 
 if (mpRedoDoc && !bEmptyCell)


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

 editeng/source/editeng/editeng.cxx  |8 +++---
 editeng/source/editeng/editview.cxx |6 ++---
 editeng/source/editeng/edtspell.cxx |4 +--
 editeng/source/editeng/impedit.hxx  |2 -
 editeng/source/editeng/impedit3.cxx |4 +--
 editeng/source/editeng/impedit4.cxx |   43 +---
 editeng/source/editeng/textconv.cxx |2 -
 editeng/source/outliner/outlin2.cxx |2 -
 editeng/source/outliner/outlvw.cxx  |2 -
 editeng/source/uno/unofored.cxx |2 -
 include/editeng/editdata.hxx|   13 ++
 include/editeng/editeng.hxx |4 +--
 sc/source/ui/view/spelleng.cxx  |   29 +++-
 svx/source/dialog/weldeditview.cxx  |2 -
 14 files changed, 86 insertions(+), 37 deletions(-)

New commits:
commit f15e6293cf78d67963a6e512f60a11ae58da72c5
Author: Kohei Yoshida 
AuthorDate: Fri May 6 19:37:14 2022 -0400
Commit: Kohei Yoshida 
CommitDate: Sat May 7 04:52:50 2022 +0200

tdf#107765: Check the updated language and apply it to the cell.

During the normal spell-checking in Calc, the user may change the
language on the string segment with a spelling error, which is supposed
to be applied back to that segment in the cell, but was not. This change
should fix it.

In case the new language is applied to the entire cell string, we will
set the new lanuage to the cell as a cell attribute and keep the string
as a simple string.  Otherwise, the new language gets applied to the
edit engine string.

This commit also changes the return value of EditEngine::GetLanguage()
to include the string span information in addition to the language
value.

Change-Id: I713ec7aefe571f721321cd8ea687f616ab4dd61a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133966
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 4e87300fd006..5869bcdeeeb4 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -478,16 +478,16 @@ SvtScriptType EditEngine::GetScriptType( const 
ESelection& rSelection ) const
 return pImpEditEngine->GetItemScriptType( aSel );
 }
 
-LanguageType EditEngine::GetLanguage(const EditPaM& rPaM) const
+editeng::LanguageSpan EditEngine::GetLanguage(const EditPaM& rPaM) const
 {
 return pImpEditEngine->GetLanguage(rPaM);
 }
 
-LanguageType EditEngine::GetLanguage( sal_Int32 nPara, sal_Int32 nPos ) const
+editeng::LanguageSpan EditEngine::GetLanguage( sal_Int32 nPara, sal_Int32 nPos 
) const
 {
 ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( nPara );
 DBG_ASSERT( pNode, "GetLanguage - nPara is invalid!" );
-return pNode ? pImpEditEngine->GetLanguage( EditPaM( pNode, nPos ) ) : 
LANGUAGE_DONTKNOW;
+return pNode ? pImpEditEngine->GetLanguage( EditPaM( pNode, nPos ) ) : 
editeng::LanguageSpan{};
 }
 
 
@@ -1328,7 +1328,7 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, 
EditView* pEditView, v
 {
 OUString aComplete;
 
-LanguageType eLang = 
pImpEditEngine->GetLanguage( EditPaM( aStart.GetNode(), aStart.GetIndex()+1));
+LanguageType eLang = 
pImpEditEngine->GetLanguage( EditPaM( aStart.GetNode(), 
aStart.GetIndex()+1)).nLang;
 LanguageTag aLanguageTag( eLang);
 
 if 
(!pImpEditEngine->xLocaleDataWrapper.isInitialized())
diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index 8f199b79ea89..320fd52eab8c 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1022,7 +1022,7 @@ bool EditView::ExecuteSpellPopup(const Point& rPosPixel, 
const Link  xSpellAlt =
-xSpeller->spell( aSelected, 
static_cast(pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( 
aPaM2 )), aPropVals );
+xSpeller->spell( aSelected, 
static_cast(pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( 
aPaM2 ).nLang), aPropVals );
 
 Reference< linguistic2::XLanguageGuessing >  xLangGuesser( 
EditDLL::Get().GetGlobalData()->GetLanguageGuesser() );
 
@@ -1102,7 +1102,7 @@ bool EditView::ExecuteSpellPopup(const Point& rPosPixel, 
const LinkgetDictionaries();
 pDic  = aDics.getConstArray();
-LanguageType nCheckedLanguage = 
pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( aPaM2 );
+LanguageType nCheckedLanguage = 
pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( aPaM2 ).nLang;
 sal_uInt16 nDicCount = static_cast(aDics.getLength());
 for (sal_uInt16 i = 0; i < nDicCount; i++)
 {
@@ -1254,7 +1254,7 @@ bool EditView::ExecuteSpellPopup(const Point& rPosPixel, 
const LinkPutText( aSelected, aWord, 
pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( aPaM2 ) );
+ 

[Libreoffice-commits] core.git: readlicense_oo/license

 readlicense_oo/license/license.xml |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 1bf5884a7bd5e506c6edd9769f98e3102a4c4eb9
Author: Kohei Yoshida 
AuthorDate: Wed May 4 21:12:37 2022 -0400
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri May 6 08:45:59 2022 +0200

Add license information for liborcus, which is used in Calc.

Change-Id: I6cbf93b8f2264a04c6745a2874ff35902e2cd215
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133852
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/readlicense_oo/license/license.xml 
b/readlicense_oo/license/license.xml
index e6989058fc93..1727b6c22edd 100644
--- a/readlicense_oo/license/license.xml
+++ b/readlicense_oo/license/license.xml
@@ -949,6 +949,12 @@
 Jump to LGPL Version 3
 Jump to MPL Version 2.0
 
+
+liborcus
+The following software may be included in this product: liborcus. 
Use of any of this software is governed
+by the terms of the license below:
+Jump to MPL Version 2.0
+
 
 libmspub
 The following software may be included in this product: libmspub. 
Use of any of this software is governed by


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

 sc/inc/column.hxx   |5 +
 sc/source/core/data/column4.cxx |   22 +++---
 2 files changed, 20 insertions(+), 7 deletions(-)

New commits:
commit 98e39c87a123e2d1b5c2738c26625fd2b7849ea3
Author: Kohei Yoshida 
AuthorDate: Thu Mar 10 22:50:17 2022 -0500
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Mar 13 05:37:04 2022 +0100

tdf#147744: Make sure to pass valid position hints.

When pasting a single cell to a range with filtered rows, the existing
code wasn't updating the position hint iterator after inserting cloned
formula cells via ScColumn::CloneFormulaCell().  This caused the next
call into the cell store to receive an invalid position hint.

This problem has been there all along, but apparently it did not cause
a process termination with the previous storage layout of
multi_type_vector for a reason unknown to me.

Change-Id: Ie1a4b99c7077536499c6373ccb7022961e9d93e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131331
Tested-by: Jenkins
Tested-by: Xisco Fauli 
Reviewed-by: Kohei Yoshida 
(cherry picked from commit f19ae9b5e629d163314ee18d56973d0561d5fb3b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131378
(cherry picked from commit 7049b1da30f715c502f38ed982eec037e096be08)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131406
Reviewed-by: Eike Rathke 
Reviewed-by: Xisco Fauli 
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 35c4b3eb0d3b..01e58fb9d055 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -348,6 +348,11 @@ public:
 bool HasFormulaCell() const;
 bool HasFormulaCell( SCROW nRow1, SCROW nRow2 ) const;
 
+void CloneFormulaCell(
+sc::ColumnBlockPosition& rBlockPos,
+const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
+const std::vector& rRanges );
+
 void CloneFormulaCell(
 const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
 const std::vector& rRanges );
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 22bd15cb271c..bbae4747a13e 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -317,7 +317,7 @@ void ScColumn::CopyOneCellFromClip( 
sc::CopyFromClipContext& rCxt, SCROW nRow1,
 std::vector aRanges;
 aRanges.reserve(1);
 aRanges.emplace_back(nRow1, nRow2);
-CloneFormulaCell(*rSrcCell.mpFormula, rSrcAttr, aRanges);
+CloneFormulaCell(*pBlockPos, *rSrcCell.mpFormula, rSrcAttr, 
aRanges);
 }
 break;
 default:
@@ -576,12 +576,10 @@ void ScColumn::DeleteRanges( const 
std::vector& rRanges, InsertDele
 }
 
 void ScColumn::CloneFormulaCell(
+sc::ColumnBlockPosition& rBlockPos,
 const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
 const std::vector& rRanges )
 {
-sc::CellStoreType::iterator itPos = maCells.begin();
-sc::CellTextAttrStoreType::iterator itAttrPos = maCellTextAttrs.begin();
-
 SCCOL nMatrixCols = 0;
 SCROW nMatrixRows = 0;
 ScMatrixMode nMatrixFlag = rSrc.GetMatrixFlag();
@@ -634,10 +632,10 @@ void ScColumn::CloneFormulaCell(
 }
 }
 
-itPos = maCells.set(itPos, nRow1, aFormulas.begin(), aFormulas.end());
+rBlockPos.miCellPos = maCells.set(rBlockPos.miCellPos, nRow1, 
aFormulas.begin(), aFormulas.end());
 
 // Join the top and bottom of the pasted formula cells as needed.
-sc::CellStoreType::position_type aPosObj = maCells.position(itPos, 
nRow1);
+sc::CellStoreType::position_type aPosObj = 
maCells.position(rBlockPos.miCellPos, nRow1);
 
 assert(aPosObj.first->type == sc::element_type_formula);
 ScFormulaCell* pCell = sc::formula_block::at(*aPosObj.first->data, 
aPosObj.second);
@@ -649,12 +647,22 @@ void ScColumn::CloneFormulaCell(
 JoinNewFormulaCell(aPosObj, *pCell);
 
 std::vector aTextAttrs(nLen, rAttr);
-itAttrPos = maCellTextAttrs.set(itAttrPos, nRow1, aTextAttrs.begin(), 
aTextAttrs.end());
+rBlockPos.miCellTextAttrPos = maCellTextAttrs.set(
+rBlockPos.miCellTextAttrPos, nRow1, aTextAttrs.begin(), 
aTextAttrs.end());
 }
 
 CellStorageModified();
 }
 
+void ScColumn::CloneFormulaCell(
+const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
+const std::vector& rRanges )
+{
+sc::ColumnBlockPosition aBlockPos;
+InitBlockPosition(aBlockPos);
+CloneFormulaCell(aBlockPos, rSrc, rAttr, rRanges);
+}
+
 std::unique_ptr ScColumn::ReleaseNote( SCROW nRow )
 {
 if (!GetDoc().ValidRow(nRow))


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

 sc/inc/column.hxx   |5 +
 sc/source/core/data/column4.cxx |   22 +++---
 2 files changed, 20 insertions(+), 7 deletions(-)

New commits:
commit 7049b1da30f715c502f38ed982eec037e096be08
Author: Kohei Yoshida 
AuthorDate: Thu Mar 10 22:50:17 2022 -0500
Commit: Kohei Yoshida 
CommitDate: Fri Mar 11 22:41:13 2022 +0100

tdf#147744: Make sure to pass valid position hints.

When pasting a single cell to a range with filtered rows, the existing
code wasn't updating the position hint iterator after inserting cloned
formula cells via ScColumn::CloneFormulaCell().  This caused the next
call into the cell store to receive an invalid position hint.

This problem has been there all along, but apparently it did not cause
a process termination with the previous storage layout of
multi_type_vector for a reason unknown to me.

Change-Id: Ie1a4b99c7077536499c6373ccb7022961e9d93e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131331
Tested-by: Jenkins
Tested-by: Xisco Fauli 
Reviewed-by: Kohei Yoshida 
(cherry picked from commit f19ae9b5e629d163314ee18d56973d0561d5fb3b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131378

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 35c4b3eb0d3b..01e58fb9d055 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -348,6 +348,11 @@ public:
 bool HasFormulaCell() const;
 bool HasFormulaCell( SCROW nRow1, SCROW nRow2 ) const;
 
+void CloneFormulaCell(
+sc::ColumnBlockPosition& rBlockPos,
+const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
+const std::vector& rRanges );
+
 void CloneFormulaCell(
 const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
 const std::vector& rRanges );
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 22bd15cb271c..bbae4747a13e 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -317,7 +317,7 @@ void ScColumn::CopyOneCellFromClip( 
sc::CopyFromClipContext& rCxt, SCROW nRow1,
 std::vector aRanges;
 aRanges.reserve(1);
 aRanges.emplace_back(nRow1, nRow2);
-CloneFormulaCell(*rSrcCell.mpFormula, rSrcAttr, aRanges);
+CloneFormulaCell(*pBlockPos, *rSrcCell.mpFormula, rSrcAttr, 
aRanges);
 }
 break;
 default:
@@ -576,12 +576,10 @@ void ScColumn::DeleteRanges( const 
std::vector& rRanges, InsertDele
 }
 
 void ScColumn::CloneFormulaCell(
+sc::ColumnBlockPosition& rBlockPos,
 const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
 const std::vector& rRanges )
 {
-sc::CellStoreType::iterator itPos = maCells.begin();
-sc::CellTextAttrStoreType::iterator itAttrPos = maCellTextAttrs.begin();
-
 SCCOL nMatrixCols = 0;
 SCROW nMatrixRows = 0;
 ScMatrixMode nMatrixFlag = rSrc.GetMatrixFlag();
@@ -634,10 +632,10 @@ void ScColumn::CloneFormulaCell(
 }
 }
 
-itPos = maCells.set(itPos, nRow1, aFormulas.begin(), aFormulas.end());
+rBlockPos.miCellPos = maCells.set(rBlockPos.miCellPos, nRow1, 
aFormulas.begin(), aFormulas.end());
 
 // Join the top and bottom of the pasted formula cells as needed.
-sc::CellStoreType::position_type aPosObj = maCells.position(itPos, 
nRow1);
+sc::CellStoreType::position_type aPosObj = 
maCells.position(rBlockPos.miCellPos, nRow1);
 
 assert(aPosObj.first->type == sc::element_type_formula);
 ScFormulaCell* pCell = sc::formula_block::at(*aPosObj.first->data, 
aPosObj.second);
@@ -649,12 +647,22 @@ void ScColumn::CloneFormulaCell(
 JoinNewFormulaCell(aPosObj, *pCell);
 
 std::vector aTextAttrs(nLen, rAttr);
-itAttrPos = maCellTextAttrs.set(itAttrPos, nRow1, aTextAttrs.begin(), 
aTextAttrs.end());
+rBlockPos.miCellTextAttrPos = maCellTextAttrs.set(
+rBlockPos.miCellTextAttrPos, nRow1, aTextAttrs.begin(), 
aTextAttrs.end());
 }
 
 CellStorageModified();
 }
 
+void ScColumn::CloneFormulaCell(
+const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
+const std::vector& rRanges )
+{
+sc::ColumnBlockPosition aBlockPos;
+InitBlockPosition(aBlockPos);
+CloneFormulaCell(aBlockPos, rSrc, rAttr, rRanges);
+}
+
 std::unique_ptr ScColumn::ReleaseNote( SCROW nRow )
 {
 if (!GetDoc().ValidRow(nRow))


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

 sc/inc/column.hxx   |5 +
 sc/source/core/data/column4.cxx |   22 +++---
 2 files changed, 20 insertions(+), 7 deletions(-)

New commits:
commit f19ae9b5e629d163314ee18d56973d0561d5fb3b
Author: Kohei Yoshida 
AuthorDate: Thu Mar 10 22:50:17 2022 -0500
Commit: Kohei Yoshida 
CommitDate: Fri Mar 11 15:01:52 2022 +0100

tdf#147744: Make sure to pass valid position hints.

When pasting a single cell to a range with filtered rows, the existing
code wasn't updating the position hint iterator after inserting cloned
formula cells via ScColumn::CloneFormulaCell().  This caused the next
call into the cell store to receive an invalid position hint.

This problem has been there all along, but apparently it did not cause
a process termination with the previous storage layout of
multi_type_vector for a reason unknown to me.

Change-Id: Ie1a4b99c7077536499c6373ccb7022961e9d93e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131331
Tested-by: Jenkins
Tested-by: Xisco Fauli 
Reviewed-by: Kohei Yoshida 

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index b6fde6801a2f..689f0c0ccbd0 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -408,6 +408,11 @@ public:
 bool HasFormulaCell() const;
 bool HasFormulaCell( SCROW nRow1, SCROW nRow2 ) const;
 
+void CloneFormulaCell(
+sc::ColumnBlockPosition& rBlockPos,
+const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
+const std::vector& rRanges );
+
 void CloneFormulaCell(
 const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
 const std::vector& rRanges );
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 6e93ce9b8df8..3a7145608de8 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -312,7 +312,7 @@ void ScColumn::CopyOneCellFromClip( 
sc::CopyFromClipContext& rCxt, SCROW nRow1,
 std::vector aRanges;
 aRanges.reserve(1);
 aRanges.emplace_back(nRow1, nRow2);
-CloneFormulaCell(*rSrcCell.mpFormula, rSrcAttr, aRanges);
+CloneFormulaCell(*pBlockPos, *rSrcCell.mpFormula, rSrcAttr, 
aRanges);
 }
 break;
 default:
@@ -571,12 +571,10 @@ void ScColumn::DeleteRanges( const 
std::vector& rRanges, InsertDele
 }
 
 void ScColumn::CloneFormulaCell(
+sc::ColumnBlockPosition& rBlockPos,
 const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
 const std::vector& rRanges )
 {
-sc::CellStoreType::iterator itPos = maCells.begin();
-sc::CellTextAttrStoreType::iterator itAttrPos = maCellTextAttrs.begin();
-
 SCCOL nMatrixCols = 0;
 SCROW nMatrixRows = 0;
 ScMatrixMode nMatrixFlag = rSrc.GetMatrixFlag();
@@ -629,10 +627,10 @@ void ScColumn::CloneFormulaCell(
 }
 }
 
-itPos = maCells.set(itPos, nRow1, aFormulas.begin(), aFormulas.end());
+rBlockPos.miCellPos = maCells.set(rBlockPos.miCellPos, nRow1, 
aFormulas.begin(), aFormulas.end());
 
 // Join the top and bottom of the pasted formula cells as needed.
-sc::CellStoreType::position_type aPosObj = maCells.position(itPos, 
nRow1);
+sc::CellStoreType::position_type aPosObj = 
maCells.position(rBlockPos.miCellPos, nRow1);
 
 assert(aPosObj.first->type == sc::element_type_formula);
 ScFormulaCell* pCell = sc::formula_block::at(*aPosObj.first->data, 
aPosObj.second);
@@ -644,12 +642,22 @@ void ScColumn::CloneFormulaCell(
 JoinNewFormulaCell(aPosObj, *pCell);
 
 std::vector aTextAttrs(nLen, rAttr);
-itAttrPos = maCellTextAttrs.set(itAttrPos, nRow1, aTextAttrs.begin(), 
aTextAttrs.end());
+rBlockPos.miCellTextAttrPos = maCellTextAttrs.set(
+rBlockPos.miCellTextAttrPos, nRow1, aTextAttrs.begin(), 
aTextAttrs.end());
 }
 
 CellStorageModified();
 }
 
+void ScColumn::CloneFormulaCell(
+const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
+const std::vector& rRanges )
+{
+sc::ColumnBlockPosition aBlockPos;
+InitBlockPosition(aBlockPos);
+CloneFormulaCell(aBlockPos, rSrc, rAttr, rRanges);
+}
+
 std::unique_ptr ScColumn::ReleaseNote( SCROW nRow )
 {
 if (!GetDoc().ValidRow(nRow))


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

 sc/source/core/data/column4.cxx |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit fb9270b238cba4f36e595c5d7f4d85f6f3f18e1c
Author: Kohei Yoshida 
AuthorDate: Wed Mar 2 18:35:58 2022 -0500
Commit: Kohei Yoshida 
CommitDate: Thu Mar 3 01:17:16 2022 +0100

Check for cached formula block count to make sure it's correct.

Change-Id: I16237d26bb9e55ba5c3e65087be98ba8f8086d56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130899
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 22bd15cb271c..e9b7d1d189dc 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -2150,7 +2150,17 @@ void ScColumn::CheckIntegrity() const
 throw std::runtime_error(os.str());
 }
 
-// Add more integrity checks as needed.
+size_t nCount = std::count_if(maCells.cbegin(), maCells.cend(),
+[](const auto& blk) { return blk.type == sc::element_type_formula; }
+);
+
+if (mnBlkCountFormula != nCount)
+{
+std::ostringstream os;
+os << "incorrect cached formula block count (expected=" << nCount << 
"; actual="
+<< mnBlkCountFormula << ")";
+throw std::runtime_error(os.str());
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

 sc/inc/mtvelements.hxx  |2 ++
 sc/source/core/data/column.cxx  |1 +
 sc/source/core/data/mtvelements.cxx |5 +
 3 files changed, 8 insertions(+)

New commits:
commit 1c3c72bf20914b13960508ec337de96f82b8225b
Author: Kohei Yoshida 
AuthorDate: Thu Feb 24 21:06:50 2022 -0500
Commit: Christian Lohmaier 
CommitDate: Mon Feb 28 18:33:41 2022 +0100

tdf#147298: When swapping the cell stores, swap back the event handlers.

Swapping the cell stores also swap the event handlers stored therein.
But we do want the event handlers to stay with the original column
instances as they store pointers to their host column instances.

Change-Id: Id35b89db641e94dbaa341b33d0b64dce19a99465
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130510
Reviewed-by: Kohei Yoshida 
Tested-by: Kohei Yoshida 
(cherry picked from commit 8f25d42938977b34f3281238a92fb34ebea5838c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130464
Tested-by: Jenkins
(cherry picked from commit 7d64ec7d342da64e050ed9ac326b1af33d5c6955)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130571
Reviewed-by: Eike Rathke 
Reviewed-by: Kevin Suo 
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
index 05a0970bd64d..75cdea9483bd 100644
--- a/sc/inc/mtvelements.hxx
+++ b/sc/inc/mtvelements.hxx
@@ -98,6 +98,8 @@ public:
 
 /** Stop processing events. */
 void stop();
+
+void swap(CellStoreEvent& other);
 };
 
 struct CellStoreTrait
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 20cfc194b8b4..9d5643073f70 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1970,6 +1970,7 @@ void ScColumn::SwapCol(ScColumn& rCol)
 maCellNotes.swap(rCol.maCellNotes);
 
 // Swap all CellStoreEvent mdds event_func related.
+maCells.event_handler().swap(rCol.maCells.event_handler());
 std::swap( mnBlkCountFormula, rCol.mnBlkCountFormula);
 
 // notes update caption
diff --git a/sc/source/core/data/mtvelements.cxx 
b/sc/source/core/data/mtvelements.cxx
index ee6c9cf1499c..a06e86dcae16 100644
--- a/sc/source/core/data/mtvelements.cxx
+++ b/sc/source/core/data/mtvelements.cxx
@@ -56,6 +56,11 @@ void CellStoreEvent::stop()
 mpCol = nullptr;
 }
 
+void CellStoreEvent::swap(CellStoreEvent& other)
+{
+std::swap(mpCol, other.mpCol);
+}
+
 ColumnBlockPositionSet::ColumnBlockPositionSet(ScDocument& rDoc) : mrDoc(rDoc) 
{}
 
 ColumnBlockPosition* ColumnBlockPositionSet::getBlockPosition(SCTAB nTab, 
SCCOL nCol)


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

 sc/inc/column.hxx   |2 +
 sc/inc/document.hxx |   10 +++
 sc/inc/mtvelements.hxx  |2 +
 sc/inc/table.hxx|4 +++
 sc/qa/unit/helper/qahelper.hxx  |1 
 sc/qa/unit/ucalc.cxx|   46 
 sc/source/core/data/column4.cxx |   15 +++
 sc/source/core/data/document10.cxx  |   18 ++
 sc/source/core/data/mtvelements.cxx |5 +++
 sc/source/core/data/table7.cxx  |   19 ++
 10 files changed, 122 insertions(+)

New commits:
commit d54dfc3d3d241b7430accf17a249406bc9cbfb6c
Author: Kohei Yoshida 
AuthorDate: Thu Feb 24 23:17:09 2022 -0500
Commit: Xisco Fauli 
CommitDate: Mon Feb 28 12:20:26 2022 +0100

tdf#147298: Add a simple test case for formula cell tracking by column.

Change-Id: Ibdd72c08f8660ade511fdce8b3fb7cd3ed97f4b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130511
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
(cherry picked from commit 974bf22680b702b9474d4a91dbf1d06a785ff774)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130554
Reviewed-by: Xisco Fauli 

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 480e691366c2..35c4b3eb0d3b 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -717,6 +717,8 @@ public:
 SCSIZE  GetPatternCount( SCROW nRow1, SCROW nRow2 ) const;
 boolReservePatternCount( SCSIZE nReserve );
 
+void CheckIntegrity() const;
+
 private:
 
 sc::CellStoreType::iterator GetPositionToInsert( SCROW nRow, 
std::vector& rNewSharedRows,
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index fec085a32733..029a339f94a7 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -2219,6 +2219,16 @@ public:
 std::set   GetDocColors();
 sc::IconSetBitmapMap& GetIconSetBitmapMap();
 
+std::set QueryColumnsWithFormulaCells( SCTAB nTab ) const;
+
+/**
+ * Check the integrity of the internal table state.  Useful from testing
+ * code.  It throws an exception upon first failure.
+ *
+ * Feel free to add more checks as needed.
+ */
+void CheckIntegrity( SCTAB nTab ) const;
+
 private:
 ScDocument(const ScDocument& r) = delete;
 
diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
index 75cdea9483bd..c74e1bc7d91b 100644
--- a/sc/inc/mtvelements.hxx
+++ b/sc/inc/mtvelements.hxx
@@ -100,6 +100,8 @@ public:
 void stop();
 
 void swap(CellStoreEvent& other);
+
+const ScColumn* getColumn() const;
 };
 
 struct CellStoreTrait
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index e61f2f717d89..5602d6dcacfe 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -1106,6 +1106,10 @@ public:
  */
 OString dumpSheetGeomData(bool bColumns, SheetGeomType eGeomType);
 
+std::set QueryColumnsWithFormulaCells() const;
+
+void CheckIntegrity() const;
+
 private:
 
 void FillFormulaVertical(
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index 0435ef021651..9aea7a203805 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -29,6 +29,7 @@
 #include 
 
 #include 
+#include 
 
 namespace utl { class TempFile; }
 
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 9cfe59ac27d3..1e7cde76d9f0 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -254,6 +254,8 @@ public:
 void testProtectedSheetEditByRow();
 void testProtectedSheetEditByColumn();
 
+void testInsertColumnsWithFormulaCells();
+
 CPPUNIT_TEST_SUITE(Test);
 CPPUNIT_TEST(testCollator);
 CPPUNIT_TEST(testSharedStringPool);
@@ -343,6 +345,7 @@ public:
 CPPUNIT_TEST(testPrecisionAsShown);
 CPPUNIT_TEST(testProtectedSheetEditByRow);
 CPPUNIT_TEST(testProtectedSheetEditByColumn);
+CPPUNIT_TEST(testInsertColumnsWithFormulaCells);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -6677,6 +6680,49 @@ void Test::testProtectedSheetEditByColumn()
 m_pDoc->DeleteTab(0);
 }
 
+void Test::testInsertColumnsWithFormulaCells()
+{
+m_pDoc->InsertTab(0, "Tab1");
+
+std::set aCols = m_pDoc->QueryColumnsWithFormulaCells(0);
+CPPUNIT_ASSERT_MESSAGE("empty sheet should contain no formula cells.", 
aCols.empty());
+
+auto equals = [](const std::set& left, const std::set& right)
+{
+return left == right;
+};
+
+// insert formula cells in columns 2, 4 and 6.
+m_pDoc->SetFormula(ScAddress(2, 2, 0), "=1", m_pDoc->GetGrammar());
+m_pDoc->SetFormula(ScAddress(4, 2, 0), "=1", m_pDoc->GetGrammar());
+m_pDoc->SetFormula(ScAddress(6, 2, 0), "=1", m_pDoc->GetGrammar());
+
+aCols = m_pDoc->QueryColumnsWithFormulaCells(0);
+
+std::set aExpected = { 2, 4, 6 };
+CPPUNIT_ASSERT_MESSAGE("Columns 2, 4 and 6 should contain formula cells.", 
equals(aExpected, aCols));
+
+// Insert 2 columns at column A to shift everything to right by 2.
+m_pDoc->InsertCol(0, 0, 

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

 sc/inc/column.hxx   |2 +
 sc/inc/document.hxx |   10 +++
 sc/inc/mtvelements.hxx  |2 +
 sc/inc/table.hxx|4 +++
 sc/qa/unit/helper/qahelper.hxx  |1 
 sc/qa/unit/ucalc.cxx|   46 
 sc/source/core/data/column4.cxx |   15 +++
 sc/source/core/data/document10.cxx  |   18 ++
 sc/source/core/data/mtvelements.cxx |5 +++
 sc/source/core/data/table7.cxx  |   19 ++
 10 files changed, 122 insertions(+)

New commits:
commit 974bf22680b702b9474d4a91dbf1d06a785ff774
Author: Kohei Yoshida 
AuthorDate: Thu Feb 24 23:17:09 2022 -0500
Commit: Kohei Yoshida 
CommitDate: Sat Feb 26 01:43:32 2022 +0100

tdf#147298: Add a simple test case for formula cell tracking by column.

Change-Id: Ibdd72c08f8660ade511fdce8b3fb7cd3ed97f4b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130511
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 2e1f0df49bdb..e23eac0fdab1 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -719,6 +719,8 @@ public:
 SCSIZE  GetPatternCount( SCROW nRow1, SCROW nRow2 ) const;
 boolReservePatternCount( SCSIZE nReserve );
 
+void CheckIntegrity() const;
+
 private:
 
 sc::CellStoreType::iterator GetPositionToInsert( SCROW nRow, 
std::vector& rNewSharedRows,
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index b0557751ae22..344e99e130f8 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -2229,6 +2229,16 @@ public:
 std::set   GetDocColors();
 sc::IconSetBitmapMap& GetIconSetBitmapMap();
 
+std::set QueryColumnsWithFormulaCells( SCTAB nTab ) const;
+
+/**
+ * Check the integrity of the internal table state.  Useful from testing
+ * code.  It throws an exception upon first failure.
+ *
+ * Feel free to add more checks as needed.
+ */
+void CheckIntegrity( SCTAB nTab ) const;
+
 private:
 ScDocument(const ScDocument& r) = delete;
 
diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
index 75cdea9483bd..c74e1bc7d91b 100644
--- a/sc/inc/mtvelements.hxx
+++ b/sc/inc/mtvelements.hxx
@@ -100,6 +100,8 @@ public:
 void stop();
 
 void swap(CellStoreEvent& other);
+
+const ScColumn* getColumn() const;
 };
 
 struct CellStoreTrait
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 08624a937172..4a8654a67344 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -1108,6 +1108,10 @@ public:
  */
 OString dumpSheetGeomData(bool bColumns, SheetGeomType eGeomType);
 
+std::set QueryColumnsWithFormulaCells() const;
+
+void CheckIntegrity() const;
+
 private:
 
 void FillFormulaVertical(
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index eb400e68acba..e1b1ee6c65f9 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -29,6 +29,7 @@
 #include 
 
 #include 
+#include 
 
 namespace utl { class TempFile; }
 
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index ffb8d2fbe4eb..1d02913dab9c 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -222,6 +222,8 @@ public:
 void testProtectedSheetEditByRow();
 void testProtectedSheetEditByColumn();
 
+void testInsertColumnsWithFormulaCells();
+
 CPPUNIT_TEST_SUITE(Test);
 CPPUNIT_TEST(testCollator);
 CPPUNIT_TEST(testSharedStringPool);
@@ -311,6 +313,7 @@ public:
 CPPUNIT_TEST(testPrecisionAsShown);
 CPPUNIT_TEST(testProtectedSheetEditByRow);
 CPPUNIT_TEST(testProtectedSheetEditByColumn);
+CPPUNIT_TEST(testInsertColumnsWithFormulaCells);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -6645,6 +6648,49 @@ void Test::testProtectedSheetEditByColumn()
 m_pDoc->DeleteTab(0);
 }
 
+void Test::testInsertColumnsWithFormulaCells()
+{
+m_pDoc->InsertTab(0, "Tab1");
+
+std::set aCols = m_pDoc->QueryColumnsWithFormulaCells(0);
+CPPUNIT_ASSERT_MESSAGE("empty sheet should contain no formula cells.", 
aCols.empty());
+
+auto equals = [](const std::set& left, const std::set& right)
+{
+return left == right;
+};
+
+// insert formula cells in columns 2, 4 and 6.
+m_pDoc->SetFormula(ScAddress(2, 2, 0), "=1", m_pDoc->GetGrammar());
+m_pDoc->SetFormula(ScAddress(4, 2, 0), "=1", m_pDoc->GetGrammar());
+m_pDoc->SetFormula(ScAddress(6, 2, 0), "=1", m_pDoc->GetGrammar());
+
+aCols = m_pDoc->QueryColumnsWithFormulaCells(0);
+
+std::set aExpected = { 2, 4, 6 };
+CPPUNIT_ASSERT_MESSAGE("Columns 2, 4 and 6 should contain formula cells.", 
equals(aExpected, aCols));
+
+// Insert 2 columns at column A to shift everything to right by 2.
+m_pDoc->InsertCol(0, 0, MAXROW, 0, 0, 2);
+
+aExpected = { 4, 6, 8 };
+aCols = m_pDoc->QueryColumnsWithFormulaCells(0);
+CPPUNIT_ASSERT_MESSAGE("Columns 4, 6 and 8 should contain 

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

 sc/inc/mtvelements.hxx  |2 ++
 sc/source/core/data/column.cxx  |1 +
 sc/source/core/data/mtvelements.cxx |5 +
 3 files changed, 8 insertions(+)

New commits:
commit 7d64ec7d342da64e050ed9ac326b1af33d5c6955
Author: Kohei Yoshida 
AuthorDate: Thu Feb 24 21:06:50 2022 -0500
Commit: Kohei Yoshida 
CommitDate: Sat Feb 26 00:16:58 2022 +0100

tdf#147298: When swapping the cell stores, swap back the event handlers.

Swapping the cell stores also swap the event handlers stored therein.
But we do want the event handlers to stay with the original column
instances as they store pointers to their host column instances.

Change-Id: Id35b89db641e94dbaa341b33d0b64dce19a99465
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130510
Reviewed-by: Kohei Yoshida 
Tested-by: Kohei Yoshida 
(cherry picked from commit 8f25d42938977b34f3281238a92fb34ebea5838c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130464
Tested-by: Jenkins

diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
index 05a0970bd64d..75cdea9483bd 100644
--- a/sc/inc/mtvelements.hxx
+++ b/sc/inc/mtvelements.hxx
@@ -98,6 +98,8 @@ public:
 
 /** Stop processing events. */
 void stop();
+
+void swap(CellStoreEvent& other);
 };
 
 struct CellStoreTrait
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 20cfc194b8b4..9d5643073f70 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1970,6 +1970,7 @@ void ScColumn::SwapCol(ScColumn& rCol)
 maCellNotes.swap(rCol.maCellNotes);
 
 // Swap all CellStoreEvent mdds event_func related.
+maCells.event_handler().swap(rCol.maCells.event_handler());
 std::swap( mnBlkCountFormula, rCol.mnBlkCountFormula);
 
 // notes update caption
diff --git a/sc/source/core/data/mtvelements.cxx 
b/sc/source/core/data/mtvelements.cxx
index ee6c9cf1499c..a06e86dcae16 100644
--- a/sc/source/core/data/mtvelements.cxx
+++ b/sc/source/core/data/mtvelements.cxx
@@ -56,6 +56,11 @@ void CellStoreEvent::stop()
 mpCol = nullptr;
 }
 
+void CellStoreEvent::swap(CellStoreEvent& other)
+{
+std::swap(mpCol, other.mpCol);
+}
+
 ColumnBlockPositionSet::ColumnBlockPositionSet(ScDocument& rDoc) : mrDoc(rDoc) 
{}
 
 ColumnBlockPosition* ColumnBlockPositionSet::getBlockPosition(SCTAB nTab, 
SCCOL nCol)


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

 sc/inc/mtvelements.hxx  |2 ++
 sc/source/core/data/column.cxx  |1 +
 sc/source/core/data/mtvelements.cxx |5 +
 3 files changed, 8 insertions(+)

New commits:
commit 8f25d42938977b34f3281238a92fb34ebea5838c
Author: Kohei Yoshida 
AuthorDate: Thu Feb 24 21:06:50 2022 -0500
Commit: Kohei Yoshida 
CommitDate: Fri Feb 25 15:50:00 2022 +0100

tdf#147298: When swapping the cell stores, swap back the event handlers.

Swapping the cell stores also swap the event handlers stored therein.
But we do want the event handlers to stay with the original column
instances as they store pointers to their host column instances.

Change-Id: Id35b89db641e94dbaa341b33d0b64dce19a99465
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130510
Reviewed-by: Kohei Yoshida 
Tested-by: Kohei Yoshida 

diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
index 05a0970bd64d..75cdea9483bd 100644
--- a/sc/inc/mtvelements.hxx
+++ b/sc/inc/mtvelements.hxx
@@ -98,6 +98,8 @@ public:
 
 /** Stop processing events. */
 void stop();
+
+void swap(CellStoreEvent& other);
 };
 
 struct CellStoreTrait
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 167a3541f511..5e19d1b05ada 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1975,6 +1975,7 @@ void ScColumn::SwapCol(ScColumn& rCol)
 maCellNotes.swap(rCol.maCellNotes);
 
 // Swap all CellStoreEvent mdds event_func related.
+maCells.event_handler().swap(rCol.maCells.event_handler());
 std::swap( mnBlkCountFormula, rCol.mnBlkCountFormula);
 
 // notes update caption
diff --git a/sc/source/core/data/mtvelements.cxx 
b/sc/source/core/data/mtvelements.cxx
index ee6c9cf1499c..a06e86dcae16 100644
--- a/sc/source/core/data/mtvelements.cxx
+++ b/sc/source/core/data/mtvelements.cxx
@@ -56,6 +56,11 @@ void CellStoreEvent::stop()
 mpCol = nullptr;
 }
 
+void CellStoreEvent::swap(CellStoreEvent& other)
+{
+std::swap(mpCol, other.mpCol);
+}
+
 ColumnBlockPositionSet::ColumnBlockPositionSet(ScDocument& rDoc) : mrDoc(rDoc) 
{}
 
 ColumnBlockPosition* ColumnBlockPositionSet::getBlockPosition(SCTAB nTab, 
SCCOL nCol)


[Libreoffice-commits] core.git: download.lst

 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 30ba505ba549be4a509dd59c4c88a210ee01b539
Author: Kohei Yoshida 
AuthorDate: Tue Feb 15 20:15:40 2022 -0500
Commit: Kohei Yoshida 
CommitDate: Wed Feb 16 02:57:58 2022 +0100

Update mdds to 2.0.2.

See (https://gitlab.com/mdds/mdds/-/releases/2.0.2) for the detail
of this release.

Change-Id: Ib72a3eee4e1754bd7c0ca25ca25b62abac6d16e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129982
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index 56aa82c91ffc..f491822b8e7d 100644
--- a/download.lst
+++ b/download.lst
@@ -176,8 +176,8 @@ export LXML_SHA256SUM := 
940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a
 export LXML_TARBALL := lxml-4.1.1.tgz
 export MARIADB_CONNECTOR_C_SHA256SUM := 
431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b
 export MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.1.8-src.tar.gz
-export MDDS_SHA256SUM := 
3ab33fce58e6acf9540cc1a52264be6863ef80f55ac287194cc98cda48e71fe6
-export MDDS_TARBALL := mdds-2.0.1.tar.bz2
+export MDDS_SHA256SUM := 
13211f2f2e387ef3b74d73a1dcee52a1ad5ce06df8f8e6647679df9278a3116a
+export MDDS_TARBALL := mdds-2.0.2.tar.bz2
 export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba


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

 sc/inc/clipcontext.hxx  |   11 +--
 sc/inc/column.hxx   |2 -
 sc/inc/document.hxx |   28 ++
 sc/qa/unit/ucalc_copypaste.cxx  |2 -
 sc/source/core/data/clipcontext.cxx |8 ++---
 sc/source/core/data/column2.cxx |7 +++-
 sc/source/core/data/column3.cxx |   25 
 sc/source/core/data/column4.cxx |   56 ++--
 sc/source/core/data/document.cxx|   22 +-
 sc/source/ui/inc/undoblk.hxx|4 +-
 sc/source/ui/inc/viewfunc.hxx   |   30 ++-
 sc/source/ui/undo/undoblk.cxx   |2 -
 sc/source/ui/view/viewfun3.cxx  |   38 
 13 files changed, 151 insertions(+), 84 deletions(-)

New commits:
commit ea02ca06de604370061a59dd3084f7cfacccbe39
Author: Kohei Yoshida 
AuthorDate: Fri Jan 28 22:51:52 2022 -0500
Commit: Xisco Fauli 
CommitDate: Thu Feb 10 16:22:28 2022 +0100

tdf#146795: Make sure to use valid position hints to avoid crash.

This commit also unifies the code path for both "skip empty cells"
option is selected and when that option is not selected, which
simplifies the code quite a bit.

This commit is a combination of the following two commits cherry-picked
from master:

(cherry picked from commit 703fb7739a5e604d90e147db6f67917b8d141150)
(cherry picked from commit e8032897b4a012d8e236211ee6e5ce89fb90492e)

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

diff --git a/sc/inc/clipcontext.hxx b/sc/inc/clipcontext.hxx
index ccce671eea65..32e2dd97767a 100644
--- a/sc/inc/clipcontext.hxx
+++ b/sc/inc/clipcontext.hxx
@@ -63,7 +63,7 @@ class SC_DLLPUBLIC CopyFromClipContext final : public 
ClipContextBase
 
 ScConditionalFormatList* mpCondFormatList;
 bool mbAsLink:1;
-bool mbSkipAttrForEmptyCells:1;
+bool mbSkipEmptyCells:1;
 bool mbCloneNotes:1;
 bool mbTableProtected:1;
 
@@ -126,7 +126,14 @@ public:
 bool isTableProtected() const;
 
 bool isAsLink() const;
-bool isSkipAttrForEmptyCells() const;
+
+/**
+ * Get the flag that indicates whether the "skip empty cells" paste option
+ * is selected. When this option is selected, empty cells in the clipboard
+ * document will not overwrite the corresponding non-empty cells in the
+ * destination range.
+ */
+bool isSkipEmptyCells() const;
 bool isCloneNotes() const;
 bool isDateCell( const ScColumn& rCol, SCROW nRow ) const;
 };
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 384c12d52248..480e691366c2 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -281,7 +281,7 @@ public:
 void CopyFromClip(
 sc::CopyFromClipContext& rCxt, SCROW nRow1, SCROW nRow2, tools::Long 
nDy, ScColumn& rColumn );
 
-voidRemoveEditAttribs( SCROW nStartRow, SCROW nEndRow );
+void RemoveEditAttribs( sc::ColumnBlockPosition& rBlockPos, SCROW 
nStartRow, SCROW nEndRow );
 
 //  Selection (?) of this document
 void MixMarked(
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 3df5ddc926ff..fec085a32733 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1622,17 +1622,23 @@ public:
const ScMarkData& rMark,  InsertDeleteFlags 
nInsFlag,
sc::ColumnSpanSet& rBroadcastSpans );
 
-/** If pDestRanges is given it overrides rDestRange, rDestRange in this
-case is the overall encompassing range. */
-SC_DLLPUBLIC void   CopyFromClip( const ScRange& rDestRange, const 
ScMarkData& rMark,
-InsertDeleteFlags nInsFlag,
-ScDocument* pRefUndoDoc,
-ScDocument* pClipDoc,
-bool bResetCut = true,
-bool bAsLink = false,
-bool bIncludeFiltered = true,
-bool bSkipAttrForEmpty = false,
-const ScRangeList * pDestRanges = 
nullptr );
+/**
+ * Paste data from a clipboard document into this document.
+ *
+ * @param rDestRange destination range.
+ * @param pClipDoc pointer to the clipboard document to copy data from.
+ * @param bSkipEmptyCells if this flag is set, empty cells in the source
+ *range in the clipboard document will not 
overwrite
+ *the target destination cells.
+ * @param pDestRanges If pDestRanges is given it overrides rDestRange, 
where
+ *rDestRange becomes the overall encompassing range.
+ */
+SC_DLLPUBLIC void CopyFromClip(
+const 

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

 sc/inc/clipcontext.hxx   |7 +
 sc/inc/column.hxx|2 -
 sc/source/core/data/column2.cxx  |7 +++--
 sc/source/core/data/column3.cxx  |   21 ---
 sc/source/core/data/column4.cxx  |   54 +--
 sc/source/core/data/document.cxx |   10 +--
 6 files changed, 79 insertions(+), 22 deletions(-)

New commits:
commit 703fb7739a5e604d90e147db6f67917b8d141150
Author: Kohei Yoshida 
AuthorDate: Mon Jan 31 22:45:21 2022 -0500
Commit: Kohei Yoshida 
CommitDate: Fri Feb 4 02:40:49 2022 +0100

tdf#146795: Make sure to use valid position hints to avoid crash.

This commit also unifies the code path for both "skip empty cells"
option is selected and when that option is not selected, which
simplifies the code quite a bit.

Change-Id: I21054cccdd9f60e073695091740b9415dfef2985
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129267
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/inc/clipcontext.hxx b/sc/inc/clipcontext.hxx
index 5754feaaac59..32e2dd97767a 100644
--- a/sc/inc/clipcontext.hxx
+++ b/sc/inc/clipcontext.hxx
@@ -126,6 +126,13 @@ public:
 bool isTableProtected() const;
 
 bool isAsLink() const;
+
+/**
+ * Get the flag that indicates whether the "skip empty cells" paste option
+ * is selected. When this option is selected, empty cells in the clipboard
+ * document will not overwrite the corresponding non-empty cells in the
+ * destination range.
+ */
 bool isSkipEmptyCells() const;
 bool isCloneNotes() const;
 bool isDateCell( const ScColumn& rCol, SCROW nRow ) const;
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 384c12d52248..480e691366c2 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -281,7 +281,7 @@ public:
 void CopyFromClip(
 sc::CopyFromClipContext& rCxt, SCROW nRow1, SCROW nRow2, tools::Long 
nDy, ScColumn& rColumn );
 
-voidRemoveEditAttribs( SCROW nStartRow, SCROW nEndRow );
+void RemoveEditAttribs( sc::ColumnBlockPosition& rBlockPos, SCROW 
nStartRow, SCROW nEndRow );
 
 //  Selection (?) of this document
 void MixMarked(
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 905fc0c3373c..ef20c848e622 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1228,10 +1228,13 @@ public:
 
 }
 
-void ScColumn::RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow )
+void ScColumn::RemoveEditAttribs( sc::ColumnBlockPosition& rBlockPos, SCROW 
nStartRow, SCROW nEndRow )
 {
 RemoveEditAttribsHandler aFunc(maCells, ());
-sc::ProcessEditText(maCells.begin(), maCells, nStartRow, nEndRow, aFunc);
+
+rBlockPos.miCellPos = sc::ProcessEditText(
+rBlockPos.miCellPos, maCells, nStartRow, nEndRow, aFunc);
+
 aFunc.commitStrings();
 }
 
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 68eb921fd354..74b2e1ac7fad 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -1023,7 +1023,7 @@ void ScColumn::DeleteArea(
 if ( nDelFlag & InsertDeleteFlags::EDITATTR )
 {
 OSL_ENSURE( nContFlag == InsertDeleteFlags::NONE, "DeleteArea: Wrong 
Flags" );
-RemoveEditAttribs( nStartRow, nEndRow );
+RemoveEditAttribs(aBlockPos, nStartRow, nEndRow);
 }
 
 // Delete attributes just now
@@ -1123,7 +1123,16 @@ public:
 mpSharedStringPool(pSharedStringPool)
 {
 if (mpDestBlockPos)
+{
+{
+// Re-initialize the broadcaster position hint, which may have
+// become invalid by the time it gets here...
+sc::ColumnBlockPosition aTempPos;
+mrDestCol.InitBlockPosition(aTempPos);
+mpDestBlockPos->miBroadcasterPos = aTempPos.miBroadcasterPos;
+}
 maDestBlockPos = *mpDestBlockPos;
+}
 else
 mrDestCol.InitBlockPosition(maDestBlockPos);
 }
@@ -1357,7 +1366,7 @@ public:
 mpDestBlockPos(rCxt.getBlockPosition(nDestTab, nDestCol))
 {
 if (mpDestBlockPos)
-maDestBlockPos = *mpDestBlockPos;
+maDestBlockPos.miCellTextAttrPos = 
mpDestBlockPos->miCellTextAttrPos;
 else
 rDestCol.InitBlockPosition(maDestBlockPos);
 }
@@ -1366,7 +1375,7 @@ public:
 {
 if (mpDestBlockPos)
 // Don't forget to save this to the context!
-*mpDestBlockPos = maDestBlockPos;
+mpDestBlockPos->miCellTextAttrPos = 
maDestBlockPos.miCellTextAttrPos;
 }
 
 void operator() ( const sc::CellTextAttrStoreType::value_type& aNode, 
size_t nOffset, size_t nDataSize )
@@ -1392,6 +1401,10 @@ public:
 void ScColumn::CopyFromClip(
 sc::CopyFromClipContext& rCxt, SCROW nRow1, SCROW nRow2, tools::Long nDy, 
ScColumn& rColumn )
 {
+sc::ColumnBlockPosition* 

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

 sc/inc/clipcontext.hxx  |4 +--
 sc/inc/document.hxx |   28 --
 sc/qa/unit/ucalc_copypaste.cxx  |2 -
 sc/source/core/data/clipcontext.cxx |8 +++
 sc/source/core/data/column3.cxx |4 +--
 sc/source/core/data/column4.cxx |2 -
 sc/source/core/data/document.cxx|   14 ++---
 sc/source/ui/inc/undoblk.hxx|4 +--
 sc/source/ui/inc/viewfunc.hxx   |   30 
 sc/source/ui/undo/undoblk.cxx   |2 -
 sc/source/ui/view/viewfun3.cxx  |   38 ++--
 11 files changed, 73 insertions(+), 63 deletions(-)

New commits:
commit e8032897b4a012d8e236211ee6e5ce89fb90492e
Author: Kohei Yoshida 
AuthorDate: Fri Jan 28 22:51:52 2022 -0500
Commit: Kohei Yoshida 
CommitDate: Sat Jan 29 05:48:34 2022 +0100

Standardize the flag name on bSkipEmptyCells.

And document what the flag does. This corresponds with the "Skip
empty cells" check box in the Paste Special dialog.

Change-Id: Ic6cf9099efbee43f737a1472a4e275839e3d2c82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129130
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/inc/clipcontext.hxx b/sc/inc/clipcontext.hxx
index ccce671eea65..5754feaaac59 100644
--- a/sc/inc/clipcontext.hxx
+++ b/sc/inc/clipcontext.hxx
@@ -63,7 +63,7 @@ class SC_DLLPUBLIC CopyFromClipContext final : public 
ClipContextBase
 
 ScConditionalFormatList* mpCondFormatList;
 bool mbAsLink:1;
-bool mbSkipAttrForEmptyCells:1;
+bool mbSkipEmptyCells:1;
 bool mbCloneNotes:1;
 bool mbTableProtected:1;
 
@@ -126,7 +126,7 @@ public:
 bool isTableProtected() const;
 
 bool isAsLink() const;
-bool isSkipAttrForEmptyCells() const;
+bool isSkipEmptyCells() const;
 bool isCloneNotes() const;
 bool isDateCell( const ScColumn& rCol, SCROW nRow ) const;
 };
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 85c6829b4a54..87fb59e8980d 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1628,17 +1628,23 @@ public:
const ScMarkData& rMark,  InsertDeleteFlags 
nInsFlag,
sc::ColumnSpanSet& rBroadcastSpans );
 
-/** If pDestRanges is given it overrides rDestRange, rDestRange in this
-case is the overall encompassing range. */
-SC_DLLPUBLIC void   CopyFromClip( const ScRange& rDestRange, const 
ScMarkData& rMark,
-InsertDeleteFlags nInsFlag,
-ScDocument* pRefUndoDoc,
-ScDocument* pClipDoc,
-bool bResetCut = true,
-bool bAsLink = false,
-bool bIncludeFiltered = true,
-bool bSkipAttrForEmpty = false,
-const ScRangeList * pDestRanges = 
nullptr );
+/**
+ * Paste data from a clipboard document into this document.
+ *
+ * @param rDestRange destination range.
+ * @param pClipDoc pointer to the clipboard document to copy data from.
+ * @param bSkipEmptyCells if this flag is set, empty cells in the source
+ *range in the clipboard document will not 
overwrite
+ *the target destination cells.
+ * @param pDestRanges If pDestRanges is given it overrides rDestRange, 
where
+ *rDestRange becomes the overall encompassing range.
+ */
+SC_DLLPUBLIC void CopyFromClip(
+const ScRange& rDestRange, const ScMarkData& rMark, InsertDeleteFlags 
nInsFlag,
+ScDocument* pRefUndoDoc, ScDocument* pClipDoc,
+bool bResetCut = true, bool bAsLink = false,
+bool bIncludeFiltered = true, bool bSkipEmptyCells = false,
+const ScRangeList* pDestRanges = nullptr );
 
 voidCopyMultiRangeFromClip(const ScAddress& rDestPos, 
const ScMarkData& rMark,
InsertDeleteFlags nInsFlag, 
ScDocument* pClipDoc,
diff --git a/sc/qa/unit/ucalc_copypaste.cxx b/sc/qa/unit/ucalc_copypaste.cxx
index 61ecdd651d70..50850c59fc2b 100644
--- a/sc/qa/unit/ucalc_copypaste.cxx
+++ b/sc/qa/unit/ucalc_copypaste.cxx
@@ -457,7 +457,7 @@ void 
TestCopyPaste::prepareUndoAfterPaste(ScDocumentUniquePtr& pPasteUndoDoc,
 
 ScUndoPasteOptions aOptions; // store options for repeat
 aOptions.nFunction = nFunction;
-aOptions.bSkipEmpty = bSkipEmpty;
+aOptions.bSkipEmptyCells = bSkipEmpty;
 aOptions.bTranspose = bTranspose;
 aOptions.bAsLink = bAsLink;
 aOptions.eMoveMode = eMoveMode;
diff --git a/sc/source/core/data/clipcontext.cxx 
b/sc/source/core/data/clipcontext.cxx
index 0d336940fece..02e2bcc86652 100644
--- a/sc/source/core/data/clipcontext.cxx
+++ 

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

 sc/source/filter/inc/orcusinterface.hxx |   63 +
 sc/source/filter/orcus/interface.cxx|  389 ++--
 2 files changed, 197 insertions(+), 255 deletions(-)

New commits:
commit afd8e27195bef78df3eb2d3ecab9cc3dae695b64
Author: Kohei Yoshida 
AuthorDate: Wed Dec 15 23:42:56 2021 -0500
Commit: Xisco Fauli 
CommitDate: Mon Dec 20 16:11:38 2021 +0100

tdf#103331: Make styles attributes optional.

Apply only those that are actually specified.

Change-Id: Ib2e090fefe4dbfe3d4fca2b953bcf51d97d9ddec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126901
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
(cherry picked from commit 6b2da3ae3ea7f47dff3c807c151f88a9e1ae9964)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127167
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/filter/inc/orcusinterface.hxx 
b/sc/source/filter/inc/orcusinterface.hxx
index 935854c46e3f..08e9c4a56871 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -355,22 +355,14 @@ private:
 
 struct font
 {
-OUString maName;
-double mnSize;
-Color maColor;
-bool mbBold;
-bool mbItalic;
-
-bool mbHasFontAttr;
-bool mbHasUnderlineAttr;
-bool mbHasStrikeout;
-
-FontLineStyle meUnderline;
-Color maUnderlineColor;
-
-FontStrikeout meStrikeout;
-
-font();
+std::optional maName;
+std::optional mnSize;
+std::optional maColor;
+std::optional mbBold;
+std::optional mbItalic;
+std::optional meUnderline;
+std::optional maUnderlineColor;
+std::optional meStrikeout;
 
 void applyToItemSet(SfxItemSet& rSet) const;
 };
@@ -380,13 +372,9 @@ private:
 
 struct fill
 {
-orcus::spreadsheet::fill_pattern_t mePattern;
-Color maFgColor;
-Color maBgColor;
-
-bool mbHasFillAttr;
-
-fill();
+std::optional mePattern;
+std::optional maFgColor;
+std::optional maBgColor; // currently not used.
 
 void applyToItemSet(SfxItemSet& rSet) const;
 };
@@ -398,17 +386,12 @@ private:
 {
 struct border_line
 {
-SvxBorderLineStyle meStyle;
-Color maColor;
-double mnWidth;
-
-border_line();
+std::optional meStyle;
+std::optional maColor;
+std::optional mnWidth;
 };
-std::map 
border_lines;
-
-bool mbHasBorderAttr;
 
-border();
+std::map 
maBorders;
 
 void applyToItemSet(SfxItemSet& rSet) const;
 };
@@ -418,14 +401,11 @@ private:
 
 struct protection
 {
-bool mbHidden;
-bool mbLocked;
-bool mbPrintContent;
-bool mbFormulaHidden;
+std::optional mbLocked;
+std::optional mbHidden;
+std::optional mbPrintContent;
+std::optional mbFormulaHidden;
 
-bool mbHasProtectionAttr;
-
-protection();
 void applyToItemSet(SfxItemSet& rSet) const;
 };
 
@@ -434,11 +414,8 @@ private:
 
 struct number_format
 {
-OUString maCode;
-
-bool mbHasNumberFormatAttr;
+std::optional maCode;
 
-number_format();
 void applyToItemSet(SfxItemSet& rSet, const ScDocument& rDoc) const;
 };
 
diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index f5f2fd8a11c0..fc8e5bfefa1d 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -1314,34 +1314,6 @@ ScOrcusStyles::ScOrcusStyles( ScOrcusFactory& rFactory, 
bool bSkipDefaultStyles
 rDoc.GetStyleSheetPool()->CreateStandardStyles();
 }
 
-ScOrcusStyles::font::font():
-mnSize(10),
-maColor(COL_BLACK),
-mbBold(false),
-mbItalic(false),
-mbHasFontAttr(false),
-mbHasUnderlineAttr(false),
-mbHasStrikeout(false),
-meUnderline(LINESTYLE_NONE),
-maUnderlineColor(COL_WHITE),
-meStrikeout(STRIKEOUT_NONE)
-{
-}
-
-ScOrcusStyles::fill::fill():
-mePattern(orcus::spreadsheet::fill_pattern_t::none),
-maFgColor(COL_WHITE),
-maBgColor(COL_WHITE),
-mbHasFillAttr(false)
-{
-}
-
-ScOrcusStyles::number_format::number_format():
-maCode(""),
-mbHasNumberFormatAttr(false)
-{
-}
-
 /*
 namespace {
 
@@ -1356,76 +1328,67 @@ std::ostream& operator<<(std::ostream& rStrm, const 
Color& rColor)
 
 void ScOrcusStyles::font::applyToItemSet(SfxItemSet& rSet) const
 {
-if (mbHasFontAttr)
+if (mbItalic)
 {
-FontItalic eItalic = mbItalic ? ITALIC_NORMAL : ITALIC_NONE;
+FontItalic eItalic = *mbItalic ? ITALIC_NORMAL : ITALIC_NONE;
 rSet.Put(SvxPostureItem(eItalic, ATTR_FONT_POSTURE));
 rSet.Put(SvxPostureItem(eItalic, ATTR_CJK_FONT_POSTURE));
 rSet.Put(SvxPostureItem(eItalic, ATTR_CTL_FONT_POSTURE));
+}
 
-

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

 sc/qa/unit/data/xml/styles.xml |   16 +
 sc/qa/unit/subsequent_filters_test.cxx |   40 -
 2 files changed, 51 insertions(+), 5 deletions(-)

New commits:
commit 9547114247c09a90f283e42c4db947ae57e9529c
Author: Kohei Yoshida 
AuthorDate: Fri Dec 17 17:42:15 2021 -0500
Commit: Kohei Yoshida 
CommitDate: Sat Dec 18 18:08:33 2021 +0100

tdf#103331: Add a test case for inherited font weight attributes.

Change-Id: I8ebca3ab492313a3f7aa9019533bbb7eee2e4a89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127019
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/qa/unit/data/xml/styles.xml b/sc/qa/unit/data/xml/styles.xml
index fa5cd2759ca2..eb402a0e5ce0 100644
--- a/sc/qa/unit/data/xml/styles.xml
+++ b/sc/qa/unit/data/xml/styles.xml
@@ -31,4 +31,20 @@
 
 
   
+
+  
+
+  
+  
+
+
+  
+  
+
+
+  
+  
+
+  
+
 
diff --git a/sc/qa/unit/subsequent_filters_test.cxx 
b/sc/qa/unit/subsequent_filters_test.cxx
index 3c4939b3e8e6..39bf4cd443f6 100644
--- a/sc/qa/unit/subsequent_filters_test.cxx
+++ b/sc/qa/unit/subsequent_filters_test.cxx
@@ -2914,7 +2914,8 @@ void ScFiltersTest::testOrcusODSStyleInterface()
 CPPUNIT_ASSERT_MESSAGE("Style Name3 : Doesn't have Attribute Protection, 
but it should have.",
 pStyleSheet->GetItemSet().HasItem(ATTR_PROTECTION, ));
 
-CPPUNIT_ASSERT_MESSAGE("Style Name 3 : Error with Protection attribute." 
,bool(ScProtectionAttr(true, false, true, true) == *pItem));
+CPPUNIT_ASSERT_MESSAGE("Style Name 3 : Error with Protection attribute.",
+bool(ScProtectionAttr(true, false, true, true) == *pItem));
 
 /* Test for Style "Name4"
  * Hidden, protected and content is printed.
@@ -2923,20 +2924,22 @@ void ScFiltersTest::testOrcusODSStyleInterface()
 CPPUNIT_ASSERT_MESSAGE("Style Name4 : Doesn't have Attribute Protection, 
but it should have.",
 pStyleSheet->GetItemSet().HasItem(ATTR_PROTECTION, ));
 
-CPPUNIT_ASSERT_MESSAGE("Style Name 4 : Error with Protection attribute." 
,bool(ScProtectionAttr(true, true, false, false) == *pItem));
+CPPUNIT_ASSERT_MESSAGE("Style Name 4 : Error with Protection attribute.",
+bool(ScProtectionAttr(true, true, false, false) == *pItem));
 
-/* Test for Style "Name3"
+/* Test for Style "Name5"
  * Hidden, protected and content is printed.
  */
 pStyleSheet = pStyleSheetPool->FindCaseIns("Name5", SfxStyleFamily::Para);
 CPPUNIT_ASSERT_MESSAGE("Style Name5 : Doesn't have Attribute Protection, 
but it should have.",
 pStyleSheet->GetItemSet().HasItem(ATTR_PROTECTION, ));
 
-CPPUNIT_ASSERT_MESSAGE("Style Name 5 : Error with Protection attribute." 
,bool(ScProtectionAttr(false, false, false, true) == *pItem));
+CPPUNIT_ASSERT_MESSAGE("Style Name5 : Error with Protection attribute.",
+bool(ScProtectionAttr(false, false, false, true) == *pItem));
 
 CPPUNIT_ASSERT_MESSAGE("Style Name5 : Has Attribute Border, but it 
shouldn't.",
 !pStyleSheet->GetItemSet().HasItem(ATTR_BORDER, ));
-CPPUNIT_ASSERT_MESSAGE("Style Name5: Has Attribute background, but it 
shouldn't.",
+CPPUNIT_ASSERT_MESSAGE("Style Name5 : Has Attribute background, but it 
shouldn't.",
 !pStyleSheet->GetItemSet().HasItem(ATTR_BACKGROUND, ));
 CPPUNIT_ASSERT_MESSAGE("Style Name5 : Has Attribute font, but it 
shouldn't.",
 !pStyleSheet->GetItemSet().HasItem(ATTR_FONT, ));
@@ -3032,6 +3035,33 @@ void ScFiltersTest::testOrcusODSStyleInterface()
 const SvxVerJustifyItem* pVerJustify = static_cast(pItem);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Style Name10 :Error with ver justify", 
SvxCellVerJustify::Center, pVerJustify->GetValue());
 
+auto checkFontWeight = [pStyleSheetPool](const OUString& rName, FontWeight 
eExpected)
+{
+ScStyleSheet* pStyle = pStyleSheetPool->FindCaseIns(rName, 
SfxStyleFamily::Para);
+CPPUNIT_ASSERT(pStyle);
+
+const SfxPoolItem* p = nullptr;
+
+{
+std::ostringstream os;
+os << "Style named '" << rName << "' does not have a font weight 
attribute.";
+CPPUNIT_ASSERT_MESSAGE(os.str(), 
pStyle->GetItemSet().HasItem(ATTR_FONT_WEIGHT, ));
+}
+
+const SvxWeightItem* pWeight = static_cast(p);
+FontWeight eActual = pWeight->GetWeight();
+{
+std::ostringstream os;
+os << "Wrong font weight value for style named '" << rName << "': 
expected="
+<< eExpected << "; actual=" << eActual;
+CPPUNIT_ASSERT_EQUAL_MESSAGE(os.str(), eExpected, eActual);
+}
+};
+
+checkFontWeight("Accent", WEIGHT_BOLD);
+checkFontWeight("Accent 1", WEIGHT_BOLD); // inherits from 'Accent'
+checkFontWeight("Accent 2", WEIGHT_BOLD); // inherits from 'Accent'
+checkFontWeight("Accent 3", WEIGHT_BOLD); // inherits from 'Accent'
 }
 
 void 

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

 sc/source/filter/inc/orcusinterface.hxx |   63 +
 sc/source/filter/orcus/interface.cxx|  389 ++--
 2 files changed, 197 insertions(+), 255 deletions(-)

New commits:
commit 6b2da3ae3ea7f47dff3c807c151f88a9e1ae9964
Author: Kohei Yoshida 
AuthorDate: Wed Dec 15 23:42:56 2021 -0500
Commit: Kohei Yoshida 
CommitDate: Fri Dec 17 15:01:19 2021 +0100

tdf#103331: Make styles attributes optional.

Apply only those that are actually specified.

Change-Id: Ib2e090fefe4dbfe3d4fca2b953bcf51d97d9ddec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126901
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/filter/inc/orcusinterface.hxx 
b/sc/source/filter/inc/orcusinterface.hxx
index 935854c46e3f..08e9c4a56871 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -355,22 +355,14 @@ private:
 
 struct font
 {
-OUString maName;
-double mnSize;
-Color maColor;
-bool mbBold;
-bool mbItalic;
-
-bool mbHasFontAttr;
-bool mbHasUnderlineAttr;
-bool mbHasStrikeout;
-
-FontLineStyle meUnderline;
-Color maUnderlineColor;
-
-FontStrikeout meStrikeout;
-
-font();
+std::optional maName;
+std::optional mnSize;
+std::optional maColor;
+std::optional mbBold;
+std::optional mbItalic;
+std::optional meUnderline;
+std::optional maUnderlineColor;
+std::optional meStrikeout;
 
 void applyToItemSet(SfxItemSet& rSet) const;
 };
@@ -380,13 +372,9 @@ private:
 
 struct fill
 {
-orcus::spreadsheet::fill_pattern_t mePattern;
-Color maFgColor;
-Color maBgColor;
-
-bool mbHasFillAttr;
-
-fill();
+std::optional mePattern;
+std::optional maFgColor;
+std::optional maBgColor; // currently not used.
 
 void applyToItemSet(SfxItemSet& rSet) const;
 };
@@ -398,17 +386,12 @@ private:
 {
 struct border_line
 {
-SvxBorderLineStyle meStyle;
-Color maColor;
-double mnWidth;
-
-border_line();
+std::optional meStyle;
+std::optional maColor;
+std::optional mnWidth;
 };
-std::map 
border_lines;
-
-bool mbHasBorderAttr;
 
-border();
+std::map 
maBorders;
 
 void applyToItemSet(SfxItemSet& rSet) const;
 };
@@ -418,14 +401,11 @@ private:
 
 struct protection
 {
-bool mbHidden;
-bool mbLocked;
-bool mbPrintContent;
-bool mbFormulaHidden;
+std::optional mbLocked;
+std::optional mbHidden;
+std::optional mbPrintContent;
+std::optional mbFormulaHidden;
 
-bool mbHasProtectionAttr;
-
-protection();
 void applyToItemSet(SfxItemSet& rSet) const;
 };
 
@@ -434,11 +414,8 @@ private:
 
 struct number_format
 {
-OUString maCode;
-
-bool mbHasNumberFormatAttr;
+std::optional maCode;
 
-number_format();
 void applyToItemSet(SfxItemSet& rSet, const ScDocument& rDoc) const;
 };
 
diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index f5f2fd8a11c0..fc8e5bfefa1d 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -1314,34 +1314,6 @@ ScOrcusStyles::ScOrcusStyles( ScOrcusFactory& rFactory, 
bool bSkipDefaultStyles
 rDoc.GetStyleSheetPool()->CreateStandardStyles();
 }
 
-ScOrcusStyles::font::font():
-mnSize(10),
-maColor(COL_BLACK),
-mbBold(false),
-mbItalic(false),
-mbHasFontAttr(false),
-mbHasUnderlineAttr(false),
-mbHasStrikeout(false),
-meUnderline(LINESTYLE_NONE),
-maUnderlineColor(COL_WHITE),
-meStrikeout(STRIKEOUT_NONE)
-{
-}
-
-ScOrcusStyles::fill::fill():
-mePattern(orcus::spreadsheet::fill_pattern_t::none),
-maFgColor(COL_WHITE),
-maBgColor(COL_WHITE),
-mbHasFillAttr(false)
-{
-}
-
-ScOrcusStyles::number_format::number_format():
-maCode(""),
-mbHasNumberFormatAttr(false)
-{
-}
-
 /*
 namespace {
 
@@ -1356,76 +1328,67 @@ std::ostream& operator<<(std::ostream& rStrm, const 
Color& rColor)
 
 void ScOrcusStyles::font::applyToItemSet(SfxItemSet& rSet) const
 {
-if (mbHasFontAttr)
+if (mbItalic)
 {
-FontItalic eItalic = mbItalic ? ITALIC_NORMAL : ITALIC_NONE;
+FontItalic eItalic = *mbItalic ? ITALIC_NORMAL : ITALIC_NONE;
 rSet.Put(SvxPostureItem(eItalic, ATTR_FONT_POSTURE));
 rSet.Put(SvxPostureItem(eItalic, ATTR_CJK_FONT_POSTURE));
 rSet.Put(SvxPostureItem(eItalic, ATTR_CTL_FONT_POSTURE));
+}
 
-FontWeight eWeight = mbBold ? WEIGHT_BOLD : WEIGHT_NORMAL;
+if (mbBold)
+{
+FontWeight eWeight = *mbBold ? WEIGHT_BOLD : WEIGHT_NORMAL;
 

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

 download.lst   
|4 
 external/liborcus/Library_orcus.mk 
|3 
 external/liborcus/UnpackedTarball_liborcus.mk  
|4 
 external/liborcus/boost-filesystem.patch.1 
|   41 
 external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1 
|   27 
 external/liborcus/remove-unused-parameters.patch.1 
| 1209 --
 external/liborcus/unused-variables.patch.1 
|   24 
 external/liborcus/windows-constants-hack.patch 
|4 
 sc/source/filter/orcus/interface.cxx   
|7 
 9 files changed, 10 insertions(+), 1313 deletions(-)

New commits:
commit dd4d715ef775db456c0c9653a3d9f9b439e82e8e
Author: Kohei Yoshida 
AuthorDate: Fri Dec 10 22:02:24 2021 -0500
Commit: Xisco Fauli 
CommitDate: Thu Dec 16 14:46:29 2021 +0100

Update liborcus to 0.17.2.

Change-Id: I76c0d57da63c1e35f80b13071793dbbb27cb218a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126655
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
(cherry picked from commit aadbac5467bb6ab768f87ed6ec003c55159d54aa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126886

diff --git a/download.lst b/download.lst
index 8dd656fd5de9..b2ca26814d5b 100644
--- a/download.lst
+++ b/download.lst
@@ -204,8 +204,8 @@ export OPENLDAP_SHA256SUM := 
99f37d6747d88206c470067eda624d5e48c1011e943ec0ab217
 export OPENLDAP_TARBALL := openldap-2.4.59.tgz
 export OPENSSL_SHA256SUM := 
0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
 export OPENSSL_TARBALL := openssl-1.1.1l.tar.gz
-export ORCUS_SHA256SUM := 
2ef9d2b5ee374c683cf631b78356b110510ab895788a68d778e225d8c4176d1b
-export ORCUS_TARBALL := liborcus-0.17.0.tar.bz2
+export ORCUS_SHA256SUM := 
2a86c405a5929f749b27637509596421d46805753364ab258b035fd01fbde143
+export ORCUS_TARBALL := liborcus-0.17.2.tar.bz2
 export PAGEMAKER_SHA256SUM := 
66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
 export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
 export PDFIUM_SHA256SUM := 
ee80fe0a3b20ef5c5babc494cd655d1b1a0bdec710acb04524789df500c563bf
diff --git a/external/liborcus/Library_orcus.mk 
b/external/liborcus/Library_orcus.mk
index 0a0ca582882a..3c318797a031 100644
--- a/external/liborcus/Library_orcus.mk
+++ b/external/liborcus/Library_orcus.mk
@@ -132,12 +132,15 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,orcus,\
UnpackedTarball/liborcus/src/liborcus/xlsx_workbook_context \
UnpackedTarball/liborcus/src/liborcus/xml_context_base \
UnpackedTarball/liborcus/src/liborcus/xml_context_global \
+   UnpackedTarball/liborcus/src/liborcus/xml_element_validator \
+   UnpackedTarball/liborcus/src/liborcus/xml_empty_context \
UnpackedTarball/liborcus/src/liborcus/xml_map_tree \
UnpackedTarball/liborcus/src/liborcus/xml_simple_stream_handler \
UnpackedTarball/liborcus/src/liborcus/xml_stream_handler \
UnpackedTarball/liborcus/src/liborcus/xml_stream_parser \
UnpackedTarball/liborcus/src/liborcus/xml_structure_mapper \
UnpackedTarball/liborcus/src/liborcus/xml_structure_tree \
+   UnpackedTarball/liborcus/src/liborcus/xml_util \
UnpackedTarball/liborcus/src/liborcus/xpath_parser \
UnpackedTarball/liborcus/src/liborcus/yaml_document_tree \
 ))
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 86c30431e05d..87e462e33d91 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -24,11 +24,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/libtool.patch.0 \
external/liborcus/fix-pch.patch.0 \
external/liborcus/liborcus_newline.patch.1 \
-   external/liborcus/remove-unused-parameters.patch.1 \
-   external/liborcus/unused-variables.patch.1 \
-   external/liborcus/boost-filesystem.patch.1 \
external/liborcus/std-get-busted.patch.1 \
-   
external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/boost-filesystem.patch.1 
b/external/liborcus/boost-filesystem.patch.1
deleted file mode 100644
index 14128b4e1c67..
--- a/external/liborcus/boost-filesystem.patch.1
+++ /dev/null
@@ -1,41 +0,0 @@
-From e44737bad582fa2a05a23820e49d7930db710412 Mon Sep 17 00:00:00 2001
-From: Kohei Yoshida 
-Date: Tue, 2 Nov 2021 21:33:19 -0400
-Subject: [PATCH] Try using boost::filesystem instead of std::filesystem.
-
-std::filesystem still seems unreliable.

- src/parser/stream.cpp | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git 

[Libreoffice-commits] core.git: download.lst external/liborcus sc/source

 download.lst   
|4 
 external/liborcus/Library_orcus.mk 
|3 
 external/liborcus/UnpackedTarball_liborcus.mk  
|4 
 external/liborcus/boost-filesystem.patch.1 
|   41 
 external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1 
|   27 
 external/liborcus/remove-unused-parameters.patch.1 
| 1209 --
 external/liborcus/unused-variables.patch.1 
|   24 
 external/liborcus/windows-constants-hack.patch 
|4 
 sc/source/filter/orcus/interface.cxx   
|7 
 9 files changed, 10 insertions(+), 1313 deletions(-)

New commits:
commit aadbac5467bb6ab768f87ed6ec003c55159d54aa
Author: Kohei Yoshida 
AuthorDate: Fri Dec 10 22:02:24 2021 -0500
Commit: Kohei Yoshida 
CommitDate: Thu Dec 16 04:45:04 2021 +0100

Update liborcus to 0.17.2.

Change-Id: I76c0d57da63c1e35f80b13071793dbbb27cb218a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126655
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index 3d5f8917b286..ef60c6c6def8 100644
--- a/download.lst
+++ b/download.lst
@@ -198,8 +198,8 @@ export OPENLDAP_SHA256SUM := 
99f37d6747d88206c470067eda624d5e48c1011e943ec0ab217
 export OPENLDAP_TARBALL := openldap-2.4.59.tgz
 export OPENSSL_SHA256SUM := 
0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
 export OPENSSL_TARBALL := openssl-1.1.1l.tar.gz
-export ORCUS_SHA256SUM := 
2ef9d2b5ee374c683cf631b78356b110510ab895788a68d778e225d8c4176d1b
-export ORCUS_TARBALL := liborcus-0.17.0.tar.bz2
+export ORCUS_SHA256SUM := 
2a86c405a5929f749b27637509596421d46805753364ab258b035fd01fbde143
+export ORCUS_TARBALL := liborcus-0.17.2.tar.bz2
 export PAGEMAKER_SHA256SUM := 
66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
 export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
 export PDFIUM_SHA256SUM := 
ee80fe0a3b20ef5c5babc494cd655d1b1a0bdec710acb04524789df500c563bf
diff --git a/external/liborcus/Library_orcus.mk 
b/external/liborcus/Library_orcus.mk
index 0a0ca582882a..3c318797a031 100644
--- a/external/liborcus/Library_orcus.mk
+++ b/external/liborcus/Library_orcus.mk
@@ -132,12 +132,15 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,orcus,\
UnpackedTarball/liborcus/src/liborcus/xlsx_workbook_context \
UnpackedTarball/liborcus/src/liborcus/xml_context_base \
UnpackedTarball/liborcus/src/liborcus/xml_context_global \
+   UnpackedTarball/liborcus/src/liborcus/xml_element_validator \
+   UnpackedTarball/liborcus/src/liborcus/xml_empty_context \
UnpackedTarball/liborcus/src/liborcus/xml_map_tree \
UnpackedTarball/liborcus/src/liborcus/xml_simple_stream_handler \
UnpackedTarball/liborcus/src/liborcus/xml_stream_handler \
UnpackedTarball/liborcus/src/liborcus/xml_stream_parser \
UnpackedTarball/liborcus/src/liborcus/xml_structure_mapper \
UnpackedTarball/liborcus/src/liborcus/xml_structure_tree \
+   UnpackedTarball/liborcus/src/liborcus/xml_util \
UnpackedTarball/liborcus/src/liborcus/xpath_parser \
UnpackedTarball/liborcus/src/liborcus/yaml_document_tree \
 ))
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 86c30431e05d..87e462e33d91 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -24,11 +24,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/libtool.patch.0 \
external/liborcus/fix-pch.patch.0 \
external/liborcus/liborcus_newline.patch.1 \
-   external/liborcus/remove-unused-parameters.patch.1 \
-   external/liborcus/unused-variables.patch.1 \
-   external/liborcus/boost-filesystem.patch.1 \
external/liborcus/std-get-busted.patch.1 \
-   
external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/boost-filesystem.patch.1 
b/external/liborcus/boost-filesystem.patch.1
deleted file mode 100644
index 14128b4e1c67..
--- a/external/liborcus/boost-filesystem.patch.1
+++ /dev/null
@@ -1,41 +0,0 @@
-From e44737bad582fa2a05a23820e49d7930db710412 Mon Sep 17 00:00:00 2001
-From: Kohei Yoshida 
-Date: Tue, 2 Nov 2021 21:33:19 -0400
-Subject: [PATCH] Try using boost::filesystem instead of std::filesystem.
-
-std::filesystem still seems unreliable.

- src/parser/stream.cpp | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/parser/stream.cpp b/src/parser/stream.cpp
-index 09855300..00395f59 100644
 a/src/parser/stream.cpp
-+++ b/src/parser/stream.cpp
-@@ -17,12 

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

 download.lst|4 
 external/mdds/UnpackedTarball_mdds.mk   |2 
 external/mdds/remove-more-unused-parameters.patch.1 |   42 -
 external/mdds/remove-unused-parameters.patch.1  |   93 
 4 files changed, 2 insertions(+), 139 deletions(-)

New commits:
commit db37343aca0584cbaaf8703a91998d9938a3177d
Author: Kohei Yoshida 
AuthorDate: Mon Dec 13 22:05:06 2021 -0500
Commit: Xisco Fauli 
CommitDate: Tue Dec 14 15:50:35 2021 +0100

Update mdds to 2.0.1.

Change-Id: I7d5e5432d75caf671434977b48b415839cbf90b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126795
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
(cherry picked from commit e9fdfd353f163bd327af5666adb64ab35922a7db)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126810

diff --git a/download.lst b/download.lst
index 8ec9ac8c3082..8dd656fd5de9 100644
--- a/download.lst
+++ b/download.lst
@@ -178,8 +178,8 @@ export LXML_SHA256SUM := 
940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a
 export LXML_TARBALL := lxml-4.1.1.tgz
 export MARIADB_CONNECTOR_C_SHA256SUM := 
431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b
 export MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.1.8-src.tar.gz
-export MDDS_SHA256SUM := 
5a0fb2dd88a6420e0a69ec4c7259bcd1fe8f4a80b232c150e11f3da4c68236d7
-export MDDS_TARBALL := mdds-2.0.0.tar.bz2
+export MDDS_SHA256SUM := 
3ab33fce58e6acf9540cc1a52264be6863ef80f55ac287194cc98cda48e71fe6
+export MDDS_TARBALL := mdds-2.0.1.tar.bz2
 export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
diff --git a/external/mdds/UnpackedTarball_mdds.mk 
b/external/mdds/UnpackedTarball_mdds.mk
index cf5bd48a1eb6..c015f4c13f5a 100644
--- a/external/mdds/UnpackedTarball_mdds.mk
+++ b/external/mdds/UnpackedTarball_mdds.mk
@@ -14,8 +14,6 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL)))
 $(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
-   external/mdds/remove-unused-parameters.patch.1 \
-   external/mdds/remove-more-unused-parameters.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/mdds/remove-more-unused-parameters.patch.1 
b/external/mdds/remove-more-unused-parameters.patch.1
deleted file mode 100644
index c0c29471c9ed..
--- a/external/mdds/remove-more-unused-parameters.patch.1
+++ /dev/null
@@ -1,42 +0,0 @@
-From cc24c84d35274aead5afe574c87ecd6368aa5e2a Mon Sep 17 00:00:00 2001
-From: Kohei Yoshida 
-Date: Tue, 2 Nov 2021 18:24:30 -0400
-Subject: [PATCH] More unused parameters.
-
-I personally cannot reproduce the warnings. But The android x86 build
-of LibreOffice generates the following build warnings:
-
-In file included from 
/home/tdf/lode/jenkins/workspace/android_x86/svl/source/misc/gridprinter.cxx:16:
-In file included from 
/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/multi_type_matrix.hpp:37:
-In file included from 
/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector.hpp:31:
-In file included from 
/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/main.hpp:35:
-/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/./block_util.hpp:49:27:
 error: unused parameter 'block_store' [-Werror,-Wunused-parameter]
-void operator()(Blks& block_store, int64_t start_block_index, int64_t 
delta) const
-  ^
-/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/./block_util.hpp:49:48:
 error: unused parameter 'start_block_index' [-Werror,-Wunused-parameter]
-void operator()(Blks& block_store, int64_t start_block_index, int64_t 
delta) const
-   ^
-/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/./block_util.hpp:49:75:
 error: unused parameter 'delta' [-Werror,-Wunused-parameter]
-void operator()(Blks& block_store, int64_t start_block_index, int64_t 
delta) const
-  ^
-3 errors generated.

- include/mdds/multi_type_vector/soa/block_util.hpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/mdds/multi_type_vector/soa/block_util.hpp 
b/include/mdds/multi_type_vector/soa/block_util.hpp
-index d10ee67..73ba27c 100644
 a/include/mdds/multi_type_vector/soa/block_util.hpp
-+++ b/include/mdds/multi_type_vector/soa/block_util.hpp
-@@ -46,7 +46,7 @@ namespace detail {
- template
- 

[Libreoffice-commits] core.git: download.lst external/mdds

 download.lst|4 
 external/mdds/UnpackedTarball_mdds.mk   |2 
 external/mdds/remove-more-unused-parameters.patch.1 |   42 -
 external/mdds/remove-unused-parameters.patch.1  |   93 
 4 files changed, 2 insertions(+), 139 deletions(-)

New commits:
commit e9fdfd353f163bd327af5666adb64ab35922a7db
Author: Kohei Yoshida 
AuthorDate: Mon Dec 13 22:05:06 2021 -0500
Commit: Kohei Yoshida 
CommitDate: Tue Dec 14 05:32:10 2021 +0100

Update mdds to 2.0.1.

Change-Id: I7d5e5432d75caf671434977b48b415839cbf90b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126795
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index 1a70e6a44ba0..0e93fecf0e9d 100644
--- a/download.lst
+++ b/download.lst
@@ -178,8 +178,8 @@ export LXML_SHA256SUM := 
940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a
 export LXML_TARBALL := lxml-4.1.1.tgz
 export MARIADB_CONNECTOR_C_SHA256SUM := 
431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b
 export MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.1.8-src.tar.gz
-export MDDS_SHA256SUM := 
5a0fb2dd88a6420e0a69ec4c7259bcd1fe8f4a80b232c150e11f3da4c68236d7
-export MDDS_TARBALL := mdds-2.0.0.tar.bz2
+export MDDS_SHA256SUM := 
3ab33fce58e6acf9540cc1a52264be6863ef80f55ac287194cc98cda48e71fe6
+export MDDS_TARBALL := mdds-2.0.1.tar.bz2
 export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
diff --git a/external/mdds/UnpackedTarball_mdds.mk 
b/external/mdds/UnpackedTarball_mdds.mk
index cf5bd48a1eb6..c015f4c13f5a 100644
--- a/external/mdds/UnpackedTarball_mdds.mk
+++ b/external/mdds/UnpackedTarball_mdds.mk
@@ -14,8 +14,6 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL)))
 $(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
-   external/mdds/remove-unused-parameters.patch.1 \
-   external/mdds/remove-more-unused-parameters.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/mdds/remove-more-unused-parameters.patch.1 
b/external/mdds/remove-more-unused-parameters.patch.1
deleted file mode 100644
index c0c29471c9ed..
--- a/external/mdds/remove-more-unused-parameters.patch.1
+++ /dev/null
@@ -1,42 +0,0 @@
-From cc24c84d35274aead5afe574c87ecd6368aa5e2a Mon Sep 17 00:00:00 2001
-From: Kohei Yoshida 
-Date: Tue, 2 Nov 2021 18:24:30 -0400
-Subject: [PATCH] More unused parameters.
-
-I personally cannot reproduce the warnings. But The android x86 build
-of LibreOffice generates the following build warnings:
-
-In file included from 
/home/tdf/lode/jenkins/workspace/android_x86/svl/source/misc/gridprinter.cxx:16:
-In file included from 
/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/multi_type_matrix.hpp:37:
-In file included from 
/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector.hpp:31:
-In file included from 
/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/main.hpp:35:
-/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/./block_util.hpp:49:27:
 error: unused parameter 'block_store' [-Werror,-Wunused-parameter]
-void operator()(Blks& block_store, int64_t start_block_index, int64_t 
delta) const
-  ^
-/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/./block_util.hpp:49:48:
 error: unused parameter 'start_block_index' [-Werror,-Wunused-parameter]
-void operator()(Blks& block_store, int64_t start_block_index, int64_t 
delta) const
-   ^
-/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/./block_util.hpp:49:75:
 error: unused parameter 'delta' [-Werror,-Wunused-parameter]
-void operator()(Blks& block_store, int64_t start_block_index, int64_t 
delta) const
-  ^
-3 errors generated.

- include/mdds/multi_type_vector/soa/block_util.hpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/mdds/multi_type_vector/soa/block_util.hpp 
b/include/mdds/multi_type_vector/soa/block_util.hpp
-index d10ee67..73ba27c 100644
 a/include/mdds/multi_type_vector/soa/block_util.hpp
-+++ b/include/mdds/multi_type_vector/soa/block_util.hpp
-@@ -46,7 +46,7 @@ namespace detail {
- template
- struct adjust_block_positions
- {
--void operator()(Blks& block_store, int64_t start_block_index, int64_t 
delta) const
-+void 

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

 sc/inc/column.hxx   |2 --
 sc/inc/mtvelements.hxx  |3 +++
 sc/source/core/data/column.cxx  |3 +--
 sc/source/core/data/column3.cxx |2 ++
 sc/source/core/data/mtvelements.cxx |5 +
 5 files changed, 11 insertions(+), 4 deletions(-)

New commits:
commit 23214f1c14c4d3981dad90b6e3ba6e4ca2c8c30e
Author: Kohei Yoshida 
AuthorDate: Thu Nov 4 09:58:35 2021 -0400
Commit: Kohei Yoshida 
CommitDate: Fri Nov 5 01:54:01 2021 +0100

Blind fix for ubusan error

from https://ci.libreoffice.org/job/lo_ubsan/2189/

  [_RUN_] Test::testCellBroadcaster
[...]
  ==24129==ERROR: AddressSanitizer: heap-use-after-free on address 
0x6176c470 at pc 0x2ab6e05145e4 bp 0x7ffecaa28d70 sp 0x7ffecaa28d68
  READ of size 8 at 0x6176c470 thread T0
  #0 0x2ab6e05145e3 in 
sc::CellStoreEvent::element_block_released(mdds::mtv::base_element_block 
const*) /sc/source/core/data/mtvelements.cxx:47:13
  #1 0x2ab6de749427 in 
mdds::mtv::soa::multi_type_vector, mdds::mtv::noncopyable_managed_element_block<53, 
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, 
ScFormulaCell> >, sc::CellStoreTrait>::delete_element_block(unsigned long) 
/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:403:17
  #2 0x2ab6de74921b in 
mdds::mtv::soa::multi_type_vector, mdds::mtv::noncopyable_managed_element_block<53, 
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, 
ScFormulaCell> >, sc::CellStoreTrait>::delete_element_blocks(unsigned long, 
unsigned long) 
/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:412:9
  #3 0x2ab6de733225 in 
mdds::mtv::soa::multi_type_vector, mdds::mtv::noncopyable_managed_element_block<53, 
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, 
ScFormulaCell> >, sc::CellStoreTrait>::clear() 
/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1088:5
  #4 0x2ab6df024987 in ScColumn::FreeAll() 
/sc/source/core/data/column3.cxx:161:13
  #5 0x2ab6decff134 in ScColumn::~ScColumn() 
/sc/source/core/data/column.cxx:97:5
  #6 0x2ab6decf708a in 
o3tl::default_delete::operator()(ScColumn*) 
/include/o3tl/deleter.hxx:55:38
  #7 0x2ab6decf5999 in std::unique_ptr >::reset(ScColumn*) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:376:4
  #8 0x2ab6decf4c8e in ScColContainer::Clear() 
/sc/source/core/data/colcontainer.cxx:42:21
  #9 0x2ab6decf4a84 in ScColContainer::~ScColContainer() 
/sc/source/core/data/colcontainer.cxx:33:5
  #10 0x2ab6e070e3c6 in ScTable::~ScTable() 
/sc/source/core/data/table1.cxx:344:1
  #11 0x2ab6df50abba in 
o3tl::default_delete::operator()(ScTable*) 
/include/o3tl/deleter.hxx:55:38
  #12 0x2ab6df4c3483 in std::unique_ptr >::~unique_ptr() 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:268:4
  #13 0x2ab6df4dc87c in void std::_Destroy > >(std::unique_ptr >*) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:98:19
  #14 0x2ab6df4dc7c6 in void 
std::_Destroy_aux::__destroy >*>(std::unique_ptr >*, std::unique_ptr >*) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:108:6
  #15 0x2ab6df4dc744 in void std::_Destroy >*>(std::unique_ptr >*, std::unique_ptr >*) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:136:7
  #16 0x2ab6df4dc488 in void std::_Destroy >*, std::unique_ptr > >(std::unique_ptr >*, std::unique_ptr >*, std::allocator > >&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:206:7
  #17 0x2ab6df50df73 in std::__cxx1998::vector >, std::allocator > > >::_M_erase_at_end(std::unique_ptr >*) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:1513:2
  #18 0x2ab6df70f5b0 in std::__cxx1998::vector >, std::allocator > > >::clear() 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:1248:9
  #19 0x2ab6df70b5d4 in std::__debug::vector >, std::allocator > > >::clear() 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/debug/vector:699:9
  #20 0x2ab6df704cb2 in ScDocument::Clear(bool) 
/sc/source/core/data/documen9.cxx:506:12
  #21 0x2ab6df490652 in ScDocument::~ScDocument() 
/sc/source/core/data/documen2.cxx:363:5
  #22 0x2ab6e363315d in ScDocShell::~ScDocShell() 
/sc/source/ui/docshell/docsh.cxx:2925:1
 

[Libreoffice-commits] core.git: bin/oss-fuzz-setup.sh configure.ac cui/source download.lst external/liborcus external/mdds RepositoryExternal.mk sc/inc sc/source sfx2/source solenv/flatpak-manifest.in

 RepositoryExternal.mk  |4 
 bin/oss-fuzz-setup.sh  |2 
 configure.ac   |4 
 cui/source/dialogs/AdditionsDialog.cxx |   62 
 download.lst   |8 
 external/liborcus/ExternalPackage_liborcus.mk  |8 
 external/liborcus/ExternalProject_liborcus.mk  |4 
 external/liborcus/Library_orcus-parser.mk  |1 
 external/liborcus/UnpackedTarball_liborcus.mk  |9 
 external/liborcus/allow-utf-8-in-xml-names.patch   |  301 
 external/liborcus/boost-filesystem.patch.1 |   41 
 external/liborcus/inc/pch/precompiled_orcus-parser.hxx |1 
 external/liborcus/inc/pch/precompiled_orcus.hxx|1 
 external/liborcus/include.patch.0  |   30 
 external/liborcus/remove-unused-parameters.patch.1 | 1209 +
 external/liborcus/std-get-busted.patch.1   |  418 +
 external/liborcus/unused-variables.patch.1 |   24 
 external/mdds/UnpackedTarball_mdds.mk  |6 
 external/mdds/Wunused-but-set-variable.patch   |   46 
 external/mdds/remove-more-unused-parameters.patch.1|   42 
 external/mdds/remove-unused-parameters.patch.1 |   93 +
 sc/inc/mtvelements.hxx |   22 
 sc/source/filter/inc/orcusinterface.hxx|   50 
 sc/source/filter/orcus/interface.cxx   |   97 -
 sc/source/filter/orcus/orcusfiltersimpl.cxx|8 
 sc/source/filter/orcus/xmlcontext.cxx  |   10 
 sfx2/source/control/emojiview.cxx  |   11 
 solenv/flatpak-manifest.in |   12 
 28 files changed, 1973 insertions(+), 551 deletions(-)

New commits:
commit eb07a0e76fe240a184348d96a6cebf7c0a229ac0
Author: Kohei Yoshida 
AuthorDate: Mon Nov 1 14:01:22 2021 -0400
Commit: Kohei Yoshida 
CommitDate: Wed Nov 3 21:17:18 2021 +0100

Upgrade mdds and liborcus to 2.0.0 and 0.17.0, respectively.

Change-Id: I9e856fc2d61f1789a6f1702514837860539a0f49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124573
Tested-by: Jenkins
Tested-by: René Engelhard 
Reviewed-by: Kohei Yoshida 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index c28b049caef8..a2a7212aa837 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3329,7 +3329,7 @@ $(call gb_LinkTarget_set_include,$(1),\
 )
 
 $(call gb_LinkTarget_add_libs,$(1),\
-   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs 
-lorcus-0.16 \
+   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs 
-lorcus-0.17 \
 )
 
 $(if $(SYSTEM_BOOST), \
@@ -3348,7 +3348,7 @@ $(call gb_LinkTarget_set_include,$(1),\
 )
 
 $(call gb_LinkTarget_add_libs,$(1),\
-   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs 
-lorcus-parser-0.16 \
+   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs 
-lorcus-parser-0.17 \
 )
 
 endef
diff --git a/bin/oss-fuzz-setup.sh b/bin/oss-fuzz-setup.sh
index 22c9ef2b7e49..c72f63d4e1e0 100755
--- a/bin/oss-fuzz-setup.sh
+++ b/bin/oss-fuzz-setup.sh
@@ -38,7 +38,7 @@ curl --no-progress-meter -S \
 -C - -O https://dev-www.libreoffice.org/src/libmspub-0.1.4.tar.xz \
 -C - -O https://dev-www.libreoffice.org/src/libmwaw-0.3.20.tar.xz \
 -C - -O https://dev-www.libreoffice.org/src/libodfgen-0.1.8.tar.xz \
--C - -O https://dev-www.libreoffice.org/src/liborcus-0.16.1.tar.bz2 \
+-C - -O https://dev-www.libreoffice.org/src/liborcus-0.17.0.tar.bz2 \
 -C - -O https://dev-www.libreoffice.org/src/libpagemaker-0.0.4.tar.xz \
 -C - -O https://dev-www.libreoffice.org/src/libpng-1.6.37.tar.xz \
 -C - -O https://dev-www.libreoffice.org/src/librevenge-0.0.4.tar.bz2 \
diff --git a/configure.ac b/configure.ac
index b8b3793b6204..a2a831da535a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10299,7 +10299,7 @@ AC_SUBST(SYSTEM_BOOST)
 dnl ===
 dnl Check for system mdds
 dnl ===
-libo_CHECK_SYSTEM_MODULE([mdds], [MDDS], [mdds-1.5 >= 1.5.0], 
["-I${WORKDIR}/UnpackedTarball/mdds/include"])
+libo_CHECK_SYSTEM_MODULE([mdds], [MDDS], [mdds-2.0 >= 2.0.0], 
["-I${WORKDIR}/UnpackedTarball/mdds/include"])
 
 dnl ===
 dnl Check for system cuckoo
@@ -10643,7 +10643,7 @@ AC_SUBST(ENABLE_FUZZERS)
 dnl ===
 dnl Orcus
 dnl ===
-libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.16 >= 0.16.0])
+libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.17 >= 0.17.0])
 if test "$with_system_orcus" != "yes"; then
 if test 

[Libreoffice-commits] core.git: download.lst external/liborcus

 download.lst |4 
 external/liborcus/0001-Mark-all-untentionally-unused-variables.patch |  376 
--
 external/liborcus/UnpackedTarball_liborcus.mk|1 
 3 files changed, 2 insertions(+), 379 deletions(-)

New commits:
commit 1821dde6601193cc0ddf87fc020de708544d9700
Author: Kohei Yoshida 
AuthorDate: Mon Sep 28 16:19:54 2020 -0400
Commit: Kohei Yoshida 
CommitDate: Tue Sep 29 02:16:27 2020 +0200

Update liborcus to 0.16.1.

Change-Id: I27e87278545c1d41381b1ab8a49f6f6a07681bfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103590
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index a4782bb2b9ef..48af3c5e9198 100644
--- a/download.lst
+++ b/download.lst
@@ -206,8 +206,8 @@ export OPENLDAP_SHA256SUM := 
cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb89
 export OPENLDAP_TARBALL := openldap-2.4.45.tgz
 export OPENSSL_SHA256SUM := 
ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46
 export OPENSSL_TARBALL := openssl-1.1.1g.tar.gz
-export ORCUS_SHA256SUM := 
854c6ec167ace59baa2984e175bac7b5b2af91bfde4bb10d2088b87a51ed76ec
-export ORCUS_TARBALL := liborcus-0.16.0.tar.bz2
+export ORCUS_SHA256SUM := 
c700d1325f744104d9fca0d5a019434901e9d51a16eedfb05792f90a298587a4
+export ORCUS_TARBALL := liborcus-0.16.1.tar.bz2
 export OWNCLOUD_ANDROID_LIB_SHA256SUM := 
b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
 export OWNCLOUD_ANDROID_LIB_TARBALL := 
owncloud-android-library-0.9.4-no-binary-deps.tar.gz
 export PAGEMAKER_SHA256SUM := 
66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
diff --git 
a/external/liborcus/0001-Mark-all-untentionally-unused-variables.patch 
b/external/liborcus/0001-Mark-all-untentionally-unused-variables.patch
deleted file mode 100644
index b0f6a572aff7..
--- a/external/liborcus/0001-Mark-all-untentionally-unused-variables.patch
+++ /dev/null
@@ -1,376 +0,0 @@
-From 6d34c41b661a9e8dddf6d08bf1f3c1fd4f5581da Mon Sep 17 00:00:00 2001
-From: Kohei Yoshida 
-Date: Fri, 11 Sep 2020 21:39:09 -0400
-Subject: [PATCH] Mark all untentionally unused variables.
-

- include/orcus/css_parser.hpp   | 70 --
- include/orcus/csv_parser.hpp   |  5 ++-
- include/orcus/json_parser.hpp  | 15 +--
- include/orcus/sax_parser.hpp   | 35 ---
- include/orcus/sax_token_parser.hpp | 20 +++--
- include/orcus/yaml_parser.hpp  | 10 -
- 6 files changed, 124 insertions(+), 31 deletions(-)
-
-diff --git a/include/orcus/css_parser.hpp b/include/orcus/css_parser.hpp
-index cdfae5e0..3e96980b 100644
 a/include/orcus/css_parser.hpp
-+++ b/include/orcus/css_parser.hpp
-@@ -31,23 +31,44 @@ namespace orcus {
- class css_handler
- {
- public:
--void at_rule_name(const char* p, size_t n) {}
-+void at_rule_name(const char* p, size_t n)
-+{
-+(void)p; (void)n;
-+}
- 
--void simple_selector_type(const char* p, size_t n) {}
-+void simple_selector_type(const char* p, size_t n)
-+{
-+(void)p; (void)n;
-+}
- 
--void simple_selector_class(const char* p, size_t n) {}
-+void simple_selector_class(const char* p, size_t n)
-+{
-+(void)p; (void)n;
-+}
- 
--void simple_selector_pseudo_element(orcus::css::pseudo_element_t pe) {}
-+void simple_selector_pseudo_element(orcus::css::pseudo_element_t pe)
-+{
-+(void)pe;
-+}
- 
--void simple_selector_pseudo_class(orcus::css::pseudo_class_t pc) {}
-+void simple_selector_pseudo_class(orcus::css::pseudo_class_t pc)
-+{
-+(void)pc;
-+}
- 
--void simple_selector_id(const char* p, size_t n) {}
-+void simple_selector_id(const char* p, size_t n)
-+{
-+(void)p; (void)n;
-+}
- 
- void end_simple_selector() {}
- 
- void end_selector() {}
- 
--void combinator(orcus::css::combinator_t combinator) {}
-+void combinator(orcus::css::combinator_t combinator)
-+{
-+(void)combinator;
-+}
- 
- /**
-  * Called at each property name.
-@@ -55,7 +76,10 @@ public:
-  * @param p pointer to the char-array containing the property name string.
-  * @param n length of the property name string.
-  */
--void property_name(const char* p, size_t n) {}
-+void property_name(const char* p, size_t n)
-+{
-+(void)p; (void)n;
-+}
- 
- /**
-  * Called at each ordinary property value string.
-@@ -63,7 +87,10 @@ public:
-  * @param p pointer to the char-array containing the value string.
-  * @param n length of the value string.
-  */
--void value(const char* p, size_t n) {}
-+void value(const char* p, size_t n)
-+{
-+(void)p; (void)n;
-+}
- 
- /**
-  * Called at each RGB color value of a property.
-@@ -72,7 +99,10 @@ public:
-  * @param green value of green (0-255)
-  * @param 

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

 
external/liborcus/0001-Alpha-value-of-0-means-fully-transparent.-I-m-sure-2.patch
 |   50 
 external/liborcus/0001-add-xml-path.patch  
   |  119 --
 external/liborcus/0001-workaround-a-linking-problem-on-windows.patch   
   |   45 ---
 external/liborcus/0001-xls-xml-Import-hidden-row-and-column-flags.patch
   |   81 --
 external/liborcus/0001-xls-xml-Pick-up-border-colors.patch 
   |   69 -
 
external/liborcus/0002-We-are-supposed-to-use-the-foreground-color-for-soli.patch
 |   49 
 6 files changed, 413 deletions(-)

New commits:
commit 0ec032b6a42bcf3dee11cfd9f4fc702905b7ba94
Author: Kohei Yoshida 
AuthorDate: Fri Sep 11 21:09:22 2020 -0400
Commit: Kohei Yoshida 
CommitDate: Sat Sep 12 05:49:28 2020 +0200

Remove unused patches.

Change-Id: I2a1dbe15f2df42b4f74e0c00b91ace6c0d3f5f8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102503
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git 
a/external/liborcus/0001-Alpha-value-of-0-means-fully-transparent.-I-m-sure-2.patch
 
b/external/liborcus/0001-Alpha-value-of-0-means-fully-transparent.-I-m-sure-2.patch
deleted file mode 100644
index 6adae9ba2352..
--- 
a/external/liborcus/0001-Alpha-value-of-0-means-fully-transparent.-I-m-sure-2.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 98d2b3377da71b713a37f9004acff3c02c22ce2b Mon Sep 17 00:00:00 2001
-From: Kohei Yoshida 
-Date: Wed, 31 Jan 2018 22:11:25 -0500
-Subject: [PATCH 1/2] Alpha value of 0 means fully transparent. I'm sure 255
- was intended.
-
-(cherry picked from commit f7953a814d6a43205791b6cc01c528ef5d4b1ce3)

- src/liborcus/gnumeric_sheet_context.cpp | 4 ++--
- src/liborcus/odf_styles_context.cpp | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/liborcus/gnumeric_sheet_context.cpp 
b/src/liborcus/gnumeric_sheet_context.cpp
-index 8659cc3..6bd1471 100644
 a/src/liborcus/gnumeric_sheet_context.cpp
-+++ b/src/liborcus/gnumeric_sheet_context.cpp
-@@ -132,7 +132,7 @@ public:
- {
- spreadsheet::color_elem_t red, green, blue;
- gnumeric_helper::parse_RGB_color_attribute(red, green, blue, 
attr.value);
--m_styles.set_fill_fg_color(0, red, green, blue);
-+m_styles.set_fill_fg_color(255, red, green, blue);
- 
- m_fill = true;
- 
-@@ -145,7 +145,7 @@ public:
- {
- spreadsheet::color_elem_t red, green, blue;
- gnumeric_helper::parse_RGB_color_attribute(red, green, blue, 
attr.value);
--m_styles.set_fill_bg_color(0, red, green, blue);
-+m_styles.set_fill_bg_color(255, red, green, blue);
- 
- m_fill = true;
- }
-diff --git a/src/liborcus/odf_styles_context.cpp 
b/src/liborcus/odf_styles_context.cpp
-index d988f7d..f9c422a 100644
 a/src/liborcus/odf_styles_context.cpp
-+++ b/src/liborcus/odf_styles_context.cpp
-@@ -739,7 +739,7 @@ void styles_context::start_element(xmlns_id_t ns, 
xml_token_t name, const std::v
- {
- spreadsheet::color_elem_t red, green, blue;
- func.get_background_color(red, green, blue);
--mp_styles->set_fill_bg_color(0, red, green, blue);
-+mp_styles->set_fill_bg_color(255, red, green, blue);
- }
- 
- size_t fill_id = mp_styles->commit_fill();
--- 
-2.7.4
-
diff --git a/external/liborcus/0001-add-xml-path.patch 
b/external/liborcus/0001-add-xml-path.patch
deleted file mode 100644
index 3f9a16bb880f..
--- a/external/liborcus/0001-add-xml-path.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-diff --git a/include/orcus/xml_structure_tree.hpp 
b/include/orcus/xml_structure_tree.hpp
-index 
58cabfd116fa24e35ff27cf8d7512b6e73df33f4..c88808d24bd74c175fa4017328d3e54b4c588c5e
 100644
 a/include/orcus/xml_structure_tree.hpp
-+++ b/include/orcus/xml_structure_tree.hpp
-@@ -127,6 +127,20 @@ public:
- size_t get_xmlns_index(xmlns_id_t ns) const;
-
- std::string get_xmlns_short_name(xmlns_id_t ns) const;
-+
-+/**
-+ * Get a XPath like ID for the element inside of the XML tree.
-+ *
-+ */
-+std::string get_path() const;
-+
-+/**
-+ * Select an element by a path expression. The path expression may be
-+ * generated by xml_structure_tree::walker::get_path.
-+ *
-+ * @param path a simple XPath like expression
-+ */
-+element select_by_path(const std::string& path);
- };
-
- xml_structure_tree(xmlns_context& xmlns_cxt);
-diff --git a/src/liborcus/xml_structure_tree.cpp 
b/src/liborcus/xml_structure_tree.cpp
-index 
2778bc05f32841a9441bf471913872e119256895..6622bc57cd2595f12bba80d4bbdb5c24cd6e7bc6
 100644
 a/src/liborcus/xml_structure_tree.cpp
-+++ 

[Libreoffice-commits] core.git: configure.ac download.lst external/liborcus RepositoryExternal.mk sc/source

 RepositoryExternal.mk|4 
 configure.ac |2 
 download.lst |4 
 external/liborcus/0001-Mark-all-untentionally-unused-variables.patch |  376 
++
 external/liborcus/ExternalPackage_liborcus.mk|8 
 external/liborcus/ExternalProject_liborcus.mk|4 
 external/liborcus/Library_orcus-parser.mk|1 
 external/liborcus/Library_orcus.mk   |4 
 external/liborcus/UnpackedTarball_liborcus.mk|1 
 external/liborcus/libtool.patch.0|   10 
 external/liborcus/windows-constants-hack.patch   |2 
 sc/source/filter/inc/orcusinterface.hxx  |   21 
 sc/source/filter/orcus/interface.cxx |   82 +-
 sc/source/filter/orcus/xmlcontext.cxx|7 
 sc/source/ui/xmlsource/xmlsourcedlg.cxx  |6 
 15 files changed, 480 insertions(+), 52 deletions(-)

New commits:
commit 109ed8f775dddfede012d56d078abd70b45490c0
Author: Kohei Yoshida 
AuthorDate: Wed Sep 9 21:23:48 2020 -0400
Commit: Kohei Yoshida 
CommitDate: Sat Sep 12 05:49:10 2020 +0200

Upgrade liborcus to 0.16.0.

Change-Id: Iae29fb26417dfc161698a81bee84e81545969065
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102502
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index d9fa980d7f24..1f0a91de142a 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3270,7 +3270,7 @@ $(call gb_LinkTarget_set_include,$(1),\
 )
 
 $(call gb_LinkTarget_add_libs,$(1),\
-   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs 
-lorcus-0.15 \
+   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs 
-lorcus-0.16 \
 )
 
 $(if $(SYSTEM_BOOST), \
@@ -3289,7 +3289,7 @@ $(call gb_LinkTarget_set_include,$(1),\
 )
 
 $(call gb_LinkTarget_add_libs,$(1),\
-   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs 
-lorcus-parser-0.15 \
+   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs 
-lorcus-parser-0.16 \
 )
 
 endef
diff --git a/configure.ac b/configure.ac
index 8e8d5eb662d9..06398bfa99a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10126,7 +10126,7 @@ AC_SUBST(ENABLE_FUZZERS)
 dnl ===
 dnl Orcus
 dnl ===
-libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.15 >= 0.15.0])
+libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.16 >= 0.16.0])
 if test "$with_system_orcus" != "yes"; then
 if test "$SYSTEM_BOOST" = "TRUE"; then
 # ===
diff --git a/download.lst b/download.lst
index ee4ba8a1c83b..345ddd19537b 100644
--- a/download.lst
+++ b/download.lst
@@ -206,8 +206,8 @@ export OPENLDAP_SHA256SUM := 
cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb89
 export OPENLDAP_TARBALL := openldap-2.4.45.tgz
 export OPENSSL_SHA256SUM := 
ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46
 export OPENSSL_TARBALL := openssl-1.1.1g.tar.gz
-export ORCUS_SHA256SUM := 
cfb2aa60825f2a78589ed030c07f46a1ee16ef8a2d1bf2279192fbc1ae5a5f61
-export ORCUS_TARBALL := liborcus-0.15.4.tar.bz2
+export ORCUS_SHA256SUM := 
854c6ec167ace59baa2984e175bac7b5b2af91bfde4bb10d2088b87a51ed76ec
+export ORCUS_TARBALL := liborcus-0.16.0.tar.bz2
 export OWNCLOUD_ANDROID_LIB_SHA256SUM := 
b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
 export OWNCLOUD_ANDROID_LIB_TARBALL := 
owncloud-android-library-0.9.4-no-binary-deps.tar.gz
 export PAGEMAKER_SHA256SUM := 
66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
diff --git 
a/external/liborcus/0001-Mark-all-untentionally-unused-variables.patch 
b/external/liborcus/0001-Mark-all-untentionally-unused-variables.patch
new file mode 100644
index ..b0f6a572aff7
--- /dev/null
+++ b/external/liborcus/0001-Mark-all-untentionally-unused-variables.patch
@@ -0,0 +1,376 @@
+From 6d34c41b661a9e8dddf6d08bf1f3c1fd4f5581da Mon Sep 17 00:00:00 2001
+From: Kohei Yoshida 
+Date: Fri, 11 Sep 2020 21:39:09 -0400
+Subject: [PATCH] Mark all untentionally unused variables.
+
+---
+ include/orcus/css_parser.hpp   | 70 --
+ include/orcus/csv_parser.hpp   |  5 ++-
+ include/orcus/json_parser.hpp  | 15 +--
+ include/orcus/sax_parser.hpp   | 35 ---
+ include/orcus/sax_token_parser.hpp | 20 +++--
+ include/orcus/yaml_parser.hpp  | 10 -
+ 6 files changed, 124 insertions(+), 31 deletions(-)
+
+diff --git a/include/orcus/css_parser.hpp 

[Libreoffice-commits] core.git: download.lst external/mdds

 download.lst  |4 -
 external/mdds/UnpackedTarball_mdds.mk |2 
 external/mdds/delta-signed-int.diff   |   44 -
 external/mdds/remove-warnings.diff|   84 --
 4 files changed, 2 insertions(+), 132 deletions(-)

New commits:
commit 833dd84e85a29734e69277a590f4f9942e9af8a2
Author: Kohei Yoshida 
AuthorDate: Wed Sep 9 18:41:49 2020 -0400
Commit: Kohei Yoshida 
CommitDate: Thu Sep 10 01:46:54 2020 +0200

Upgrade mdds to 1.7.0.

Change-Id: I2a66017fb5f93ecd39dbf980aa04798dbd33b3e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102343
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index efcbf7419a72..ee4ba8a1c83b 100644
--- a/download.lst
+++ b/download.lst
@@ -180,8 +180,8 @@ export LXML_SHA256SUM := 
940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a
 export LXML_TARBALL := lxml-4.1.1.tgz
 export MARIADB_CONNECTOR_C_SHA256SUM := 
431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b
 export MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.1.8-src.tar.gz
-export MDDS_SHA256SUM := 
f1585c9cbd12f83a6d43d395ac1ab6a9d9d5d77f062c7b5f704e24ed72dae07d
-export MDDS_TARBALL := mdds-1.6.0.tar.bz2
+export MDDS_SHA256SUM := 
a66a2a8293a3abc6cd9baff7c236156e2666935cbfb69a15d64d38141638fecf
+export MDDS_TARBALL := mdds-1.7.0.tar.bz2
 export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
diff --git a/external/mdds/UnpackedTarball_mdds.mk 
b/external/mdds/UnpackedTarball_mdds.mk
index 17834c6d100e..65dd0109e972 100644
--- a/external/mdds/UnpackedTarball_mdds.mk
+++ b/external/mdds/UnpackedTarball_mdds.mk
@@ -14,8 +14,6 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL)))
 $(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,1))
 
 $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
-external/mdds/remove-warnings.diff \
-external/mdds/delta-signed-int.diff \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/mdds/delta-signed-int.diff 
b/external/mdds/delta-signed-int.diff
deleted file mode 100644
index 8612b854378d..
--- a/external/mdds/delta-signed-int.diff
+++ /dev/null
@@ -1,44 +0,0 @@
-diff --git a/include/mdds/multi_type_vector.hpp 
b/include/mdds/multi_type_vector.hpp
-index d941ee2..71c34f3 100644
 a/include/mdds/multi_type_vector.hpp
-+++ b/include/mdds/multi_type_vector.hpp
-@@ -1071,7 +1071,7 @@ public:
- 
- private:
- 
--void adjust_block_positions(int64_t start_block_index, size_type delta);
-+void adjust_block_positions(int64_t start_block_index, int64_t delta);
- 
- /**
-  * Delete only the element block owned by an outer block.
-diff --git a/include/mdds/multi_type_vector_def.inl 
b/include/mdds/multi_type_vector_def.inl
-index d4fff49..7509e3e 100644
 a/include/mdds/multi_type_vector_def.inl
-+++ b/include/mdds/multi_type_vector_def.inl
-@@ -503,7 +503,7 @@ multi_type_vector<_CellBlockFunc, _EventFunc>::set(const 
iterator& pos_hint, siz
- }
- 
- template
--void multi_type_vector<_CellBlockFunc, 
_EventFunc>::adjust_block_positions(int64_t start_block_index, size_type delta)
-+void multi_type_vector<_CellBlockFunc, 
_EventFunc>::adjust_block_positions(int64_t start_block_index, int64_t delta)
- {
- int64_t n = m_blocks.size();
- 
-@@ -2927,7 +2927,7 @@ void multi_type_vector<_CellBlockFunc, 
_EventFunc>::erase_impl(size_type start_r
- // Now, erase all blocks in between.
- delete_element_blocks(it_erase_begin, it_erase_end);
- auto it_adjust_block = m_blocks.erase(it_erase_begin, it_erase_end);
--size_type delta = end_row - start_row + 1;
-+int64_t delta = end_row - start_row + 1;
- m_cur_size -= delta;
- 
- if (m_blocks.empty())
-@@ -2945,7 +2945,7 @@ void multi_type_vector<_CellBlockFunc, 
_EventFunc>::erase_in_single_block(
- {
- // Range falls within the same block.
- block* blk = _blocks[block_pos];
--size_type size_to_erase = end_pos - start_pos + 1;
-+int64_t size_to_erase = end_pos - start_pos + 1;
- if (blk->mp_data)
- {
- // Erase data in the data block.
diff --git a/external/mdds/remove-warnings.diff 
b/external/mdds/remove-warnings.diff
deleted file mode 100644
index b98ddb9eef79..
--- a/external/mdds/remove-warnings.diff
+++ /dev/null
@@ -1,84 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index ef22726..00ab937 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -70,7 +70,7 @@ AC_ARG_ENABLE(openmp,
- )
- 
- AS_IF([test x"$enable_openmp" == "xyes"], [
--  CXXFLAGS="$CXXFLAGS -fopenmp"
-+  CXXFLAGS="$CXXFLAGS -fopenmp -DMDDS_USE_OPENMP=1"
-   LDFLAGS="$LDFLAGS -fopenmp"
- ])
- 
-diff --git a/include/mdds/global.hpp b/include/mdds/global.hpp
-index f92f0a5..11f0325 100644
 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - download.lst external/mdds

 download.lst  |4 -
 external/mdds/UnpackedTarball_mdds.mk |5 +-
 external/mdds/Wdeprecated-copy.patch  |   11 
 external/mdds/delta-signed-int.diff   |   44 +
 external/mdds/remove-warnings.diff|   84 ++
 5 files changed, 133 insertions(+), 15 deletions(-)

New commits:
commit 19c068f825ace98e67322c535fd318ab4a32ba2d
Author: Kohei Yoshida 
AuthorDate: Thu Feb 6 21:38:19 2020 -0500
Commit: Michael Meeks 
CommitDate: Tue Jul 7 14:06:23 2020 +0200

Update mdds to 1.6.0.

Change-Id: Iff350b47d5d237e0bb3ffcce0e80ce867c74191d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88191
Tested-by: Kohei Yoshida 
Reviewed-by: Kohei Yoshida 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98243
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/download.lst b/download.lst
index 97dcad75633f..fb9f0eef3c76 100644
--- a/download.lst
+++ b/download.lst
@@ -192,8 +192,8 @@ export LXML_SHA256SUM := 
940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a
 export LXML_TARBALL := lxml-4.1.1.tgz
 export MARIADB_CONNECTOR_C_SHA256SUM := 
431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b
 export MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.1.8-src.tar.gz
-export MDDS_SHA256SUM := 
144d6debd7be32726f332eac14ef9f17e2d3cf89cb3250eb31a7127e0789680d
-export MDDS_TARBALL := mdds-1.5.0.tar.bz2
+export MDDS_SHA256SUM := 
f1585c9cbd12f83a6d43d395ac1ab6a9d9d5d77f062c7b5f704e24ed72dae07d
+export MDDS_TARBALL := mdds-1.6.0.tar.bz2
 export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
diff --git a/external/mdds/UnpackedTarball_mdds.mk 
b/external/mdds/UnpackedTarball_mdds.mk
index c5ca78bd368c..17834c6d100e 100644
--- a/external/mdds/UnpackedTarball_mdds.mk
+++ b/external/mdds/UnpackedTarball_mdds.mk
@@ -11,10 +11,11 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,mdds))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL)))
 
-$(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,0))
+$(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,1))
 
 $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
-external/mdds/Wdeprecated-copy.patch \
+external/mdds/remove-warnings.diff \
+external/mdds/delta-signed-int.diff \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/mdds/Wdeprecated-copy.patch 
b/external/mdds/Wdeprecated-copy.patch
deleted file mode 100644
index edcb2ddaa9ec..
--- a/external/mdds/Wdeprecated-copy.patch
+++ /dev/null
@@ -1,11 +0,0 @@
 include/mdds/multi_type_vector_itr.hpp
-+++ include/mdds/multi_type_vector_itr.hpp
-@@ -71,8 +71,6 @@
- private_data() : block_index(0) {}
- private_data(size_type _block_index) :
- block_index(_block_index) {}
--private_data(const private_data& other) :
--block_index(other.block_index) {}
- 
- void swap(private_data& other)
- {
diff --git a/external/mdds/delta-signed-int.diff 
b/external/mdds/delta-signed-int.diff
new file mode 100644
index ..8612b854378d
--- /dev/null
+++ b/external/mdds/delta-signed-int.diff
@@ -0,0 +1,44 @@
+diff --git a/include/mdds/multi_type_vector.hpp 
b/include/mdds/multi_type_vector.hpp
+index d941ee2..71c34f3 100644
+--- a/include/mdds/multi_type_vector.hpp
 b/include/mdds/multi_type_vector.hpp
+@@ -1071,7 +1071,7 @@ public:
+ 
+ private:
+ 
+-void adjust_block_positions(int64_t start_block_index, size_type delta);
++void adjust_block_positions(int64_t start_block_index, int64_t delta);
+ 
+ /**
+  * Delete only the element block owned by an outer block.
+diff --git a/include/mdds/multi_type_vector_def.inl 
b/include/mdds/multi_type_vector_def.inl
+index d4fff49..7509e3e 100644
+--- a/include/mdds/multi_type_vector_def.inl
 b/include/mdds/multi_type_vector_def.inl
+@@ -503,7 +503,7 @@ multi_type_vector<_CellBlockFunc, _EventFunc>::set(const 
iterator& pos_hint, siz
+ }
+ 
+ template
+-void multi_type_vector<_CellBlockFunc, 
_EventFunc>::adjust_block_positions(int64_t start_block_index, size_type delta)
++void multi_type_vector<_CellBlockFunc, 
_EventFunc>::adjust_block_positions(int64_t start_block_index, int64_t delta)
+ {
+ int64_t n = m_blocks.size();
+ 
+@@ -2927,7 +2927,7 @@ void multi_type_vector<_CellBlockFunc, 
_EventFunc>::erase_impl(size_type start_r
+ // Now, erase all blocks in between.
+ delete_element_blocks(it_erase_begin, it_erase_end);
+ auto it_adjust_block = m_blocks.erase(it_erase_begin, it_erase_end);
+-size_type delta = end_row - start_row + 1;
++int64_t delta = end_row - start_row + 1;
+ m_cur_size -= delta;
+ 
+ if (m_blocks.empty())
+@@ -2945,7 +2945,7 @@ void 

[Libreoffice-commits] core.git: download.lst

 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 125a1abfb251264f5a434ef7fa12cdbd2d7b2ff2
Author: Kohei Yoshida 
AuthorDate: Sun Mar 29 14:18:29 2020 -0400
Commit: Kohei Yoshida 
CommitDate: Sun Mar 29 21:58:23 2020 +0200

Update orcus to 0.15.4.

Change-Id: Id0b4d17a71a951be13d63ad833681c3e46888531
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91335
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index 4103db44770f..26c47cff20f3 100644
--- a/download.lst
+++ b/download.lst
@@ -199,8 +199,8 @@ export OPENLDAP_SHA256SUM := 
cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb89
 export OPENLDAP_TARBALL := openldap-2.4.45.tgz
 export OPENSSL_SHA256SUM := 
14cb464efe7ac6b54799b34456bd69558a749a4931ecfd9cf9f71d7881cac7bc
 export OPENSSL_TARBALL := openssl-1.0.2t.tar.gz
-export ORCUS_SHA256SUM := 
0dd26f3f2e611c51df9ee02d6dbf08887989eaa417b73f6877cd0d94df795fc2
-export ORCUS_TARBALL := liborcus-0.15.3.tar.gz
+export ORCUS_SHA256SUM := 
cfb2aa60825f2a78589ed030c07f46a1ee16ef8a2d1bf2279192fbc1ae5a5f61
+export ORCUS_TARBALL := liborcus-0.15.4.tar.bz2
 export OWNCLOUD_ANDROID_LIB_SHA256SUM := 
b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
 export OWNCLOUD_ANDROID_LIB_TARBALL := 
owncloud-android-library-0.9.4-no-binary-deps.tar.gz
 export PAGEMAKER_SHA256SUM := 
66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: download.lst external/mdds

 download.lst  |4 -
 external/mdds/UnpackedTarball_mdds.mk |7 +-
 external/mdds/Wdeprecated-copy.patch  |   11 
 external/mdds/delta-signed-int.diff   |   44 +
 external/mdds/remove-warnings.diff|   84 ++
 5 files changed, 133 insertions(+), 17 deletions(-)

New commits:
commit 618442dc3b7c513b91974a09c57ff991626f8a38
Author: Kohei Yoshida 
AuthorDate: Thu Feb 6 21:38:19 2020 -0500
Commit: Kohei Yoshida 
CommitDate: Sun Feb 9 22:21:30 2020 +0100

Update mdds to 1.6.0.

Change-Id: Iff350b47d5d237e0bb3ffcce0e80ce867c74191d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88191
Tested-by: Kohei Yoshida 
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index c153f16725cc..910e1e09ad47 100644
--- a/download.lst
+++ b/download.lst
@@ -170,8 +170,8 @@ export LXML_SHA256SUM := 
940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a
 export LXML_TARBALL := lxml-4.1.1.tgz
 export MARIADB_CONNECTOR_C_SHA256SUM := 
fd2f751dea049c1907735eb236aeace1d811d6a8218118b00bbaa9b84dc5cd60
 export MARIADB_CONNECTOR_C_TARBALL := 
a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz
-export MDDS_SHA256SUM := 
144d6debd7be32726f332eac14ef9f17e2d3cf89cb3250eb31a7127e0789680d
-export MDDS_TARBALL := mdds-1.5.0.tar.bz2
+export MDDS_SHA256SUM := 
f1585c9cbd12f83a6d43d395ac1ab6a9d9d5d77f062c7b5f704e24ed72dae07d
+export MDDS_TARBALL := mdds-1.6.0.tar.bz2
 export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
diff --git a/external/mdds/UnpackedTarball_mdds.mk 
b/external/mdds/UnpackedTarball_mdds.mk
index 2e456712704a..17834c6d100e 100644
--- a/external/mdds/UnpackedTarball_mdds.mk
+++ b/external/mdds/UnpackedTarball_mdds.mk
@@ -11,12 +11,11 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,mdds))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL)))
 
-$(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,0))
+$(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,1))
 
-# external/mdds/Wdeprecated-copy.patch upstream at 

-# "Remove redundantly user-declared private_data copy constructor":
 $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
-external/mdds/Wdeprecated-copy.patch \
+external/mdds/remove-warnings.diff \
+external/mdds/delta-signed-int.diff \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/mdds/Wdeprecated-copy.patch 
b/external/mdds/Wdeprecated-copy.patch
deleted file mode 100644
index edcb2ddaa9ec..
--- a/external/mdds/Wdeprecated-copy.patch
+++ /dev/null
@@ -1,11 +0,0 @@
 include/mdds/multi_type_vector_itr.hpp
-+++ include/mdds/multi_type_vector_itr.hpp
-@@ -71,8 +71,6 @@
- private_data() : block_index(0) {}
- private_data(size_type _block_index) :
- block_index(_block_index) {}
--private_data(const private_data& other) :
--block_index(other.block_index) {}
- 
- void swap(private_data& other)
- {
diff --git a/external/mdds/delta-signed-int.diff 
b/external/mdds/delta-signed-int.diff
new file mode 100644
index ..8612b854378d
--- /dev/null
+++ b/external/mdds/delta-signed-int.diff
@@ -0,0 +1,44 @@
+diff --git a/include/mdds/multi_type_vector.hpp 
b/include/mdds/multi_type_vector.hpp
+index d941ee2..71c34f3 100644
+--- a/include/mdds/multi_type_vector.hpp
 b/include/mdds/multi_type_vector.hpp
+@@ -1071,7 +1071,7 @@ public:
+ 
+ private:
+ 
+-void adjust_block_positions(int64_t start_block_index, size_type delta);
++void adjust_block_positions(int64_t start_block_index, int64_t delta);
+ 
+ /**
+  * Delete only the element block owned by an outer block.
+diff --git a/include/mdds/multi_type_vector_def.inl 
b/include/mdds/multi_type_vector_def.inl
+index d4fff49..7509e3e 100644
+--- a/include/mdds/multi_type_vector_def.inl
 b/include/mdds/multi_type_vector_def.inl
+@@ -503,7 +503,7 @@ multi_type_vector<_CellBlockFunc, _EventFunc>::set(const 
iterator& pos_hint, siz
+ }
+ 
+ template
+-void multi_type_vector<_CellBlockFunc, 
_EventFunc>::adjust_block_positions(int64_t start_block_index, size_type delta)
++void multi_type_vector<_CellBlockFunc, 
_EventFunc>::adjust_block_positions(int64_t start_block_index, int64_t delta)
+ {
+ int64_t n = m_blocks.size();
+ 
+@@ -2927,7 +2927,7 @@ void multi_type_vector<_CellBlockFunc, 
_EventFunc>::erase_impl(size_type start_r
+ // Now, erase all blocks in between.
+ delete_element_blocks(it_erase_begin, it_erase_end);
+ auto it_adjust_block = m_blocks.erase(it_erase_begin, it_erase_end);
+-size_type delta = end_row - start_row + 1;
++int64_t delta = end_row - start_row + 1;
+ m_cur_size -= delta;
+ 
+ if 

[Libreoffice-commits] core.git: download.lst

 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 609cbacc0e134f81f2e1acb5bbe483563fa1c6b9
Author: Kohei Yoshida 
AuthorDate: Thu Oct 10 18:09:06 2019 -0400
Commit: Kohei Yoshida 
CommitDate: Fri Oct 11 02:43:24 2019 +0200

Update orcus to 0.15.3.

Change-Id: Idf7cca7b09594fe4452006fe884577725adf0c0e
Reviewed-on: https://gerrit.libreoffice.org/80632
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index 0191ddd37d50..0d06a0463d93 100644
--- a/download.lst
+++ b/download.lst
@@ -194,8 +194,8 @@ export OPENLDAP_SHA256SUM := 
cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb89
 export OPENLDAP_TARBALL := openldap-2.4.45.tgz
 export OPENSSL_SHA256SUM := 
14cb464efe7ac6b54799b34456bd69558a749a4931ecfd9cf9f71d7881cac7bc
 export OPENSSL_TARBALL := openssl-1.0.2t.tar.gz
-export ORCUS_SHA256SUM := 
aa9bd86da242bf67de1cb0785afd457b5398798c8a86d6c5492c9e6c3d3e8aa4
-export ORCUS_TARBALL := liborcus-0.15.2.tar.gz
+export ORCUS_SHA256SUM := 
0dd26f3f2e611c51df9ee02d6dbf08887989eaa417b73f6877cd0d94df795fc2
+export ORCUS_TARBALL := liborcus-0.15.3.tar.gz
 export OWNCLOUD_ANDROID_LIB_SHA256SUM := 
b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
 export OWNCLOUD_ANDROID_LIB_TARBALL := 
owncloud-android-library-0.9.4-no-binary-deps.tar.gz
 export PAGEMAKER_SHA256SUM := 
66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: helpcontent2

 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 892851fe0c0490860d9aeea4b0752de52e886721
Author: Kohei Yoshida 
AuthorDate: Sat Oct 5 15:40:34 2019 -0400
Commit: Gerrit Code Review 
CommitDate: Sat Oct 5 21:53:51 2019 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - XML Source is no longer an experimental feature.

See abb6ee1d2a0f40a4a29c60fb0c71c5644294d658 in the core repository.

Change-Id: I486931b9519200a922bd82dfb051c1500ada12d0
Reviewed-on: https://gerrit.libreoffice.org/80309
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/helpcontent2 b/helpcontent2
index 259b7b03dc58..360d9cfe12b1 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 259b7b03dc58e6a6513d108517e9393d343c6471
+Subproject commit 360d9cfe12b151b55b9db7daeaed60b1ce60a476
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

 source/text/scalc/01/xml_source.xhp |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 360d9cfe12b151b55b9db7daeaed60b1ce60a476
Author: Kohei Yoshida 
AuthorDate: Sat Oct 5 15:40:34 2019 -0400
Commit: Andras Timar 
CommitDate: Sat Oct 5 21:53:51 2019 +0200

XML Source is no longer an experimental feature.

See abb6ee1d2a0f40a4a29c60fb0c71c5644294d658 in the core repository.

Change-Id: I486931b9519200a922bd82dfb051c1500ada12d0
Reviewed-on: https://gerrit.libreoffice.org/80309
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/source/text/scalc/01/xml_source.xhp 
b/source/text/scalc/01/xml_source.xhp
index 7bfc6744b..6250ef7f7 100644
--- a/source/text/scalc/01/xml_source.xhp
+++ b/source/text/scalc/01/xml_source.xhp
@@ -35,13 +35,11 @@
 XML 
Source
 Import XML data in a 
spreadsheet.
 
-
 The XML Source feature allows to import data from arbitrarily 
structured XML content into cells in an existing spreadsheet document. It 
allows XML content to be imported either partially or in full, depending on the 
structure of the XML content and the map definitions that the user defines. The 
user can specify multiple non-overlapping sub-structures to be mapped to 
different cell positions within the same document. The user can import either 
element contents, attribute values or both.
 
 
 Choose Data - XML 
Source.
 
-This 
option is only available if Enable experimental features is 
selected in %PRODUCTNAME - 
PreferencesTools - 
Options - %PRODUCTNAME - 
Advanced.
 XML Source Dialog
 XML Source 
Dialog
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

 sc/source/ui/view/cellsh2.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 20a1904945ea95df0a5d689705d2db97a6424109
Author: Kohei Yoshida 
AuthorDate: Sat Oct 5 12:00:26 2019 -0400
Commit: Kohei Yoshida 
CommitDate: Sat Oct 5 21:19:58 2019 +0200

Let's bring XML Source out of the list of experimental features.

Change-Id: I872a047fe3791253aa52b19d544fb5f26ff22f9d
Reviewed-on: https://gerrit.libreoffice.org/80296
Tested-by: Jenkins
Reviewed-by: Andras Timar 
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index ef5c0086b7cd..d697762a4ed5 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -1250,12 +1250,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
 }
 break;
 case SID_MANAGE_XML_SOURCE:
-{
-SvtMiscOptions aMiscOptions;
-if ( !aMiscOptions.IsExperimentalMode() )
-rSet.DisableItem( nWhich );
-}
-break;
+break;
 }
 nWhich = aIter.NextWhich();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: download.lst external/liborcus

 download.lst  |4 
 external/liborcus/0001-Blind-fix-attempt-for-older-macOS-builds.patch |  130 
--
 external/liborcus/UnpackedTarball_liborcus.mk |1 
 3 files changed, 2 insertions(+), 133 deletions(-)

New commits:
commit df2b4a9daa643e66b705a7b39d8988a3d97d731e
Author: Kohei Yoshida 
AuthorDate: Wed Aug 28 22:16:27 2019 -0400
Commit: Kohei Yoshida 
CommitDate: Thu Aug 29 12:43:19 2019 +0200

Update liborcus to 0.15.2.

Change-Id: I1a16e7ba9a096862933536268dacf5ab49476896
Reviewed-on: https://gerrit.libreoffice.org/78246
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index 1b2d943defe8..27c5a433e233 100644
--- a/download.lst
+++ b/download.lst
@@ -194,8 +194,8 @@ export OPENLDAP_SHA256SUM := 
cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb89
 export OPENLDAP_TARBALL := openldap-2.4.45.tgz
 export OPENSSL_SHA256SUM := 
ae51d08bba8a83958e894946f15303ff894d75c2b8bbd44a852b64e3fe11d0d6
 export OPENSSL_TARBALL := openssl-1.0.2r.tar.gz
-export ORCUS_SHA256SUM := 
ab835e131c861401d52a30a74d0c83f175650f3f45460ae95bbf95493cab2579
-export ORCUS_TARBALL := liborcus-0.15.1.tar.gz
+export ORCUS_SHA256SUM := 
aa9bd86da242bf67de1cb0785afd457b5398798c8a86d6c5492c9e6c3d3e8aa4
+export ORCUS_TARBALL := liborcus-0.15.2.tar.gz
 export OWNCLOUD_ANDROID_LIB_SHA256SUM := 
b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
 export OWNCLOUD_ANDROID_LIB_TARBALL := 
owncloud-android-library-0.9.4-no-binary-deps.tar.gz
 export PAGEMAKER_SHA256SUM := 
66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
diff --git 
a/external/liborcus/0001-Blind-fix-attempt-for-older-macOS-builds.patch 
b/external/liborcus/0001-Blind-fix-attempt-for-older-macOS-builds.patch
deleted file mode 100644
index a25a42fd2549..
--- a/external/liborcus/0001-Blind-fix-attempt-for-older-macOS-builds.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From a0d47fff81ac100192ada343574da75d992dd00d Mon Sep 17 00:00:00 2001
-From: Stephan Bergmann 
-Date: Fri, 23 Aug 2019 10:26:51 +0200
-Subject: [PATCH] Blind fix attempt for older macOS builds
-
-...like  (which builds with
-MacOSX10.13.sdk, but not sure with what Clang and libc++ versions):
-
-> In file included from xml_map_tree.cpp:8:
-> In file included from ./xml_map_tree.hpp:11:
-> In file included from ../../include/orcus/pstring.hpp:14:
-> In file included from 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:470:
-> In file included from 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:169:
-> In file included from 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string:56:
-> In file included from 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:643:
-> In file included from 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:653:
-> 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:227:10:
 error: static_assert failed "Attempted to construct a reference element in a 
tuple with an rvalue"
-> {static_assert(__can_bind_reference<_Tp>(),
->  ^ ~~~
-> 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:385:13:
 note: in instantiation of function template specialization 
'std::__1::__tuple_leaf<2, const orcus::pstring &, 
false>::__tuple_leaf' requested here
-> __tuple_leaf<_Uf, _Tf>(_VSTD::forward<_Up>(__u))...,
-> ^
-> 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:738:15:
 note: in instantiation of function template specialization 
'std::__1::__tuple_impl, 
orcus::xml_map_tree &, const char *, const orcus::pstring &, 
orcus::xml_map_tree::element_type, 
orcus::xml_map_tree::reference_type>::__tuple_impl<0, 1, 2, 3, 4, 
orcus::xml_map_tree &, const char *, const orcus::pstring &, 
orcus::xml_map_tree::element_type, orcus::xml_map_tree::reference_type, 
orcus::xml_map_tree &, const char *&, orcus::pstring, 
orcus::xml_map_tree::element_type, orcus::xml_map_tree::reference_type>' 
requested here
-> : __base_(typename __make_tuple_indices::type(),
->   ^
-> xml_map_tree.cpp:216:13: note: in instantiation of function template 
specialization 'std::__1::tuple::tuple' requested here
-> element::args_type(
-> ^
-> 1 error generated.
-> Makefile:1804: recipe for target 'liborcus_0.15_la-xml_map_tree.lo' failed
-> make[5]: *** [liborcus_0.15_la-xml_map_tree.lo] Error 1
-
-(while building orcus as part of 

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

 sc/source/ui/xmlsource/xmlsourcedlg.cxx |   38 ++--
 1 file changed, 17 insertions(+), 21 deletions(-)

New commits:
commit 0fb2927a8fe06e6c3255544b8e4c4c9c0f5a67d3
Author: Kohei Yoshida 
AuthorDate: Tue Aug 27 16:10:08 2019 -0400
Commit: Kohei Yoshida 
CommitDate: Wed Aug 28 00:04:32 2019 +0200

Remove unnecessary braces.

As to the reason why they were there can be explained by the commit
48b35ed43db87d21a943e66cfa4f59213dcfe3a1.  They braces did make sense
before that commit.

Change-Id: Ie889d9e2404436c1cc0249dcf71bf18ebfd40636
Reviewed-on: https://gerrit.libreoffice.org/78212
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx 
b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 0cd202c8dec6..148aba1d0443 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -496,38 +496,34 @@ void ScXMLSourceDlg::OkPressed()
 ScOrcusImportXMLParam aParam;
 
 // Convert single cell links.
+for (const auto& rEntry : maCellLinks)
 {
-for (const auto& rEntry : maCellLinks)
-{
-OUString aPath = getXPath(*mxLbTree, *rEntry, aParam.maNamespaces);
-const ScOrcusXMLTreeParam::EntryData* pUserData = 
ScOrcusXMLTreeParam::getUserData(*mxLbTree, *rEntry);
+OUString aPath = getXPath(*mxLbTree, *rEntry, aParam.maNamespaces);
+const ScOrcusXMLTreeParam::EntryData* pUserData = 
ScOrcusXMLTreeParam::getUserData(*mxLbTree, *rEntry);
 
-aParam.maCellLinks.emplace_back(
-pUserData->maLinkedPos, OUStringToOString(aPath, 
RTL_TEXTENCODING_UTF8));
-}
+aParam.maCellLinks.emplace_back(
+pUserData->maLinkedPos, OUStringToOString(aPath, 
RTL_TEXTENCODING_UTF8));
 }
 
 // Convert range links. For now, an element with range link takes all its
 // child elements as its fields.
+for (const auto& rEntry: maRangeLinks)
 {
-for (const auto& rEntry: maRangeLinks)
-{
-const ScOrcusXMLTreeParam::EntryData* pUserData = 
ScOrcusXMLTreeParam::getUserData(*mxLbTree, *rEntry);
+const ScOrcusXMLTreeParam::EntryData* pUserData = 
ScOrcusXMLTreeParam::getUserData(*mxLbTree, *rEntry);
 
-ScOrcusImportXMLParam::RangeLink aRangeLink;
-aRangeLink.maPos = pUserData->maLinkedPos;
+ScOrcusImportXMLParam::RangeLink aRangeLink;
+aRangeLink.maPos = pUserData->maLinkedPos;
 
-// Go through all its child elements.
-getFieldLinks(aRangeLink, aParam.maNamespaces, *mxLbTree, *rEntry);
+// Go through all its child elements.
+getFieldLinks(aRangeLink, aParam.maNamespaces, *mxLbTree, *rEntry);
 
-// Add the reference entry as a row-group node, which will be used
-// as a row position increment point.
-OUString aThisEntry = getXPath(*mxLbTree, *rEntry, 
aParam.maNamespaces);
-aRangeLink.maRowGroups.push_back(
-OUStringToOString(aThisEntry, RTL_TEXTENCODING_UTF8));
+// Add the reference entry as a row-group node, which will be used
+// as a row position increment point.
+OUString aThisEntry = getXPath(*mxLbTree, *rEntry, 
aParam.maNamespaces);
+aRangeLink.maRowGroups.push_back(
+OUStringToOString(aThisEntry, RTL_TEXTENCODING_UTF8));
 
-aParam.maRangeLinks.push_back(aRangeLink);
-}
+aParam.maRangeLinks.push_back(aRangeLink);
 }
 
 // Remove duplicate namespace IDs.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

 sc/source/filter/orcus/xmlcontext.cxx |   18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

New commits:
commit 5c59051deb1b1294b3a6985bc753d639bf943fae
Author: Kohei Yoshida 
AuthorDate: Tue Aug 27 14:05:20 2019 -0400
Commit: Kohei Yoshida 
CommitDate: Tue Aug 27 23:19:27 2019 +0200

Use lambda expression here instead of a function object.

Change-Id: I469cc9fa0506153e6dc4ff8fe6d5bad19c02b285
Reviewed-on: https://gerrit.libreoffice.org/78208
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/filter/orcus/xmlcontext.cxx 
b/sc/source/filter/orcus/xmlcontext.cxx
index 18574b0c2a1f..489878391b29 100644
--- a/sc/source/filter/orcus/xmlcontext.cxx
+++ b/sc/source/filter/orcus/xmlcontext.cxx
@@ -135,17 +135,6 @@ public:
 }
 };
 
-class InsertFieldPath
-{
-orcus::orcus_xml& mrFilter;
-public:
-explicit InsertFieldPath(orcus::orcus_xml& rFilter) : mrFilter(rFilter) {}
-void operator() (const OString& rPath)
-{
-mrFilter.append_field_link(rPath.getStr());
-}
-};
-
 void loadContentFromURL(const OUString& rURL, std::string& rStrm)
 {
 ucbhelper::Content aContent(
@@ -274,7 +263,12 @@ void ScOrcusXMLContextImpl::importXML(const 
ScOrcusImportXMLParam& rParam)
 OUStringToOString(aTabName, RTL_TEXTENCODING_UTF8).getStr(),
 rLink.maPos.Row(), rLink.maPos.Col());
 
-std::for_each(rLink.maFieldPaths.begin(), 
rLink.maFieldPaths.end(), InsertFieldPath(filter));
+std::for_each(rLink.maFieldPaths.begin(), rLink.maFieldPaths.end(),
+[](const OString& rFieldPath)
+{
+filter.append_field_link(rFieldPath.getStr());
+}
+);
 
 std::for_each(rLink.maRowGroups.begin(), rLink.maRowGroups.end(),
 [] (const OString& rRowGroup)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

 sc/source/filter/inc/orcusfiltersimpl.hxx   |2 --
 sc/source/filter/orcus/orcusfiltersimpl.cxx |   12 
 sc/source/filter/orcus/xmlcontext.cxx   |   11 +--
 3 files changed, 9 insertions(+), 16 deletions(-)

New commits:
commit d9f5a8f6cf771017a52252341b75a5d9c1c389e1
Author: Kohei Yoshida 
AuthorDate: Tue Aug 27 13:55:56 2019 -0400
Commit: Kohei Yoshida 
CommitDate: Tue Aug 27 20:55:54 2019 +0200

Use getSystemPathFromFileURL() which is exactly what we need.

Change-Id: I09b77435d1dcd1c5e717fe4f976620bcdcecfb54
Reviewed-on: https://gerrit.libreoffice.org/78206
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/filter/inc/orcusfiltersimpl.hxx 
b/sc/source/filter/inc/orcusfiltersimpl.hxx
index ac8603c6cfaf..220e32f32608 100644
--- a/sc/source/filter/inc/orcusfiltersimpl.hxx
+++ b/sc/source/filter/inc/orcusfiltersimpl.hxx
@@ -17,8 +17,6 @@
 class ScOrcusFiltersImpl : public ScOrcusFilters
 {
 public:
-static OString toSystemPath(const OUString& rPath);
-
 virtual bool importCSV(ScDocument& rDoc, SfxMedium& rMedium) const 
override;
 virtual bool importGnumeric(ScDocument& rDoc, SfxMedium& rMedium) const 
override;
 virtual bool importExcel2003XML(ScDocument& rDoc, SfxMedium& rMedium) 
const override;
diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx 
b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 0f3b03dbbd15..72e2f3612aaa 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -28,12 +28,6 @@
 #include 
 #include 
 
-#ifdef _WIN32
-#define SYSTEM_PATH FSysStyle::Dos
-#else
-#define SYSTEM_PATH FSysStyle::Unix
-#endif
-
 using namespace com::sun::star;
 
 namespace {
@@ -81,12 +75,6 @@ bool loadFileContent(SfxMedium& rMedium, 
orcus::iface::import_filter& filter)
 
 }
 
-OString ScOrcusFiltersImpl::toSystemPath(const OUString& rPath)
-{
-INetURLObject aURL(rPath);
-return OUStringToOString(aURL.getFSysPath(SYSTEM_PATH), 
RTL_TEXTENCODING_UTF8);
-}
-
 bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, SfxMedium& rMedium) const
 {
 ScOrcusFactory aFactory(rDoc);
diff --git a/sc/source/filter/orcus/xmlcontext.cxx 
b/sc/source/filter/orcus/xmlcontext.cxx
index 71c44bc35823..18574b0c2a1f 100644
--- a/sc/source/filter/orcus/xmlcontext.cxx
+++ b/sc/source/filter/orcus/xmlcontext.cxx
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -238,8 +239,14 @@ public:
 void ScOrcusXMLContextImpl::importXML(const ScOrcusImportXMLParam& rParam)
 {
 ScOrcusFactory aFactory(mrDoc, true);
-OString aSysPath = ScOrcusFiltersImpl::toSystemPath(maPath);
-const char* path = aSysPath.getStr();
+
+OUString aSysPath;
+if (osl::FileBase::getSystemPathFromFileURL(maPath, aSysPath) != 
osl::FileBase::E_None)
+return;
+
+OString aOSysPath = OUStringToOString(aSysPath, RTL_TEXTENCODING_UTF8);
+const char* path = aOSysPath.getStr();
+
 try
 {
 orcus::orcus_xml filter(maNsRepo, , nullptr);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

 sc/source/filter/orcus/interface.cxx |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit e5b23bc96770b795b4a6014d0b167c6d67508c71
Author: Kohei Yoshida 
AuthorDate: Mon Aug 26 22:34:39 2019 -0400
Commit: Kohei Yoshida 
CommitDate: Tue Aug 27 18:02:23 2019 +0200

You can just check for nCheckPos being 0 for non-error condition.

If I read the method doc of PutEntry correctly, the boolean return
type only indicates whether the string being inserted is a new one
or not.  You can still set the format even when the string already
exists in the format table.

Change-Id: Id3165323aada47e8d4fe19683008011bd69caac2
Reviewed-on: https://gerrit.libreoffice.org/78160
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index fbd384be5a76..efd7f55a73e3 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -1457,15 +1457,9 @@ void 
ScOrcusStyles::number_format::applyToItemSet(SfxItemSet& rSet, const ScDocu
 OUString Code = maCode; /* <-- Done because the 
SvNumberFormatter::PutEntry demands a non const NumFormat Code*/
 SvNumFormatType type = SvNumFormatType::ALL;
 
-if (pFormatter->PutEntry(Code, nCheckPos, type, nKey, LANGUAGE_ENGLISH_US))
-{
-if (nCheckPos == 0)
-{
-rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nKey));
-}
-}
-else
-SAL_WARN("sc.orcus.style", "Cannot set Number Format");
+pFormatter->PutEntry(Code, nCheckPos, type, nKey, LANGUAGE_ENGLISH_US);
+if (!nCheckPos)
+rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nKey));
 }
 
 ScOrcusStyles::xf::xf():
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: download.lst external/liborcus

 download.lst  |4 -
 external/liborcus/UnpackedTarball_liborcus.mk |1 
 external/liborcus/create-element.patch.0  |   55 --
 3 files changed, 2 insertions(+), 58 deletions(-)

New commits:
commit 52800fd6d9867252b795b6afacce19f66b5a5107
Author: Kohei Yoshida 
AuthorDate: Thu Aug 22 16:48:50 2019 -0400
Commit: Kohei Yoshida 
CommitDate: Fri Aug 23 01:41:23 2019 +0200

Update orcus to 0.15.1.

Change-Id: Ifd945d03719bf2ed1fb145b405f1ea9297ebeb68
Reviewed-on: https://gerrit.libreoffice.org/77983
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index c0217d93b9d0..1b2d943defe8 100644
--- a/download.lst
+++ b/download.lst
@@ -194,8 +194,8 @@ export OPENLDAP_SHA256SUM := 
cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb89
 export OPENLDAP_TARBALL := openldap-2.4.45.tgz
 export OPENSSL_SHA256SUM := 
ae51d08bba8a83958e894946f15303ff894d75c2b8bbd44a852b64e3fe11d0d6
 export OPENSSL_TARBALL := openssl-1.0.2r.tar.gz
-export ORCUS_SHA256SUM := 
06ec7567896d76ca579efada794cc281a5d6b427195def01cbcfd79795e8a944
-export ORCUS_TARBALL := liborcus-0.15.0.tar.gz
+export ORCUS_SHA256SUM := 
ab835e131c861401d52a30a74d0c83f175650f3f45460ae95bbf95493cab2579
+export ORCUS_TARBALL := liborcus-0.15.1.tar.gz
 export OWNCLOUD_ANDROID_LIB_SHA256SUM := 
b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
 export OWNCLOUD_ANDROID_LIB_TARBALL := 
owncloud-android-library-0.9.4-no-binary-deps.tar.gz
 export PAGEMAKER_SHA256SUM := 
66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 834b8128d39f..e1aef32edcf7 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -22,7 +22,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/rpath.patch.0 \
external/liborcus/gcc9.patch.0 \
external/liborcus/libtool.patch.0 \
-   external/liborcus/create-element.patch.0 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/create-element.patch.0 
b/external/liborcus/create-element.patch.0
deleted file mode 100644
index b1012e5c90d8..
--- a/external/liborcus/create-element.patch.0
+++ /dev/null
@@ -1,55 +0,0 @@
 src/liborcus/xml_map_tree.cpp
-+++ src/liborcus/xml_map_tree.cpp
-@@ -723,35 +723,28 @@
- element* elem = r.first;
- bool created = r.second;
- 
--if (created)
--{
--// No element of that name exists.
--elem->elem_type = element_linked;
--elem->ref_type = ref_type;
--}
--else
-+if (!created)
- {
- // This element already exists.  Check if this is already linked.
- if (elem->ref_type != reference_unknown || elem->elem_type != 
element_unlinked)
- throw xpath_error("This element is already linked.  You can't 
link the same element twice.");
--
--// Turn this existing non-linked element into a linked one.
--delete elem->child_elements;
--elem->elem_type = element_linked;
--elem->ref_type = ref_type;
--switch (ref_type)
--{
--case reference_cell:
--elem->cell_ref = new cell_reference;
--break;
--case reference_range_field:
--elem->field_ref = new field_in_range;
--break;
--default:
--throw general_error("Unknown reference type in 
xml_map_tree::get_element_stack.");
--}
--
- }
-+
-+// Turn this existing non-linked element into a linked one.
-+delete elem->child_elements;
-+elem->elem_type = element_linked;
-+elem->ref_type = ref_type;
-+switch (ref_type)
-+{
-+case reference_cell:
-+elem->cell_ref = new cell_reference;
-+break;
-+case reference_range_field:
-+elem->field_ref = new field_in_range;
-+break;
-+default:
-+throw general_error("Unknown reference type in 
xml_map_tree::get_element_stack.");
-+}
- 
- ret.elem_stack.push_back(elem);
- ret.node = elem;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

 sc/inc/documentimport.hxx   |2 +
 sc/source/core/data/documentimport.cxx  |   35 ++
 sc/source/filter/inc/orcusinterface.hxx |4 ++
 sc/source/filter/orcus/interface.cxx|   19 --
 sc/source/ui/xmlsource/xmlsourcedlg.cxx |   43 +++-
 5 files changed, 72 insertions(+), 31 deletions(-)

New commits:
commit 52cff86bc74cec1a6755809c6b5434afa32a274c
Author: Kohei Yoshida 
AuthorDate: Tue Aug 20 22:11:03 2019 -0400
Commit: Kohei Yoshida 
CommitDate: Thu Aug 22 01:55:00 2019 +0200

Fully support importing of XML with nested repeat elements.

With this change, Calc's XML Source will allow importing XML that
contains nested repeat elements.  It is something the old implementation
did not support.

Change-Id: I73fa1087ccd727390a47007bcfabd411cf007621
Reviewed-on: https://gerrit.libreoffice.org/77941
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/inc/documentimport.hxx b/sc/inc/documentimport.hxx
index 7680f7880dae..758469f258a6 100644
--- a/sc/inc/documentimport.hxx
+++ b/sc/inc/documentimport.hxx
@@ -112,6 +112,8 @@ public:
 
 void setTableOpCells(const ScRange& rRange, const ScTabOpParam& rParam);
 
+void fillDownCells(const ScAddress& rPos, SCROW nFillSize);
+
 /**
  * Set an array of cell attributes to specified column.  This call
  * transfers the ownership of the ScAttrEntry array from the caller to the
diff --git a/sc/source/core/data/documentimport.cxx 
b/sc/source/core/data/documentimport.cxx
index ebe1b8a6dfc8..d4c3227a8b72 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -537,6 +537,41 @@ void ScDocumentImport::setTableOpCells(const ScRange& 
rRange, const ScTabOpParam
 }
 }
 
+void ScDocumentImport::fillDownCells(const ScAddress& rPos, SCROW nFillSize)
+{
+ScTable* pTab = mpImpl->mrDoc.FetchTable(rPos.Tab());
+if (!pTab)
+return;
+
+sc::ColumnBlockPosition* pBlockPos = mpImpl->getBlockPosition(rPos.Tab(), 
rPos.Col());
+
+if (!pBlockPos)
+return;
+
+sc::CellStoreType& rCells = pTab->aCol[rPos.Col()].maCells;
+ScRefCellValue aRefCell = pTab->aCol[rPos.Col()].GetCellValue(*pBlockPos, 
rPos.Row());
+
+switch (aRefCell.meType)
+{
+case CELLTYPE_VALUE:
+{
+std::vector aCopied(nFillSize, aRefCell.mfValue);
+pBlockPos->miCellPos = rCells.set(
+pBlockPos->miCellPos, rPos.Row()+1, aCopied.begin(), 
aCopied.end());
+break;
+}
+case CELLTYPE_STRING:
+{
+std::vector aCopied(nFillSize, 
*aRefCell.mpString);
+pBlockPos->miCellPos = rCells.set(
+pBlockPos->miCellPos, rPos.Row()+1, aCopied.begin(), 
aCopied.end());
+break;
+}
+default:
+break;
+}
+}
+
 void ScDocumentImport::setAttrEntries( SCTAB nTab, SCCOL nCol, Attrs&& rAttrs )
 {
 ScTable* pTab = mpImpl->mrDoc.FetchTable(nTab);
diff --git a/sc/source/filter/inc/orcusinterface.hxx 
b/sc/source/filter/inc/orcusinterface.hxx
index 7c7c4f20bb3c..ecf8f21168ec 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -587,7 +587,8 @@ class ScOrcusFactory : public 
orcus::spreadsheet::iface::import_factory
 FormulaWithResult,
 SharedFormula,
 SharedFormulaWithResult,
-Matrix
+Matrix,
+FillDownCells
 };
 
 ScAddress const maPos;
@@ -650,6 +651,7 @@ public:
 void pushCellStoreToken( const ScAddress& rPos, double fValue );
 void pushCellStoreToken(
 const ScAddress& rPos, const OUString& rFormula, 
formula::FormulaGrammar::Grammar eGrammar );
+void pushFillDownCellsToken( const ScAddress& rPos, uint32_t nFillSize );
 
 void pushSharedFormulaToken( const ScAddress& rPos, uint32_t nIndex );
 void pushMatrixFormulaToken(
diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index 23f17a1dc854..fbd384be5a76 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -470,6 +470,14 @@ void ScOrcusFactory::finalize()
 maDoc.setMatrixCells(aRange, *pArray, rToken.meGrammar);
 break;
 }
+case CellStoreToken::Type::FillDownCells:
+{
+if (!rToken.mnIndex1)
+break;
+
+maDoc.fillDownCells(rToken.maPos, rToken.mnIndex1);
+break;
+}
 default:
 ;
 }
@@ -538,6 +546,12 @@ void ScOrcusFactory::pushCellStoreToken(
 maCellStoreTokens.emplace_back(rPos, rFormula, eGrammar);
 }
 
+void ScOrcusFactory::pushFillDownCellsToken( const ScAddress& rPos, uint32_t 
nFillSize )
+{
+maCellStoreTokens.emplace_back(rPos, 

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

 sc/inc/orcusfilters.hxx   |3 ++-
 sc/source/filter/inc/orcusfiltersimpl.hxx |2 +-
 sc/source/filter/orcus/orcusfiltersimpl.cxx   |4 ++--
 sc/source/ui/dataprovider/xmldataprovider.cxx |2 +-
 sc/source/ui/xmlsource/xmlsourcedlg.cxx   |2 +-
 5 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 494b11bb7a069900e75ef1154323408cd7aa2560
Author: Kohei Yoshida 
AuthorDate: Tue Aug 20 20:26:14 2019 -0400
Commit: Kohei Yoshida 
CommitDate: Wed Aug 21 03:30:52 2019 +0200

Return std::unique_ptr directly.

Change-Id: If0b8263ec6659fccfb329676e09d5441bec6e60c
Reviewed-on: https://gerrit.libreoffice.org/77864
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/inc/orcusfilters.hxx b/sc/inc/orcusfilters.hxx
index 99f55306b226..ee0ced0bd2cd 100644
--- a/sc/inc/orcusfilters.hxx
+++ b/sc/inc/orcusfilters.hxx
@@ -11,6 +11,7 @@
 #define INCLUDED_SC_INC_ORCUSFILTERS_HXX
 
 #include 
+#include 
 
 class ScDocument;
 struct ScOrcusXMLTreeParam;
@@ -52,7 +53,7 @@ public:
  * The caller is responsible for deleting the instance returned from this
  * method when it's done.
  */
-virtual ScOrcusXMLContext* createXMLContext(ScDocument& rDoc, const 
OUString& rPath) const = 0;
+virtual std::unique_ptr createXMLContext(ScDocument& 
rDoc, const OUString& rPath) const = 0;
 };
 
 class ScOrcusXMLContext
diff --git a/sc/source/filter/inc/orcusfiltersimpl.hxx 
b/sc/source/filter/inc/orcusfiltersimpl.hxx
index bef07a43e2dc..ac8603c6cfaf 100644
--- a/sc/source/filter/inc/orcusfiltersimpl.hxx
+++ b/sc/source/filter/inc/orcusfiltersimpl.hxx
@@ -27,7 +27,7 @@ public:
 
 virtual bool importODS_Styles(ScDocument& rDoc, OUString& aFileName) const 
override;
 
-virtual ScOrcusXMLContext* createXMLContext(ScDocument& rDoc, const 
OUString& rPath) const override;
+virtual std::unique_ptr createXMLContext(ScDocument& 
rDoc, const OUString& rPath) const override;
 };
 
 class ScOrcusXMLContextImpl : public ScOrcusXMLContext
diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx 
b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 8e9b0b1a5f04..0f3b03dbbd15 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -153,9 +153,9 @@ bool ScOrcusFiltersImpl::importODS_Styles(ScDocument& rDoc, 
OUString& aPath) con
 return true;
 }
 
-ScOrcusXMLContext* ScOrcusFiltersImpl::createXMLContext(ScDocument& rDoc, 
const OUString& rPath) const
+std::unique_ptr 
ScOrcusFiltersImpl::createXMLContext(ScDocument& rDoc, const OUString& rPath) 
const
 {
-return new ScOrcusXMLContextImpl(rDoc, rPath);
+return std::make_unique(rDoc, rPath);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dataprovider/xmldataprovider.cxx 
b/sc/source/ui/dataprovider/xmldataprovider.cxx
index 42b5d5620374..da0f9bd28535 100644
--- a/sc/source/ui/dataprovider/xmldataprovider.cxx
+++ b/sc/source/ui/dataprovider/xmldataprovider.cxx
@@ -58,7 +58,7 @@ void XMLFetchThread::execute()
 if (!pOrcus)
 return;
 
-mpXMLContext.reset(pOrcus->createXMLContext(mrDocument, maURL));
+mpXMLContext = pOrcus->createXMLContext(mrDocument, maURL);
 if (!mpXMLContext)
 return;
 
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx 
b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 3a209294cb36..dd78ab5e18b9 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -195,7 +195,7 @@ void ScXMLSourceDlg::LoadSourceFileStructure(const 
OUString& rPath)
 if (!pOrcus)
 return;
 
-mpXMLContext.reset(pOrcus->createXMLContext(*mpDoc, rPath));
+mpXMLContext = pOrcus->createXMLContext(*mpDoc, rPath);
 if (!mpXMLContext)
 return;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

 sc/source/ui/xmlsource/xmlsourcedlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bf03ccae15f05de7cc6003ecd7ed3a442d55bf8f
Author: Kohei Yoshida 
AuthorDate: Tue Aug 20 15:41:28 2019 -0400
Commit: Kohei Yoshida 
CommitDate: Wed Aug 21 00:01:51 2019 +0200

Namespace doesn't need a semicolon.

Change-Id: I0f34f02ea7827cddb842e2d2ce466fe61e6fd95a
Reviewed-on: https://gerrit.libreoffice.org/77863
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx 
b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 26b0cbcf4f1a..3a209294cb36 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -241,7 +241,7 @@ std::unique_ptr getReferenceEntry(const 
weld::TreeView& rTree, w
 return xCurEntry;
 }
 
-};
+}
 
 void ScXMLSourceDlg::TreeItemSelected()
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: download.lst external/mdds

 download.lst|2 
 external/mdds/UnpackedTarball_mdds.mk   |1 
 external/mdds/use-position-hint-also-back.patch |   50 
 3 files changed, 1 insertion(+), 52 deletions(-)

New commits:
commit 1c59fed7c43654736775580799f1165e8b8740a0
Author: Kohei Yoshida 
AuthorDate: Thu Aug 15 00:37:44 2019 -0400
Commit: Kohei Yoshida 
CommitDate: Thu Aug 15 07:26:42 2019 +0200

Correctly pack mdds 1.5.0.

Turns out the earlier mdds 1.5.0 package was not correctly packaged.
I've fixed that now, and re-published the 1.5.0 package, which does
contain the patch from Lubos.

Change-Id: I1ff7d6568568860f7cccd3be3bc29aaaebe7fd73
Reviewed-on: https://gerrit.libreoffice.org/77483
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/download.lst b/download.lst
index 59b58f96347c..046b440cd379 100644
--- a/download.lst
+++ b/download.lst
@@ -168,7 +168,7 @@ export LXML_SHA256SUM := 
940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a
 export LXML_TARBALL := lxml-4.1.1.tgz
 export MARIADB_CONNECTOR_C_SHA256SUM := 
fd2f751dea049c1907735eb236aeace1d811d6a8218118b00bbaa9b84dc5cd60
 export MARIADB_CONNECTOR_C_TARBALL := 
a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz
-export MDDS_SHA256SUM := 
74cda018d5aa39a2f91652608efb066fd225f3597ce54733e6ab1e99e52606f7
+export MDDS_SHA256SUM := 
144d6debd7be32726f332eac14ef9f17e2d3cf89cb3250eb31a7127e0789680d
 export MDDS_TARBALL := mdds-1.5.0.tar.bz2
 export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
diff --git a/external/mdds/UnpackedTarball_mdds.mk 
b/external/mdds/UnpackedTarball_mdds.mk
index 625204d29619..c015f4c13f5a 100644
--- a/external/mdds/UnpackedTarball_mdds.mk
+++ b/external/mdds/UnpackedTarball_mdds.mk
@@ -14,7 +14,6 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL)))
 $(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
-   external/mdds/use-position-hint-also-back.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/mdds/use-position-hint-also-back.patch 
b/external/mdds/use-position-hint-also-back.patch
deleted file mode 100644
index 0b38c38d5536..
--- a/external/mdds/use-position-hint-also-back.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 726e2f02d14833bde2f7eef9677f5564c485a992 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= 
-Date: Fri, 17 May 2019 13:55:20 +0200
-Subject: [PATCH] use position hint also when it is past the actual position
-
-The m_blocks data structure is a vector. It means that it can be
-also walked back, instead of resetting and starting from the very
-start.
-
-Allows a noticeable performance improvement in
-https://gerrit.libreoffice.org/#/c/72424/ .

- include/mdds/multi_type_vector_def.inl | 21 -
- 1 file changed, 20 insertions(+), 1 deletion(-)
-
-diff --git a/include/mdds/multi_type_vector_def.inl 
b/include/mdds/multi_type_vector_def.inl
-index 22a0ee2..09894e6 100644
 include/mdds/multi_type_vector_def.inl
-+++ include/mdds/multi_type_vector_def.inl
-@@ -861,7 +861,26 @@ void multi_type_vector<_CellBlockFunc, 
_EventFunc>::get_block_position(
- 
- if (pos < start_row)
- {
--// Position hint is past the insertion position. Reset.
-+// Position hint is past the insertion position.
-+// Walk back if that seems efficient.
-+if (pos > start_row / 2)
-+{
-+for (size_type i = block_index; i > 0;)
-+{
-+--i;
-+const block& blk = m_blocks[i];
-+start_row -= blk.m_size;
-+if (pos >= start_row)
-+{
-+// Row is in this block.
-+block_index = i;
-+return;
-+}
-+// Specified row is not in this block.
-+}
-+assert(start_row == 0);
-+}
-+// Otherwise reset.
- start_row = 0;
- block_index = 0;
- }
--- 
-2.16.4
-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: configure.ac download.lst external/liborcus RepositoryExternal.mk sc/inc sc/qa sc/source svl/source

 RepositoryExternal.mk   |4 -
 configure.ac|4 -
 download.lst|8 +-
 external/liborcus/0001-Prevent-unsigned-integer-underflow.patch |   27 
--
 external/liborcus/ExternalPackage_liborcus.mk   |8 +-
 external/liborcus/ExternalProject_liborcus.mk   |4 -
 external/liborcus/Library_orcus-parser.mk   |2 
 external/liborcus/Library_orcus.mk  |7 ++
 external/liborcus/UnpackedTarball_liborcus.mk   |3 -
 external/liborcus/version.patch.0   |   11 
 sc/inc/mtvelements.hxx  |8 +-
 sc/inc/orcusxml.hxx |1 
 sc/qa/unit/dataproviders_test.cxx   |1 
 sc/source/core/tool/scmatrix.cxx|8 +-
 sc/source/filter/inc/orcusinterface.hxx |2 
 sc/source/filter/orcus/interface.cxx|8 ++
 sc/source/filter/orcus/orcusfiltersimpl.cxx |4 -
 sc/source/filter/orcus/xmlcontext.cxx   |9 ++-
 sc/source/ui/xmlsource/xmlsourcedlg.cxx |6 ++
 svl/source/misc/gridprinter.cxx |2 
 20 files changed, 58 insertions(+), 69 deletions(-)

New commits:
commit 56ffe3c0a1261cd98a3d42b8b08d5f8eb013ead4
Author: Kohei Yoshida 
AuthorDate: Mon Aug 12 13:57:34 2019 -0400
Commit: Kohei Yoshida 
CommitDate: Thu Aug 15 06:09:52 2019 +0200

Switch mdds to 1.5.0 and liborcus to 0.15.0.

Change-Id: Ibff9a5e0f0771e4cf12b4dc3985661a01195e265
Reviewed-on: https://gerrit.libreoffice.org/77482
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 54ab1dbfdcc3..57f66b8f344a 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3262,7 +3262,7 @@ $(call gb_LinkTarget_set_include,$(1),\
 )
 
 $(call gb_LinkTarget_add_libs,$(1),\
-   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs 
-lorcus-0.14 \
+   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs 
-lorcus-0.15 \
 )
 
 $(if $(SYSTEM_BOOST), \
@@ -3281,7 +3281,7 @@ $(call gb_LinkTarget_set_include,$(1),\
 )
 
 $(call gb_LinkTarget_add_libs,$(1),\
-   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs 
-lorcus-parser-0.14 \
+   -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs 
-lorcus-parser-0.15 \
 )
 
 endef
diff --git a/configure.ac b/configure.ac
index 1510daf22454..d0e6759b1f52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9291,7 +9291,7 @@ AC_SUBST(SYSTEM_BOOST)
 dnl ===
 dnl Check for system mdds
 dnl ===
-libo_CHECK_SYSTEM_MODULE([mdds], [MDDS], [mdds-1.4 >= 1.4.1], 
["-I${WORKDIR}/UnpackedTarball/mdds/include"])
+libo_CHECK_SYSTEM_MODULE([mdds], [MDDS], [mdds-1.5 >= 1.5.0], 
["-I${WORKDIR}/UnpackedTarball/mdds/include"])
 
 dnl ===
 dnl Check for system glm
@@ -9597,7 +9597,7 @@ AC_SUBST(ENABLE_FUZZERS)
 dnl ===
 dnl Orcus
 dnl ===
-libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.14 >= 0.14.0])
+libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.15 >= 0.15.0])
 if test "$with_system_orcus" != "yes"; then
 if test "$SYSTEM_BOOST" = "TRUE"; then
 # ===
diff --git a/download.lst b/download.lst
index b57ed794d2a6..59b58f96347c 100644
--- a/download.lst
+++ b/download.lst
@@ -168,8 +168,8 @@ export LXML_SHA256SUM := 
940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a
 export LXML_TARBALL := lxml-4.1.1.tgz
 export MARIADB_CONNECTOR_C_SHA256SUM := 
fd2f751dea049c1907735eb236aeace1d811d6a8218118b00bbaa9b84dc5cd60
 export MARIADB_CONNECTOR_C_TARBALL := 
a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz
-export MDDS_SHA256SUM := 
25ce3d5af9f6609e1de05bb22b2316e57b74a72a5b686fbb2da199da72349c81
-export MDDS_TARBALL := mdds-1.4.3.tar.bz2
+export MDDS_SHA256SUM := 
74cda018d5aa39a2f91652608efb066fd225f3597ce54733e6ab1e99e52606f7
+export MDDS_TARBALL := mdds-1.5.0.tar.bz2
 export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
@@ -194,8 +194,8 @@ export OPENLDAP_SHA256SUM :=