Bug 128571 - Draw LayerManager context doesn't work through "basic" editor
Summary: Draw LayerManager context doesn't work through "basic" editor
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-03 16:44 UTC by paour
Modified: 2024-01-02 10:33 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example in draw document (15.75 KB, application/vnd.oasis.opendocument.graphics)
2019-11-03 16:44 UTC, paour
Details
Test circle buton (17.99 KB, application/vnd.oasis.opendocument.graphics)
2024-01-02 10:26 UTC, paour
Details

Note You need to log in before you can comment on or make changes to this bug.
Description paour 2019-11-03 16:44:14 UTC
Created attachment 155488 [details]
Example in draw document

Context:
2 layers named "Cercles" and "carrés" in draw page.
In "Cercles" layer, différents shape.
The button "Circle with Circle macro" in main page hide or show the draw in "cecles" shapes.

This macro is link with the button "Circle with Circle macro":
=========================================
sub Circle
dim LibOGestCouches as object
LibOGestCouches  = thiscomponent.LayerManager
	if LibOGestCouches.hasByName("Cercles") then
		LibOGestCouches.getByName("Cercles").IsVisible =_
		not(LibOGestCouches.getByName("Cercles").IsVisible)
	else
		msgbox "No Layer found "
	end if
End sub
============================================
If we execute the macro in "basic" window,
LibOGestCouches.getByName("Cercles").IsVisible = True
doesn't change to 
LibOGestCouches.getByName("Cercles").IsVisible = False
and vice versa
Comment 1 Oliver Brinzing 2019-11-03 17:51:36 UTC
confirming, it works via button or Menu Tools/Macros/Run Macro... but fails if started from basic editor

already reproducible with AOO 4.1.5
Comment 2 paour 2019-11-03 19:27:01 UTC
same effect if we use other properties i.e.
LibOGestCouches.getByName("Cercles").setPropertyValue("IsVisible",false)
Comment 3 QA Administrators 2021-12-13 04:02:57 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2023-12-14 03:14:14 UTC Comment hidden (obsolete)
Comment 5 paour 2024-01-02 10:26:43 UTC
Created attachment 191691 [details]
Test circle buton
Comment 6 paour 2024-01-02 10:33:09 UTC
Hello,
Bug already with 
Version: 7.5.8.2 (X86_64) / LibreOffice Community
Build ID: f718d63693263970429a68f568db6046aaa9df01
CPU threads: 2; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: threaded

The "Circle with Circle macro" button runs, but if you test the "Circle" Macro alone with F8 it does not work.
I add 2 messages for the status "LibOGestCouches.getByName("Circles").IsVisible" which remains at "True"

see new attach file "Test circle buton"
regards
Nicolas