Can Writer remember to use Web Layout next time?

Discuss the word processor
Post Reply
oo2u
Posts: 6
Joined: Wed Feb 18, 2009 2:01 am

Can Writer remember to use Web Layout next time?

Post by oo2u »

I tried OO Writer a few years ago and was dismayed and stunned that a complex program like this can't remember the previous view settings or can't remember a default view setup. Is this still the case? It seems that when I open a .html file or .htm it defaults to Print Layout. Is that ridiculous or what? If its .htm or .html I probably want to view it in WEB Layout as its probably used for a WEB site.

With most of the thinking world going paperless, why in the name of all logic would they opt for Print Layout as the default?

Here's hoping I'm all wrong and that I missed something in the Options. Otherwise its back to bloatware Microslop Word. Which I really don't want to do.

And is there any way of saving a document as a .htm file so it can be loaded up to a website via FTP like I do so easily with MS Word?
OOo 3.0.X on Ms Windows XP
User avatar
Zizi64
Volunteer
Posts: 11361
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Impossible for Writer to remember Web Layout for next ti

Post by Zizi64 »

Here is a workaround idea:

Code: Select all

sub Web_layout_on
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "BrowseView"
args1(0).Value = true

dispatcher.executeDispatch(document, ".uno:BrowseView", "", 0, args1())
You can assign this macro to the "document create", "document open" event...
The macro change the view to "Web view" when the document is opened, or created...

Save the macro to MyMacros/Standard library (into an user defined BASIC Module)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
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.
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: Impossible for Writer to remember Web Layout for next ti

Post by TheGurkha »

If you want to work with HTML for a website, then you should really look at a different product. OOo isn't the best HTML editor. Have you looked at (free, open source) KompoZer?
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Can Writer remember to use Web Layout next time?

Post by acknak »

It seems that when I open a .html file or .htm it defaults to Print Layout. Is that ridiculous or what? If its .htm or .html I probably want to view it in WEB Layout as its probably used for a WEB site.
Unfortunately--fortunately?--OOo can't read your mind, and it's not terribly well tuned for opening a random file in the most logical application. As already mentioned, the web page/html editing functions are not a primary focus for OOo and I expect that the developers don't want people to use it unless they really need it. So you have to go a little out of your way and give OOo some kind of hint what application should open the file.

If you just open the file with Writer (or with no application context), you get a normal Writer window in normal print layout mode--exactly what happens if you open a text file.

However, if you first start the Writer/Web application (File > New > HTML Document), or choose "HTML Document" from the web page section of the file type drop down list, you get a Writer/Web window, in web layout.
AOO4/LO5 • Linux • Fedora 23
Post Reply