summaryrefslogtreecommitdiff
path: root/sfx2
AgeCommit message (Collapse)Author
2016-10-05tdf#102238 START CENTER: Templates should be activated with single clickAkshay Deep
Change-Id: If38f8fffd959c50b3befd521d2110e4c54e86be5 Reviewed-on: https://gerrit.libreoffice.org/29295 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-10-05convert the last two lonely FixedInfos to FixedTextCaolán McNamara
Change-Id: Ia6ed5f71931a6141efb3d5e5eb329149d6850342
2016-10-05tdf#101249 Notebookbar: remember the menubar visibilitySzymon Kłos
Change-Id: Ia4e89bfc97d102b2c548a19e62e262accb54d17d Reviewed-on: https://gerrit.libreoffice.org/29539 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
2016-10-05Replace DdeData conversion operators with proper functionsStephan Bergmann
Change-Id: I866bdcbf1b6a5cda4472b6655ace866a3d5a8983
2016-10-05sfx2: clean up redundant virtual keywords in classificationcontrollerMiklos Vajna
Change-Id: I7ac297a675034e64dcd629bf8243d9579bbeec6e Reviewed-on: https://gerrit.libreoffice.org/29535 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-10-05convert MapUnit to scoped enumNoel Grandin
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-04can now remove both PopupContainer copiesCaolán McNamara
the recently unused svx one, and the forgotten not-built sfx2 one Change-Id: I1a4ede49dc74bb71f250ee3eee999d1a3dfbee57
2016-10-04comphelper: move setTiledPainting() from SfxViewShellMiklos Vajna
And make it a static one. The primary point of that member function is to prevent invalidations during paint, and since multiple views are allowed, it wasn't extended to filter out invalidations from all views, not just from the current one. (Same goes for other callback types.) Change-Id: I23e6b2c2ff94227f2b72c481148b2d8279ae2905
2016-10-03loplugin:staticmethodsStephan Bergmann
Change-Id: Iac376aff079cddd030a07883f3cccf71a7ff5f91
2016-10-03Surely this is Linux-only codeTor Lillqvist
The initial commit in 2012 even says so, and nothing has changed it since. Feel free to fix more properly by making sure this code can be called only on Linux.. Change-Id: Idb0a2b5594daa0cde7f4797b51ba3e5876170f9f
2016-10-01Fix typosAndrea Gelmini
Change-Id: I6aeda978911b25caa45d4e459e581fc743e93d2c Reviewed-on: https://gerrit.libreoffice.org/29442 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01Fix typosAndrea Gelmini
Change-Id: I1e0e6f1b99090f26a6cd657ee9019bf2fa906dd9 Reviewed-on: https://gerrit.libreoffice.org/29436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01Revert "don't write item right before destruction"Jochen Nitschke
triggers warnings in the dtor if RefCount isn't reset. revert till we have better ref counts and don't need debug code in dtor. This reverts commit b74d2433c856d6d172d9588f4b6d59c31ec02853. Change-Id: I1835885d94e15339aa7602037d850e1524fd9662 Reviewed-on: https://gerrit.libreoffice.org/29427 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-01Notebookbar: fixed context handlingSzymon Kłos
After last changes context switching was not working. Removed unnecessary Resize call to avoid flickering. Change-Id: I7931f4d442737c704c41bb7944c6d95e45b964f7 Reviewed-on: https://gerrit.libreoffice.org/29411 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
2016-09-30loplugin:constantparamNoel Grandin
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c Reviewed-on: https://gerrit.libreoffice.org/29321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-29tdf#102776 : toolbar mode changing in multiple windowsSzymon Kłos
This patch provides better toolbar mode switching: - only in current module (if eg. Writer and Calc opened) - in multiple windows with the same module (two Writer docs) Change-Id: I81bfe626b677bc0168c4a7cd6ce5563ceed5c14b Reviewed-on: https://gerrit.libreoffice.org/29394 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
2016-09-29LOK: conditionally include part number in invalidation payloadMiklos Vajna
Since desktop/ code queues, compresses and only emits callbacks on idle, it's possible that two invalidations are in the queue, and there was a setPart() call between them. In this case it's impossible to tell what part the invalidation was sent for. Fix this by conditionally including the part number in the invalidation payload. It's off by default, a new feature flag is added to request this behavior. gtktiledviewer enables this feature flag by default, though just to show the part number in the debug output. Android doesn't enable it. Change-Id: I73e6def848c0eb61d64e71026002c7a0e750aab4
2016-09-27tdf#101249 fixed crash after inserting OLE object 2Szymon Kłos
Change-Id: I1997e69e09cfae10b26a3b3e851583714ee9b3e9 Reviewed-on: https://gerrit.libreoffice.org/29318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
2016-09-27sw: avoid emitting invalid cursor pos during end text edit of commentMiklos Vajna
A comment text edit (provided by editeng) works with relative twip coordinates, conversion of the cursor position to absolute twips happens in ImpEditView::ShowCursor(), provided that the pOutWin member has a map mode origin that respresents the offset correctly. This is not true during SwSidebarWin::DeactivatePostIt(), the map mode origin is already reset back to 0, so just don't emit callbacks during shutdown, the sw body text cursor will be shown later anyway. Change-Id: I02c15bb9fad99db8e43fd2f37df770dd165be788
2016-09-26tdf#101249 fixed crash after inserting OLE objectSzymon Kłos
Change-Id: I4ddd52f5da1745a2b9f2d6d54d5091d8f10107e7 Reviewed-on: https://gerrit.libreoffice.org/29155 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-26tdf#102063 Notebookbar wont appear on launchSzymon Kłos
* removed static members from SfxNotebookBar to avoid crashes * Updating Notebookbar state after module load Change-Id: Ia4e3dcb0b6e2c5aa7c5205992dbf3575e72fa354 Reviewed-on: https://gerrit.libreoffice.org/28841 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-09-26convert ITEMCONN_ constants to scoped enumNoel Grandin
Remove unused enum values. Which means that these methods simplify to constant values: ItemConnectionBase::GetEnableState() -> TRISTATE_INDET ItemConnectionBase::IsActive() -> true so inline those values. Which means that ControlWrapperBase::ModifyControl is always called with a first parameter of TRISTATE_INDET, so drop that first parameter. Change-Id: I6d63b63b2f15faad2336665f60e7239e35b74e47
2016-09-24coverity#1373358 Unchecked dynamic_castCaolán McNamara
Change-Id: I96526a735c0adb4c20c463f73c34701a9fafb76b
2016-09-23perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 relatedEike Rathke
There were over 150 places in *::Notify() functions that did some dynamic_cast<SfxSimpleHint*> of which ~98% were unnecessary because the base class SfxHint passed was an SfxSimpleHint anyway. dynamic_cast operations come with quite some cost, so avoid if possible. Specifically for ScFormulaCell::Notify() that created a bottleneck in scenarios where cells were notified that already handled a previous notification. In mass operations doing the dynamic_cast before it could be decided whether having to act on it or not this made 2/3 of all time spent in the Notify() call. To get rid of that rename/move SfxSimpleHint to SfxHint and let classes derive from SfxHint instead of SfxSimpleHint. This comes only with a slight cost that an additional sal_uInt32 is transported in such hints, initialized to 0, but this is neglectable compared to the huge gain. For the rare cases where a Notify() actually expects both, an SfxHint (formerly SfxSimpleHint) and a derived hint, this changed order of the dynamic_cast involved so the simple SfxHint::GetId() is handled last. Modules using such combinations can further optimize by treating the simple SfxHint::GetId() first once verified that none of the other derived hints use an ID not equal to zero respectively none of the ID values the simple hint uses. Change-Id: I9fcf723e3a4487ceb92336189d23a62c344cf0ce Reviewed-on: https://gerrit.libreoffice.org/29205 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-09-23don't write item right before destructionJochen Nitschke
SetRefCount writes only SfxPoolItem members m_nRefCount and m_nKind Change-Id: Ibd06d4edc619b9a840a8a232d9395dd85c452149 Reviewed-on: https://gerrit.libreoffice.org/29195 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22convert SfxItemKind to scoped enumJochen Nitschke
reduced size because it is stored in widely used SfxPoolItem. converted 'if' chains to 'switch case' Change-Id: Id9b5e375b681c88e8c91c561abd1a50610aa4815 Reviewed-on: https://gerrit.libreoffice.org/29186 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22loplugin:unusedmethods in chart2..svxNoel Grandin
Change-Id: Ifb6045885049733415895f58cdd911256f48323c Reviewed-on: https://gerrit.libreoffice.org/29187 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22Notebookbar: separate .ui files settings for each moduleSzymon Kłos
* each module have own list of implementations * deleted placeholder .ui files from Calc and Impress Change-Id: Ib7d4cafbb332447e769ca753003d31e9f3025f0a Reviewed-on: https://gerrit.libreoffice.org/29143 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-09-20loplugin:unusedfieldsNoel Grandin
Change-Id: I852e98b16fdcb88b04e39d11e3101d502c918c24 Reviewed-on: https://gerrit.libreoffice.org/29078 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-19sw: emit LOK_CALLBACK_STATE_CHANGED when cursor enters/leaves a redlineMiklos Vajna
For now only care about the start of the cursor, which can be only at a single redline. Add matching testcase + expose it in the gtktiledviewer status bar for interactive manual testing. Change-Id: Ib61757412d6b54bef64361d4a8563795ca0bab6c
2016-09-18loplugin:unusedenumvaluesNoel Grandin
Change-Id: Icf17f936ce6d07d0e152252833c8645cf9b1163b Reviewed-on: https://gerrit.libreoffice.org/28942 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-16tdf#101088 Add comments about translatable elements of classificationGabor Kelemen
Make it obvious which parts are translatable to avoid overtranslation Change-Id: Ic2772f6d4c394189b6fa089906985a7fdae75b26 Reviewed-on: https://gerrit.libreoffice.org/28945 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-09-16sfx2: add SfxLokHelper::getViewIdsMiklos Vajna
and also expose it in the LOK API. This way clients don't have to keep track of what views they created / destroyed, they can also get an up to date list with this method. Change-Id: Ibaee42c545803e04a31e7c13ab6ec370b99465c4
2016-09-16lok::Document: rename getViews() to getViewsCount()Miklos Vajna
As this only returns the number of views, not the actual views. Since it's a rename, it's just an API (but not an ABI) change. Change-Id: Ib4f0ea56a90e5ae9c80ee1781aa2f29aff4259e7
2016-09-16loplogin:singlevalfields in include/Noel Grandin
Change-Id: I27842162fcf82120ecb811ee8e89e187430931fc Reviewed-on: https://gerrit.libreoffice.org/28931 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-15Some of our supported compilers don't do constexpr, which meansNoel Grandin
o3tl::typed_flags can't be 'static const' Change-Id: Ia2e40353f7a1b9e66617fa42f9eed6213f9e2d62
2016-09-15replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)Michael Stahl
... except in include/rtl, include/sal, include/uno, where sal_Size is retained for compatibility, and where callers of rtl functions pass in pointers that are incompatible on MSVC. Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-15loplugin:singlevalfields in sc..vclNoel Grandin
Change-Id: I68752a3daf5ddd8581c07759b8be2c1dabbb9258
2016-09-14put all SfxShell feature flags in one typed_flags classJochen Nitschke
make values unique across modules. check if flag used in correct module. Change-Id: I656ffd3d527dd895777e14e1cc933c8b9b3f6e46 Reviewed-on: https://gerrit.libreoffice.org/28906 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-14loplugin:overrideStephan Bergmann
Change-Id: Id9c234d605b4f8107833980825b402006e4f0031
2016-09-14sfx2: use range-based for loop in lokhelperMiklos Vajna
Change-Id: I7c3421231dd74c8d1e2678a6aee92288fdd3221a
2016-09-13sw draw text: emit LOK_CALLBACK_INVALIDATE_VIEW_CURSOR from registerCallback()Miklos Vajna
With this, in case the first view has an active text edit and a new view is created, then the cursor position is instantly visible in the second view, even if the first view's cursor does not move later. Change-Id: Ia82e7dc1ce9bb58c67a280179ecadc74d3b63026
2016-09-13tdf#102006 tweak start center and make it more a11y accessibleYousuf Philips
Change-Id: Ib7cd1bbb9d827cc5d8dcc413cb489be6a0111cfa Reviewed-on: https://gerrit.libreoffice.org/28791 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13tdf#102065 Notebookbar: Menu bar disappears when cancelling dialogSzymon Kłos
Change-Id: I6f83248eddfc279fe69f0f9c1d64d6b453bb1d3e Reviewed-on: https://gerrit.libreoffice.org/28843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
2016-09-09loplugin:constantparam in sfx2Noel Grandin
Change-Id: If5d401001abb7bf3fc642d47f537b57836e6d9c5 Reviewed-on: https://gerrit.libreoffice.org/28772 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-09Related: tdf#101921 get taborder to match visual orderCaolán McNamara
Change-Id: I5cf751266c021de469ae57697c1ad25130ee09d4 Reviewed-on: https://gerrit.libreoffice.org/28768 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-09Resolves: tdf#101921 no tab navigation in style&formatting sidebarCaolán McNamara
Change-Id: I737ed446d0ead9d748873fec90b62dcced35e328 Reviewed-on: https://gerrit.libreoffice.org/28767 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-09Simplify SfxRecordingFloat_Impl by using SidebarToolBoxMaxim Monastirsky
Change-Id: I3d2348d8e3db91b0ae4e757efa14a0168604a2b0