Ask Your Question
0

Open Libreoffice Calc in FullScreen...

asked 2016-09-30 03:00:26 +0200

ago_med gravatar image

updated 2016-09-30 04:17:22 +0200

mark_t gravatar image

I need to open the File ("01_MODELO_PRESCRICAO_UEM") in fullscreen...

Who can help me ???

I have this macro, but don't working..

Sub AbreTelaInteira
    oSheet = ThisComponent.Sheets.getByName("01_MODELO_PRESCRICAO_UEM")
    oController = ThisComponent.CurrentController

    With oController
        .setActiveSheet(oSheet)
        .ColumnRowHeaders = False
        .SheetTabs = False
        .Frame.LayoutManager.HideCurrentUI = True
    End With
End Sub

Edit to place code inside a code block

edit retag flag offensive close merge delete

Comments

Do you really mean fullscreen, or do you mean maximised?

mark_t gravatar imagemark_t ( 2016-09-30 04:13:24 +0200 )edit

fullscreen.. i don't want to show menus.. only the cells of the sheet...

ago_med gravatar imageago_med ( 2016-09-30 04:34:22 +0200 )edit

don't work... i need a new code to do this... can someone help me ?

ago_med gravatar imageago_med ( 2016-10-17 18:59:46 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2016-09-30 05:28:23 +0200

mark_t gravatar image

updated 2016-10-17 19:40:57 +0200

You could add the following in your With block.

.HasHorizontalScrollBar = False
.HasVerticalScrollBar = False
.Frame.ContainerWindow.IsMaximized = True

This still leaves the window title bar and the windows task bar.

Edit to add example calc document. Untitled 34.ods

This is as close to full screen as I could get using a macro without calling windows user32.dll that will work only on 32 bit version of LibreOffice and only on windows.

Please post a screenshot or describe in more detail what doesn't work.

On my Windows 8.1 LibreOffice 5.2.2.2, 64 bit it looks like this: image description

edit flag offensive delete link more

Comments

I'll test at night... but i think that won't work because My initial code didn't work...

ago_med gravatar imageago_med ( 2016-09-30 20:28:45 +0200 )edit

For me your original code was turning off the toolbars, menus, column and row headers. It did not change window to maximised or turn off the scroll bars. I'm using LO 5.2.1.2 on Windows8.1. What was not working for you?

mark_t gravatar imagemark_t ( 2016-09-30 20:36:10 +0200 )edit

I'll test the macro in a few minutes

ago_med gravatar imageago_med ( 2016-09-30 22:56:57 +0200 )edit

don't work....

ago_med gravatar imageago_med ( 2016-10-17 18:58:43 +0200 )edit

can you help me ???

ago_med gravatar imageago_med ( 2016-10-17 18:58:59 +0200 )edit

i need a new code to do this...

ago_med gravatar imageago_med ( 2016-10-17 18:59:11 +0200 )edit
0

answered 2016-10-17 19:21:54 +0200

ago_med gravatar image

updated 2016-10-17 19:48:19 +0200

mark_t gravatar image

I found a code that worked perfectly....

sub startFullScreen()

   dim document   as object
   dim dispatcher as object

   document   = ThisComponent.CurrentController.Frame
   dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

   dim args(0) as new com.sun.star.beans.PropertyValue
   args(0).Name = "FullScreen"
   args(0).Value = True

   dispatcher.executeDispatch(document, ".uno:FullScreen", "", 0, args())

end sub
edit flag offensive delete link more

Comments

I edited your post to correct the code block format. I didn't consider the option of recording a macro from the menu item for full screen.

mark_t gravatar imagemark_t ( 2016-10-17 19:50:56 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-09-30 03:00:26 +0200

Seen: 447 times

Last updated: Oct 17 '16