Created
May 25, 2013 10:44
-
-
Save arcusfelis/5648666 to your computer and use it in GitHub Desktop.
Libreoffice Calc: print ranges for all pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REM ***** BASIC ***** | |
| ' Fit print range on page | |
| sub AutoScaleSheet | |
| view = thiscomponent.getCurrentController() | |
| fam =thiscomponent.stylefamilies.getbyname("PageStyles") | |
| sh = view.getActivesheet() | |
| style = fam.getbyname(sh.PageStyle) | |
| style.ScaleToPagesX = 1 | |
| style.ScaleToPagesY = 1 | |
| end sub | |
| sub AutoScale | |
| oDoc = ThisComponent | |
| oSheets = oDoc.Sheets | |
| Controller = oDoc.getcurrentController | |
| For i=0 to oSheets.Count - 1 | |
| Controller.setActiveSheet(oSheets.getByIndex(i)) | |
| AutoScaleSheet | |
| next i | |
| end sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment