When using the XShapeGrouper::group function with only a single shape, no shape group is created. There is no reason this should not work with a single shape (and the implementation in Draw/Impress/Calc does work when only a single shape is given). Sample (pseudo) python code: # xDoc = empty Writer document # xContext = component context page = xDoc.DrawPage collection = xContext.ServiceManager.createInstance( 'com.sun.star.drawing.ShapeCollection' ) shape = xDoc.createInstance('com.sun.star.drawing.TextShape') shape.AnchorType = AT_PARAGRAPH page.add(shape) collection.add(shape) shapegroup = page.group(collection) Expected: shapegroup is an XShapeGroup containing the given shape Actual: shapegroup is None
Samuel Mehrbrodt committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3eb5318ed9ae8cf02804fbdc584a5f4b046db0ae tdf#136423 make SwXDrawPage::group work with a single shape It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Samuel Mehrbrodt committed a patch related to this issue. It has been pushed to "libreoffice-7-0": https://git.libreoffice.org/core/commit/ba86d4e1345276c5fa76a5e4b00e1f04de8cc166 tdf#136423 make SwXDrawPage::group work with a single shape It will be available in 7.0.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Samuel Mehrbrodt committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/a011af93697722f0b2da79eab4facbf96bb2dd9c tdf#136423 make SwXDrawPage::group work with a single shape It will be available in 6.4.7. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.