summaryrefslogtreecommitdiff
path: root/sfx2
AgeCommit message (Collapse)AuthorFilesLines
2016-09-26tdf#101249 fixed crash after inserting OLE objectSzymon Kłos2-5/+14
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łos4-42/+90
* 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 Grandin1-21/+9
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 McNamara1-2/+1
Change-Id: I96526a735c0adb4c20c463f73c34701a9fafb76b
2016-09-23perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 relatedEike Rathke19-184/+155
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 Nitschke1-4/+0
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 Nitschke1-1/+1
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 Grandin6-144/+0
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łos1-13/+52
* 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 Grandin1-6/+0
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 Vajna1-1/+2
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 Grandin1-1/+0
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 Kelemen1-0/+13
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 Vajna1-0/+14
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 Vajna1-2/+2
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 Grandin1-1/+0
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 Grandin1-1/+1
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 Stahl4-10/+10
... 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 Grandin5-33/+1
Change-Id: I68752a3daf5ddd8581c07759b8be2c1dabbb9258
2016-09-14put all SfxShell feature flags in one typed_flags classJochen Nitschke3-15/+15
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 Bergmann1-1/+1
Change-Id: Id9c234d605b4f8107833980825b402006e4f0031
2016-09-14sfx2: use range-based for loop in lokhelperMiklos Vajna1-4/+2
Change-Id: I7c3421231dd74c8d1e2678a6aee92288fdd3221a
2016-09-13sw draw text: emit LOK_CALLBACK_INVALIDATE_VIEW_CURSOR from registerCallback()Miklos Vajna1-0/+9
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 Philips1-324/+374
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 Bergmann68-89/+89
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łos1-1/+17
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 Grandin23-100/+63
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 McNamara2-3/+3
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 McNamara1-1/+1
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 Monastirsky3-145/+1
Change-Id: I3d2348d8e3db91b0ae4e757efa14a0168604a2b0
2016-09-08Unused stringsMaxim Monastirsky2-10/+0
Since 7affe26a1291eef8c77e890228061f13e987bff1 ("Kill sfx2 menu support"). Change-Id: Ib08ba64e7d3dc479df15f04f4e9ab81e13611202
2016-09-07Notebookbar: fixed crash while using two modules simultaneouslySzymon Kłos1-4/+3
Before patch after opening e.g. Writer and Calc with active Notebookbar crashed application. Change-Id: I0eb18778ff23acce19d662156185480c6112eaa1 Reviewed-on: https://gerrit.libreoffice.org/28715 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-09-07tdf#101812 Opening template manager switches to templates view in start centerAkshay Deep1-8/+0
Change-Id: If80957bcebebe6c64237cd446465a3d6cc72bc18 Reviewed-on: https://gerrit.libreoffice.org/28725 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-09-07tdf101964 Make the Styles category name translatable in Templates dialogGabor Kelemen1-0/+2
Change-Id: Ia3a7054d8c8cfc7ae86f11087c1c2d7209bd104a Reviewed-on: https://gerrit.libreoffice.org/28722 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-09-07loplugin:constantparam in vclNoel Grandin1-1/+1
Change-Id: I0cae8e5de1170dec4c82df7f1f5377143a079876 Reviewed-on: https://gerrit.libreoffice.org/28686 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-06tdf#101116 Improve accessibility of template managerYousuf Philips1-21/+39
Change-Id: Id4475bbb9945703d1611fb36ea299904afc6ad1e Reviewed-on: https://gerrit.libreoffice.org/28637 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-05tdf#101115 Make save as template dialog accessibleYousuf Philips1-3/+8
Change-Id: Ibe853888e93fd4adeb322b9e426ba6f07c309f7f Reviewed-on: https://gerrit.libreoffice.org/28636 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-09-05convert ScrollType to scoped enumNoel Grandin1-1/+1
Change-Id: I6dd02d4f7df028dada6cfd5d767a6ec1b1c1efe1
2016-09-05convert ToolBoxButtonSize to scoped enumNoel Grandin4-22/+10
Change-Id: I365b0e34361eb339b04e5f4792f54eff5bf582a5
2016-09-05convert ExtTimeFieldFormat to scoped enumNoel Grandin1-1/+1
Change-Id: I6cb4e057f7a5b83edb51048f24372d19fbf48177
2016-09-05convert ExtDateFieldFormat to scoped enumNoel Grandin1-1/+1
Change-Id: I717e5e727ee0e2b6d732ecc6a432c70926654902
2016-09-05convert GradientStyle to scoped enumNoel Grandin1-2/+2
Change-Id: Ib740da708612df7a5f4b8c82262b9b1bd436604d
2016-09-04tdf#101779 Multiline tooltips in template managerMaxim Monastirsky1-0/+14
This time just set a flag to use Balloon style, instead of forcing extended tips. Change-Id: I170bbe4b1bb95aeb9fde00cbecc2bb46c9078e9d
2016-09-04tdf#101852 Revert "tdf#101779 Allow multiline tooltips in template manager"Maxim Monastirsky1-13/+0
This reverts commit 2decee2ccd9a4167949843da0db99edaebe6acd8.
2016-09-01sfx2: nullptr pViewShell was seen in SfxLokHelper::getView()Miklos Vajna1-0/+4
I'm not sure how to trigger this reliably, but Pranav got this: #0 0x00007fb2f471bbf0 in SfxLokHelper::getView(SfxViewShell*) (pViewShell=0x0) at sfx2/source/view/lokhelper.cxx:82 #1 0x00007fb2f75edf4f in doc_paintPartTile(LibreOfficeKitDocument*, unsigned char*, int, int, int, int, int, int, int) (pThis=0x7fb290253c40, pBuffer=0x281fbd0 "", nPart=0, nCanvasWidth=1024, nCanvasHeight=256, nTilePosX=0, nTilePosY=11520, nTileWidth=15360, nTileHeight=3840) at desktop/source/lib/init.cxx:1338 Given that SfxViewShell::Current() may indeed return nullptr (e.g. during shutdown), change SfxLokHelper::getView() to return -1 in that case, and adapt client code to handle that. Change-Id: Ia191c843c8a993f3d7157de432af57964c0a8f63 Reviewed-on: https://gerrit.libreoffice.org/28583 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-09-01std::list<sal_Int16> to vectorNoel Grandin1-4/+2
Change-Id: I4129ea523bd3e4882ff776328b46c72abf9f918f
2016-09-01std::list<sal_Int16> to vectorNoel Grandin1-5/+2
Change-Id: If1fbab63446ed7d1627f542a7aac4a9eb2fa6c88
2016-09-01sfx2: SfxCommonTemplateDialog_Impl can't even decide if...Michael Stahl1-1/+1
...no family selection should be represented as "0" or "0xffff". Change-Id: I08ef69bf35d130898cb995463dc29e72a372562c
2016-09-01use SfxItemPool::IsSlot instead of custom implementationJochen Nitschke1-1/+1
Change-Id: I435fb78f10f361120ee1865465dab93aa4661806 Reviewed-on: https://gerrit.libreoffice.org/28565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-31let's make Impress crash less - SfxStyleFamily editionMichael Stahl3-35/+44
Commit bcb41235deaf4b7ca90522bda3ba21a686819e6e - in addition to introducing the enum SfxStyleFamily - inconsistently converted one call of DrawDocShell::SetStyleFamily to use enum SfxStyleFamily instead of a mysterious "5", but did not adapt all of the code that extracts the SfxUInt16Item that subsequently extracts this value and expects a number 0-5. Since it's clearly inexcusably stupid to have 2 different public sets of integers identifying styles, make the usage of the second "array index" integers private to templdlg.cxx; the SfxUInt16 item now always contains enum SfxStyleFamily. (regression from bcb41235deaf4b7ca90522bda3ba21a686819e6e) Change-Id: I333575c504277c2046f8f5a6b36ae3f86b3b3201