Description: The wizard for creating a group box doesn't work. Steps to Reproduce: 1. Form -> Design mode 2. Form -> Control wizards 3. Form -> Group box 4. in the first dialog "table element" add two elements. For example "pippo" and "pluto" 4. click "next" 5. in the next step select one element as default (the error occurs also without a default) 6. Click next without modifying anything 7. Click finish Actual Results: At the end of the wizard only the frame of the group box is created Expected Results: The frame of the group box and the elements are created in the document Reproducible: Always User Profile Reset: Yes Additional Info: Version: 6.1.0.0.alpha1 Build ID: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab CPU threads: 4; OS: Linux 4.16; UI render: default; VCL: gtk2; Locale: it-IT (it_IT.UTF-8); Calc: group User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Regression introduced by: author Jim Raykowski <raykowj@gmail.com> 2018-04-19 00:53:38 -0800 committer Thorsten Behrens <Thorsten.Behrens@CIB.de> 2018-04-20 23:56:42 +0200 commit 0fab443fc5016d3088e485210a13f121a1ec1ee9 (patch) tree 6368caeab8a91c11a75a859d078d80537462c5a8 parent 79391d92df7a474651e02980f238eac4781305ce (diff) tdf#117024 Make Navigator Drawing objects scroll Bisected with: bibisect-linux64-6.1 Adding Cc: to Jim Raykowski
the bisection in comment 1 is incorrect...
Same behaviour on macOS El Capitan Versión: 6.1.0.0.alpha1 Id. de compilación: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab Subprocs. CPU: 4; SO: Mac OS X 10.11.5; Repres. IU: predet.; Configuración regional: es-ES (es.UTF-8); Calc: group
Regression introduced by: author Armin Le Grand <Armin.Le.Grand@cib.de (CIB)> 2018-03-01 15:54:32 +0100 committer Armin Le Grand <Armin.Le.Grand@cib.de> 2018-04-06 22:29:02 +0200 commit 6c14c27c75a03e2363f2b363ddf0a6f2f46cfa91 (patch) tree e66f50adb222dbc1490b4df2d3c63541dad999ac parent e1b247a843c5eb850fe0079819239d9883412d38 (diff) SOSAW080: Added first bunch of basic changes to helpers Bisected with: bibisect-linux64-6.1
Adding Cc: to Armin Le Grand
Re-checked in lo-6-0, indeed buttons are created there. Will need to take a look...
An Exception is created, starting from OOptionGroupLayouter::doLayout when if (xShapeProperties.is()) xShapeProperties->setPropertyValue("Name", makeAny(sElementsName)); is done. The exception is correct, it is a SvxShapeControl and has no property 'Name' at all. It works in lo-6-0 since there is already a SdrObject, but 'mpModel' is ZERO. In that case - see SvxShape::_setPropertyValue - pMap is also ZERO - setting the property is just silently ignored - which is WRONG. There is a comment: // FIXME: We should throw a UnknownPropertyException here. // But since this class is aggregated from classes that // support additional properties that we don't know here we // silently store *all* properties, even if they may be not // supported after creation. Thiat is true, but is when pMap is set. If pMap is ZERO (as it is here), always an exception would have needed to be thrown.
That SvxShapeControl has no property 'Name' can be seen by following "SVXMAP_CONTROL" that is used at contruction (SvxShapeControl::SvxShapeControl). This leads to ImplGetSvxControlShapePropertyMap which has { OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0}, { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0}, but no { OUString(UNO_NAME_MISC_OBJ_NAME), SDRATTR_OBJECTNAME, cppu::UnoType<rtl::OUString>::get(), 0, 0}, which is using #define UNO_NAME_MISC_OBJ_NAME "Name" Thus the situation is: Something worked in the past because it did not throw an exception by convenience. What to do? In principle OOptionGroupLayouter::doLayout should call xShapeProperties->setPropertyValue("Name", makeAny(sElementsName)) *only* when the Shape comes from supports this...
In lo-6-0 mpModel local member in SvxShape gets set when the XShape gets added to the page: // add to the page xPageShapes->add(xRadioShape.get()); This is directly after // the name of the shape if (xShapeProperties.is()) xShapeProperties->setPropertyValue("Name", makeAny(sElementsName)); That means I could reproduce the old behaviour in SvxShape::_setPropertyValue by not checking for '!mpModel' as in lo-6-0, but check if the Shape is already added to the page. But do I want to do that? It was an error in the past that no exception was thrown. Maybe I will try to just fix this single call in OOptionGroupLayouter::doLayout. This again may leave other places that worked before my change just because - by error - no exception was thrown in the past. Hmmmm...
Fix on gerrit (see https://gerrit.libreoffice.org/#/c/54145/)
Armin Le Grand committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=66561e30bf96167dfaf9c5215a46c75a14209e9c tdf#117282 Do not set property 'Name' at ControlShape It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Checked in current version
Verified in Version: 6.1.0.0.beta1+ Build ID: da49f4aeb8d5e9a7d2cba8855d911e7cc1d2f1e2 CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: group @Armin, Thanks for fixing this!!