Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


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@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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.