Bug 150305 - A marked Fontwork shape is not in 'Current Selection' in Development tools
Summary: A marked Fontwork shape is not in 'Current Selection' in Development tools
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: UNO-Object-Inspector
  Show dependency treegraph
 
Reported: 2022-08-08 18:28 UTC by Regina Henschel
Modified: 2023-01-18 20:16 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2022-08-08 18:28:46 UTC
Start a Writer document. Open Development tools and click on 'Current Selection' and 'Properties'.
Insert a Fontwork shape and select it.
Error: There is Class name: SwXTextRanges and the Properties window is empty. 'Refesh' does not change it.
Expected: The properties of the shape are shown in the window and there is Class name: com.sun.star.drawing.SvxShapeCollection

The same problem and likely the underlying reason exists in Basic macros.
In
dim oDoc as object: oDoc=ThisComponent
dim oShapeCollectionWriter as variant
oShapeCollectionWriter = oDoc.CurrentSelection

The variable oShapeCollectionWriter is empty.

I have seen a similar problem with extruded shapes in bug 146316. For normal shapes the variable oShapeCollectionWriter is not empty.
Comment 1 Dieter 2022-08-24 06:58:47 UTC
I confirm it with

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4c96abd81460977d413d4d28e891bbbac5769ede
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

but not with

Version: 7.4.0.3 (x64) / LibreOffice Community
Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Class name in LO 7.4 is lso SwXTextDocument, but properties windwo is not empty.
Comment 2 Stéphane Guillou (stragu) 2023-01-18 12:20:23 UTC
Tested on Ubuntu 20.04:

Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Steps:
1) New Writer document
2) Tools > Development Tools > Current selection
3) Insert > Fontwork > Simple > OK

Result:
- With the fontwork object selected (i.e. I can see the resizing handles around the object), the class name is SwXTextRanges, and pressing Refresh (or changing tabs) shows all empty tabs.
- Double-clicking the object to edit it (i.e. text can now be changed) updates the class to com.sun.star.drawing.SvxShapeCollection, with content in the tabs.

Same thing since 7.2, in which Development Tools was introduced:

Version: 7.2.7.2 / LibreOffice Community
Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

So I don't see it as a regression, behaviour has not changed.

Regina, do you see the same thing?
Dieter, are you sure you used "Current selection" and refreshed / switched tabs in your tests?
Comment 3 Regina Henschel 2023-01-18 14:30:12 UTC
(In reply to Stéphane Guillou (stragu) from comment #2)
> Steps:
> 1) New Writer document
> 2) Tools > Development Tools > Current selection
> 3) Insert > Fontwork > Simple > OK
> 
> Result:
> - With the fontwork object selected (i.e. I can see the resizing handles
> around the object), the class name is SwXTextRanges,

That is already wrong. You should see the same as with a 'smiley'-shape for example, that is com.sun.star.drawing.SvxShapeCollection

 and pressing Refresh
> (or changing tabs) shows all empty tabs.

Which clearly shows that there is an error.
 
> Same thing since 7.2, in which Development Tools was introduced:
> 
> Version: 7.2.7.2 / LibreOffice Community
> Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2
> CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
> Locale: en-AU (en_AU.UTF-8); UI: en-US
> Calc: threaded
> 
> So I don't see it as a regression, behaviour has not changed.

It is not a problem in the development tools but in the underlying Basic.

I have tested the macro with AOO and the error is there too. So you are right, it is not a regression but an error inherited from OOo.
Comment 4 Stéphane Guillou (stragu) 2023-01-18 20:16:46 UTC
Thank you, Regina. Confirming.