On Thu, 2005-02-10 at 23:20, Mathias Bauer wrote:
> Ian Laurenson wrote:
> 
> > But I can use something like this:
> > 
> > oFrame   = ThisComponent.CurrentController.Frame
> > oDispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
> > oDispatcher.executeDispatch(oFrame, ".uno:NewWindow", "", 0, Array())
> > oHiddenDoc = thisComponent
> > oHiddenDoc.currentController.frame.containerWindow.setVisible(false)
> > 
> > oInvisibleVC = oHiddenDoc.currentController.viewCursor
> > oInvisibleVC.gotoStartofLine(true)
> > msgbox len(oInvisibleVC.string)
> > 
> > oHiddenDoc.currentController.frame.dispose
> 
> Yes, that is possible, if you can tolerate the flicker.
> 
> As long as nobody confuses the visibility of the window (someting that
> is special for the view) with the "hidden" property of the document you
> won't get into problems. So it should work if the invisible view is
> created only temporarily.
Due to the flicker I was creating the "hidden window" once and leaving
it available for a while. This meant that the Window menu didn't work
for selecting other open documents (possibly other problems I haven't
yet discovered?). Any suggestions for alternate ways of hiding the
window?

I have to confess my ignorance and stupidity but I don't know about the
"hidden" property of the document.

Maybe I need to check some assumptions I have been making:

* The only way of finding the relative location on a page is by a
ViewCursor. (By relative I mean the number of characters from the left
margin and number of lines down the page)
* The only way of having a second ViewCursor is by having a second
window - such as that produced by Window > New Window.
* The only way of creating a new window for thisComponent by a macro is
by doing a UNO dispatch call.

I have uploaded the template that I am working on to
http://homepages.paradise.net.nz/hillview/OOo/ 1800MS_IL2.stw
in case anyone is interested.

Thanks, Ian


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to