modification of print dialog

Thomas Krumbein thomas.krumbein at documentfoundation.org
Thu Jan 30 06:50:40 PST 2014


Hey Alex,

yes, that's easy :)

Just write a small macro to check if the actual document has a URL and
if, check the flag isModified().
If this flag is true or the Document do not have an url you do have
unsaved changes - so you can act with a own dialog.

Otherwise call uno:print - that is the same as using the print-button or
the menu: file - print.

Then - create an extension out of your code, create an addon.xcu file
which replace the existing commands (file - print and print-Button) with
your marco. Define the moduls were it should work (i.E. Writer, Calc).
Install your extension - ready :)

Now - when the user klick on the print-button, your macro will check the
document and react as you want.

Best regards
Thomas


Am 30.01.2014 15:05, schrieb Кораблёв Алексей Анатольевич:
> Hello ! I faced with the following problem: I need to launch an
> additional dialog box while user pushing the "Print" button: I would
> like to check if he has saved the document that he's trying to print
> in order to prevent the printing of the unsaved documents.  Are there
> any methods of the solution of this task without modification of a
> source code?
> 
> Yours truly, Alex.
> 
> 
> 
> 
> _______________________________________________ LibreOffice mailing
> list LibreOffice at lists.freedesktop.org 
> http://lists.freedesktop.org/mailman/listinfo/libreoffice


-- 
## Unterstützung der freien Office Suite
## http://de.libreOffice.org  - www.LibreOffice.org
## Vorstand Freies Office Deutschland e.V.
## Mitglieder willkommen: www.FroDeV.org


More information about the LibreOffice mailing list