sc/qa/extras/scstylefamilyobj.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit b37b299d5228beeecb913980780f463756c5a878 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Wed Mar 13 19:27:10 2019 +0100 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Wed Mar 13 22:10:57 2019 +0100 Fix CppunitTest_sc_stylefamilyobj It is "ScStyleFamilyObj" element that is inserted in the ScStyleFamilyTestObj::init() which is intended to be tormented in all thinkable ways in the tests; and its name must be passed to all the different interface ctors here. Trying to remove "Default" style is not something really expected to work. In my testing on Windows, I experienced hung XNameContainer::testRemoveByName with endless loop in SfxStyleSheetBase::SetParent, where it tried to set parent of Para style "Status" to "Heading"; while iterating over "Heading" parents to check for recursive linkages, it searched for its parent "Default", already removed at that stage; that search gave another "Default" style of Page type; that makes DoesStyleMatchStyleSheetPredicate from DoesStyleMatchStyleSheetPredicate to fail in IndexedStyleSheets::FindPositionsByNameAndPredicate, which for some reason returns the next stylesheet matching the predicate *with any name* - and that happens to be "Footnote". When returned to SfxStyleSheetBase::SetParent, it then tried to test its parent, which is "Text"; then tests its parent "Default" => endless loop. Whether this is a problem in IndexedStyleSheets::FindPositionsByNameAndPredicate that needs fixing or not, setting the test object name here to the object intended for that fixes the never-finishing subsequenttests problem. Change-Id: I9a36f5c8f399d5c9b863bf33426b15a4388747dc Reviewed-on: https://gerrit.libreoffice.org/69225 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sc/qa/extras/scstylefamilyobj.cxx b/sc/qa/extras/scstylefamilyobj.cxx index c2dfffd81491..aa49cb34580a 100644 --- a/sc/qa/extras/scstylefamilyobj.cxx +++ b/sc/qa/extras/scstylefamilyobj.cxx @@ -87,9 +87,9 @@ ScStyleFamilyObj::ScStyleFamilyObj() : CalcUnoApiTest("/sc/qa/extras/testdocuments") , XElementAccess(cppu::UnoType<style::XStyle>::get()) , XIndexAccess(19) - , XNameAccess("Default") - , XNameContainer("Default") - , XNameReplace("Default") + , XNameAccess("ScStyleFamilyObj") + , XNameContainer("ScStyleFamilyObj") + , XNameReplace("ScStyleFamilyObj") , XServiceInfo("ScStyleFamilyObj", "com.sun.star.style.StyleFamily") { } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits