Hi Friends,
How to Use One of the Method ThisComponent.setCurrentController() in LibreOffice Calc Which is Found in the website ?
http://itref.fc2web.com/openoffice/api/ThisComponent.html
You refer to a random website. Someone decided to “document” “methods of ThisComponent”, but that is a wrong approach.
ThisComponent represents what it looks like: the current component - and that component would be different, depending on what is current. And its methods would be different in each case.
And the correct method description is on the official API site. E.g., for setCurrentController.
So, What is the Use of setCurrentController and How to use that one
When several controllers are attached to the model, you call this method to set one of them active.
any Example Please
Here is an example.
When you open Writer (which itself calls setCurrentController
), and later use Window
→ New Window
, this eventually calls SfxFrameLoader_Impl::impl_createDocumentView
; that one calls ConnectFrameControllerModel
; which in turn calls ConnectModelController
; and finally, there setCurrentController
is called, which makes the newly created controller (connecting the model to the new frame) the active one.