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/69225Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Showing
Please
register
or
sign in
to comment