incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sagina,Anna" <>
Subject Weblayout issue in Java with open office3.4
Date Mon, 08 Oct 2012 10:24:49 GMT
  I logged a bug related to weblayout issue with 3.4. I have got the basic code to make it
to weblyaout. Does anybody has equivalent java code to resolve it. Below is the bug and response


Need document to open in weblayout mode however it is opening in printlayout mode in open
office3.4.1 also. Printlayout giving a bad view to user as it displays header and footer page
numbers and margins.

Using this code to open the document in weblayout mode
//Create the property array to pass parameters
                PropertyValue[] browseProp = new PropertyValue[ 1 ];
                browseProp[ 0 ] = new PropertyValue();
                browseProp[ 0 ].Name = "BrowseView";//$NON-NLS-1$
        browseProp[ 0 ].Value =  Boolean.TRUE;


                        //Execute the UNO command, BrowseView, to switch to the web layout
                        XDispatchProvider xDispatchProvider = (XDispatchProvider)UnoRuntime.queryInterface(XDispatchProvider.class,
                        helper.executeDispatch(xDispatchProvider, ".uno:BrowseView","", 0,
[reply<>] [-]<>
Comment 1<> Regina Henschel<>
2012-09-26 11:58:02 UTC
The document opens in weblayout, if it was saved in weblayout. Does that not work for you?

I'm not sure, what the purpose of your code is. There is already the property "ShowOnlineLayout"
in service "ViewSettings".
[reply<>] [-]<>
Comment 2<><>
2012-09-26 12:01:50 UTC
We have embedded open office inside text editor. So while dispalying the embedded openoffice
document want it to diaply in weblayout. Till OO3.3 it used to open in weblayout when we used
the code mentioned above. We are usng java to call openoffice apis.

How can I call the property showOnlineLayout through java.
[reply<>] [-]<>
Comment 3<> Regina Henschel<>
2012-09-26 13:11:36 UTC
This is a support request.

I'm not familiar with using Apache OpenOffice this way. Please ask on<>
or on the forum

Do you know the SDK and the Developer's Guide?

In Basic, if the document is opened, you would use something like this (Basic has a simplified
property access)
dim oDocument as variant: oDocument = ThisComponent
dim oController as variant: oController = oDocument.getCurrentController()
dim oViewSettings as variant: oViewSettings = oController.ViewSettings
oViewSettings.ShowOnlineLayout = TRUE

CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation
and are intended only for the addressee. The information contained in this message is confidential
and may constitute inside or non-public information under international, federal, or state
securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such
information is strictly prohibited and may be unlawful. If you are not the addressee, please
promptly delete this message and notify the sender of the delivery error by e-mail or you
may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message