Bug 150753 - With non-default .ott document template, e.g. "Simple" cannot edit texbox once placed
Summary: With non-default .ott document template, e.g. "Simple" cannot edit texbox onc...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.5.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks: Templates
  Show dependency treegraph
 
Reported: 2022-09-02 09:43 UTC by dainius.mazuika
Modified: 2022-09-13 17:45 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
document with a textbox inside for testing (11.22 KB, application/vnd.oasis.opendocument.text)
2022-09-02 09:46 UTC, dainius.mazuika
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dainius.mazuika 2022-09-02 09:43:52 UTC
Description:
Cannot select textbox, see screencast at : https://youtu.be/jtTDqcnfzws

Steps to Reproduce:
1. Start writer;
2. Add textbox, enter text in it;
3. Click on empty space in sheet in order to exit "textbox" mode;
4. I cannot select/edit textbox just created after wards, see video at https://youtu.be/jtTDqcnfzws

Actual Results:
See video, cannot edit textbox afterwards

Expected Results:
1) Select textbox by single click in the area of the textbox;
2) Enable to edit text when double clicking inside the textbox area.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.5.2 (x64) / LibreOffice Community
Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 1 dainius.mazuika 2022-09-02 09:46:03 UTC
Created attachment 182173 [details]
document with a textbox inside for testing
Comment 2 Faisal 2022-09-02 10:38:27 UTC
Cannot reproduce with a new document or the attachment.

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: en-US (en_US); UI: en-US
Calc: CL
Comment 3 dainius.mazuika 2022-09-02 13:49:01 UTC
I will try to reproduce with cleared appdata, maybe settings related.
Comment 4 Rafael Lima 2022-09-02 21:44:44 UTC
Not repro in

Version: 7.3.5.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.5-0ubuntu0.22.04.1
Calc: threaded
Comment 5 V Stuart Foote 2022-09-02 22:27:39 UTC
Can not reproduce
Version: 7.3.5.2 (x64) / LibreOffice Community
Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

Able to single click into draw Text box object on Writer canvas

Able to double click to directly select the text for editing with text cursor applied at end of text run.
Comment 6 dainius.mazuika 2022-09-03 03:59:56 UTC
This is config related - does not reproduce with cleared appdata. Looking now for a difference in "registrymodifications.xcu".
Comment 7 dainius.mazuika 2022-09-03 04:45:38 UTC
Problem disappears when I delete this line from "registrymodifications.xcu":

<item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.text.TextDocument']"><prop oor:name="ooSetupFactoryTemplateFile" oor:op="fuse"><value>file:///C:/Program%20Files/LibreOffice/share/template/common/styles/Default.ott</value></prop></item>

What does this mean?

(I have a pretty heavy toolbar with some macros, both in writer and calc, so I do not want to lose personal adjustments by reverting to default settings, my preferences has grown up during some years...)
Comment 8 dainius.mazuika 2022-09-03 04:56:35 UTC
I would appreciate if someone would explain what this deleted line impacts. I do not spot any difference in writer and calc, all macros seems to be working and GUI is the same. This shall be closed, if developer team think there should be no side effects after deleting this line. Thank you in advance.
Comment 9 Yagapriyan 2022-09-11 05:42:51 UTC
Status : Bug Reproduced

Steps followed : 

1) Installed libre office dev 7.4.0.0 version.

2) Downloaded the attachment from attachments block.

3) Prepared to perform the action by typing a text outside the text box as well as 
text was already present inside text box (Which is inside the page).

4) Tried to select both text line (Outside the text box word and inside the text 
box line).

5) Outside the text box line got selected but inside the text didn't get selected when tried to select.

Action performed environment : Linux mint OS 20.3 cinnamon version , Libre office 7.4.0.0 alpha.
Comment 10 V Stuart Foote 2022-09-11 21:13:00 UTC
OP was against Windows.

Again as at comment 5 could not reproduce with a clean/fresh user profile

However, if I set the "Simple" .ott to be the default for Writer text documents, I can reproduce inability to click select a draw TextBox or to double-click select the text in the TextBox.

STR

1. clean user profile
2. open Start Center
3. use the Templates split button to select Manage Templates
4. in the Templates dialog, filter to show Text Documents
5. select "Simple" template
6. r.mouse context menu 'Set as Default'
7. create a new Writer document (uses the Simple template)
8. Insert -> Text Box from main menu (or use button on Std ToolBar)
9. enter some text in the Text Box
10. click outside to close the entry
11. attempt to select the Text Box with a mouse click

    result?

12. attempt to select the text in the Text Box with a double mouse click

    result?

Changing back to default template for Writer documents and creating a new document, restores the ability to select either a draw TextBox or to select its text for editing. It also restore the function for documents created with the "Simple" template.

And, on a 7.5 build with "Simple" as default writer template, I could select the TextBox active from the Sidebar's Navigator deck, but still unable to then click select into the text of the TextBox to edit.

=-testing-=

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: bff60eadeac348024849d710690435ee9580831b
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 11 Laurent Balland 2022-09-12 06:51:41 UTC
No bug with "Business card with logo", "Modern business letter sans-serif/serif", "CV", "Resume" as default
Bug with "Default", "Modern" and "Simple"

We may need to complete these 3 templates with content.xml, manifest.rdf or settings.xml
https://opengrok.libreoffice.org/xref/core/extras/source/templates/styles/

See also:
https://wiki.documentfoundation.org/Documentation/CompatibilityFlags
Comment 12 Mike Kaganski 2022-09-12 09:23:59 UTC
(In reply to Laurent BP from comment #11)
> We may need to complete these 3 templates with content.xml, manifest.rdf or
> settings.xml

content.xml is enough, with

> <office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.2">
>     <office:body>
>         <office:text>
>             <text:p/>
>         </office:text>
>     </office:body>
> </office:document-content>

Note that the bug stays, why would Writer misbehave with such a template. We would need a separate bug, with the template attached, to track that bug further, after you complement the templates. Or maybe just focus on fixing that here, without adding the data to the template just to workaround the bug (the templates are valid ODF 1.2 extended).
Comment 13 Mike Kaganski 2022-09-12 12:19:35 UTC
(In reply to Mike Kaganski from comment #12)

https://gerrit.libreoffice.org/c/core/+/139796 would handle that problem.
@Laurent BP: please feel free to either proceed with adding content.xml to the templates, or maybe keep it as it is, as looks best from your point of view: there might be value both in keeping templates as minimal as possible, and also in having consistency (all templates having the same set of components).
Comment 14 Commit Notification 2022-09-12 15:01:53 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/70dcd1135743eb4dae6f881201140b57c1daddd3

tdf#150753: always do the final steps, including unlocking draw model

It will be available in 7.5.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.
Comment 15 Laurent Balland 2022-09-13 17:45:38 UTC
(In reply to Mike Kaganski from comment #13)
> (In reply to Mike Kaganski from comment #12)
> 
> https://gerrit.libreoffice.org/c/core/+/139796 would handle that problem.
> @Laurent BP: please feel free to either proceed with adding content.xml to
> the templates, or maybe keep it as it is, as looks best from your point of
> view: there might be value both in keeping templates as minimal as possible,
> and also in having consistency (all templates having the same set of
> components).

Thanks Mike for your fast fix. From my point of view, there is no need to modify template.