core.git: Branch 'distro/allotropia/zeta-24-2' - instsetoo_native/inc_ooohelppack instsetoo_native/inc_openoffice instsetoo_native/inc_sdkoo

2024-11-07 Thread Balazs Varga (via logerrit)
 instsetoo_native/inc_ooohelppack/windows/msi_templates/codes.txt | 
 298 +-
 instsetoo_native/inc_ooohelppack/windows/msi_templates/codes_ooodev.txt  | 
 298 +-
 instsetoo_native/inc_ooohelppack/windows/msi_templates/ooo_patchcodes.txt| 
   2 
 instsetoo_native/inc_ooohelppack/windows/msi_templates/ooodev_patchcodes.txt | 
   2 
 instsetoo_native/inc_openoffice/windows/msi_templates/codes.txt  | 
  68 +-
 instsetoo_native/inc_openoffice/windows/msi_templates/codes_ooodev.txt   | 
  68 +-
 instsetoo_native/inc_sdkoo/windows/msi_templates/codes.txt   | 
  66 +-
 7 files changed, 401 insertions(+), 401 deletions(-)

New commits:
commit 0d9eb8245e1a1345ed9526ad8c15d6cd1fbd183b
Author: Balazs Varga 
AuthorDate: Wed Nov 6 22:56:16 2024 +0100
Commit: Balazs Varga 
CommitDate: Thu Nov 7 13:42:55 2024 +0100

Update productcodes, updatecodes and upgradecodes for branding

Change-Id: Icbef58e7ff710d16843643bc804e4b91096f35a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176196
Tested-by: allotropia jenkins 
Reviewed-by: Balazs Varga 

diff --git a/instsetoo_native/inc_ooohelppack/windows/msi_templates/codes.txt 
b/instsetoo_native/inc_ooohelppack/windows/msi_templates/codes.txt
index 45c1acc002de..a99167120616 100644
--- a/instsetoo_native/inc_ooohelppack/windows/msi_templates/codes.txt
+++ b/instsetoo_native/inc_ooohelppack/windows/msi_templates/codes.txt
@@ -17,154 +17,154 @@
 #
 
 [PRODUCTCODE]
-ar = "{FF72555B-A96D-49F8-8998-9359E9F9F7E1}"
-ca = "{9810C5F8-C061-4D02-AD98-049452A5DC76}"
-cs = "{781C904C-8768-4271-AA69-1A2CFA248002}"
-da = "{92CA37C8-B2E6-403F-932C-1A33E48BCD7E}"
-de = "{5014304D-99B3-4451-8EB3-97D34658E4E7}"
-el = "{F980E77E-21FD-40B8-BE66-8BC60284D24B}"
-en-GB = "{DD0CE074-E875-4428-991B-A9B3734701F9}"
-en-US = "{0F961BE5-98E8-408E-9F74-23CBA0523922}"
-es = "{12A4616B-D51B-4013-964B-0ACCCA5E9AF2}"
-et = "{956362F1-C89B-4008-B15F-968BD4023F3F}"
-fi = "{89623507-9F44-44CF-BD4C-042F9E26F903}"
-fr = "{3BB61EBF-5BC1-4E4D-859F-3ED5D92DD25E}"
-he = "{F59C6731-12DA-4A46-BE6D-30934E7CD763}"
-hi = "{61B2E7EA-DC12-4A51-B152-2B95A4FC2ABF}"
-hu = "{2246FA05-4B7A-499B-A19E-AA6599EA28D0}"
-it = "{2F78D54B-CE1D-4607-AA5B-D52114BDEBDB}"
-ja = "{01C118C0-57AB-4745-8D4C-5A34E6677E8D}"
-ko = "{B0DEE1A7-88FC-423B-AA1F-F51D94D02996}"
-nl = "{7FE69A49-6825-47E0-8179-72336E7B4250}"
-no = "{0EF3EE40-3690-472E-A693-5C9AE4FA7D5A}"
-pl = "{2A7F7A26-EF8B-4990-8836-688508886215}"
-pt = "{2C127D50-B7E4-46C3-A845-CF6684481024}"
-pt-BR = "{55837A64-5B73-4CDC-8950-AF56E09A7961}"
-ru = "{8B523028-4AAC-4607-9711-667AA6C37D45}"
-sk = "{A1D39E12-FF85-4619-BC69-001C55AD5B35}"
-sv = "{942C29ED-A013-436E-861C-28271FD60AAE}"
-th = "{2EEACF3C-C38E-4043-8B4D-33A461083348}"
-tr = "{467D9E65-2614-4D19-B40F-0B12FE6E472F}"
-zh-CN = "{0C596167-BA94-4D5A-B63B-6566FE06259A}"
-zh-TW = "{C31C87A1-5918-4178-8696-DDD36EDAEE99}"
-multiwestern = "{FA30E08E-DD61-4E47-B3D6-51B2814CA881}"
-multiasia = "{222033CB-A588-4302-9942-311F160B63B1}"
+ar = "{F59e26cfa-a35b-486c-af56-c5ec5c1b3142}"
+ca = "{93a761a7e-50b4-4dc7-9fc8-5fff85639f17}"
+cs = "{793df55fc-8b77-4ff3-a712-b16998b7844a}"
+da = "{9123fb661-640f-44a8-80fb-304fd9a0dced}"
+de = "{571d3cc56-a10d-4b11-8ff3-b169a798a616}"
+el = "{F15aec0e2-7f49-498e-acc7-8d1ea6408462}"
+en-GB = "{9268965b-bc44-4f2f-ab13-3dceeb9b731a}"
+en-US = "{ff2c322e-a2e0-4590-ac8a-8921f964b5fc}"
+es = "{21705f53-84a0-45d2-a478-36557877609f}"
+et = "{088ffad7-55ff-440b-9275-555a8762797f}"
+fi = "{7a3f6f2b-d44c-4cd7-896f-dba8306068c1}"
+fr = "{70b85936-0784-4fa1-9cd5-5bec5cf880fb}"
+he = "{31ca5450-a82d-43a4-94a6-cdfd3b1ab849}"
+hi = "{e9963ce8-5563-4e48-b5f5-f4595256d1b0}"
+hu = "{94b5c65d-8dc4-42b7-abf8-de92a2bc9a09}"
+it = "{80ac5fa7-5eba-4a9a-9745-887d5bffbd5e}"
+ja = "{e65fbed2-8222-4140-bb87-d35919415f4f}"
+ko = "{20ee6c97-92ce-48a0-8415-dd850a40b251}"
+nl = "{7ef4dd6c-ccd9-4f59-a01d-c11ad0c6aaa3}"
+no = "{7edf1af0-d494-49f1-92a0-2378e7a3d190}"
+pl = "{4ed9ccae-63dc-4a05-b277-176d7d020da4}"
+pt = "{c2adcefd-d492-4410-af6b-6317cea41189}"
+pt-BR = "{ccd1f68e-7c2e-4986-ba20-4d31b914f3c7}"
+ru = "{f9cd38db-fd80-4cb7-bdb4-bc1821a53633}"
+sk = "{4c6d9860-06b1-4c1d-ba4d-3eb9ac1e6047}"
+sv = "{7b387fd7-0802-4c51-8c7f-85f035383eaf}"
+th = "{935583be-45bb-4464-8438-9e6ad828695b}"
+tr = "{07f21c72-f955-4ebe-9cbf-1f173e6176c3}"
+zh-CN = "{35885200-a053-479f-9762-890e4825317c}"
+zh-TW = "{b6e41670-8519-4945-b0fc-ac8fe63ffd85}"
+multiwestern = "{f4b1d255-ea54-4a03-9a62-d95acb930356}"
+multiasia = "{cc2e2a71-8a9c-4d93-93f8-f4e67fde8361}"
 
 [UPGRADECODE]
-af = "{07F4C39E-72F9-495A-A8DE-8B3691607EA7}"
-ar = "{4B19ECA4-EB7B-420E-A2F3-0D456CA1CA3F}"
-as-IN = "{8B39DB32-6AF6-461F-8289-50655601C8FE}"
-be = "{0EE4C97D-D8C7-441E-866A-CF277858E4E4}"
-bo = "{C8D912D8-AA2E-47E2-9FEF-62C6580FB93C}"
-bg = "{961EFB5A-0CA0-41E8-8C9C-CB3BA52B73EC}"
-br = "{D5D79970-08FA-4CCC-B465-76948149E141}"
-brx = "{13A1CCE8-A020-4F7D-84DE-2FC89E4F0086}"
-bn = 

core.git: include/xmloff schema/libreoffice sc/inc sc/qa sc/source xmloff/source

2024-11-06 Thread Balazs Varga (via logerrit)
 include/xmloff/xmltoken.hxx |1 
 sc/inc/dbdata.hxx   |2 
 sc/qa/unit/data/ods/tdf162262_summarybelow.ods  |binary
 sc/qa/unit/subsequent_export_test4.cxx  |   30 
 sc/source/filter/xml/XMLExportDatabaseRanges.cxx|3 +
 sc/source/filter/xml/xmldrani.cxx   |5 ++
 sc/source/filter/xml/xmldrani.hxx   |2 
 schema/libreoffice/OpenDocument-v1.4+libreoffice-schema.rng |9 +++
 xmloff/source/core/xmltoken.cxx |1 
 xmloff/source/token/tokens.txt  |1 
 10 files changed, 53 insertions(+), 1 deletion(-)

New commits:
commit dcf3a85e6e5d4c7761d73a9f018c0c09862351ce
Author: Balazs Varga 
AuthorDate: Tue Nov 5 13:07:05 2024 +0100
Commit: Balazs Varga 
CommitDate: Wed Nov 6 23:26:28 2024 +0100

Related tdf#162262 - sc: odf import/export of "Summary below data"

Add new LO_EXT "summary-below" attribute for table:subtotal-rules.

Follow up commit: 26c08356d1b2a963efdca570979cb04388371400
(tdf#162262 sc add "Summary below data" option for Subtotal dialog)

Change-Id: Ie7f43d3c76479cd9468552b5939de5dbb2082a02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176058
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 6c1eff448930..8dca0f669ed2 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -1928,6 +1928,7 @@ namespace xmloff::token {
 XML_SUB_VIEW_SIZE,
 XML_SUFFIX,
 XML_SUM,
+XML_SUMMARY_BELOW,
 XML_SWISS,
 XML_SYMBOL,
 XML_SYMBOL_HEIGHT,
diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index c1164b064b17..532d71528e07 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -192,7 +192,7 @@ public:
 SC_DLLPUBLIC bool   GetAdvancedQuerySource(ScRange& rSource) const;
 SC_DLLPUBLIC void   SetAdvancedQuerySource(const ScRange* pSource);
 
-voidGetSubTotalParam(ScSubTotalParam& rSubTotalParam) const;
+SC_DLLPUBLIC void   GetSubTotalParam(ScSubTotalParam& rSubTotalParam) 
const;
 voidSetSubTotalParam(const ScSubTotalParam& rSubTotalParam);
 
 voidGetImportParam(ScImportParam& rImportParam) const;
diff --git a/sc/qa/unit/data/ods/tdf162262_summarybelow.ods 
b/sc/qa/unit/data/ods/tdf162262_summarybelow.ods
new file mode 100644
index ..bd2eeba48d01
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf162262_summarybelow.ods 
differ
diff --git a/sc/qa/unit/subsequent_export_test4.cxx 
b/sc/qa/unit/subsequent_export_test4.cxx
index f545e2bae160..ae856010b110 100644
--- a/sc/qa/unit/subsequent_export_test4.cxx
+++ b/sc/qa/unit/subsequent_export_test4.cxx
@@ -21,6 +21,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 #include 
@@ -410,6 +412,34 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf162262)
 assertXPath(pSheet, "/x:worksheet/x:sheetPr/x:outlinePr", "summaryBelow", 
u"0");
 }
 
+CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf162262_summarybelow)
+{
+createScDoc("ods/tdf162262_summarybelow.ods");
+
+ScDocument* pDoc = getScDoc();
+ScDBCollection* pDBCollection = pDoc->GetDBCollection();
+CPPUNIT_ASSERT(pDBCollection);
+{
+const ScDBData* pDBData = pDBCollection->GetDBAtArea(0, 0, 0, 1, 13);
+CPPUNIT_ASSERT(pDBData);
+ScSubTotalParam aParam;
+pDBData->GetSubTotalParam(aParam);
+CPPUNIT_ASSERT(!aParam.bSummaryBelow);
+}
+
+saveAndReload(u"calc8"_ustr);
+pDoc = getScDoc();
+pDBCollection = pDoc->GetDBCollection();
+CPPUNIT_ASSERT(pDBCollection);
+{
+const ScDBData* pDBData = pDBCollection->GetDBAtArea(0, 0, 0, 1, 13);
+CPPUNIT_ASSERT(pDBData);
+ScSubTotalParam aParam;
+pDBData->GetSubTotalParam(aParam);
+CPPUNIT_ASSERT(!aParam.bSummaryBelow);
+}
+}
+
 CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf122331)
 {
 createScDoc("ods/tdf122331.ods");
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx 
b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index 9328b796a81b..d1817bc4ddc5 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -658,6 +658,9 @@ private:
 if (aParam.bCaseSens)
 mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_CASE_SENSITIVE, 
XML_TRUE);
 
+if (!aParam.bSummaryBelow)
+mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_SUMMARY_BELOW, 
XML_FALSE);
+
 SvXMLElementExport aElemSTRs(mrExport, XML_NAMESPACE_TABLE, 
XML_SUBTOTAL_RULES, true, true);
 
 if (aParam.bDoSort)
diff --git a/sc/source/filter/xml/xmldrani.cxx 
b/sc/source/filter/xml/xmldrani.cxx
index 0e6c400c30bb..99a979319523 100644
--- a/sc/source/filt

core.git: Branch 'libreoffice-24-8' - sc/source

2024-11-06 Thread Balazs Varga (via logerrit)
 sc/source/core/tool/interpr1.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 72b027af1148ef57ee3c167f5a9e768831b61d43
Author: Balazs Varga 
AuthorDate: Tue Nov 5 09:41:16 2024 +0100
Commit: Xisco Fauli 
CommitDate: Wed Nov 6 20:01:34 2024 +0100

Related: tdf#163736 - sc: Fix wrong nSearchMode (0) in vlookup

For VLOOKUP nSearchMode was 0. So static_cast(nSearchMode)
casts to a value which does not exist in SearchMode enum. That gives an
"undefined behavior". Better to use the valid default forward search. (1)

Change-Id: I1757b43073e13638704b96c4a9d036cb9a21e470
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176043
Reviewed-by: Balazs Varga 
Tested-by: Jenkins
(cherry picked from commit e0521498bcde9235ae5b20b4a83a1c37fb91574d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176062
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 79a91ed5ed6b..e8ccc4570acb 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -7825,7 +7825,7 @@ void ScInterpreter::CalculateLookup(bool bHLookup)
 else
 {
 ScAddress aResultPos( nCol1, nRow1, nTab1);
-bFound = LookupQueryWithCache( aResultPos, aParam, refData, 0, 
SC_OPCODE_V_LOOKUP );
+bFound = LookupQueryWithCache( aResultPos, aParam, refData, 1 
/*searchfwd*/, SC_OPCODE_V_LOOKUP );
 nRow = aResultPos.Row();
 nCol = nSpIndex;
 }


core.git: Branch 'libreoffice-24-8' - sc/inc sc/qa sc/source

2024-11-06 Thread Balazs Varga (via logerrit)
 sc/inc/lookupcache.hxx |   24 +
 sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods |  266 -
 sc/source/core/tool/interpr1.cxx   |2 
 sc/source/core/tool/lookupcache.cxx|   11 
 4 files changed, 227 insertions(+), 76 deletions(-)

New commits:
commit 7dcfb8417f82be1fb496702afb4d0f54cb74839f
Author: Balazs Varga 
AuthorDate: Sun Nov 3 19:34:57 2024 +0100
Commit: Xisco Fauli 
CommitDate: Wed Nov 6 20:00:56 2024 +0100

tdf#163736 - sc: fix searchmode cached values for lookup functions

Check the search mode option in cache for lookup functions, because
different search modes can produce different results.

Change-Id: I6127a644dc4eae6fad909a6bc83bde2c66e85201
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175972
Reviewed-by: Regina Henschel 
Reviewed-by: Balazs Varga 
Tested-by: Jenkins
(cherry picked from commit 223696267759326af4e436e0330026e4ff8ee8e0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175988
Reviewed-by: Xisco Fauli 

diff --git a/sc/inc/lookupcache.hxx b/sc/inc/lookupcache.hxx
index ca1d333880fa..00194ebd162c 100644
--- a/sc/inc/lookupcache.hxx
+++ b/sc/inc/lookupcache.hxx
@@ -56,6 +56,14 @@ public:
 GREATER_EQUAL
 };
 
+enum SearchMode
+{
+SEARCHFWD = 1,
+SEARCHREV = -1,
+SEARCHBASC = 2,
+SEARCHDESC = -2
+};
+
 class QueryCriteria
 {
 union
@@ -66,6 +74,7 @@ public:
 boolmbAlloc;
 boolmbString;
 QueryOp meOp;
+SearchMode  meSearchMode;
 
 void deleteString()
 {
@@ -77,11 +86,12 @@ public:
 
 public:
 
-explicit QueryCriteria( const ScQueryEntry & rEntry );
+explicit QueryCriteria( const ScQueryEntry & rEntry, sal_Int8 
nSearchMode );
 QueryCriteria( const QueryCriteria & r );
 ~QueryCriteria();
 
 QueryOp getQueryOp() const { return meOp; }
+SearchMode getSearchMode() const { return meSearchMode; }
 
 void setDouble( double fVal )
 {
@@ -99,7 +109,7 @@ public:
 
 bool operator==( const QueryCriteria & r ) const
 {
-return meOp == r.meOp && mbString == r.mbString &&
+return meOp == r.meOp && meSearchMode == r.meSearchMode && 
mbString == r.mbString &&
 (mbString ? (*mpStr == *r.mpStr) : (mfVal == r.mfVal));
 }
 
@@ -153,17 +163,20 @@ private:
 SCROW   mnRow;
 SCTAB   mnTab;
 QueryOp meOp;
+SearchMode  meSearchMode;
 
-QueryKey( const ScAddress & rAddress, const QueryOp eOp ) :
+QueryKey( const ScAddress & rAddress, const QueryOp eOp, SearchMode 
eSearchMode ) :
 mnRow( rAddress.Row()),
 mnTab( rAddress.Tab()),
-meOp( eOp)
+meOp( eOp),
+meSearchMode( eSearchMode)
 {
 }
 
 bool operator==( const QueryKey & r ) const
 {
-return mnRow == r.mnRow && mnTab == r.mnTab && meOp == r.meOp && 
meOp != UNKNOWN;
+return mnRow == r.mnRow && mnTab == r.mnTab && meOp == r.meOp && 
meOp != UNKNOWN &&
+meSearchMode == r.meSearchMode;
 }
 
 struct Hash
@@ -172,6 +185,7 @@ private:
 {
 return (static_cast(r.mnTab) << 24) ^
 (static_cast(r.meOp) << 22) ^
+(static_cast(r.meSearchMode) << 20) ^
 static_cast(r.mnRow);
 }
 };
diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods
index 7ba23d505bb3..c5156957acde 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods
@@ -1,7 +1,7 @@
 
 
-http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendoc

core.git: sc/source

2024-11-05 Thread Balazs Varga (via logerrit)
 sc/source/core/tool/interpr1.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e0521498bcde9235ae5b20b4a83a1c37fb91574d
Author: Balazs Varga 
AuthorDate: Tue Nov 5 09:41:16 2024 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 5 17:49:25 2024 +0100

Related: tdf#163736 - sc: Fix wrong nSearchMode (0) in vlookup

For VLOOKUP nSearchMode was 0. So static_cast(nSearchMode)
casts to a value which does not exist in SearchMode enum. That gives an
"undefined behavior". Better to use the valid default forward search. (1)

Change-Id: I1757b43073e13638704b96c4a9d036cb9a21e470
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176043
Reviewed-by: Balazs Varga 
Tested-by: Jenkins

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 3f7ab08e712c..2f5656769ced 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -7825,7 +7825,7 @@ void ScInterpreter::CalculateLookup(bool bHLookup)
 else
 {
 ScAddress aResultPos( nCol1, nRow1, nTab1);
-bFound = LookupQueryWithCache( aResultPos, aParam, refData, 0, 
SC_OPCODE_V_LOOKUP );
+bFound = LookupQueryWithCache( aResultPos, aParam, refData, 1 
/*searchfwd*/, SC_OPCODE_V_LOOKUP );
 nRow = aResultPos.Row();
 nCol = nSpIndex;
 }


core.git: Branch 'feature/cib_contract49d' - sc/qa

2024-11-05 Thread Balazs Varga (via logerrit)
 sc/qa/uitest/sort/subtotals.py |  109 -
 sc/qa/uitest/sort/tdf162262.py |  132 +
 2 files changed, 132 insertions(+), 109 deletions(-)

New commits:
commit 31c2948d2e4b7e48377dcf291c916ea38661fb4c
Author: Balazs Varga 
AuthorDate: Tue Oct 29 13:21:28 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Tue Nov 5 09:32:22 2024 +0100

Related tdf#162262 - Move "Summary below data" UI tests to

separate file.

Follow up commit: 26c08356d1b2a963efdca570979cb04388371400
(tdf#162262 sc add "Summary below data" option for Subtotal dialog)

Change-Id: I8e76fe2585993e79454f6079485f191e970e8f5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175786
Reviewed-by: Balazs Varga 
Tested-by: Jenkins
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175813
Tested-by: allotropia jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/qa/uitest/sort/subtotals.py b/sc/qa/uitest/sort/subtotals.py
index 6eddd1bc03b4..b824dcab98c8 100644
--- a/sc/qa/uitest/sort/subtotals.py
+++ b/sc/qa/uitest/sort/subtotals.py
@@ -137,113 +137,4 @@ class Subtotals(UITestCase):
 self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 
1).getValue(), 1)
 self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 
1).getValue(), 2)
 
-def test_tdf162262(self):
-with self.ui_test.load_file(get_url_for_data_file("tdf162262.ods")) as 
calc_doc:
-XcalcDoc = self.xUITest.getTopFocusWindow()
-gridwin = XcalcDoc.getChild("grid_window")
-# One group level
-# Select cell range
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": 
"A1:C15"}))
-# Select from the menu bar Data
-# Select option subtotal
-# Subtotal dialog displays
-with 
self.ui_test.execute_dialog_through_command(".uno:DataSubTotals") as xDialog:
-# Select group by: Day
-xGroupBy = xDialog.getChild("group_by1")
-select_by_text(xGroupBy, "Day")
-# Select 'Calculate subtotals for' -> Value 1 and Value 2
-xCheckListMenu = xDialog.getChild("grid1")
-xTreeList = xCheckListMenu.getChild("columns1")
-xFirstEntry = xTreeList.getChild("1")
-xFirstEntry.executeAction("CLICK", tuple())
-xFirstEntry = xTreeList.getChild("2")
-xFirstEntry.executeAction("CLICK", tuple())
-
-# Select tab options
-xTabs = xDialog.getChild("tabcontrol")
-select_pos(xTabs, "3")
-# Unselect option Summary below -> false
-xSummarybelow = xDialog.getChild("summarybelow")
-xSummarybelow.executeAction("CLICK", tuple())
-# apply with OK
-
-self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 
1).getString(), "Grand Sum")
-self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 
1).getValue(), 105)
-self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 
1).getValue(), 119)
-
-self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 
2).getString(), "Friday Result")
-self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 
2).getValue(), 19)
-self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 
2).getValue(), 21)
-
-self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 
20).getString(), "Wednesday Result")
-self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 
20).getValue(), 11)
-self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 
20).getValue(), 13)
-
-def test_tdf162262_multi(self):
-with self.ui_test.load_file(get_url_for_data_file("tdf162262.ods")) as 
calc_doc:
-XcalcDoc = self.xUITest.getTopFocusWindow()
-gridwin = XcalcDoc.getChild("grid_window")
-# Multi group level
-# Select cell range
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": 
"A1:C15"}))
-# Select from the menu bar Data
-# Select option subtotal
-# Subtotal dialog displays
-with 
self.ui_test.execute_dialog_through_command(".uno:DataSubTotals") as xDialog:
-# Select group by 1: Day
-xGroupBy = xDialog.getChild("group_by1")
-select_by_text(xGroupBy, "Day")
-# Select 'Calculate subtotals for' -> Value 1
-xCheckListMenu = xDialog.getChild("grid1")
-xTreeList = xCheckListMenu.getChild("columns1")
-# Select 1 column
-xFirstEntry = xTreeList.getChild("1")
-xFirstEntry.executeAction("CLICK", tuple())
-
-# Select tab Group by 2
-xTabs = xDialog.getChild("tabcontrol")
-select_pos(xTabs, "1")
-
-   

core.git: Branch 'feature/cib_contract49d' - 3 commits - compilerplugins/clang connectivity/source include/o3tl lotuswordpro/source offapi/com oox/source sc/inc sc/qa sc/source sc/uiconfig sw/source

2024-11-04 Thread Balazs Varga (via logerrit)
 compilerplugins/clang/test/writeonlyvars.cxx |1 
 connectivity/source/drivers/dbase/DIndexIter.cxx |3 
 include/o3tl/safeint.hxx |   36 +
 lotuswordpro/source/filter/lwptablelayout.cxx|2 
 offapi/com/sun/star/sheet/Spreadsheet.idl|   13 +
 oox/source/token/properties.txt  |1 
 sc/inc/document.hxx  |2 
 sc/inc/subtotalparam.hxx |1 
 sc/inc/table.hxx |4 
 sc/inc/unonames.hxx  |1 
 sc/inc/unowids.hxx   |3 
 sc/qa/uitest/data/tdf162262.ods  |binary
 sc/qa/uitest/sort/subtotals.py   |  109 
 sc/qa/unit/data/xlsx/subtotal-above.xlsx |binary
 sc/qa/unit/subsequent_export_test4.cxx   |   12 +
 sc/source/core/data/document.cxx |   23 +++
 sc/source/core/data/subtotalparam.cxx|6 
 sc/source/core/data/table3.cxx   |   92 +
 sc/source/filter/excel/excdoc.cxx|3 
 sc/source/filter/excel/excrecds.cxx  |   10 -
 sc/source/filter/inc/excrecds.hxx|3 
 sc/source/filter/oox/worksheetsettings.cxx   |6 
 sc/source/ui/dbgui/tpsubt.cxx|6 
 sc/source/ui/inc/tpsubt.hxx  |1 
 sc/source/ui/unoobj/cellsuno.cxx |6 
 sc/source/ui/view/cellsh1.cxx|6 
 sc/uiconfig/scalc/ui/subtotaloptionspage.ui  |  152 +--
 sw/source/ui/index/cnttab.cxx|2 
 28 files changed, 396 insertions(+), 108 deletions(-)

New commits:
commit b5347e43505f132caa3f2dee0156b6c10df07b4c
Author: Balazs Varga 
AuthorDate: Thu Oct 24 14:17:46 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Nov 4 23:57:03 2024 +0100

tdf#162262 sc add "Summary below data" option for Subtotal dialog

With this option we can set where the summary rows should appear,
above or below the datas when we create a new Subtotal area. The default
option is "True" (which means the summary rows are below the datas)
when we create a new subtotal area. Unless if we already have one subtotal
area on the same sheet, in that case the sheet level property, 
"TotalsRowBelow"
contains where should the summary rows be for the new Subtotal's.

TODO: add new ODF xml attribute for Summary below

Change-Id: Icf86c85041d75c24919cb528846d5bb2b517ca78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175556
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/offapi/com/sun/star/sheet/Spreadsheet.idl 
b/offapi/com/sun/star/sheet/Spreadsheet.idl
index d1a1dfcd0f18..605055c7b4ec 100644
--- a/offapi/com/sun/star/sheet/Spreadsheet.idl
+++ b/offapi/com/sun/star/sheet/Spreadsheet.idl
@@ -169,6 +169,19 @@ service Spreadsheet
 /** specifies all conditional formats of that sheet
  */
 [optional, property] com::sun::star::sheet::XConditionalFormats 
ConditionalFormats;
+
+/** specifies whether summary rows appear below detail in an outline,
+when applying an outline.
+
+ When true a summary row is inserted below the detailed data being
+summarized and a new outline level is established on that row.
+
+ When false a summary row is inserted above the detailed data being
+summarized and a new outline level is established on that row.
+
+@since LibreOffice 25.2
+*/
+[optional, property] boolean TotalsRowBelow;
 };
 
 
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index fd78234fbd0e..60dd62d7c6cc 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -608,6 +608,7 @@ TopBorderComplexColor
 TopBorderDistance
 TopMargin
 TotalsRow
+TotalsRowBelow
 Transformation
 TransitionDirection
 TransitionDuration
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 15f1720142fb..f8102da7bb68 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -913,6 +913,8 @@ public:
 SC_DLLPUBLIC bool GetName( SCTAB nTab, OUString& rName ) const;
 SC_DLLPUBLIC bool GetCodeName( SCTAB nTab, OUString& rName ) const;
 SC_DLLPUBLIC bool SetCodeName( SCTAB nTab, const OUString& rName );
+SC_DLLPUBLIC bool GetTotalsRowBelow( SCTAB nTab ) const;
+SC_DLLPUBLIC bool SetTotalsRowBelow( SCTAB nTab, bool bVal );
 SC_DLLPUBLIC bool GetTable( const OUString& rName, SCTAB& rTab ) const;
 SC_DLLPUBLIC SCCOL MaxCol() const { return mxSheetLimits->mnMaxCol; }
 SC_DLLPUBLIC SCROW MaxRow() const { return mxSheetLimits->mnMaxRow; }
diff --git a/sc/inc/subtotalparam.hxx b/sc/inc/subtotalparam.hxx
index 8e36dad83987..3b379edb167d 100644
--- a/sc/inc/subtotalparam.hxx
+++ b/sc/inc/subtotalparam.hxx
@@ -24,6 +24,7 @@ struct SC_DLLPUBLIC ScSubTotalParam
 boolbPagebr

core.git: sc/inc sc/qa sc/source

2024-11-04 Thread Balazs Varga (via logerrit)
 sc/inc/lookupcache.hxx |   24 +
 sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods |  266 -
 sc/source/core/tool/interpr1.cxx   |2 
 sc/source/core/tool/lookupcache.cxx|   11 
 4 files changed, 227 insertions(+), 76 deletions(-)

New commits:
commit 223696267759326af4e436e0330026e4ff8ee8e0
Author: Balazs Varga 
AuthorDate: Sun Nov 3 19:34:57 2024 +0100
Commit: Balazs Varga 
CommitDate: Mon Nov 4 14:51:35 2024 +0100

tdf#163736 - sc: fix searchmode cached values for lookup functions

Check the search mode option in cache for lookup functions, because
different search modes can produce different results.

Change-Id: I6127a644dc4eae6fad909a6bc83bde2c66e85201
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175972
Reviewed-by: Regina Henschel 
Reviewed-by: Balazs Varga 
Tested-by: Jenkins

diff --git a/sc/inc/lookupcache.hxx b/sc/inc/lookupcache.hxx
index ca1d333880fa..00194ebd162c 100644
--- a/sc/inc/lookupcache.hxx
+++ b/sc/inc/lookupcache.hxx
@@ -56,6 +56,14 @@ public:
 GREATER_EQUAL
 };
 
+enum SearchMode
+{
+SEARCHFWD = 1,
+SEARCHREV = -1,
+SEARCHBASC = 2,
+SEARCHDESC = -2
+};
+
 class QueryCriteria
 {
 union
@@ -66,6 +74,7 @@ public:
 boolmbAlloc;
 boolmbString;
 QueryOp meOp;
+SearchMode  meSearchMode;
 
 void deleteString()
 {
@@ -77,11 +86,12 @@ public:
 
 public:
 
-explicit QueryCriteria( const ScQueryEntry & rEntry );
+explicit QueryCriteria( const ScQueryEntry & rEntry, sal_Int8 
nSearchMode );
 QueryCriteria( const QueryCriteria & r );
 ~QueryCriteria();
 
 QueryOp getQueryOp() const { return meOp; }
+SearchMode getSearchMode() const { return meSearchMode; }
 
 void setDouble( double fVal )
 {
@@ -99,7 +109,7 @@ public:
 
 bool operator==( const QueryCriteria & r ) const
 {
-return meOp == r.meOp && mbString == r.mbString &&
+return meOp == r.meOp && meSearchMode == r.meSearchMode && 
mbString == r.mbString &&
 (mbString ? (*mpStr == *r.mpStr) : (mfVal == r.mfVal));
 }
 
@@ -153,17 +163,20 @@ private:
 SCROW   mnRow;
 SCTAB   mnTab;
 QueryOp meOp;
+SearchMode  meSearchMode;
 
-QueryKey( const ScAddress & rAddress, const QueryOp eOp ) :
+QueryKey( const ScAddress & rAddress, const QueryOp eOp, SearchMode 
eSearchMode ) :
 mnRow( rAddress.Row()),
 mnTab( rAddress.Tab()),
-meOp( eOp)
+meOp( eOp),
+meSearchMode( eSearchMode)
 {
 }
 
 bool operator==( const QueryKey & r ) const
 {
-return mnRow == r.mnRow && mnTab == r.mnTab && meOp == r.meOp && 
meOp != UNKNOWN;
+return mnRow == r.mnRow && mnTab == r.mnTab && meOp == r.meOp && 
meOp != UNKNOWN &&
+meSearchMode == r.meSearchMode;
 }
 
 struct Hash
@@ -172,6 +185,7 @@ private:
 {
 return (static_cast(r.mnTab) << 24) ^
 (static_cast(r.meOp) << 22) ^
+(static_cast(r.meSearchMode) << 20) ^
 static_cast(r.mnRow);
 }
 };
diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods
index 7ba23d505bb3..c5156957acde 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods
@@ -1,7 +1,7 @@
 
 
-http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation:name

core.git: sc/qa

2024-10-29 Thread Balazs Varga (via logerrit)
 sc/qa/uitest/sort/subtotals.py |  109 -
 sc/qa/uitest/sort/tdf162262.py |  132 +
 2 files changed, 132 insertions(+), 109 deletions(-)

New commits:
commit af70b2b888e6baeb0da75eb0beb0dc51325adfed
Author: Balazs Varga 
AuthorDate: Tue Oct 29 13:21:28 2024 +0100
Commit: Balazs Varga 
CommitDate: Tue Oct 29 19:13:20 2024 +0100

Related tdf#162262 - Move "Summary below data" UI tests to

separate file.

Follow up commit: 26c08356d1b2a963efdca570979cb04388371400
(tdf#162262 sc add "Summary below data" option for Subtotal dialog)

Change-Id: I8e76fe2585993e79454f6079485f191e970e8f5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175786
Reviewed-by: Balazs Varga 
Tested-by: Jenkins

diff --git a/sc/qa/uitest/sort/subtotals.py b/sc/qa/uitest/sort/subtotals.py
index 6eddd1bc03b4..b824dcab98c8 100644
--- a/sc/qa/uitest/sort/subtotals.py
+++ b/sc/qa/uitest/sort/subtotals.py
@@ -137,113 +137,4 @@ class Subtotals(UITestCase):
 self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 
1).getValue(), 1)
 self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 
1).getValue(), 2)
 
-def test_tdf162262(self):
-with self.ui_test.load_file(get_url_for_data_file("tdf162262.ods")) as 
calc_doc:
-XcalcDoc = self.xUITest.getTopFocusWindow()
-gridwin = XcalcDoc.getChild("grid_window")
-# One group level
-# Select cell range
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": 
"A1:C15"}))
-# Select from the menu bar Data
-# Select option subtotal
-# Subtotal dialog displays
-with 
self.ui_test.execute_dialog_through_command(".uno:DataSubTotals") as xDialog:
-# Select group by: Day
-xGroupBy = xDialog.getChild("group_by1")
-select_by_text(xGroupBy, "Day")
-# Select 'Calculate subtotals for' -> Value 1 and Value 2
-xCheckListMenu = xDialog.getChild("grid1")
-xTreeList = xCheckListMenu.getChild("columns1")
-xFirstEntry = xTreeList.getChild("1")
-xFirstEntry.executeAction("CLICK", tuple())
-xFirstEntry = xTreeList.getChild("2")
-xFirstEntry.executeAction("CLICK", tuple())
-
-# Select tab options
-xTabs = xDialog.getChild("tabcontrol")
-select_pos(xTabs, "3")
-# Unselect option Summary below -> false
-xSummarybelow = xDialog.getChild("summarybelow")
-xSummarybelow.executeAction("CLICK", tuple())
-# apply with OK
-
-self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 
1).getString(), "Grand Sum")
-self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 
1).getValue(), 105)
-self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 
1).getValue(), 119)
-
-self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 
2).getString(), "Friday Result")
-self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 
2).getValue(), 19)
-self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 
2).getValue(), 21)
-
-self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 
20).getString(), "Wednesday Result")
-self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 
20).getValue(), 11)
-self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 
20).getValue(), 13)
-
-def test_tdf162262_multi(self):
-with self.ui_test.load_file(get_url_for_data_file("tdf162262.ods")) as 
calc_doc:
-XcalcDoc = self.xUITest.getTopFocusWindow()
-gridwin = XcalcDoc.getChild("grid_window")
-# Multi group level
-# Select cell range
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": 
"A1:C15"}))
-# Select from the menu bar Data
-# Select option subtotal
-# Subtotal dialog displays
-with 
self.ui_test.execute_dialog_through_command(".uno:DataSubTotals") as xDialog:
-# Select group by 1: Day
-xGroupBy = xDialog.getChild("group_by1")
-select_by_text(xGroupBy, "Day")
-# Select 'Calculate subtotals for' -> Value 1
-xCheckListMenu = xDialog.getChild("grid1")
-xTreeList = xCheckListMenu.getChild("columns1")
-# Select 1 column
-xFirstEntry = xTreeList.getChild("1")
-xFirstEntry.executeAction("CLICK", tuple())
-
-# Select tab Group by 2
-xTabs = xDialog.getChild("tabcontrol")
-select_pos(xTabs, "1")
-
-# Select group by 2: Day
-xGroupBy = xDialog.getChild("group_by2")
-select_by_text(xGroupBy, "Day")

core.git: offapi/com oox/source sc/inc sc/qa sc/source sc/uiconfig

2024-10-28 Thread Balazs Varga (via logerrit)
 offapi/com/sun/star/sheet/Spreadsheet.idl   |   13 ++
 oox/source/token/properties.txt |1 
 sc/inc/document.hxx |2 
 sc/inc/subtotalparam.hxx|1 
 sc/inc/table.hxx|4 
 sc/inc/unonames.hxx |1 
 sc/inc/unowids.hxx  |3 
 sc/qa/uitest/data/tdf162262.ods |binary
 sc/qa/uitest/sort/subtotals.py  |  109 
 sc/qa/unit/data/xlsx/subtotal-above.xlsx|binary
 sc/qa/unit/subsequent_export_test4.cxx  |   12 ++
 sc/source/core/data/document.cxx|   19 +++
 sc/source/core/data/subtotalparam.cxx   |6 -
 sc/source/core/data/table3.cxx  |   79 ++
 sc/source/filter/excel/excdoc.cxx   |3 
 sc/source/filter/excel/excrecds.cxx |   10 +
 sc/source/filter/inc/excrecds.hxx   |3 
 sc/source/filter/oox/worksheetsettings.cxx  |6 +
 sc/source/ui/dbgui/tpsubt.cxx   |6 +
 sc/source/ui/inc/tpsubt.hxx |1 
 sc/source/ui/unoobj/cellsuno.cxx|6 +
 sc/source/ui/view/cellsh1.cxx   |6 +
 sc/uiconfig/scalc/ui/subtotaloptionspage.ui |  152 +++-
 23 files changed, 346 insertions(+), 97 deletions(-)

New commits:
commit 26c08356d1b2a963efdca570979cb04388371400
Author: Balazs Varga 
AuthorDate: Thu Oct 24 14:17:46 2024 +0200
Commit: Balazs Varga 
CommitDate: Mon Oct 28 13:28:21 2024 +0100

tdf#162262 sc add "Summary below data" option for Subtotal dialog

With this option we can set where the summary rows should appear,
above or below the datas when we create a new Subtotal area. The default
option is "True" (which means the summary rows are below the datas)
when we create a new subtotal area. Unless if we already have one subtotal
area on the same sheet, in that case the sheet level property, 
"TotalsRowBelow"
contains where should the summary rows be for the new Subtotal's.

TODO: add new ODF xml attribute for Summary below

Change-Id: Icf86c85041d75c24919cb528846d5bb2b517ca78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175556
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/offapi/com/sun/star/sheet/Spreadsheet.idl 
b/offapi/com/sun/star/sheet/Spreadsheet.idl
index d1a1dfcd0f18..605055c7b4ec 100644
--- a/offapi/com/sun/star/sheet/Spreadsheet.idl
+++ b/offapi/com/sun/star/sheet/Spreadsheet.idl
@@ -169,6 +169,19 @@ service Spreadsheet
 /** specifies all conditional formats of that sheet
  */
 [optional, property] com::sun::star::sheet::XConditionalFormats 
ConditionalFormats;
+
+/** specifies whether summary rows appear below detail in an outline,
+when applying an outline.
+
+ When true a summary row is inserted below the detailed data being
+summarized and a new outline level is established on that row.
+
+ When false a summary row is inserted above the detailed data being
+summarized and a new outline level is established on that row.
+
+@since LibreOffice 25.2
+*/
+[optional, property] boolean TotalsRowBelow;
 };
 
 
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 6140d192b55d..0cb978129ccc 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -613,6 +613,7 @@ TopBorderComplexColor
 TopBorderDistance
 TopMargin
 TotalsRow
+TotalsRowBelow
 Transformation
 TransitionDirection
 TransitionDuration
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 43a08fcdc7b0..bf8eaa34f2f2 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -982,6 +982,8 @@ public:
 SC_DLLPUBLIC bool GetName( SCTAB nTab, OUString& rName ) const;
 SC_DLLPUBLIC bool GetCodeName( SCTAB nTab, OUString& rName ) const;
 SC_DLLPUBLIC bool SetCodeName( SCTAB nTab, const OUString& rName );
+SC_DLLPUBLIC bool GetTotalsRowBelow( SCTAB nTab ) const;
+SC_DLLPUBLIC bool SetTotalsRowBelow( SCTAB nTab, bool bVal );
 SC_DLLPUBLIC bool GetTable( const OUString& rName, SCTAB& rTab ) const;
 SC_DLLPUBLIC SCCOL MaxCol() const { return mxSheetLimits->mnMaxCol; }
 SC_DLLPUBLIC SCROW MaxRow() const { return mxSheetLimits->mnMaxRow; }
diff --git a/sc/inc/subtotalparam.hxx b/sc/inc/subtotalparam.hxx
index 8e36dad83987..3b379edb167d 100644
--- a/sc/inc/subtotalparam.hxx
+++ b/sc/inc/subtotalparam.hxx
@@ -24,6 +24,7 @@ struct SC_DLLPUBLIC ScSubTotalParam
 boolbPagebreak:1;   ///< page break at change of 
group
 boolbCaseSens:1;
 boolbDoSort:1;  ///< presort
+boolbSummaryBelow:1;///< Summary below or above 
(default: below)
 boolbAscending:1;   ///< sort ascending
 boolbUserDef:1; ///< sort user defined
 boo

core.git: Branch 'distro/allotropia/zeta-24-2' - cui/source cui/uiconfig

2024-10-17 Thread Balazs Varga (via logerrit)
 cui/source/dialogs/about.cxx   |   16 ---
 cui/source/inc/about.hxx   |3 --
 cui/uiconfig/ui/aboutdialog.ui |   58 -
 3 files changed, 77 deletions(-)

New commits:
commit 1666926abaf3da8454d34a3e710e8ef74b532417
Author: Balazs Varga 
AuthorDate: Mon Sep 4 14:31:50 2023 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 17 11:40:18 2024 +0200

Remove external links from about dialog

Party cherry-picked from: a922b8d9644d1aa07d40a50025931c7eda89ba7c

Change-Id: I37a655178c57b5c932cbe802b62427094155e495
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156516
Reviewed-by: Gabor Kelemen 
Tested-by: Thorsten Behrens 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175006
Tested-by: allotropia jenkins 
Reviewed-by: Balazs Varga 

diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 0ead4b573700..bf13e5d3816c 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -56,9 +56,6 @@ using namespace ::com::sun::star::uno;
 
 AboutDialog::AboutDialog(weld::Window *pParent)
 : GenericDialogController(pParent, "cui/ui/aboutdialog.ui", "AboutDialog"),
-  m_pCreditsButton(m_xBuilder->weld_link_button("btnCredits")),
-  m_pWebsiteButton(m_xBuilder->weld_link_button("btnWebsite")),
-  m_pReleaseNotesButton(m_xBuilder->weld_link_button("btnReleaseNotes")),
   m_pCloseButton(m_xBuilder->weld_button("btnClose")),
   m_pCopyButton(m_xBuilder->weld_button("btnCopyVersion")),
   m_pBrandImage(m_xBuilder->weld_image("imBrand")),
@@ -121,19 +118,6 @@ AboutDialog::AboutDialog(weld::Window *pParent)
 m_pAboutImage->set_image(aGraphic.GetXGraphic());
   }
 
-  // Links
-  
m_pCreditsButton->set_uri(officecfg::Office::Common::Menus::CreditsURL::get());
-
-  OUString sURL(officecfg::Office::Common::Help::StartCenter::InfoURL::get());
-  // localizeWebserviceURI(sURL);
-  m_pWebsiteButton->set_uri(sURL);
-
-  // See also SID_WHATSNEW in sfx2/source/appl/appserv.cxx
-  sURL = officecfg::Office::Common::Menus::ReleaseNotesURL::get() +
- "?LOvers=" + utl::ConfigManager::getProductVersion() + "&LOlocale=" +
- LanguageTag(utl::ConfigManager::getUILocale()).getBcp47();
-  m_pReleaseNotesButton->set_uri(sURL);
-
   // Handler
   m_pCopyButton->connect_clicked(LINK(this, AboutDialog, HandleClick));
   m_pCloseButton->grab_focus();
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index 42eae5467eab..b29be776c56c 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -23,9 +23,6 @@
 class AboutDialog : public weld::GenericDialogController
 {
 private:
-std::unique_ptr m_pCreditsButton;
-std::unique_ptr m_pWebsiteButton;
-std::unique_ptr m_pReleaseNotesButton;
 std::unique_ptr m_pCloseButton;
 std::unique_ptr m_pCopyButton;
 
diff --git a/cui/uiconfig/ui/aboutdialog.ui b/cui/uiconfig/ui/aboutdialog.ui
index 83805a52ad18..6cc75a2d8073 100644
--- a/cui/uiconfig/ui/aboutdialog.ui
+++ b/cui/uiconfig/ui/aboutdialog.ui
@@ -381,64 +381,6 @@
 False
 center
 12
-
-  
-Credits
-lbCredit
-True
-True
-True
-none
-0
-  
-  
-False
-True
-0
-  
-
-
-  
-Website
-True
-True
-True
-none
-0
-https://www.libreoffice.org/
-  
-  
-False
-True
-1
-  
-
-
-  
-Release Notes
-True
-True
-True
-none
-0
-  
-  
-False
-True
-2
-  
-
-  
-  
-1
-4
-  
-
-
-  
-True
-False
-12
 
   
 True


core.git: Branch 'distro/allotropia/zeta-24-2' - 2 commits - desktop/source instsetoo_native/util

2024-10-17 Thread Balazs Varga (via logerrit)
 desktop/source/app/crashreport.cxx  |   11 ++-
 instsetoo_native/util/openoffice.lst.in |   20 
 2 files changed, 30 insertions(+), 1 deletion(-)

New commits:
commit dd1fcb03e7a15e5a1fe8cab3fd0239563388a29e
Author: Balazs Varga 
AuthorDate: Sun Sep 3 19:29:24 2023 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 17 11:29:12 2024 +0200

Add correct STARTCENTER URLs

Change-Id: Id53de5f756a6641aae28e4c5bb3435459e32105e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156495
Reviewed-by: Gabor Kelemen 
Tested-by: Thorsten Behrens 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175004
Tested-by: allotropia jenkins 
Reviewed-by: Balazs Varga 

diff --git a/instsetoo_native/util/openoffice.lst.in 
b/instsetoo_native/util/openoffice.lst.in
index e482ea2ad78a..0b8f7fab1a41 100644
--- a/instsetoo_native/util/openoffice.lst.in
+++ b/instsetoo_native/util/openoffice.lst.in
@@ -31,6 +31,7 @@ Globals
 PACKAGEMAP package_names.txt,package_names_ext.txt
 WINDOWSPATCHLEVEL @LIBO_VERSION_MICRO@
 OOOVENDOR Allotropia Software GmbH
+OOODOWNLOADNAME 1
 64BITPRODUCT @WINDOWS_X64@
 WINDOWSSDKVERSION @WINDOWS_SDK_VERSION@
 CRASHDUMPENABLE @DEFAULT_CRASHDUMP_VALUE@
@@ -62,8 +63,14 @@ ZetaOffice
 ROOTMODULEGID gid_Module_Root
 GLOBALPATCHFILEGID gid_File_Txt_Patchfiles
 SPELLCHECKERFILE spellchecker_selection.txt
+OOODOWNLOADNAME 1
 CHANGETARGETDIR 1
 PATCHCODEFILE ooo_patchcodes.txt
+STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
+STARTCENTER_INFO_URL https://www.allotropia.de/
+STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
+DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
+STARTCENTER_HIDE_EXTERNAL_LINKS 0
 }
 active  1
 compression 5
@@ -105,10 +112,15 @@ ZetaOfficeDev
 ROOTMODULEGID gid_Module_Root
 GLOBALPATCHFILEGID gid_File_Txt_Patchfiles
 SPELLCHECKERFILE spellchecker_selection.txt
+OOODOWNLOADNAME 1
 CHANGETARGETDIR 1
 PATCHCODEFILE ooodev_patchcodes.txt
 CODEFILENAME codes_ooodev.txt
 LOCALUSERDIR $ORIGIN/..
+STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
+STARTCENTER_INFO_URL https://www.allotropia.de/
+STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
+DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
 }
 active  1
 compression 5
@@ -146,6 +158,10 @@ ZetaOffice_SDK
 NOSHORTDIRECTORYNAMES 1
 CHANGETARGETDIR 1
 DONTUSESTARTMENUFOLDER 1
+STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
+STARTCENTER_INFO_URL https://www.allotropia.de/
+STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
+DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
 }
 active 1
 compression 5
@@ -187,6 +203,10 @@ ZetaOfficeDev_SDK
 NOSHORTDIRECTORYNAMES 1
 CHANGETARGETDIR 1
 DONTUSESTARTMENUFOLDER 1
+STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
+STARTCENTER_INFO_URL https://www.allotropia.de/
+STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
+DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
 }
 active 1
 compression 5
commit 1b7798ba51e137ff2b66bbd26de6a1609b0baf58
Author: Thorsten Behrens 
AuthorDate: Tue Apr 21 01:13:46 2020 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 17 11:29:01 2024 +0200

related tdf#127711: read crashdump URL from ini file

cherry-picked from commit: 8961f4aaf38db139eb8f154d1c8bb788c992a4e7

Change-Id: I68f06aaf5b8c053d1deef2021876b1399e422dd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156483
Reviewed-by: Gabor Kelemen 
Tested-by: Thorsten Behrens 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175003
Tested-by: allotropia jenkins 
Reviewed-by: Balazs Varga 

diff --git a/desktop/source/app/crashreport.cxx 
b/desktop/source/app/crashreport.cxx
index fd1bd5402768..c4419dd3630f 100644
--- a/desktop/source/app/crashreport.cxx
+++ b/desktop/source/app/crashreport.cxx
@@ -136,9 +136,18 @@ void CrashReporter::writeCommonInfo()
 ucbhelper::InternetProxyDecider 
proxy_decider(::comphelper::getProcessComponentContext());
 
 static constexpr OUString protocol = u"https"_ustr;
-static constexpr OUString url = u"crashreport.libreoffice.org"_ustr;
 const sal_Int32 port = 443;
 
+// read configuration item 'CrashDumpUrl'
+OUString url;
+rtl::Bootstrap::get("CrashDumpUrl", url);

core.git: Branch 'distro/allotropia/zeta-24-2' - 2 commits - .gitreview sfx2/source

2024-10-17 Thread Balazs Varga (via logerrit)
 .gitreview   |2 +-
 sfx2/source/dialog/backingwindow.cxx |   18 +-
 2 files changed, 2 insertions(+), 18 deletions(-)

New commits:
commit 48f5576bc0eb26ede279152f7184bde13c90e225
Author: Balazs Varga 
AuthorDate: Thu Sep 7 23:17:52 2023 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 17 11:27:33 2024 +0200

Remove external link from start center brand image

Change-Id: I601a65c526ba1c3b6e49f02a0401f04379c3e82b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156683
Reviewed-by: Gabor Kelemen 
Tested-by: Balazs Varga 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174996
Reviewed-by: Balazs Varga 
Tested-by: allotropia jenkins 

diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index fb229f0f3f4a..0d39e9b984ee 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -81,7 +81,7 @@ public:
 OutputDevice& rDevice = pDrawingArea->get_ref_device();
 rDevice.SetBackground(Wallpaper(rStyleSettings.GetWindowColor()));
 
-SetPointer(PointerStyle::RefHand);
+// SetPointer(PointerStyle::RefHand);
 }
 
 virtual void Resize() override
@@ -122,22 +122,6 @@ public:
 weld::CustomWidgetController::StyleUpdated();
 }
 
-virtual bool MouseButtonUp(const MouseEvent& rMEvt) override
-{
-if (rMEvt.IsLeft())
-{
-OUString sURL = 
officecfg::Office::Common::Menus::ReleaseNotesURL::get();
-// localizeWebserviceURI(sURL);
-
-Reference const 
xSystemShellExecute(
-css::system::SystemShellExecute::create(
-::comphelper::getProcessComponentContext()));
-xSystemShellExecute->execute(sURL, OUString(),
- 
css::system::SystemShellExecuteFlags::URIS_ONLY);
-}
-return true;
-}
-
 virtual void Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&) override
 {
 rRenderContext.DrawBitmapEx(Point(0, 0), maBrandImage);
commit 1237aa9019cde12c6b36ba74f53eb40dd0683217
Author: Samuel Mehrbrodt 
AuthorDate: Wed Jul 17 09:17:05 2019 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 17 11:27:22 2024 +0200

gitreview: Update default branch

Change-Id: I7452fae66de7b212ffdc2d948172b932857cf872
Reviewed-on: https://gerrit.libreoffice.org/75752
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156333
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174995
Reviewed-by: Balazs Varga 
Tested-by: allotropia jenkins 

diff --git a/.gitreview b/.gitreview
index 401b0af46d75..55edf9b0885a 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,5 +3,5 @@ host=gerrit.libreoffice.org
 port=29418
 project=core
 defaultremote=logerrit
-defaultbranch=libreoffice-24-2-6
+defaultbranch=distro/allotropia/zeta-24-2
 


core.git: Branch 'distro/allotropia/zeta-24-2' - 2 commits - officecfg/registry scp2/inc scp2/source sc/source setup_native/source sysui/desktop

2024-10-17 Thread Balazs Varga (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Common.xcu |4 
 sc/source/filter/oox/workbookhelper.cxx  |2 
 scp2/inc/macros.inc  |2 
 scp2/source/calc/registryitem_calc.scp   |   28 -
 setup_native/source/packinfo/packinfo_brand.txt  |   32 -
 setup_native/source/packinfo/packinfo_extensions.txt |   18 
 setup_native/source/packinfo/packinfo_office.txt |  362 +++
 setup_native/source/packinfo/packinfo_office_help.txt|4 
 setup_native/source/packinfo/packinfo_office_lang.txt|   40 -
 setup_native/source/packinfo/packinfo_sdkoo.txt  |4 
 setup_native/source/packinfo/packinfo_ure.txt|8 
 sysui/desktop/debian/control |2 
 12 files changed, 253 insertions(+), 253 deletions(-)

New commits:
commit b4a263c159f9f4aa849cc12f924474fa331a0b42
Author: Balazs Varga 
AuthorDate: Thu Aug 31 11:22:24 2023 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 17 11:27:03 2024 +0200

Default Skia to off on all platforms

cherry-pick from commit: 30d55743834d58ae54ab10ce7be7474703678b36

Change-Id: I44fc59937141ae6f8fc7ef5ef9f4653e9c6d1c3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156332
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 7a738ef67a32c8c1ef550700a536b4257c54f64f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174799
Reviewed-by: Balazs Varga 
Tested-by: allotropia jenkins 

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu 
b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index de1eae2ce767..7207268fab0e 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -45,9 +45,9 @@
   
   
 
-  true
+  false
   false
-  true
+  false
 
   
   
commit a2627b3b20f94ec85fd73bfea9a796abc91ff5b8
Author: Balazs Varga 
AuthorDate: Wed Sep 13 13:07:57 2023 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 17 11:26:49 2024 +0200

Branding for ZetaOffice without any branding image

Branding ZetaOffice part 4.

Follow-up of commits:
c8d0fc52b6887261544686fb670415cdbca65eec
cfd974387f53c2e86efa50491af79c19b2da6195
21385708d1dad4087fe113f293fb50980a8e7460

Change-Id: I106622d9059b2a8ced6a38beb1090bcde7de87eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156893
Tested-by: Balazs Varga 
Reviewed-by: Balazs Varga 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174994
Tested-by: allotropia jenkins 

diff --git a/sc/source/filter/oox/workbookhelper.cxx 
b/sc/source/filter/oox/workbookhelper.cxx
index 855c7dab40b0..2cb1e7750149 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -565,7 +565,7 @@ void WorkbookGlobals::initialize()
 aCalcConfig.SetStringRefSyntax( formula::FormulaGrammar::CONV_XL_A1 ) ;
 mpDoc->SetCalcConfig(aCalcConfig);
 }
-else if (aGenerator.startsWithIgnoreAsciiCase("LibreOffice"))
+else if ( aGenerator.startsWithIgnoreAsciiCase("LibreOffice") || 
aGenerator.startsWithIgnoreAsciiCase("ZetaOffice") )
 {
 mbGeneratorKnownGood = true;
 }
diff --git a/scp2/inc/macros.inc b/scp2/inc/macros.inc
index 4a2d8b4f6a43..d4643e60af88 100644
--- a/scp2/inc/macros.inc
+++ b/scp2/inc/macros.inc
@@ -286,7 +286,7 @@ End
 ModuleID = modid; \
 Subkey = STRING(CONCAT2(ZetaOffice.,name)); \
 Name = STRING(AppUserModelID); \
-Value = STRING(CONCAT2(TheDocumentFoundation.ZetaOffice.,doc_type)); \
+Value = STRING(CONCAT2(Allotropia.ZetaOffice.,doc_type)); \
 End
 
 #define REGISTRY_ENTRY_ICON(name,modid,icon_id) \
diff --git a/scp2/source/calc/registryitem_calc.scp 
b/scp2/source/calc/registryitem_calc.scp
index 74768b70a8ac..f882038a8a6a 100644
--- a/scp2/source/calc/registryitem_calc.scp
+++ b/scp2/source/calc/registryitem_calc.scp
@@ -880,7 +880,7 @@ End
 RegistryItem 
gid_Regitem_CalcTemplate_1_Shellex_PropertySheetHandlers_MyPropSheet1
 ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
 ModuleID = gid_Module_Prg_Calc_Bin;
-Subkey = 
"LibreOffice.CalcTemplate.1\shellex\PropertySheetHandlers\MyPropSheet1";
+Subkey = 
"ZetaOffice.CalcTemplate.1\shellex\PropertySheetHandlers\MyPropSheet1";
 Value = "{63542C48-9552-494A-84F7-73AA6A7C99C1}";
 End
 
@@ -888,7 +888,7 @@ RegistryItem gid_Regitem_Ots
 ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
 Subkey = ".ots";
 ModuleID = gid_Module_Prg_Calc_Bin;
-Value = "LibreOffice.CalcTemplate.1";
+Value = "ZetaOffice.CalcTemplate.1";
 End
 
 RegistryItem gid_Regitem_Ots_Contenttype
@@ -901,14 +901,14 @@ End
 
 RegistryItem gid_Regitem_Openoffice_Calctemplate_1
 ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
-Subkey = "LibreOffice.CalcTemplate.1"

core.git: Branch 'distro/allotropia/zeta-24-2' - configure.ac cui/source framework/source include/default.rc instsetoo_native/CustomTarget_setup.mk instsetoo_native/util postprocess/CustomTarget_regis

2024-10-17 Thread Balazs Varga (via logerrit)
 configure.ac |4 
 cui/source/dialogs/about.cxx |2 
 framework/source/helper/titlebarupdate.cxx   |2 
 include/default.rc   |2 
 instsetoo_native/CustomTarget_setup.mk   |2 
 instsetoo_native/util/openoffice.lst.in  |   75 -
 postprocess/CustomTarget_registry.mk |2 
 scp2/inc/macros.inc  |   30 +--
 scp2/source/base/folderitem_base.scp |2 
 scp2/source/base/registryitem_base.scp   |   26 +--
 scp2/source/calc/folderitem_calc.scp |2 
 scp2/source/calc/registryitem_calc.scp   |   66 
 scp2/source/draw/folderitem_draw.scp |2 
 scp2/source/draw/registryitem_draw.scp   |   66 
 scp2/source/impress/folderitem_impress.scp   |2 
 scp2/source/impress/registryitem_impress.scp |   70 
 scp2/source/math/folderitem_math.scp |2 
 scp2/source/math/registryitem_math.scp   |   56 +++
 scp2/source/ooo/folderitem_ooo.scp   |6 
 scp2/source/writer/folderitem_writer.scp |2 
 scp2/source/writer/registryitem_writer.scp   |  184 +++
 sfx2/source/dialog/backingwindow.cxx |4 
 solenv/bin/modules/installer/download.pm |2 
 solenv/bin/modules/installer/setupscript.pm  |2 
 sysui/desktop/freedesktop/freedesktop-menus.spec |4 
 sysui/desktop/share/create_tree.sh   |8 -
 sysui/productlist.mk |   10 -
 vcl/win/app/salinst.cxx  |2 
 28 files changed, 319 insertions(+), 318 deletions(-)

New commits:
commit 5ce7a548004c9e5cdcd8ee7eb5424f234219d180
Author: Balazs Varga 
AuthorDate: Wed Aug 16 15:19:28 2023 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 17 11:26:27 2024 +0200

Branding for ZetaOffice without any branding image

Branding ZetaOffice part 1.

Also includes:
Branding ZetaOffice part 2.
I13be548a74b07a8a639208c0b21e9dca195c6b5e

Branding ZetaOffice part 3.
Ic27257e001005110375401ec2cc02cb4f52f0a88

Change-Id: I1e4c5cb54e1f15c1e5291fda0def92b81b00eea0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155744
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 
(cherry picked from commit 21385708d1dad4087fe113f293fb50980a8e7460)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174791
Tested-by: Balazs Varga 
Reviewed-by: Balazs Varga 

diff --git a/configure.ac b/configure.ac
index 712cefcca6e8..cd27f1754f3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[24.2.6.2],[],[],[http://documentfoundation.org/])
+AC_INIT([ZetaOffice],[24.2.6.2],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
@@ -496,7 +496,7 @@ if test -n "$with_product_name" -a "$with_product_name" != 
no; then
 PRODUCTNAME="$with_product_name"
 fi
 if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
-PRODUCTNAME="${PRODUCTNAME}Dev"
+PRODUCTNAME=AC_PACKAGE_NAME
 fi
 AC_MSG_RESULT([$PRODUCTNAME])
 AC_SUBST(PRODUCTNAME)
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index ce82e418cf9e..0ead4b573700 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -125,7 +125,7 @@ AboutDialog::AboutDialog(weld::Window *pParent)
   
m_pCreditsButton->set_uri(officecfg::Office::Common::Menus::CreditsURL::get());
 
   OUString sURL(officecfg::Office::Common::Help::StartCenter::InfoURL::get());
-  localizeWebserviceURI(sURL);
+  // localizeWebserviceURI(sURL);
   m_pWebsiteButton->set_uri(sURL);
 
   // See also SID_WHATSNEW in sfx2/source/appl/appserv.cxx
diff --git a/framework/source/helper/titlebarupdate.cxx 
b/framework/source/helper/titlebarupdate.cxx
index add4ea9709b8..05a1e0278904 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -143,7 +143,7 @@ void TitleBarUpdate::impl_updateApplicationID(const 
css::uno::Reference< css::fr
 sDesktopName = "Startcenter";
 #if defined(_WIN32)
 // We use a hardcoded product name matching the registry keys so 
applications can be associated with file types
-sApplicationID = "TheDocumentFoundation.LibreOffice." + sDesktopName;
+sApplicationID = "Allotropia.ZetaOffice." + sDesktopName;
 #else
 sApplicationID = 
utl::ConfigManager::getProductName().toAsciiLowerCase() + "-" + 
sD

core.git: oox/source sd/qa sd/source

2024-10-16 Thread Balazs Varga (via logerrit)
 oox/source/drawingml/shape.cxx |   40 ++
 sd/qa/unit/data/xml/n762695_1.xml  |4 -
 sd/qa/unit/data/xml/n820786_0.xml  |4 -
 sd/qa/unit/data/xml/tdf90338_0.xml |2 
 sd/qa/unit/data/xml/tdf92001_0.xml |2 
 sd/source/ui/view/drtxtob1.cxx |   82 +++--
 6 files changed, 89 insertions(+), 45 deletions(-)

New commits:
commit 1d9ce0a67a71e51569cd33c26270eeece587a354
Author: Balazs Varga 
AuthorDate: Sun Oct 13 20:58:17 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Wed Oct 16 20:19:58 2024 +0200

tdf#162571 - sd: Text box expands or shrinks on left or right or

both sides, depending on the text alignment. Set the text anchor
position based on the first paragraph alignment.

WIP: testing...

Change-Id: Ie1588c3eab5dd24eddb20baf342aca57c0dd39fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174885
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins
Tested-by: Gabor Kelemen 

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 56e04caadbf1..f01c4b90a7a6 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -75,6 +75,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -616,6 +617,16 @@ static SdrTextHorzAdjust lcl_convertAdjust( 
ParagraphAdjust eAdjust )
 return SDRTEXTHORZADJUST_LEFT;
 }
 
+static TextHorizontalAdjust lcl_convertTextAdjust(ParagraphAdjust eAdjust)
+{
+if (eAdjust == ParagraphAdjust_LEFT)
+return drawing::TextHorizontalAdjust_LEFT;
+else if (eAdjust == ParagraphAdjust_RIGHT)
+return drawing::TextHorizontalAdjust_RIGHT;
+else
+return drawing::TextHorizontalAdjust_BLOCK;
+}
+
 // LO does not interpret properties in styles belonging to the text content of 
a FontWork shape,
 // but only those in the shape style. This method copies properties from the 
text content styles to
 // the shape style.
@@ -1508,6 +1519,35 @@ Reference< XShape > const & Shape::createAndInsert(
 }
 }
 
+// tdf#162571: In case of shapes with TextAutoGrowHeight, PP 
calculates/grow the
+// shapes size in edit mode (typing) based on the text horizontal 
alignment.
+// In LO, we simulate it by setting TextHorizontalAdjust based on 
the ParagraphAdjust
+// of the 1. paragraph
+// It is not perfect, because we have 1 TextHorizontalAdjust / 1 
shape,
+// while we can have many ParagraphAdjust / 1 shape
+if 
(!mpTextBody->getTextProperties().maPropertyMap.hasProperty(PROP_WritingMode)
+&& mpTextBody->getParagraphs().size() > 0)
+{
+std::optional& oParaAdjust
+= 
mpTextBody->getParagraphs()[0]->getProperties().getParaAdjust();
+
+bool bAutoHeight = false;
+Reference< XPropertySetInfo > 
xSetInfo(xSet->getPropertySetInfo());
+const OUString& rPropName = 
PropertyMap::getPropertyName(PROP_TextAutoGrowHeight);
+if (xSetInfo.is() && xSetInfo->hasPropertyByName(rPropName))
+{
+uno::Any aTextAutoGrowHeight = 
xSet->getPropertyValue(u"TextAutoGrowHeight"_ustr);
+aTextAutoGrowHeight >>= bAutoHeight;
+}
+
+if (bAutoHeight && nShapeRotateInclCamera == 0)
+{
+mpTextBody->getTextProperties().maPropertyMap.setProperty(
+PROP_TextHorizontalAdjust, lcl_convertTextAdjust(
+oParaAdjust ? *oParaAdjust : 
ParagraphAdjust_LEFT));
+}
+}
+
 
mpTextBody->getTextProperties().pushTextDistances(Size(aShapeRectHmm.Width, 
aShapeRectHmm.Height));
 aShapeProps.assignUsed( 
mpTextBody->getTextProperties().maPropertyMap );
 // Push char properties as well - specifically useful when this is 
a placeholder
diff --git a/sd/qa/unit/data/xml/n762695_1.xml 
b/sd/qa/unit/data/xml/n762695_1.xml
index 02d3b735da86..8cd404c575be 100644
--- a/sd/qa/unit/data/xml/n762695_1.xml
+++ b/sd/qa/unit/data/xml/n762695_1.xml
@@ -1,6 +1,6 @@
 
 
- 
+ 
   
   
   
@@ -85,7 +85,7 @@

   
  
- 
+ 
   
   
   
diff --git a/sd/qa/unit/data/xml/n820786_0.xml 
b/sd/qa/unit/data/xml/n820786_0.xml
index 4b2e06b3f347..fee4d9667e52 100644
--- a/sd/qa/unit/data/xml/n820786_0.xml
+++ b/sd/qa/unit/data/xml/n820786_0.xml
@@ -64,7 +64,7 @@
  
  
   
-   
+   
 
 
 
@@ -148,7 +148,7 @@
  
 

-   
+   
 
 
 
diff --git a/sd/qa/unit/data/xml/tdf90338_0.xml 
b/sd/qa/unit/data/xml/tdf90338_0.xml
index 741d6ca08071..792eca6f4cf1 100644
--- a/sd/qa/unit/data/xml/tdf90338_0.xml
+++ b/sd/qa/unit/data/xml/tdf90338_0.xml
@@ -1,6 +1,6 @@
 
 
- 
+ 
   
   
   
diff --git a/sd/qa/unit/data/xml/tdf92001_0.xml 
b/sd/qa/unit/data/xml/tdf92001_0.xml
index

core.git: Branch 'libreoffice-24-8' - sc/source

2024-10-14 Thread Balazs Varga (via logerrit)
 sc/source/core/tool/compiler.cxx |   34 +++---
 1 file changed, 19 insertions(+), 15 deletions(-)

New commits:
commit 58e37b0f091be32e65c10171d463a86df62255b7
Author: Balazs Varga 
AuthorDate: Sun Oct 13 00:55:18 2024 +0200
Commit: Xisco Fauli 
CommitDate: Mon Oct 14 11:34:20 2024 +0200

tdf#163375 sc: fix sumproduct crash bacause of non exists token

pair at formula editing.

Check if both formula token truly exists.

Regression commit: ba0ec4a5d2b025b675410cd18890d1cca3bc5a2f
(tdf#159687 sc formula SUMPRODUCT performance fix: add more binary)

Change-Id: I72d054313f1e9db74aa004dcd8b2012be95c18dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174862
Reviewed-by: Balazs Varga 
Tested-by: Jenkins
(cherry picked from commit bdbc89b6da2ef4797e496aa0db84069b838b2e73)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174785
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 652bc14d17fe..7169d269486d 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -6691,12 +6691,15 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 break;
 FormulaToken* pLHS = *(ppTok - 1);
 FormulaToken* pRHS = *(ppTok - 2);
-StackVar lhsType = pLHS->GetType();
-StackVar rhsType = pRHS->GetType();
-if (lhsType == svDoubleRef && rhsType == svDoubleRef)
+if (pLHS && pRHS)
 {
-pLHS->GetDoubleRef()->SetTrimToData(true);
-pRHS->GetDoubleRef()->SetTrimToData(true);
+StackVar lhsType = pLHS->GetType();
+StackVar rhsType = pRHS->GetType();
+if (lhsType == svDoubleRef && rhsType == 
svDoubleRef)
+{
+pLHS->GetDoubleRef()->SetTrimToData(true);
+pRHS->GetDoubleRef()->SetTrimToData(true);
+}
 }
 }
 break;
@@ -6714,8 +6717,6 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 case ocOr:
 case ocXor:
 case ocIntersect:
-case ocUnion:
-case ocRange:
 {
 // tdf#160616: Double refs with these operators only
 // trimmable in case of one parameter
@@ -6723,15 +6724,18 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 break;
 FormulaToken* pLHS = *(ppTok - 1);
 FormulaToken* pRHS = *(ppTok - 2);
-StackVar lhsType = pLHS->GetType();
-StackVar rhsType = pRHS->GetType();
-if (lhsType == svDoubleRef && (rhsType == svSingleRef 
|| rhsType == svDoubleRef))
+if (pLHS && pRHS)
 {
-pLHS->GetDoubleRef()->SetTrimToData(true);
-}
-if (rhsType == svDoubleRef && (lhsType == svSingleRef 
|| lhsType == svDoubleRef))
-{
-pRHS->GetDoubleRef()->SetTrimToData(true);
+StackVar lhsType = pLHS->GetType();
+StackVar rhsType = pRHS->GetType();
+if (lhsType == svDoubleRef && (rhsType == 
svSingleRef || rhsType == svDoubleRef))
+{
+pLHS->GetDoubleRef()->SetTrimToData(true);
+}
+if (rhsType == svDoubleRef && (lhsType == 
svSingleRef || lhsType == svDoubleRef))
+{
+pRHS->GetDoubleRef()->SetTrimToData(true);
+}
 }
 }
 break;


core.git: sc/source

2024-10-13 Thread Balazs Varga (via logerrit)
 sc/source/core/tool/compiler.cxx |   34 +++---
 1 file changed, 19 insertions(+), 15 deletions(-)

New commits:
commit bdbc89b6da2ef4797e496aa0db84069b838b2e73
Author: Balazs Varga 
AuthorDate: Sun Oct 13 00:55:18 2024 +0200
Commit: Balazs Varga 
CommitDate: Sun Oct 13 20:04:28 2024 +0200

tdf#163375 sc: fix sumproduct crash bacause of non exists token

pair at formula editing.

Check if both formula token truly exists.

Regression commit: ba0ec4a5d2b025b675410cd18890d1cca3bc5a2f
(tdf#159687 sc formula SUMPRODUCT performance fix: add more binary)

Change-Id: I72d054313f1e9db74aa004dcd8b2012be95c18dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174862
Reviewed-by: Balazs Varga 
Tested-by: Jenkins

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 3d30f10fb0ed..50e50d469439 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -6691,12 +6691,15 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 break;
 FormulaToken* pLHS = *(ppTok - 1);
 FormulaToken* pRHS = *(ppTok - 2);
-StackVar lhsType = pLHS->GetType();
-StackVar rhsType = pRHS->GetType();
-if (lhsType == svDoubleRef && rhsType == svDoubleRef)
+if (pLHS && pRHS)
 {
-pLHS->GetDoubleRef()->SetTrimToData(true);
-pRHS->GetDoubleRef()->SetTrimToData(true);
+StackVar lhsType = pLHS->GetType();
+StackVar rhsType = pRHS->GetType();
+if (lhsType == svDoubleRef && rhsType == 
svDoubleRef)
+{
+pLHS->GetDoubleRef()->SetTrimToData(true);
+pRHS->GetDoubleRef()->SetTrimToData(true);
+}
 }
 }
 break;
@@ -6714,8 +6717,6 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 case ocOr:
 case ocXor:
 case ocIntersect:
-case ocUnion:
-case ocRange:
 {
 // tdf#160616: Double refs with these operators only
 // trimmable in case of one parameter
@@ -6723,15 +6724,18 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 break;
 FormulaToken* pLHS = *(ppTok - 1);
 FormulaToken* pRHS = *(ppTok - 2);
-StackVar lhsType = pLHS->GetType();
-StackVar rhsType = pRHS->GetType();
-if (lhsType == svDoubleRef && (rhsType == svSingleRef 
|| rhsType == svDoubleRef))
+if (pLHS && pRHS)
 {
-pLHS->GetDoubleRef()->SetTrimToData(true);
-}
-if (rhsType == svDoubleRef && (lhsType == svSingleRef 
|| lhsType == svDoubleRef))
-{
-pRHS->GetDoubleRef()->SetTrimToData(true);
+StackVar lhsType = pLHS->GetType();
+StackVar rhsType = pRHS->GetType();
+if (lhsType == svDoubleRef && (rhsType == 
svSingleRef || rhsType == svDoubleRef))
+{
+pLHS->GetDoubleRef()->SetTrimToData(true);
+}
+if (rhsType == svDoubleRef && (lhsType == 
svSingleRef || lhsType == svDoubleRef))
+{
+pRHS->GetDoubleRef()->SetTrimToData(true);
+}
 }
 }
 break;


core.git: Branch 'distro/allotropia/zeta-24-2' - basic/qa sc/qa sd/qa sw/qa vcl/qa writerfilter/qa

2024-10-02 Thread Balazs Varga (via logerrit)
 basic/qa/cppunit/test_vba.cxx  |6 +-
 sc/qa/unit/filters-test.cxx|5 -
 sd/qa/unit/filters-test.cxx|5 -
 sw/qa/core/filters-test.cxx|   12 
 sw/qa/core/header_footer/HeaderFooterTest.cxx  |4 
 sw/qa/extras/layout/layout3.cxx|5 -
 vcl/qa/cppunit/graphicfilter/filters-test.cxx  |6 --
 writerfilter/qa/cppunittests/filters-test/filters-test.cxx |4 
 8 files changed, 37 insertions(+), 10 deletions(-)

New commits:
commit 4c9d06cf692750049a41209a276ff83c6c9cf759
Author: Balazs Varga 
AuthorDate: Tue Sep 10 11:58:04 2024 +0200
Commit: Balazs Varga 
CommitDate: Wed Oct 2 19:51:03 2024 +0200

Temporarily skip unit tests on native arm64 build

which indicating unit test fails.

Cherry-picked from commit: b6775ce2b397276237dfb9eecd54b9682aca79b1
(Temporarily skip unit tests on native arm64 build)

Change-Id: I2689b0dda888e15e52ca60cc18e1705a1aefe968
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173143
Reviewed-by: Stephan Bergmann 
Reviewed-by: Balazs Varga 
Tested-by: Jenkins
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174400
Tested-by: Balazs Varga 

diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index 8a15ba7234e8..9535899bf3e7 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -185,7 +185,11 @@ void VBATest::testMiscOLEStuff()
 // Since some time, on a properly updated Windows 10, this works
 // only with a 64-bit LibreOffice
 
-#if defined(_WIN64)
+#if defined _WIN32 && defined _ARM64_
+// skip for windows arm64 build
+// Avoid "this method is empty and should be removed" warning
+(void) 42;
+#elif defined(_WIN64)
 // test if we have the necessary runtime environment
 // to run the OLE tests.
 uno::Reference< lang::XMultiServiceFactory > xOLEFactory;
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 671f9760d197..e51ef45a1885 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -93,9 +93,12 @@ void ScFiltersTest::testCVEs()
 //not indicate that it imported as .slk.
 testDir("SYLK",
 m_directories.getURLFromSrc(u"/sc/qa/unit/data/slk/"));
-
+#if defined _WIN32 && defined _ARM64_
+// skip for windows arm64 build
+#else
 testDir("MS Excel 97",
 m_directories.getURLFromSrc(u"/sc/qa/unit/data/xls/"));
+#endif
 
 testDir("Calc Office Open XML",
 m_directories.getURLFromSrc(u"/sc/qa/unit/data/xlsx/"), OUString(), 
XLSX_FORMAT_TYPE);
diff --git a/sd/qa/unit/filters-test.cxx b/sd/qa/unit/filters-test.cxx
index 1ed0f7991487..d30af71c3be9 100644
--- a/sd/qa/unit/filters-test.cxx
+++ b/sd/qa/unit/filters-test.cxx
@@ -68,6 +68,9 @@ bool SdFiltersTest::load(const OUString &rFilter, const 
OUString &rURL,
 void SdFiltersTest::testCVEs()
 {
 #ifndef DISABLE_CVE_TESTS
+#if defined _WIN32 && defined _ARM64_
+// skip for windows arm64 build
+#else
 testDir("MS PowerPoint 97",
 m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/"),
 "sd");
@@ -75,7 +78,7 @@ void SdFiltersTest::testCVEs()
 testDir("Impress Office Open XML",
 m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/"),
 "",  (SfxFilterFlags::IMPORT | SfxFilterFlags::ALIEN | 
SfxFilterFlags::STARONEFILTER));
-
+#endif
 testDir("impress8",
 m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/"),
 "sd");
diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx
index ffc24cbda4b8..e6b0bfbf8c1e 100644
--- a/sw/qa/core/filters-test.cxx
+++ b/sw/qa/core/filters-test.cxx
@@ -143,11 +143,13 @@ void SwFiltersTest::testCVEs()
 FILTER_XML,
 SfxFilterFlags::IMPORT | SfxFilterFlags::OWN | 
SfxFilterFlags::DEFAULT,
 isstorage, SOFFICE_FILEFORMAT_CURRENT);
-
+#if defined _WIN32 && defined _ARM64_
+// skip for windows arm64 build
+#else
 testDir("MS Word 97",
 m_directories.getURLFromSrc(u"/sw/qa/core/data/ww8/"),
 FILTER_WW8);
-
+#endif
 testDir("MS WinWord 6.0",
 m_directories.getURLFromSrc(u"/sw/qa/core/data/ww6/"),
 sWW6);
@@ -164,12 +166,14 @@ void SwFiltersTest::testCVEs()
 m_directories.getURLFromSrc(u"/sw/qa/core/data/ooxml/"),
 OUString(),
 SfxFilterFlags::STARONEFILTER);
-
+#if defined _WIN32 && defined _ARM64_
+// skip for windows arm64 build
+#else
 testDir("Rich Text Format",
 m_directories.getURLFromSrc(u"/sw/qa/core/data/rtf/"),
 OUString(),
 SfxFilterFlags::STARONEFILTER);
-
+#endif
 testDir("HTML",
 m_directories.getURLFromSrc(u"/sw/qa/core/data/html/"),
 sHTML);
diff --git a/sw/

core.git: svx/source

2024-09-29 Thread Balazs Varga (via logerrit)
 svx/source/sdr/primitive2d/sdrattributecreator.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b566dab48c1448dbc5442b30396e9f6c482f2408
Author: Balazs Varga 
AuthorDate: Thu Sep 26 12:15:46 2024 +0200
Commit: Balazs Varga 
CommitDate: Sun Sep 29 19:58:08 2024 +0200

Related: tdf#161826 - A bit more accurate Glow effect for texts in shapes

With a more accurate exponentiation function the text glow effect, maybe
can be more accurate comaparing to the MSO.

follow-up commit: 3eac847927a0cdfa40c3fea38c473ed2ad7faecc and
5bb5a7ea60c4496d7ad21ad81a0f37f6f5fd2288

Change-Id: I82d6fae0564b8d9f5b519408b54a0937a674c643
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173980
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx 
b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index f1628354283d..bf6cdb7c4571 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -246,10 +246,10 @@ namespace drawinglayer
 
 if (nFontSize)
 {
-// Rendering_glow_size = Original_glow_size / (154.39 * 
FontSize ^ -0,621)
+// Rendering_glow_size = Original_glow_size / (154.39 * 
FontSize ^ -0,575)
 // This is an approximate calculation similar to MSO text glow 
size which is
 // depending on font size
-nRadius = nTextRadius / (154.39 * pow(nFontSize, -0.621));
+nRadius = nTextRadius / (154.39 * pow(nFontSize, -0.575));
 nTextRadius = std::round(nRadius);
 }
 


core.git: Branch 'libreoffice-24-8' - sw/qa sw/source

2024-09-18 Thread Balazs Varga (via logerrit)
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx |3 
 sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt |binary
 sw/source/core/access/AccessibilityCheck.cxx |  123 ++-
 3 files changed, 58 insertions(+), 68 deletions(-)

New commits:
commit 61ac2cfa14aa3dd225687b43f429647b8fbb2d97
Author: Balazs Varga 
AuthorDate: Tue Sep 17 14:32:20 2024 +0200
Commit: Xisco Fauli 
CommitDate: Thu Sep 19 07:25:54 2024 +0200

tdf#162988 - A11Y sidebar: fix hyperlinks false warning

Better to check the SwpHints of the textnodes then iterate
through on the xParagraph's xTextRanges to search for a11y
hyperlink warnings.

Change-Id: I19a3eddd53f122bd4290e5b93e4784b89f65427d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173560
Reviewed-by: Balazs Varga 
Tested-by: Jenkins
(cherry picked from commit 5b6f384f940d40b8d40675306e103cfdd29bf700)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173500
Reviewed-by: Michael Stahl 

diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx 
b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
index 044ecf8312bf..d15eeaf70da9 100644
--- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
+++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
@@ -133,11 +133,12 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testHyperlinks)
 sw::AccessibilityCheck aCheck(pDoc);
 aCheck.check();
 auto& aIssues = aCheck.getIssueCollection().getIssues();
-CPPUNIT_ASSERT_EQUAL(size_t(4), aIssues.size());
+CPPUNIT_ASSERT_EQUAL(size_t(5), aIssues.size());
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::HYPERLINK_SHORT, 
aIssues[0]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::HYPERLINK_NO_NAME, 
aIssues[1]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::HYPERLINK_IS_TEXT, 
aIssues[2]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::HYPERLINK_NO_NAME, 
aIssues[3]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[4]->m_eIssueID);
 }
 
 CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckHighlightedText)
diff --git a/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt 
b/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt
index 1eba1932ce21..92240fb1d67f 100644
Binary files a/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt and 
b/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt differ
diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index 3f2b8906ba83..ff7a6b1b2d3c 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -371,66 +371,67 @@ public:
 class HyperlinkCheck : public NodeCheck
 {
 private:
-void checkTextRange(uno::Reference const& xTextRange, 
SwTextNode* pTextNode,
-sal_Int32 nStart)
+void checkHyperLinks(SwTextNode* pTextNode)
 {
-uno::Reference xProperties(xTextRange, 
uno::UNO_QUERY);
-if 
(!xProperties->getPropertySetInfo()->hasPropertyByName(u"HyperLinkURL"_ustr))
-return;
-
-OUString sHyperlink;
-xProperties->getPropertyValue(u"HyperLinkURL"_ustr) >>= sHyperlink;
-if (!sHyperlink.isEmpty())
+const OUString& sParagraphText = pTextNode->GetText();
+SwpHints& rHints = pTextNode->GetSwpHints();
+for (size_t i = 0; i < rHints.Count(); ++i)
 {
-OUString sText = xTextRange->getString();
-INetURLObject aHyperlink(sHyperlink);
-std::shared_ptr pIssue;
-if (aHyperlink.GetProtocol() != INetProtocol::NotValid
-&& INetURLObject(sText) == aHyperlink)
+const SwTextAttr* pTextAttr = rHints.Get(i);
+if (pTextAttr->Which() == RES_TXTATR_INETFMT)
 {
-OUString sIssueText
-= 
SwResId(STR_HYPERLINK_TEXT_IS_LINK).replaceFirst("%LINK%", sHyperlink);
-pIssue = lclAddIssue(m_rIssueCollection, sIssueText,
- 
sfx::AccessibilityIssueID::HYPERLINK_IS_TEXT);
-}
-else if (sText.getLength() <= 5)
-{
-pIssue = lclAddIssue(m_rIssueCollection, 
SwResId(STR_HYPERLINK_TEXT_IS_SHORT),
- 
sfx::AccessibilityIssueID::HYPERLINK_SHORT);
-}
-
-if (pIssue)
-{
-pIssue->setIssueObject(IssueObject::TEXT);
-pIssue->setNode(pTextNode);
-SwDoc& rDocument = pTextNode->GetDoc();
-pIssue->setDoc(rDocument);
-pIssue->setStart(nStart);
-pIssue->setEnd(nStart + sText.getLength());
-}
-
-if (aHyperlink.GetProtocol() != INetProtocol::NotValid)
-{
-// Check if the Hyperlink have Name settled.

core.git: Branch 'libreoffice-24-8' - sw/qa sw/source

2024-09-18 Thread Balazs Varga (via logerrit)
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx  |   18 
 sw/qa/core/accessibilitycheck/data/PageCharParaStyles.odt |binary
 sw/source/core/access/AccessibilityCheck.cxx  |  691 +-
 3 files changed, 663 insertions(+), 46 deletions(-)

New commits:
commit b967f9c92e33dc2b77cb4fee13a35052ad404732
Author: Balazs Varga 
AuthorDate: Fri Sep 13 10:24:38 2024 +0200
Commit: Michael Stahl 
CommitDate: Wed Sep 18 12:33:19 2024 +0200

tdf#162890 - A11Y sidebar: fix unecceserry warning in case if we have

no any direct format or we have a style which are not applied to the page.
(In that case no need to show the warning since the 'goto' can lead us 
nowhere.)

Also check the direct formats by comparing them to the character styles,
paragraph styles or to the default character properties.

Change-Id: I154379dc6deaa3af3fe17e51367cc229067216dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173317
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 7b8ae2bf7cf9d4d637b40030bb9f482f6fba5194)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173495
Reviewed-by: Michael Stahl 

diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx 
b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
index 90c1992b39a3..044ecf8312bf 100644
--- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
+++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
@@ -287,6 +287,24 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testDeleteHeader)
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aResultIssues[2]->m_eIssueID);
 }
 
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testStylesWithHeader)
+{
+// Check direct formats, char/para styles and not allowed page styles
+createSwDoc("PageCharParaStyles.odt");
+SwDoc* pDoc = getSwDoc();
+CPPUNIT_ASSERT(pDoc);
+
+sw::AccessibilityCheck aCheck(pDoc);
+auto& aIssues = aCheck.getIssueCollection().getIssues();
+aCheck.check();
+CPPUNIT_ASSERT_EQUAL(size_t(5), aIssues.size());
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DOCUMENT_TITLE, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[1]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[2]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[3]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[4]->m_eIssueID);
+}
+
 namespace
 {
 std::vector>
diff --git a/sw/qa/core/accessibilitycheck/data/PageCharParaStyles.odt 
b/sw/qa/core/accessibilitycheck/data/PageCharParaStyles.odt
new file mode 100644
index ..2f073a4a4afb
Binary files /dev/null and 
b/sw/qa/core/accessibilitycheck/data/PageCharParaStyles.odt differ
diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index 04dae2c9dadf..3f2b8906ba83 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -666,11 +666,22 @@ public:
 {
 }
 
-void checkAutoFormat(SwTextNode* pTextNode, const SwTextAttr* pTextAttr)
+void checkAutoFormat(SwTextNode* pTextNode, const SwTextAttr* pTextAttr,
+ const std::map& 
rCharFormats)
 {
 const SwFormatAutoFormat& rAutoFormat = pTextAttr->GetAutoFormat();
 SfxItemIter aItemIter(*rAutoFormat.GetStyleHandle());
 const SfxPoolItem* pItem = aItemIter.GetCurItem();
+
+const SwTextAttr* pCharAttr = nullptr;
+auto itr = rCharFormats.find(pTextAttr->GetStart());
+if (itr != rCharFormats.end())
+pCharAttr = itr->second;
+
+const SwCharFormat* pCharformat = nullptr;
+if (pCharAttr && (*pTextAttr->GetEnd() == *pCharAttr->GetEnd()))
+pCharformat = pCharAttr->GetCharFormat().GetCharFormat();
+
 std::vector aFormattings;
 while (pItem)
 {
@@ -680,61 +691,366 @@ public:
 case RES_CHRATR_WEIGHT:
 case RES_CHRATR_CJK_WEIGHT:
 case RES_CHRATR_CTL_WEIGHT:
-sFormattingType = "Weight";
-break;
+{
+const SvxWeightItem* pStyleItem = nullptr;
+
+if (pCharformat)
+{
+pStyleItem = pCharformat->GetItemIfSet(
+TypedWhichId(pItem->Which()), 
false);
+}
+
+if (!pStyleItem && pTextNode->GetTextColl())
+{
+pStyleItem = pTextNode->GetTextColl()->GetItemIfSet(
+TypedWhichId(pItem->Which()), 
false);
+}
+
+if (!pStyleItem)
+{
+pStyleI

core.git: sw/qa sw/source

2024-09-17 Thread Balazs Varga (via logerrit)
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx |3 
 sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt |binary
 sw/source/core/access/AccessibilityCheck.cxx |  123 ++-
 3 files changed, 58 insertions(+), 68 deletions(-)

New commits:
commit 5b6f384f940d40b8d40675306e103cfdd29bf700
Author: Balazs Varga 
AuthorDate: Tue Sep 17 14:32:20 2024 +0200
Commit: Balazs Varga 
CommitDate: Tue Sep 17 23:40:28 2024 +0200

tdf#162988 - A11Y sidebar: fix hyperlinks false warning

Better to check the SwpHints of the textnodes then iterate
through on the xParagraph's xTextRanges to search for a11y
hyperlink warnings.

Change-Id: I19a3eddd53f122bd4290e5b93e4784b89f65427d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173560
Reviewed-by: Balazs Varga 
Tested-by: Jenkins

diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx 
b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
index 044ecf8312bf..d15eeaf70da9 100644
--- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
+++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
@@ -133,11 +133,12 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testHyperlinks)
 sw::AccessibilityCheck aCheck(pDoc);
 aCheck.check();
 auto& aIssues = aCheck.getIssueCollection().getIssues();
-CPPUNIT_ASSERT_EQUAL(size_t(4), aIssues.size());
+CPPUNIT_ASSERT_EQUAL(size_t(5), aIssues.size());
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::HYPERLINK_SHORT, 
aIssues[0]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::HYPERLINK_NO_NAME, 
aIssues[1]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::HYPERLINK_IS_TEXT, 
aIssues[2]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::HYPERLINK_NO_NAME, 
aIssues[3]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[4]->m_eIssueID);
 }
 
 CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckHighlightedText)
diff --git a/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt 
b/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt
index 1eba1932ce21..92240fb1d67f 100644
Binary files a/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt and 
b/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt differ
diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index 6804c8617b88..04ef133f8e7e 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -570,66 +570,67 @@ public:
 class HyperlinkCheck : public NodeCheck
 {
 private:
-void checkTextRange(uno::Reference const& xTextRange, 
SwTextNode* pTextNode,
-sal_Int32 nStart)
+void checkHyperLinks(SwTextNode* pTextNode)
 {
-uno::Reference xProperties(xTextRange, 
uno::UNO_QUERY);
-if 
(!xProperties->getPropertySetInfo()->hasPropertyByName(u"HyperLinkURL"_ustr))
-return;
-
-OUString sHyperlink;
-xProperties->getPropertyValue(u"HyperLinkURL"_ustr) >>= sHyperlink;
-if (!sHyperlink.isEmpty())
+const OUString& sParagraphText = pTextNode->GetText();
+SwpHints& rHints = pTextNode->GetSwpHints();
+for (size_t i = 0; i < rHints.Count(); ++i)
 {
-OUString sText = xTextRange->getString();
-INetURLObject aHyperlink(sHyperlink);
-std::shared_ptr pIssue;
-if (aHyperlink.GetProtocol() != INetProtocol::NotValid
-&& INetURLObject(sText) == aHyperlink)
+const SwTextAttr* pTextAttr = rHints.Get(i);
+if (pTextAttr->Which() == RES_TXTATR_INETFMT)
 {
-OUString sIssueText
-= 
SwResId(STR_HYPERLINK_TEXT_IS_LINK).replaceFirst("%LINK%", sHyperlink);
-pIssue = lclAddIssue(m_rIssueCollection, sIssueText,
- 
sfx::AccessibilityIssueID::HYPERLINK_IS_TEXT);
-}
-else if (sText.getLength() <= 5)
-{
-pIssue = lclAddIssue(m_rIssueCollection, 
SwResId(STR_HYPERLINK_TEXT_IS_SHORT),
- 
sfx::AccessibilityIssueID::HYPERLINK_SHORT);
-}
-
-if (pIssue)
-{
-pIssue->setIssueObject(IssueObject::TEXT);
-pIssue->setNode(pTextNode);
-SwDoc& rDocument = pTextNode->GetDoc();
-pIssue->setDoc(rDocument);
-pIssue->setStart(nStart);
-pIssue->setEnd(nStart + sText.getLength());
-}
-
-if (aHyperlink.GetProtocol() != INetProtocol::NotValid)
-{
-// Check if the Hyperlink have Name settled.
-if 
(!xProperties->getPropertySetInfo()->hasPropertyByName(u"HyperLinkName"_ustr))
-return;
-
-OUString sHyperlinkN

core.git: Changes to 'refs/tags/cib_contract49c-24.2.6.2.M2'

2024-09-17 Thread Balazs Varga (via logerrit)
Tag 'cib_contract49c-24.2.6.2.M2' created by Thorsten Behrens 
 at 2024-09-17 16:07 +

cib_contract49c-24.2.6.2.M2
-BEGIN PGP SIGNATURE-

iNUEABYKAH0WIQRV78SO268/dhkw1IIeB5amgXyR5gUCZumpRl8UgAAuAChp
c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0NTVF
RkM0OEVEQkFGM0Y3NjE5MzBENDgyMUUwNzk2QTY4MTdDOTFFNgAKCRAeB5amgXyR
5mt0AP0XxaykdVTpY9ZbAxYOTSbimON1RArhhhGGZdyHIJCwugEAgOCKxREm9Gsi
LPfiQbB5mfF97s8V4fvxnYad612Dfw8=
=UMPn
-END PGP SIGNATURE-

Changes since cib_contract49c-24.2.6.2.M1-6:
---
 0 files changed
---


core.git: Branch 'feature/cib_contract49c' - sw/qa sw/source

2024-09-17 Thread Balazs Varga (via logerrit)
 sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt |binary
 sw/source/core/access/AccessibilityCheck.cxx |   86 ---
 2 files changed, 40 insertions(+), 46 deletions(-)

New commits:
commit b7a49b42d612e2bd65c38f5a3da4c67f7ceca20e
Author: Balazs Varga 
AuthorDate: Tue Sep 17 14:32:20 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Sep 17 18:04:38 2024 +0200

tdf#162988 - A11Y sidebar: fix hyperlinks false warning

Better to check the SwpHints of the textnodes then iterate
through on the xParagraph's xTextRanges to search for a11y
hyperlink warnings.

Change-Id: I19a3eddd53f122bd4290e5b93e4784b89f65427d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173563
Reviewed-by: Thorsten Behrens 
Tested-by: allotropia jenkins 

diff --git a/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt 
b/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt
index 1eba1932ce21..92240fb1d67f 100644
Binary files a/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt and 
b/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt differ
diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index 83ff5de88ff1..96260cc19a95 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -370,42 +370,48 @@ public:
 class HyperlinkCheck : public NodeCheck
 {
 private:
-void checkTextRange(uno::Reference const& xTextRange, 
SwTextNode* pTextNode,
-sal_Int32 nStart)
+void checkHyperLinks(SwTextNode* pTextNode)
 {
-uno::Reference xProperties(xTextRange, 
uno::UNO_QUERY);
-if 
(!xProperties->getPropertySetInfo()->hasPropertyByName("HyperLinkURL"))
-return;
-
-OUString sHyperlink;
-xProperties->getPropertyValue("HyperLinkURL") >>= sHyperlink;
-if (!sHyperlink.isEmpty())
+const OUString& sParagraphText = pTextNode->GetText();
+SwpHints& rHints = pTextNode->GetSwpHints();
+for (size_t i = 0; i < rHints.Count(); ++i)
 {
-OUString sText = xTextRange->getString();
-INetURLObject aHyperlink(sHyperlink);
-std::shared_ptr pIssue;
-if (aHyperlink.GetProtocol() != INetProtocol::NotValid
-&& INetURLObject(sText) == aHyperlink)
+const SwTextAttr* pTextAttr = rHints.Get(i);
+if (pTextAttr->Which() == RES_TXTATR_INETFMT)
 {
-OUString sIssueText
-= 
SwResId(STR_HYPERLINK_TEXT_IS_LINK).replaceFirst("%LINK%", sHyperlink);
-pIssue = lclAddIssue(m_rIssueCollection, sIssueText,
- 
sfx::AccessibilityIssueID::HYPERLINK_IS_TEXT);
-}
-else if (sText.getLength() <= 5)
-{
-pIssue = lclAddIssue(m_rIssueCollection, 
SwResId(STR_HYPERLINK_TEXT_IS_SHORT),
- 
sfx::AccessibilityIssueID::HYPERLINK_SHORT);
-}
+OUString sHyperlink = pTextAttr->GetINetFormat().GetValue();
+if (!sHyperlink.isEmpty())
+{
+INetURLObject aHyperlink(sHyperlink);
+std::shared_ptr pIssue;
+sal_Int32 nStart = pTextAttr->GetStart();
+OUString sRunText = sParagraphText.copy(nStart, 
*pTextAttr->GetEnd() - nStart);
 
-if (pIssue)
-{
-pIssue->setIssueObject(IssueObject::TEXT);
-pIssue->setNode(pTextNode);
-SwDoc& rDocument = pTextNode->GetDoc();
-pIssue->setDoc(rDocument);
-pIssue->setStart(nStart);
-pIssue->setEnd(nStart + sText.getLength());
+if (aHyperlink.GetProtocol() != INetProtocol::NotValid
+&& INetURLObject(sRunText) == aHyperlink)
+{
+OUString sIssueText = 
SwResId(STR_HYPERLINK_TEXT_IS_LINK)
+  .replaceFirst("%LINK%", 
sHyperlink);
+pIssue = lclAddIssue(m_rIssueCollection, sIssueText,
+ 
sfx::AccessibilityIssueID::HYPERLINK_IS_TEXT);
+}
+else if (sRunText.getLength() <= 5)
+{
+pIssue
+= lclAddIssue(m_rIssueCollection, 
SwResId(STR_HYPERLINK_TEXT_IS_SHORT),
+  
sfx::AccessibilityIssueID::HYPERLINK_SHORT);
+}
+
+if (pIssue)
+{
+pIssue->setIssueObject(IssueObject::TEXT);
+pIssue->setNode(pTextNode);
+SwDoc& rDocument = pTextNode->GetDoc();
+pIssue->setDoc(rDocument);
+

core.git: Branch 'feature/cib_contract49c' - 3 commits - sw/qa sw/source translations

2024-09-17 Thread Balazs Varga (via logerrit)
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx  |   58 +
 sw/qa/core/accessibilitycheck/data/DeleteHeader.odt   |binary
 sw/qa/core/accessibilitycheck/data/PageCharParaStyles.odt |binary
 sw/source/core/access/AccessibilityCheck.cxx  |  763 --
 translations  |2 
 5 files changed, 747 insertions(+), 76 deletions(-)

New commits:
commit 85d7d20444b0eee9a542846f06eff8813811e3a6
Author: Balazs Varga 
AuthorDate: Fri Sep 13 10:24:38 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Sep 17 14:51:07 2024 +0200

tdf#162890 - A11Y sidebar: fix unecceserry warning in case if we have

no any direct format or we have a style which are not applied to the page.
(In that case no need to show the warning since the 'goto' can lead us 
nowhere.)

Also check the direct formats by comparing them to the character styles,
paragraph styles or to the default character properties.

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

diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx 
b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
index 621a811def50..f45d4356be3b 100644
--- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
+++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
@@ -269,6 +269,24 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testDeleteHeader)
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aResultIssues[2]->m_eIssueID);
 }
 
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testStylesWithHeader)
+{
+// Check direct formats, char/para styles and not allowed page styles
+createSwDoc("PageCharParaStyles.odt");
+SwDoc* pDoc = getSwDoc();
+CPPUNIT_ASSERT(pDoc);
+
+sw::AccessibilityCheck aCheck(pDoc);
+auto& aIssues = aCheck.getIssueCollection().getIssues();
+aCheck.check();
+CPPUNIT_ASSERT_EQUAL(size_t(5), aIssues.size());
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DOCUMENT_TITLE, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[1]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[2]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[3]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[4]->m_eIssueID);
+}
+
 namespace
 {
 std::vector>
diff --git a/sw/qa/core/accessibilitycheck/data/PageCharParaStyles.odt 
b/sw/qa/core/accessibilitycheck/data/PageCharParaStyles.odt
new file mode 100644
index ..2f073a4a4afb
Binary files /dev/null and 
b/sw/qa/core/accessibilitycheck/data/PageCharParaStyles.odt differ
diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index 362279f219ae..83ff5de88ff1 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -639,11 +639,22 @@ public:
 {
 }
 
-void checkAutoFormat(SwTextNode* pTextNode, const SwTextAttr* pTextAttr)
+void checkAutoFormat(SwTextNode* pTextNode, const SwTextAttr* pTextAttr,
+ const std::map& 
rCharFormats)
 {
 const SwFormatAutoFormat& rAutoFormat = pTextAttr->GetAutoFormat();
 SfxItemIter aItemIter(*rAutoFormat.GetStyleHandle());
 const SfxPoolItem* pItem = aItemIter.GetCurItem();
+
+const SwTextAttr* pCharAttr = nullptr;
+auto itr = rCharFormats.find(pTextAttr->GetStart());
+if (itr != rCharFormats.end())
+pCharAttr = itr->second;
+
+const SwCharFormat* pCharformat = nullptr;
+if (pCharAttr && (*pTextAttr->GetEnd() == *pCharAttr->GetEnd()))
+pCharformat = pCharAttr->GetCharFormat().GetCharFormat();
+
 std::vector aFormattings;
 while (pItem)
 {
@@ -653,57 +664,367 @@ public:
 case RES_CHRATR_WEIGHT:
 case RES_CHRATR_CJK_WEIGHT:
 case RES_CHRATR_CTL_WEIGHT:
-sFormattingType = "Weight";
-break;
+{
+const SvxWeightItem* pStyleItem = nullptr;
+
+if (pCharformat)
+{
+pStyleItem = pCharformat->GetItemIfSet(
+TypedWhichId(pItem->Which()), 
false);
+}
+
+if (!pStyleItem && pTextNode->GetTextColl())
+{
+pStyleItem = pTextNode->GetTextColl()->GetItemIfSet(
+TypedWhichId(pItem->Which()), 
false);
+}
+
+if (!pStyleItem)
+{
+pStyleItem = 
pTextNode->GetDoc().GetAttrPool(

core.git: basic/qa sc/qa sd/qa svgio/qa sw/qa vcl/qa

2024-09-12 Thread Balazs Varga (via logerrit)
 basic/qa/cppunit/test_vba.cxx|6 +-
 sc/qa/unit/filters-test.cxx  |5 -
 sd/qa/unit/PNGExportTests.cxx|4 
 sd/qa/unit/filters-test.cxx  |5 -
 svgio/qa/cppunit/SvgImportTest.cxx   |4 
 sw/qa/core/filters-test.cxx  |   12 
 sw/qa/core/header_footer/HeaderFooterTest.cxx|4 
 sw/qa/extras/layout/layout3.cxx  |5 -
 sw/qa/writerfilter/filters-test/filters-test.cxx |4 
 vcl/qa/cppunit/graphicfilter/filters-test.cxx|6 --
 10 files changed, 45 insertions(+), 10 deletions(-)

New commits:
commit b6775ce2b397276237dfb9eecd54b9682aca79b1
Author: Balazs Varga 
AuthorDate: Tue Sep 10 11:58:04 2024 +0200
Commit: Balazs Varga 
CommitDate: Thu Sep 12 09:37:26 2024 +0200

Temporarily skip unit tests on native arm64 build

which indicating unit test fails.

Change-Id: I2689b0dda888e15e52ca60cc18e1705a1aefe968
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173143
Reviewed-by: Stephan Bergmann 
Reviewed-by: Balazs Varga 
Tested-by: Jenkins

diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index e3082d40e02a..df0ceffefe81 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -188,7 +188,11 @@ void VBATest::testMiscOLEStuff()
 // Since some time, on a properly updated Windows 10, this works
 // only with a 64-bit LibreOffice
 
-#if defined(_WIN64)
+#if defined _WIN32 && defined _ARM64_
+// skip for windows arm64 build
+// Avoid "this method is empty and should be removed" warning
+(void) 42;
+#elif defined(_WIN64)
 // test if we have the necessary runtime environment
 // to run the OLE tests.
 uno::Reference< lang::XMultiServiceFactory > xOLEFactory;
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index d3eace0430c5..933b48ceba8f 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -92,9 +92,12 @@ void ScFiltersTest::testCVEs()
 //not indicate that it imported as .slk.
 testDir(u"SYLK"_ustr,
 m_directories.getURLFromSrc(u"/sc/qa/unit/data/slk/"));
-
+#if defined _WIN32 && defined _ARM64_
+// skip for windows arm64 build
+#else
 testDir(u"MS Excel 97"_ustr,
 m_directories.getURLFromSrc(u"/sc/qa/unit/data/xls/"));
+#endif
 
 testDir(u"Calc Office Open XML"_ustr,
 m_directories.getURLFromSrc(u"/sc/qa/unit/data/xlsx/"), OUString(), 
XLSX_FORMAT_TYPE);
diff --git a/sd/qa/unit/PNGExportTests.cxx b/sd/qa/unit/PNGExportTests.cxx
index 873cf6749dd1..c28564242a16 100644
--- a/sd/qa/unit/PNGExportTests.cxx
+++ b/sd/qa/unit/PNGExportTests.cxx
@@ -941,6 +941,9 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf155048)
 }
 }
 
+#if defined _WIN32 && defined _ARM64_
+// skip for windows arm64 build
+#else
 CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testNoAntiAliasExport)
 {
 #ifdef MACOSX
@@ -1043,5 +1046,6 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf162259)
 CPPUNIT_ASSERT_GREATER(350, topNonWhites); // 399 in my testing
 CPPUNIT_ASSERT_GREATER(350, bottomNonWhites); // 362 in my testing
 }
+#endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/qa/unit/filters-test.cxx b/sd/qa/unit/filters-test.cxx
index 5fcce162b6cf..b70fbb7cfacd 100644
--- a/sd/qa/unit/filters-test.cxx
+++ b/sd/qa/unit/filters-test.cxx
@@ -68,6 +68,9 @@ bool SdFiltersTest::load(const OUString &rFilter, const 
OUString &rURL,
 void SdFiltersTest::testCVEs()
 {
 #ifndef DISABLE_CVE_TESTS
+#if defined _WIN32 && defined _ARM64_
+// skip for windows arm64 build
+#else
 testDir(u"MS PowerPoint 97"_ustr,
 m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/"),
 u"sd"_ustr);
@@ -75,7 +78,7 @@ void SdFiltersTest::testCVEs()
 testDir(u"Impress Office Open XML"_ustr,
 m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/"),
 u""_ustr,  (SfxFilterFlags::IMPORT | SfxFilterFlags::ALIEN | 
SfxFilterFlags::STARONEFILTER));
-
+#endif
 testDir(u"impress8"_ustr,
 m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/"),
 u"sd"_ustr);
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index e30dc9e0e20c..8328f8640ed3 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -215,9 +215,13 @@ CPPUNIT_TEST_FIXTURE(Test, testNormalBlend)
 aPixels = comphelper::string::split(sDataRow, ',');
 CPPUNIT_ASSERT_EQUAL(u"ffd700"_ustr, aPixels[85]);
 
+#if defined _WIN32 && defined _ARM64_
+// skip for windows arm64 build
+#else
 sDataRow = getXPath(pDocument, 
"/primitive2D/transform/transform/bitmap/data[130]"_ostr, "row"_ostr);
 aPixels = comphelper::string::split(sDataRow, ',');
 CPPUNIT_ASSERT_EQUAL(u"8a2be2"_ustr, aPixels[130]);
+#endif
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testFeColorMatri

core.git: Branch 'libreoffice-24-8' - 2 commits - oox/source sd/qa svx/source

2024-09-11 Thread Balazs Varga (via logerrit)
 oox/source/drawingml/table/tablecell.cxx |4 ++--
 sd/qa/unit/data/pptx/tdf149865.pptx  |binary
 sd/qa/unit/import-tests.cxx  |   22 ++
 svx/source/fmcomp/gridctrl.cxx   |3 ---
 4 files changed, 24 insertions(+), 5 deletions(-)

New commits:
commit 70b8d8d980ffc48674b0bcaa3c5c36fe8b99d1b4
Author: Balazs Varga 
AuthorDate: Mon Sep 9 16:19:14 2024 +0200
Commit: Xisco Fauli 
CommitDate: Wed Sep 11 20:50:01 2024 +0200

tdf#149865 - FILEOPEN PPTX: fix table lacks border

Fix wrong border line styles if we have merged cells.

Change-Id: I238aa08c65b9aefd7b77b0f4ae3c3df979a7171d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173109
Reviewed-by: Balazs Varga 
Tested-by: Jenkins
(cherry picked from commit 070682854800cb983b452a5b5bd16943433c4b2b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173168
Reviewed-by: Xisco Fauli 

diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index c04960240ec7..d38d6197ba0e 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -202,11 +202,11 @@ static void applyTableStylePart( const 
::oox::core::XmlFilterBase& rFilterBase,
 {
 if (nCol == 0)
 applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder );
-if (nCol == nMaxCol)
+if (nCol >= nMaxCol)
 applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder 
);
 if (nRow == 0)
 applyBorder( rFilterBase, rTableStylePart, XML_top, rTopBorder );
-if (nRow == nMaxRow)
+if (nRow >= nMaxRow)
 applyBorder( rFilterBase, rTableStylePart, XML_bottom, 
rBottomBorder );
 
 applyBorder( rFilterBase, rTableStylePart, XML_insideH, rInsideHBorder 
);
diff --git a/sd/qa/unit/data/pptx/tdf149865.pptx 
b/sd/qa/unit/data/pptx/tdf149865.pptx
new file mode 100644
index ..3b5a0cbb8f7a
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf149865.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index a2fee7de457d..f0da89531882 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1654,6 +1654,28 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, 
testTableBorderLineStyle)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(SdImportTest, testTableMergedCellsBorderLineStyle)
+{
+createSdImpressDoc("pptx/tdf149865.pptx");
+
+const SdrPage* pPage = GetPage(1);
+
+sdr::table::SdrTableObj* pTableObj;
+uno::Reference xTable;
+uno::Reference xCell;
+table::BorderLine2 aBorderLine;
+
+pTableObj = dynamic_cast(pPage->GetObj(0));
+CPPUNIT_ASSERT(pTableObj);
+xTable.set(pTableObj->getTable(), uno::UNO_QUERY_THROW);
+xCell.set(xTable->getCellByPosition(4, 1), uno::UNO_QUERY_THROW);
+xCell->getPropertyValue(u"RightBorder"_ustr) >>= aBorderLine;
+table::BorderLine2 expectedRight(0x30ba78, 0, 17, 0, 0, 17);
+CPPUNIT_ASSERT_EQUAL(expectedRight.LineStyle, aBorderLine.LineStyle);
+CPPUNIT_ASSERT_EQUAL(expectedRight.Color, aBorderLine.Color);
+CPPUNIT_ASSERT_EQUAL(expectedRight.LineWidth, aBorderLine.LineWidth);
+}
+
 CPPUNIT_TEST_FIXTURE(SdImportTest, testBnc862510_6)
 {
 // Black text was imported instead of gray
commit 85145e56b21a10460fdc6ff2bd31c3fbf9cf3eed
Author: Stephan Bergmann 
AuthorDate: Tue Sep 10 13:04:00 2024 +0200
Commit: Xisco Fauli 
CommitDate: Wed Sep 11 20:49:52 2024 +0200

-Werror,-Wunused-private-field

...since f9ff22db058180d161b32f5dcd87e72cfa3b6889 
"tsan:lock-order-inversion in
forms"

Change-Id: I6a31c661a6604e7c701e49b147d5372bef50dc3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173133
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit b472e1cedddf083d6b04d233cdefe686c8aa07ae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173174
Reviewed-by: Xisco Fauli 

diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index b891f2081a04..e716d9eeb0ab 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -123,7 +123,6 @@ private:
 
 class GridFieldValueListener : protected ::comphelper::OPropertyChangeListener
 {
-osl::Mutex  m_aMutex;
 DbGridControl&  m_rParent;
 rtl::Reference<::comphelper::OPropertyChangeMultiplexer> m_pRealListener;
 sal_uInt16  m_nId;
@@ -240,8 +239,6 @@ class FmXGridSourcePropListener : public 
::comphelper::OPropertyChangeListener
 {
 VclPtr m_pParent;
 
-// a DbGridControl has no mutex, so we use our own as the base class 
expects one
-osl::Mutex  m_aMutex;
 sal_Int16   m_nSuspended;
 
 public:


core.git: oox/source sd/qa

2024-09-11 Thread Balazs Varga (via logerrit)
 oox/source/drawingml/table/tablecell.cxx |4 ++--
 sd/qa/unit/data/pptx/tdf149865.pptx  |binary
 sd/qa/unit/import-tests.cxx  |   22 ++
 3 files changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 070682854800cb983b452a5b5bd16943433c4b2b
Author: Balazs Varga 
AuthorDate: Mon Sep 9 16:19:14 2024 +0200
Commit: Balazs Varga 
CommitDate: Wed Sep 11 12:28:06 2024 +0200

tdf#149865 - FILEOPEN PPTX: fix table lacks border

Fix wrong border line styles if we have merged cells.

Change-Id: I238aa08c65b9aefd7b77b0f4ae3c3df979a7171d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173109
Reviewed-by: Balazs Varga 
Tested-by: Jenkins

diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index 2784ea818eb2..21948145e1d2 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -202,11 +202,11 @@ static void applyTableStylePart( const 
::oox::core::XmlFilterBase& rFilterBase,
 {
 if (nCol == 0)
 applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder );
-if (nCol == nMaxCol)
+if (nCol >= nMaxCol)
 applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder 
);
 if (nRow == 0)
 applyBorder( rFilterBase, rTableStylePart, XML_top, rTopBorder );
-if (nRow == nMaxRow)
+if (nRow >= nMaxRow)
 applyBorder( rFilterBase, rTableStylePart, XML_bottom, 
rBottomBorder );
 
 applyBorder( rFilterBase, rTableStylePart, XML_insideH, rInsideHBorder 
);
diff --git a/sd/qa/unit/data/pptx/tdf149865.pptx 
b/sd/qa/unit/data/pptx/tdf149865.pptx
new file mode 100644
index ..3b5a0cbb8f7a
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf149865.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 220bf3e30342..6e6cd651d3b9 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1653,6 +1653,28 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, 
testTableBorderLineStyle)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(SdImportTest, testTableMergedCellsBorderLineStyle)
+{
+createSdImpressDoc("pptx/tdf149865.pptx");
+
+const SdrPage* pPage = GetPage(1);
+
+sdr::table::SdrTableObj* pTableObj;
+uno::Reference xTable;
+uno::Reference xCell;
+table::BorderLine2 aBorderLine;
+
+pTableObj = dynamic_cast(pPage->GetObj(0));
+CPPUNIT_ASSERT(pTableObj);
+xTable.set(pTableObj->getTable(), uno::UNO_QUERY_THROW);
+xCell.set(xTable->getCellByPosition(4, 1), uno::UNO_QUERY_THROW);
+xCell->getPropertyValue(u"RightBorder"_ustr) >>= aBorderLine;
+table::BorderLine2 expectedRight(0x30ba78, 0, 17, 0, 0, 17);
+CPPUNIT_ASSERT_EQUAL(expectedRight.LineStyle, aBorderLine.LineStyle);
+CPPUNIT_ASSERT_EQUAL(expectedRight.Color, aBorderLine.Color);
+CPPUNIT_ASSERT_EQUAL(expectedRight.LineWidth, aBorderLine.LineWidth);
+}
+
 CPPUNIT_TEST_FIXTURE(SdImportTest, testBnc862510_6)
 {
 // Black text was imported instead of gray


core.git: schema/libreoffice sd/qa xmloff/source

2024-09-03 Thread Balazs Varga (via logerrit)
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |   32 ++--
 sd/qa/unit/data/odp/shape-text-glow-effect.odp  |binary
 sd/qa/unit/export-tests.cxx |8 +--
 xmloff/source/draw/sdpropls.cxx |7 +-
 4 files changed, 24 insertions(+), 23 deletions(-)

New commits:
commit 5bb5a7ea60c4496d7ad21ad81a0f37f6f5fd2288
Author: Balazs Varga 
AuthorDate: Mon Sep 2 15:40:29 2024 +0200
Commit: Balazs Varga 
CommitDate: Tue Sep 3 22:52:53 2024 +0200

Related: tdf#161826 - Add uniform Glow effect for texts in shapes

Using text-properties for the glow-text attributes in odf import/export
instead of graphic-properties.

Change-Id: I94f5a76f33a03891fa0bfed988e7e3cd0e842cc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172741
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng 
b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index 9ec0e09f5a6d..0af6bb20301e 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -954,22 +954,6 @@ 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
 
   
 
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
   
 
 
@@ -2551,6 +2535,22 @@ 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
 
   
 
+
+
+  
+
+  
+
+
+  
+
+  
+
+
+  
+
+  
+
   
 
   
diff --git a/sd/qa/unit/data/odp/shape-text-glow-effect.odp 
b/sd/qa/unit/data/odp/shape-text-glow-effect.odp
index 944d281cf99d..0efe19f72eba 100644
Binary files a/sd/qa/unit/data/odp/shape-text-glow-effect.odp and 
b/sd/qa/unit/data/odp/shape-text-glow-effect.odp differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index c5630158f0d7..ae501d2c5802 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -1560,18 +1560,18 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testGlowTextInShape)
 // check that we actually test graphic style
 assertXPath(pXmlDoc, 
"/office:document-content/office:automatic-styles/style:style[3]"_ostr,
 "family"_ostr, u"graphic"_ustr);
-// check loext graphic attributes for th
+// check loext text attributes for text in shapes
 assertXPath(
 pXmlDoc,
-
"/office:document-content/office:automatic-styles/style:style[3]/style:graphic-properties"_ostr,
+
"/office:document-content/office:automatic-styles/style:style[3]/style:text-properties"_ostr,
 "glow-text-radius"_ostr, u"0.706cm"_ustr);
 assertXPath(
 pXmlDoc,
-
"/office:document-content/office:automatic-styles/style:style[3]/style:graphic-properties"_ostr,
+
"/office:document-content/office:automatic-styles/style:style[3]/style:text-properties"_ostr,
 "glow-text-color"_ostr, u"#4ea72e"_ustr);
 assertXPath(
 pXmlDoc,
-
"/office:document-content/office:automatic-styles/style:style[3]/style:graphic-properties"_ostr,
+
"/office:document-content/office:automatic-styles/style:style[3]/style:text-properties"_ostr,
 "glow-text-transparency"_ostr, u"5%"_ustr);
 }
 
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index b3c24a495d44..b30585b5541f 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -81,6 +81,7 @@ using namespace ::xmloff::token;
 #define GMAPV(name,prefix,token,type,context,version) 
MAPV_(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context,version)
 #define DPMAP(name,prefix,token,type,context) 
MAP_(name,prefix,token,type|XML_TYPE_PROP_DRAWING_PAGE,context)
 #define TMAP(name,prefix,token,type,context) 
MAP_(name,prefix,token,type|XML_TYPE_PROP_TEXT,context)
+#define TMAPV(name,prefix,token,type,context,version) 
MAPV_(name,prefix,token,type|XML_TYPE_PROP_TEXT,context,version)
 #define PMAP(name,prefix,token,type,context) 
MAP_(name,prefix,token,type|XML_TYPE_PROP_PARAGRAPH,context)
 #define MAP_END() { nullptr }
 
@@ -175,9 +176,9 @@ const XMLPropertyMapEntry aXMLSDProperties[] =
 GMAPV( PROP_SoftEdgeRadius,XML_NAMESPACE_LO_EXT, 
XML_SOFTEDGE_RADIUS,  XML_TYPE_MEASURE  , 0, 
SvtSaveOptions::ODFSVER_FUTURE_EXTENDED),
 
 // glow text attributes
-GMAPV(PROP_GlowTextEffectRadius,   XML_NAMESPACE_LO_EXT, 
XML_GLOW_TEXT_RADIUS,  XML_TYPE_MEASURE  , 0, 
SvtSaveOptions::ODFSVER_FUTURE_EXTENDED),
-GMAPV(PROP_GlowTextEffectColor,XML_NAMESPACE_LO_EXT, 
XML_GLOW_TEXT_COLOR,   XML_TYPE_COLOR, 0, 
SvtSaveOptions::ODFSVER_FUTURE_EXTENDE

core.git: bin/find-can-be-private-symbols.functions.results bin/find-mergedlib-can-be-private-symbols.functions.results compilerplugins/clang drawinglayer/Library_drawinglayer.mk drawinglayer/source i

2024-08-29 Thread Balazs Varga (via logerrit)
 bin/find-can-be-private-symbols.functions.results|2 
 bin/find-mergedlib-can-be-private-symbols.functions.results  |2 
 compilerplugins/clang/unusedfields.writeonly.results |6 
 drawinglayer/Library_drawinglayer.mk |1 
 drawinglayer/source/attribute/sdrglowtextattribute.cxx   |   37 ++
 include/drawinglayer/attribute/sdrglowtextattribute.hxx  |   45 +++
 include/oox/drawingml/effectproperties.hxx   |   89 ++
 include/oox/export/drawingml.hxx |1 
 include/svx/strings.hrc  |3 
 include/svx/svddef.hxx   |   28 +-
 include/svx/svxids.hrc   |9 
 include/svx/unoshprp.hxx |5 
 include/xmloff/xmltoken.hxx  |3 
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |   29 ++
 oox/inc/drawingml/textcharacterproperties.hxx|   10 
 oox/source/drawingml/effectproperties.cxx|2 
 oox/source/drawingml/effectpropertiescontext.cxx |2 
 oox/source/drawingml/shape.cxx   |   46 +++
 oox/source/drawingml/textcharacterproperties.cxx |1 
 oox/source/drawingml/textcharacterpropertiescontext.cxx  |2 
 oox/source/drawingml/themeelementscontext.cxx|2 
 oox/source/export/drawingml.cxx  |   33 ++
 sc/sdi/drawsh.sdi|4 
 sc/source/ui/drawfunc/drawsh.cxx |3 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng  |   16 +
 sd/qa/unit/data/odp/shape-text-glow-effect.odp   |binary
 sd/qa/unit/data/pptx/shape-text-glow-effect.pptx |binary
 sd/qa/unit/export-tests-ooxml4.cxx   |   16 +
 sd/qa/unit/export-tests.cxx  |   41 ++
 sd/qa/unit/import-tests2.cxx |   16 +
 sd/sdi/_drvwsh.sdi   |   15 +
 sd/source/ui/view/drviews2.cxx   |3 
 sd/source/ui/view/drviewsf.cxx   |3 
 static/CustomTarget_emscripten_fs_image.mk   |1 
 svx/Library_svx.mk   |1 
 svx/UIConfig_svx.mk  |1 
 svx/inc/sdr/attribute/sdreffectstextattribute.hxx|6 
 svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx|2 
 svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx|1 
 svx/inc/sdr/primitive2d/sdrattributecreator.hxx  |2 
 svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx|5 
 svx/sdi/svx.sdi  |   51 +++
 svx/source/sdr/attribute/sdreffectstextattribute.cxx |8 
 svx/source/sdr/attribute/sdrlineeffectstextattribute.cxx |3 
 svx/source/sdr/attribute/sdrlinefilleffectstextattribute.cxx |3 
 svx/source/sdr/primitive2d/sdrattributecreator.cxx   |   70 -
 svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx |   23 +
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |   15 +
 svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx   |   11 
 svx/source/sdr/properties/customshapeproperties.cxx  |2 
 svx/source/sdr/properties/textproperties.cxx |1 
 svx/source/sidebar/PanelFactory.cxx  |5 
 svx/source/sidebar/effect/TextEffectPropertyPanel.cxx|  153 +++
 svx/source/sidebar/effect/TextEffectPropertyPanel.hxx|   58 
 svx/source/svdraw/svdattr.cxx|8 
 svx/source/svdraw/svdedxv.cxx|3 
 svx/source/unodraw/unoprov.cxx   |   11 
 svx/uiconfig/ui/sidebartexteffect.ui |  135 +
 sw/sdi/drawsh.sdi|   21 +
 vcl/jsdialog/enabled.cxx |1 
 xmloff/inc/xmlprop.hxx   |3 
 xmloff/source/core/xmltoken.cxx  |3 
 xmloff/source/draw/sdpropls.cxx  |5 
 xmloff/source/token/tokens.txt   |3 
 64 files changed, 1056 insertions(+), 34 deletions(-)

New commits:
commit 3eac847927a0cdfa40c3fea38c473ed2ad7faecc
Author: Balazs Varga 
AuthorDate: Wed Aug 21 17:34:23 2024 +0200
Commit: Balazs Varga 
CommitDate: Thu Aug 29 19:59:24 2024 +0200

tdf#161826 - Add uniform Glow effect for texts in shapes

- Add new text Glow effect properties for shapes

- Using TextGlowPrimitive for rendering uniform text glow in shapes

 

core.git: sw/uiconfig

2024-08-21 Thread Balazs Varga (via logerrit)
 sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui |9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit e13ec6c0f447e9699b3b46e0d896c3ec2920979c
Author: Balazs Varga 
AuthorDate: Wed Aug 21 10:30:44 2024 +0200
Commit: Balazs Varga 
CommitDate: Wed Aug 21 18:24:21 2024 +0200

tdf#162258 - fix accessibility check sidebar deck is too wide

Regression from commit: 33ea719d6c6ad23dfca088853d95d5688782da2d
(tdf#157233 - A11y: Add global Accessibility check options for)

Change-Id: Ia6cf7d9e08488867c7e2dc4f89dfc417a950dbc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172208
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui 
b/sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui
index aca80c3403c8..489f19e9683e 100644
--- a/sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui
+++ b/sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui
@@ -18,12 +18,9 @@
   
 True
 False
+start
 True
-Adjust accessibility check 
options.
-True
-56
-56
-0
+Adjust accessibility check 
options
   
   
 0
@@ -36,7 +33,9 @@
 True
 True
 True
+end
 center
+True
 True
 
   


core.git: include/svx oox/source sd/qa sd/source svx/source

2024-08-12 Thread Balazs Varga (via logerrit)
 include/svx/svdoashp.hxx |2 +-
 include/svx/svdobj.hxx   |2 +-
 include/svx/svdomeas.hxx |2 +-
 include/svx/svdotable.hxx|2 +-
 include/svx/svdotext.hxx |2 +-
 oox/source/drawingml/shape.cxx   |   25 +
 sd/qa/unit/data/xml/n593612_0.xml|4 ++--
 sd/qa/unit/import-tests-smartart.cxx |2 +-
 sd/qa/unit/import-tests2.cxx |8 
 sd/source/core/drawdoc4.cxx  |2 +-
 svx/source/svdraw/svdoashp.cxx   |4 ++--
 svx/source/svdraw/svdobj.cxx |2 +-
 svx/source/svdraw/svdomeas.cxx   |4 ++--
 svx/source/svdraw/svdotext.cxx   |4 ++--
 svx/source/table/svdotable.cxx   |5 +++--
 15 files changed, 48 insertions(+), 22 deletions(-)

New commits:
commit ebf13e890766f4cadbba81444784cfe3c8e1bbc3
Author: Balazs Varga 
AuthorDate: Thu Aug 8 10:18:24 2024 +0200
Commit: Balazs Varga 
CommitDate: Mon Aug 12 13:24:48 2024 +0200

tdf#156857: sd ooxml import: fix shape size if spAutofit is set

and the size of the shape from ooxml file is different then the
inew calculated by TextAutoGrowHeight.

Furthermore, no need to check and resize the shape size during
the spell checking.

Change-Id: Iffd15e02579942d4f5f20db73f2194f8298c0838
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171621
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
Tested-by: Gabor Kelemen 

diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx
index 34f26acc33c1..a33fce0aca7a 100644
--- a/include/svx/svdoashp.hxx
+++ b/include/svx/svdoashp.hxx
@@ -218,7 +218,7 @@ public:
 virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
 virtual basegfx::B2DPolyPolygon TakeContour() const override;
 
-virtual void NbcSetOutlinerParaObject(std::optional 
pTextObject) override;
+virtual void NbcSetOutlinerParaObject(std::optional 
pTextObject, bool bAdjustTextFrameWidthAndHeight = true) override;
 
 virtual rtl::Reference DoConvertToPolyObj(bool bBezier, bool 
bAddText) const override;
 
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 85446e9b35d0..d109c15f3ee3 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -633,7 +633,7 @@ public:
 // keep text in outliner's format
 // SetOutlinerParaObject: transfer ownership of *pTextObject!
 void SetOutlinerParaObject(std::optional pTextObject);
-virtual void NbcSetOutlinerParaObject(std::optional 
pTextObject);
+virtual void NbcSetOutlinerParaObject(std::optional 
pTextObject, bool bAdjustTextFrameWidthAndHeight = true);
 virtual OutlinerParaObject* GetOutlinerParaObject() const;
 virtual void NbcReformatText();
 
diff --git a/include/svx/svdomeas.hxx b/include/svx/svdomeas.hxx
index 775354020af0..dcef67aa2c4c 100644
--- a/include/svx/svdomeas.hxx
+++ b/include/svx/svdomeas.hxx
@@ -138,7 +138,7 @@ public:
 SAL_DLLPRIVATE virtual void TakeTextAnchorRect(tools::Rectangle& 
rAnchorRect) const override;
 SAL_DLLPRIVATE virtual void TakeTextEditArea(Size* pPaperMin, Size* 
pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const 
override;
 SAL_DLLPRIVATE virtual EEAnchorMode GetOutlinerViewAnchorMode() const 
override;
-SAL_DLLPRIVATE virtual void 
NbcSetOutlinerParaObject(std::optional pTextObject) 
override;
+SAL_DLLPRIVATE virtual void 
NbcSetOutlinerParaObject(std::optional pTextObject, bool 
bAdjustTextFrameWidthAndHeight = true) override;
 SAL_DLLPRIVATE virtual OutlinerParaObject* GetOutlinerParaObject() const 
override;
 
 SAL_DLLPRIVATE virtual bool CalcFieldValue(const SvxFieldItem& rField, 
sal_Int32 nPara, sal_uInt16 nPos,
diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx
index 4a7e8ad792b6..9abacce2b9ff 100644
--- a/include/svx/svdotable.hxx
+++ b/include/svx/svdotable.hxx
@@ -239,7 +239,7 @@ public:
 void TakeTextEditArea(const sdr::table::CellPos& rPos, Size* pPaperMin, 
Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const;
 virtual EEAnchorMode GetOutlinerViewAnchorMode() const override;
 
-virtual void NbcSetOutlinerParaObject(std::optional 
pTextObject) override;
+virtual void NbcSetOutlinerParaObject(std::optional 
pTextObject, bool bAdjustTextFrameWidthAndHeight = true) override;
 
 virtual OutlinerParaObject* GetOutlinerParaObject() const override;
 
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index c9184def420e..92d0cf0b9bf3 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -518,7 +518,7 @@ public:
 virtual void EndTextEdit(SdrOutliner& rOutl);
 virtual EEAnchorMode GetOutlinerViewAnchorMode() const;
 
-virtual void NbcSetOutlinerParaObject(std::optional 
pTextObject) override;
+virtual void NbcSetOutlinerParaObject(std::optional 
pTextObject, bool bAdjustTextFrameWidthAndHeight = true) override;
 // @

core.git: cui/uiconfig

2024-07-29 Thread Balazs Varga (via logerrit)
 cui/uiconfig/ui/optaccessibilitypage.ui |   27 +++
 1 file changed, 19 insertions(+), 8 deletions(-)

New commits:
commit b6f8df8a6006037bf986e3f6c784d27e4d83aea0
Author: Balazs Varga 
AuthorDate: Mon Jul 29 16:42:26 2024 +0200
Commit: Balazs Varga 
CommitDate: Tue Jul 30 08:26:36 2024 +0200

tdf#162250 - Fix Assertion failure Accessibility page on GTK

follow-up commit: Ib01e7d76e74b0b9cc9df259295edbee135b1c8a2
(Add global Accessibility check options for
managing which a11y issue should be checked. In default mode all the
a11y issues are checked.)

Change-Id: I5f936e8bbf7277e156594d51673fe48ff7cf6cbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171216
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/uiconfig/ui/optaccessibilitypage.ui 
b/cui/uiconfig/ui/optaccessibilitypage.ui
index 8106611b0a43..0402e7760fe3 100644
--- a/cui/uiconfig/ui/optaccessibilitypage.ui
+++ b/cui/uiconfig/ui/optaccessibilitypage.ui
@@ -2,6 +2,24 @@
 
 
   
+  
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+  
   
 True
 False
@@ -335,7 +353,7 @@
   
 
 
-  
+  
 True
 False
 True
@@ -453,11 +471,4 @@
   
 
   
-  
-1
-99
-1
-1
-10
-  
 


core.git: cui/inc cui/source cui/uiconfig filter/source include/sfx2 officecfg/registry sfx2/source sw/source sw/uiconfig

2024-07-25 Thread Balazs Varga (via logerrit)
 cui/inc/strings.hrc|   35 +
 cui/source/options/optaccessibility.cxx|  344 +
 cui/source/options/optaccessibility.hxx|9 
 cui/uiconfig/ui/optaccessibilitypage.ui|  113 
 filter/source/pdf/impdialog.cxx|8 
 include/sfx2/AccessibilityIssue.hxx|   21 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |  305 +++
 sfx2/source/accessibility/AccessibilityIssue.cxx   |1 
 sw/source/core/access/AccessibilityCheck.cxx   |  241 -
 sw/source/core/inc/AccessibilityIssue.hxx  |2 
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx  |   67 +-
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx  |4 
 sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui |   64 ++
 13 files changed, 1177 insertions(+), 37 deletions(-)

New commits:
commit 33ea719d6c6ad23dfca088853d95d5688782da2d
Author: Balazs Varga 
AuthorDate: Thu Jul 4 17:33:34 2024 +0200
Commit: Balazs Varga 
CommitDate: Thu Jul 25 17:44:22 2024 +0200

tdf#157233 - A11y: Add global Accessibility check options for

managing which a11y issue should be checked. In default mode all the a11y 
issues are checked.

Change-Id: Ib01e7d76e74b0b9cc9df259295edbee135b1c8a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170324
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index 96f67c5fe8f3..9b10de8b4be1 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -401,4 +401,39 @@
 // Translatable names of color schemes
 #define RID_COLOR_SCHEME_LIBREOFFICE_AUTOMATIC  
NC_("RID_COLOR_SCHEME_LIBREOFFICE_AUTOMATIC", "Automatic")
 
+// A11Y Options
+#define STR_NO_ALT_OLE  NC_("STR_NO_ALT_OLE", 
"Check Ole Object have alternative name or discription")
+#define STR_NO_ALT_GRAPHIC  NC_("STR_NO_ALT_GRAPHIC", 
"Check Graphic Object have alternative name or discription")
+#define STR_NO_ALT_SHAPENC_("STR_NO_ALT_SHAPE", 
"Check Shape Object have alternative name or discription")
+#define STR_LINKED_GRAPHIC  NC_("STR_LINKED_GRAPHIC", 
"Check Graphic object referenced as “LINK”")
+#define STR_TABLE_MERGE_SPLIT   
NC_("STR_TABLE_MERGE_SPLIT", "Check Table object contains merges or splits")
+#define STR_FAKE_NUMBERING  NC_("STR_FAKE_NUMBERING", 
"Check document contains simulated numbering")
+#define STR_HYPERLINK_TEXT_IS_LINK  
NC_("STR_HYPERLINK_TEXT_IS_LINK", "Check hyperlink text is the same as the link 
address")
+#define STR_HYPERLINK_TEXT_IS_SHORT 
NC_("STR_HYPERLINK_TEXT_IS_SHORT", "Check hyperlink text is too short")
+#define STR_HYPERLINK_NO_NAME   
NC_("STR_HYPERLINK_NO_NAME", "Check hyperlink have alternative name set")
+#define STR_TEXT_CONTRAST   NC_("STR_TEXT_CONTRAST", 
"Check texts contrast is too low")
+#define STR_TEXT_BLINKING   NC_("STR_TEXT_BLINKING", 
"Check blinking texts")
+#define STR_AVOID_FOOTNOTES NC_("STR_AVOID_FOOTNOTES", 
"Check document contains footnotes")
+#define STR_AVOID_FAKE_FOOTNOTES
NC_("STR_AVOID_FAKE_FOOTNOTES", "Check document contains simulated footnotes")
+#define STR_AVOID_FAKE_CAPTIONS 
NC_("STR_AVOID_FAKE_CAPTIONS", "Check document contains simulated captions")
+#define STR_AVOID_ENDNOTES  NC_("STR_AVOID_ENDNOTES", 
"Check document contains endnotes")
+#define STR_AVOID_BACKGROUND_IMAGES 
NC_("STR_AVOID_BACKGROUND_IMAGES", "Check document contains background images")
+#define STR_AVOID_NEWLINES_SPACE
NC_("STR_AVOID_NEWLINES_SPACE", "Check document contains newlines to create 
space")
+#define STR_AVOID_SPACES_SPACE  
NC_("STR_AVOID_SPACES_SPACE", "Check document contains spaces to create space")
+#define STR_AVOID_TABS_FORMATTING   
NC_("STR_AVOID_TABS_FORMATTING", "Check document contains tabs for formatting")
+#define STR_HEADINGS_NOT_IN_ORDER   
NC_("STR_HEADINGS_NOT_IN_ORDER", "Check outline levels of headings not in 
sequential order")
+#define STR_TEXT_FORMATTING_CONVEYS_MEAN
NC_("STR_TEXT_FORMATTING_CONVEYS_MEANING", "Check document contains direct 
formattings")
+#define STR_NON_INTERACTIVE_FORMS   
NC_("STR_NON_INTERACTIVE_FORMS", "Check document contains interactive input 
fields")
+#define STR_FLOATING_TEXT   NC_("STR_FLOATING_TEXT", 
"Check Frames/Text boxes anchored “As Character“")
+#define STR_HEADING_IN_TABLE
NC_("STR_HEADING_IN_TABLE", "Check tables contain headings")
+

core.git: Branch 'libreoffice-24-8' - sw/qa sw/source

2024-07-14 Thread Balazs Varga (via logerrit)
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx |4 +++-
 sw/qa/core/accessibilitycheck/data/TabsTest.odt  |binary
 sw/source/core/access/AccessibilityCheck.cxx |   11 +--
 3 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 8b2a98d2565fd3aaad3de05943f30a8a56d84948
Author: Balazs Varga 
AuthorDate: Thu Jul 11 18:33:25 2024 +0200
Commit: Xisco Fauli 
CommitDate: Mon Jul 15 08:55:04 2024 +0200

tdf#159776 - A11Y sidebar: Fix no warning about multiple tabs

used for creating spacing.

Change-Id: I9a2725954406140efa27ccc3ae30f19d0bd1fa8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170387
Reviewed-by: Balazs Varga 
Tested-by: Jenkins
(cherry picked from commit 629a20b97f186531d73d78ef8a02e5def35f22e1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170472
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx 
b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
index 77330b9a8157..43a872832ee0 100644
--- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
+++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
@@ -219,7 +219,7 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckTabsFormatting)
 sw::AccessibilityCheck aCheck(pDoc);
 aCheck.check();
 auto& aIssues = aCheck.getIssueCollection().getIssues();
-CPPUNIT_ASSERT_EQUAL(size_t(8), aIssues.size());
+CPPUNIT_ASSERT_EQUAL(size_t(10), aIssues.size());
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[1]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[2]->m_eIssueID);
@@ -228,6 +228,8 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckTabsFormatting)
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[5]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[6]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[7]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[8]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[9]->m_eIssueID);
 }
 
 //tdf#156550 - Accessibility sidebar complains about TOC hyperlinks
diff --git a/sw/qa/core/accessibilitycheck/data/TabsTest.odt 
b/sw/qa/core/accessibilitycheck/data/TabsTest.odt
index 29b415df87a7..d48a5a0155cf 100644
Binary files a/sw/qa/core/accessibilitycheck/data/TabsTest.odt and 
b/sw/qa/core/accessibilitycheck/data/TabsTest.odt differ
diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index 723d20566f24..429b94a02efb 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -937,6 +937,7 @@ public:
 sal_Int32 nTabCount = 0;
 bool bNonSpaceFound = false;
 bool bPreviousWasChar = false;
+bool bPreviousWasTab = false;
 for (sal_Int32 i = 0; i < nParagraphLength; i++)
 {
 switch (sParagraphText[i])
@@ -958,10 +959,15 @@ public:
 if (pSection && pSection->GetTOXBase())
 continue;
 
-if (bPreviousWasChar)
+// text between tabs or text align at least with two tabs
+if (bPreviousWasChar || bPreviousWasTab)
 {
 ++nTabCount;
-bPreviousWasChar = false;
+if (bPreviousWasChar)
+{
+bPreviousWasChar = false;
+bPreviousWasTab = true;
+}
 if (nTabCount == 2)
 {
 auto pIssue = lclAddIssue(m_rIssueCollection,
@@ -993,6 +999,7 @@ public:
 }
 bNonSpaceFound = true;
 bPreviousWasChar = true;
+bPreviousWasTab = false;
 nSpaceCount = 0;
 break;
 }


core.git: sw/qa sw/source

2024-07-12 Thread Balazs Varga (via logerrit)
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx |4 +++-
 sw/qa/core/accessibilitycheck/data/TabsTest.odt  |binary
 sw/source/core/access/AccessibilityCheck.cxx |   11 +--
 3 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 629a20b97f186531d73d78ef8a02e5def35f22e1
Author: Balazs Varga 
AuthorDate: Thu Jul 11 18:33:25 2024 +0200
Commit: Balazs Varga 
CommitDate: Fri Jul 12 16:54:01 2024 +0200

tdf#159776 - A11Y sidebar: Fix no warning about multiple tabs

used for creating spacing.

Change-Id: I9a2725954406140efa27ccc3ae30f19d0bd1fa8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170387
Reviewed-by: Balazs Varga 
Tested-by: Jenkins

diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx 
b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
index 77330b9a8157..43a872832ee0 100644
--- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
+++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
@@ -219,7 +219,7 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckTabsFormatting)
 sw::AccessibilityCheck aCheck(pDoc);
 aCheck.check();
 auto& aIssues = aCheck.getIssueCollection().getIssues();
-CPPUNIT_ASSERT_EQUAL(size_t(8), aIssues.size());
+CPPUNIT_ASSERT_EQUAL(size_t(10), aIssues.size());
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[1]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[2]->m_eIssueID);
@@ -228,6 +228,8 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckTabsFormatting)
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[5]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[6]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[7]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[8]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[9]->m_eIssueID);
 }
 
 //tdf#156550 - Accessibility sidebar complains about TOC hyperlinks
diff --git a/sw/qa/core/accessibilitycheck/data/TabsTest.odt 
b/sw/qa/core/accessibilitycheck/data/TabsTest.odt
index 29b415df87a7..d48a5a0155cf 100644
Binary files a/sw/qa/core/accessibilitycheck/data/TabsTest.odt and 
b/sw/qa/core/accessibilitycheck/data/TabsTest.odt differ
diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index 723d20566f24..429b94a02efb 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -937,6 +937,7 @@ public:
 sal_Int32 nTabCount = 0;
 bool bNonSpaceFound = false;
 bool bPreviousWasChar = false;
+bool bPreviousWasTab = false;
 for (sal_Int32 i = 0; i < nParagraphLength; i++)
 {
 switch (sParagraphText[i])
@@ -958,10 +959,15 @@ public:
 if (pSection && pSection->GetTOXBase())
 continue;
 
-if (bPreviousWasChar)
+// text between tabs or text align at least with two tabs
+if (bPreviousWasChar || bPreviousWasTab)
 {
 ++nTabCount;
-bPreviousWasChar = false;
+if (bPreviousWasChar)
+{
+bPreviousWasChar = false;
+bPreviousWasTab = true;
+}
 if (nTabCount == 2)
 {
 auto pIssue = lclAddIssue(m_rIssueCollection,
@@ -993,6 +999,7 @@ public:
 }
 bNonSpaceFound = true;
 bPreviousWasChar = true;
+bPreviousWasTab = false;
 nSpaceCount = 0;
 break;
 }


core.git: Branch 'libreoffice-24-8' - sc/qa sc/source

2024-07-11 Thread Balazs Varga (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/match.fods | 4547 --
 sc/source/core/data/queryiter.cxx |3 
 2 files changed, 2246 insertions(+), 2304 deletions(-)

New commits:
commit f649a02ab6556c4cd404b7acf5a9d50c2c4582a6
Author: Balazs Varga 
AuthorDate: Tue Jul 9 15:39:39 2024 +0200
Commit: Xisco Fauli 
CommitDate: Thu Jul 11 18:03:53 2024 +0200

tdf#161964 - sc Fix Lookup functions error with only-row reference

as a lookup_array parameter. ($1:$1)

Regression from commit: 85f733a9242339d8e92f992ff1ad6d1b99d3f383
(Related: tdf#160725 - Add horizontal binary search mode for SortedCache)

Change-Id: I3ef7c612e7bc92ecab81a3e52aed9873da907f16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170221
Reviewed-by: Balazs Varga 
Tested-by: Jenkins
(cherry picked from commit 46d55cf7960ecea3bc8af29f7a05159e5979c3ac)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170242
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/match.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/match.fods
index d5debd0d6339..b84a0eb7a5b0 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/match.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/match.fods
@@ -1,274 +1,435 @@
 
 
-http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-i

core.git: sc/inc sc/qa sc/source

2024-06-27 Thread Balazs Varga (via logerrit)
 sc/inc/document.hxx |3 
 sc/inc/queryevaluator.hxx   |3 
 sc/inc/queryiter.hxx|2 
 sc/inc/rangecache.hxx   |2 
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  375 
 sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods  |   38 +
 sc/source/core/data/documen2.cxx|5 
 sc/source/core/data/queryevaluator.cxx  |4 
 sc/source/core/data/queryiter.cxx   |   20 
 sc/source/core/tool/rangecache.cxx  |   10 
 10 files changed, 267 insertions(+), 195 deletions(-)

New commits:
commit f5f5ff719f30fccd207e36627f2e42b34d0a6fb1
Author: Balazs Varga 
AuthorDate: Wed Jun 26 19:12:07 2024 +0200
Commit: Balazs Varga 
CommitDate: Thu Jun 27 18:06:21 2024 +0200

Related: tdf#127293 Ignore 'search-criteria-must-apply-to-whole-cell'

dependency for XLOOKUP and XMATCH because of better compatibility.

The idea is to specify, that the global setting 
'search-criteria-must-apply-to-whole-cell'
is ignored and XMATCH and XLOOKUP always behaves as if 
'search-criteria-must-apply-to-whole-cell'=true.

That would affect exact search in Match_mode value 0. Users would need to 
use wildcard or regex
to get a match to part of the content. But removing dependency to the 
global setting increases
interoperability with MS Excel.

Also the ODF TC will follow that in the final specification of these 
functions:
https://issues.oasis-open.org/browse/OFFICE-4154

Follow-up commit: 17d578ba91f9c78a0e41d19b58183d2214c0b7a4
(Related: tdf#127293 Add new Match_mode option for XLOOKUP and XMATCH 
functions.)

Change-Id: I1317865631d2925eaff72e9c1425d93386c3d016
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169582
Reviewed-by: Balazs Varga 
Reviewed-by: Regina Henschel 
Tested-by: Jenkins

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index d0e825721740..2f67225bf8ec 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1425,7 +1425,8 @@ public:
 doesn't already exist. */
 ScLookupCache & GetLookupCache( const ScRange & rRange, 
ScInterpreterContext* pContext );
 ScSortedRangeCache & GetSortedRangeCache( const ScRange & rRange, const 
ScQueryParam& param,
-  ScInterpreterContext* pContext, 
sal_uInt8 nSortedBinarySearch = 0x00 );
+  ScInterpreterContext* pContext, 
bool bNewSearchFunction,
+  sal_uInt8 nSortedBinarySearch = 
0x00 );
 /** Only ScLookupCache dtor uses RemoveLookupCache(), do
 not use elsewhere! */
 voidRemoveLookupCache( ScLookupCache & rCache );
diff --git a/sc/inc/queryevaluator.hxx b/sc/inc/queryevaluator.hxx
index 351531b9731c..6d3012141db8 100644
--- a/sc/inc/queryevaluator.hxx
+++ b/sc/inc/queryevaluator.hxx
@@ -108,7 +108,8 @@ class ScQueryEvaluator
 
 public:
 ScQueryEvaluator(ScDocument& rDoc, const ScTable& rTab, const 
ScQueryParam& rParam,
- ScInterpreterContext* pContext = nullptr, bool* 
pTestEqualCondition = nullptr);
+ ScInterpreterContext* pContext = nullptr, bool* 
pTestEqualCondition = nullptr,
+ bool bNewSearchFunction = false);
 
 bool ValidQuery(SCROW nRow, const ScRefCellValue* pCell = nullptr,
 sc::TableColumnBlockPositionSet* pBlockPos = nullptr);
diff --git a/sc/inc/queryiter.hxx b/sc/inc/queryiter.hxx
index 9d0ab1cc6aea..67f0e16fc0b5 100644
--- a/sc/inc/queryiter.hxx
+++ b/sc/inc/queryiter.hxx
@@ -103,7 +103,7 @@ public:
 protected:
 ScQueryCellIteratorAccessSpecific( ScDocument& rDocument, 
ScInterpreterContext& rContext,
 const ScQueryParam& rParam, bool bReverseSearch );
-void InitPosStart(sal_uInt8 nSortedBinarySearch = 0x00);
+void InitPosStart(bool bNewSearchFunction, sal_uInt8 nSortedBinarySearch = 
0x00);
 void InitPosFinish( SCROW beforeRow, SCROW lastRow, bool bFirstMatch );
 void InitPosColFinish( SCCOL beforeCol, SCCOL lastCol, bool bFirstMatch );
 void IncPos() { IncPosImpl(); }
diff --git a/sc/inc/rangecache.hxx b/sc/inc/rangecache.hxx
index 5a9553e764ff..4f0e810db0a8 100644
--- a/sc/inc/rangecache.hxx
+++ b/sc/inc/rangecache.hxx
@@ -47,7 +47,7 @@ public:
 /// MUST be new'd because Notify() deletes.
 ScSortedRangeCache(ScDocument* pDoc, const ScRange& rRange, const 
ScQueryParam& param,
ScInterpreterContext* context, bool invalid = false,
-   sal_uInt8 nSortedBinarySearch = 0x00);
+   bool bNewSearchFunction = false, sal_uInt8 
nSortedBinarySearch = 0x00);
 
 /// Returns if the cache is usable.
 bool isVa

core.git: sw/qa sw/source

2024-06-27 Thread Balazs Varga (via logerrit)
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx |   34 ++-
 sw/source/core/access/AccessibilityCheck.cxx |   20 
 2 files changed, 44 insertions(+), 10 deletions(-)

New commits:
commit 16d8f37cae3e6b68e4c41fbbacd94f48c3e304ab
Author: Balazs Varga 
AuthorDate: Wed Jun 26 10:46:23 2024 +0200
Commit: Balazs Varga 
CommitDate: Thu Jun 27 17:12:01 2024 +0200

tdf#159777 - A11Y sidebar: Add warning about ParaTopMargin

and ParaBottomMargin direct formats.

Change-Id: Ifac19eba9d3c2e3631ebede1a5f9f172bbaf8927
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169541
Reviewed-by: Balazs Varga 
Tested-by: Jenkins
Tested-by: Gabor Kelemen 

diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx 
b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
index 302efe29a5a8..77330b9a8157 100644
--- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
+++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
@@ -104,9 +104,11 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckNewlineSpace)
 sw::AccessibilityCheck aCheck(pDoc);
 aCheck.check();
 auto& aIssues = aCheck.getIssueCollection().getIssues();
-CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size());
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(size_t(4), aIssues.size());
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[0]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[1]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[2]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[3]->m_eIssueID);
 }
 
 CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckSpacebarSpace)
@@ -117,8 +119,10 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckSpacebarSpace)
 sw::AccessibilityCheck aCheck(pDoc);
 aCheck.check();
 auto& aIssues = aCheck.getIssueCollection().getIssues();
-CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size());
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(size_t(3), aIssues.size());
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[1]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[2]->m_eIssueID);
 }
 
 CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testHyperlinks)
@@ -144,8 +148,10 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckHighlightedText)
 sw::AccessibilityCheck aCheck(pDoc);
 aCheck.check();
 auto& aIssues = aCheck.getIssueCollection().getIssues();
-CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size());
+CPPUNIT_ASSERT_EQUAL(size_t(3), aIssues.size());
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[1]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[2]->m_eIssueID);
 }
 
 CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testNumberingCheck)
@@ -172,9 +178,13 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckFakeFootnote)
 sw::AccessibilityCheck aCheck(pDoc);
 aCheck.check();
 auto& aIssues = aCheck.getIssueCollection().getIssues();
-CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size());
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::FAKE_FOOTNOTE, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(size_t(6), aIssues.size());
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[0]->m_eIssueID);
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::FAKE_FOOTNOTE, 
aIssues[1]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[2]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::FAKE_FOOTNOTE, 
aIssues[3]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[4]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[5]->m_eIssueID);
 }
 
 CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckFakeCaption)
@@ -209,11 +219,15 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckTabsFormatting)
 sw::AccessibilityCheck aCheck(pDoc);
 aCheck.check();
 auto& aIssues = aCheck.getIssueCollection().getIssues();
-CPPUNIT_ASSERT_EQUAL(size_t(4), aIssues.size());
+CPPUNIT_ASSERT_EQUAL(size_t(8), aIssues.size());
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[1]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::Acce

core.git: Branch 'libreoffice-24-8' - sw/source

2024-06-24 Thread Balazs Varga (via logerrit)
 sw/source/core/access/AccessibilityIssue.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 2fe3085f7764aded9ba35ade2476405cb569dc29
Author: Balazs Varga 
AuthorDate: Thu Jun 20 11:13:25 2024 +0200
Commit: Balazs Varga 
CommitDate: Mon Jun 24 15:55:21 2024 +0200

tdf#159907 - A11Y - Fix highlighted text does not show its attributes

in the Style inspector.

Set the cursor at the end of the highlighted text.

Change-Id: I68af50d5bcf91c3cfe603aeef9e88c088b391590
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169259
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
(cherry picked from commit a3bcf0840dec6f91acbe0fe9bc2f733f2a4ae3c7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169302

diff --git a/sw/source/core/access/AccessibilityIssue.cxx 
b/sw/source/core/access/AccessibilityIssue.cxx
index 1755023fb210..7347559221a6 100644
--- a/sw/source/core/access/AccessibilityIssue.cxx
+++ b/sw/source/core/access/AccessibilityIssue.cxx
@@ -187,13 +187,13 @@ void AccessibilityIssue::gotoIssue() const
 case IssueObject::TEXT:
 {
 SwContentNode* pContentNode = 
TempIssueObject.m_pNode->GetContentNode();
-SwPosition aPoint(*pContentNode, TempIssueObject.m_nStart);
-SwPosition aMark(*pContentNode, TempIssueObject.m_nEnd);
+SwPosition aStart(*pContentNode, TempIssueObject.m_nStart);
+SwPosition aEnd(*pContentNode, TempIssueObject.m_nEnd);
 pWrtShell->StartAllAction();
 SwPaM* pPaM = pWrtShell->GetCursor();
-*pPaM->GetPoint() = std::move(aPoint);
+*pPaM->GetPoint() = std::move(aEnd);
 pPaM->SetMark();
-*pPaM->GetMark() = std::move(aMark);
+*pPaM->GetMark() = std::move(aStart);
 pWrtShell->EndAllAction();
 
 // bring issue to attention


core.git: Branch 'libreoffice-24-8' - sc/inc sc/qa sc/source

2024-06-24 Thread Balazs Varga (via logerrit)
 sc/inc/scfuncs.hrc   |4 ++--
 sc/qa/unit/ucalc_formula2.cxx|   14 +++---
 sc/source/core/inc/interpre.hxx  |2 +-
 sc/source/core/tool/interpr1.cxx |   13 -
 4 files changed, 18 insertions(+), 15 deletions(-)

New commits:
commit 607b99ea5b1b1e46622262cc5cfbeea01178d751
Author: Balazs Varga 
AuthorDate: Thu Jun 20 14:07:57 2024 +0200
Commit: Balazs Varga 
CommitDate: Mon Jun 24 11:39:19 2024 +0200

Related: tdf#127293 Add new Match_mode option for XLOOKUP and

XMATCH functions.

Introduce a value "3" for parameter Match_mode for Regular Expression mode
in XMATCH and XLOOKUP, to seperate the original Match_mode value "2",
which was used for both, Wildcard and Regular Expression mode as well.

Note: "The ODF TC will follow that in the specification of these functions 
and
at the same time specify, that the host dependent properties 
HOST-USE-REGULAR-EXPRESSIONS
and HOST-USE-WILDCARDS (file format table:use-regular-expressions and 
table:use-wildcards)
will be ignored by these functions."
https://issues.oasis-open.org/browse/OFFICE-4154

Also Microsoft Office will introduce this new value for Match_mode in 
XLOOKUP and XMATCH:

https://insider.microsoft365.com/en-us/blog/new-regular-expression-regex-functions-in-excel

Follow-up commit: 0ca20dca3349daa303b89251443f550491968a39
(Related: tdf#127293 Add unit test for xlookup regex search mode)

Change-Id: Ibcbfa4cf227ab9a9d317d94c1bab8254b1f91822
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169275
Reviewed-by: Balazs Varga 
Tested-by: Jenkins
(cherry picked from commit 17d578ba91f9c78a0e41d19b58183d2214c0b7a4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169294

diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc
index 9ce5e234c288..845de5f856fa 100644
--- a/sc/inc/scfuncs.hrc
+++ b/sc/inc/scfuncs.hrc
@@ -3390,7 +3390,7 @@ const TranslateId SC_OPCODE_X_LOOKUP_ARY[] =
 NC_("SC_OPCODE_X_LOOKUP", "Result if not found"),
 NC_("SC_OPCODE_X_LOOKUP", "If given, return given text, otherwise return 
#N/A."),
 NC_("SC_OPCODE_X_LOOKUP", "Match Mode"),
-NC_("SC_OPCODE_X_LOOKUP", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard or regular expression match."),
+NC_("SC_OPCODE_X_LOOKUP", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard match.
3 - Regular expression match."),
 NC_("SC_OPCODE_X_LOOKUP", "Search Mode"),
 NC_("SC_OPCODE_X_LOOKUP", "1 - Search from the first value (default).
-1 - Search from the last value (reverse).
2 - Binary search values sorted in ascending order.
-2 - Binary search values sorted in descending order.")
 };
@@ -3452,7 +3452,7 @@ const TranslateId SC_OPCODE_X_MATCH_ARY[] =
 NC_("SC_OPCODE_X_MATCH", "Search Array"),
 NC_("SC_OPCODE_X_MATCH", "The array or range to search."),
 NC_("SC_OPCODE_X_MATCH", "Match Mode"),
-NC_("SC_OPCODE_X_MATCH", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard or regular expression match."),
+NC_("SC_OPCODE_X_MATCH", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard match.
3 - Regular expression match."),
 NC_("SC_OPCODE_X_MATCH", "Search Mode"),
 NC_("SC_OPCODE_X_MATCH", "1 - Search from the first value (default).
-1 - Search from the last value (reverse).
2 - Binary search values sorted in ascending order.
-2 - Binary search values sorted in descending order.")
 };
diff --git a/sc/qa/unit/ucalc_formula2.cxx b/sc/qa/unit/ucalc_formula2.cxx
index f0f3c41ff2b4..4c077b2d4400 100644
--- a/sc/qa/unit/ucalc_formula2.cxx
+++ b/sc/qa/unit/ucalc_formula2.cxx
@@ -4651,13 +4651,13 @@ CPPUNIT_TEST_FIXTURE(TestFormula2, testRegexForXLOOKUP)
 sc::AutoCalcSwitch aACSwitch(*m_pDoc, true);
 
 // Temporarily switch regex search mode.
-bool bOldWildCard = false;
+bool bOldRegex = false;
 ScDocOptions aDocOpt = m_pDoc->GetDocOptions();
-if (!aDocOpt.IsFormulaRegexEnabled())
+if (aDocOpt.IsFormulaRegexEnabled())
 {
-aDocOpt.SetFormulaRegexEnabled(true);
+aDocOpt.SetFormulaRegexEnabled(false);
 m_pDoc->SetDocOptions(aDocOpt);
-bOldWildCard = true;
+bOldRegex = true;
 }
 
 m_pDoc->InsertTab(0, u"Test1"_ustr);
@@ -4677,7 +4677,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula2, testRegexForXLOOKUP)
 insertRangeData(m_pDoc, ScAddress(0, 0, 0), aData); // A1:B11
 m_pDoc->SetString(4, 14, 0, u"^bo.*"_ustr); // E15 - search regex string
 
-m_pDoc->SetFormula(ScAddress(5, 14, 0), 
u"=XLOOKUP(E15;A$2:A$11;B$2:B$11;;2)"_u

core.git: sw/source

2024-06-21 Thread Balazs Varga (via logerrit)
 sw/source/core/access/AccessibilityIssue.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit a3bcf0840dec6f91acbe0fe9bc2f733f2a4ae3c7
Author: Balazs Varga 
AuthorDate: Thu Jun 20 11:13:25 2024 +0200
Commit: Balazs Varga 
CommitDate: Fri Jun 21 17:23:17 2024 +0200

tdf#159907 - A11Y - Fix highlighted text does not show its attributes

in the Style inspector.

Set the cursor at the end of the highlighted text.

Change-Id: I68af50d5bcf91c3cfe603aeef9e88c088b391590
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169259
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/source/core/access/AccessibilityIssue.cxx 
b/sw/source/core/access/AccessibilityIssue.cxx
index 1755023fb210..7347559221a6 100644
--- a/sw/source/core/access/AccessibilityIssue.cxx
+++ b/sw/source/core/access/AccessibilityIssue.cxx
@@ -187,13 +187,13 @@ void AccessibilityIssue::gotoIssue() const
 case IssueObject::TEXT:
 {
 SwContentNode* pContentNode = 
TempIssueObject.m_pNode->GetContentNode();
-SwPosition aPoint(*pContentNode, TempIssueObject.m_nStart);
-SwPosition aMark(*pContentNode, TempIssueObject.m_nEnd);
+SwPosition aStart(*pContentNode, TempIssueObject.m_nStart);
+SwPosition aEnd(*pContentNode, TempIssueObject.m_nEnd);
 pWrtShell->StartAllAction();
 SwPaM* pPaM = pWrtShell->GetCursor();
-*pPaM->GetPoint() = std::move(aPoint);
+*pPaM->GetPoint() = std::move(aEnd);
 pPaM->SetMark();
-*pPaM->GetMark() = std::move(aMark);
+*pPaM->GetMark() = std::move(aStart);
 pWrtShell->EndAllAction();
 
 // bring issue to attention


core.git: Branch 'libreoffice-24-8' - include/sfx2 sw/qa sw/source sw/uiconfig

2024-06-21 Thread Balazs Varga (via logerrit)
 include/sfx2/AccessibilityIssue.hxx  |1 
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx |   26 +-
 sw/source/core/access/AccessibilityCheck.cxx |6 +-
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx|   35 ++
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx|   15 +++---
 sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui   |   36 +--
 6 files changed, 83 insertions(+), 36 deletions(-)

New commits:
commit 4e35aa7a69a12c2950c2a29f392b653b49170c33
Author: Balazs Varga 
AuthorDate: Tue Jun 18 16:15:06 2024 +0200
Commit: Xisco Fauli 
CommitDate: Fri Jun 21 12:53:54 2024 +0200

tdf#159906 - A11Y: Add new direct character formatting group level

for Formatted warnings and keep them not expanded (default) to avoid
to many visible warning message on the sidebar.

Change-Id: Ic251909d793198c3c4ce5e132b763c15ac1c9a9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169110
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
Reviewed-by: Heiko Tietze 
(cherry picked from commit e74a5bea04483dc96ef6d4b34edd8735ec73bcd8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169296
Reviewed-by: Xisco Fauli 

diff --git a/include/sfx2/AccessibilityIssue.hxx 
b/include/sfx2/AccessibilityIssue.hxx
index 92bef3d7d6a2..d6dd7eb3f4bf 100644
--- a/include/sfx2/AccessibilityIssue.hxx
+++ b/include/sfx2/AccessibilityIssue.hxx
@@ -33,6 +33,7 @@ enum class AccessibilityIssueID
 NO_ALT_SHAPE,
 TABLE_MERGE_SPLIT,
 TEXT_FORMATTING,
+DIRECT_FORMATTING,
 TABLE_FORMATTING,
 HYPERLINK_IS_TEXT,
 HYPERLINK_SHORT,
diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx 
b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
index 8c3845332310..d3355bcfdd43 100644
--- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
+++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
@@ -69,7 +69,7 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckParagraphIssues)
 aCheck.check();
 auto& aIssues = aCheck.getIssueCollection().getIssues();
 CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size());
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[0]->m_eIssueID);
 }
 
 CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckBackgroundImage)
@@ -143,7 +143,7 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckHighlightedText)
 aCheck.check();
 auto& aIssues = aCheck.getIssueCollection().getIssues();
 CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size());
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[0]->m_eIssueID);
 }
 
 CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testNumberingCheck)
@@ -315,8 +315,8 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testOnlineNodeSplitAppend)
  
pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues());
 auto aIssues = scanAccessibilityIssuesOnNodes(pDoc);
 CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size());
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[1]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[1]->m_eIssueID);
 checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9));
 checkIssuePosition(aIssues[1], __LINE__, 33, 136, SwNodeOffset(9));
 
@@ -334,8 +334,8 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testOnlineNodeSplitAppend)
 
 aIssues = scanAccessibilityIssuesOnNodes(pDoc);
 CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size());
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[1]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[1]->m_eIssueID);
 checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9));
 checkIssuePosition(aIssues[1], __LINE__, 0, 103, SwNodeOffset(10));
 
@@ -354,9 +354,9 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testOnlineNodeSplitAppend)
  
pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues());
 aIssues = scanAccessibilityIssuesOnNodes(pDoc);
 CPPUNIT_ASSERT_EQUAL(size_t(3), aIssues.size());
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIss

core.git: sc/inc sc/qa sc/source

2024-06-21 Thread Balazs Varga (via logerrit)
 sc/inc/scfuncs.hrc   |4 ++--
 sc/qa/unit/ucalc_formula2.cxx|   14 +++---
 sc/source/core/inc/interpre.hxx  |2 +-
 sc/source/core/tool/interpr1.cxx |   13 -
 4 files changed, 18 insertions(+), 15 deletions(-)

New commits:
commit 17d578ba91f9c78a0e41d19b58183d2214c0b7a4
Author: Balazs Varga 
AuthorDate: Thu Jun 20 14:07:57 2024 +0200
Commit: Balazs Varga 
CommitDate: Fri Jun 21 10:04:55 2024 +0200

Related: tdf#127293 Add new Match_mode option for XLOOKUP and

XMATCH functions.

Introduce a value "3" for parameter Match_mode for Regular Expression mode
in XMATCH and XLOOKUP, to seperate the original Match_mode value "2",
which was used for both, Wildcard and Regular Expression mode as well.

Note: "The ODF TC will follow that in the specification of these functions 
and
at the same time specify, that the host dependent properties 
HOST-USE-REGULAR-EXPRESSIONS
and HOST-USE-WILDCARDS (file format table:use-regular-expressions and 
table:use-wildcards)
will be ignored by these functions."
https://issues.oasis-open.org/browse/OFFICE-4154

Also Microsoft Office will introduce this new value for Match_mode in 
XLOOKUP and XMATCH:

https://insider.microsoft365.com/en-us/blog/new-regular-expression-regex-functions-in-excel

Follow-up commit: 0ca20dca3349daa303b89251443f550491968a39
(Related: tdf#127293 Add unit test for xlookup regex search mode)

Change-Id: Ibcbfa4cf227ab9a9d317d94c1bab8254b1f91822
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169275
Reviewed-by: Balazs Varga 
Tested-by: Jenkins

diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc
index 9ce5e234c288..845de5f856fa 100644
--- a/sc/inc/scfuncs.hrc
+++ b/sc/inc/scfuncs.hrc
@@ -3390,7 +3390,7 @@ const TranslateId SC_OPCODE_X_LOOKUP_ARY[] =
 NC_("SC_OPCODE_X_LOOKUP", "Result if not found"),
 NC_("SC_OPCODE_X_LOOKUP", "If given, return given text, otherwise return 
#N/A."),
 NC_("SC_OPCODE_X_LOOKUP", "Match Mode"),
-NC_("SC_OPCODE_X_LOOKUP", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard or regular expression match."),
+NC_("SC_OPCODE_X_LOOKUP", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard match.
3 - Regular expression match."),
 NC_("SC_OPCODE_X_LOOKUP", "Search Mode"),
 NC_("SC_OPCODE_X_LOOKUP", "1 - Search from the first value (default).
-1 - Search from the last value (reverse).
2 - Binary search values sorted in ascending order.
-2 - Binary search values sorted in descending order.")
 };
@@ -3452,7 +3452,7 @@ const TranslateId SC_OPCODE_X_MATCH_ARY[] =
 NC_("SC_OPCODE_X_MATCH", "Search Array"),
 NC_("SC_OPCODE_X_MATCH", "The array or range to search."),
 NC_("SC_OPCODE_X_MATCH", "Match Mode"),
-NC_("SC_OPCODE_X_MATCH", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard or regular expression match."),
+NC_("SC_OPCODE_X_MATCH", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard match.
3 - Regular expression match."),
 NC_("SC_OPCODE_X_MATCH", "Search Mode"),
 NC_("SC_OPCODE_X_MATCH", "1 - Search from the first value (default).
-1 - Search from the last value (reverse).
2 - Binary search values sorted in ascending order.
-2 - Binary search values sorted in descending order.")
 };
diff --git a/sc/qa/unit/ucalc_formula2.cxx b/sc/qa/unit/ucalc_formula2.cxx
index f0f3c41ff2b4..4c077b2d4400 100644
--- a/sc/qa/unit/ucalc_formula2.cxx
+++ b/sc/qa/unit/ucalc_formula2.cxx
@@ -4651,13 +4651,13 @@ CPPUNIT_TEST_FIXTURE(TestFormula2, testRegexForXLOOKUP)
 sc::AutoCalcSwitch aACSwitch(*m_pDoc, true);
 
 // Temporarily switch regex search mode.
-bool bOldWildCard = false;
+bool bOldRegex = false;
 ScDocOptions aDocOpt = m_pDoc->GetDocOptions();
-if (!aDocOpt.IsFormulaRegexEnabled())
+if (aDocOpt.IsFormulaRegexEnabled())
 {
-aDocOpt.SetFormulaRegexEnabled(true);
+aDocOpt.SetFormulaRegexEnabled(false);
 m_pDoc->SetDocOptions(aDocOpt);
-bOldWildCard = true;
+bOldRegex = true;
 }
 
 m_pDoc->InsertTab(0, u"Test1"_ustr);
@@ -4677,7 +4677,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula2, testRegexForXLOOKUP)
 insertRangeData(m_pDoc, ScAddress(0, 0, 0), aData); // A1:B11
 m_pDoc->SetString(4, 14, 0, u"^bo.*"_ustr); // E15 - search regex string
 
-m_pDoc->SetFormula(ScAddress(5, 14, 0), 
u"=XLOOKUP(E15;A$2:A$11;B$2:B$11;;2)"_ustr,
+m_pDoc->SetFormula(ScAddress(5, 14, 0), 
u"=XLOOKUP(E15;A$2:A$11;B$2:B$11;;3)"_ustr,
formula::FormulaGr

core.git: include/sfx2 sw/qa sw/source sw/uiconfig

2024-06-20 Thread Balazs Varga (via logerrit)
 include/sfx2/AccessibilityIssue.hxx  |1 
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx |   26 +-
 sw/source/core/access/AccessibilityCheck.cxx |6 +-
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx|   35 ++
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx|   15 +++---
 sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui   |   36 +--
 6 files changed, 83 insertions(+), 36 deletions(-)

New commits:
commit e74a5bea04483dc96ef6d4b34edd8735ec73bcd8
Author: Balazs Varga 
AuthorDate: Tue Jun 18 16:15:06 2024 +0200
Commit: Balazs Varga 
CommitDate: Thu Jun 20 10:59:18 2024 +0200

tdf#159906 - A11Y: Add new direct character formatting group level

for Formatted warnings and keep them not expanded (default) to avoid
to many visible warning message on the sidebar.

Change-Id: Ic251909d793198c3c4ce5e132b763c15ac1c9a9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169110
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
Reviewed-by: Heiko Tietze 

diff --git a/include/sfx2/AccessibilityIssue.hxx 
b/include/sfx2/AccessibilityIssue.hxx
index 92bef3d7d6a2..d6dd7eb3f4bf 100644
--- a/include/sfx2/AccessibilityIssue.hxx
+++ b/include/sfx2/AccessibilityIssue.hxx
@@ -33,6 +33,7 @@ enum class AccessibilityIssueID
 NO_ALT_SHAPE,
 TABLE_MERGE_SPLIT,
 TEXT_FORMATTING,
+DIRECT_FORMATTING,
 TABLE_FORMATTING,
 HYPERLINK_IS_TEXT,
 HYPERLINK_SHORT,
diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx 
b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
index 8c3845332310..d3355bcfdd43 100644
--- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
+++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
@@ -69,7 +69,7 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckParagraphIssues)
 aCheck.check();
 auto& aIssues = aCheck.getIssueCollection().getIssues();
 CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size());
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[0]->m_eIssueID);
 }
 
 CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckBackgroundImage)
@@ -143,7 +143,7 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckHighlightedText)
 aCheck.check();
 auto& aIssues = aCheck.getIssueCollection().getIssues();
 CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size());
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[0]->m_eIssueID);
 }
 
 CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testNumberingCheck)
@@ -315,8 +315,8 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testOnlineNodeSplitAppend)
  
pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues());
 auto aIssues = scanAccessibilityIssuesOnNodes(pDoc);
 CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size());
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[1]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[1]->m_eIssueID);
 checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9));
 checkIssuePosition(aIssues[1], __LINE__, 33, 136, SwNodeOffset(9));
 
@@ -334,8 +334,8 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testOnlineNodeSplitAppend)
 
 aIssues = scanAccessibilityIssuesOnNodes(pDoc);
 CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size());
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[1]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DIRECT_FORMATTING, 
aIssues[1]->m_eIssueID);
 checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9));
 checkIssuePosition(aIssues[1], __LINE__, 0, 103, SwNodeOffset(10));
 
@@ -354,9 +354,9 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testOnlineNodeSplitAppend)
  
pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues());
 aIssues = scanAccessibilityIssuesOnNodes(pDoc);
 CPPUNIT_ASSERT_EQUAL(size_t(3), aIssues.size());
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[1]->m_eIssueID);
-CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[2]->m_eIssueID);
+CPPUNIT_ASSERT_E

core.git: sc/qa sc/source

2024-06-11 Thread Balazs Varga (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/let.fods |  408 ++--
 sc/source/core/tool/interpr1.cxx|   50 +-
 2 files changed, 321 insertions(+), 137 deletions(-)

New commits:
commit 5c9040c16506d5ef2708416ea280d97b707092b4
Author: Balazs Varga 
AuthorDate: Tue Jun 11 09:30:35 2024 +0200
Commit: Balazs Varga 
CommitDate: Tue Jun 11 12:23:56 2024 +0200

tdf#161496 - Fix single ocPush tokens in LET function Name values

If the Name - Name Value pairs contains already an ocPush result
no need to interpret, so the Calculation parameter can reuse it.

Change-Id: I55465d674eb31aea7c3123c889250c9fa127f1fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168661
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/let.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/let.fods
index 05cf82e93053..9e13c4556ed3 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/let.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/let.fods
@@ -1,7 +1,7 @@
 
 
 http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns
 :css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2024-01-16T18:30:06.27800PT7H26M30S110LibreOfficeDev/24.8.0.0.alpha1$Windows_X86_64
 
LibreOffice_project/a5610e052c7d070eb220dab40083edc311eea1482024-06-09T18:41:03.90300
+ 
2024-01-16T18:30:06.27800PT7H29M10S111LibreOfficeDev/24.8.0.0.alpha1$Windows_X86_64
 
LibreOffice_project/38dff367d75365eb75c80c73385ec818f9a5aabd2024-06-11T09:22:21.07200
  
   
0
@@ -14,7 +14,7 @@
  
   
2
-   3
+   1
2
0
0
@@ -30,8 +30,8 @@
false
   
   
-   9
-   32
+   7
+   47
2
0
0
@@ -48,7 +48,7 @@
   
  
  Sheet1
- 1851
+ 2495
  0
  75
  60
@@ -3039,28 +3039,33 @@
   

   
-  
+  


   
-  
+  



   
-  
+  



   
-  
+  





   
-  
+  
+   
+   
+   
+  
+  



@@ -3068,47 +3073,42 @@


   
-  
+  



   
-  
+  


   
-  
-   
-   
-   
-  
-  
+  


   
-  
+  



   
-  
+  



   
-  
+  





   
-  
+  



   
-  
+  



@@ -3116,12 +3116,12 @@


   
-  
+  



   
-  
+  


   
@@ -3142,7 +3142,7 @@
   
   
   
-  
+  



@@ -3204,7 +3204,7 @@
  
???(???)
 
 
- .00.00, 00:00:00
+ .00.00, 00:00:00
 


@@ -3221,10 +3221,10 @@


 
-
+
 
 
- 
+ 
   LET Function
  
  
@@ -3236,10 +3236,10 @@
  
 
 
- 
+ 
   Result
  
- 
+ 
   IGAZ
  
  
@@ -3248,13 +3248,13 @@
  
 
 
- 
+ 
   Sheet
  
- 
+ 
   Res

core.git: Branch 'libreoffice-24-2' - sc/qa sc/source

2024-06-11 Thread Balazs Varga (via logerrit)
 sc/qa/uitest/autofilter2/tdf161457.py  |   42 +
 sc/qa/uitest/data/autofilter/tdf161457.ods |binary
 sc/source/core/tool/typedstrdata.cxx   |8 ++---
 3 files changed, 46 insertions(+), 4 deletions(-)

New commits:
commit d23246f1a284f4d4f2c10af60e77ce1a424fd599
Author: Balazs Varga 
AuthorDate: Sun Jun 9 19:00:53 2024 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jun 11 11:39:10 2024 +0200

tdf#161457 - Fix autofilter result is wrong when cells contain

formatted rounded values.

Filtered formatted values were not sorted with the rounded values
but with the original values and the duplicated values caused wrong
filter results.

Regression from commit: 2d1df9f3dccc10f13b8585ad18afce1542ebc4d1
(tdf#117276 sc: Show hidden filter elements as inactive elements)

Change-Id: I7540ba5fa98e6bbe0b014448bf2449432261d542
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168592
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
(cherry picked from commit db153afbac7acc1ae46f78beef4221e9aad07305)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168620
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/uitest/autofilter2/tdf161457.py 
b/sc/qa/uitest/autofilter2/tdf161457.py
new file mode 100644
index ..400f4df9b584
--- /dev/null
+++ b/sc/qa/uitest/autofilter2/tdf161457.py
@@ -0,0 +1,42 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+class tdf161457(UITestCase):
+
+def test_tdf161457(self):
+
+with self.ui_test.load_file(get_url_for_data_file("tdf161457.ods")) as 
calc_doc:
+
+xCalcDoc = self.xUITest.getTopFocusWindow()
+xGridWin = xCalcDoc.getChild("grid_window")
+
+# Click the autofilter dropdown in column B
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": 
"", "COL": "1", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("FilterDropDown")
+xTreeList = xCheckListMenu.getChild("check_list_box")
+
+self.assertEqual(2, len(xTreeList.getChildren()))
+
+xEntry1 = xTreeList.getChild(0)
+self.assertEqual("1.00", get_state_as_dict(xEntry1)['Text'])
+self.assertEqual("true", get_state_as_dict(xEntry1)['IsChecked'])
+self.assertEqual("false", 
get_state_as_dict(xEntry1)['IsSemiTransparent'])
+
+xEntry2 = xTreeList.getChild(1)
+self.assertEqual("5.00", get_state_as_dict(xEntry2)['Text'])
+self.assertEqual("true", get_state_as_dict(xEntry2)['IsChecked'])
+# Without the fix in place, this test would have failed with
+# AssertionError: 'true' != 'false'
+self.assertEqual("false", 
get_state_as_dict(xEntry2)['IsSemiTransparent'])
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/autofilter2/tdf46184.py 
b/sc/qa/uitest/autofilter2/tdf46184.py
old mode 100755
new mode 100644
diff --git a/sc/qa/uitest/data/autofilter/tdf161457.ods 
b/sc/qa/uitest/data/autofilter/tdf161457.ods
new file mode 100644
index ..6580b1d7daf6
Binary files /dev/null and b/sc/qa/uitest/data/autofilter/tdf161457.ods differ
diff --git a/sc/source/core/tool/typedstrdata.cxx 
b/sc/source/core/tool/typedstrdata.cxx
index 4e3f862ae3a4..14ea33ab9221 100644
--- a/sc/source/core/tool/typedstrdata.cxx
+++ b/sc/source/core/tool/typedstrdata.cxx
@@ -26,7 +26,7 @@ bool ScTypedStrData::LessCaseSensitive::operator() (const 
ScTypedStrData& left,
 
 if (left.meStrType == Value)
 {
-if (left.mfValue == right.mfValue)
+if (left.mfRoundedValue == right.mfRoundedValue)
 return left.mbIsHiddenByFilter < right.mbIsHiddenByFilter;
 return left.mfValue < right.mfValue;
 }
@@ -50,7 +50,7 @@ bool ScTypedStrData::LessSortCaseSensitive::operator() (const 
ScTypedStrData& le
 
 if (left.meStrType == Value)
 {
-if (left.mfValue == right.mfValue)
+if (left.mfRoundedValue == right.mfRoundedValue)
 return left.mbIsHiddenByFilter < right.mbIsHiddenByFilter;
 return left.mfValue < right.mfValue;
 }
@@ -73,7 +73,7 @@ bool ScTypedStrData::LessCaseInsensitive::operator() (const 
ScTypedStrData& left
 
 if (left.meStrType == Value)
 {
-if (left.mfValue == right.mfValue)
+if (left.mfRoundedValue == right.mfRoundedValue)
 return left.mbIsHiddenByFilter < right.mbIsHid

core.git: sc/qa sc/source

2024-06-10 Thread Balazs Varga (via logerrit)
 sc/qa/uitest/autofilter2/tdf161457.py  |   42 +
 sc/qa/uitest/data/autofilter/tdf161457.ods |binary
 sc/source/core/tool/typedstrdata.cxx   |8 ++---
 3 files changed, 46 insertions(+), 4 deletions(-)

New commits:
commit db153afbac7acc1ae46f78beef4221e9aad07305
Author: Balazs Varga 
AuthorDate: Sun Jun 9 19:00:53 2024 +0200
Commit: Balazs Varga 
CommitDate: Mon Jun 10 23:42:24 2024 +0200

tdf#161457 - Fix autofilter result is wrong when cells contain

formatted rounded values.

Filtered formatted values were not sorted with the rounded values
but with the original values and the duplicated values caused wrong
filter results.

Regression from commit: 2d1df9f3dccc10f13b8585ad18afce1542ebc4d1
(tdf#117276 sc: Show hidden filter elements as inactive elements)

Change-Id: I7540ba5fa98e6bbe0b014448bf2449432261d542
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168592
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/uitest/autofilter2/tdf161457.py 
b/sc/qa/uitest/autofilter2/tdf161457.py
new file mode 100644
index ..400f4df9b584
--- /dev/null
+++ b/sc/qa/uitest/autofilter2/tdf161457.py
@@ -0,0 +1,42 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+class tdf161457(UITestCase):
+
+def test_tdf161457(self):
+
+with self.ui_test.load_file(get_url_for_data_file("tdf161457.ods")) as 
calc_doc:
+
+xCalcDoc = self.xUITest.getTopFocusWindow()
+xGridWin = xCalcDoc.getChild("grid_window")
+
+# Click the autofilter dropdown in column B
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": 
"", "COL": "1", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("FilterDropDown")
+xTreeList = xCheckListMenu.getChild("check_list_box")
+
+self.assertEqual(2, len(xTreeList.getChildren()))
+
+xEntry1 = xTreeList.getChild(0)
+self.assertEqual("1.00", get_state_as_dict(xEntry1)['Text'])
+self.assertEqual("true", get_state_as_dict(xEntry1)['IsChecked'])
+self.assertEqual("false", 
get_state_as_dict(xEntry1)['IsSemiTransparent'])
+
+xEntry2 = xTreeList.getChild(1)
+self.assertEqual("5.00", get_state_as_dict(xEntry2)['Text'])
+self.assertEqual("true", get_state_as_dict(xEntry2)['IsChecked'])
+# Without the fix in place, this test would have failed with
+# AssertionError: 'true' != 'false'
+self.assertEqual("false", 
get_state_as_dict(xEntry2)['IsSemiTransparent'])
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/autofilter2/tdf46184.py 
b/sc/qa/uitest/autofilter2/tdf46184.py
old mode 100755
new mode 100644
diff --git a/sc/qa/uitest/data/autofilter/tdf161457.ods 
b/sc/qa/uitest/data/autofilter/tdf161457.ods
new file mode 100644
index ..6580b1d7daf6
Binary files /dev/null and b/sc/qa/uitest/data/autofilter/tdf161457.ods differ
diff --git a/sc/source/core/tool/typedstrdata.cxx 
b/sc/source/core/tool/typedstrdata.cxx
index 4e3f862ae3a4..14ea33ab9221 100644
--- a/sc/source/core/tool/typedstrdata.cxx
+++ b/sc/source/core/tool/typedstrdata.cxx
@@ -26,7 +26,7 @@ bool ScTypedStrData::LessCaseSensitive::operator() (const 
ScTypedStrData& left,
 
 if (left.meStrType == Value)
 {
-if (left.mfValue == right.mfValue)
+if (left.mfRoundedValue == right.mfRoundedValue)
 return left.mbIsHiddenByFilter < right.mbIsHiddenByFilter;
 return left.mfValue < right.mfValue;
 }
@@ -50,7 +50,7 @@ bool ScTypedStrData::LessSortCaseSensitive::operator() (const 
ScTypedStrData& le
 
 if (left.meStrType == Value)
 {
-if (left.mfValue == right.mfValue)
+if (left.mfRoundedValue == right.mfRoundedValue)
 return left.mbIsHiddenByFilter < right.mbIsHiddenByFilter;
 return left.mfValue < right.mfValue;
 }
@@ -73,7 +73,7 @@ bool ScTypedStrData::LessCaseInsensitive::operator() (const 
ScTypedStrData& left
 
 if (left.meStrType == Value)
 {
-if (left.mfValue == right.mfValue)
+if (left.mfRoundedValue == right.mfRoundedValue)
 return left.mbIsHiddenByFilter < right.mbIsHiddenByFilter;
 return left.mfValue < right.mfValue;
 }
@@ -97,7 +97,7 @@ bool ScTypedStrData::LessSortCaseInsensitive::operator() 
(const ScTypedStrData&
 

core.git: sc/inc sc/qa sc/source

2024-06-09 Thread Balazs Varga (via logerrit)
 sc/inc/scmatrix.hxx |2 
 sc/qa/unit/data/functions/spreadsheet/fods/let.fods |  429 +++-
 sc/source/core/tool/interpr1.cxx|   33 +
 sc/source/core/tool/interpr3.cxx|9 
 sc/source/core/tool/scmatrix.cxx|   26 +
 5 files changed, 400 insertions(+), 99 deletions(-)

New commits:
commit 5a75414d1772d1fd998f405e3b9bd80b1f10c51f
Author: Balazs Varga 
AuthorDate: Sun Jun 9 18:51:49 2024 +0200
Commit: Balazs Varga 
CommitDate: Mon Jun 10 00:01:38 2024 +0200

tdf#161454 - Fix new array functions handle empty matrix cells

Newly added calc array functions didn't handle empty matrix cells
as empty cells but they were handled as empty strings.

Change-Id: Ie24a38dd8c3f947cfe10ba05b234807891453824
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168591
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index 1594ca3bce35..2b0a6e64c32a 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -262,6 +262,8 @@ public:
 void PutString( const svl::SharedString* pArray, size_t nLen, SCSIZE nC, 
SCSIZE nR) ;
 
 SC_DLLPUBLIC void PutEmpty( SCSIZE nC, SCSIZE nR);
+void PutEmpty(SCSIZE nIndex);
+void PutEmptyTrans( SCSIZE nIndex );
 
 /// Jump sal_False without path
 void PutEmptyPath( SCSIZE nC, SCSIZE nR) ;
diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/let.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/let.fods
index 97ad8c2dbcdb..05cf82e93053 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/let.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/let.fods
@@ -1,13 +1,13 @@
 
 
 http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns
 :css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2024-01-16T18:30:06.27800PT7H19M5S109LibreOfficeDev/24.8.0.0.alpha1$Windows_X86_64
 
LibreOffice_project/9daa119fe104c852a42f00e9c8349687ccd104d22024-06-02T09:11:26.79300
+ 
2024-01-16T18:30:06.27800PT7H26M30S110LibreOfficeDev/24.8.0.0.alpha1$Windows_X86_64
 
LibreOffice_project/a5610e052c7d070eb220dab40083edc311eea1482024-06-09T18:41:03.90300
  
   
0
0
-   50916
-   21544
+   17406
+   4262

 
  view1
@@ -31,7 +31,7 @@
   
   
9
-   38
+   32
2
0
0
@@ -3023,9 +3023,6 @@
   

   
-  
-   
-  
   

   
@@ -3063,12 +3060,55 @@


   
+  
+   
+   
+   
+   
+   
+   
+  
+  
+   
+   
+   
+  
+  
+   
+   
+  
   



   
-  
+  
+   
+   
+  
+  
+   
+   
+   
+  
+  
+   
+   
+   
+  
+  
+   
+   
+   
+   
+   
+  
+  
+   
+   
+   
+  
+  



@@ -3076,12 +3116,12 @@


   
-  
+  



   
-  
+  


   
@@ -3102,7 +3142,7 @@
   
   
   
-  
+  



@@ -3114,6 +3154,14 @@


   
+  
+   
+   
+   
+   

core.git: formula/source include/formula sc/inc sc/source

2024-06-09 Thread Balazs Varga (via logerrit)
 formula/source/core/api/FormulaCompiler.cxx |8 
 formula/source/core/api/token.cxx   |4 ++--
 include/formula/tokenarray.hxx  |1 -
 sc/inc/compiler.hxx |2 +-
 sc/source/core/tool/parclass.cxx|2 +-
 sc/source/core/tool/token.cxx   |2 +-
 6 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit e52b555a1d9fb40aa923adcd73f3021c3380db84
Author: Balazs Varga 
AuthorDate: Sun Jun 9 18:03:47 2024 +0200
Commit: Caolán McNamara 
CommitDate: Sun Jun 9 22:13:24 2024 +0200

Related: tdf#137543 - fix LET function jump count number

Clean-up and fix wrong jump count.

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

diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 453c73094f54..8f0dd62d6ace 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1955,7 +1955,7 @@ void FormulaCompiler::Factor()
 pFacToken->GetJump()[ 0 ] = FORMULA_MAXJUMPCOUNT + 1;
 break;
 case ocLet:
-pFacToken->GetJump()[0] = SAL_MAX_UINT8 + 1;
+pFacToken->GetJump()[ 0 ] = FORMULA_MAXPARAMS + 1;
 break;
 case ocIfError:
 case ocIfNA:
@@ -1990,7 +1990,7 @@ void FormulaCompiler::Factor()
 nJumpMax = FORMULA_MAXJUMPCOUNT;
 break;
 case ocLet:
-nJumpMax = SAL_MAX_UINT8;
+nJumpMax = FORMULA_MAXPARAMS;
 break;
 case ocIfError:
 case ocIfNA:
@@ -2007,7 +2007,7 @@ void FormulaCompiler::Factor()
 assert(!"FormulaCompiler::Factor: someone forgot to add a 
jump max case");
 }
 short nJumpCount = 0;
-while ( (nJumpCount < (SAL_MAX_UINT8 - 1)) && (eOp == ocSep)
+while ( (nJumpCount < (FORMULA_MAXPARAMS - 1)) && (eOp == ocSep)
 && (pArr->GetCodeError() == FormulaError::NONE || 
!mbStopOnError))
 {
 if ( ++nJumpCount <= nJumpMax )
@@ -2037,7 +2037,7 @@ void FormulaCompiler::Factor()
 bLimitOk = (nJumpCount < FORMULA_MAXJUMPCOUNT);
 break;
 case ocLet:
-bLimitOk = (nJumpCount < SAL_MAX_UINT8);
+bLimitOk = (nJumpCount < FORMULA_MAXPARAMS);
 break;
 case ocIfError:
 case ocIfNA:
diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index d722d767e065..c8124672d4bf 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1584,13 +1584,13 @@ FormulaToken* FormulaTokenArray::AddOpCode( OpCode eOp )
 case ocChoose:
 case ocLet:
 {
-short nJump[SAL_MAX_UINT8 + 1];
+short nJump[FORMULA_MAXPARAMS + 1];
 if ( eOp == ocIf )
 nJump[ 0 ] = 3;
 else if ( eOp == ocChoose )
 nJump[ 0 ] = FORMULA_MAXJUMPCOUNT + 1;
 else if ( eOp == ocLet )
-nJump[0] = SAL_MAX_UINT8 + 1;
+nJump[ 0 ] = FORMULA_MAXPARAMS + 1;
 else
 nJump[ 0 ] = 2;
 pRet = new FormulaJumpToken( eOp, nJump );
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index 4e59ca8e4f02..98e1f4dbb17b 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -579,7 +579,6 @@ public:
 
 private:
 SAL_DLLPRIVATE const FormulaToken* GetNonEndOfPathToken( short nIdx ) 
const;
-SAL_DLLPRIVATE const FormulaToken* GetNonEndOfPathToken2( short nIdx ) 
const;
 };
 
 // For use in SAL_INFO, SAL_WARN etc
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index ba53dbb9cb83..7041360d69ef 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -138,7 +138,7 @@ public:
 } sharedstring;
 ScMatrix*pMat;
 FormulaError nError;
-shortnJump[ FORMULA_MAXJUMPCOUNT + 1 ]; // If/Chose token
+shortnJump[ FORMULA_MAXPARAMS + 1 ]; // If/Choose/Let token
 };
 OUString   maExternalName; // depending on the opcode, this is either the 
external, or the external name, or the external table name
 
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index d920807c5420..a38f0f7c7ef9 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -571,12 +571,12 @@ void ScParameterClassification::GenerateDocumentat

core.git: include/formula sc/inc sc/qa sc/source

2024-06-06 Thread Balazs Varga (via logerrit)
 include/formula/FormulaCompiler.hxx|5 ++
 sc/inc/compiler.hxx|3 +
 sc/qa/unit/data/xlsx/tdf137543.xlsx|binary
 sc/qa/unit/subsequent_export_test2.cxx |5 ++
 sc/source/core/tool/compiler.cxx   |   60 -
 5 files changed, 63 insertions(+), 10 deletions(-)

New commits:
commit d557d2ae8c3c259bcf01465e6380cad77ed4bdb9
Author: Balazs Varga 
AuthorDate: Thu Jun 6 17:38:39 2024 +0200
Commit: Balazs Varga 
CommitDate: Thu Jun 6 23:39:32 2024 +0200

Related: tdf#137543 - Add new LET function to Calc

Fix parsing name strings in Let function, so the invalid names
will be parsed as an ocBad - svString like before.

follow-up commit: 521a56d8d1e12b7471fda6b62b21d51776c9fbaf

Change-Id: If4645584500ffd85556695b12fa7c99eaa8f7662
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168503
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/include/formula/FormulaCompiler.hxx 
b/include/formula/FormulaCompiler.hxx
index d70dcb4c09d8..11a49f4680a0 100644
--- a/include/formula/FormulaCompiler.hxx
+++ b/include/formula/FormulaCompiler.hxx
@@ -424,7 +424,10 @@ protected:
 {
 bool bInLambdaFunction = false;
 short nBracketPos = 0;
-} mLambda;
+short nParaPos = 0;
+short nParaCount = 3; // minimum required parameter count: 3
+std::unordered_set aNameSet;
+} m_aLambda;
 
 public:
 enum InitSymbols
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index e95e5ee78e31..ba53dbb9cb83 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -331,6 +331,7 @@ private:
 
 bool   NextNewToken(bool bInArray);
 bool ToUpperAsciiOrI18nIsAscii( OUString& rUpper, const OUString& rOrg ) 
const;
+short  GetPossibleParaCount( const std::u16string_view& rLambdaFormula ) 
const;
 
 virtual void SetError(FormulaError nError) override;
 
@@ -359,7 +360,7 @@ private:
 bool ParsePredetectedErrRefReference( const OUString& rName, const 
OUString* pErrRef );
 bool ParseMacro( const OUString& );
 bool ParseNamedRange( const OUString&, bool onlyCheck = false );
-bool ParseLambdaFuncName( const OUString&, bool bLambdaFunction = false );
+bool ParseLambdaFuncName( const OUString& );
 bool ParseExternalNamedRange( const OUString& rSymbol, bool& 
rbInvalidExternalNameRange );
 bool ParseDBRange( const OUString& );
 bool ParseColRowName( const OUString& );
diff --git a/sc/qa/unit/data/xlsx/tdf137543.xlsx 
b/sc/qa/unit/data/xlsx/tdf137543.xlsx
index 16801b21a2e1..2a0854755a33 100644
Binary files a/sc/qa/unit/data/xlsx/tdf137543.xlsx and 
b/sc/qa/unit/data/xlsx/tdf137543.xlsx differ
diff --git a/sc/qa/unit/subsequent_export_test2.cxx 
b/sc/qa/unit/subsequent_export_test2.cxx
index 1ae4d22fc441..81ad2857269c 100644
--- a/sc/qa/unit/subsequent_export_test2.cxx
+++ b/sc/qa/unit/subsequent_export_test2.cxx
@@ -1323,6 +1323,11 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf137543XLSX)
 assertXPathContent(
 pSheet, "/x:worksheet/x:sheetData/x:row/x:c/x:f"_ostr,
 
u"_xlfn.LET(_xlpm.first,15,_xlpm.second,10,SUM(_xlpm.first,_xlpm.second))"_ustr);
+
+// test with an unknown (for Calc) function inside the LET function
+assertXPathContent(
+pSheet, "/x:worksheet/x:sheetData/x:row[3]/x:c[5]/x:f"_ostr,
+u"_xlfn.LET(_xlpm.first,B5:E15,_xlfn.chooserows(_xlpm.first, 1, 3, 5, 
7, 9, 11))"_ustr);
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 98a91f133674..738ed67fc9b9 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3653,13 +3653,22 @@ bool ScCompiler::ParseNamedRange( const OUString& 
rUpperName, bool onlyCheck )
 return false;
 }
 
-bool ScCompiler::ParseLambdaFuncName( const OUString& aOrg, bool 
bLambdaFunction )
+bool ScCompiler::ParseLambdaFuncName( const OUString& aOrg )
 {
-if (bLambdaFunction && !aOrg.isEmpty())
+if (m_aLambda.bInLambdaFunction && !aOrg.isEmpty())
 {
 OUString aName = aOrg;
 if (aOrg.startsWithIgnoreAsciiCase(u"_xlpm."))
 aName = aName.copy(6);
+
+if (m_aLambda.nParaPos % 2 == 1 && m_aLambda.nParaCount > 
m_aLambda.nParaPos)
+m_aLambda.aNameSet.insert(aName);
+else
+{
+// should already exist the name
+if (m_aLambda.aNameSet.find(aName) == m_aLambda.aNameSet.end())
+return false;
+}
 svl::SharedString aSS = rDoc.GetSharedStringPool().intern(aName);
 maRawToken.SetStringName(aSS.getData(), aSS.getDataIgnoreCase());
 return true;
@@ -4362,6 +4371,36 @@ bool ScCompiler::ToUpperAsciiOrI18nIsAscii( OUString& 
rUpper, const OUString& rO
 }
 }
 
+short ScCompiler::GetPossibleParaCount( const std::u16string_view& 
rLambdaFormula ) const
+{
+sal_Unicode cSep = mxSymbols->getSymbolChar(ocSep);
+sal_Unicod

core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source

2024-06-06 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc   |8 
 formula/source/core/api/FormulaCompiler.cxx |   26 
 formula/source/core/api/token.cxx   |   25 
 formula/source/ui/dlg/parawin.cxx   |9 
 include/formula/FormulaCompiler.hxx |7 
 include/formula/compiler.hxx|2 
 include/formula/opcode.hxx  |4 
 include/formula/tokenarray.hxx  |3 
 sc/README.md|2 
 sc/inc/compiler.hxx |3 
 sc/inc/helpids.h|1 
 sc/inc/scfuncs.hrc  |   12 
 sc/qa/extras/scfunctionlistobj.cxx  |2 
 sc/qa/unit/data/functions/spreadsheet/fods/let.fods | 4308 
 sc/qa/unit/data/xlsx/tdf137543.xlsx |binary
 sc/qa/unit/subsequent_export_test2.cxx  |   14 
 sc/qa/unit/ucalc.cxx|1 
 sc/source/core/data/funcdesc.cxx|5 
 sc/source/core/inc/interpre.hxx |8 
 sc/source/core/tool/compiler.cxx|   40 
 sc/source/core/tool/interpr1.cxx|  147 
 sc/source/core/tool/interpr4.cxx|1 
 sc/source/core/tool/parclass.cxx|3 
 sc/source/core/tool/token.cxx   |   16 
 sc/source/filter/excel/xlformula.cxx|3 
 sc/source/filter/oox/formulabase.cxx|1 
 26 files changed, 4641 insertions(+), 10 deletions(-)

New commits:
commit 521a56d8d1e12b7471fda6b62b21d51776c9fbaf
Author: Balazs Varga 
AuthorDate: Thu May 30 18:43:09 2024 +0200
Commit: Balazs Varga 
CommitDate: Thu Jun 6 09:09:47 2024 +0200

tdf#137543 - Add new LET function to Calc

Add new LET function to Calc which assigns names to calculation results.

TODO: oasis proposal

Change-Id: Ia0d56a30751a44a72e364a28b64fd8f617e997dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168349
Tested-by: Gabor Kelemen 
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 081f71b56772..45e0aa62507d 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -282,6 +282,8 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "COM.MICROSOFT.SORT" , SC_OPCODE_SORT },
 { "COM.MICROSOFT.SORTBY" , SC_OPCODE_SORTBY },
 { "COM.MICROSOFT.UNIQUE" , SC_OPCODE_UNIQUE },
+{ "COM.MICROSOFT.LET" , SC_OPCODE_LET },
+{ "_xlpm." , SC_OPCODE_STRINGNAME },
 { "ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for 
range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -737,6 +739,8 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "_xlfn._xlws.SORT" , SC_OPCODE_SORT },
 { "_xlfn.SORTBY" , SC_OPCODE_SORTBY },
 { "_xlfn.UNIQUE" , SC_OPCODE_UNIQUE },
+{ "_xlfn.LET" , SC_OPCODE_LET },
+{ "_xlpm." , SC_OPCODE_STRINGNAME },
 { "_xlfn.ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy 
for range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1195,6 +1199,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "SORT" , SC_OPCODE_SORT },
 { "SORTBY" , SC_OPCODE_SORTBY },
 { "UNIQUE" , SC_OPCODE_UNIQUE },
+{ "LET" , SC_OPCODE_LET },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1654,6 +1659,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "SORT" , SC_OPCODE_SORT },
 { "SORTBY" , SC_OPCODE_SORTBY },
 { "UNIQUE" , SC_OPCODE_UNIQUE },
+{ "LET" , SC_OPCODE_LET },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },  // ?? first character = I ??
@@ -2111,6 +2117,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "SORT" , SC_OPCODE_SORT },
 { "SORTBY" , SC_OPCODE_SORTBY },
 { "UNIQUE" , SC_OPCODE_UNIQUE },
+{ "LET" , SC_OPCODE_LET },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -2549,6 +2556,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SORT") , SC_OPCODE_SORT },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SORTBY") , SC_OPCODE_SORTBY },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "UNIQUE") , SC_OPCODE_UNIQUE },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "LET") , SC_OPCODE_LET },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MULTIRANGE") , SC_OPCODE_MULTI_AREA 
}, // legacy for range list (union)
 { NC_("RID_STRLI

core.git: sc/inc sc/qa sc/source

2024-06-04 Thread Balazs Varga (via logerrit)
 sc/inc/scfuncs.hrc  |8 
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  395 ++--
 sc/source/core/tool/interpr1.cxx|7 
 3 files changed, 181 insertions(+), 229 deletions(-)

New commits:
commit c9245c153d349ee414fdd4f878fd10cbd8471cff
Author: Balazs Varga 
AuthorDate: Mon Jun 3 12:46:03 2024 +0200
Commit: Balazs Varga 
CommitDate: Tue Jun 4 12:09:46 2024 +0200

Related: tdf#128425 tdf#127293 - Extend function wizard description

about match_mode and search_mode options.

Also do not allow wildcard match mode with binary search mode
as it was decided at the odf meetings.

Change-Id: Iadc1b6735ae62bb07675a664d9954ebc27519691
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168366
Reviewed-by: Balazs Varga 
Tested-by: Jenkins

diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc
index 79348fed8e39..9f8cce9b0090 100644
--- a/sc/inc/scfuncs.hrc
+++ b/sc/inc/scfuncs.hrc
@@ -3390,9 +3390,9 @@ const TranslateId SC_OPCODE_X_LOOKUP_ARY[] =
 NC_("SC_OPCODE_X_LOOKUP", "Result if not found"),
 NC_("SC_OPCODE_X_LOOKUP", "If given, return given text, otherwise return 
#N/A."),
 NC_("SC_OPCODE_X_LOOKUP", "Match Mode"),
-NC_("SC_OPCODE_X_LOOKUP", "0, -1, 1 or 2 "), // TODO : add explanation of 
values
+NC_("SC_OPCODE_X_LOOKUP", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard or regular expression match."),
 NC_("SC_OPCODE_X_LOOKUP", "Search Mode"),
-NC_("SC_OPCODE_X_LOOKUP", "1, -1, 2 or -2 ") // TODO : add explanation of 
values
+NC_("SC_OPCODE_X_LOOKUP", "1 - Search from the first value (default).
-1 - Search from the last value (reverse).
2 - Binary search values sorted in ascending order.
-2 - Binary search values sorted in descending order.")
 };
 
 // -=*# Resource for function INDEX #*=-
@@ -3452,9 +3452,9 @@ const TranslateId SC_OPCODE_X_MATCH_ARY[] =
 NC_("SC_OPCODE_X_MATCH", "Search Array"),
 NC_("SC_OPCODE_X_MATCH", "The array or range to search."),
 NC_("SC_OPCODE_X_MATCH", "Match Mode"),
-NC_("SC_OPCODE_X_MATCH", "0, -1, 1 or 2 "), // TODO : add explanation of 
values
+NC_("SC_OPCODE_X_MATCH", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard or regular expression match."),
 NC_("SC_OPCODE_X_MATCH", "Search Mode"),
-NC_("SC_OPCODE_X_MATCH", "1, -1, 2 or -2 ") // TODO : add explanation of 
values
+NC_("SC_OPCODE_X_MATCH", "1 - Search from the first value (default).
-1 - Search from the last value (reverse).
2 - Binary search values sorted in ascending order.
-2 - Binary search values sorted in descending order.")
 };
 
 // -=*# Resource for function OFFSET #*=-
diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
index 102182932041..633153fd5b40 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
@@ -1,7 +1,7 @@
 
 
 http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xsd="h

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

2024-05-21 Thread Balazs Varga (via logerrit)
 sc/inc/queryiter.hxx|   32 
 sc/inc/rangecache.hxx   |   19 
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  607 ++--
 sc/source/core/data/queryiter.cxx   |  428 ---
 sc/source/core/tool/interpr1.cxx|   41 -
 sc/source/core/tool/rangecache.cxx  |  172 ++--
 6 files changed, 914 insertions(+), 385 deletions(-)

New commits:
commit 18ca62ab83a93dd7616c7e5204d3ddce525120b8
Author: Balazs Varga 
AuthorDate: Fri Apr 26 16:27:43 2024 +0200
Commit: Michael Meeks 
CommitDate: Wed May 22 08:15:48 2024 +0200

Related: tdf#160725 - Add horizontal binary search mode for SortedCache

and ScSortedRangeCache classes to support binary search mode in case of
different columns. Which is used by the new XLOOKUP function from now on
in case of binary search mode.

Conflicts:
sc/source/core/data/queryiter.cxx
sc/source/core/tool/rangecache.cxx

Change-Id: Ibb2ae33670cbe9b47110de57afb6376cd829b465
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166758
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
(cherry picked from commit 85f733a9242339d8e92f992ff1ad6d1b99d3f383)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167915
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/sc/inc/queryiter.hxx b/sc/inc/queryiter.hxx
index 571b90a17475..ef84420431f2 100644
--- a/sc/inc/queryiter.hxx
+++ b/sc/inc/queryiter.hxx
@@ -89,9 +89,9 @@ protected:
 SCROW   nRow;
 
 class NonEmptyCellIndexer;
-typedef std::pair BinarySearchCellType;
-static NonEmptyCellIndexer MakeBinarySearchIndexer(const 
sc::CellStoreType& rCells,
-SCROW nStartRow, SCROW nEndRow);
+typedef std::pair BinarySearchCellType;
+static NonEmptyCellIndexer MakeBinarySearchIndexer(const 
sc::CellStoreType* pCells,
+SCCOLROW nStartRow, SCCOLROW nEndRow);
 };
 
 // The implementation using ScSortedRangeCache, which allows sorted iteration
@@ -108,6 +108,7 @@ protected:
 const ScQueryParam& rParam, bool bReverseSearch );
 void InitPosStart(sal_uInt8 nSortedBinarySearch = 0x00);
 void InitPosFinish( SCROW beforeRow, SCROW lastRow, bool bFirstMatch );
+void InitPosColFinish( SCCOL beforeCol, SCCOL lastCol, bool bFirstMatch );
 void IncPos() { IncPosImpl(); }
 bool IncPosFast() { return IncPosImpl(); }
 void IncBlock() { IncPos(); } // Cannot skip entire block, not linear.
@@ -133,9 +134,9 @@ protected:
 size_t sortedCachePosLast;
 
 class SortedCacheIndexer;
-typedef std::pair BinarySearchCellType;
-SortedCacheIndexer MakeBinarySearchIndexer(const sc::CellStoreType& rCells,
-SCROW nStartRow, SCROW nEndRow);
+typedef std::pair BinarySearchCellType;
+SortedCacheIndexer MakeBinarySearchIndexer(const sc::CellStoreType* pCells,
+SCCOLROW nStartRow, SCCOLROW nEndRow);
 };
 
 // Data and functionality for specific types of query.
@@ -210,16 +211,16 @@ protected:
 // and return if HandleItemFound() returns true.
 void PerformQuery();
 
-/* Only works if no regular expression is involved, only searches for rows 
in one column,
-   and only the first query entry is considered with simple conditions 
SC_LESS,SC_LESS_EQUAL,
-   SC_EQUAL (sorted ascending) or SC_GREATER,SC_GREATER_EQUAL (sorted 
descending). It
-   delivers a starting point set to nRow, i.e. the last row that either 
matches the searched
-   for value, or the last row that matches the condition. Continue with 
e.g. GetThis() and
-   GetNext() afterwards. Returns false if the searched for value is not in 
the search range
-   or if the range is not properly sorted, with nRow in that case set to 
the first row or after
-   the last row. In that case use GetFirst().
+/* Only works if no regular expression is involved, only searches for rows 
in one column or
+   only searches for cols in one row, and only the first query entry is 
considered with simple
+   conditions SC_LESS,SC_LESS_EQUAL, SC_EQUAL (sorted ascending) or 
SC_GREATER,SC_GREATER_EQUAL
+   (sorted descending). It delivers a starting point set to nRow/nCol, 
i.e. the last row/col that
+   either matches the searched for value, or the last row/col that matches 
the condition.
+   Continue with e.g. GetThis() and GetNext() afterwards. Returns false if 
the searched for value
+   is not in the search range or if the range is not properly sorted, with 
nRow/nCol in that case
+   set to the first row or after the last row. In that case use GetFirst().
 */
-bool BinarySearch( SCCOL col, bool forEqual = false );
+bool BinarySearch( SCCOLROW col_row, bool forEqual = false );
 
 /** If set, iterator stops on first non-matching cell
 content. May be

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

2024-05-21 Thread Balazs Varga (via logerrit)
 sc/inc/document.hxx |2 
 sc/inc/queryiter.hxx|2 
 sc/inc/rangecache.hxx   |3 
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  678 +++-
 sc/source/core/data/documen2.cxx|4 
 sc/source/core/data/queryiter.cxx   |   79 -
 sc/source/core/tool/interpr1.cxx|9 
 sc/source/core/tool/rangecache.cxx  |   43 -
 8 files changed, 384 insertions(+), 436 deletions(-)

New commits:
commit 0f9a36e514b55792d4e4cdb868a01bb7ff69498f
Author: Balazs Varga 
AuthorDate: Sun Apr 21 13:39:58 2024 +0200
Commit: Michael Meeks 
CommitDate: Wed May 22 08:14:24 2024 +0200

tdf#160725 - Fix XLOOKUP has different result for approximate

search than Excel.

Some rework for xlookup binary search in rows to get the correct results
when we are searching with binary mode in rows.

Change-Id: I7ef710c4ae638e2cf5d4bee45810cec7057f5d4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166451
Reviewed-by: Balazs Varga 
Tested-by: Jenkins
(cherry picked from commit e2c9d38d95a1a0b5cf754fb04f2fd73c6ddb8004)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167914
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 468f0571c79f..52fd5a4a509f 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1404,7 +1404,7 @@ public:
 doesn't already exist. */
 ScLookupCache & GetLookupCache( const ScRange & rRange, 
ScInterpreterContext* pContext );
 ScSortedRangeCache & GetSortedRangeCache( const ScRange & rRange, const 
ScQueryParam& param,
-  ScInterpreterContext* pContext );
+  ScInterpreterContext* pContext, 
sal_uInt8 nSortedBinarySearch = 0x00 );
 /** Only ScLookupCache dtor uses RemoveLookupCache(), do
 not use elsewhere! */
 voidRemoveLookupCache( ScLookupCache & rCache );
diff --git a/sc/inc/queryiter.hxx b/sc/inc/queryiter.hxx
index f494b83d74a5..571b90a17475 100644
--- a/sc/inc/queryiter.hxx
+++ b/sc/inc/queryiter.hxx
@@ -106,7 +106,7 @@ public:
 protected:
 ScQueryCellIteratorAccessSpecific( ScDocument& rDocument, 
ScInterpreterContext& rContext,
 const ScQueryParam& rParam, bool bReverseSearch );
-void InitPosStart();
+void InitPosStart(sal_uInt8 nSortedBinarySearch = 0x00);
 void InitPosFinish( SCROW beforeRow, SCROW lastRow, bool bFirstMatch );
 void IncPos() { IncPosImpl(); }
 bool IncPosFast() { return IncPosImpl(); }
diff --git a/sc/inc/rangecache.hxx b/sc/inc/rangecache.hxx
index c65e8653a458..bca9554a5e6a 100644
--- a/sc/inc/rangecache.hxx
+++ b/sc/inc/rangecache.hxx
@@ -46,7 +46,8 @@ class ScSortedRangeCache final : public SvtListener
 public:
 /// MUST be new'd because Notify() deletes.
 ScSortedRangeCache(ScDocument* pDoc, const ScRange& rRange, const 
ScQueryParam& param,
-   ScInterpreterContext* context, bool invalid = false);
+   ScInterpreterContext* context, bool invalid = false,
+   sal_uInt8 nSortedBinarySearch = 0x00);
 
 /// Returns if the cache is usable.
 bool isValid() const { return mValid; }
diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
index 8da1a44240bd..41a5789f73a1 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
@@ -1,7 +1,7 @@
 
 
 http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation

core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source

2024-05-15 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc  |6 
 formula/source/core/api/FormulaCompiler.cxx|1 
 include/formula/compiler.hxx   |3 
 include/formula/opcode.hxx |2 
 sc/README.md   |1 
 sc/inc/helpids.h   |1 
 sc/inc/scfuncs.hrc |   12 
 sc/qa/extras/scfunctionlistobj.cxx |2 
 sc/qa/unit/data/functions/spreadsheet/fods/unique.fods | 5082 +
 sc/qa/unit/ucalc.cxx   |1 
 sc/source/core/data/funcdesc.cxx   |1 
 sc/source/core/inc/interpre.hxx|1 
 sc/source/core/tool/interpr1.cxx   |  142 
 sc/source/core/tool/interpr4.cxx   |1 
 sc/source/core/tool/parclass.cxx   |1 
 sc/source/core/tool/token.cxx  |1 
 sc/source/filter/excel/xlformula.cxx   |3 
 sc/source/filter/oox/formulabase.cxx   |1 
 18 files changed, 5259 insertions(+), 3 deletions(-)

New commits:
commit c1565b8b94548ef85508b0302ef9299f18ff09be
Author: Balazs Varga 
AuthorDate: Fri May 10 17:06:39 2024 +0200
Commit: Balazs Varga 
CommitDate: Wed May 15 18:10:54 2024 +0200

tdf#126573 Add Excel2021 array function UNIQUE to Calc

Add new function called UNIQUE to the function list.

(TODO: dynamic array in separate patch, oasis proposal)

Change-Id: Ie138aee545995d4af1e66be5a4cf4e99e6e2f581
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167484
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 81c1e32fd38e..081f71b56772 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -281,6 +281,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "COM.MICROSOFT.FILTER" , SC_OPCODE_FILTER },
 { "COM.MICROSOFT.SORT" , SC_OPCODE_SORT },
 { "COM.MICROSOFT.SORTBY" , SC_OPCODE_SORTBY },
+{ "COM.MICROSOFT.UNIQUE" , SC_OPCODE_UNIQUE },
 { "ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for 
range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -735,6 +736,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "_xlfn._xlws.FILTER" , SC_OPCODE_FILTER },
 { "_xlfn._xlws.SORT" , SC_OPCODE_SORT },
 { "_xlfn.SORTBY" , SC_OPCODE_SORTBY },
+{ "_xlfn.UNIQUE" , SC_OPCODE_UNIQUE },
 { "_xlfn.ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy 
for range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1192,6 +1194,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "FILTER" , SC_OPCODE_FILTER },
 { "SORT" , SC_OPCODE_SORT },
 { "SORTBY" , SC_OPCODE_SORTBY },
+{ "UNIQUE" , SC_OPCODE_UNIQUE },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1650,6 +1653,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "FILTER" , SC_OPCODE_FILTER },
 { "SORT" , SC_OPCODE_SORT },
 { "SORTBY" , SC_OPCODE_SORTBY },
+{ "UNIQUE" , SC_OPCODE_UNIQUE },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },  // ?? first character = I ??
@@ -2106,6 +2110,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "FILTER" , SC_OPCODE_FILTER },
 { "SORT" , SC_OPCODE_SORT },
 { "SORTBY" , SC_OPCODE_SORTBY },
+{ "UNIQUE" , SC_OPCODE_UNIQUE },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -2543,6 +2548,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "FILTER") , SC_OPCODE_FILTER },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SORT") , SC_OPCODE_SORT },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SORTBY") , SC_OPCODE_SORTBY },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "UNIQUE") , SC_OPCODE_UNIQUE },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MULTIRANGE") , SC_OPCODE_MULTI_AREA 
}, // legacy for range list (union)
 { NC_("RID_STRLIST_FUNCTION_NAMES", "OFFSET") , SC_OPCODE_OFFSET },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "INDEX") , SC_OPCODE_INDEX }, // ?? 
first character = I ??
diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 3157e767c5aa..e10e8f6a0f95 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1237,6 +1237,7 @@ bool FormulaCompiler::IsMatrixFunction( OpCode eOpCode )
 

core.git: sc/qa sc/source

2024-05-14 Thread Balazs Varga (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods | 1116 +++--
 sc/source/core/tool/interpr1.cxx   |   19 
 2 files changed, 771 insertions(+), 364 deletions(-)

New commits:
commit 204c5e14188022f34afb05776eb20669b01ea6d4
Author: Balazs Varga 
AuthorDate: Mon May 13 14:41:46 2024 +0200
Commit: Balazs Varga 
CommitDate: Tue May 14 11:57:14 2024 +0200

tdf#160753 - sc: fix XMATCH function in search for empty cell

gave back a wrong result. With this fix the we can search for empty cells
and return as a result.

follow-up commit: 8df17c340193c89549d8c563b04d015156afa3fb
(tdf#160711 - sc fix XLOOKUP function search for empty cell)

Change-Id: I48a545125bdfa23c98a4fcb866ea782156a0b32b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167596
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods
index ff328a91275f..1bcb37925d14 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods
@@ -1,27 +1,27 @@
 
 
 http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns
 :css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2024-01-16T18:30:06.27800PT2H40M39S47LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/7bc98a8f230280ef37ba925eecd9b656bf1022302024-02-15T18:47:52.94400
+ 
2024-01-16T18:30:06.27800PT2H45M21S49LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/8c4fe90c53a6a889e5d327b1d0fff5a74ce284cb2024-05-13T14:33:55.18300
  
   
0
0
-   47322
-   15804
+   15882
+   5013

 
  view1
  
   
2
-   7
+   0
2
0
0
0
0
0
-   140
+   100
60
true
false
@@ -30,15 +30,15 @@
false
   
   
-   2
-   21
+   0
+   32
2
0
0
0
0
0
-   140
+   100
60
true
false
@@ -48,18 +48,19 @@
   
  
  Sheet1
- 1471
+ 2479
  0
- 140
+ 100
  60
  false
  true
  true
+ true
  false
  true
  12632256
- true
  1
+ true
  true
  true
  false
@@ -119,6 +120,7 @@
false
false
true
+   true
true
true
true
@@ -136,12 +138,16 @@
  
  
   
-   http://openoffice.org/2004/office"; 
xmlns:xlink="http://www.w3.org/1999/xlink"/>
+   http://openoffice.org/2004/office"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+
+   
   
  
  
   
   
+  
+  
   
  
  
@@ -264,6 +270,10 @@
.

   
+  
+   
+
+  
   

 
@@ -296,6 +306,10 @@
)

   
+  
+   
+
+  
   

 
@@ -1112,26 +1126,18 @@


   
-  
-   
-
-  
-  
-   
-
-  
-  
+ 

core.git: offapi/com oovbaapi/ooo sc/inc sc/source sc/uiconfig test/source

2024-05-13 Thread Balazs Varga (via logerrit)
 offapi/com/sun/star/sheet/TableValidation.idl  |7 
 oovbaapi/ooo/vba/excel/XValidation.idl |1 
 sc/inc/conditio.hxx|6 +++
 sc/inc/fmtuno.hxx  |1 
 sc/inc/sc.hrc  |   19 +--
 sc/source/core/data/conditio.cxx   |   26 ++-
 sc/source/core/data/validat.cxx|2 +
 sc/source/filter/xml/XMLStylesExportHelper.cxx |9 -
 sc/source/filter/xml/XMLStylesExportHelper.hxx |1 
 sc/source/filter/xml/xmlcelli.cxx  |1 
 sc/source/filter/xml/xmlcvali.cxx  |7 
 sc/source/filter/xml/xmlimprt.hxx  |1 
 sc/source/ui/dbgui/validate.cxx|   10 +
 sc/source/ui/inc/validate.hxx  |1 
 sc/source/ui/unoobj/fmtuno.cxx |6 +++
 sc/source/ui/vba/vbavalidation.cxx |   18 ++
 sc/source/ui/vba/vbavalidation.hxx |2 +
 sc/source/ui/view/cellsh2.cxx  |6 +++
 sc/uiconfig/scalc/ui/validationcriteriapage.ui |   42 +++--
 test/source/sheet/tablevalidation.cxx  |   10 +
 20 files changed, 148 insertions(+), 28 deletions(-)

New commits:
commit b3a9032378528a691bc97b71a7464712e18c8f4e
Author: Balazs Varga 
AuthorDate: Tue May 7 14:28:05 2024 +0200
Commit: Balazs Varga 
CommitDate: Mon May 13 17:20:20 2024 +0200

tdf#157657 - sc: add option to make data validity case-sensitive

Add option to check data validity with case sensitive and case
insensitive. The default set would remain the original case insensitive
mode for data validity.

Change-Id: Ic4fe56e2b31b7fc348b742f3b95fb44cd35bc49d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167280
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/offapi/com/sun/star/sheet/TableValidation.idl 
b/offapi/com/sun/star/sheet/TableValidation.idl
index 0f0c7cccff66..2358c9a07e13 100644
--- a/offapi/com/sun/star/sheet/TableValidation.idl
+++ b/offapi/com/sun/star/sheet/TableValidation.idl
@@ -99,6 +99,13 @@ published service TableValidation
  */
 [optional,property] short ShowList;
 
+
+/** specifies if validation is case sensitive.
+
+   @since LibreOffice 24.8
+ */
+[optional, property] boolean IsCaseSensitive;
+
 };
 
 
diff --git a/oovbaapi/ooo/vba/excel/XValidation.idl 
b/oovbaapi/ooo/vba/excel/XValidation.idl
index 082f498ab7f5..ba84cbd7c8a9 100644
--- a/oovbaapi/ooo/vba/excel/XValidation.idl
+++ b/oovbaapi/ooo/vba/excel/XValidation.idl
@@ -38,6 +38,7 @@ interface XValidation
 [attribute, readonly] string Formula1;
 [attribute, readonly] string Formula2;
 [attribute, readonly] long Type;
+[attribute] boolean CaseSensitive;
 void Delete();
 void Add( [in] any Type, [in] any AlertStyle, [in] any Operator, [in] any 
Formula1, [in] any Formula2);
 };
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 430858122a75..24c42ffbe703 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -56,6 +56,7 @@ struct RefUpdateMoveTabContext;
 
 //  nOptions Flags
 #define SC_COND_NOBLANKS1
+#define SC_COND_CASESENS2
 
 enum class ScConditionMode
 {
@@ -369,8 +370,13 @@ public:
 
 ScConditionMode GetOperation() const{ return eOp; }
 void SetOperation(ScConditionMode eMode);
+
 boolIsIgnoreBlank() const   { return ( nOptions & 
SC_COND_NOBLANKS ) == 0; }
 SC_DLLPUBLIC void SetIgnoreBlank(bool bSet);
+
+boolIsCaseSensitive() const { return ( nOptions & 
SC_COND_CASESENS ) != 0; }
+SC_DLLPUBLIC void SetCaseSensitive(bool bSet);
+
 const OUString& GetSrcString() const { return aSrcString; }
 const ScAddress& GetSrcPos() const   { return aSrcPos; }
 
diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx
index 3796e820c075..91e3b66db020 100644
--- a/sc/inc/fmtuno.hxx
+++ b/sc/inc/fmtuno.hxx
@@ -168,6 +168,7 @@ private:
 OUStringaPosString; // formula position as text
 sal_uInt16  nValMode;   // enum ScValidationMode
 boolbIgnoreBlank;
+boolbCaseSensitive;
 sal_Int16   nShowList;
 boolbShowInput;
 OUStringaInputTitle;
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 54d4c0b5a0e2..9ef248660d7e 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -576,15 +576,16 @@ static_assert(SID_PREVIEW_END < SID_KEYFUNC_START, "calc 
slots ids trampling inf
 #define FID_VALID_VALUE1TypedWhichId(SID_NEW_SLOTS+62)
 #define FID_VALID_VALUE2TypedWhichId(SID_NEW_SLOTS+63)
 #define FID_VALID_BLANK TypedWhichId(SID_NEW_SLOTS+64)
-#define FID_VALID_SHOWHELP  TypedWhichId(SID_NEW_SLOTS+65)
-#define FID_VALID_HELPTITLE TypedWhichId(SID_NEW_SLOTS+66)
-#define FID_VALID_HELPTEXT  TypedWhichId(SID_NEW_SLOTS+67)
-#define FID

core.git: Branch 'feature/cib_contract49c' - 2 commits - chart2/qa chart2/source oox/source xmloff/source

2024-05-09 Thread Balazs Varga (via logerrit)
 chart2/qa/extras/chart2export3.cxx  |  138 +++-
 chart2/qa/extras/data/ods/tdf39052.ods  |binary
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx   |   46 +---
 chart2/source/controller/main/ChartController_Tools.cxx |6 
 chart2/source/controller/main/ControllerCommandDispatch.cxx |3 
 chart2/source/model/main/Title.cxx  |3 
 oox/source/export/chartexport.cxx   |   12 -
 xmloff/source/chart/SchXMLAxisContext.cxx   |   22 -
 xmloff/source/chart/SchXMLChartContext.cxx  |   39 ---
 xmloff/source/chart/SchXMLChartContext.hxx  |6 
 xmloff/source/chart/SchXMLExport.cxx|   77 +++---
 xmloff/source/chart/SchXMLParagraphContext.cxx  |  131 +++
 xmloff/source/chart/SchXMLParagraphContext.hxx  |   44 +++
 xmloff/source/chart/SchXMLTools.cxx |   92 
 xmloff/source/chart/SchXMLTools.hxx |4 
 xmloff/source/chart/transporttypes.hxx  |2 
 16 files changed, 496 insertions(+), 129 deletions(-)

New commits:
commit 0ddf1d301e8e6e8a406ad170417e12d2af84ed43
Author: Balazs Varga 
AuthorDate: Wed May 8 17:22:24 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Thu May 9 21:47:42 2024 +0200

tdf#58038 - chart: make available format characters toolbar for

text boxes or shapes *inside* charts (as created with the Drawing toolbar).

follow-up commit: 4f994cec388377cc5c2bddb804bd92eb4cd7dc8d
(tdf#39052 - Chart: make characters formatable in editable chart textshapes)

Change-Id: Iccc5ee350ea0a37d8bda9652e09d3d61339f1d71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167366
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/controller/main/ChartController_Tools.cxx 
b/chart2/source/controller/main/ChartController_Tools.cxx
index 67ceaa1764c7..6363970553db 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -591,9 +591,9 @@ bool ChartController::isShapeContext() const
 
 bool ChartController::IsTextEdit() const
 {
-// only Title objects are editable textshapes
-return m_aSelection.isTitleObjectSelected() &&
-m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit();
+// only Title objects and additional shapes are editable textshapes in 
chart
+return m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit() &&
+(m_aSelection.isTitleObjectSelected() || 
m_aSelection.isAdditionalShapeSelected());
 }
 
 void ChartController::impl_ClearSelection()
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx 
b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index cf305ea66d64..95cf433f3e04 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -601,7 +601,8 @@ void ControllerCommandDispatch::updateCommandAvailability()
 // format objects
 bool bFormatObjectAvailable = bIsWritable && bControllerStateIsValid && 
m_apControllerState->bIsFormateableObjectSelected;
 m_aCommandAvailability[ ".uno:FormatSelection" ] = bFormatObjectAvailable 
&& !bIsTextEdit;
-m_aCommandAvailability[ ".uno:FontDialog" ] = bFormatObjectAvailable && 
bIsTextEdit;
+m_aCommandAvailability[ ".uno:FontDialog" ] = (bShapeContext ? 
isShapeControllerCommandAvailable(".uno:FontDialog") :
+   bFormatObjectAvailable) && 
bIsTextEdit;
 m_aCommandAvailability[ ".uno:FormatAxis" ] = bFormatObjectAvailable;
 m_aCommandAvailability[ ".uno:FormatTitle" ] = bFormatObjectAvailable && 
!bIsTextEdit;
 m_aCommandAvailability[ ".uno:FormatDataSeries" ] = bFormatObjectAvailable;
commit bb16f920b5e16ca7d2601190a7e2b534a2dfa1a5
Author: Balazs Varga 
AuthorDate: Mon Apr 15 13:39:03 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Thu May 9 21:41:41 2024 +0200

tdf#160517 - chart odf: import/export formatted chart titles

(main, sub, axis titles) texts properly to/from odf format.

Fix odf export of formatted chart titles. The exported data structure
will look like:



This
 is
.
.
.
3
 a 



Fix import of formatted chart titles. Put the properties and related texts
into the chart2::XFormattedString2 uno objects.

Follow-up commit of:
55e9a27afd2d6a13cf76b39641bf121c3ec4b45c
Related: tdf#39052 - chart ooxml: export formatted chart titles

4f994cec388377cc5c2bddb804bd92eb4cd7dc8d
tdf#39052 - Chart: make characters formatable in editable chart textshapes

--
TODO: chart data point / dataseries labels are handled di

core.git: chart2/source

2024-05-09 Thread Balazs Varga (via logerrit)
 chart2/source/controller/main/ChartController_Tools.cxx |6 +++---
 chart2/source/controller/main/ControllerCommandDispatch.cxx |3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 654150ffd05f43813332eedb969ab07fffa51b21
Author: Balazs Varga 
AuthorDate: Wed May 8 17:22:24 2024 +0200
Commit: Balazs Varga 
CommitDate: Thu May 9 09:54:53 2024 +0200

tdf#58038 - chart: make available format characters toolbar for

text boxes or shapes *inside* charts (as created with the Drawing toolbar).

follow-up commit: 4f994cec388377cc5c2bddb804bd92eb4cd7dc8d
(tdf#39052 - Chart: make characters formatable in editable chart textshapes)

Change-Id: Iccc5ee350ea0a37d8bda9652e09d3d61339f1d71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167366
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/controller/main/ChartController_Tools.cxx 
b/chart2/source/controller/main/ChartController_Tools.cxx
index 67ea64a11fb9..ded134db24c6 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -582,9 +582,9 @@ bool ChartController::isShapeContext() const
 
 bool ChartController::IsTextEdit() const
 {
-// only Title objects are editable textshapes
-return m_aSelection.isTitleObjectSelected() &&
-m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit();
+// only Title objects and additional shapes are editable textshapes in 
chart
+return m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit() &&
+(m_aSelection.isTitleObjectSelected() || 
m_aSelection.isAdditionalShapeSelected());
 }
 
 void ChartController::impl_ClearSelection()
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx 
b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 787968b3f13b..ee9d7d480de3 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -599,7 +599,8 @@ void ControllerCommandDispatch::updateCommandAvailability()
 // format objects
 bool bFormatObjectAvailable = bIsWritable && bControllerStateIsValid && 
m_apControllerState->bIsFormateableObjectSelected;
 m_aCommandAvailability[ u".uno:FormatSelection"_ustr ] = 
bFormatObjectAvailable && !bIsTextEdit;
-m_aCommandAvailability[ u".uno:FontDialog"_ustr ] = bFormatObjectAvailable 
&& bIsTextEdit;
+m_aCommandAvailability[ u".uno:FontDialog"_ustr ] = (bShapeContext ? 
isShapeControllerCommandAvailable(u".uno:FontDialog"_ustr) :
+bFormatObjectAvailable) && bIsTextEdit;
 m_aCommandAvailability[ u".uno:FormatAxis"_ustr ] = bFormatObjectAvailable;
 m_aCommandAvailability[ u".uno:FormatTitle"_ustr ] = 
bFormatObjectAvailable && !bIsTextEdit;
 m_aCommandAvailability[ u".uno:FormatDataSeries"_ustr ] = 
bFormatObjectAvailable;


core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source

2024-05-08 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc |6 
 formula/source/core/api/FormulaCompiler.cxx   |3 
 include/formula/compiler.hxx  |3 
 include/formula/opcode.hxx|2 
 sc/README.md  |1 
 sc/inc/helpids.h  |1 
 sc/inc/scfuncs.hrc|   16 
 sc/qa/extras/scfunctionlistobj.cxx|2 
 sc/qa/unit/data/functions/spreadsheet/fods/randarray.fods | 4106 ++
 sc/qa/unit/ucalc.cxx  |1 
 sc/source/core/data/funcdesc.cxx  |1 
 sc/source/core/inc/interpre.hxx   |2 
 sc/source/core/tool/interpr1.cxx  |   81 
 sc/source/core/tool/interpr4.cxx  |   10 
 sc/source/core/tool/parclass.cxx  |1 
 sc/source/core/tool/token.cxx |1 
 sc/source/filter/excel/xlformula.cxx  |3 
 sc/source/filter/oox/formulabase.cxx  |1 
 18 files changed, 4237 insertions(+), 4 deletions(-)

New commits:
commit d68f2394afc3372d867ea6157123e51b278ba81b
Author: Balazs Varga 
AuthorDate: Thu May 2 11:03:37 2024 +0200
Commit: Balazs Varga 
CommitDate: Wed May 8 17:45:36 2024 +0200

tdf#126573 Add Excel2021 array function RANDARRAY to Calc

Add new function called RANDARRAY to the function list.

(TODO: dynamic array in separate patch, oasis proposal)

Change-Id: I34bad3b7e8d631d649a0350d7c1170b26161331d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167003
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index ec1f81699e7f..81c1e32fd38e 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -475,6 +475,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "ORG.LIBREOFFICE.FOURIER", SC_OPCODE_FOURIER },
 { "ORG.LIBREOFFICE.RAND.NV" , SC_OPCODE_RANDOM_NV },
 { "ORG.LIBREOFFICE.RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
+{ "COM.MICROSOFT.RANDARRAY" , SC_OPCODE_RANDARRAY },
 { nullptr,  -1 }
 };
 
@@ -927,6 +928,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "_xlfn.ORG.LIBREOFFICE.FOURIER", SC_OPCODE_FOURIER },
 { "_xlfn.ORG.LIBREOFFICE.RAND.NV" , SC_OPCODE_RANDOM_NV },
 { "_xlfn.ORG.LIBREOFFICE.RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
+{ "_xlfn.RANDARRAY" , SC_OPCODE_RANDARRAY },
 { nullptr,  -1 }
 };
 
@@ -1384,6 +1386,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "FOURIER", SC_OPCODE_FOURIER },
 { "RAND.NV" , SC_OPCODE_RANDOM_NV },
 { "RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
+{ "RANDARRAY" , SC_OPCODE_RANDARRAY },
 { nullptr, -1 }
 };
 
@@ -1840,6 +1843,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "FOURIER", SC_OPCODE_FOURIER },
 { "RAND.NV" , SC_OPCODE_RANDOM_NV },
 { "RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
+{ "RANDARRAY" , SC_OPCODE_RANDARRAY },
 { nullptr, -1 }
 };
 
@@ -2295,6 +2299,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "FOURIER", SC_OPCODE_FOURIER },
 { "RAND.NV" , SC_OPCODE_RANDOM_NV },
 { "RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
+{ "RANDARRAY" , SC_OPCODE_RANDARRAY },
 { nullptr, -1 }
 };
 
@@ -2747,6 +2752,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "FOURIER"), SC_OPCODE_FOURIER },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "RAND.NV"), SC_OPCODE_RANDOM_NV },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "RANDBETWEEN.NV"), 
SC_OPCODE_RANDBETWEEN_NV },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "RANDARRAY"), SC_OPCODE_RANDARRAY },
 
 { {}, -1 }
 };
diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 0f75df5cc184..3157e767c5aa 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1171,6 +1171,8 @@ bool FormulaCompiler::IsOpCodeVolatile( OpCode eOp )
 case ocOffset:
 // ocDebugVar shows internal value that may change as the internal 
state changes.
 case ocDebugVar:
+// ocRandArray is a volatile function.
+case ocRandArray:
 bRet = true;
 break;
 default:
@@ -1234,6 +1236,7 @@ bool FormulaCompiler::IsMatrixFunction( OpCode eOpCode )
 case ocFilter :
 case ocSort :
 case ocSortBy :
+case ocRandArray :
 return true;
 default:
 {
diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx
index 3bb1ccdce126..4fe03f59cf95 100644

core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source

2024-05-07 Thread Balazs Varga (via logerrit)
 sfx2/source/dialog/backingwindow.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 1e3d7374a2e70c56d082954d9ecad718b01c27fb
Author: Balazs Varga 
AuthorDate: Tue May 7 10:03:53 2024 +0200
Commit: Balazs Varga 
CommitDate: Tue May 7 17:08:49 2024 +0200

tdf#160961: hide open remote file button from startcenter if the

.uno:OpenRemote command is not available (e.g disabled in a config file).
We also hide the Open remote file (and other) buttons in the Menubar
if they are settled to disable.

cherry-picked from commit: 2fdcdad742bc26be509dde53f061f96a9620fd0a

Change-Id: I413e2c381ad5651c2cbef728bc5568fdcd746e9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167263
Tested-by: allotropia jenkins 
Reviewed-by: Balazs Varga 

diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index e4059d50c275..41998fbfa8bd 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -239,7 +240,14 @@ void BackingWindow::initControls()
 mpLocalView->ShowTooltips( true );
 
 setupButton( mpOpenButton );
-setupButton( mpRemoteButton );
+
+// Hide OpenRemote button on startpage if the OpenRemote uno command is 
not available
+SvtCommandOptions aCmdOptions;
+if (aCmdOptions.Lookup(SvtCommandOptions::CMDOPTION_DISABLED, 
"OpenRemote"))
+mpRemoteButton->Hide();
+else
+setupButton( mpRemoteButton );
+
 setupButton( mpRecentButton );
 setupButton( mpTemplateButton );
 setupButton( mpWriterAllButton );


core.git: sc/qa

2024-05-07 Thread Balazs Varga (via logerrit)
 sc/qa/unit/ucalc_formula2.cxx |   48 ++
 1 file changed, 48 insertions(+)

New commits:
commit 0ca20dca3349daa303b89251443f550491968a39
Author: Balazs Varga 
AuthorDate: Fri May 3 23:17:45 2024 +0200
Commit: Balazs Varga 
CommitDate: Tue May 7 13:14:03 2024 +0200

Related: tdf#127293 Add unit test for xlookup regex search mode

Add unit test for regex search mode in case of xlookup.

Follow-up commit: 51abf44808c6793a184e986b62c0786753e11ded
(Related: tdf#127293 Fix regex search mode in XLOOKUP wildcards mode)

Change-Id: Id23c340ab6735c2c40defc8d231dc3da18c8694e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167192
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/ucalc_formula2.cxx b/sc/qa/unit/ucalc_formula2.cxx
index 180f283323ca..70f945a4ca5c 100644
--- a/sc/qa/unit/ucalc_formula2.cxx
+++ b/sc/qa/unit/ucalc_formula2.cxx
@@ -4640,6 +4640,54 @@ CPPUNIT_TEST_FIXTURE(TestFormula2, 
testFormulaAfterDeleteRows)
 ASSERT_DOUBLES_EQUAL_MESSAGE("Wrong value at A4", 3.0, 
m_pDoc->GetValue(aPos));
 }
 
+CPPUNIT_TEST_FIXTURE(TestFormula2, testRegexForXLOOKUP)
+{
+sc::AutoCalcSwitch aACSwitch(*m_pDoc, true);
+
+// Temporarily switch regex search mode.
+bool bOldWildCard = false;
+ScDocOptions aDocOpt = m_pDoc->GetDocOptions();
+if (!aDocOpt.IsFormulaRegexEnabled())
+{
+aDocOpt.SetFormulaRegexEnabled(true);
+m_pDoc->SetDocOptions(aDocOpt);
+bOldWildCard = true;
+}
+
+m_pDoc->InsertTab(0, "Test1");
+
+std::vector> aData = { { "Element", "Relative 
Atomic Mass" },
+{ "Hydrogen", "1.008" },
+{ "Helium", "4.003" },
+{ "Lithium", "6.94" },
+{ "Beryllium", "9.012" },
+{ "Boron", "10.81" },
+{ "Carbon", "12.011" },
+{ "Nitrogen", "14.007" },
+{ "Oxygen", "15.999" },
+{ "Florine", "18.998" },
+{ "Neon", "20.18" } };
+
+insertRangeData(m_pDoc, ScAddress(0, 0, 0), aData); // A1:B11
+m_pDoc->SetString(4, 14, 0, "^bo.*"); // E15 - search regex string
+
+m_pDoc->SetFormula(ScAddress(5, 14, 0), 
"=XLOOKUP(E15;A$2:A$11;B$2:B$11;;2)",
+   formula::FormulaGrammar::GRAM_NATIVE_UI); // F15
+
+// Without the fix in place, this test would have failed with
+// - Expected: 10.81
+// - Actual  : 0
+CPPUNIT_ASSERT_EQUAL(10.81, m_pDoc->GetValue(5, 14, 0));
+
+// Switch back to wildcard mode if necessary.
+if (bOldWildCard)
+{
+aDocOpt.SetFormulaWildcardsEnabled(true);
+m_pDoc->SetDocOptions(aDocOpt);
+}
+m_pDoc->DeleteTab(0);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


core.git: sfx2/source

2024-05-06 Thread Balazs Varga (via logerrit)
 sfx2/source/dialog/backingwindow.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 2fdcdad742bc26be509dde53f061f96a9620fd0a
Author: Balazs Varga 
AuthorDate: Fri May 3 11:10:57 2024 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon May 6 21:56:58 2024 +0200

tdf#160961: hide open remote file button from startcenter if the

.uno:OpenRemote command is not available (e.g disabled in a config file).
We also hide the Open remote file (and other) buttons in the Menubar
if they are settled to disable.

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

diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index efa18f452d51..b1eb7a31f7e9 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -28,6 +28,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -307,7 +308,14 @@ void BackingWindow::initControls()
 mxExtensionsButton->connect_clicked(LINK(this, BackingWindow, 
ExtLinkClickHdl));
 
 mxOpenButton->connect_clicked(LINK(this, BackingWindow, ClickHdl));
-mxRemoteButton->connect_clicked(LINK(this, BackingWindow, ClickHdl));
+
+// Hide OpenRemote button on startpage if the OpenRemote uno command is 
not available
+SvtCommandOptions aCmdOptions;
+if (SvtCommandOptions().HasEntriesDisabled() && 
aCmdOptions.LookupDisabled("OpenRemote"))
+mxRemoteButton->set_visible(false);
+else
+mxRemoteButton->connect_clicked(LINK(this, BackingWindow, ClickHdl));
+
 mxWriterAllButton->connect_clicked(LINK(this, BackingWindow, ClickHdl));
 mxDrawAllButton->connect_clicked(LINK(this, BackingWindow, ClickHdl));
 mxCalcAllButton->connect_clicked(LINK(this, BackingWindow, ClickHdl));


core.git: sc/inc sc/qa sc/source

2024-05-01 Thread Balazs Varga (via logerrit)
 sc/inc/queryiter.hxx|   32 
 sc/inc/rangecache.hxx   |   19 
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  607 ++--
 sc/source/core/data/queryiter.cxx   |  428 ---
 sc/source/core/tool/interpr1.cxx|   41 -
 sc/source/core/tool/rangecache.cxx  |  171 ++--
 6 files changed, 913 insertions(+), 385 deletions(-)

New commits:
commit 85f733a9242339d8e92f992ff1ad6d1b99d3f383
Author: Balazs Varga 
AuthorDate: Fri Apr 26 16:27:43 2024 +0200
Commit: Balazs Varga 
CommitDate: Wed May 1 20:32:17 2024 +0200

Related: tdf#160725 - Add horizontal binary search mode for SortedCache

and ScSortedRangeCache classes to support binary search mode in case of
different columns. Which is used by the new XLOOKUP function from now on
in case of binary search mode.

Change-Id: Ibb2ae33670cbe9b47110de57afb6376cd829b465
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166758
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/inc/queryiter.hxx b/sc/inc/queryiter.hxx
index c6cd1906a4fb..9d0ab1cc6aea 100644
--- a/sc/inc/queryiter.hxx
+++ b/sc/inc/queryiter.hxx
@@ -86,9 +86,9 @@ protected:
 SCROW   nRow;
 
 class NonEmptyCellIndexer;
-typedef std::pair BinarySearchCellType;
-static NonEmptyCellIndexer MakeBinarySearchIndexer(const 
sc::CellStoreType& rCells,
-SCROW nStartRow, SCROW nEndRow);
+typedef std::pair BinarySearchCellType;
+static NonEmptyCellIndexer MakeBinarySearchIndexer(const 
sc::CellStoreType* pCells,
+SCCOLROW nStartRow, SCCOLROW nEndRow);
 };
 
 // The implementation using ScSortedRangeCache, which allows sorted iteration
@@ -105,6 +105,7 @@ protected:
 const ScQueryParam& rParam, bool bReverseSearch );
 void InitPosStart(sal_uInt8 nSortedBinarySearch = 0x00);
 void InitPosFinish( SCROW beforeRow, SCROW lastRow, bool bFirstMatch );
+void InitPosColFinish( SCCOL beforeCol, SCCOL lastCol, bool bFirstMatch );
 void IncPos() { IncPosImpl(); }
 bool IncPosFast() { return IncPosImpl(); }
 void IncBlock() { IncPos(); } // Cannot skip entire block, not linear.
@@ -130,9 +131,9 @@ protected:
 size_t sortedCachePosLast;
 
 class SortedCacheIndexer;
-typedef std::pair BinarySearchCellType;
-SortedCacheIndexer MakeBinarySearchIndexer(const sc::CellStoreType& rCells,
-SCROW nStartRow, SCROW nEndRow);
+typedef std::pair BinarySearchCellType;
+SortedCacheIndexer MakeBinarySearchIndexer(const sc::CellStoreType* pCells,
+SCCOLROW nStartRow, SCCOLROW nEndRow);
 };
 
 // Data and functionality for specific types of query.
@@ -207,16 +208,16 @@ protected:
 // and return if HandleItemFound() returns true.
 void PerformQuery();
 
-/* Only works if no regular expression is involved, only searches for rows 
in one column,
-   and only the first query entry is considered with simple conditions 
SC_LESS,SC_LESS_EQUAL,
-   SC_EQUAL (sorted ascending) or SC_GREATER,SC_GREATER_EQUAL (sorted 
descending). It
-   delivers a starting point set to nRow, i.e. the last row that either 
matches the searched
-   for value, or the last row that matches the condition. Continue with 
e.g. GetThis() and
-   GetNext() afterwards. Returns false if the searched for value is not in 
the search range
-   or if the range is not properly sorted, with nRow in that case set to 
the first row or after
-   the last row. In that case use GetFirst().
+/* Only works if no regular expression is involved, only searches for rows 
in one column or
+   only searches for cols in one row, and only the first query entry is 
considered with simple
+   conditions SC_LESS,SC_LESS_EQUAL, SC_EQUAL (sorted ascending) or 
SC_GREATER,SC_GREATER_EQUAL
+   (sorted descending). It delivers a starting point set to nRow/nCol, 
i.e. the last row/col that
+   either matches the searched for value, or the last row/col that matches 
the condition.
+   Continue with e.g. GetThis() and GetNext() afterwards. Returns false if 
the searched for value
+   is not in the search range or if the range is not properly sorted, with 
nRow/nCol in that case
+   set to the first row or after the last row. In that case use GetFirst().
 */
-bool BinarySearch( SCCOL col, bool forEqual = false );
+bool BinarySearch( SCCOLROW col_row, bool forEqual = false );
 
 /** If set, iterator stops on first non-matching cell
 content. May be used in SC_LESS_EQUAL queries where a
@@ -266,6 +267,7 @@ public:
 voidSetAdvanceQueryParamEntryField( bool bVal )
 { bAdvanceQuery = bVal; }
 voidAdvanceQueryParamEntryField();
+voidAdvanceQueryParamEntryFieldForBinarySearch();
 
 void   

core.git: sc/inc sc/qa sc/source

2024-04-30 Thread Balazs Varga (via logerrit)
 sc/inc/document.hxx |2 
 sc/inc/queryiter.hxx|2 
 sc/inc/rangecache.hxx   |3 
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  678 +++-
 sc/source/core/data/documen2.cxx|4 
 sc/source/core/data/queryiter.cxx   |   79 -
 sc/source/core/tool/interpr1.cxx|9 
 sc/source/core/tool/rangecache.cxx  |   43 -
 8 files changed, 384 insertions(+), 436 deletions(-)

New commits:
commit e2c9d38d95a1a0b5cf754fb04f2fd73c6ddb8004
Author: Balazs Varga 
AuthorDate: Sun Apr 21 13:39:58 2024 +0200
Commit: Balazs Varga 
CommitDate: Tue Apr 30 23:32:49 2024 +0200

tdf#160725 - Fix XLOOKUP has different result for approximate

search than Excel.

Some rework for xlookup binary search in rows to get the correct results
when we are searching with binary mode in rows.

Change-Id: I7ef710c4ae638e2cf5d4bee45810cec7057f5d4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166451
Reviewed-by: Balazs Varga 
Tested-by: Jenkins

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index d9c3f1866947..4dbce67d2928 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1413,7 +1413,7 @@ public:
 doesn't already exist. */
 ScLookupCache & GetLookupCache( const ScRange & rRange, 
ScInterpreterContext* pContext );
 ScSortedRangeCache & GetSortedRangeCache( const ScRange & rRange, const 
ScQueryParam& param,
-  ScInterpreterContext* pContext );
+  ScInterpreterContext* pContext, 
sal_uInt8 nSortedBinarySearch = 0x00 );
 /** Only ScLookupCache dtor uses RemoveLookupCache(), do
 not use elsewhere! */
 voidRemoveLookupCache( ScLookupCache & rCache );
diff --git a/sc/inc/queryiter.hxx b/sc/inc/queryiter.hxx
index 2d54b40c469c..c6cd1906a4fb 100644
--- a/sc/inc/queryiter.hxx
+++ b/sc/inc/queryiter.hxx
@@ -103,7 +103,7 @@ public:
 protected:
 ScQueryCellIteratorAccessSpecific( ScDocument& rDocument, 
ScInterpreterContext& rContext,
 const ScQueryParam& rParam, bool bReverseSearch );
-void InitPosStart();
+void InitPosStart(sal_uInt8 nSortedBinarySearch = 0x00);
 void InitPosFinish( SCROW beforeRow, SCROW lastRow, bool bFirstMatch );
 void IncPos() { IncPosImpl(); }
 bool IncPosFast() { return IncPosImpl(); }
diff --git a/sc/inc/rangecache.hxx b/sc/inc/rangecache.hxx
index c65e8653a458..bca9554a5e6a 100644
--- a/sc/inc/rangecache.hxx
+++ b/sc/inc/rangecache.hxx
@@ -46,7 +46,8 @@ class ScSortedRangeCache final : public SvtListener
 public:
 /// MUST be new'd because Notify() deletes.
 ScSortedRangeCache(ScDocument* pDoc, const ScRange& rRange, const 
ScQueryParam& param,
-   ScInterpreterContext* context, bool invalid = false);
+   ScInterpreterContext* context, bool invalid = false,
+   sal_uInt8 nSortedBinarySearch = 0x00);
 
 /// Returns if the cache is usable.
 bool isValid() const { return mValid; }
diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
index 8da1a44240bd..41a5789f73a1 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
@@ -1,7 +1,7 @@
 
 
 http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:nam

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

2024-04-30 Thread Balazs Varga (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  364 +++-
 sc/source/core/inc/interpre.hxx |1 
 sc/source/core/tool/interpr1.cxx|   16 
 3 files changed, 365 insertions(+), 16 deletions(-)

New commits:
commit 25bbee11492fdbf5cf403a2e9a6d36e8444acb38
Author: Balazs Varga 
AuthorDate: Thu Apr 18 19:35:42 2024 +0200
Commit: Aron Budea 
CommitDate: Tue Apr 30 15:46:41 2024 +0200

tdf#160711 - sc fix XLOOKUP function search for empty cell

Make XLOOKUP function able to search for empty cells.

Change-Id: Iefa71b938fe658a59d52e0bf605dbef7a62742c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166263
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
(cherry picked from commit 8df17c340193c89549d8c563b04d015156afa3fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166929
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
index f6cfb74b24c5..8da1a44240bd 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
@@ -1,7 +1,7 @@
 
 
 http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns
 :css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2024-01-16T18:30:06.27800PT1H22M11S26LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/3f63df475b9c7039d93d0d66c74c4d0ad79894862024-02-27T14:15:45.12500
+ 
2024-01-16T18:30:06.27800PT1H51M16S29LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/24914caa6013b41b6614710322a3084cf4a2aa102024-04-18T19:16:45.85500
  
   
0
@@ -14,7 +14,7 @@
  
   
2
-   4
+   0
2
0
0
@@ -31,12 +31,12 @@
   
   
0
-   128
+   133
2
0
0
0
-   46
+   90
0
65
60
@@ -48,7 +48,7 @@
   
  
  Sheet1
- 2479
+ 1677
  0
  65
  60
@@ -1353,6 +1353,194 @@


   
+  
+   
+Ft
+  
+  
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   
+   -
+   
+Ft
+   
+  
+  
+   
+   
+  
+  
+   -
+   
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   -
+   
+   
+   
+  
+  
+   
+   
+  
+  
+   -
+   
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   -
+   
+   
+   
+  
+  
+
+
+   
+
+  
+  
+   -
+
+   
+
+  
+  
+
+
+   - 
+  
+  
+
+   
+
+   
+   
+   
+  
+  
+
+
+   
+Ft 
+  
+  
+   -
+
+   
+Ft 
+  
+  
+
+
+   - Ft 
+  
+  
+
+   
+
+   
+   
+   
+  
+  
+
+
+   
+
+  
+  
+   -
+
+  

core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source

2024-04-26 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc|6 
 formula/source/core/api/FormulaCompiler.cxx  |1 
 include/formula/compiler.hxx |3 
 include/formula/opcode.hxx   |2 
 sc/README.md |1 
 sc/inc/helpids.h |1 
 sc/inc/scfuncs.hrc   |   14 
 sc/qa/extras/scfunctionlistobj.cxx   |2 
 sc/qa/unit/data/functions/spreadsheet/fods/sequence.fods | 4231 +++
 sc/qa/unit/ucalc.cxx |1 
 sc/source/core/data/funcdesc.cxx |1 
 sc/source/core/inc/interpre.hxx  |1 
 sc/source/core/tool/interpr4.cxx |1 
 sc/source/core/tool/interpr5.cxx |   61 
 sc/source/core/tool/parclass.cxx |1 
 sc/source/core/tool/token.cxx|1 
 sc/source/filter/excel/xlformula.cxx |3 
 sc/source/filter/oox/formulabase.cxx |3 
 18 files changed, 4330 insertions(+), 4 deletions(-)

New commits:
commit 35772a003bb30be61f8ba8abe805455e41db0e1e
Author: Balazs Varga 
AuthorDate: Wed Apr 17 17:12:37 2024 +0200
Commit: Balazs Varga 
CommitDate: Fri Apr 26 09:33:23 2024 +0200

tdf#126573 Add Excel2021 array function SEQUENCE to Calc

Add new function called SEQUENCE to the function list.

(TODO: dynamic array in separate patch, oasis proposal)

Change-Id: I9fa6f2c83536536987542cc00a9eec5c196ada8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166245
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 82d3a52c98e8..ec1f81699e7f 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -315,6 +315,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "MDETERM" , SC_OPCODE_MAT_DET },
 { "MINVERSE" , SC_OPCODE_MAT_INV },
 { "MMULT" , SC_OPCODE_MAT_MULT },
+{ "COM.MICROSOFT.SEQUENCE" , SC_OPCODE_MAT_SEQUENCE },
 { "TRANSPOSE" , SC_OPCODE_MAT_TRANS },
 { "MUNIT" , SC_OPCODE_MATRIX_UNIT },
 { "ORG.OPENOFFICE.GOALSEEK" , SC_OPCODE_BACK_SOLVER },
@@ -767,6 +768,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "MDETERM" , SC_OPCODE_MAT_DET },
 { "MINVERSE" , SC_OPCODE_MAT_INV },
 { "MMULT" , SC_OPCODE_MAT_MULT },
+{ "_xlfn.SEQUENCE" , SC_OPCODE_MAT_SEQUENCE },
 { "TRANSPOSE" , SC_OPCODE_MAT_TRANS },
 { "_xlfn.MUNIT" , SC_OPCODE_MATRIX_UNIT },
 { "_xlfn.ORG.OPENOFFICE.GOALSEEK" , SC_OPCODE_BACK_SOLVER },
@@ -1222,6 +1224,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "MDETERM" , SC_OPCODE_MAT_DET },
 { "MINVERSE" , SC_OPCODE_MAT_INV },
 { "MMULT" , SC_OPCODE_MAT_MULT },
+{ "SEQUENCE" , SC_OPCODE_MAT_SEQUENCE },
 { "TRANSPOSE" , SC_OPCODE_MAT_TRANS },
 { "MUNIT" , SC_OPCODE_MATRIX_UNIT },
 { "GOALSEEK" , SC_OPCODE_BACK_SOLVER },
@@ -1678,6 +1681,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "MDETERM" , SC_OPCODE_MAT_DET },
 { "MINVERSE" , SC_OPCODE_MAT_INV },
 { "MMULT" , SC_OPCODE_MAT_MULT },
+{ "SEQUENCE" , SC_OPCODE_MAT_SEQUENCE },
 { "TRANSPOSE" , SC_OPCODE_MAT_TRANS },
 { "MUNIT" , SC_OPCODE_MATRIX_UNIT },
 { "GOALSEEK" , SC_OPCODE_BACK_SOLVER },
@@ -2132,6 +2136,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "MDETERM" , SC_OPCODE_MAT_DET },
 { "MINVERSE" , SC_OPCODE_MAT_INV },
 { "MMULT" , SC_OPCODE_MAT_MULT },
+{ "SEQUENCE" , SC_OPCODE_MAT_SEQUENCE },
 { "TRANSPOSE" , SC_OPCODE_MAT_TRANS },
 { "MUNIT" , SC_OPCODE_MATRIX_UNIT },
 { "GOALSEEK" , SC_OPCODE_BACK_SOLVER },
@@ -2565,6 +2570,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MDETERM") , SC_OPCODE_MAT_DET },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MINVERSE") , SC_OPCODE_MAT_INV },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MMULT") , SC_OPCODE_MAT_MULT },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "SEQUENCE") , SC_OPCODE_MAT_SEQUENCE },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "TRANSPOSE") , SC_OPCODE_MAT_TRANS },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MUNIT") , SC_OPCODE_MATRIX_UNIT },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "GOALSEEK") , SC_OPCODE_BACK_SOLVER },
diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 278628cbd648..0f75df5cc184 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1224,6 +1224,7 @@ bool FormulaCompiler::IsMatrixFunction( OpCode eOpCode )
 case ocLogest :
 case ocLinest :
 case o

core.git: sc/qa sc/source

2024-04-19 Thread Balazs Varga (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  364 +++-
 sc/source/core/inc/interpre.hxx |1 
 sc/source/core/tool/interpr1.cxx|   16 
 3 files changed, 365 insertions(+), 16 deletions(-)

New commits:
commit 8df17c340193c89549d8c563b04d015156afa3fb
Author: Balazs Varga 
AuthorDate: Thu Apr 18 19:35:42 2024 +0200
Commit: Balazs Varga 
CommitDate: Fri Apr 19 09:19:37 2024 +0200

tdf#160711 - sc fix XLOOKUP function search for empty cell

Make XLOOKUP function able to search for empty cells.

Change-Id: Iefa71b938fe658a59d52e0bf605dbef7a62742c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166263
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
index f6cfb74b24c5..8da1a44240bd 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
@@ -1,7 +1,7 @@
 
 
 http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns
 :css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2024-01-16T18:30:06.27800PT1H22M11S26LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/3f63df475b9c7039d93d0d66c74c4d0ad79894862024-02-27T14:15:45.12500
+ 
2024-01-16T18:30:06.27800PT1H51M16S29LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/24914caa6013b41b6614710322a3084cf4a2aa102024-04-18T19:16:45.85500
  
   
0
@@ -14,7 +14,7 @@
  
   
2
-   4
+   0
2
0
0
@@ -31,12 +31,12 @@
   
   
0
-   128
+   133
2
0
0
0
-   46
+   90
0
65
60
@@ -48,7 +48,7 @@
   
  
  Sheet1
- 2479
+ 1677
  0
  65
  60
@@ -1353,6 +1353,194 @@


   
+  
+   
+Ft
+  
+  
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   
+   -
+   
+Ft
+   
+  
+  
+   
+   
+  
+  
+   -
+   
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   -
+   
+   
+   
+  
+  
+   
+   
+  
+  
+   -
+   
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   -
+   
+   
+   
+  
+  
+
+
+   
+
+  
+  
+   -
+
+   
+
+  
+  
+
+
+   - 
+  
+  
+
+   
+
+   
+   
+   
+  
+  
+
+
+   
+Ft 
+  
+  
+   -
+
+   
+Ft 
+  
+  
+
+
+   - Ft 
+  
+  
+
+   
+
+   
+   
+   
+  
+  
+
+
+   
+
+  
+  
+   -
+
+   
+
+  
+  
+
+
+   -
+   
+
+  
+  
+
+   
+
+   
+   
+   
+  
+  
+
+
+   
+Ft 
+  
+  
+   -
+
+   
+Ft 
+  
+  
+
+
+   -
+   
+Ft 
+  

core.git: chart2/qa chart2/source oox/source xmloff/source

2024-04-18 Thread Balazs Varga (via logerrit)
 chart2/qa/extras/chart2export3.cxx|  138 +-
 chart2/qa/extras/data/ods/tdf39052.ods|binary
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx |   46 +---
 chart2/source/model/main/Title.cxx|3 
 oox/source/export/chartexport.cxx |   12 -
 xmloff/source/chart/SchXMLAxisContext.cxx |   22 --
 xmloff/source/chart/SchXMLChartContext.cxx|   39 ---
 xmloff/source/chart/SchXMLChartContext.hxx|6 
 xmloff/source/chart/SchXMLExport.cxx  |   77 ---
 xmloff/source/chart/SchXMLParagraphContext.cxx|  131 +
 xmloff/source/chart/SchXMLParagraphContext.hxx|   44 
 xmloff/source/chart/SchXMLTools.cxx   |   92 +
 xmloff/source/chart/SchXMLTools.hxx   |4 
 xmloff/source/chart/transporttypes.hxx|2 
 14 files changed, 491 insertions(+), 125 deletions(-)

New commits:
commit d7214aba95bbdcbd40e87ef50fc66f2e2ec4f5ff
Author: Balazs Varga 
AuthorDate: Mon Apr 15 13:39:03 2024 +0200
Commit: Balazs Varga 
CommitDate: Thu Apr 18 18:07:57 2024 +0200

tdf#160517 - chart odf: import/export formatted chart titles

(main, sub, axis titles) texts properly to/from odf format.

Fix odf export of formatted chart titles. The exported data structure
will look like:



This
 is
.
.
.
3
 a 



Fix import of formatted chart titles. Put the properties and related texts
into the chart2::XFormattedString2 uno objects.

Follow-up commit of:
55e9a27afd2d6a13cf76b39641bf121c3ec4b45c
Related: tdf#39052 - chart ooxml: export formatted chart titles

4f994cec388377cc5c2bddb804bd92eb4cd7dc8d
tdf#39052 - Chart: make characters formatable in editable chart textshapes

--
TODO: chart data point / dataseries labels are handled differently
since those are not editable objects, but that is a completily different
issue.
--

Change-Id: I1842f2c69c132bdf578bb2d354f451cc9d49c63c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166122
Reviewed-by: Michael Stahl 
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/qa/extras/chart2export3.cxx 
b/chart2/qa/extras/chart2export3.cxx
index 3d05495eff40..df96a70e8e1f 100644
--- a/chart2/qa/extras/chart2export3.cxx
+++ b/chart2/qa/extras/chart2export3.cxx
@@ -10,6 +10,9 @@
 #include "charttest.hxx"
 
 #include 
+#include 
+#include 
+#include 
 
 using uno::Reference;
 using beans::XPropertySet;
@@ -432,11 +435,17 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartSubTitle)
 xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
 CPPUNIT_ASSERT(pXmlDoc);
 // test properties of subtitle
+// paragraph props
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, 
"1100");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, 
"1");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr"_ostr,
 "val"_ostr, "00a933");
+// run props
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "sz"_ostr, 
"1100");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "b"_ostr, "1");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:solidFill/a:srgbClr"_ostr,
 "val"_ostr, "00a933");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin"_ostr, 
"typeface"_ostr, "Times New Roman");
+// text
 assertXPathContent(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t"_ostr, "It is a 
Subtitle");
+// shape props
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, 
"b2b2b2");
 }
 
@@ -447,13 +456,19 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, 
testChartMainWithSubTitle)
 xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
 CPPUNIT_ASSERT(pXmlDoc);
 // test properties of title
+// paragraph props
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, 
"sz"_ostr, "1300");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, 
"b"_ostr, "0");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, 
"i"_ostr, "1");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr/a:solidFill/a:srgbClr"_ostr,
 "val"_ostr, "f10d0c");
+// run props
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a

core.git: sc/source

2024-04-12 Thread Balazs Varga (via logerrit)
 sc/source/core/tool/interpr1.cxx |9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

New commits:
commit 51abf44808c6793a184e986b62c0786753e11ded
Author: Balazs Varga 
AuthorDate: Thu Apr 11 21:49:21 2024 +0200
Commit: Balazs Varga 
CommitDate: Fri Apr 12 10:22:59 2024 +0200

Related: tdf#127293 Fix regex search mode in XLOOKUP wildcards mode

If relevant Option in Calc was set for regex, xlookup still used the
wildcard search mode.

Change-Id: I318c3f368b6f59644c43ec518542910be72a5e0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166015
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 8ea81b336641..6f3c3304e627 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -11455,14 +11455,7 @@ bool ScInterpreter::SearchVectorForValue( 
VectorSearchArguments& vsa )
 if ( mrDoc.IsInVBAMode() )
 rParam.eSearchType = 
utl::SearchParam::SearchType::Wildcard;
 else
-{
-// set searchtype hard to wildcard or regexp if 
applicable, the XLOOKUP
-// argument prevails over the configuration setting
-if ( MayBeWildcard( vsa.sSearchStr.getString() ) )
-rParam.eSearchType = 
utl::SearchParam::SearchType::Wildcard;
-else if ( MayBeRegExp( vsa.sSearchStr.getString() ) )
-rParam.eSearchType = 
utl::SearchParam::SearchType::Regexp;
-}
+rParam.eSearchType = 
DetectSearchType(vsa.sSearchStr.getString(), mrDoc);
 }
 }
 else


core.git: Branch 'feature/cib_contract49' - sc/qa sc/source

2024-04-11 Thread Balazs Varga (via logerrit)
 sc/qa/unit/ucalc_formula.cxx |2 +-
 sc/source/core/tool/compiler.cxx |9 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit e0123fd7bacf426dba74279a4b0c81a45d76c48f
Author: Balazs Varga 
AuthorDate: Wed Apr 10 17:48:20 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Fri Apr 12 00:53:26 2024 +0200

tdf#160616 - Fix SUMPRODUCT calculation is broken in some cases

Double refs with operators only trimmable in case of one root paramater.

Follow up of: ba0ec4a5d2b025b675410cd18890d1cca3bc5a2f

Change-Id: If61fb39696d9539ffc9d32a6ecad79bfa1bf92e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165957
Tested-by: Gabor Kelemen 
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 
(cherry picked from commit 2af433f11cf24db655677bdf26e39fabaf3611fc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165932
Tested-by: allotropia jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 153096d6a434..feb0e8fef22a 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -1464,7 +1464,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, 
testFormulaAnnotateTrimOnDoubleRefs)
 
 {
 "=SUMPRODUCT(A:A=$C$1; 1-(A:A=$C$1))",
-ScRange(0, 0, 0, 0, 1048575, 0),
+ScRange(-1, -1, -1, -1, -1, -1), // Has no trimmable 
double-ref.
 0.0,
 false// Not in matrix mode.
 },
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 13fed4ac95b3..3ad360120da5 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -6476,6 +6476,8 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 
 // OpCode of the "root" operator (which is already in RPN array).
 OpCode eOpCode = (*(pCode - 1))->GetOpCode();
+// Param number of the "root" operator (which is already in RPN array).
+sal_uInt8 nRootParam = (*(pCode - 1))->GetByte();
 // eOpCode can be some operator which does not change with operands with 
or contains zero values.
 if (eOpCode == ocSum)
 {
@@ -6568,7 +6570,8 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 // such that one of the operands of ocEqual is a double-ref.
 // Examples of formula that matches this are:
 //   SUMPRODUCT(IF($A:$A=$L12;$D:$D*G:G))
-// Also in case of DoubleRef arguments around other Binary operators 
can be trimmable:
+// Also in case of DoubleRef arguments around other Binary operators 
can be trimmable inside one parameter
+// of the root operator:
 //   SUMPRODUCT(($D:$D>M47:M47)*($D:$DIsInForceArray())
+// tdf#160616: Double refs with these operators only
+// trimmable in case of one paramater
+if (!pTok->IsInForceArray() || nRootParam > 1)
 break;
 FormulaToken* pLHS = *(ppTok - 1);
 FormulaToken* pRHS = *(ppTok - 2);


core.git: sc/qa sc/source

2024-04-11 Thread Balazs Varga (via logerrit)
 sc/qa/unit/ucalc_formula.cxx |2 +-
 sc/source/core/tool/compiler.cxx |9 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 969ddf72824942be9755a8d14482d6549a2231ce
Author: Balazs Varga 
AuthorDate: Wed Apr 10 17:48:20 2024 +0100
Commit: Gabor Kelemen 
CommitDate: Thu Apr 11 16:12:58 2024 +0200

tdf#160616 - Fix SUMPRODUCT calculation is broken in some cases

Double refs with operators only trimmable in case of one root paramater.

Follow up of: ba0ec4a5d2b025b675410cd18890d1cca3bc5a2f

Change-Id: If61fb39696d9539ffc9d32a6ecad79bfa1bf92e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165957
Tested-by: Gabor Kelemen 
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index adbc9c121042..105c7e4a772d 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -1464,7 +1464,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, 
testFormulaAnnotateTrimOnDoubleRefs)
 
 {
 "=SUMPRODUCT(A:A=$C$1; 1-(A:A=$C$1))",
-ScRange(0, 0, 0, 0, 1048575, 0),
+ScRange(-1, -1, -1, -1, -1, -1), // Has no trimmable 
double-ref.
 0.0,
 false// Not in matrix mode.
 },
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 7b655d72c944..a0529fbe0f4e 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -6468,6 +6468,8 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 
 // OpCode of the "root" operator (which is already in RPN array).
 OpCode eOpCode = (*(pCode - 1))->GetOpCode();
+// Param number of the "root" operator (which is already in RPN array).
+sal_uInt8 nRootParam = (*(pCode - 1))->GetByte();
 // eOpCode can be some operator which does not change with operands with 
or contains zero values.
 if (eOpCode == ocSum)
 {
@@ -6560,7 +6562,8 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 // such that one of the operands of ocEqual is a double-ref.
 // Examples of formula that matches this are:
 //   SUMPRODUCT(IF($A:$A=$L12;$D:$D*G:G))
-// Also in case of DoubleRef arguments around other Binary operators 
can be trimmable:
+// Also in case of DoubleRef arguments around other Binary operators 
can be trimmable inside one parameter
+// of the root operator:
 //   SUMPRODUCT(($D:$D>M47:M47)*($D:$DIsInForceArray())
+// tdf#160616: Double refs with these operators only
+// trimmable in case of one paramater
+if (!pTok->IsInForceArray() || nRootParam > 1)
 break;
 FormulaToken* pLHS = *(ppTok - 1);
 FormulaToken* pRHS = *(ppTok - 2);


core.git: sc/qa sc/source

2024-04-05 Thread Balazs Varga (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/sort.fods |  537 ++-
 sc/source/core/tool/interpr3.cxx |   22 
 2 files changed, 422 insertions(+), 137 deletions(-)

New commits:
commit be938f2fb1c0a18658b4170396a22c64b77bf646
Author: Balazs Varga 
AuthorDate: Fri Apr 5 12:14:45 2024 +0200
Commit: Caolán McNamara 
CommitDate: Fri Apr 5 16:03:52 2024 +0200

Related tdf#126573 Add Excel2021 array function SORT to Calc

In case of cell formulas which have a string result, we need to
get the value from the formula result, for sorting/comparing.

folow up of commit: 45435a680be065e44eba385bb2523b27b77fb451

Change-Id: I30502dfb013ef78de0e5f2f9d5151cfc60e46942
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165816
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/sort.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/sort.fods
index af67e19b29cd..e24de0a1892f 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/sort.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/sort.fods
@@ -1,7 +1,7 @@
 
 
 http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns
 :css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2024-01-16T18:30:06.27800PT4H51M18S92LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/0437c500018c62f95ad3cd584ed57a6da47f60052024-03-15T12:32:38.48400
+ 
2024-01-16T18:30:06.27800PT4H58M22S93LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/3c10a1a4ce65496877d8fc78359f9b7e59d2703c2024-04-05T12:10:35.33200
  
   
0
@@ -14,14 +14,14 @@
  
   
2
-   0
+   1
2
0
0
0
0
0
-   85
+   110
60
true
false
@@ -30,15 +30,15 @@
false
   
   
-   0
-   4
+   8
+   98
2
-   0
+   4
0
0
-   0
+   96
0
-   85
+   110
60
true
false
@@ -48,9 +48,9 @@
   
  
  Sheet1
- 2495
+ 1353
  0
- 85
+ 110
  60
  false
  true
@@ -3019,6 +3019,49 @@
   

   
+  
+   
+   
+  
+  
+   
+   
+   
+  
+  
+   
+   
+   
+  
+  
+   
+   
+   
+   
+   
+  
+  
+   
+   
+   
+  
+  
+   
+   
+   
+   
+   
+   
+  
+  
+   
+   
+   
+  
+  
+   
+   
+  
   


@@ -3040,12 +3083,12 @@


   
-  
+  



   
-  
+  



@@ -3053,12 +3096,12 @@


   
-  
+  



   
-  
+  


   
@@ -3071,7 +3114,7 @@
   
   
   
-  
+  



@@ -3125,7 +3168,7 @@
  
???(???)
 
 
- .00.00, 00:00:00
+ .00.00, 00:00:00
 


@@ -3142,7 +3185,7 @@


 
-
+
 
 
  
@@ -3172,7 +3215,7 @@
  
   Sheet
  
- 
+ 
   Result
  
  
@

core.git: Branch 'feature/cib_contract49' - 4 commits - chart2/qa chart2/source chart2/uiconfig editeng/source include/editeng include/oox oox/inc oox/source sc/source sd/source svx/source sw/source x

2024-04-03 Thread Balazs Varga (via logerrit)
 chart2/qa/extras/chart2export3.cxx  |   70 +++-
 chart2/qa/extras/data/xlsx/tdf39052.xlsx|binary
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx   |   65 +++-
 chart2/source/controller/dialogs/TitleDialogData.cxx|2 
 chart2/source/controller/inc/ChartController.hxx|5 
 chart2/source/controller/inc/SelectionHelper.hxx|1 
 chart2/source/controller/main/ChartController.cxx   |6 
 chart2/source/controller/main/ChartController_TextEdit.cxx  |   83 --
 chart2/source/controller/main/ChartController_Tools.cxx |   11 +
 chart2/source/controller/main/ChartController_Window.cxx|   10 -
 chart2/source/controller/main/ControllerCommandDispatch.cxx |6 
 chart2/source/controller/main/SelectionHelper.cxx   |5 
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |3 
 chart2/source/inc/TitleHelper.hxx   |6 
 chart2/source/tools/TitleHelper.cxx |   97 
 chart2/source/view/main/PropertyMapper.cxx  |3 
 chart2/source/view/main/ShapeFactory.cxx|   74 ++---
 chart2/uiconfig/menubar/menubar.xml |1 
 chart2/uiconfig/toolbar/toolbar.xml |1 
 editeng/source/editeng/editobj.cxx  |   14 +
 editeng/source/editeng/editobj2.hxx |2 
 editeng/source/outliner/overflowingtxt.cxx  |2 
 include/editeng/editobj.hxx |4 
 include/oox/export/chartexport.hxx  |4 
 oox/inc/drawingml/textcharacterproperties.hxx   |8 
 oox/source/drawingml/chart/titleconverter.cxx   |   11 +
 oox/source/drawingml/textcharacterpropertiescontext.cxx |3 
 oox/source/export/chartexport.cxx   |   81 +++---
 oox/source/export/drawingml.cxx |3 
 sc/source/filter/xcl97/xcl97rec.cxx |3 
 sc/source/ui/Accessibility/AccessiblePageHeader.cxx |2 
 sc/source/ui/view/viewfunc.cxx  |2 
 sd/source/filter/ppt/pptinanimations.cxx|2 
 svx/source/svdraw/svdotxat.cxx  |   19 +-
 svx/source/table/cell.cxx   |2 
 sw/source/uibase/docvw/AnnotationWin.cxx|2 
 xmloff/source/chart/SchXMLAxisContext.cxx   |1 
 xmloff/source/chart/SchXMLChartContext.cxx  |2 
 xmloff/source/chart/SchXMLExport.cxx|3 
 39 files changed, 492 insertions(+), 127 deletions(-)

New commits:
commit 170fdbae18fdaf1ce0259b51f80566dc54f5a683
Author: Balazs Varga 
AuthorDate: Fri Mar 29 23:00:50 2024 +0100
Commit: Balazs Varga 
CommitDate: Wed Apr 3 11:09:23 2024 +0200

Related: tdf#39052 - chart ooxml: export formatted chart titles

texts properly to ooxml.

Also adding "FormattedStrings" property for title objects
to simplify the working of character formattings in editable
chart shapes.

TODO: odf import/export

cherry-pick from commit: 55e9a27afd2d6a13cf76b39641bf121c3ec4b45c

Change-Id: Ie27b4dee72c24fa6a2a4e2a7db8da7fa50eb8937
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165583
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/chart2/qa/extras/chart2export3.cxx 
b/chart2/qa/extras/chart2export3.cxx
index 845e6c98c6a6..b81c99218cba 100644
--- a/chart2/qa/extras/chart2export3.cxx
+++ b/chart2/qa/extras/chart2export3.cxx
@@ -455,12 +455,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, 
testChartMainWithSubTitle)
 xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
 CPPUNIT_ASSERT(pXmlDoc);
 // test properties of title
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "sz", "1300");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "b", "0");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "i", "1");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr",
 "val", "f10d0c");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin", "typeface", 
"Arial");
-assertXPathContent(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t", "It is a Maintitle
It is a Subtitle");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr", "sz", 
"1300");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr", "b", "0");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:d

core.git: chart2/qa chart2/source include/oox oox/source xmloff/source

2024-04-02 Thread Balazs Varga (via logerrit)
 chart2/qa/extras/chart2export3.cxx |   70 ++-
 chart2/qa/extras/data/xlsx/tdf39052.xlsx   |binary
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx  |   65 ++
 chart2/source/controller/main/ChartController_TextEdit.cxx |   30 
 chart2/source/inc/TitleHelper.hxx  |2 
 chart2/source/tools/TitleHelper.cxx|   31 +++-
 include/oox/export/chartexport.hxx |4 
 oox/source/export/chartexport.cxx  |   81 +
 oox/source/export/drawingml.cxx|3 
 xmloff/source/chart/SchXMLAxisContext.cxx  |1 
 xmloff/source/chart/SchXMLChartContext.cxx |2 
 xmloff/source/chart/SchXMLExport.cxx   |3 
 12 files changed, 230 insertions(+), 62 deletions(-)

New commits:
commit 55e9a27afd2d6a13cf76b39641bf121c3ec4b45c
Author: Balazs Varga 
AuthorDate: Fri Mar 29 23:00:50 2024 +0100
Commit: Balazs Varga 
CommitDate: Tue Apr 2 23:27:26 2024 +0200

Related: tdf#39052 - chart ooxml: export formatted chart titles

texts properly to ooxml.

Also adding "FormattedStrings" property for title objects
to simplify the working of character formattings in editable
chart shapes.

TODO: odf import/export

Change-Id: Ie27b4dee72c24fa6a2a4e2a7db8da7fa50eb8937
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165583
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/chart2/qa/extras/chart2export3.cxx 
b/chart2/qa/extras/chart2export3.cxx
index e1229b07720c..3d05495eff40 100644
--- a/chart2/qa/extras/chart2export3.cxx
+++ b/chart2/qa/extras/chart2export3.cxx
@@ -447,12 +447,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, 
testChartMainWithSubTitle)
 xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
 CPPUNIT_ASSERT(pXmlDoc);
 // test properties of title
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, 
"1300");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, 
"0");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "i"_ostr, 
"1");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr"_ostr,
 "val"_ostr, "f10d0c");
-assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin"_ostr, 
"typeface"_ostr, "Arial");
-assertXPathContent(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t"_ostr, "It is a Maintitle
It is a Subtitle");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, 
"sz"_ostr, "1300");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, 
"b"_ostr, "0");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, 
"i"_ostr, "1");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr/a:solidFill/a:srgbClr"_ostr,
 "val"_ostr, "f10d0c");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr/a:latin"_ostr, 
"typeface"_ostr, "Arial");
+assertXPathContent(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:t"_ostr, "It is a 
Maintitle");
+assertXPathContent(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r/a:t"_ostr, "It is a 
Subtitle");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, 
"81d41a");
 }
 
@@ -754,6 +755,63 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf148142)
 CPPUNIT_ASSERT(!aScaleData2.ShiftedCategoryPosition);
 }
 
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFormattedChartTitles)
+{
+loadFromFile(u"xlsx/tdf39052.xlsx");
+save("Calc Office Open XML");
+xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+CPPUNIT_ASSERT(pXmlDoc);
+
+// Check run level properties [1] - first paragraph
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr"_ostr, "b"_ostr, 
"1");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr"_ostr, 
"sz"_ostr, "1400");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr/a:solidFill/a:srgbClr"_ostr,
 "val"_ostr, "ff");
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr/a:latin"_ostr, 
"typeface"_ostr, "Aptos Narrow");
+assertXPathContent(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:t"_ostr, "This");
+// Check run level properties [2]
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:rPr"_ostr, "b"_ostr, 
"0");

core.git: chart2/source chart2/uiconfig

2024-04-02 Thread Balazs Varga (via logerrit)
 chart2/source/controller/dialogs/TitleDialogData.cxx|2 
 chart2/source/controller/inc/ChartController.hxx|5 
 chart2/source/controller/inc/SelectionHelper.hxx|1 
 chart2/source/controller/main/ChartController.cxx   |6 
 chart2/source/controller/main/ChartController_TextEdit.cxx  |   93 +++-
 chart2/source/controller/main/ChartController_Tools.cxx |   11 +
 chart2/source/controller/main/ChartController_Window.cxx|   10 -
 chart2/source/controller/main/ControllerCommandDispatch.cxx |6 
 chart2/source/controller/main/SelectionHelper.cxx   |5 
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |3 
 chart2/source/inc/TitleHelper.hxx   |4 
 chart2/source/tools/TitleHelper.cxx |   72 ++---
 chart2/uiconfig/menubar/menubar.xml |1 
 chart2/uiconfig/toolbar/toolbar.xml |1 
 14 files changed, 180 insertions(+), 40 deletions(-)

New commits:
commit 4f994cec388377cc5c2bddb804bd92eb4cd7dc8d
Author: Balazs Varga 
AuthorDate: Thu Mar 28 17:55:30 2024 +0100
Commit: Balazs Varga 
CommitDate: Tue Apr 2 23:27:03 2024 +0200

tdf#39052 - Chart: make characters formatable in editable chart textshapes

Editable textshapes include main chart title, sub chart title, axis titles.

In chart2 the chart2::XFormattedString and chart2::XFormattedString2 store
the formatted characters from textshapes, so we need to set all the 
character
properties from the EditTextObject and need to add them to to the 
XFormattedString
array with all the related texts which are formatted individually.

For formatting of the characters the .uno:FontDialog command can be used,
which can be called from the chart menubar, toolbar and with right click
on the text when we are in edit mode in the textshape.

(Note: in the next patch the OOXML export will be fixed.)

Change-Id: I5750a5fe694b384dc6b28e2ef03ac1f2b03957db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165501
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/controller/dialogs/TitleDialogData.cxx 
b/chart2/source/controller/dialogs/TitleDialogData.cxx
index 45dda2c897b0..b8f3ed6d9429 100644
--- a/chart2/source/controller/dialogs/TitleDialogData.cxx
+++ b/chart2/source/controller/dialogs/TitleDialogData.cxx
@@ -99,7 +99,7 @@ bool TitleDialogData::writeDifferenceToModel(
 TitleHelper::getTitle( static_cast< TitleHelper::eTitleType >( 
nN ), xChartModel ) );
 if(xTitle.is())
 {
-TitleHelper::setCompleteString( aTextList[nN], xTitle, 
xContext );
+TitleHelper::setCompleteString( aTextList[nN], xTitle, 
xContext, nullptr, true );
 bChanged = true;
 }
 }
diff --git a/chart2/source/controller/inc/ChartController.hxx 
b/chart2/source/controller/inc/ChartController.hxx
index d1e95efafac3..737d0cf3768f 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -323,6 +323,7 @@ public:
 void setDrawMode( ChartDrawMode eMode ) { m_eDrawMode = eMode; }
 
 bool isShapeContext() const;
+bool IsTextEdit() const;
 
 ViewElementListProvider getViewElementListProvider();
 DrawModelWrapper* GetDrawModelWrapper();
@@ -484,6 +485,8 @@ private:
 void executeDispatch_MoveSeries( bool bForward );
 
 bool EndTextEdit();
+css::uno::Sequence< css::uno::Reference> 
GetFormattedTitle(
+const EditTextObject& aEdit, const css::uno::Reference< 
css::drawing::XShape >& xShape );
 
 void executeDispatch_View3D();
 void executeDispatch_PositionAndSize( const ::css::uno::Sequence< 
::css::beans::PropertyValue >* pArgs = nullptr );
@@ -514,7 +517,7 @@ private:
 const css::uno::Sequence< css::beans::PropertyValue >& rArgs );
 
 DECL_LINK( DoubleClickWaitingHdl, Timer*, void );
-void execute_DoubleClick( const Point* pMousePixel );
+void execute_DoubleClick( const Point* pMousePixel, bool &bEditText );
 void startDoubleClickWaiting();
 void stopDoubleClickWaiting();
 
diff --git a/chart2/source/controller/inc/SelectionHelper.hxx 
b/chart2/source/controller/inc/SelectionHelper.hxx
index ff0e95eee27a..119640bd4300 100644
--- a/chart2/source/controller/inc/SelectionHelper.hxx
+++ b/chart2/source/controller/inc/SelectionHelper.hxx
@@ -39,6 +39,7 @@ public: //methods
 
 bool isResizeableObjectSelected() const;
 bool isRotateableObjectSelected( const 
rtl::Reference<::chart::ChartModel>& xChartModel ) const;
+bool isTitleObjectSelected() const;
 bool isDragableObjectSelected() const;
 
 bool isAdditionalShapeSelected() const;
diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartControl

core.git: chart2/source oox/inc oox/source

2024-04-02 Thread Balazs Varga (via logerrit)
 chart2/source/view/main/PropertyMapper.cxx  |3 
 chart2/source/view/main/ShapeFactory.cxx|   72 ++--
 oox/inc/drawingml/textcharacterproperties.hxx   |8 +
 oox/source/drawingml/chart/titleconverter.cxx   |   11 ++
 oox/source/drawingml/textcharacterpropertiescontext.cxx |3 
 5 files changed, 71 insertions(+), 26 deletions(-)

New commits:
commit f31a8ff9ea15ad81aeac265fce6eafe6342a68b7
Author: Balazs Varga 
AuthorDate: Thu Mar 28 17:17:47 2024 +0100
Commit: Balazs Varga 
CommitDate: Tue Apr 2 23:26:13 2024 +0200

tdf#78027 - Fix Chart OOXML Import with non-uniform formatted titles

Character formats are disappeared from Chart Title textobjects if they were
formatted non-uniform. In this patch only the OOXML import and the chartview
part will be fixed which make it visible after the import.

(Note: next patch will contain the chart controller part where the 
characters
can be formatted during title editing).

Change-Id: I4fb5c3d80b7889935d198e70fb49e2c68108b235
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165500
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/main/PropertyMapper.cxx 
b/chart2/source/view/main/PropertyMapper.cxx
index c3241049057a..79206624f436 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -268,7 +268,8 @@ const tPropertyNameMap& 
PropertyMapper::getPropertyNameMapForCharacterProperties
 {"CharColor","CharColor"},
 {"CharContoured","CharContoured"},
 {"CharEmphasis", "CharEmphasis"},//the service 
style::CharacterProperties  describes a property called 'CharEmphasize' which 
is nowhere implemented
-
+{"CharEscapement",   "CharEscapement"},
+{"CharEscapementHeight", "CharEscapementHeight"},
 {"CharFontFamily",   "CharFontFamily"},
 {"CharFontFamilyAsian",  "CharFontFamilyAsian"},
 {"CharFontFamilyComplex","CharFontFamilyComplex"},
diff --git a/chart2/source/view/main/ShapeFactory.cxx 
b/chart2/source/view/main/ShapeFactory.cxx
index 0e572a7e8dcb..c681c581a7b3 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -2183,7 +2183,8 @@ rtl::Reference
 
 //set text and text properties
 uno::Reference< text::XTextCursor > xTextCursor( 
xShape->createTextCursor() );
-if( !xTextCursor.is() )
+uno::Reference< text::XTextCursor > xSelectionCursor( 
xShape->createTextCursor() );
+if( !xTextCursor.is() || !xSelectionCursor.is() )
 return xShape;
 
 tPropertyNameValueMap aValueMap;
@@ -2232,18 +2233,32 @@ rtl::Reference
 //if the characters should be stacked we use only the first 
character properties for code simplicity
 if( xFormattedString.hasElements() )
 {
-OUString aLabel;
-for (const auto& i : xFormattedString)
-aLabel += i->getString();
-aLabel = ShapeFactory::getStackedString( aLabel, 
bStackCharacters );
-
-xTextCursor->gotoEnd(false);
-xShape->insertString( xTextCursor, aLabel, false );
-xTextCursor->gotoEnd(true);
-uno::Reference< beans::XPropertySet > xSourceProps( 
xFormattedString[0], uno::UNO_QUERY );
-
-PropertyMapper::setMappedProperties( *xShape, xSourceProps
-, 
PropertyMapper::getPropertyNameMapForCharacterProperties() );
+size_t nLBreaks = xFormattedString.size() - 1;
+uno::Reference< beans::XPropertySet > 
xSelectionProp(xSelectionCursor, uno::UNO_QUERY);
+for (const uno::Reference& rxFS : 
xFormattedString)
+{
+if (!rxFS->getString().isEmpty())
+{
+xTextCursor->gotoEnd(false);
+xSelectionCursor->gotoEnd(false);
+OUString aLabel = 
ShapeFactory::getStackedString(rxFS->getString(), bStackCharacters);
+if (nLBreaks-- > 0)
+aLabel += OUStringChar(' ');
+xShape->insertString(xTextCursor, aLabel, false);
+xSelectionCursor->gotoEnd(true); // select current 
paragraph
+uno::Reference< beans::XPropertySet > 
xSourceProps(rxFS, uno::UNO_QUERY);
+if (xFormattedString.size() > 1 && xSelectionProp.is())
+{
+
PropertyMapper::setMappedProperties(xSelectionProp, xSourceProps,
+
PropertyMapper::getPropertyNameMapForTextShapeProperties());
+}
+else
+   

core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source

2024-03-26 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc  |6 
 formula/source/core/api/FormulaCompiler.cxx|1 
 include/formula/compiler.hxx   |3 
 include/formula/opcode.hxx |2 
 sc/README.md   |1 
 sc/inc/helpids.h   |1 
 sc/inc/scfuncs.hrc |   12 
 sc/qa/extras/scfunctionlistobj.cxx |2 
 sc/qa/unit/data/functions/spreadsheet/fods/sortby.fods | 5743 +
 sc/qa/unit/ucalc.cxx   |1 
 sc/source/core/data/funcdesc.cxx   |1 
 sc/source/core/inc/interpre.hxx|3 
 sc/source/core/tool/interpr1.cxx   |  235 
 sc/source/core/tool/interpr3.cxx   |   69 
 sc/source/core/tool/interpr4.cxx   |1 
 sc/source/core/tool/parclass.cxx   |1 
 sc/source/core/tool/token.cxx  |1 
 sc/source/filter/excel/xlformula.cxx   |3 
 sc/source/filter/oox/formulabase.cxx   |3 
 19 files changed, 6045 insertions(+), 44 deletions(-)

New commits:
commit bfb4c58ae708c75949559290bdfdd9afcef6aa91
Author: Balazs Varga 
AuthorDate: Wed Mar 20 01:49:58 2024 +0100
Commit: Balazs Varga 
CommitDate: Tue Mar 26 10:20:38 2024 +0100

tdf#126573 Add Excel2021 array function SORTBY to Calc

TODO/WIP: oasis proposal
More information about how this new function works:

https://support.microsoft.com/en-au/office/sortby-function-cd2d7a62-1b93-435c-b561-d6a35134f28f
https://exceljet.net/functions/sortby-function

Change-Id: I4538a32f7f75056d3055369fc5f4483d24fd1089
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165069
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 3d4e822353ef..82d3a52c98e8 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -280,6 +280,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "COM.MICROSOFT.FILTER" , SC_OPCODE_FILTER },
 { "COM.MICROSOFT.SORT" , SC_OPCODE_SORT },
+{ "COM.MICROSOFT.SORTBY" , SC_OPCODE_SORTBY },
 { "ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for 
range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -731,6 +732,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "_xlfn._xlws.FILTER" , SC_OPCODE_FILTER },
 { "_xlfn._xlws.SORT" , SC_OPCODE_SORT },
+{ "_xlfn.SORTBY" , SC_OPCODE_SORTBY },
 { "_xlfn.ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy 
for range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1185,6 +1187,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "FILTER" , SC_OPCODE_FILTER },
 { "SORT" , SC_OPCODE_SORT },
+{ "SORTBY" , SC_OPCODE_SORTBY },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1640,6 +1643,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "FILTER" , SC_OPCODE_FILTER },
 { "SORT" , SC_OPCODE_SORT },
+{ "SORTBY" , SC_OPCODE_SORTBY },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },  // ?? first character = I ??
@@ -2093,6 +2097,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "FILTER" , SC_OPCODE_FILTER },
 { "SORT" , SC_OPCODE_SORT },
+{ "SORTBY" , SC_OPCODE_SORTBY },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -2527,6 +2532,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "HLOOKUP") , SC_OPCODE_H_LOOKUP },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "FILTER") , SC_OPCODE_FILTER },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SORT") , SC_OPCODE_SORT },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "SORTBY") , SC_OPCODE_SORTBY },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MULTIRANGE") , SC_OPCODE_MULTI_AREA 
}, // legacy for range list (union)
 { NC_("RID_STRLIST_FUNCTION_NAMES", "OFFSET") , SC_OPCODE_OFFSET },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "INDEX") , SC_OPCODE_INDEX }, // ?? 
first character = I ??
diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index d5d926f6f4

core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source

2024-03-25 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc|6 
 formula/source/core/api/FormulaCompiler.cxx  |1 
 include/formula/compiler.hxx |3 
 include/formula/opcode.hxx   |2 
 sc/README.md |1 
 sc/inc/helpids.h |1 
 sc/inc/scfuncs.hrc   |   14 
 sc/inc/sortparam.hxx |  176 
 sc/inc/table.hxx |1 
 sc/qa/extras/scfunctionlistobj.cxx   |2 
 sc/qa/unit/data/functions/spreadsheet/fods/sort.fods | 5816 +++
 sc/qa/unit/ucalc.cxx |1 
 sc/source/core/data/funcdesc.cxx |1 
 sc/source/core/data/sortparam.cxx|9 
 sc/source/core/data/table3.cxx   |  175 
 sc/source/core/inc/interpre.hxx  |   21 
 sc/source/core/tool/interpr1.cxx |  203 
 sc/source/core/tool/interpr3.cxx |  363 +
 sc/source/core/tool/interpr4.cxx |1 
 sc/source/core/tool/parclass.cxx |1 
 sc/source/core/tool/token.cxx|1 
 sc/source/filter/excel/xlformula.cxx |3 
 sc/source/filter/oox/formulabase.cxx |3 
 23 files changed, 6623 insertions(+), 182 deletions(-)

New commits:
commit 45435a680be065e44eba385bb2523b27b77fb451
Author: Balazs Varga 
AuthorDate: Wed Mar 13 11:07:10 2024 +0100
Commit: Balazs Varga 
CommitDate: Mon Mar 25 15:54:01 2024 +0100

tdf#126573 Add Excel2021 array function SORT to Calc

TODO/WIP: oasis proposal
More information about how this new function works:

https://support.microsoft.com/en-au/office/sort-function-22f63bd0-ccc8-492f-953d-c20e8e44b86c
https://exceljet.net/functions/sort-function

Note: Move ScSortInfoArray class to sortparam.hxx, which is a more
logical place.

Change-Id: I70e720e93ba0414d54cb3437de0bfa066508fe30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164778
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index f0efc468ab6f..3d4e822353ef 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -279,6 +279,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "COM.MICROSOFT.XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "COM.MICROSOFT.FILTER" , SC_OPCODE_FILTER },
+{ "COM.MICROSOFT.SORT" , SC_OPCODE_SORT },
 { "ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for 
range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -729,6 +730,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "_xlfn.XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "_xlfn._xlws.FILTER" , SC_OPCODE_FILTER },
+{ "_xlfn._xlws.SORT" , SC_OPCODE_SORT },
 { "_xlfn.ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy 
for range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1182,6 +1184,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "FILTER" , SC_OPCODE_FILTER },
+{ "SORT" , SC_OPCODE_SORT },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1636,6 +1639,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "FILTER" , SC_OPCODE_FILTER },
+{ "SORT" , SC_OPCODE_SORT },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },  // ?? first character = I ??
@@ -2088,6 +2092,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
 { "FILTER" , SC_OPCODE_FILTER },
+{ "SORT" , SC_OPCODE_SORT },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -2521,6 +2526,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "XLOOKUP") , SC_OPCODE_X_LOOKUP },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "HLOOKUP") , SC_OPCODE_H_LOOKUP },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "FILTER") , SC_OPCODE_FILTER },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "SORT") , SC_OPCODE_SORT },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MULTIRANGE") , SC_OPCODE_MULTI_AREA 
}, // legacy for range list (union)
   

core.git: Branch 'feature/cib_contract49' - sc/qa sc/source

2024-03-25 Thread Balazs Varga (via logerrit)
 sc/qa/unit/ucalc_formula.cxx |2 +-
 sc/source/core/tool/compiler.cxx |   35 +++
 2 files changed, 36 insertions(+), 1 deletion(-)

New commits:
commit faea4bf55e4160565da6b307e6799312f677bee9
Author: Balazs Varga 
AuthorDate: Wed Mar 20 18:32:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Mon Mar 25 08:48:35 2024 +0100

tdf#159687 sc formula SUMPRODUCT performance fix: add more binary

operators which need to be checked if they are next to a trimmable
DoubleRef arguments or not.
Example:
=SUMPRODUCT(($D:$D>M47:M47)*($D:$D
$D:$D and $I:$I columns are trimmable.

Recalculation of formulas with a lot of SUMPRODUCT where we comparing
full columns could take minutes during editing a sheet. With reducing
the size of the compared ranges to the actual data could significantly
speed up the recalculation.

This takes the recalculation time from ~50 sec to <1 sec on my machine.

Note: probabaly the same could be applied to the SUM function.

Change-Id: I758660d0b638ef7255bd5a41a96755289b5a2b41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165074
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index feb0e8fef22a..153096d6a434 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -1464,7 +1464,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, 
testFormulaAnnotateTrimOnDoubleRefs)
 
 {
 "=SUMPRODUCT(A:A=$C$1; 1-(A:A=$C$1))",
-ScRange(-1, -1, -1, -1, -1, -1), // Has no trimmable 
double-ref.
+ScRange(0, 0, 0, 0, 1048575, 0),
 0.0,
 false// Not in matrix mode.
 },
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index f5805db887c9..13fed4ac95b3 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -6568,6 +6568,8 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 // such that one of the operands of ocEqual is a double-ref.
 // Examples of formula that matches this are:
 //   SUMPRODUCT(IF($A:$A=$L12;$D:$D*G:G))
+// Also in case of DoubleRef arguments around other Binary operators 
can be trimmable:
+//   SUMPRODUCT(($D:$D>M47:M47)*($D:$DIsInForceArray())
+break;
+FormulaToken* pLHS = *(ppTok - 1);
+FormulaToken* pRHS = *(ppTok - 2);
+StackVar lhsType = pLHS->GetType();
+StackVar rhsType = pRHS->GetType();
+if (lhsType == svDoubleRef && (rhsType == svSingleRef 
|| rhsType == svDoubleRef))
+{
+pLHS->GetDoubleRef()->SetTrimToData(true);
+}
+if (rhsType == svDoubleRef && (lhsType == svSingleRef 
|| lhsType == svDoubleRef))
+{
+pRHS->GetDoubleRef()->SetTrimToData(true);
+}
+}
+break;
 case ocPush:
 break;
 case ocClose:


core.git: sd/source slideshow/source

2024-03-22 Thread Balazs Varga (via logerrit)
 sd/source/core/sdpage.cxx|5 +++--
 slideshow/source/engine/shapes/shapeimporter.cxx |   20 +++-
 2 files changed, 22 insertions(+), 3 deletions(-)

New commits:
commit e136900e7a971385be9367a3dcaedea54d1e7207
Author: Balazs Varga 
AuthorDate: Thu Feb 29 16:34:45 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 22 11:44:16 2024 +0100

tdf#159258 sd: fix to show objects in slideshow if they have

fillstyle or linestyle.

Also the shape will be appeared in print and pdf view.
(Powerpoint doing the same.)

TODO: the placeholder bitmap and the default text
was not removed from the slideshow/print/pdf view.

Change-Id: Ifadc9a692d77b60a7e3514afe8e6ea5cab0018c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164163
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 10b4f34b761f..020f1f6bbfd4 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2802,9 +2802,10 @@ bool SdPage::checkVisibility(
 const bool bIsInsidePageObj(pPageView && pPageView->GetPage() != 
pVisualizedPage);
 
 // empty presentation objects only visible during edit mode
-if( (bIsPrinting || !bEdit || bIsInsidePageObj ) && pObj->IsEmptyPresObj() 
)
+if( (bIsPrinting || !bEdit || bIsInsidePageObj ) && pObj->IsEmptyPresObj() 
&& !(pObj->HasFillStyle() || pObj->HasLineStyle()) )
 {
-if( (pObj->GetObjInventor() != SdrInventor::Default) || ( 
(pObj->GetObjIdentifier() != SdrObjKind::Rectangle) && 
(pObj->GetObjIdentifier() != SdrObjKind::Page) ) )
+if( (pObj->GetObjInventor() != SdrInventor::Default) || ( 
(pObj->GetObjIdentifier() != SdrObjKind::Rectangle) &&
+(pObj->GetObjIdentifier() != SdrObjKind::Page) ) )
 return false;
 }
 
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx 
b/slideshow/source/engine/shapes/shapeimporter.cxx
index 92162eeb60ad..7823a5588efd 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -346,7 +346,25 @@ bool ShapeImporter::isSkip(
   "IsEmptyPresentationObject") &&
 bEmpty )
 {
-return true;
+// check object have fill or linestyle, if have, it should be visible
+drawing::FillStyle aFillStyle{ drawing::FillStyle_NONE };
+if (getPropertyValue(aFillStyle,
+xPropSet, "FillStyle") &&
+aFillStyle != drawing::FillStyle_NONE)
+{
+bEmpty = false;
+}
+
+drawing::LineStyle aLineStyle{ drawing::LineStyle_NONE };
+if (bEmpty && getPropertyValue(aLineStyle,
+xPropSet, "LineStyle") &&
+aLineStyle != drawing::LineStyle_NONE)
+{
+bEmpty = false;
+}
+
+if (bEmpty)
+return true;
 }
 
 //skip shapes which corresponds to annotations


core.git: sc/qa sc/source

2024-03-22 Thread Balazs Varga (via logerrit)
 sc/qa/unit/ucalc_formula.cxx |2 +-
 sc/source/core/tool/compiler.cxx |   35 +++
 2 files changed, 36 insertions(+), 1 deletion(-)

New commits:
commit ba0ec4a5d2b025b675410cd18890d1cca3bc5a2f
Author: Balazs Varga 
AuthorDate: Wed Mar 20 18:32:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 22 09:23:58 2024 +0100

tdf#159687 sc formula SUMPRODUCT performance fix: add more binary

operators which need to be checked if they are next to a trimmable
DoubleRef arguments or not.
Example:
=SUMPRODUCT(($D:$D>M47:M47)*($D:$D
$D:$D and $I:$I columns are trimmable.

Recalculation of formulas with a lot of SUMPRODUCT where we comparing
full columns could take minutes during editing a sheet. With reducing
the size of the compared ranges to the actual data could significantly
speed up the recalculation.

This takes the recalculation time from ~50 sec to <1 sec on my machine.

Note: probabaly the same could be applied to the SUM function.

Change-Id: I758660d0b638ef7255bd5a41a96755289b5a2b41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165074
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 105c7e4a772d..adbc9c121042 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -1464,7 +1464,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, 
testFormulaAnnotateTrimOnDoubleRefs)
 
 {
 "=SUMPRODUCT(A:A=$C$1; 1-(A:A=$C$1))",
-ScRange(-1, -1, -1, -1, -1, -1), // Has no trimmable 
double-ref.
+ScRange(0, 0, 0, 0, 1048575, 0),
 0.0,
 false// Not in matrix mode.
 },
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 5e0258b3fd21..152a75f949b1 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -6564,6 +6564,8 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 // such that one of the operands of ocEqual is a double-ref.
 // Examples of formula that matches this are:
 //   SUMPRODUCT(IF($A:$A=$L12;$D:$D*G:G))
+// Also in case of DoubleRef arguments around other Binary operators 
can be trimmable:
+//   SUMPRODUCT(($D:$D>M47:M47)*($D:$DIsInForceArray())
+break;
+FormulaToken* pLHS = *(ppTok - 1);
+FormulaToken* pRHS = *(ppTok - 2);
+StackVar lhsType = pLHS->GetType();
+StackVar rhsType = pRHS->GetType();
+if (lhsType == svDoubleRef && (rhsType == svSingleRef 
|| rhsType == svDoubleRef))
+{
+pLHS->GetDoubleRef()->SetTrimToData(true);
+}
+if (rhsType == svDoubleRef && (lhsType == svSingleRef 
|| lhsType == svDoubleRef))
+{
+pRHS->GetDoubleRef()->SetTrimToData(true);
+}
+}
+break;
 case ocPush:
 break;
 case ocClose:


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

2024-03-20 Thread Balazs Varga (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   24 +
 sc/inc/formulaopt.hxx|4 
 sc/inc/globstr.hrc   |1 
 sc/source/core/tool/formulaopt.cxx   |   62 +--
 sc/source/filter/oox/workbookhelper.cxx  |4 
 sc/source/filter/xml/xmlimprt.cxx|3 
 sc/source/ui/docshell/docsh.cxx  |   56 +
 sc/source/ui/inc/docsh.hxx   |2 
 sc/source/ui/inc/tpformula.hxx   |1 
 sc/source/ui/optdlg/tpformula.cxx|   12 ++
 sc/uiconfig/scalc/ui/optformula.ui   |   37 
 11 files changed, 197 insertions(+), 9 deletions(-)

New commits:
commit 1bc97e82c793574ec16238a38b4ab644c623fd4b
Author: Balazs Varga 
AuthorDate: Wed Feb 14 22:34:10 2024 +0100
Commit: Justin Luth 
CommitDate: Wed Mar 20 15:41:40 2024 +0100

tdf#124098 sc add global config setting "RecalcOptimalRowHeightMode"

to optimal row height recalculation for optimal document loading.

THIS COMMIT MERGES commits 0748c2b0789a and 0e0e7de07686 AS WELL,
so XLSX is handled too!

If the "RecalcOptimalRowHeightMode" is set to "Recalc always" we always
recalculate the optimal row heights at load time, without any warning 
dialog.
If the "RecalcOptimalRowHeightMode" is set to "Recalc" we never recalculate
the optimal row heights at load time, without any warning dialog.
If the "RecalcOptimalRowHeightMode" is set to "Ask before Recalc" we ask 
the user
if want to recalculate the optimal row heights at load time or not.

The default value is the same what we are doing now: "Recalc always"

This option was necessary, since optimal row height calculation depending 
on also
the result of the conditional formatted formulas and it takes a lot of time 
to calculate
the optimal row heights and load the document. Because we allow a lot of 
text/cell format
attribute which are effect on the cell size, therefor it is necessary to 
evaluate all
the formulas. Also if we have 20 condition for a cell range we need to 
evaluate all
the 20 formulas for all the cells and it is very expensive at load time.

Change-Id: I9288d11dd2f061f85fa36292a909402a6bb89ea9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163421
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164796
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Justin Luth 
Reviewed-by: Michael Meeks 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index d54b092eca66..a8830ab1ba19 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1532,6 +1532,30 @@
   
   1
 
+
+  
+  
+Specifies whether to force a hard recalc after load on 
optimal row heights.
+  
+  
+
+  
+Recalc always
+  
+
+
+  
+Recalc never
+  
+
+
+  
+Ask before Recalc
+  
+
+  
+  0
+
   
 
 
diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx
index de46b52643c8..6cc1dedcbbb4 100644
--- a/sc/inc/formulaopt.hxx
+++ b/sc/inc/formulaopt.hxx
@@ -30,6 +30,7 @@ private:
 
 ScRecalcOptions meOOXMLRecalc;
 ScRecalcOptions meODFRecalc;
+ScRecalcOptions meReCalcOptiRowHeights;
 
 public:
 ScFormulaOptions();
@@ -64,6 +65,9 @@ public:
 void SetODFRecalcOptions( ScRecalcOptions eOpt ) { meODFRecalc = eOpt; }
 ScRecalcOptions GetODFRecalcOptions() const { return meODFRecalc; }
 
+void SetReCalcOptiRowHeights( ScRecalcOptions eOpt ) { 
meReCalcOptiRowHeights = eOpt; }
+ScRecalcOptions GetReCalcOptiRowHeights() const { return 
meReCalcOptiRowHeights; }
+
 void ResetFormulaSeparators();
 
 static void GetDefaultFormulaSeparators(OUString& rSepArg, OUString& 
rSepArrayCol, OUString& rSepArrayRow);
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 8b07dc508edd..6d73c41fdc51 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -505,6 +505,7 @@
 #define STR_EDIT_EXISTING_COND_FORMATS  
NC_("STR_EDIT_EXISTING_COND_FORMATS", "The selected cell already contains 
conditional formatting. You can either edit the existing conditional format or 
you define a new overlapping conditional format.

 Do you want to edit the existing conditional format?")
 #define STR_QUERY_FORMULA_RECALC_ONLOAD_ODS 
NC_("STR_QUERY_FORMULA_RECALC_ONLOAD_ODS", "This document was last saved by an 
ap

core.git: formula/source sc/inc

2024-03-15 Thread Balazs Varga (via logerrit)
 formula/source/core/api/FormulaCompiler.cxx |1 +
 sc/inc/scfuncs.hrc  |4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit e5361d0ef04bc63e7809323750aabe6efafcaef9
Author: Balazs Varga 
AuthorDate: Thu Mar 14 21:16:01 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 15 12:38:13 2024 +0100

Related: tdf#126573 Add Excel2021 array function FILTER to Calc

Add ocFilter to matrix (array) functions.
Some follow-up cosmetic clean.

Follow up commit of b0791dd9216224bdb266fd0d8c87df253b6d0583

Change-Id: I4c3c786fe14ab870be8c43211ca6a76c5ff6ac6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164847
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index dc9c73d7937d..1bf29d2b44e4 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1230,6 +1230,7 @@ bool FormulaCompiler::IsMatrixFunction( OpCode eOpCode )
 case ocMatrixUnit :
 case ocModalValue_Multi :
 case ocFourier :
+case ocFilter :
 return true;
 default:
 {
diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc
index e7213f028491..5fa1c12808c1 100644
--- a/sc/inc/scfuncs.hrc
+++ b/sc/inc/scfuncs.hrc
@@ -4187,12 +4187,12 @@ const TranslateId SC_OPCODE_RANDBETWEEN_NV_ARY[] =
 const TranslateId SC_OPCODE_FILTER_ARY[] =
 {
 NC_("SC_OPCODE_FILTER", "Filters an array based on a Boolean (True/False) 
array."),
-NC_("SC_OPCODE_FILTER", "Range "),
+NC_("SC_OPCODE_FILTER", "Range"),
 NC_("SC_OPCODE_FILTER", "The array, or range to filter."),
 NC_("SC_OPCODE_FILTER", "Include"),
 NC_("SC_OPCODE_FILTER", "A Boolean array whose height or width is the same 
as the array."),
 NC_("SC_OPCODE_FILTER", "Result if empty"),
-NC_("SC_OPCODE_FILTER", "The value to return if all values in the included 
array are empty (filter returns nothing)")
+NC_("SC_OPCODE_FILTER", "The value to return if all values in the included 
array are empty (filter returns nothing).")
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


core.git: Branch 'feature/cib_contract49' - 3 commits - chart2/source sw/qa

2024-03-08 Thread Balazs Varga (via logerrit)
 chart2/source/view/axes/VCartesianAxis.cxx |7 +
 chart2/source/view/main/DataTableView.cxx  |9 +-
 chart2/source/view/main/SeriesPlotterContainer.cxx |7 -
 chart2/source/view/main/SeriesPlotterContainer.hxx |2 
 sw/qa/extras/layout/data/charttable.odt|binary
 sw/qa/extras/layout/data/tdf159443.odt |binary
 sw/qa/extras/layout/layout3.cxx|   91 +
 7 files changed, 106 insertions(+), 10 deletions(-)

New commits:
commit 5b9bf5fac2fc0fc3a9ab7b2a4c23d63f13b1a212
Author: Balazs Varga 
AuthorDate: Thu Mar 7 14:32:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 8 11:04:00 2024 +0100

tdf#159456 - chart view: fix wrongly shifted value Y axis

We only have to shift the category axis only, and not the
value axis, if we have a chart data table.

Change-Id: Ie77ea829e8f8987702dce7d17cb3e20054f3d8cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164539
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/main/SeriesPlotterContainer.cxx 
b/chart2/source/view/main/SeriesPlotterContainer.cxx
index bcc5b0f482a3..7623992a3e08 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.cxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.cxx
@@ -171,7 +171,7 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
 }
 
 if (xDiagram->getDataTable().is())
-m_bForceShiftPosition = true;
+m_bTableShiftPosition = true;
 
 //prepare for autoscaling and shape creation
 // - create plotter for charttypes (for each first scale group at each 
plotter, as they are independent)
@@ -340,12 +340,9 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
 bool SeriesPlotterContainer::isCategoryPositionShifted(const 
chart2::ScaleData& rSourceScale,
bool 
bHasComplexCategories)
 {
-if (m_bForceShiftPosition)
-return true;
-
 if (rSourceScale.AxisType == AxisType::CATEGORY)
 return bHasComplexCategories || rSourceScale.ShiftedCategoryPosition
-   || m_bChartTypeUsesShiftedCategoryPositionPerDefault;
+   || m_bTableShiftPosition || 
m_bChartTypeUsesShiftedCategoryPositionPerDefault;
 
 if (rSourceScale.AxisType == AxisType::DATE)
 return rSourceScale.ShiftedCategoryPosition;
diff --git a/chart2/source/view/main/SeriesPlotterContainer.hxx 
b/chart2/source/view/main/SeriesPlotterContainer.hxx
index 578f2ba2760c..38f3c8b909c8 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.hxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.hxx
@@ -151,7 +151,7 @@ private:
 sal_Int32 m_nMaxAxisIndex;
 
 bool m_bChartTypeUsesShiftedCategoryPositionPerDefault;
-bool m_bForceShiftPosition = false;
+bool m_bTableShiftPosition = false;
 sal_Int32 m_nDefaultDateNumberFormat;
 };
 
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index eae1d65e7a90..26186d36ea72 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -1965,6 +1965,31 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159422)
 CPPUNIT_ASSERT_DOUBLES_EQUAL(6573, nYSymbol3, 20);
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159456)
+{
+// Given a document with chart, which have a datatable
+createSwDoc("charttable.odt");
+SwDoc* pDoc = getSwDoc();
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ Without the fix, this would fail:
+ - Expected: 1
+ - Actual  : 1.5
+ - In <>, XPath contents of child does not match
+assertXPathContent(pXmlDoc,
+   
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/"
+   "push[103]/textarray/text",
+   "1");
+assertXPathContent(pXmlDoc,
+   
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/"
+   "push[104]/textarray/text",
+   "2");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 2ddbe0a75a82b8833b1d4b2f9143e70db1569434
Author: Balazs Varga 
AuthorDate: Wed Mar 6 22:52:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 8 11:01:04 2024 +0100

tdf#159422 - chart view: fix symbols position of data table legend

Calculate the correct/optimal row height after calculating and set
correct width of a table cell. Then we will have the correct row height
for the symbol positions.

Change-Id: I65bc0f0579ea100906b0b32449c2200a54c2a353
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164512
 

core.git: chart2/source sw/qa

2024-03-08 Thread Balazs Varga (via logerrit)
 chart2/source/view/main/SeriesPlotterContainer.cxx |7 +
 chart2/source/view/main/SeriesPlotterContainer.hxx |2 -
 sw/qa/extras/layout/layout3.cxx|   25 +
 3 files changed, 28 insertions(+), 6 deletions(-)

New commits:
commit 40a19e61efff859d83e0689c0ed7d40c8e9ae8fe
Author: Balazs Varga 
AuthorDate: Thu Mar 7 14:32:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 8 09:42:42 2024 +0100

tdf#159456 - chart view: fix wrongly shifted value Y axis

We only have to shift the category axis only, and not the
value axis, if we have a chart data table.

Change-Id: Ie77ea829e8f8987702dce7d17cb3e20054f3d8cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164539
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/main/SeriesPlotterContainer.cxx 
b/chart2/source/view/main/SeriesPlotterContainer.cxx
index b70e51510b7d..06a22207634d 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.cxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.cxx
@@ -174,7 +174,7 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
 }
 
 if (xDiagram->getDataTable().is())
-m_bForceShiftPosition = true;
+m_bTableShiftPosition = true;
 
 //prepare for autoscaling and shape creation
 // - create plotter for charttypes (for each first scale group at each 
plotter, as they are independent)
@@ -357,12 +357,9 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
 bool SeriesPlotterContainer::isCategoryPositionShifted(const 
chart2::ScaleData& rSourceScale,
bool 
bHasComplexCategories)
 {
-if (m_bForceShiftPosition)
-return true;
-
 if (rSourceScale.AxisType == AxisType::CATEGORY)
 return bHasComplexCategories || rSourceScale.ShiftedCategoryPosition
-   || m_bChartTypeUsesShiftedCategoryPositionPerDefault;
+   || m_bTableShiftPosition || 
m_bChartTypeUsesShiftedCategoryPositionPerDefault;
 
 if (rSourceScale.AxisType == AxisType::DATE)
 return rSourceScale.ShiftedCategoryPosition;
diff --git a/chart2/source/view/main/SeriesPlotterContainer.hxx 
b/chart2/source/view/main/SeriesPlotterContainer.hxx
index 578f2ba2760c..38f3c8b909c8 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.hxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.hxx
@@ -151,7 +151,7 @@ private:
 sal_Int32 m_nMaxAxisIndex;
 
 bool m_bChartTypeUsesShiftedCategoryPositionPerDefault;
-bool m_bForceShiftPosition = false;
+bool m_bTableShiftPosition = false;
 sal_Int32 m_nDefaultDateNumberFormat;
 };
 
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index 7bb1dbced75c..9d2de1ea0497 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -2458,6 +2458,31 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159422)
 CPPUNIT_ASSERT_DOUBLES_EQUAL(6573, nYSymbol3, 20);
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159456)
+{
+// Given a document with chart, which have a datatable
+createSwDoc("charttable.odt");
+SwDoc* pDoc = getSwDoc();
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ Without the fix, this would fail:
+ - Expected: 1
+ - Actual  : 1.5
+ - In <>, XPath contents of child does not match
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[103]/textarray/text"_ostr,
+"1");
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[104]/textarray/text"_ostr,
+"2");
+}
+
 } // end of anonymous namespace
 
 CPPUNIT_PLUGIN_IMPLEMENT();


core.git: chart2/source sw/qa

2024-03-08 Thread Balazs Varga (via logerrit)
 chart2/source/view/main/DataTableView.cxx |9 +++---
 sw/qa/extras/layout/data/charttable.odt   |binary
 sw/qa/extras/layout/layout3.cxx   |   39 ++
 3 files changed, 44 insertions(+), 4 deletions(-)

New commits:
commit f4ba83e82aafc206d17d2fa66a27573ebc5a3624
Author: Balazs Varga 
AuthorDate: Wed Mar 6 22:52:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 8 09:41:15 2024 +0100

tdf#159422 - chart view: fix symbols position of data table legend

Calculate the correct/optimal row height after calculating and set
correct width of a table cell. Then we will have the correct row height
for the symbol positions.

Change-Id: I65bc0f0579ea100906b0b32449c2200a54c2a353
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164512
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/main/DataTableView.cxx 
b/chart2/source/view/main/DataTableView.cxx
index c3c807ca099b..eacd91a6a651 100644
--- a/chart2/source/view/main/DataTableView.cxx
+++ b/chart2/source/view/main/DataTableView.cxx
@@ -455,11 +455,9 @@ void DataTableView::createShapes(basegfx::B2DVector const& 
rStart, basegfx::B2DV
 nRow++;
 }
 
+// force recalculation of column widths in the table shape
 xBroadcaster->unlockBroadcasts();
-
-// force recalculation of all cells in the table shape
 pTableObject->DistributeColumns(0, nColumnCount, true, true);
-pTableObject->DistributeRows(0, nRowCount, true, true);
 
 xBroadcaster->lockBroadcasts();
 
@@ -477,6 +475,10 @@ void DataTableView::createShapes(basegfx::B2DVector const& 
rStart, basegfx::B2DV
 xPropertySet->setPropertyValue("Width", uno::Any(nColumnWidth));
 }
 
+// force recalculation of row heights in the table shape
+xBroadcaster->unlockBroadcasts();
+pTableObject->DistributeRows(0, nRowCount, true, true);
+
 if (bKeys)
 {
 sal_Int32 nTotalHeight = 0;
@@ -501,7 +503,6 @@ void DataTableView::createShapes(basegfx::B2DVector const& 
rStart, basegfx::B2DV
 }
 }
 }
-xBroadcaster->unlockBroadcasts();
 }
 
 void DataTableView::changePosition(sal_Int32 x, sal_Int32 y)
diff --git a/sw/qa/extras/layout/data/charttable.odt 
b/sw/qa/extras/layout/data/charttable.odt
new file mode 100644
index ..e8dfa37d8006
Binary files /dev/null and b/sw/qa/extras/layout/data/charttable.odt differ
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index f96b786cc093..7bb1dbced75c 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -2419,6 +2419,45 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159443)
 "4.3");
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159422)
+{
+// Given a document with chart, which have a datatable
+createSwDoc("charttable.odt");
+SwDoc* pDoc = getSwDoc();
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+CPPUNIT_ASSERT(pXmlDoc);
+ Without the fix, this would fail:
+ - Expected: 5877
+ - Actual  : 5649
+ - Delta   : 20
+sal_Int32 nYSymbol1
+= getXPath(
+  pXmlDoc,
+  
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[99]/polypolygon/polygon/point[1]"_ostr,
+  "y"_ostr)
+  .toInt32();
+CPPUNIT_ASSERT_DOUBLES_EQUAL(5877, nYSymbol1, 20);
+sal_Int32 nYSymbol2
+= getXPath(
+  pXmlDoc,
+  
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[100]/polypolygon/polygon/point[1]"_ostr,
+  "y"_ostr)
+  .toInt32();
+CPPUNIT_ASSERT_DOUBLES_EQUAL(6225, nYSymbol2, 20);
+sal_Int32 nYSymbol3
+= getXPath(
+  pXmlDoc,
+  
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[101]/polypolygon/polygon/point[1]"_ostr,
+  "y"_ostr)
+  .toInt32();
+CPPUNIT_ASSERT_DOUBLES_EQUAL(6573, nYSymbol3, 20);
+}
+
 } // end of anonymous namespace
 
 CPPUNIT_PLUGIN_IMPLEMENT();


core.git: chart2/source sw/qa

2024-03-08 Thread Balazs Varga (via logerrit)
 chart2/source/view/axes/VCartesianAxis.cxx |7 ++
 sw/qa/extras/layout/data/tdf159443.odt |binary
 sw/qa/extras/layout/layout3.cxx|   30 +
 3 files changed, 37 insertions(+)

New commits:
commit f856733ed18353b8ac7d7e19348cf9b1107cc14b
Author: Balazs Varga 
AuthorDate: Wed Mar 6 14:54:22 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 8 09:40:14 2024 +0100

tdf#159443 - chart view: fix Data table is not rendered below chart

If we have 1 dataseries we will have no tickmarks, in that case the
distance between two tickmarks is the width of the chart.

Change-Id: Ifea11329f1dcb80e8e390c1408306d1df7d49ded
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164471
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/axes/VCartesianAxis.cxx 
b/chart2/source/view/axes/VCartesianAxis.cxx
index 8163058ad5e0..a0c4a329d76d 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -1687,6 +1687,13 @@ void 
VCartesianAxis::createDataTableShape(std::unique_ptr const&
 nDistance *= 2;
 }
 
+if (nDistance <= 0)
+{
+// we only have one data series so we have no TickMarks, therefor 
calculate and use the table size
+auto rDelta = aEnd - aStart;
+nDistance = basegfx::fround(rDelta.getX());
+}
+
 if (nDistance > 0)
 {
 m_pDataTableView->createShapes(aStart, aEnd, nDistance);
diff --git a/sw/qa/extras/layout/data/tdf159443.odt 
b/sw/qa/extras/layout/data/tdf159443.odt
new file mode 100644
index ..8ec733aedb06
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf159443.odt differ
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index de11ac7d788d..f96b786cc093 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -2389,6 +2389,36 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, 
testPageBreakInHiddenSection)
 assertXPath(pXmlDoc, "//page[4]/body/section/infos/bounds"_ostr, 
"height"_ostr, u"0"_ustr);
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159443)
+{
+// Given a document with chart, which have a datatable
+createSwDoc("tdf159443.odt");
+SwDoc* pDoc = getSwDoc();
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+CPPUNIT_ASSERT(pXmlDoc);
+ Without the fix, this would fail:
+ - Expected: DataSeries1
+ - Actual  : 1.25
+ - In <>, XPath contents of child does not match
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[47]/textarray/text"_ostr,
+"DataSeries1");
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[49]/textarray/text"_ostr,
+"Category1");
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[51]/textarray/text"_ostr,
+"4.3");
+}
+
 } // end of anonymous namespace
 
 CPPUNIT_PLUGIN_IMPLEMENT();


core.git: formula/inc include/formula sc/inc sc/qa sc/README.md sc/source

2024-03-01 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc  |6 
 include/formula/compiler.hxx   |3 
 include/formula/opcode.hxx |2 
 sc/README.md   |1 
 sc/inc/helpids.h   |1 
 sc/inc/scfuncs.hrc |   12 
 sc/inc/scmatrix.hxx|2 
 sc/qa/extras/scfunctionlistobj.cxx |2 
 sc/qa/unit/data/functions/spreadsheet/fods/filter.fods | 5061 +
 sc/qa/unit/ucalc.cxx   |1 
 sc/source/core/data/funcdesc.cxx   |3 
 sc/source/core/inc/interpre.hxx|1 
 sc/source/core/tool/interpr1.cxx   |  173 
 sc/source/core/tool/interpr4.cxx   |1 
 sc/source/core/tool/parclass.cxx   |1 
 sc/source/core/tool/scmatrix.cxx   |   35 
 sc/source/core/tool/token.cxx  |1 
 sc/source/filter/excel/xlformula.cxx   |3 
 sc/source/filter/oox/formulabase.cxx   |3 
 19 files changed, 5307 insertions(+), 5 deletions(-)

New commits:
commit b0791dd9216224bdb266fd0d8c87df253b6d0583
Author: Balazs Varga 
AuthorDate: Mon Feb 26 16:13:33 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 1 18:31:35 2024 +0100

tdf#126573 Add Excel2021 array function FILTER to Calc

https://issues.oasis-open.org/browse/OFFICE-4156

TODO: add dynamic arrays would be useful: Older array formulas,
known as legacy array formulas, always return a fixed-size result
- they always spill into the same number of cells. The spilling behavior
described in this topic does not apply to legacy array formulas.

More info about it:

https://support.microsoft.com/en-gb/office/dynamic-array-formulas-and-spilled-array-behavior-205c6b06-03ba-4151-89a1-87a7eb36e531

Related Bug: https://bugs.documentfoundation.org/show_bug.cgi?id=127808

Change-Id: I1c3769ef33fa0207f55e1c96083717c2d90402e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163955
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 60460e93d38b..f0efc468ab6f 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -278,6 +278,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "VLOOKUP" , SC_OPCODE_V_LOOKUP },
 { "COM.MICROSOFT.XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
+{ "COM.MICROSOFT.FILTER" , SC_OPCODE_FILTER },
 { "ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for 
range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -727,6 +728,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "VLOOKUP" , SC_OPCODE_V_LOOKUP },
 { "_xlfn.XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
+{ "_xlfn._xlws.FILTER" , SC_OPCODE_FILTER },
 { "_xlfn.ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy 
for range list (union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1179,6 +1181,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "VLOOKUP" , SC_OPCODE_V_LOOKUP },
 { "XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
+{ "FILTER" , SC_OPCODE_FILTER },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -1632,6 +1635,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "VLOOKUP" , SC_OPCODE_V_LOOKUP },
 { "XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
+{ "FILTER" , SC_OPCODE_FILTER },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list 
(union)
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },  // ?? first character = I ??
@@ -2083,6 +2087,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "VLOOKUP" , SC_OPCODE_V_LOOKUP },
 { "XLOOKUP" , SC_OPCODE_X_LOOKUP },
 { "HLOOKUP" , SC_OPCODE_H_LOOKUP },
+{ "FILTER" , SC_OPCODE_FILTER },
 { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },
 { "OFFSET" , SC_OPCODE_OFFSET },
 { "INDEX" , SC_OPCODE_INDEX },
@@ -2515,6 +2520,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "VLOOKUP") , SC_OPCODE_V_LOOKUP },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "XLOOKUP") , SC_OPCODE_X_LOOKUP },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "HLOOKUP") , SC_OPCODE_H_LOOKUP },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "FILTER") , SC_OPCODE_FILTER },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MULTIRANGE") , 

core.git: sc/qa sc/source

2024-02-28 Thread Balazs Varga (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  380 +++-
 sc/source/core/tool/interpr1.cxx|   10 
 sc/source/core/tool/interpr4.cxx|1 
 3 files changed, 375 insertions(+), 16 deletions(-)

New commits:
commit c7664873f8aff4e1fa4f857e87821a49f858a73b
Author: Balazs Varga 
AuthorDate: Tue Feb 27 14:33:53 2024 +0100
Commit: Balazs Varga 
CommitDate: Wed Feb 28 15:31:23 2024 +0100

tdf#159467 XLOOKUP propagate error only for active paths

because XLOOKUP have [if_not_found] optional attribute where
a valid match is not found, return the [if_not_found] value
you supply. Which can also return an error as a result from
another function.

If a valid match is not found, and [if_not_found] is missing, #N/A is 
returned.

follow-up for tdf#127293: d9635e9bb42cf2b744b8d2f74633e2a209a8e3fd

Change-Id: Ic8727c6b51e947ef767397c29095b93286bc7bd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164042
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
index fb464e08d008..f6cfb74b24c5 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods
@@ -1,7 +1,7 @@
 
 
 http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns
 :css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2024-01-16T18:30:06.27800PT1H14M20S23LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/578d9be50413a4bdc809f8b5f58cc177458f83252024-02-08T21:37:48.96900
+ 
2024-01-16T18:30:06.27800PT1H22M11S26LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/3f63df475b9c7039d93d0d66c74c4d0ad79894862024-02-27T14:15:45.12500
  
   
0
@@ -13,8 +13,8 @@
  view1
  
   
-   4
-   17
+   2
+   4
2
0
0
@@ -30,13 +30,13 @@
false
   
   
-   4
-   43
+   0
+   128
2
0
0
0
-   24
+   46
0
65
60
@@ -48,7 +48,7 @@
   
  
  Sheet1
- 1851
+ 2479
  0
  65
  60
@@ -1114,6 +1114,245 @@


   
+  
+   
+Ft
+  
+  
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   -
+   
+Ft
+   
+  
+  
+   
+Ft
+  
+  
+   
+   -
+   
+Ft
+   
+  
+  
+   
+   .
+   
+   .
+   
+  
+  
+   
+   .
+   
+   .
+   
+  
+  
+   
+   .
+   
+  
+  
+   
+   .
+   
+  
+  
+   
+   :
+   
+
+   
+  
+  
+   
+   :
+   
+   :
+   
+
+   
+  
+  
+   
+   .
+   
+   .
+   
+
+   
+   :
+   
+  
+  
+   
+   
+  
+  
+   -
+   
+   
+   
+  
+  
+   
+   
+  
+  
+   
+   -
+   
+   
+   
+  

core.git: sc/source

2024-02-22 Thread Balazs Varga (via logerrit)
 sc/source/core/tool/interpr1.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d9635e9bb42cf2b744b8d2f74633e2a209a8e3fd
Author: Balazs Varga 
AuthorDate: Thu Feb 22 12:01:48 2024 +0100
Commit: Balazs Varga 
CommitDate: Thu Feb 22 21:58:39 2024 +0100

Related: tdf#127293 Fix typo for function XLOOKUP

Wrong isStringSearch value for VectorSearchArguments
at svExternalSingleRef argument.
Also more clean-up.

Change-Id: Idc5a953638b90704586754d07f5096d7b5615e17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163736
Tested-by: Jenkins
Reviewed-by: Sahil Gautam 
Reviewed-by: Balazs Varga 

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index c33e74ba9c3e..5b04dca96b4e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8011,7 +8011,7 @@ void ScInterpreter::ScXLookup()
 }
 else
 {
-vsa.isStringSearch = false;
+vsa.isStringSearch = true;
 vsa.sSearchStr = pToken->GetString();
 }
 }
@@ -10894,10 +10894,8 @@ bool ScInterpreter::SearchVectorForValue( 
VectorSearchArguments& vsa )
 rParam.nTab  = vsa.nTab1;
 
 ScQueryEntry& rEntry = rParam.GetEntry(0);
-rEntry = rParam.GetEntry(0);
 rEntry.nField = vsa.eSearchMode != searchrev ? vsa.nCol1 : vsa.nCol2;
 rEntry.bDoQuery = true;
-ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
 switch ( vsa.eMatchMode )
 {
 case exactorNA :
@@ -10943,6 +10941,8 @@ bool ScInterpreter::SearchVectorForValue( 
VectorSearchArguments& vsa )
 PushIllegalParameter();
 return false;
 }
+
+ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
 if ( vsa.isStringSearch )
 {
 rItem.meType   = ScQueryEntry::ByString;


core.git: Branch 'libreoffice-24-2-1' - writerfilter/qa writerfilter/source

2024-02-22 Thread Balazs Varga (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx|6 ++
 writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|5 -
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 0a300e60ed73f76eeb61035086df6cf857a2fa85
Author: Balazs Varga 
AuthorDate: Tue Feb 20 20:26:25 2024 +0100
Commit: Michael Stahl 
CommitDate: Thu Feb 22 12:26:43 2024 +0100

tdf#158360 - sw, ooxml import - fix insertTextPortion crash

Before this patch da8dead8e9282010893cbd12519e107baf03cd1a
SvxUnoTextBase::insertTextPortion returned an empty XTextRange
in case of texts in comment. (SwTextAPIObject) Lets use
finishParagraphInsert which also give back an empty XTextRange.

regression from commit: da8dead8e9282010893cbd12519e107baf03cd1a
(tdf#73537 - sc: show author and creation date in calc comments)

Change-Id: I0b33e5b3cae32718a62a7be04b9a88562f85652c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163670
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
(cherry picked from commit 7cf3d5e3073dc5cffc64b6d9b32513e90087a3d4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163626
Reviewed-by: Miklos Vajna 
(cherry picked from commit 64248c5d42bbf46eeb4c41e79dd0b5e4a360e280)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163629
Reviewed-by: Xisco Fauli 
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
index 8452da0203ab..885443c5a210 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
@@ -155,6 +155,12 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo78333)
 // just care that it doesn't crash/assert
 loadFromFile(u"fdo78333-1-minimized.docx");
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf158360)
+{
+// just test that doc with annotation in TOC doesn't crash/assert
+loadFromFile(u"tdf158360.docx");
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx
new file mode 100644
index ..a46ee67c007e
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 4ee9f58f3e4c..58568a910514 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3253,7 +3253,10 @@ void DomainMapper_Impl::applyToggleAttributes(const 
PropertyMapPtr& pPropertyMap
 {
 xTOCTextCursor->goLeft(1, false);
 }
-xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
+if (IsInComments())
+xTextRange = 
xTextAppend->finishParagraphInsert(aValues, xTOCTextCursor);
+else
+xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
 SAL_WARN_IF(!xTextRange.is(), "writerfilter.dmapper", 
"insertTextPortion failed");
 if (!xTextRange.is())
 throw uno::Exception("insertTextPortion failed", 
nullptr);


core.git: Branch 'feature/cib_contract49' - 2 commits - officecfg/registry sc/inc sc/source sc/uiconfig

2024-02-22 Thread Balazs Varga (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   24 +
 sc/inc/formulaopt.hxx|4 
 sc/inc/globstr.hrc   |1 
 sc/source/core/tool/formulaopt.cxx   |   62 ++
 sc/source/filter/xml/xmlimprt.cxx|   77 +++
 sc/source/filter/xml/xmlimprt.hxx|1 
 sc/source/ui/inc/tpformula.hxx   |1 
 sc/source/ui/optdlg/tpformula.cxx|   12 
 sc/uiconfig/scalc/ui/optformula.ui   |  323 ---
 9 files changed, 354 insertions(+), 151 deletions(-)

New commits:
commit 5ec10019e8905eceecbf6f527f86f1d9eb9f48e8
Author: Balazs Varga 
AuthorDate: Wed Feb 14 22:34:10 2024 +0100
Commit: Balazs Varga 
CommitDate: Thu Feb 22 11:14:49 2024 +0100

tdf#124098 sc add global config setting "RecalcOptimalRowHeightMode"

to optimal row height recalculation for optimal document loading.

If the "RecalcOptimalRowHeightMode" is set to "Recalc always" we always
recalculate the optimal row heights at load time, without any warning 
dialog.
If the "RecalcOptimalRowHeightMode" is set to "Recalc" we never recalculate
the optimal row heights at load time, without any warning dialog.
If the "RecalcOptimalRowHeightMode" is set to "Ask before Recalc" we ask 
the user
if want to recalculate the optimal row heights at load time or not.

The default value is the same what we are doing now: "Recalc always"

This option was necessary, since optimal row height calculation depending 
on also
the result of the conditional formatted formulas and it takes a lot of time 
to calculate
the optimal row heights and load the document. Because we allow a lot of 
text/cell format
attribute which are effect on the cell size, therefor it is necessary to 
evaluate all
the formulas. Also if we have 20 condition for a cell range we need to 
evaluate all
the 20 formulas for all the cells and it is very expensive at load time.

Change-Id: I9288d11dd2f061f85fa36292a909402a6bb89ea9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163421
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 0cb348ea087e..1ae1f4015717 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1608,6 +1608,30 @@
   
   1
 
+
+  
+  
+Specifies whether to force a hard recalc after load on 
optimal row heights.
+  
+  
+
+  
+Recalc always
+  
+
+
+  
+Recalc never
+  
+
+
+  
+Ask before Recalc
+  
+
+  
+  0
+
   
 
 
diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx
index de46b52643c8..6cc1dedcbbb4 100644
--- a/sc/inc/formulaopt.hxx
+++ b/sc/inc/formulaopt.hxx
@@ -30,6 +30,7 @@ private:
 
 ScRecalcOptions meOOXMLRecalc;
 ScRecalcOptions meODFRecalc;
+ScRecalcOptions meReCalcOptiRowHeights;
 
 public:
 ScFormulaOptions();
@@ -64,6 +65,9 @@ public:
 void SetODFRecalcOptions( ScRecalcOptions eOpt ) { meODFRecalc = eOpt; }
 ScRecalcOptions GetODFRecalcOptions() const { return meODFRecalc; }
 
+void SetReCalcOptiRowHeights( ScRecalcOptions eOpt ) { 
meReCalcOptiRowHeights = eOpt; }
+ScRecalcOptions GetReCalcOptiRowHeights() const { return 
meReCalcOptiRowHeights; }
+
 void ResetFormulaSeparators();
 
 static void GetDefaultFormulaSeparators(OUString& rSepArg, OUString& 
rSepArrayCol, OUString& rSepArrayRow);
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 5e6880d973d1..2a1c4b112570 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -505,6 +505,7 @@
 #define STR_EDIT_EXISTING_COND_FORMATS  
NC_("STR_EDIT_EXISTING_COND_FORMATS", "The selected cell already contains 
conditional formatting. You can either edit the existing conditional format or 
you define a new overlapping conditional format.

 Do you want to edit the existing conditional format?")
 #define STR_QUERY_FORMULA_RECALC_ONLOAD_ODS 
NC_("STR_QUERY_FORMULA_RECALC_ONLOAD_ODS", "This document was last saved by an 
application other than %PRODUCTNAME.  Some formula cells may produce different 
results when recalculated.

Do you want to recalculate all formula cells in this document now?")
 #define STR_QUERY_FORMULA_RECALC_ONLOAD_XLS 
NC_("STR_QUERY_FORMULA_RECALC_ONLOAD_XLS", "This document was saved in Excel 
file format (.xlsx). Some formula cells may produce different results when 
recalculated. 

Do you want to recalculate

core.git: Branch 'libreoffice-7-6' - writerfilter/qa writerfilter/source

2024-02-22 Thread Balazs Varga (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx|6 ++
 writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|5 -
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 656540497a555cc23d66881c3b987cc93ba2203c
Author: Balazs Varga 
AuthorDate: Tue Feb 20 20:26:25 2024 +0100
Commit: Xisco Fauli 
CommitDate: Thu Feb 22 11:14:50 2024 +0100

tdf#158360 - sw, ooxml import - fix insertTextPortion crash

Before this patch da8dead8e9282010893cbd12519e107baf03cd1a
SvxUnoTextBase::insertTextPortion returned an empty XTextRange
in case of texts in comment. (SwTextAPIObject) Lets use
finishParagraphInsert which also give back an empty XTextRange.

regression from commit: da8dead8e9282010893cbd12519e107baf03cd1a
(tdf#73537 - sc: show author and creation date in calc comments)

Change-Id: I0b33e5b3cae32718a62a7be04b9a88562f85652c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163670
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
(cherry picked from commit 7cf3d5e3073dc5cffc64b6d9b32513e90087a3d4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163626
Reviewed-by: Miklos Vajna 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163720

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
index 97f856044d6c..c352c163cfe8 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
@@ -119,6 +119,12 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableThenTable)
 // Make sure the anchor text is the body text, not some cell.
 CPPUNIT_ASSERT_EQUAL(xBodyText, xAnchor->getText());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf158360)
+{
+// just test that doc with annotation in TOC doesn't crash/assert
+loadFromFile(u"tdf158360.docx");
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx
new file mode 100644
index ..a46ee67c007e
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 4fa434431555..bbdbb117556b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3228,7 +3228,10 @@ void DomainMapper_Impl::applyToggleAttributes(const 
PropertyMapPtr& pPropertyMap
 {
 xTOCTextCursor->goLeft(1, false);
 }
-xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
+if (IsInComments())
+xTextRange = 
xTextAppend->finishParagraphInsert(aValues, xTOCTextCursor);
+else
+xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
 SAL_WARN_IF(!xTextRange.is(), "writerfilter.dmapper", 
"insertTextPortion failed");
 if (!xTextRange.is())
 throw uno::Exception("insertTextPortion failed", 
nullptr);


core.git: Branch 'libreoffice-24-2' - writerfilter/qa writerfilter/source

2024-02-21 Thread Balazs Varga (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx|6 ++
 writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|5 -
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 64248c5d42bbf46eeb4c41e79dd0b5e4a360e280
Author: Balazs Varga 
AuthorDate: Tue Feb 20 20:26:25 2024 +0100
Commit: Miklos Vajna 
CommitDate: Thu Feb 22 08:26:14 2024 +0100

tdf#158360 - sw, ooxml import - fix insertTextPortion crash

Before this patch da8dead8e9282010893cbd12519e107baf03cd1a
SvxUnoTextBase::insertTextPortion returned an empty XTextRange
in case of texts in comment. (SwTextAPIObject) Lets use
finishParagraphInsert which also give back an empty XTextRange.

regression from commit: da8dead8e9282010893cbd12519e107baf03cd1a
(tdf#73537 - sc: show author and creation date in calc comments)

Change-Id: I0b33e5b3cae32718a62a7be04b9a88562f85652c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163670
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
(cherry picked from commit 7cf3d5e3073dc5cffc64b6d9b32513e90087a3d4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163626
Reviewed-by: Miklos Vajna 

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
index 8452da0203ab..885443c5a210 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
@@ -155,6 +155,12 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo78333)
 // just care that it doesn't crash/assert
 loadFromFile(u"fdo78333-1-minimized.docx");
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf158360)
+{
+// just test that doc with annotation in TOC doesn't crash/assert
+loadFromFile(u"tdf158360.docx");
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx
new file mode 100644
index ..a46ee67c007e
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 7a009d71aee8..0c0fa255d896 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3286,7 +3286,10 @@ void DomainMapper_Impl::applyToggleAttributes(const 
PropertyMapPtr& pPropertyMap
 {
 xTOCTextCursor->goLeft(1, false);
 }
-xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
+if (IsInComments())
+xTextRange = 
xTextAppend->finishParagraphInsert(aValues, xTOCTextCursor);
+else
+xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
 SAL_WARN_IF(!xTextRange.is(), "writerfilter.dmapper", 
"insertTextPortion failed");
 if (!xTextRange.is())
 throw uno::Exception("insertTextPortion failed", 
nullptr);


core.git: writerfilter/qa writerfilter/source

2024-02-21 Thread Balazs Varga (via logerrit)
 writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx|6 ++
 writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|5 -
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 7cf3d5e3073dc5cffc64b6d9b32513e90087a3d4
Author: Balazs Varga 
AuthorDate: Tue Feb 20 20:26:25 2024 +0100
Commit: Balazs Varga 
CommitDate: Wed Feb 21 20:36:38 2024 +0100

tdf#158360 - sw, ooxml import - fix insertTextPortion crash

Before this patch da8dead8e9282010893cbd12519e107baf03cd1a
SvxUnoTextBase::insertTextPortion returned an empty XTextRange
in case of texts in comment. (SwTextAPIObject) Lets use
finishParagraphInsert which also give back an empty XTextRange.

regression from commit: da8dead8e9282010893cbd12519e107baf03cd1a
(tdf#73537 - sc: show author and creation date in calc comments)

Change-Id: I0b33e5b3cae32718a62a7be04b9a88562f85652c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163670
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
index 8452da0203ab..885443c5a210 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
@@ -155,6 +155,12 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo78333)
 // just care that it doesn't crash/assert
 loadFromFile(u"fdo78333-1-minimized.docx");
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf158360)
+{
+// just test that doc with annotation in TOC doesn't crash/assert
+loadFromFile(u"tdf158360.docx");
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx
new file mode 100644
index ..a46ee67c007e
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/tdf158360.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index f73504824ea0..0b1ff5e0e6e3 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3287,7 +3287,10 @@ void 
DomainMapper_Impl::MergeAtContentImageRedlineWithNext(const css::uno::Refer
 {
 xTOCTextCursor->goLeft(1, false);
 }
-xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
+if (IsInComments())
+xTextRange = 
xTextAppend->finishParagraphInsert(aValues, xTOCTextCursor);
+else
+xTextRange = xTextAppend->insertTextPortion(rString, 
aValues, xTOCTextCursor);
 SAL_WARN_IF(!xTextRange.is(), "writerfilter.dmapper", 
"insertTextPortion failed");
 if (!xTextRange.is())
 throw uno::Exception("insertTextPortion failed", 
nullptr);


core.git: officecfg/registry sc/inc sc/source sc/uiconfig

2024-02-19 Thread Balazs Varga (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   24 
 sc/inc/formulaopt.hxx|4 
 sc/inc/globstr.hrc   |1 
 sc/source/core/tool/formulaopt.cxx   |   62 ++--
 sc/source/filter/xml/xmlimprt.cxx|   77 ++-
 sc/source/filter/xml/xmlimprt.hxx|1 
 sc/source/ui/inc/tpformula.hxx   |1 
 sc/source/ui/optdlg/tpformula.cxx|   12 ++
 sc/uiconfig/scalc/ui/optformula.ui   |   37 +++
 9 files changed, 211 insertions(+), 8 deletions(-)

New commits:
commit 2d2974f22ab59ea7dab1aee778308c4f50ff5464
Author: Balazs Varga 
AuthorDate: Wed Feb 14 22:34:10 2024 +0100
Commit: Balazs Varga 
CommitDate: Mon Feb 19 23:24:54 2024 +0100

tdf#124098 sc add global config setting "RecalcOptimalRowHeightMode"

to optimal row height recalculation for optimal document loading.

If the "RecalcOptimalRowHeightMode" is set to "Recalc always" we always
recalculate the optimal row heights at load time, without any warning 
dialog.
If the "RecalcOptimalRowHeightMode" is set to "Recalc" we never recalculate
the optimal row heights at load time, without any warning dialog.
If the "RecalcOptimalRowHeightMode" is set to "Ask before Recalc" we ask 
the user
if want to recalculate the optimal row heights at load time or not.

The default value is the same what we are doing now: "Recalc always"

This option was necessary, since optimal row height calculation depending 
on also
the result of the conditional formatted formulas and it takes a lot of time 
to calculate
the optimal row heights and load the document. Because we allow a lot of 
text/cell format
attribute which are effect on the cell size, therefor it is necessary to 
evaluate all
the formulas. Also if we have 20 condition for a cell range we need to 
evaluate all
the 20 formulas for all the cells and it is very expensive at load time.

Change-Id: I9288d11dd2f061f85fa36292a909402a6bb89ea9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163421
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index de97c822c7c1..5582b346910d 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1540,6 +1540,30 @@
   
   1
 
+
+  
+  
+Specifies whether to force a hard recalc after load on 
optimal row heights.
+  
+  
+
+  
+Recalc always
+  
+
+
+  
+Recalc never
+  
+
+
+  
+Ask before Recalc
+  
+
+  
+  0
+
   
 
 
diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx
index de46b52643c8..6cc1dedcbbb4 100644
--- a/sc/inc/formulaopt.hxx
+++ b/sc/inc/formulaopt.hxx
@@ -30,6 +30,7 @@ private:
 
 ScRecalcOptions meOOXMLRecalc;
 ScRecalcOptions meODFRecalc;
+ScRecalcOptions meReCalcOptiRowHeights;
 
 public:
 ScFormulaOptions();
@@ -64,6 +65,9 @@ public:
 void SetODFRecalcOptions( ScRecalcOptions eOpt ) { meODFRecalc = eOpt; }
 ScRecalcOptions GetODFRecalcOptions() const { return meODFRecalc; }
 
+void SetReCalcOptiRowHeights( ScRecalcOptions eOpt ) { 
meReCalcOptiRowHeights = eOpt; }
+ScRecalcOptions GetReCalcOptiRowHeights() const { return 
meReCalcOptiRowHeights; }
+
 void ResetFormulaSeparators();
 
 static void GetDefaultFormulaSeparators(OUString& rSepArg, OUString& 
rSepArrayCol, OUString& rSepArrayRow);
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index b5badb52dff3..04bfae4f6f82 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -504,6 +504,7 @@
 #define STR_EDIT_EXISTING_COND_FORMATS  
NC_("STR_EDIT_EXISTING_COND_FORMATS", "The selected cell already contains 
conditional formatting. You can either edit the existing conditional format or 
you define a new overlapping conditional format.

 Do you want to edit the existing conditional format?")
 #define STR_QUERY_FORMULA_RECALC_ONLOAD_ODS 
NC_("STR_QUERY_FORMULA_RECALC_ONLOAD_ODS", "This document was last saved by an 
application other than %PRODUCTNAME.  Some formula cells may produce different 
results when recalculated.

Do you want to recalculate all formula cells in this document now?")
 #define STR_QUERY_FORMULA_RECALC_ONLOAD_XLS 
NC_("STR_QUERY_FORMULA_RECALC_ONLOAD_XLS", "This document was saved in Excel 
file format (.xlsx). Some formula cells may produce different results when 
recalculated. 

Do you wa

core.git: formula/inc include/formula sc/inc sc/qa sc/README.md sc/source

2024-02-18 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc  |6 
 include/formula/compiler.hxx   |2 
 include/formula/opcode.hxx |2 
 sc/README.md   |1 
 sc/inc/helpids.h   |1 
 sc/inc/scfuncs.hrc |   14 
 sc/qa/extras/scfunctionlistobj.cxx |2 
 sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods | 3753 +
 sc/qa/unit/ucalc.cxx   |1 
 sc/source/core/data/funcdesc.cxx   |1 
 sc/source/core/data/queryiter.cxx  |   39 
 sc/source/core/inc/interpre.hxx|3 
 sc/source/core/tool/interpr1.cxx   |  180 
 sc/source/core/tool/interpr4.cxx   |1 
 sc/source/core/tool/parclass.cxx   |3 
 sc/source/core/tool/token.cxx  |1 
 sc/source/filter/excel/xlformula.cxx   |3 
 sc/source/filter/oox/formulabase.cxx   |3 
 18 files changed, 3988 insertions(+), 28 deletions(-)

New commits:
commit b36ecef07a4933c0943b27ea937f31e1df2e77cd
Author: Balazs Varga 
AuthorDate: Mon Feb 12 21:36:30 2024 +0100
Commit: Balazs Varga 
CommitDate: Sun Feb 18 23:13:01 2024 +0100

tdf#128425 Add Excel2021 function XMATCH to Calc

https://issues.oasis-open.org/browse/OFFICE-4155

Change-Id: I7791ab873cf62ce882feba75dc0d722bc5990f9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163260
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 835d928ea4a8..60460e93d38b 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -266,6 +266,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "INDIRECT" , SC_OPCODE_INDIRECT },
 { "ADDRESS" , SC_OPCODE_ADDRESS },
 { "MATCH" , SC_OPCODE_MATCH },
+{ "COM.MICROSOFT.XMATCH" , SC_OPCODE_X_MATCH },
 { "COUNTBLANK" , SC_OPCODE_COUNT_EMPTY_CELLS },
 { "COUNTIF" , SC_OPCODE_COUNT_IF },
 { "SUMIF" , SC_OPCODE_SUM_IF },
@@ -714,6 +715,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "INDIRECT" , SC_OPCODE_INDIRECT },
 { "ADDRESS" , SC_OPCODE_ADDRESS },
 { "MATCH" , SC_OPCODE_MATCH },
+{ "_xlfn.XMATCH" , SC_OPCODE_X_MATCH },
 { "COUNTBLANK" , SC_OPCODE_COUNT_EMPTY_CELLS },
 { "COUNTIF" , SC_OPCODE_COUNT_IF },
 { "SUMIF" , SC_OPCODE_SUM_IF },
@@ -1165,6 +1167,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "INDIRECT" , SC_OPCODE_INDIRECT },
 { "ADDRESS" , SC_OPCODE_ADDRESS },
 { "MATCH" , SC_OPCODE_MATCH },
+{ "XMATCH" , SC_OPCODE_X_MATCH },
 { "COUNTBLANK" , SC_OPCODE_COUNT_EMPTY_CELLS },
 { "COUNTIF" , SC_OPCODE_COUNT_IF },
 { "SUMIF" , SC_OPCODE_SUM_IF },
@@ -1617,6 +1620,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "INDIRECT" , SC_OPCODE_INDIRECT },
 { "ADDRESS" , SC_OPCODE_ADDRESS },
 { "MATCH" , SC_OPCODE_MATCH },
+{ "XMATCH" , SC_OPCODE_X_MATCH },
 { "COUNTBLANK" , SC_OPCODE_COUNT_EMPTY_CELLS },
 { "COUNTIF" , SC_OPCODE_COUNT_IF },
 { "SUMIF" , SC_OPCODE_SUM_IF },
@@ -2067,6 +2071,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "INDIRECT" , SC_OPCODE_INDIRECT },
 { "ADDRESS" , SC_OPCODE_ADDRESS },
 { "MATCH" , SC_OPCODE_MATCH },
+{ "XMATCH" , SC_OPCODE_X_MATCH },
 { "COUNTBLANK" , SC_OPCODE_COUNT_EMPTY_CELLS },
 { "COUNTIF" , SC_OPCODE_COUNT_IF },
 { "SUMIF" , SC_OPCODE_SUM_IF },
@@ -2498,6 +2503,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "INDIRECT") , SC_OPCODE_INDIRECT },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "ADDRESS") , SC_OPCODE_ADDRESS },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "MATCH") , SC_OPCODE_MATCH },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "XMATCH") , SC_OPCODE_X_MATCH },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "COUNTBLANK") , 
SC_OPCODE_COUNT_EMPTY_CELLS },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "COUNTIF") , SC_OPCODE_COUNT_IF },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SUMIF") , SC_OPCODE_SUM_IF },
diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx
index 479008dfb1a2..f3187ae95baa 100644
--- a/include/formula/compiler.hxx
+++ b/include/formula/compiler.hxx
@@ -399,7 +399,7 @@
 #define SC_OPCODE_ISPMT 386
 #define SC_OPCODE_HYPERLINK 387
 #define SC_OPCODE_X_LOOKUP  388
-// free: 389
+#define SC_OPCODE_X_MATCH   389
 #define SC_OPCODE_GET_PIVOT_DATA390
 #define SC_OPCODE_EUROCONVERT   391
 #define SC_OPCODE_NUMBERVALUE   392
diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx
index ad056a9b0b50..3c8053ffb1e3 100644
--- a/includ

  1   2   3   4   5   6   7   >