Issue 97955

Summary: service com.sun.star.drawing.Layer: boolean propeties are not working
Product: App Dev Reporter: paolomantovani <p_manto>
Component: apiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, marcelly.bernard
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description paolomantovani 2009-01-11 23:50:47 UTC
changing property values via API does not reflect in the user interface, example:

REM  *****  BASIC  *****

Sub Main
  ThisComponent.Layermanager.Layout.IsVisible = False


End Sub

After the execution of this macro, the layer is still set as visible.
In addition, changing the property from the UI does not reflects at API level

This problem affects also the remaining boolean properties of this service:
IsLocked 
IsPrintable
Comment 1 bmarcelly 2009-01-13 12:22:31 UTC
"changing the property from the UI does not reflects at API level"
It is reflected if the macro is started from the document window, but not from the 
IDE.

"changing property values via API does not reflect in the user interface"
This bug only affects the predefined layers. I found a work-around:

Dim aLayer As Object
aLayer = ThisComponent.LayerManager.getByName("layout")
aLayer.IsVisible = False
ThisComponent.CurrentController.IsMasterPageMode = False

The tab of the hidden layer does not change its color. Another bug...
Comment 2 jsc 2009-01-13 12:51:49 UTC
jsc - > sj; i am not 100% sure if it's yours or not. Please redirect if necessary
Comment 3 paolomantovani 2009-01-13 22:55:06 UTC
Hi Bernard,
Thank you very much for the workaround! :-)

>> changing the property from the UI does not reflects at API level
> It is reflected if the macro is started from the document window, 
> but not from the IDE.

Confirmed!

>> changing property values via API does not reflect in the user interface
> This bug only affects the predefined layers.

Not in my case (ooo3.0 "vanilla" on Ubuntu 8.10)
I've created a new layer "Livello4" and tested this macro:

oLayer = ThisComponent.LayerManager.getByName("Livello4")
oLayer.IsVisible = Not oLayer.IsVisible

As you noticed about the other problem, it does not work from the IDE but it
does from the document window

In substance, layer properties are correctly read and written only if the macro
is launched form the document window.

> The tab of the hidden layer does not change its color. Another bug...

Confirmed

Thanks again
Comment 4 sven.jacobi 2009-02-06 15:22:22 UTC
sj->cl: can you please take over.
Comment 5 clippka 2009-06-03 12:38:29 UTC
The reason for the current behavior is that the layer settings are not document
settings but view settings. The reasoning for this feature is that if you design
your space shuttle in draw you can open two views on the same document that show
different sets of visible layers. But all in all this feature does not work well
for the user (and confuses the api developers :-)

Either we have to fix the api to access different view layer settings or rework
the layer management completely. I prefer the later. I'm keeping this issue as a
reminder to look at when we start working on this area
Comment 6 Marcus 2017-05-20 11:27:48 UTC
Reset assigne to the default "issues@openoffice.apache.org".