Page 1 of 1

[Solved]Layer Mgmt in CorelDraw vs. OpenOffice Draw

Posted: Thu Oct 19, 2017 3:46 am
by skuddle
Does LibreOffice Draw support layer views in a sidebar like CorelDraw 12? Attached is an image taken from CD:
coreldraw image.jpg
I'm trying to make CD labels. The label outlines are the same for all pages and I think the outlines will constitute a Master in OOD. The text on each page will be different. I am not going to print the label outlines but the must be visible as guides. Perhaps somebody could put me on the right path?

Re: Layer Mgmt in CorelDraw vs. OpenOffice Draw

Posted: Sat Oct 21, 2017 9:21 am
by Zizi64
I never used the CorelDraw, I do not know anything about its functions...

There is not Layer control function on the Sidebar, and you can not customize it (yet).

What do you want achieve really?
Do you want make easy visible/unvisible (switch on/off) the layers from a toolbar/menu?

I suppose, to do it from the Layers TABs seems a littlebit cumbersome for you:
Right click on the TAB - modify Layer - uncheck/check the Visible option - hit OK...
You can write (WRITE, but not RECORD!) a macro for this task based on the API (Application Programming Interface) functions.


Here is a short sample code snippet (I just reduced from my larger code):

Code: Select all

Sub ToggleCurrentLayerVisibility()
 Dim oDoc, oLayerManager as object
 Dim ActivValue as Boolean
 Dim oValtozo as Variant
 Dim oCurrentController as Object
 Dim oLayer as object
 Dim sLname as string
 
  	oDoc = Thiscomponent

	If oDoc.supportsService("com.sun.star.drawing.DrawingDocument") Then
	    oLayerManager = oDoc.getLayerManager()
		oCurrentController = oDoc.getCurrentController()
	   	oLayer = oCurrentController.ActiveLayer
		sLname = oLayer.name
		oLayer = oLayerManager.getByName(sLname)
		oLayer.IsVisible = not(oLayer.IsVisible)
	Else
		MsgBox("This is not a Draw document!")
	End If
End Sub  

Re: Layer Mgmt in CorelDraw vs. OpenOffice Draw

Posted: Sat Oct 21, 2017 4:37 pm
by keme
shortcut to show/hide a layer: ctrl+click on the tab (for mac OS-X users: shift+ctrl+click)

Re: Layer Mgmt in CorelDraw vs. OpenOffice Draw

Posted: Sun Nov 05, 2017 5:38 pm
by skuddle
@Zizi64

Thank you for your reply, but I've been a user (since 1986), not a programmer and don't understand coding.

Re: Layer Mgmt in CorelDraw vs. OpenOffice Draw

Posted: Mon Nov 06, 2017 9:28 am
by keme
keme wrote:shortcut to show/hide a layer: ctrl+click on the tab (for mac OS-X users: shift+ctrl+click)
Oops! Sorry. The actual request slipped my mind while I was reading Zizi64's reply. If you had followed all his guidelines you might have discovered a solution:

In the master page you can select content to be visible but not printable. Right click the layer tab and untick "Printable" (keep "Visible" ticked).

If you need some parts from the master page to print, you can add tabs there just like in the normal view.