diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-12-30 00:00:37 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-18 09:13:56 +0100 |
commit | 16e248bec76f2c1587383d26581ecc8241c755f8 (patch) | |
tree | a468153e1583d66c46ca79ff5d1159737a9a76d0 /sw/sdi | |
parent | 1f1cff03c4f15ee9fe7786a98ba8259a64823e0a (diff) |
mailmerge: Implement toolbar controller to exclude entries.
This can be used as a "How to implement a custom widget / control in
the toolbar" example:
* the Controller.xcu change introduces a .uno:MailMergeExcludeEntry command so
that it can be added in the toolbar .xml description (in this case
mailmerge.xml)
* the swriter.sdi introduces the .uno:MailMergeExcludeEntry command for the
sfx2 handling - so that it can get notifications about enable/disable
changes, invalidates, etc.
* wrtapp.sdi + associated apphdl.cxx change make it possible to forward
command invalidates (the rBindings.Invalidate(FN_MAILMERGE_EXCLUDE_ENTRY);)
to the MMExcludeEntryController::statusChanged() for further handling
(in this case setting the checked state according to the current data)
* MMExcludeEntryController::createItemWindow() implements the custom widget
itself (in this case a checkbox, but can be any VCL widget, even a custom
one)
* the rest (sw.component and the associated getImplementationName(),
supportsService(), etc.) takes care of the instantiation of the controller.
Change-Id: I68269538f779a6680b0ba98395b7985d3f1ab95a
Diffstat (limited to 'sw/sdi')
-rw-r--r-- | sw/sdi/swriter.sdi | 17 | ||||
-rw-r--r-- | sw/sdi/wrtapp.sdi | 5 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index 5383bca65f77..7bc5b86c5948 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -3841,6 +3841,23 @@ SfxVoidItem MailMergeLastEntry FN_MAILMERGE_LAST_ENTRY GroupId = GID_DOCUMENT; ] +SfxVoidItem MailMergeExcludeEntry FN_MAILMERGE_EXCLUDE_ENTRY +() +[ + AutoUpdate = TRUE, + FastCall = TRUE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = GID_DOCUMENT; +] + SfxVoidItem MailMergeCreateDocuments FN_MAILMERGE_CREATE_DOCUMENTS () [ diff --git a/sw/sdi/wrtapp.sdi b/sw/sdi/wrtapp.sdi index d1e71c4694d0..6ead72816f89 100644 --- a/sw/sdi/wrtapp.sdi +++ b/sw/sdi/wrtapp.sdi @@ -86,6 +86,11 @@ interface StarWriter StateMethod = StateOther ; ] + FN_MAILMERGE_EXCLUDE_ENTRY + [ + StateMethod = StateOther ; + ] + FN_MAILMERGE_CREATE_DOCUMENTS [ ExecMethod = ExecOther ; |