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.
Francois Gatto
---------------------------------------------------------------------
To unsubscribe, e-mail: prog-unsubscr...@fr.openoffice.org
For additional commands, e-mail: prog-h...@fr.openoffice.org