[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - 3 commits - configure.ac sw/Module_sw.mk sw/qa sw/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 9 13:20:27 UTC 2020
configure.ac | 2 +-
sw/Module_sw.mk | 1 -
sw/qa/python/testdocuments/xtextrange.odt |binary
sw/qa/python/xtextrange.py | 21 +++++++++++++++++++++
sw/source/core/unocore/unotext.cxx | 12 ++++++++----
5 files changed, 30 insertions(+), 6 deletions(-)
New commits:
commit 712dedad90281ac9562249a99e4038b1fd406be7
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Mon Mar 9 14:19:31 2020 +0100
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Mar 9 14:19:31 2020 +0100
Release 6.3.5.4
Change-Id: I57e8a35fd78ce416d7c062e82356fd61c80c7d7f
diff --git a/configure.ac b/configure.ac
index 9eca69a31a9a..9eba504f01bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
# several non-alphanumeric characters, those are split off and used only for the
# ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
-AC_INIT([LibreOffice],[6.3.5.3],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.3.5.4],[],[],[http://documentfoundation.org/])
dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed
dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard
commit 5ee554fa3ed5f032173705c15d01843cda189733
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Mon Mar 9 14:18:58 2020 +0100
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Mar 9 14:18:58 2020 +0100
Disable failing LibreLogo test (no LibreLogo in this branch)
Change-Id: Ie1b48d1fb71cc00d28864d9b8efb777e239b59e3
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index b20207c117ef..9121847c6f01 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -151,7 +151,6 @@ $(eval $(call gb_Module_add_uicheck_targets,sw,\
UITest_sw_findReplace \
UITest_sw_findSimilarity \
UITest_chapterNumbering \
- UITest_librelogo \
UITest_options \
UITest_classification \
))
commit 92a852b023b3acc44f016ffbe97eefde6ad5373d
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Fri Mar 6 12:39:32 2020 +0100
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Mar 9 09:56:39 2020 +0100
tdf#131184 Allow comparing text ranges in table with body text
Change-Id: I191d8778d362cd28474eea6d18bfe40044887e30
diff --git a/sw/qa/python/testdocuments/xtextrange.odt b/sw/qa/python/testdocuments/xtextrange.odt
index 5881ea44a447..70c978349869 100644
Binary files a/sw/qa/python/testdocuments/xtextrange.odt and b/sw/qa/python/testdocuments/xtextrange.odt differ
diff --git a/sw/qa/python/xtextrange.py b/sw/qa/python/xtextrange.py
index e6875fadc097..4acc270246a1 100644
--- a/sw/qa/python/xtextrange.py
+++ b/sw/qa/python/xtextrange.py
@@ -91,6 +91,27 @@ class TestXTextRange(unittest.TestCase):
xTextRange2 = xTextTable.getCellByName("A1")
self.assertEqual(xTextRange2.getString(), "beforeC1after")
+ def test_textRangesCompare(self):
+ doc = self._uno.getDoc()
+ # Bookmark in body text
+ bookmark1 = doc.getBookmarks().getByIndex(0).getAnchor()
+
+ # Bookmarks in table
+ bookmark2 = doc.getBookmarks().getByIndex(1).getAnchor()
+ bookmark3 = doc.getBookmarks().getByIndex(2).getAnchor()
+
+ res = doc.Text.compareRegionStarts(bookmark1, bookmark2)
+ self.assertEqual(res, 1)
+
+ res = doc.Text.compareRegionStarts(bookmark2, bookmark1)
+ self.assertEqual(res, -1)
+
+ res = doc.Text.compareRegionStarts(bookmark2, bookmark3)
+ self.assertEqual(res, 1)
+
+ res = doc.Text.compareRegionStarts(bookmark1, bookmark3)
+ self.assertEqual(res, 1)
+
if __name__ == '__main__':
unittest.main()
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 2c62d942aab6..9b5406c8fcb8 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1006,14 +1006,18 @@ bool SwXText::Impl::CheckForOwnMember(
const SwNode& rSrcNode = rPaM.GetNode();
const SwStartNode* pTmp = rSrcNode.FindSttNodeByType(eSearchNodeType);
- // skip SectionNodes
- while(pTmp && pTmp->IsSectionNode())
+ // skip SectionNodes / TableNodes to be able to compare across table/section boundaries
+ while (pTmp
+ && (pTmp->IsSectionNode() || pTmp->IsTableNode()
+ || (m_eType != CursorType::TableText
+ && pTmp->GetStartNodeType() == SwTableBoxStartNode)))
{
pTmp = pTmp->StartOfSectionNode();
}
- //if the document starts with a section
- while(pOwnStartNode->IsSectionNode())
+ while (pOwnStartNode->IsSectionNode() || pOwnStartNode->IsTableNode()
+ || (m_eType != CursorType::TableText
+ && pOwnStartNode->GetStartNodeType() == SwTableBoxStartNode))
{
pOwnStartNode = pOwnStartNode->StartOfSectionNode();
}
More information about the Libreoffice-commits
mailing list