3 messages in org.openoffice.fr.progRe: [prog] Passer en plein écranà pa...
FromSent OnAttachments
Lancelot LaurentFeb 19, 2009 1:41 pm 
Francois GattoFeb 19, 2009 8:57 pm 
Lancelot LaurentFeb 20, 2009 1:22 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [prog] Passer en plein écranà partir d'une macroActions...
From:Francois Gatto (oo@volcar.org)
Date:Feb 19, 2009 8:57:15 pm
List:org.openoffice.fr.prog

Bonjour,

Lancelot Laurent wrote:

Bonjour,

Comment peut-on depuis une macro faire passer le document actif en mode "plein écran" (l'équivalent du menu "Afficher>Plein écran" depuis l'interface utilisateur, ou encore du raccourci Ctrl+Maj+J) ?

J'ai réussi à faire pas mal de choses sur l'apparence du document à partir des propriétés disponibles par le CurrentController du document, mais là, je
sèche...

Merci d'avance pour votre aide.

Laurent L.

Pour du FullScreen pur

sub FullScreenOn() dim oDocument as object, oDispatcher as object oDocument = ThisComponent.CurrentController.Frame oDispatcher = createUnoService("com.sun.star.frame.DispatchHelper") dim fsargs(0) as new com.sun.star.beans.PropertyValue fsargs(0).Name = "FullScreen" fsargs(0).Value = true oDispatcher.executeDispatch(oDocument, ".uno:FullScreen", "", 0, fsargs()) wait 2000 call FullScreenOff() end sub

sub FullScreenOff() dim oDocument as object, oDispatcher as object oDocument = ThisComponent.CurrentController.Frame oDispatcher = createUnoService("com.sun.star.frame.DispatchHelper") dim fsargs(0) as new com.sun.star.beans.PropertyValue fsargs(0).Name = "FullScreen" fsargs(0).Value = false oDispatcher.executeDispatch(oDocument, ".uno:FullScreen", "", 0, fsargs()) end sub

Pour simplement masquer les barres d'outils et de menu

sub MasquerBarresOn( ) dim oDoc as object, oFrame as object oDoc = Stardesktop.getCurrentComponent() oFrame = oDoc.CurrentController.Frame ' masquage des barres oFrame.LayoutManager.setVisible(False) wait 3000 ' attente de 3 sec. ' puis reaffichage des barres call MasquerBarresOff() end sub

sub MasquerBarresOff( ) dim oDoc as object, oFrame as object oDoc = Stardesktop.getCurrentComponent() oFrame = oDoc.CurrentController.Frame ' reaffichage des barres oFrame.LayoutManager.setVisible(True) end sub

Bonne continuation.