[Solved] Controlling Size of Document When Opening

Discuss the word processor
Post Reply
User avatar
GridLok
Posts: 109
Joined: Thu Mar 08, 2012 12:54 pm
Location: Adelaide, South Australia

[Solved] Controlling Size of Document When Opening

Post by GridLok »

Recently I found it suited the data to be displayed, to create a custom page - Width: 40cm x Height: 21cm. To view the entire contents I had to drag the page display wider than the default A4 display. When later I opened a 'normal' document it was displayed within the extended boundaries of the previous custom document. Equally, when later I reopened the custom item, it was displayed within the boundaries of the previous (A4) document, thereby requiring me to either re-drag the boundaries or do a lot of scrolling. Is there a way in which the last displayed condition of each document can be made to control how it opens … instead of that of the last opened document? As things stand the most practical solution is to leave the 'wide' display as the 'default' … with large amounts of grey space … and to use F9 (on my Mac, that displays all items open on the Desktop), instead of my previous habit of arranging panes to overlap so that I can easily swap between them as needed.

It seems to me it would be a useful feature … each document opening in the condition it was last used.

P.S. Just opened a 'normal' (A4) document, while the custom page was open … it opened to its usual size! Sorry, I do not understand what is going on.
Last edited by GridLok on Sun Oct 01, 2017 4:03 am, edited 1 time in total.
"To find the right answer, first find the right question"
OpenOffice org. 4.1.4
OO414m5(Build:9788) - Rev. 1811857
2017-10-16 22:12:14 (Mon, 16 Oct 2017) - Darwin x86_64
Mac OS X 10.12.6 (Sierra)
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Controlling Size of Document When Opening

Post by Zizi64 »

Sorry I not understood exactly yout problem... Do you want to set/adjust
- the zoom factor for each document
- the application Window size for each document
- or the page size of the documents??

What do you meant on the expression "size of Document" exactly?

I tried it in my LibreOffice 5.3.6:

The adjusted Zoom factor will be stored into the specific document.
The page size of the documents will be store in the document too, and you can create some different templates with different page sizes - if you want create new documents based on them.

The Window size of the application will be stored into the program settings. It can remember to the last adjusted window size value only.
But you can write a macro (and you can strore the macro in the templates what will able to resize the application window when you open a template or an existing document.
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.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Controlling Size of Document When Opening

Post by John_Ha »

Writer only remembers if you have entered a name in Tools > Options > OpenOffice > User data. It is a privacy thing.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
GridLok
Posts: 109
Joined: Thu Mar 08, 2012 12:54 pm
Location: Adelaide, South Australia

Re: Controlling Size of Document When Opening

Post by GridLok »

Tibor, I am referring to "the application Window size for each document" - that is, the dimensions of the window that appears on the screen when a document is opened. It is not a matter of "Zoom factor". It is evident that if I click-and-drag the window outline - e.g. to accomodate the displayed page size, then that sets the dimensions the window will appear for each subsequent document that is opened.

John Ha reference to "Tools > Options > OpenOffice > User data" may refer to "AOO 4.1.3, Windows 7 Home 64 bit" … I cannot find that sequence on my Mac.

At the moment I don't have the time to explore the permutations of what is happening; I shall just have to live with it. As I originally commented, it would be a useful feature if OO_W would open each document in exactly the condition it was left, including "the application Window size". There may be a facility already available that enables this … I don't know and was hoping that more experienced users might be able to assist.

Thank you for responding. I will leave this thread open for a few days to see if anything 'turns up'.
"To find the right answer, first find the right question"
OpenOffice org. 4.1.4
OO414m5(Build:9788) - Rev. 1811857
2017-10-16 22:12:14 (Mon, 16 Oct 2017) - Darwin x86_64
Mac OS X 10.12.6 (Sierra)
User avatar
robleyd
Moderator
Posts: 5082
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Controlling Size of Document When Opening

Post by robleyd »

Tools | Options on other OSes translates to OpenOffice | Preferences on a Macintosh. You may find [Tutorial] Mac FAQ will help you with other AOO/Mac related matters.

I think the actual window size is controlled by the OS, not the application.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Controlling Size of Document When Opening

Post by Zizi64 »

Here is a code snippet from Andrew Pitonyak's OOME 3.0 book:

Code: Select all

REM Shrink the current window to 75% of its current size.
Sub ShrinkWindowBy75
  Dim vFrame     'Current frame
  Dim vWindow    'container window
  
  REM And this is a struct that holds a rectangle object
  REM I could have also used a Variant or an Object to
  REM hold the return type, but I know what it is, so I 
  REM defined the correct type to hold it.
  Dim vRect As New com.sun.star.awt.Rectangle
  
  vFrame = StarDesktop.getCurrentFrame()
  vWindow = vFrame.getContainerWindow()
  
  REM As a struct, the object is copied by value, not by reference.
  REM This means that I can modify vRect and it will not affect
  REM the position and size of the window.
  REM In my tests, vRect.X and vRect.Y are zero, which is wrong. 
  REM vRect.Width and vRect.Height are indeed correct.
  vRect = vWindow.getPosSize()
  
  REM When setting the position and size, the last argument specifies
  REM which of the arguments to use. 
  'com.sun.star.awt.PosSize.X        Set only the X-position
  'com.sun.star.awt.PosSize.Y        Set only the Y-position
  'com.sun.star.awt.PosSize.WIDTH    Set only the Width
  'com.sun.star.awt.PosSize.HEIGHT   Set only the Height
  'com.sun.star.awt.PosSize.POS      Set only the Position
  'com.sun.star.awt.PosSize.SIZE     Set only the Size
  'com.sun.star.awt.PosSize.POSSIZE  Set both the Position and Size
  vWindow.setPosSize( vRect.X, vRect.Y, 3*vRect.Width/4, 3*vRect.Height/4,_
        com.sun.star.awt.PosSize.SIZE )
End Sub
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
GridLok
Posts: 109
Joined: Thu Mar 08, 2012 12:54 pm
Location: Adelaide, South Australia

Re: Controlling Size of Document When Opening

Post by GridLok »

Don't know what happened to the reply I thought I posted!

Thank you all for your responses. For now I will settle for leaving the 'application window size' at that needed to accommodate the largest page.

Tibor, you are as ever most complete in your information. Unfortunately I am not familiar with any coding and cannot therefore easily make use of the "code snippet" you provided … perhaps one day I will find a spare moment or two to learn the Basic that is used in OO_W,
"To find the right answer, first find the right question"
OpenOffice org. 4.1.4
OO414m5(Build:9788) - Rev. 1811857
2017-10-16 22:12:14 (Mon, 16 Oct 2017) - Darwin x86_64
Mac OS X 10.12.6 (Sierra)
Post Reply