A workaround tip:
Create a new Calc document, resize the window, hide all of menus toolbars, sliders and other control features, link a selected cellrangy from the source document.
You can do these steps by a macro. My example macro works in the LibreOffice. The LO 5.3.6 has a useful feature: you can customize the local context menus, therefore you can add some control functionality of the control-less "Camera" panels/windows: Zoom, Refresh, etc...
Copy the macro code into the MyMacros - Standard Directory - Camera module (create it before), and then assign the macro to some shortcut key, or a toolbar icon, or a menu item, or a form control element.
Copy the attached CameraDisplay.ots template file into the Backup directory of the LibreOffice. That file is an empty .ots file, but i have assigned the refreshing macr oto the event "Activate document" , and added some plus functionality to the context menu of the document: the refresh macro (from the Module "Camera" of the Standard library of the MyMacros), and the Zoom Extent and the Save as built-in functions. These will not work in the Apache OpenOffice.
- Code: Select all Expand viewCollapse view
REM ***** BASIC *****
Option explicit
Sub MyCameraDisplay()
Dim oDoc, Dummy() as object
Dim oSourceDoc as object
Dim oFrame as object
Dim dispatcher as object
Dim args2(0) as new com.sun.star.beans.PropertyValue
Dim args3(0) as new com.sun.star.beans.PropertyValue
Dim args5(0) as new com.sun.star.beans.PropertyValue
Dim oLmgr As Object
Dim oWindow As object
Dim oRect As New com.sun.star.awt.Rectangle
Dim sCamDisp_URL as string
Dim CamPosX as long
Dim CamPosY as long
Dim CamWidth as long
Dim CamHeight as long
oSourceDoc = ThisComponent.CurrentController.Frame
oRect = oSourceDoc.getContainerWindow().getPosSize()
CamWidth = 400
CamHeight = 300
CamPosX = oRect.Width - CamWidth
CamPosY = oRect.Height - CamHeight
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(oSourceDoc, ".uno:Copy", "", 0, Array())
sCamDisp_URL = CreateUnoService("com.sun.star.util.PathSettings").Backup & "/" & "CameraDisplay.ots"
If FileExists(sCamDisp_URL) then
oDoc = StarDesktop.loadComponentFromURL (sCamDisp_URL, "_blank", 0, Dummy())
Else
oDoc = StarDesktop.loadComponentFromURL("private:factory/scalc", "_Blank", 0, Dummy())
end if
oFrame = oDoc.CurrentController.Frame
oLmgr = oFrame.LayoutManager
oLmgr.setVisible(false)
oDoc.CurrentController.VerticalScrollBar = false
oDoc.CurrentController.HorizontalScrollBar = false
oDoc.CurrentController.ColumnRowHeaders = false
oDoc.CurrentController.SheetTabs = false
oWindow = oFrame.getContainerWindow()
oRect = oWindow.getPosSize()
oWindow.setPosSize( CamPosX, CamPosY, CamWidth, CamHeight, com.sun.star.awt.PosSize.POSSIZE )
args2(0).Name = "ToPoint"
args2(0).Value = "$A$1"
dispatcher.executeDispatch(oFrame, ".uno:GoToCell", "", 0, args2())
args3(0).Name = "SelectedFormat"
args3(0).Value = 59
dispatcher.executeDispatch(oFrame, ".uno:ClipboardFormatItems", "", 0, args3())
dispatcher.executeDispatch(oFrame, ".uno:ZoomOptimal", "", 0, Array())
oDoc.CurrentController.Frame.SetTitle("Camera_" & Format(Year(Now), "0000") & Format(Month(Now), "00") & Format(Day(Now), "00") & "_" & _
Format(Hour(Now), "00") & Format(Minute(Now), "00") & Format(Second(Now), "00")
End Sub
'______________________________________________________________________________________________________
sub UpdateLinks
ThisComponent.calculateAll()
end sub
'______________________________________________________________________________________________________
Tibor Kovacs, Hungary; LO6.1.6 on Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.3.3; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.