summaryrefslogtreecommitdiff
path: root/sfx2
AgeCommit message (Collapse)Author
2016-03-10sfx2 classification: merge common code from sw and writerfilterMiklos Vajna
The two versions were almost a duplicate. Change-Id: I3148150d62484a55fc8d59ca354998f211435c0b
2016-03-10MenuDispatcher::m_pMenuManager is always nullptrMaxim Monastirsky
... as shown by 7da15debe39b50255cc08b3fef7ae38185a9174f. Which means that MenuManager is unused, and MenuDispatcher does nothing useful. Change-Id: Ic85619531054a573d971d38b52609e1cbcaf780c Reviewed-on: https://gerrit.libreoffice.org/23117 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-10sfx2: make SfxClassificationHelper not require a full doc shellMiklos Vajna
So that input filters can build their own doc properties and can also use CheckPaste() without having the full original document around. Change-Id: I0b8a63702f73ce04e8728a360b56ab9d1ca67af1
2016-03-09Move classified copy/paste strings from sw to sfx2Miklos Vajna
So that other modules can use them as well. The RTF import in writerfilter is one potential user. Change-Id: Ib009e1be2aff14d0fcac643c0c6000d2895515b0
2016-03-09Move copy/paste classification check from sw to sfx2Miklos Vajna
So that it's easy to unit test it and other apps can use it as well in the future. Change-Id: I38d601924b7fbb17615ff6e9c031a71b40777c4c
2016-03-09remove unused NOT_POOLABLE enum valueNoel Grandin
and simplify the resulting SfxItemInfo field down to a single bool Change-Id: I73e24e83d39afc7660ac85872ba96bc790713cb2 Reviewed-on: https://gerrit.libreoffice.org/23058 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-09mpUpdater has been proven unusedStephan Bergmann
...by 435d6d50c3cdb6711942ee40dc2fae1865361845 "loplugin:constantparam in sfx2" Change-Id: I28db5cc1fd6506ba9e374d28b40e5d0cf7d676bd
2016-03-09loplugin:defaultparamsTor Lillqvist
Change-Id: Ib5f6412c549fe1d5bfd08ed62979a7f81fb2648c
2016-03-09loplugin:constantparam in basicNoel Grandin
Change-Id: I5b49406535c1ec95e47fe237a23184a499b875e5
2016-03-09loplugin:constantparam in sfx2Noel Grandin
Change-Id: I50a2d8221f907f0e844e558f3dbdd0346c010201
2016-03-09Add missing includesDavid Ostrovsky
These include were needed to compile on Windows, MSVC 14.0 with clang-cl. Change-Id: I4ca5cec8314920e90fcca6fa69ec4df87d680f29 Reviewed-on: https://gerrit.libreoffice.org/23044 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-08sfx2 classification: expose impact scale and levelMiklos Vajna
This allows application code to prevent copypaste from a more confidential to a less confidential document. Change-Id: I121c7566c948340e7b41d3f8462b0d65a2441b0f
2016-03-08tdf#97703 Removed empty setUp/tearDown methodsChirag Manwani
Change-Id: Ia62de30ae94bdae87cd5109c44eab40af4d020e5 Reviewed-on: https://gerrit.libreoffice.org/22985 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-08loplugin:constantparams in vclNoel Grandin
Change-Id: I2114436f4bef3ac71a3035a206186cefaf88bca1 Reviewed-on: https://gerrit.libreoffice.org/23023 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-07drop unused resourceCaolán McNamara
Change-Id: Ibe52933faa6b13e2d89ab296c1cc15b70f5835af
2016-03-07drop unused headersCaolán McNamara
Change-Id: I73a673de54c0cff77a00a21f8a4c87766f956256
2016-03-07this RID_FULLSCREENTOOLBOX resource is unusedCaolán McNamara
Change-Id: I441b27c92db4e406cd3326917c40b0ae0d6c0cad
2016-03-07these ResIds are used solely for their number by nowCaolán McNamara
so cut out the middle-man ResId Change-Id: Ic83db355cc1a0c7dc70958bca79b466baadaedd0
2016-03-07full screen toolbar resource is not usedCaolán McNamara
the full screen toolbars are defined in the fullscreenbar.xml files Change-Id: I9f83d24b455709cbb8f2f40cfda54fb4a545c4d4
2016-03-07loplugin:unuseddefaultparamsNoel Grandin
Change-Id: Ia414f7845425ef73859ed04853378e96cc738795 Reviewed-on: https://gerrit.libreoffice.org/22971 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-07loplugin:unuseddefaultparam in variousNoel Grandin
Change-Id: I03d7381aad055cbe9bd905e4082586073f4112e0 Reviewed-on: https://gerrit.libreoffice.org/22900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-06Use menu URLs for context menu interceptionMaxim Monastirsky
This way it's clearer what this name stands for, as it's now the same name that used to manipulate the same menus via the XUIConfigurationManager API. It's also consistent with the names we use for spelling/grammar (see SwView::ExecSpellPopup) or read-only (see SwEditWin::Command) menus. Change-Id: I0619578cea9d1f495168e2fa5060d1a664bfcd59
2016-03-04Looks unusedStephan Bergmann
PATH_MAX was reported unused on Windows with clang-cl, but the whole block seems rather a leftover than something that is really required. Change-Id: I545701ef83de0c2a1d74457778b86b70e334a457
2016-03-04loplugin:unuseddefaultparam in sfx2Noel Grandin
and fix an issue with calls to templated methods in the plugin Change-Id: I9c9537a0690ff671286c007846d5f4cfb7d2982b
2016-03-03sfx2 classification: replace default start date with current time ...Miklos Vajna
... unless the policy changes the default already. This was the date of the classification is stored in the document, and can be inserted as a field as well, but if the policy has an explicit classification start date, we don't overwrite that. Change-Id: I17974d73a415a2c8032df48aa7b7f4eebb7178ab
2016-03-02Context menus were never destructedMaxim Monastirsky
Change-Id: I34ae9dbb5b00fa2b6a1ef5c115a796d4e28eafa9
2016-03-02sfx2 classification: add config listener to avoid restartsMiklos Vajna
So that when SvxPathTabPage sets a custom classification path (or resets it back to the default), then no restart is needed, the toolbar will be updated instantly. ClassificationCategoriesController::statusChanged() was called already, all that was necessary is to remove old entries, to trigger a re-read of the policy. Change-Id: I98edea19fedfb5c1197981085193f959c19647a1
2016-03-02sfx2 classification: use SvtPathOptionsMiklos Vajna
In preparation to be able to edit the policy path from SvxPathTabPage. Change-Id: I7a8e03e9acf2e8096a5e00d1424c75fe31735c1d
2016-03-02loplugin:unuseddefaultparam in sfx2Noel Grandin
Change-Id: I37afde801a6468c79259fe51acbdea0614c2c8c5
2016-03-01sfx2 classification: don't hardcode the policy pathMiklos Vajna
This moves the path from code to configuration, UI is still missing to actually edit that configuration key though. Change-Id: Ie9e9fa986544c8df99203b7f50f19f886ad64009 Reviewed-on: https://gerrit.libreoffice.org/22817 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-03-01sfx2 classification: select current toolbar listbox entry when state changesMiklos Vajna
With this, if .uno:ClassificationApply is invoked from e.g. a macro, the toolbar listbox is updated to reflect the classification of the document. Previously the listbox wasn't updated. Change-Id: I45a7c6ee2f3b06e048fa119264c615e78bc46b37
2016-02-29sfx2 classification: fix initial toolbar control sizeMiklos Vajna
When the toolbar control is first shown, we don't have an object shell yet, so can't insert items to the listbox. Set the same initial size as SvxFontNameBox_Impl has, should be good enough for us, too. Change-Id: I12cc72d26353ec3a4d2d3fc5c72f3171c276d3dc
2016-02-29sfx2 classification: set initial listbox state based on doc modelMiklos Vajna
This way the listbox selections shows the state of the document model, instead of showing an empty selection by default, as it is for empty, non-classified documents. Change-Id: Ibda0565e3ca9ec6611d8e256a78747437b52c42a
2016-02-29sfx2 classification: fix category name duplicationMiklos Vajna
A category name was stored in m_aName and also as a label value with key name PROP_BACNAME(). Fix this by always using m_aName, and doing the conversion in both directions in SfxClassificationHelper::Impl::pushToObjectShell() and the SfxClassificationHelper() ctor, as document metadata wants to work with only key-vaulue pairs. Change-Id: Iad386840038966e4483e3503c5fcdc046ca9effc
2016-02-29libreoffice-main -> libreoffice-startcenterCaolán McNamara
to sync these names with the the .desktop names Change-Id: I1c4d8943e61b5ae537b865d5a9c3065894f200d7
2016-02-29sfx2 classification toolbar: dispatch uno command on selection changeMiklos Vajna
Change-Id: Iad3cb44cd57ad9e50be6008146629cdca8455eb6
2016-02-29sfx2 classification: set toolbar listbox width after inserting entriesMiklos Vajna
This way GetOptimalSize() returns a size that allows reading the selected item after selecting one. (The new width is the double of the old one, or so.) Change-Id: I5f935dcbee52844fb325bd74437479f759a85852
2016-02-29sfx2 classification: don't sort items on the toolbar listboxMiklos Vajna
Assuming the policy follows a least-confidential -> most-confidential order, doing a lexicographical sort on the category names does more harm than good. So use a vector instead of a name-indexed map for categories. Also, don't duplicate the label map for the current state, but just store the state in the same category structure that is used for other (currently not used) categories as well. Change-Id: I1672192e572abfc22b6aeeb152ee7484086cea91
2016-02-28tdf#84258 Allow creation of command aliasesMaxim Monastirsky
We already can use different labels for commands, based on whether they're in a menu, context menu or a toolbar. But in some cases we need different labels for the same type of UI element, or even different icons. One example is page/slide commands in Draw/Impress, as they share same commands, but need different icons/labels. Creating full-fledged duplicate slots just to satisfy the need of UI representation seems like overkill, and isn't flexible enough. The proposed solution is to allow creation of command entries, that do not correspond to real application slots, but instead link to another existing commands. The "real" commands will be used for controller factory and dispatch (execute/status) APIs, thus fully retaining functionality. This can be useful also for giving icons to complex commands (i.e. commands with arguments). Change-Id: I9b261b406ec8fc781cae06cf283963386379d4ad
2016-02-28Kill sfx2 menu supportMaxim Monastirsky
Change-Id: I340a066881b1962a4bcd5a2b7d9a0425d8b9557c
2016-02-26tdf#98188: Crash when closing File->Properties->CMIS Properties tabGiuseppe Castagno
Change-Id: I22e1d6cc1c50b9ae613dab7c253ba21451aac584 Reviewed-on: https://gerrit.libreoffice.org/22704 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-02-25coverity#1354271 Uninitialized scalar fieldCaolán McNamara
Change-Id: Ida90073e50f08271b217610b8d7b970c943c042a
2016-02-25sfx ClassificationCategoriesController: fix size of the dropdownMiklos Vajna
Without this, only the first two entries are visible, even if there would be plenty of space for more entries. Change-Id: Ib5115f94fe077dbf842267511fde9cf396cbbb99
2016-02-25sfx ClassificationCategoriesController: read category names from policyMiklos Vajna
Change-Id: Ia50d5b958d15af3c8959d7fb4ef4d502c1356044
2016-02-25sfx2 classification: add categories controller for the toolbarMiklos Vajna
Change-Id: Ib6a5c9577d442034d1114b84c1ad2c20372e3c7a
2016-02-25sfx2 classification: expose category names as parsed from the policyMiklos Vajna
Change-Id: I53b958dff2f43d4762445c4b474f2b00ae6dc9d0
2016-02-24let SvxSearchItem use SearchOptions2Eike Rathke
And all those places that interface to SvxSearchItem. Change-Id: I08915824a596cd0f247a89f44e4684cd22b98082
2016-02-24documentpropertiesdialog.ui: Put document name between quotation marksAdolfo Jayme Barrientos
Change-Id: Ia4f0a4e4853f76e90f22308f528de871d2ec6c60
2016-02-24sw classification: name watermark objects, so later it's possible to find themMiklos Vajna
Given that they are not fields, it's necessary to re-create them every time their textural content would change. Change-Id: I1276ef686b1b622dccaa8ac4996af8e4cb4de329
2016-02-24sw classification: put the relevant field to the footer if policy wants soMiklos Vajna
Change-Id: I61c235660366ec1aba137097600605aae76c39a7