core.git: Branch 'libreoffice-24-8' - sw/qa sw/source
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
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
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'
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
core.git: sc/uiconfig
sc/uiconfig/scalc/ui/optformula.ui | 288 ++--- 1 file changed, 144 insertions(+), 144 deletions(-) New commits: commit d6f2f7aca93796370575875a291e15436922b2e9 Author: Balazs Varga AuthorDate: Thu Feb 15 11:38:27 2024 +0100 Commit: Balazs Varga CommitDate: Fri Feb 16 12:15:41 2024 +0100 Resave with newer Glade version Change-Id: Id3a9d60a82cfee0ccbb1275a32274697b54ebff3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163445 Reviewed-by: Balazs Varga Tested-by: Balazs Varga diff --git a/sc/uiconfig/scalc/ui/optformula.ui b/sc/uiconfig/scalc/ui/optformula.ui index 68a2ad8166a9..545c0759fd1c 100644 --- a/sc/uiconfig/scalc/ui/optformula.ui +++ b/sc/uiconfig/scalc/ui/optformula.ui @@ -1,77 +1,77 @@ - + - + True -False +False True -6 -12 +6 +12 True -False -0 -none +False +0 +none - + True -False -6 +False 12 6 +6 Use English function names True -True -False -True -True +True +False +True +True -0 -1 +0 +1 - + True -False +False True -12 +12 True -False +False True -1 -0 +1 +0 True -False +False Formula _syntax: -True -formulasyntax +True +formulasyntax -0 -0 +0 +0 -0 -0 +0 +0 @@ -79,7 +79,7 @@ True -False +False Formula Options @@ -88,57 +88,57 @@ -0 -0 +0 +0 True -False -0 -none +False +0 +none - + True -False -6 -12 +False 12 6 +6 +12 True -False +False Excel 2007 and newer: -True -ooxmlrecalc +True +ooxmlrecalc 0 -0 -0 +0 +0 True -False +False ODF spreadsheet (not saved by %PRODUCTNAME): -True -odfrecalc +True +odfrecalc 0 -0 -1 +0 +1 True -False +False True Always recalculate @@ -147,14 +147,14 @@ -1 -0 +1 +0 True -False +False True Always recalculate @@ -163,8 +163,8 @@ -1 -1 +1 +1 @@ -172,7 +172,7 @@ True -False +False Recalculation on File Load @@ -181,79 +181,79 @@ -0 -3 +
core.git: sc/qa sc/source
sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods | 79 +-- sc/source/core/tool/interpr1.cxx| 107 ++-- 2 files changed, 108 insertions(+), 78 deletions(-) New commits: commit 41192a36796155f8cd6ac733f5ef84767edf300f Author: Balazs Varga AuthorDate: Fri Feb 9 00:07:41 2024 +0100 Commit: Balazs Varga CommitDate: Fri Feb 9 13:23:51 2024 +0100 Related: tdf#127293 Fix function XLOOKUP with nested XLOOKUP functions to return reference of cells what other functions can use (e.g.:SUM): =SUM(XLOOKUP(B3,B6:B10,E6:E10):XLOOKUP(C3,B6:B10,E6:E10)) XLOOKUP function returns a reference to a range of cell(s). Change-Id: I06007aba7017315fc02a92b120f842244b7cc3c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163129 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 49ecf573b50c..fb464e08d008 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.27800PT1H12M22LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64 LibreOffice_project/2b1f5fa987f02ec8014dbf6837c6b090faf11f2d2024-02-01T11:50:13.78900 + 2024-01-16T18:30:06.27800PT1H14M20S23LibreOfficeDev/24.8.0.0.alpha0$Windows_X86_64 LibreOffice_project/578d9be50413a4bdc809f8b5f58cc177458f83252024-02-08T21:37:48.96900 0 @@ -13,8 +13,8 @@ view1 - 2 - 0 + 4 + 17 2 0 0 @@ -30,13 +30,13 @@ false - 1 - 115 + 4 + 43 2 0 0 0 - 0 + 24 0 65 60 @@ -48,7 +48,7 @@ Sheet1 - 1837 + 1851 0 65 60 @@ -126,7 +126,7 @@ true - Munkalap1 + Sheet1 Sheet2 @@ -1612,9 +1612,6 @@ - - - @@ -1719,7 +1716,7 @@ ???(???) - .00.00, 00:00:00 + .00.00, 00:00:00 @@ -1998,10 +1995,10 @@ - #HIÁNYZIK + #N/A - #HIÁNYZIK + #N/A IGAZ @@ -2161,10 +2158,10 @@ - #HIÁNYZIK + #N/A - #HIÁNYZIK + #N/A IGAZ @@ -2509,10 +2506,10 @@ - #HIÁNYZIK + #N/A - #HIÁNYZIK + #N/A IGAZ @@ -2524,10 +2521,10 @@ - #HIÁNYZIK + #N/A - #HIÁNYZIK + #N/A IGAZ @@ -2712,7 +2709,7 @@ -
core.git: sc/inc sc/qa sc/source
sc/inc/queryiter.hxx| 18 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods | 406 ++-- sc/source/core/data/queryiter.cxx | 57 +- sc/source/core/tool/interpr1.cxx| 22 4 files changed, 423 insertions(+), 80 deletions(-) New commits: commit 68738bd0ac262819b13ea7e11af67ee493b9b3e1 Author: Balazs Varga AuthorDate: Thu Feb 1 14:36:24 2024 +0100 Commit: Balazs Varga CommitDate: Thu Feb 8 08:25:15 2024 +0100 Related: tdf#127293 Fix function XLOOKUP binary search corner cases Fix some binary search (vertical) corner cases in case of XLOOKUP where we looking for the first matches. Change-Id: I6cdc778350989e0802ffc54284fdab9b8a2bece4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162877 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/sc/inc/queryiter.hxx b/sc/inc/queryiter.hxx index e34a7be20e13..662fe8a9cf35 100644 --- a/sc/inc/queryiter.hxx +++ b/sc/inc/queryiter.hxx @@ -171,8 +171,16 @@ protected: nTestEqualConditionFulfilled = nTestEqualConditionEnabled | nTestEqualConditionMatched }; +enum SortedBinarySearchBits +{ +nBinarySearchDisabled = 0x00, +nSearchbAscd = 0x01, +nSearchbDesc = 0x02, +}; + sal_uInt8nStopOnMismatch; sal_uInt8nTestEqualCondition; +sal_uInt8nSortedBinarySearch; boolbAdvanceQuery; boolbIgnoreMismatchOnLeadingStrings; boolbSortedBinarySearch; @@ -263,8 +271,11 @@ public: { bAdvanceQuery = bVal; } voidAdvanceQueryParamEntryField(); -voidSetSortedBinarySearchMode( bool bVal ) -{ bSortedBinarySearch = bVal; } +voidSetSortedBinarySearchMode( sal_Int8 nSearchMode ) +{ +nSortedBinarySearch = sal::static_int_cast(nSearchMode == 2 ? +nSearchbAscd : (nSearchMode == -2 ? nSearchbDesc : nBinarySearchDisabled)); +} voidSetXlookupMode( bool bVal ) { bXLookUp = bVal; } @@ -309,11 +320,12 @@ class ScQueryCellIterator using Base::nStopOnMismatchEnabled; using Base::nTestEqualCondition; using Base::nTestEqualConditionEnabled; +using Base::nSortedBinarySearch; +using Base::nBinarySearchDisabled; using Base::PerformQuery; using Base::getThisResult; using Base::nBestFitCol; using Base::nBestFitRow; -using Base::bSortedBinarySearch; using Base::bXLookUp; bool GetThis(); diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods b/sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods index 16abcbcacb4b..49ecf573b50c 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
core.git: Branch 'libreoffice-24-2' - cui/source include/sfx2 include/svx include/vcl sfx2/sdi sfx2/source solenv/clang-format
cui/source/factory/dlgfact.cxx | 11 + cui/source/factory/dlgfact.hxx |8 ++ cui/source/inc/securityoptions.hxx |1 cui/source/options/optinet2.cxx| 38 ++--- cui/source/options/securityoptions.cxx | 30 +- include/sfx2/sfxdlg.hxx|2 + include/sfx2/sfxsids.hrc |1 include/svx/svxdlg.hxx |2 + include/vcl/abstdlg.hxx|8 ++ sfx2/sdi/appslots.sdi |4 +++ sfx2/sdi/sfx.sdi | 17 ++ sfx2/source/appl/appserv.cxx | 14 sfx2/source/view/viewfrm.cxx |3 -- solenv/clang-format/excludelist|2 - 14 files changed, 102 insertions(+), 39 deletions(-) New commits: commit 3bbcae765e58bb02ca422edbb27d69388fdba4eb Author: Balazs Varga AuthorDate: Mon Jan 22 13:19:26 2024 +0100 Commit: Thorsten Behrens CommitDate: Thu Feb 1 10:43:36 2024 +0100 tdf#159128 UI: Open Security settings option directly Open Security Option Setting page directly from Security pop up warning infobar. Follow up of 1f440348eb0892fd2c9597806d87b5fe9d60d49a (tdf#157482 UI: Turn Security Warnings popup windows into infobars) cherry-pick from commit: 2c16ea16b305dc546164e28cf6b212ebccc44ec4 Change-Id: Iac116677801bdb13a9680bcfdf532ec3d874ce0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162393 Tested-by: Jenkins Reviewed-by: Balazs Varga Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162491 Reviewed-by: Thorsten Behrens diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index ffb5fd301069..c53e3432a2a4 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -116,6 +116,7 @@ IMPL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg) IMPL_ABSTDLG_CLASS(AbstractSignatureLineDialog) IMPL_ABSTDLG_CLASS(AbstractSignSignatureLineDialog) IMPL_ABSTDLG_CLASS(AbstractSvxCharacterMapDialog) +IMPL_ABSTDLG_CLASS(AbstractSecurityOptionsDialog) IMPL_ABSTDLG_CLASS(AbstractSvxHpLinkDlg) IMPL_ABSTDLG_CLASS(AbstractSvxJSearchOptionsDialog) IMPL_ABSTDLG_CLASS(AbstractSvxMultiPathDialog) @@ -874,6 +875,16 @@ VclPtr AbstractDialogFactory_Impl::CreateFrameDialog(weld::Wi return nullptr; } +VclPtr AbstractDialogFactory_Impl::CreateSvxSecurityOptionsDialog(weld::Window* pParent) +{ +return VclPtr::Create(std::make_unique(pParent)); +} + +bool AbstractSecurityOptionsDialog_Impl::SetSecurityOptions() +{ +return m_xDlg->SetSecurityOptions(); +} + // TabDialog outside the drawing layer VclPtr AbstractDialogFactory_Impl::CreateAutoCorrTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet) { diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 1da0ec35ec38..02ba9a1b0f9d 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -402,6 +403,11 @@ DECL_ABSTDLG_CLASS_UNIQUE(AbstractSvxCharacterMapDialog,SfxAbstractDialog,SvxCha DECL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg,ScreenshotAnnotationDlg) }; +// AbstractSecurityOptionsDialog_Impl +DECL_ABSTDLG_CLASS(AbstractSecurityOptionsDialog, svx::SecurityOptionsDialog) +virtual bool SetSecurityOptions() override; +}; + // AbstractSignatureLineDialog_Impl DECL_ABSTDLG_CLASS(AbstractSignatureLineDialog,SignatureLineDialog) }; @@ -592,6 +598,8 @@ public: virtual VclPtr CreateScreenshotAnnotationDlg(weld::Dialog& rParentDialog) override; +virtual VclPtr CreateSvxSecurityOptionsDialog(weld::Window* pParent) override; + virtual VclPtr CreateSignatureLineDialog(weld::Window* pParent, const css::uno::Reference xModel, bool bEditExisting) override; diff --git a/cui/source/options/securityoptions.hxx b/cui/source/inc/securityoptions.hxx similarity index 99% rename from cui/source/options/securityoptions.hxx rename to cui/source/inc/securityoptions.hxx index 7884ccfbd30e..6839e3931822 100644 --- a/cui/source/options/securityoptions.hxx +++ b/cui/source/inc/securityoptions.hxx @@ -72,6 +72,7 @@ namespace svx DECL_LINK(ShowPersonalInfosToggle, weld::Toggleable&, void); +bool SetSecurityOptions(); void changeKeepSecurityInfosEnabled(); }; } diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 083c3e40f784..eaf0e8616bfd 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -52,7 +51,7 @@ #include #include #include -#include "securityoptions.hxx" +#include #include "webconninfo.hxx" #include "certpath.hxx" #include "tsaurls.hxx" @@ -834,25 +833,6 @@ DeactivateRC SvxSecurityTab
core.git: Branch 'libreoffice-24-2' - sw/source
sw/source/core/access/AccessibilityCheck.cxx |4 1 file changed, 4 insertions(+) New commits: commit 5f6542e77a3ae8313199ca6704ef050be336a2f0 Author: Balazs Varga AuthorDate: Mon Jan 29 22:05:28 2024 +0100 Commit: Michael Stahl CommitDate: Tue Jan 30 18:11:32 2024 +0100 tdf#159384 - A11y: fix simulated numbering warning in TOC Do not complane about simulated numbering warning in TOC if its contains a list with numbering. Change-Id: Ib6a10d18d19cc9cb44ffd5b79e2106af457985d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162707 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 24a3f8269e427875fbe8013f88e83fc41b90b33a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162717 diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx index e4eaa089ef2f..e515b5cae7ed 100644 --- a/sw/source/core/access/AccessibilityCheck.cxx +++ b/sw/source/core/access/AccessibilityCheck.cxx @@ -344,6 +344,10 @@ public: if (!pNextTextNode) return; +SwSectionNode* pNd = pCurrentTextNode->FindSectionNode(); +if (pNd && pNd->GetSection().GetType() == SectionType::ToxContent) +return; + for (auto& rPair : m_aNumberingCombinations) { if (pCurrentTextNode->GetText().startsWith(rPair.first)
core.git: Branch 'libreoffice-7-6' - sw/source
sw/source/core/access/AccessibilityCheck.cxx |4 1 file changed, 4 insertions(+) New commits: commit 211f6ff53715432af32a5e94923edd16ef9475cb Author: Balazs Varga AuthorDate: Mon Jan 29 22:05:28 2024 +0100 Commit: Christian Lohmaier CommitDate: Tue Jan 30 13:46:40 2024 +0100 tdf#159384 - A11y: fix simulated numbering warning in TOC Do not complane about simulated numbering warning in TOC if its contains a list with numbering. Change-Id: Ib6a10d18d19cc9cb44ffd5b79e2106af457985d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162707 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 24a3f8269e427875fbe8013f88e83fc41b90b33a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162718 diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx index 42f4cf7303c9..6491c4430011 100644 --- a/sw/source/core/access/AccessibilityCheck.cxx +++ b/sw/source/core/access/AccessibilityCheck.cxx @@ -307,6 +307,10 @@ public: if (!pNextTextNode) return; +SwSectionNode* pNd = pCurrentTextNode->FindSectionNode(); +if (pNd && pNd->GetSection().GetType() == SectionType::ToxContent) +return; + for (auto& rPair : m_aNumberingCombinations) { if (pCurrentTextNode->GetText().startsWith(rPair.first)
core.git: sw/source
sw/source/core/access/AccessibilityCheck.cxx |4 1 file changed, 4 insertions(+) New commits: commit 24a3f8269e427875fbe8013f88e83fc41b90b33a Author: Balazs Varga AuthorDate: Mon Jan 29 22:05:28 2024 +0100 Commit: Balazs Varga CommitDate: Tue Jan 30 11:24:39 2024 +0100 tdf#159384 - A11y: fix simulated numbering warning in TOC Do not complane about simulated numbering warning in TOC if its contains a list with numbering. Change-Id: Ib6a10d18d19cc9cb44ffd5b79e2106af457985d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162707 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx index 5d98f7bd731e..d43a6919adf2 100644 --- a/sw/source/core/access/AccessibilityCheck.cxx +++ b/sw/source/core/access/AccessibilityCheck.cxx @@ -344,6 +344,10 @@ public: if (!pNextTextNode) return; +SwSectionNode* pNd = pCurrentTextNode->FindSectionNode(); +if (pNd && pNd->GetSection().GetType() == SectionType::ToxContent) +return; + for (auto& rPair : m_aNumberingCombinations) { if (pCurrentTextNode->GetText().startsWith(rPair.first)
core.git: cui/source include/sfx2 include/svx include/vcl sfx2/sdi sfx2/source solenv/clang-format
cui/source/factory/dlgfact.cxx | 11 + cui/source/factory/dlgfact.hxx |8 ++ cui/source/inc/securityoptions.hxx |1 cui/source/options/optinet2.cxx| 39 ++--- cui/source/options/securityoptions.cxx | 31 +- include/sfx2/sfxdlg.hxx|2 + include/sfx2/sfxsids.hrc |1 include/svx/svxdlg.hxx |2 + include/vcl/abstdlg.hxx|8 ++ sfx2/sdi/appslots.sdi |4 +++ sfx2/sdi/sfx.sdi | 17 ++ sfx2/source/appl/appserv.cxx | 14 +++ sfx2/source/view/viewfrm.cxx |3 -- solenv/clang-format/excludelist|2 - 14 files changed, 103 insertions(+), 40 deletions(-) New commits: commit 2c16ea16b305dc546164e28cf6b212ebccc44ec4 Author: Balazs Varga AuthorDate: Mon Jan 22 13:19:26 2024 +0100 Commit: Balazs Varga CommitDate: Wed Jan 24 09:06:39 2024 +0100 tdf#159128 UI: Open Security settings option directly Open Security Option Setting page directly from Security pop up warning infobar. Follow up of 1f440348eb0892fd2c9597806d87b5fe9d60d49a (tdf#157482 UI: Turn Security Warnings popup windows into infobars) Change-Id: Iac116677801bdb13a9680bcfdf532ec3d874ce0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162393 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index b5e852cbb292..6979167de569 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -116,6 +116,7 @@ IMPL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg) IMPL_ABSTDLG_CLASS_ASYNC(AbstractSignatureLineDialog, SignatureLineDialog) IMPL_ABSTDLG_CLASS_ASYNC(AbstractSignSignatureLineDialog, SignSignatureLineDialog) IMPL_ABSTDLG_CLASS_ASYNC(AbstractSvxCharacterMapDialog, SvxCharacterMap) +IMPL_ABSTDLG_CLASS(AbstractSecurityOptionsDialog) IMPL_ABSTDLG_CLASS(AbstractSvxHpLinkDlg) IMPL_ABSTDLG_CLASS(AbstractSvxJSearchOptionsDialog) IMPL_ABSTDLG_CLASS(AbstractSvxMultiPathDialog) @@ -874,6 +875,16 @@ VclPtr AbstractDialogFactory_Impl::CreateFrameDialog(weld::Wi return nullptr; } +VclPtr AbstractDialogFactory_Impl::CreateSvxSecurityOptionsDialog(weld::Window* pParent) +{ +return VclPtr::Create(std::make_unique(pParent)); +} + +bool AbstractSecurityOptionsDialog_Impl::SetSecurityOptions() +{ +return m_xDlg->SetSecurityOptions(); +} + // TabDialog outside the drawing layer VclPtr AbstractDialogFactory_Impl::CreateAutoCorrTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet) { diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 0125c975ae79..3c8601140164 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -402,6 +403,11 @@ DECL_ABSTDLG_CLASS_SHARED_ASYNC(AbstractSvxCharacterMapDialog,SfxAbstractDialog, DECL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg,ScreenshotAnnotationDlg) }; +// AbstractSecurityOptionsDialog_Impl +DECL_ABSTDLG_CLASS(AbstractSecurityOptionsDialog, svx::SecurityOptionsDialog) +virtual bool SetSecurityOptions() override; +}; + // AbstractSignatureLineDialog_Impl DECL_ABSTDLG_CLASS_ASYNC(AbstractSignatureLineDialog,SignatureLineDialog) virtual void Apply() override { m_xDlg->Apply(); } @@ -594,6 +600,8 @@ public: virtual VclPtr CreateScreenshotAnnotationDlg(weld::Dialog& rParentDialog) override; +virtual VclPtr CreateSvxSecurityOptionsDialog(weld::Window* pParent) override; + virtual VclPtr CreateSignatureLineDialog(weld::Window* pParent, const css::uno::Reference xModel, bool bEditExisting) override; diff --git a/cui/source/options/securityoptions.hxx b/cui/source/inc/securityoptions.hxx similarity index 99% rename from cui/source/options/securityoptions.hxx rename to cui/source/inc/securityoptions.hxx index 10534d4426a7..981c9ac29bf8 100644 --- a/cui/source/options/securityoptions.hxx +++ b/cui/source/inc/securityoptions.hxx @@ -75,6 +75,7 @@ namespace svx DECL_LINK(ShowPersonalInfosToggle, weld::Toggleable&, void); +bool SetSecurityOptions(); void changeKeepSecurityInfosEnabled(); }; } diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index de34b031e8ce..eaf0e8616bfd 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -52,7 +51,7 @@ #include #include #include -#include "securityoptions.hxx" +#include #include "webconninfo.hxx" #include "certpath.hxx" #include "tsaurls.hxx" @@ -834,25 +833,6 @@ DeactivateRC SvxSecurityTabPage::DeactivatePage( SfxItemSet* _pS
core.git: Branch 'libreoffice-24-2' - sd/source
sd/source/core/drawdoc3.cxx | 64 +++- 1 file changed, 46 insertions(+), 18 deletions(-) New commits: commit 7f66797b10b91242c7025215156922bb17c5a777 Author: Balazs Varga AuthorDate: Fri Dec 29 12:01:10 2023 +0100 Commit: Michael Stahl CommitDate: Thu Jan 11 13:00:06 2024 +0100 tdf#157742 tdf#157783 - sd: fix copy master slides style Copy SlideLayout property and themes from the old slide to the new one. Change-Id: I7310200c731839a606981c6d63c8d0d4f9ec0536 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161401 Tested-by: Jenkins Reviewed-by: Balazs Varga (cherry picked from commit 167659bf16a68c27fa547e6eccd62c1a6f69b057) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161420 Reviewed-by: Michael Stahl diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 5062630edb88..5310789d2988 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -67,11 +67,11 @@ namespace { class InsertBookmarkAsPage_FindDuplicateLayouts { public: -explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::map &rLayoutsToTransfer ) +explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::vector &rLayoutsToTransfer ) : mrLayoutsToTransfer(rLayoutsToTransfer) {} void operator()( SdDrawDocument&, SdPage const *, bool, SdDrawDocument* ); private: -std::map &mrLayoutsToTransfer; +std::vector &mrLayoutsToTransfer; }; } @@ -85,11 +85,11 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc if( nIndex != -1 ) aLayout = aLayout.copy(0, nIndex); -std::map::const_iterator pIter = mrLayoutsToTransfer.find(aLayout); +std::vector::const_iterator pIter = +find(mrLayoutsToTransfer.begin(), mrLayoutsToTransfer.end(), aLayout); bool bFound = pIter != mrLayoutsToTransfer.end(); -sal_Int32 nLayout = 20; // blank page - master slide layout ID const sal_uInt16 nMPageCount = rDoc.GetMasterPageCount(); for (sal_uInt16 nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++) { @@ -110,15 +110,6 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc pBMMPage->GetLayoutName(), pBMMPage->GetName() + "_"); aLayout = pBMMPage->GetName(); -uno::Reference< drawing::XDrawPage > xOldPage(rDoc.GetMasterPage(nMPage)->getUnoPage(), uno::UNO_QUERY_THROW); -uno::Reference xPropSet(xOldPage, uno::UNO_QUERY_THROW); -if (xPropSet.is()) -{ -uno::Any aLayoutID = xPropSet->getPropertyValue("SlideLayout"); -if (aLayoutID.hasValue()) { -aLayoutID >>= nLayout; -} -} break; } else @@ -127,7 +118,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc } if (!bFound) -mrLayoutsToTransfer.insert({ aLayout, nLayout }); +mrLayoutsToTransfer.push_back(aLayout); } // Inserts a bookmark as a page @@ -508,7 +499,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( // Refactored copy'n'pasted layout name collection into IterateBookmarkPages -std::map aLayoutsToTransfer; +std::vector aLayoutsToTransfer; InsertBookmarkAsPage_FindDuplicateLayouts aSearchFunctor( aLayoutsToTransfer ); lcl_IterateBookmarkPages( *this, pBookmarkDoc, rBookmarkList, nBMSdPageCount, aSearchFunctor, ( rBookmarkList.empty() && pBookmarkDoc != this ) ); @@ -520,11 +511,14 @@ bool SdDrawDocument::InsertBookmarkAsPage( if( !aLayoutsToTransfer.empty() ) bMergeMasterPages = true; -for ( const auto& layout : aLayoutsToTransfer ) +std::map aSlideLayoutsToTransfer; +std::map> aThemesToTransfer; + +for ( const OUString& layoutName : aLayoutsToTransfer ) { StyleSheetCopyResultVector aCreatedStyles; -rStyleSheetPool.CopyLayoutSheets(layout.first, rBookmarkStyleSheetPool, aCreatedStyles); +rStyleSheetPool.CopyLayoutSheets(layoutName, rBookmarkStyleSheetPool, aCreatedStyles); if(!aCreatedStyles.empty()) { @@ -533,6 +527,29 @@ bool SdDrawDocument::InsertBookmarkAsPage( pUndoMgr->AddUndoAction(std::make_unique(this, aCreatedStyles, true)); } } + +// copy SlideLayout and Theme of the master slide +sal_Int32 nLayout = 20; // blank page - master slide layout ID +bool bIsMasterPage = false; +sal_uInt16 nBMPage = pBookmarkDoc->GetPageByName(layoutName, bIsMasterPage); +if (bIsMasterPage) +{ +uno::Reference< drawing::XDrawPage > xOldPage(pBookmarkDoc->GetMasterPage(nBMPage)->getUnoPage(), uno::UNO_QUERY_THROW); +SdrPage* pMasterPage = SdPage::getImplementation(xOldPage); +if (pM
core.git: Branch 'distro/allotropia/zeta-7-4' - desktop/Library_sofficeapp.mk lingucomponent/Module_lingucomponent.mk
desktop/Library_sofficeapp.mk |3 ++- lingucomponent/Module_lingucomponent.mk |8 +++- 2 files changed, 9 insertions(+), 2 deletions(-) New commits: commit 93741a53562a78ca626e9c1fce15004c07d901e3 Author: Balazs Varga AuthorDate: Thu Jan 4 10:13:47 2024 +0100 Commit: Balazs Varga CommitDate: Fri Jan 5 09:22:59 2024 +0100 Fix Fix --disable-curl build for wasm cherry-picked (partly) from: 5bf7c2fa57946cc3323a1d4ee1b2f31d805ae06f (Fix --disable-curl build) Change-Id: Ie0429b086d9b89d4a0c3b7b86afba08c3e831c2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161609 Tested-by: Balazs Varga Reviewed-by: Balazs Varga diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk index 70f4b07ea045..f27372cbddc6 100644 --- a/desktop/Library_sofficeapp.mk +++ b/desktop/Library_sofficeapp.mk @@ -24,9 +24,10 @@ $(eval $(call gb_Library_use_externals,sofficeapp, \ icu_headers \ icui18n \ icuuc \ +$(if $(ENABLE_CURL), \ $(if $(filter-out EMSCRIPTEN iOS,$(OS)), \ curl \ -)\ +))\ $(if $(ENABLE_ONLINE_UPDATE_MAR),\ orcus-parser \ orcus )\ diff --git a/lingucomponent/Module_lingucomponent.mk b/lingucomponent/Module_lingucomponent.mk index 13f1a829d98a..8cbd2ab19fa9 100644 --- a/lingucomponent/Module_lingucomponent.mk +++ b/lingucomponent/Module_lingucomponent.mk @@ -25,10 +25,16 @@ $(eval $(call gb_Module_add_targets,lingucomponent,\ )) endif +ifeq ($(ENABLE_CURL),TRUE) $(eval $(call gb_Module_add_targets,lingucomponent,\ $(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \ - Library_numbertext \ Library_LanguageTool \ )) +endif + +$(eval $(call gb_Module_add_targets,lingucomponent,\ + $(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \ + Library_numbertext \ +)) # vim: set noet sw=4 ts=4:
core.git: Branch 'distro/collabora/co-23.05' - sd/source
sd/source/core/drawdoc3.cxx | 64 +++- 1 file changed, 46 insertions(+), 18 deletions(-) New commits: commit 24d86ae7ffd8942098c0cbee4a8b45c0d205548a Author: Balazs Varga AuthorDate: Fri Dec 29 12:01:10 2023 +0100 Commit: Tomaž Vajngerl CommitDate: Tue Jan 2 09:58:29 2024 +0100 tdf#157742 tdf#157783 - sd: fix copy master slides style Copy SlideLayout property and themes from the old slide to the new one. Change-Id: I7310200c731839a606981c6d63c8d0d4f9ec0536 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161401 Tested-by: Jenkins Reviewed-by: Balazs Varga (cherry picked from commit 167659bf16a68c27fa547e6eccd62c1a6f69b057) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161532 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 410141980d1d..5311721bc59f 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -67,11 +67,11 @@ namespace { class InsertBookmarkAsPage_FindDuplicateLayouts { public: -explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::map &rLayoutsToTransfer ) +explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::vector &rLayoutsToTransfer ) : mrLayoutsToTransfer(rLayoutsToTransfer) {} void operator()( SdDrawDocument&, SdPage const *, bool, SdDrawDocument* ); private: -std::map &mrLayoutsToTransfer; +std::vector &mrLayoutsToTransfer; }; } @@ -85,11 +85,11 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc if( nIndex != -1 ) aLayout = aLayout.copy(0, nIndex); -std::map::const_iterator pIter = mrLayoutsToTransfer.find(aLayout); +std::vector::const_iterator pIter = +find(mrLayoutsToTransfer.begin(), mrLayoutsToTransfer.end(), aLayout); bool bFound = pIter != mrLayoutsToTransfer.end(); -sal_Int32 nLayout = 20; // blank page - master slide layout ID const sal_uInt16 nMPageCount = rDoc.GetMasterPageCount(); for (sal_uInt16 nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++) { @@ -110,15 +110,6 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc pBMMPage->GetLayoutName(), pBMMPage->GetName() + "_"); aLayout = pBMMPage->GetName(); -uno::Reference< drawing::XDrawPage > xOldPage(rDoc.GetMasterPage(nMPage)->getUnoPage(), uno::UNO_QUERY_THROW); -uno::Reference xPropSet(xOldPage, uno::UNO_QUERY_THROW); -if (xPropSet.is()) -{ -uno::Any aLayoutID = xPropSet->getPropertyValue("SlideLayout"); -if (aLayoutID.hasValue()) { -aLayoutID >>= nLayout; -} -} break; } else @@ -127,7 +118,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc } if (!bFound) -mrLayoutsToTransfer.insert({ aLayout, nLayout }); +mrLayoutsToTransfer.push_back(aLayout); } // Inserts a bookmark as a page @@ -508,7 +499,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( // Refactored copy'n'pasted layout name collection into IterateBookmarkPages -std::map aLayoutsToTransfer; +std::vector aLayoutsToTransfer; InsertBookmarkAsPage_FindDuplicateLayouts aSearchFunctor( aLayoutsToTransfer ); lcl_IterateBookmarkPages( *this, pBookmarkDoc, rBookmarkList, nBMSdPageCount, aSearchFunctor, ( rBookmarkList.empty() && pBookmarkDoc != this ) ); @@ -520,11 +511,14 @@ bool SdDrawDocument::InsertBookmarkAsPage( if( !aLayoutsToTransfer.empty() ) bMergeMasterPages = true; -for ( const auto& layout : aLayoutsToTransfer ) +std::map aSlideLayoutsToTransfer; +std::map> aThemesToTransfer; + +for ( const OUString& layoutName : aLayoutsToTransfer ) { StyleSheetCopyResultVector aCreatedStyles; -rStyleSheetPool.CopyLayoutSheets(layout.first, rBookmarkStyleSheetPool, aCreatedStyles); +rStyleSheetPool.CopyLayoutSheets(layoutName, rBookmarkStyleSheetPool, aCreatedStyles); if(!aCreatedStyles.empty()) { @@ -533,6 +527,29 @@ bool SdDrawDocument::InsertBookmarkAsPage( pUndoMgr->AddUndoAction(std::make_unique(this, aCreatedStyles, true)); } } + +// copy SlideLayout and Theme of the master slide +sal_Int32 nLayout = 20; // blank page - master slide layout ID +bool bIsMasterPage = false; +sal_uInt16 nBMPage = pBookmarkDoc->GetPageByName(layoutName, bIsMasterPage); +if (bIsMasterPage) +{ +uno::Reference< drawing::XDrawPage > xOldPage(pBookmarkDoc->GetMasterPage(nBMPage)->getUnoPage(), uno::UNO_QUERY_THROW); +SdrPage* pMasterPage = SdPage::getImpl
core.git: sd/source
sd/source/core/drawdoc3.cxx | 64 +++- 1 file changed, 46 insertions(+), 18 deletions(-) New commits: commit 167659bf16a68c27fa547e6eccd62c1a6f69b057 Author: Balazs Varga AuthorDate: Fri Dec 29 12:01:10 2023 +0100 Commit: Balazs Varga CommitDate: Mon Jan 1 19:11:39 2024 +0100 tdf#157742 tdf#157783 - sd: fix copy master slides style Copy SlideLayout property and themes from the old slide to the new one. Change-Id: I7310200c731839a606981c6d63c8d0d4f9ec0536 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161401 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 5062630edb88..5310789d2988 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -67,11 +67,11 @@ namespace { class InsertBookmarkAsPage_FindDuplicateLayouts { public: -explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::map &rLayoutsToTransfer ) +explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::vector &rLayoutsToTransfer ) : mrLayoutsToTransfer(rLayoutsToTransfer) {} void operator()( SdDrawDocument&, SdPage const *, bool, SdDrawDocument* ); private: -std::map &mrLayoutsToTransfer; +std::vector &mrLayoutsToTransfer; }; } @@ -85,11 +85,11 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc if( nIndex != -1 ) aLayout = aLayout.copy(0, nIndex); -std::map::const_iterator pIter = mrLayoutsToTransfer.find(aLayout); +std::vector::const_iterator pIter = +find(mrLayoutsToTransfer.begin(), mrLayoutsToTransfer.end(), aLayout); bool bFound = pIter != mrLayoutsToTransfer.end(); -sal_Int32 nLayout = 20; // blank page - master slide layout ID const sal_uInt16 nMPageCount = rDoc.GetMasterPageCount(); for (sal_uInt16 nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++) { @@ -110,15 +110,6 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc pBMMPage->GetLayoutName(), pBMMPage->GetName() + "_"); aLayout = pBMMPage->GetName(); -uno::Reference< drawing::XDrawPage > xOldPage(rDoc.GetMasterPage(nMPage)->getUnoPage(), uno::UNO_QUERY_THROW); -uno::Reference xPropSet(xOldPage, uno::UNO_QUERY_THROW); -if (xPropSet.is()) -{ -uno::Any aLayoutID = xPropSet->getPropertyValue("SlideLayout"); -if (aLayoutID.hasValue()) { -aLayoutID >>= nLayout; -} -} break; } else @@ -127,7 +118,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc } if (!bFound) -mrLayoutsToTransfer.insert({ aLayout, nLayout }); +mrLayoutsToTransfer.push_back(aLayout); } // Inserts a bookmark as a page @@ -508,7 +499,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( // Refactored copy'n'pasted layout name collection into IterateBookmarkPages -std::map aLayoutsToTransfer; +std::vector aLayoutsToTransfer; InsertBookmarkAsPage_FindDuplicateLayouts aSearchFunctor( aLayoutsToTransfer ); lcl_IterateBookmarkPages( *this, pBookmarkDoc, rBookmarkList, nBMSdPageCount, aSearchFunctor, ( rBookmarkList.empty() && pBookmarkDoc != this ) ); @@ -520,11 +511,14 @@ bool SdDrawDocument::InsertBookmarkAsPage( if( !aLayoutsToTransfer.empty() ) bMergeMasterPages = true; -for ( const auto& layout : aLayoutsToTransfer ) +std::map aSlideLayoutsToTransfer; +std::map> aThemesToTransfer; + +for ( const OUString& layoutName : aLayoutsToTransfer ) { StyleSheetCopyResultVector aCreatedStyles; -rStyleSheetPool.CopyLayoutSheets(layout.first, rBookmarkStyleSheetPool, aCreatedStyles); +rStyleSheetPool.CopyLayoutSheets(layoutName, rBookmarkStyleSheetPool, aCreatedStyles); if(!aCreatedStyles.empty()) { @@ -533,6 +527,29 @@ bool SdDrawDocument::InsertBookmarkAsPage( pUndoMgr->AddUndoAction(std::make_unique(this, aCreatedStyles, true)); } } + +// copy SlideLayout and Theme of the master slide +sal_Int32 nLayout = 20; // blank page - master slide layout ID +bool bIsMasterPage = false; +sal_uInt16 nBMPage = pBookmarkDoc->GetPageByName(layoutName, bIsMasterPage); +if (bIsMasterPage) +{ +uno::Reference< drawing::XDrawPage > xOldPage(pBookmarkDoc->GetMasterPage(nBMPage)->getUnoPage(), uno::UNO_QUERY_THROW); +SdrPage* pMasterPage = SdPage::getImplementation(xOldPage); +if (pMasterPage) +{ +aThemesToTransfer.insert({ layoutName, pMasterPage->getSdrPageProperties().getTheme() }); +uno::Reference xProp
core.git: Branch 'libreoffice-24-2' - sd/source
sd/source/filter/eppt/epptbase.hxx |3 ++- sd/source/filter/eppt/epptooxml.hxx |2 +- sd/source/filter/eppt/pptx-epptooxml.cxx |2 +- 3 files changed, 4 insertions(+), 3 deletions(-) New commits: commit 2a0faeebbafd972d67b48046aa912c8c5090218f Author: Balazs Varga AuthorDate: Fri Dec 22 13:55:42 2023 +0100 Commit: Xisco Fauli CommitDate: Tue Dec 26 09:31:40 2023 +0100 cid#1559857 Illegal address computation Follow up of commit: bff76421e234df7246a7f49c71a11432f86e09d1 Change-Id: I1abfcea1c7ca8e55f8a4b19b66d80b901f575bcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161179 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara (cherry picked from commit c5cc7af60d4b93d4247fd88f941a323f4a56dfcd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161221 Reviewed-by: Xisco Fauli diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx index 64709fa14f39..70bcd3a4b6ce 100644 --- a/sd/source/filter/eppt/epptbase.hxx +++ b/sd/source/filter/eppt/epptbase.hxx @@ -73,7 +73,8 @@ enum class EppLayout TITLERIGHT2BODIESLEFT = 18 /* Vertical title on the right, body on the left split into 2 rows*/ }; -#define EPP_LAYOUT_SIZE 36 +#define EPP_LAYOUT_SIZE 25 +#define OOXML_LAYOUT_SIZE 36 struct PHLayout { diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx index 2d67ebce2c77..d9d65a2e8300 100644 --- a/sd/source/filter/eppt/epptooxml.hxx +++ b/sd/source/filter/eppt/epptooxml.hxx @@ -139,7 +139,7 @@ private: ::sax_fastparser::FSHelperPtr mPresentationFS; -LayoutInfo mLayoutInfo[EPP_LAYOUT_SIZE]; +LayoutInfo mLayoutInfo[OOXML_LAYOUT_SIZE]; std::vector< ::sax_fastparser::FSHelperPtr > mpSlidesFSArray; sal_Int32 mnLayoutFileIdMax; diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 41ef744c1799..2148653dcd20 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -196,7 +196,7 @@ struct PPTXLayoutInfo } -const PPTXLayoutInfo aLayoutInfo[EPP_LAYOUT_SIZE] = +const PPTXLayoutInfo aLayoutInfo[OOXML_LAYOUT_SIZE] = { { 0, "Title Slide", "title" }, { 1, "Title and text", "tx" },
core.git: Branch 'libreoffice-7-6' - 3 commits - sd/source svtools/source sw/source
sd/source/filter/eppt/epptbase.hxx |3 ++- sd/source/filter/eppt/epptooxml.hxx |2 +- sd/source/filter/eppt/pptx-epptooxml.cxx |2 +- svtools/source/control/tabbar.cxx| 11 --- sw/source/core/access/AccessibilityCheck.cxx | 20 +--- 5 files changed, 21 insertions(+), 17 deletions(-) New commits: commit 255a0032d399ae13e0f166942c03721caa1e0d74 Author: Balazs Varga AuthorDate: Fri Dec 22 13:55:42 2023 +0100 Commit: Xisco Fauli CommitDate: Tue Dec 26 09:31:34 2023 +0100 cid#1559857 Illegal address computation Follow up of commit: bff76421e234df7246a7f49c71a11432f86e09d1 Change-Id: I1abfcea1c7ca8e55f8a4b19b66d80b901f575bcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161179 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara (cherry picked from commit c5cc7af60d4b93d4247fd88f941a323f4a56dfcd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161222 Reviewed-by: Xisco Fauli diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx index 64709fa14f39..70bcd3a4b6ce 100644 --- a/sd/source/filter/eppt/epptbase.hxx +++ b/sd/source/filter/eppt/epptbase.hxx @@ -73,7 +73,8 @@ enum class EppLayout TITLERIGHT2BODIESLEFT = 18 /* Vertical title on the right, body on the left split into 2 rows*/ }; -#define EPP_LAYOUT_SIZE 36 +#define EPP_LAYOUT_SIZE 25 +#define OOXML_LAYOUT_SIZE 36 struct PHLayout { diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx index 2d67ebce2c77..d9d65a2e8300 100644 --- a/sd/source/filter/eppt/epptooxml.hxx +++ b/sd/source/filter/eppt/epptooxml.hxx @@ -139,7 +139,7 @@ private: ::sax_fastparser::FSHelperPtr mPresentationFS; -LayoutInfo mLayoutInfo[EPP_LAYOUT_SIZE]; +LayoutInfo mLayoutInfo[OOXML_LAYOUT_SIZE]; std::vector< ::sax_fastparser::FSHelperPtr > mpSlidesFSArray; sal_Int32 mnLayoutFileIdMax; diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 5986ed958380..0967b6a3b34e 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -196,7 +196,7 @@ struct PPTXLayoutInfo } -const PPTXLayoutInfo aLayoutInfo[EPP_LAYOUT_SIZE] = +const PPTXLayoutInfo aLayoutInfo[OOXML_LAYOUT_SIZE] = { { 0, "Title Slide", "title" }, { 1, "Title and text", "tx" }, commit 7c10c49309acb2f183ef726283e36044d8f68766 Author: Andreas Heinisch AuthorDate: Thu Dec 21 20:33:20 2023 +0100 Commit: Xisco Fauli CommitDate: Tue Dec 26 09:31:30 2023 +0100 Revert "tdf#100584 - Arrange sheets in the tab bar depending on the RTL settings" This reverts commit be86c8f2432623fdb8ed4f22ca08c35121fd8bec. Reason for revert: To many regressions. Change-Id: Id3fb8dc5d4edb84c0008b7834a80887aaa7d9f83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161154 Tested-by: Andreas Heinisch Reviewed-by: Andreas Heinisch (cherry picked from commit 3430a2c639a9f714259f9d319515464a653d21ab) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161159 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit b3e86695022f8db57344f4115ee360072d671838) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161212 diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 1690269ba234..f9faa2bbe0dc 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -710,15 +710,10 @@ void TabBar::ImplFormat() if (!mbFormat) return; +sal_uInt16 nItemIndex = 0; tools::Long x = mnOffX; - -const size_t nItemListSize = mpImpl->maItemList.size(); -for (size_t nItemIndex = 0; nItemIndex < nItemListSize; nItemIndex++) +for (auto & rItem : mpImpl->maItemList) { -// tdf#100584 - arrange sheets depending on the RTL settings -auto& rItem = mbMirrored ? mpImpl->maItemList[nItemListSize - nItemIndex - 1] - : mpImpl->maItemList[nItemIndex]; - // At all non-visible tabs an empty rectangle is set if ((nItemIndex + 1 < mnFirstPos) || (x > mnLastOffX)) rItem.maRect.SetEmpty(); @@ -746,6 +741,8 @@ void TabBar::ImplFormat() rItem.maRect.SetLeft(nNewLeft); } } + +nItemIndex++; } mbFormat = false; commit f118426560d913f5180aab2a8ef6424e8825a778 Author: Xisco Fauli AuthorDate: Fri Dec 22 10:38:52 2023 +0100 Commit: Xisco Fauli CommitDate: Tue Dec 26 09:31:25 2023 +0100 sw: fix another null deref in a11y check similar to author Caolán McNamara 2023-12-21 16:47:18 + committer Caolán McNamara 2023-12-21 21:15:03 +0100 commit ba712e9a35179c480cdc6f9d600d79040a273d53 (patch) tree88e237265eb6ce88
core.git: sd/source
sd/source/filter/eppt/epptbase.hxx |3 ++- sd/source/filter/eppt/epptooxml.hxx |2 +- sd/source/filter/eppt/pptx-epptooxml.cxx |2 +- 3 files changed, 4 insertions(+), 3 deletions(-) New commits: commit c5cc7af60d4b93d4247fd88f941a323f4a56dfcd Author: Balazs Varga AuthorDate: Fri Dec 22 13:55:42 2023 +0100 Commit: Caolán McNamara CommitDate: Fri Dec 22 20:30:51 2023 +0100 cid#1559857 Illegal address computation Follow up of commit: bff76421e234df7246a7f49c71a11432f86e09d1 Change-Id: I1abfcea1c7ca8e55f8a4b19b66d80b901f575bcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161179 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx index 64709fa14f39..70bcd3a4b6ce 100644 --- a/sd/source/filter/eppt/epptbase.hxx +++ b/sd/source/filter/eppt/epptbase.hxx @@ -73,7 +73,8 @@ enum class EppLayout TITLERIGHT2BODIESLEFT = 18 /* Vertical title on the right, body on the left split into 2 rows*/ }; -#define EPP_LAYOUT_SIZE 36 +#define EPP_LAYOUT_SIZE 25 +#define OOXML_LAYOUT_SIZE 36 struct PHLayout { diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx index 2d67ebce2c77..d9d65a2e8300 100644 --- a/sd/source/filter/eppt/epptooxml.hxx +++ b/sd/source/filter/eppt/epptooxml.hxx @@ -139,7 +139,7 @@ private: ::sax_fastparser::FSHelperPtr mPresentationFS; -LayoutInfo mLayoutInfo[EPP_LAYOUT_SIZE]; +LayoutInfo mLayoutInfo[OOXML_LAYOUT_SIZE]; std::vector< ::sax_fastparser::FSHelperPtr > mpSlidesFSArray; sal_Int32 mnLayoutFileIdMax; diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 41ef744c1799..2148653dcd20 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -196,7 +196,7 @@ struct PPTXLayoutInfo } -const PPTXLayoutInfo aLayoutInfo[EPP_LAYOUT_SIZE] = +const PPTXLayoutInfo aLayoutInfo[OOXML_LAYOUT_SIZE] = { { 0, "Title Slide", "title" }, { 1, "Title and text", "tx" },
core.git: cui/source cui/uiconfig
cui/source/options/optcolor.cxx | 205 +++ cui/source/options/optcolor.hxx |2 cui/uiconfig/ui/optappearancepage.ui | 62 +++--- 3 files changed, 183 insertions(+), 86 deletions(-) New commits: commit 0cd74b5be297f638d455b9b267462192f2e6620c Author: Balazs Varga AuthorDate: Tue Dec 19 20:54:39 2023 +0100 Commit: Balazs Varga CommitDate: Thu Dec 21 00:22:27 2023 +0100 tdf#158759 - UI: Part 56 - Unify lockdown behavior of Options dialog for General - Application Colors Page. Change-Id: I2fb6c73cef82c12c3c8f3c49fb0e4b62703a1de3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161030 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index c8841205f3b4..f1e1b8a26b18 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -21,6 +21,8 @@ #include +#include +#include #include #include #include @@ -36,6 +38,8 @@ #include #include #include +#include +#include using namespace ::com::sun::star; using namespace ::svtools; @@ -87,6 +91,8 @@ struct OUString pColor; // has checkbox? bool bCheckBox; +//prop name +std::u16string_view sPropName; } const vEntryInfo[] = { @@ -98,67 +104,67 @@ const vEntryInfo[] = // The list of these entries (enum ColorConfigEntry) are in colorcfg.hxx. -{ Group_General, IDS(doccolor) }, -{ Group_General, IDS_CB(docboundaries) }, -{ Group_General, IDS(appback) }, -{ Group_General, IDS_CB(objboundaries) }, -{ Group_General, IDS_CB(tblboundaries) }, -{ Group_General, IDS(font) }, -{ Group_General, IDS_CB(unvisitedlinks) }, -{ Group_General, IDS_CB(visitedlinks) }, -{ Group_General, IDS(autospellcheck) }, -{ Group_General, IDS(grammarcheck) }, -{ Group_General, IDS(smarttags) }, -{ Group_General, IDS_CB(shadows) }, - -{ Group_Writer, IDS(writergrid) }, -{ Group_Writer, IDS_CB(field) }, -{ Group_Writer, IDS_CB(index) }, -{ Group_Writer, IDS(direct) }, -{ Group_Writer, IDS(script) }, -{ Group_Writer, IDS_CB(section) }, -{ Group_Writer, IDS(hdft) }, -{ Group_Writer, IDS(pagebreak) }, - -{ Group_Html,IDS(sgml) }, -{ Group_Html,IDS(htmlcomment) }, -{ Group_Html,IDS(htmlkeyword) }, -{ Group_Html,IDS(unknown) }, - -{ Group_Calc,IDS(calcgrid) }, -{ Group_Calc,IDS(brk) }, -{ Group_Calc,IDS(brkmanual) }, -{ Group_Calc,IDS(brkauto) }, -{ Group_Calc,IDS_CB(hiddencolrow) }, -{ Group_Calc,IDS_CB(textoverflow) }, -{ Group_Calc,IDS(comments) }, -{ Group_Calc,IDS(det) }, -{ Group_Calc,IDS(deterror) }, -{ Group_Calc,IDS(ref) }, -{ Group_Calc,IDS(notes) }, -{ Group_Calc,IDS(values) }, -{ Group_Calc,IDS(formulas) }, -{ Group_Calc,IDS(text) }, -{ Group_Calc,IDS(protectedcells) }, - -{ Group_Draw,IDS(drawgrid) }, - -{ Group_Basic, IDS(basiceditor) }, -{ Group_Basic, IDS(basicid) }, -{ Group_Basic, IDS(basiccomment) }, -{ Group_Basic, IDS(basicnumber) }, -{ Group_Basic, IDS(basicstring) }, -{ Group_Basic, IDS(basicop) }, -{ Group_Basic, IDS(basickeyword) }, -{ Group_Basic, IDS(error) }, - -{ Group_Sql, IDS(sqlid) }, -{ Group_Sql, IDS(sqlnumber) }, -{ Group_Sql, IDS(sqlstring) }, -{ Group_Sql, IDS(sqlop) }, -{ Group_Sql, IDS(sqlkeyword) }, -{ Group_Sql, IDS(sqlparam) }, -{ Group_Sql, IDS(sqlcomment) } +{ Group_General, IDS(doccolor), std::u16string_view(u"/DocColor") }, +{ Group_General, IDS_CB(docboundaries), std::u16string_view(u"/DocBoundaries") }, +{ Group_General, IDS(appback), std::u16string_view(u"/AppBackground") }, +{ Group_General, IDS_CB(objboundaries), std::u16string_view(u"/ObjectBoundaries") }, +{ Group_General, IDS_CB(tblboundaries), std::u16string_view(u"/TableBoundaries") }, +{ Group_General, IDS(font), std::u16string_view(u"/FontColor") }, +{ Group_General, IDS_CB(unvisitedlinks), std::u16string_view(u"/Links") }, +{ Group_General, IDS_CB(visitedlinks), std::u16string_view(u"/LinksVisited") }, +{ Group_General, IDS(autospellcheck), std::u16string_view(u"/Spell") }, +{ Group_General, IDS(grammarcheck), std::u16string_view(u"/Grammar") }, +{ Group_General, IDS(smarttags), std::u16string_view(u"/SmartTags") }, +{ Group_General, IDS_CB(shadows), std::u16string_view(u"/Shadow") }, + +{ Group_Writer, IDS(writergrid), std::u16string_view(u"/WriterTextGrid") }, +{ Group_Writer, IDS_CB(field), std::u16string_view(u"/WriterFieldShadings") }, +{ Group_Writer, IDS_CB(index), std::u16string_view(u"/WriterIdxShadings") }, +{ Group_Writer, IDS(direct), std::u16string_view(u"/WriterDirectCursor") }, +{ Group_Writer, IDS(script)
core.git: Branch 'distro/collabora/co-23.05' - oox/source sd/qa sd/source xmloff/source
oox/source/ppt/presentationfragmenthandler.cxx |7 - oox/source/ppt/slidepersist.cxx|6 sd/qa/unit/data/pptx/tdf157740.pptx|binary sd/qa/unit/export-tests-ooxml1.cxx | 16 +- sd/qa/unit/export-tests-ooxml2.cxx | 12 - sd/source/core/drawdoc3.cxx| 38 - sd/source/filter/eppt/epptbase.hxx |2 sd/source/filter/eppt/epptooxml.hxx|2 sd/source/filter/eppt/pptx-epptooxml.cxx | 160 ++--- sd/source/ui/inc/unopage.hxx |1 sd/source/ui/unoidl/unopage.cxx| 13 +- xmloff/source/draw/ximpbody.cxx| 19 ++ 12 files changed, 149 insertions(+), 127 deletions(-) New commits: commit 397da200a5250bc23df7692354ccb4910783f61e Author: Balazs Varga AuthorDate: Sun Dec 3 23:41:01 2023 +0100 Commit: Henry Castro CommitDate: Tue Dec 19 22:47:04 2023 +0100 tdf#157740 FILESAVE PPTX: fix explosion of the number of master slides - Export correctly the "supported" master slides with the actual slides names. - Set SlideLayout property at ODF import as well for MasterSlides layout type. - When we copy a slide with the master slide also copy the SlideLayout property value as well. Change-Id: Idb6b88ebe87a83818d8eb27a1fa087652a002c0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160290 Tested-by: Jenkins Reviewed-by: Henry Castro Reviewed-by: Balazs Varga Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160985 Tested-by: Jenkins CollaboraOffice diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx index 1586a8a26174..91824210e239 100644 --- a/oox/source/ppt/presentationfragmenthandler.cxx +++ b/oox/source/ppt/presentationfragmenthandler.cxx @@ -212,11 +212,11 @@ void PresentationFragmentHandler::importMasterSlide(const ReferencegetFragmentPathFromRelation(rEntry.second); - if (!rEntry.second.maType.endsWith("relationships/slideLayout")) continue; +aLayoutFragmentPath = xMasterRelations->getFragmentPathFromRelation(rEntry.second); + sal_Int32 nIndex; if( rFilter.getMasterPages().empty() ) { @@ -271,6 +271,9 @@ void PresentationFragmentHandler::importMasterSlide(const ReferencecreateBackground( rFilter ); pMasterPersistPtr->createXShapes( rFilter ); +uno::Reference< beans::XPropertySet > xSet(pMasterPersistPtr->getPage(), uno::UNO_QUERY_THROW); +xSet->setPropertyValue("SlideLayout", Any(pMasterPersistPtr->getLayoutFromValueToken())); + oox::drawingml::ThemePtr pTheme = pMasterPersistPtr->getTheme(); if (pTheme) { diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx index 0f7479e8ede9..d31416e43f5b 100644 --- a/oox/source/ppt/slidepersist.cxx +++ b/oox/source/ppt/slidepersist.cxx @@ -105,6 +105,7 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const case XML_titleOnly: nLayout = 19; break; case XML_twoObj: case XML_twoColTx: nLayout = 3; break; +case XML_twoObjAndObj: case XML_twoObjAndTx: nLayout = 15; break; case XML_twoObjOverTx: nLayout = 16; break; case XML_tx:nLayout = 1; break; @@ -112,19 +113,18 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const case XML_txAndClipArt: nLayout = 6; break; case XML_txAndMedia:nLayout = 6; break; case XML_txAndObj: nLayout = 10; break; +case XML_objAndTwoObj: case XML_txAndTwoObj: nLayout = 12; break; case XML_txOverObj: nLayout = 17; break; case XML_vertTitleAndTx:nLayout = 22; break; case XML_vertTitleAndTxOverChart: nLayout = 21; break; case XML_vertTx:nLayout = 23; break; +case XML_objOnly: nLayout = 32; break; case XML_twoTxTwoObj: -case XML_twoObjAndObj: case XML_objTx: case XML_picTx: case XML_secHead: -case XML_objOnly: -case XML_objAndTwoObj: case XML_mediaAndTx: case XML_dgm: case XML_cust: diff --git a/sd/qa/unit/data/pptx/tdf157740.pptx b/sd/qa/unit/data/pptx/tdf157740.pptx new file mode 100644 index ..009e9eeb1da0 Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf157740.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index 30df5ba06789..e7726d27e29e 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -263,14 +263,14 @@ void SdOOXMLExportTest1::testTdf149128() save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); -assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvC
core.git: Branch 'libreoffice-7-6' - oox/source sd/qa sd/source xmloff/source
oox/source/ppt/slidepersist.cxx |6 sd/qa/unit/data/pptx/tdf157740.pptx |binary sd/qa/unit/export-tests-ooxml1.cxx |4 sd/qa/unit/export-tests-ooxml2.cxx | 20 +- sd/source/core/drawdoc3.cxx | 38 +++- sd/source/filter/eppt/epptbase.hxx |2 sd/source/filter/eppt/epptooxml.hxx |6 sd/source/filter/eppt/pptx-epptooxml.cxx | 284 +++ xmloff/source/draw/ximpbody.cxx | 19 ++ 9 files changed, 142 insertions(+), 237 deletions(-) New commits: commit a4640043ed772b5dcc1ee9d36cfd8b0e4759f894 Author: Balazs Varga AuthorDate: Sun Dec 3 23:41:01 2023 +0100 Commit: Henry Castro CommitDate: Tue Dec 19 22:46:42 2023 +0100 tdf#157740 FILESAVE PPTX: fix explosion of the number of master slides - Export correctly the "supported" master slides with the actual slides names. - Set SlideLayout property at ODF import as well for MasterSlides layout type. - When we copy a slide with the master slide also copy the SlideLayout property value as well. Change-Id: Idb6b88ebe87a83818d8eb27a1fa087652a002c0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160290 Tested-by: Jenkins Reviewed-by: Henry Castro Reviewed-by: Balazs Varga (cherry picked from commit bff76421e234df7246a7f49c71a11432f86e09d1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160869 Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160986 diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx index 0f7479e8ede9..d31416e43f5b 100644 --- a/oox/source/ppt/slidepersist.cxx +++ b/oox/source/ppt/slidepersist.cxx @@ -105,6 +105,7 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const case XML_titleOnly: nLayout = 19; break; case XML_twoObj: case XML_twoColTx: nLayout = 3; break; +case XML_twoObjAndObj: case XML_twoObjAndTx: nLayout = 15; break; case XML_twoObjOverTx: nLayout = 16; break; case XML_tx:nLayout = 1; break; @@ -112,19 +113,18 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const case XML_txAndClipArt: nLayout = 6; break; case XML_txAndMedia:nLayout = 6; break; case XML_txAndObj: nLayout = 10; break; +case XML_objAndTwoObj: case XML_txAndTwoObj: nLayout = 12; break; case XML_txOverObj: nLayout = 17; break; case XML_vertTitleAndTx:nLayout = 22; break; case XML_vertTitleAndTxOverChart: nLayout = 21; break; case XML_vertTx:nLayout = 23; break; +case XML_objOnly: nLayout = 32; break; case XML_twoTxTwoObj: -case XML_twoObjAndObj: case XML_objTx: case XML_picTx: case XML_secHead: -case XML_objOnly: -case XML_objAndTwoObj: case XML_mediaAndTx: case XML_dgm: case XML_cust: diff --git a/sd/qa/unit/data/pptx/tdf157740.pptx b/sd/qa/unit/data/pptx/tdf157740.pptx new file mode 100644 index ..009e9eeb1da0 Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf157740.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index 17a5ce94cbf6..407eef46f7b9 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -110,11 +110,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149128) xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn", "id", -"42"); +"8"); assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn", "idx", "0"); assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn", "id", -"43"); +"9"); assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn", "idx", "2"); } diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index ed6568d0bc1f..65102c143c1d 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -157,6 +157,22 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf153107) "tl"); } +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf157740_slideMasters) +{ +createSdImpressDoc("pptx/tdf157740.pptx"); +saveAndReload("Impress Office Open XML"); + +// Test how many slidemaster we have +xmlDocUniquePtr pXmlDocContent = parseExport("ppt/presentation.xml"); +assertXPath(pXmlDocContent, "/p:presentation/p:sldMasterIdLst/p:sldMasterId", 7); + +pXmlDocContent = parseExport("ppt/slideMasters/slideMaster1.xml"); +assertXP
core.git: Branch 'libreoffice-24-2' - oox/source sd/qa sd/source xmloff/source
oox/source/ppt/slidepersist.cxx |6 sd/qa/unit/data/pptx/tdf157740.pptx |binary sd/qa/unit/export-tests-ooxml1.cxx |4 sd/qa/unit/export-tests-ooxml2.cxx |4 sd/qa/unit/export-tests-ooxml4.cxx | 16 + sd/source/core/drawdoc3.cxx | 38 +++- sd/source/filter/eppt/epptbase.hxx |2 sd/source/filter/eppt/epptooxml.hxx |6 sd/source/filter/eppt/pptx-epptooxml.cxx | 284 +++ xmloff/source/draw/ximpbody.cxx | 19 ++ 10 files changed, 142 insertions(+), 237 deletions(-) New commits: commit 00ea1f0252fa2b59adc5336ffd0d5f5b73cf1203 Author: Balazs Varga AuthorDate: Sun Dec 3 23:41:01 2023 +0100 Commit: Xisco Fauli CommitDate: Tue Dec 19 11:48:01 2023 +0100 tdf#157740 FILESAVE PPTX: fix explosion of the number of master slides - Export correctly the "supported" master slides with the actual slides names. - Set SlideLayout property at ODF import as well for MasterSlides layout type. - When we copy a slide with the master slide also copy the SlideLayout property value as well. Change-Id: Idb6b88ebe87a83818d8eb27a1fa087652a002c0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160290 Tested-by: Jenkins Reviewed-by: Henry Castro Reviewed-by: Balazs Varga (cherry picked from commit bff76421e234df7246a7f49c71a11432f86e09d1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160869 Reviewed-by: Xisco Fauli diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx index cd42ef6bcdb6..a4225f95cd43 100644 --- a/oox/source/ppt/slidepersist.cxx +++ b/oox/source/ppt/slidepersist.cxx @@ -105,6 +105,7 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const case XML_titleOnly: nLayout = 19; break; case XML_twoObj: case XML_twoColTx: nLayout = 3; break; +case XML_twoObjAndObj: case XML_twoObjAndTx: nLayout = 15; break; case XML_twoObjOverTx: nLayout = 16; break; case XML_tx:nLayout = 1; break; @@ -112,19 +113,18 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const case XML_txAndClipArt: nLayout = 6; break; case XML_txAndMedia:nLayout = 6; break; case XML_txAndObj: nLayout = 10; break; +case XML_objAndTwoObj: case XML_txAndTwoObj: nLayout = 12; break; case XML_txOverObj: nLayout = 17; break; case XML_vertTitleAndTx:nLayout = 22; break; case XML_vertTitleAndTxOverChart: nLayout = 21; break; case XML_vertTx:nLayout = 23; break; +case XML_objOnly: nLayout = 32; break; case XML_twoTxTwoObj: -case XML_twoObjAndObj: case XML_objTx: case XML_picTx: case XML_secHead: -case XML_objOnly: -case XML_objAndTwoObj: case XML_mediaAndTx: case XML_dgm: case XML_cust: diff --git a/sd/qa/unit/data/pptx/tdf157740.pptx b/sd/qa/unit/data/pptx/tdf157740.pptx new file mode 100644 index ..009e9eeb1da0 Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf157740.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index deab0ea2de24..9f87fd5d92c4 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -111,11 +111,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149128) xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn"_ostr, -"id"_ostr, "42"); +"id"_ostr, "8"); assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn"_ostr, "idx"_ostr, "0"); assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn"_ostr, -"id"_ostr, "43"); +"id"_ostr, "9"); assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn"_ostr, "idx"_ostr, "2"); } diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 0583233c9f06..4498f66bf03a 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -1343,7 +1343,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf106867) "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/" "p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:cmd/" "p:cBhvr/p:tgtEl/p:spTgt"_ostr, -"spid"_ostr, "42"); +"spid"_ostr, "67"); } CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112280) @@ -1740,7 +1740,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testAccentColor) xmlDocUn
core.git: oox/source sd/qa sd/source xmloff/source
oox/source/ppt/slidepersist.cxx |6 sd/qa/unit/data/pptx/tdf157740.pptx |binary sd/qa/unit/export-tests-ooxml1.cxx |4 sd/qa/unit/export-tests-ooxml2.cxx |4 sd/qa/unit/export-tests-ooxml4.cxx | 16 + sd/source/core/drawdoc3.cxx | 38 +++- sd/source/filter/eppt/epptbase.hxx |2 sd/source/filter/eppt/epptooxml.hxx |6 sd/source/filter/eppt/pptx-epptooxml.cxx | 284 +++ xmloff/source/draw/ximpbody.cxx | 19 ++ 10 files changed, 142 insertions(+), 237 deletions(-) New commits: commit bff76421e234df7246a7f49c71a11432f86e09d1 Author: Balazs Varga AuthorDate: Sun Dec 3 23:41:01 2023 +0100 Commit: Balazs Varga CommitDate: Mon Dec 18 15:10:54 2023 +0100 tdf#157740 FILESAVE PPTX: fix explosion of the number of master slides - Export correctly the "supported" master slides with the actual slides names. - Set SlideLayout property at ODF import as well for MasterSlides layout type. - When we copy a slide with the master slide also copy the SlideLayout property value as well. Change-Id: Idb6b88ebe87a83818d8eb27a1fa087652a002c0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160290 Tested-by: Jenkins Reviewed-by: Henry Castro Reviewed-by: Balazs Varga diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx index cd42ef6bcdb6..a4225f95cd43 100644 --- a/oox/source/ppt/slidepersist.cxx +++ b/oox/source/ppt/slidepersist.cxx @@ -105,6 +105,7 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const case XML_titleOnly: nLayout = 19; break; case XML_twoObj: case XML_twoColTx: nLayout = 3; break; +case XML_twoObjAndObj: case XML_twoObjAndTx: nLayout = 15; break; case XML_twoObjOverTx: nLayout = 16; break; case XML_tx:nLayout = 1; break; @@ -112,19 +113,18 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const case XML_txAndClipArt: nLayout = 6; break; case XML_txAndMedia:nLayout = 6; break; case XML_txAndObj: nLayout = 10; break; +case XML_objAndTwoObj: case XML_txAndTwoObj: nLayout = 12; break; case XML_txOverObj: nLayout = 17; break; case XML_vertTitleAndTx:nLayout = 22; break; case XML_vertTitleAndTxOverChart: nLayout = 21; break; case XML_vertTx:nLayout = 23; break; +case XML_objOnly: nLayout = 32; break; case XML_twoTxTwoObj: -case XML_twoObjAndObj: case XML_objTx: case XML_picTx: case XML_secHead: -case XML_objOnly: -case XML_objAndTwoObj: case XML_mediaAndTx: case XML_dgm: case XML_cust: diff --git a/sd/qa/unit/data/pptx/tdf157740.pptx b/sd/qa/unit/data/pptx/tdf157740.pptx new file mode 100644 index ..009e9eeb1da0 Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf157740.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index deab0ea2de24..9f87fd5d92c4 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -111,11 +111,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149128) xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn"_ostr, -"id"_ostr, "42"); +"id"_ostr, "8"); assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn"_ostr, "idx"_ostr, "0"); assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn"_ostr, -"id"_ostr, "43"); +"id"_ostr, "9"); assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn"_ostr, "idx"_ostr, "2"); } diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 0583233c9f06..4498f66bf03a 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -1343,7 +1343,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf106867) "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/" "p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:cmd/" "p:cBhvr/p:tgtEl/p:spTgt"_ostr, -"spid"_ostr, "42"); +"spid"_ostr, "67"); } CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112280) @@ -1740,7 +1740,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testAccentColor) xmlDocUniquePtr pXmlDocTheme1 = parseExport("ppt/theme/theme1.xml"); assertXPath(pXmlDocTheme1, "/a:theme/a:themeElements/a:clrScheme/a:accent6/a:srgbClr"_ostr,