Bug 126892 - visibility of cut/pasted section cannot be programmatically changed
Summary: visibility of cut/pasted section cannot be programmatically changed
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Section Macro-UNOAPI
  Show dependency treegraph
Reported: 2019-08-13 18:45 UTC by Lionel Elie Mamane
Modified: 2020-03-11 15:25 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

reproduction document (10.95 KB, application/vnd.oasis.opendocument.text)
2019-08-13 18:46 UTC, Lionel Elie Mamane

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2019-08-13 18:45:48 UTC
The reproduction document has two sections (named Section1 and Section2, respectively) inside the frame, one visible and one not visible. The UI calls that "hidden" but the actual property is "IsVisible" and the negation of the UI "hidden" checkbox.

The button launches a Basic procedure that toggles the visibility of the two sections. Correct behaviour ("the macro works correctly") is that the section visible before procedure execution is hidden, and the section hidden before procedure execution is visible. Incorrect behaviour is that one or both sections are not toggled.

For ease of observation, each section contains the text saying that that section is visible, and the Basic procedure checks whether the change it requested has been performed, and indicates success or failure in a pop-up MessageBox.

Steps to Reproduce:
1. Set Macro security to medium (or low)
2. Open reproduction document
3. Accept macro execution (if prompted, i.e. macro security is on medium)
4. Click button (repeatedly)
5. Select the frame
6. Cut (Cntrl-X)
7. Paste  (Cntrl-V)
8. Click button (once, repeatedly, ...)
9. save document
10. Use menu Format / Sections to see that the two sections are still there, and still have the same name, and its visibility can be successfully changed through the UI.
11. close document; do not save
12. open document again
13. Accept macro execution (if prompted, i.e. macro security is on medium)
14. Click button (repeatedly)

Actual Results:
At step 4, the macro works correctly.
At step 8, the macro doesn't work.
At step 14, the macro works correctly.

Expected Results:
The macro works at steps 4, 8 and 14.

Reproducible: Always

User Profile Reset: No

OpenGL enabled: Yes

Additional Info:
Debian-provided package
Build ID: 1:6.1.5-3
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk3; 
Locale: en-GB (en_GB.utf8); Calc: group threaded
Comment 1 Lionel Elie Mamane 2019-08-13 18:46:16 UTC
Created attachment 153355 [details]
reproduction document
Comment 2 Xisco Faulí 2019-10-23 14:40:19 UTC
Reproduced in

Build ID: 437dc68285dab0f08a1ded2193d86d64f560cd9b
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded


LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-