summaryrefslogtreecommitdiff
path: root/framework
AgeCommit message (Collapse)AuthorFilesLines
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin10-91/+43
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18clean-up: unused using declarations and includesJochen Nitschke2-2/+0
Searched source for using declarations. Checked if those symbols reappear in the source file, even in comments or dead code but not in #include statements. If they don't reappear, remove the declaration. Remove includes whose symbol got removed. Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0 Reviewed-on: https://gerrit.libreoffice.org/24148 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-16bin theseDouglas Mencken1-15/+2
Change-Id: Ic43d15d68533ee19b1a7268e5b139e4584ceeb42 Reviewed-on: https://gerrit.libreoffice.org/24121 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-04-14Race between Frame::dispose and timer-triggered LayoutManager::AsyncLayouHdlStephan Bergmann1-1/+13
Change-Id: I8e9ca61c2a8334697b7a0adef7a2fc20f503f299
2016-04-13tdf#94306 remove unused boost dependenciesJochen Nitschke2-2/+0
remove <boost/noncopyable.hpp> in pch and remove boost from makefile if it was the only boost entry. Change-Id: Icb945ae59c137571f4f63807601738eea5c3e831 Reviewed-on: https://gerrit.libreoffice.org/24061 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-13Avoid null ToolBox::mpData deref during Frame::closeStephan Bergmann1-0/+3
Oh my, whatever the true cause for this SEGV in JunitTest_framework_complex, <http://ci.libreoffice.org/job/lo_tb_master_linux_dbg/6628/console>, processing an incoming URP request > ToolBox::GetMenu() const at vcl/source/window/toolbox2.cxx:1775 > framework::ToolBarManager::ImplClearPopupMenu(ToolBox*) at framework/source/uielement/toolbarmanager.cxx:1309 > framework::ToolBarManager::dispose() at framework/source/uielement/toolbarmanager.cxx:470 > framework::ToolBarWrapper::dispose() at framework/source/uielement/toolbarwrapper.cxx:106 > framework::ToolbarLayoutManager::destroyToolbars() at framework/source/layoutmanager/toolbarlayoutmanager.cxx:654 > framework::ToolbarLayoutManager::reset() at framework/source/layoutmanager/toolbarlayoutmanager.cxx:363 > framework::LayoutManager::implts_reset(bool) at framework/source/layoutmanager/layoutmanager.cxx:413 > framework::LayoutManager::frameAction(com::sun::star::frame::FrameActionEvent const&) at framework/source/layoutmanager/layoutmanager.cxx:2804 > (anonymous namespace)::Frame::implts_sendFrameActionEvent(com::sun::star::frame::FrameAction const&) at framework/source/services/frame.cxx:2953 > (anonymous namespace)::Frame::setComponent(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) at framework/source/services/frame.cxx:1449 > (anonymous namespace)::Frame::close(sal_Bool) at framework/source/services/frame.cxx:1689 > framework::Desktop::impl_closeFrames(bool) at framework/source/services/desktop.cxx:1674 > framework::Desktop::terminate() at framework/source/services/desktop.cxx:238 and the main thread idling in Application::Yield. Change-Id: I41ff8007ee4bbc37473aa5f077ff706b51d31c64
2016-04-13Use UNO service constructorsStephan Bergmann1-10/+4
Change-Id: I8ac2621a4594b2d8a7cf8fdafd2191f3bf52579b
2016-04-13remove unused m_xFrame in CheckXTitle unit testAkash Jain1-14/+0
Change-Id: I1b654b308b79d13d23a1b9a935fd2eaf84836d91 Reviewed-on: https://gerrit.libreoffice.org/24044 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-13Tooltip/bits should also depend on state changeMaxim Monastirsky1-8/+5
Change-Id: I18093e42dd2fc54483e620759e4ba00c988ce9db
2016-04-12Avoid reserved identifiersStephan Bergmann2-4/+4
Change-Id: I13bbc627ba058143862a77d27bbca85f2d961d60
2016-04-12Try to fix Windows buildMaxim Monastirsky1-1/+1
Change-Id: I46d1d3428ba1cfd8c0ab47aff6b32807e52c3c48
2016-04-12Yet another SaveToolbarController refactoringMaxim Monastirsky1-39/+44
Nothing changed for the end user. Change-Id: Ib5833ae81e94a7cc9aa9ac0eba29702364ea755c
2016-04-12Don't use bitfield bool members in MenuBarManagerStephan Bergmann1-9/+9
For one, there's likely few enough instances of MenuBarManager that the code pessimization of using bitfields probably weighs worse than the space optimization. For another, the code generated by at least Clang trunk tends to confuse Valgrind, <https://bugs.kde.org/show_bug.cgi?id=242137> "Valgrind on LLVM compiled code reports tons of 'Conditional jump or move depends on uninitialised' false positives". Change-Id: I4c2ef22e7e54e2a220e2cb490ca0566af4f81f52
2016-04-12clang-tidy performance-unnecessary-value-param in frameworkNoel Grandin10-20/+20
Change-Id: I80987ea1bfac7478574de46ee30fc58fcc17eb68
2016-04-12cleanup: remove unused com/sun/star/uno includesJochen Nitschke10-16/+0
Sequence.h(xx), Any.h(xx) and Type.h(xx) and remove unused using-declarations from these files. Add a few missing includes provided by them. Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4 Reviewed-on: https://gerrit.libreoffice.org/23805 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12FwkTabWindow is unused since d6d86237b1b438919609988049ac4a152612fee1Maxim Monastirsky3-487/+0
Change-Id: Ifad573ac687548a889165012e7b7bb2f4b82750c
2016-04-12SaveToolbarController: Better support of readonly docsMaxim Monastirsky1-38/+41
The sfx2 impl. of XStorable::isReadonly isn't really helpful for files w/o write permissions that were switched to edit mode, as it returns the state of the UI. So instead let's just rely on the state of the .uno:Save slot. Change-Id: I3b033be3c9424a4479e9224f02d186960b540d21
2016-04-12SaveToolbarController: Blacklist RelationDesign in officecfgMaxim Monastirsky1-8/+1
Change-Id: I8aa14bb76a26aa12771000b393bee37d26ba85e7
2016-04-11Lock member access in Frame::disposingStephan Bergmann1-65/+107
What a mess. Ideally, Frame would use its own rBHelper.rMutex, not SolarMutex. But much of the framework code it calls into uses SolarMutex, too, making it difficult to change that without running into the risk of deadlock. And then, some member variables are cleared early in Frame::disposing, while others are only cleared en bloc at the end. Be conservative and keep it that way (as other Frame functions recursively called from within Frame::disposing could observe the difference and rely on the current behavior), even if that means creating lots of small, independent locked regions within Frame::disposing (which can be detrimental to both performance and correctness). Change-Id: I28f9a379ce03ed661e96c7deb8eb73cb58fb2cf7
2016-04-11Turn disableLayoutManager into a member functionStephan Bergmann1-5/+6
Change-Id: I489859a53f98a1e70f8a79c3a974dd0d8954ccd1
2016-04-11Remove leftover commentsStephan Bergmann1-21/+0
Change-Id: Iabecc0d240c499ef81d8b85c8d0b37383813b06a
2016-04-11Remove obsolete commentStephan Bergmann1-3/+2
Change-Id: I43b65f48d75e293c3fe721e6d5a401f1e176df12
2016-04-11Combine successive private blocksStephan Bergmann1-4/+0
Change-Id: Id0da294261d9f42e4ba31864827e38e29bf44ea0
2016-04-11protected -> privateStephan Bergmann1-2/+0
Change-Id: Ic021240bbc2069d6d47b51c0b8e0d81739a72151
2016-04-11Fold impl_initializePropInfo into initListenersStephan Bergmann1-45/+33
Change-Id: I14d6461d442a8e0ff1efd719e7e2233ffbc523a5
2016-04-11No need to lock SolarMutex hereStephan Bergmann1-3/+0
Change-Id: Id626dc7c5c75b885b3665e06596b7a58d225cd4c
2016-04-11loplugin:stringconstantStephan Bergmann1-1/+1
Change-Id: I4776cca99c362998a979507880dce1eccf8e5e04
2016-04-11allow disabling recent files menu entryOliver Specht1-1/+2
patch 85071c6c7b120935b03926228916393a94aa5ef0 fixed the problem of submenus in tools/language but broke the disabling of the recent files menu entry This patch makes it possible to disable and the recent files entry without breaking other menu entries Change-Id: Ia1ba7c0a75cdf82faacead4f92902f65f05186ba Reviewed-on: https://gerrit.libreoffice.org/23988 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-04-11tdf#48300 bring window to top and restore window when minimized.Mark Hung1-1/+1
While XWindow->ToTop() in Linux do the both for default ( None ), ToTopFlags::RestoreWhenMin has to be specified in Windows in order to restore the window, and ToTopFlags::ForegroundTask is necessary when ToTopFlags::RestoreWhenMin is specified in order to bring non-minimized window to the front. Change-Id: Ief4a825a18d874a0c35211c9022a4261da6bcf8f Reviewed-on: https://gerrit.libreoffice.org/23938 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-04-11No need to clear component context during disposeStephan Bergmann1-23/+10
...which simplifies access to m_xContext member. Change-Id: Ia028b5ae26d94527b6668365ab1197103afb8c22
2016-04-11tdf#94306 replace boost::noncopyable ...Jochen Nitschke8-20/+33
... in modules editeng to oox. Replace with C++11 delete copy-constructur and copy-assignment. Remove boost/noncopyable.hpp includes and one unused boost/checked_delete.hpp include in linguistic. Change-Id: I5a38d8e5ac1b4286bdeb3858d56490a53d13fe80 Reviewed-on: https://gerrit.libreoffice.org/23928 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-08Base Frame on WeakComponentImplHelper instead of TransactionManagerStephan Bergmann1-459/+131
...to get the deadlock under control the fix for which had to be reverted with 22fbbfe984f5da2592674f9260f5e4988b1341fe "Revert 'Avoid deadlock when two threads call into Frame::close'". Generally, replaced instances of TransactionGuard(E_HARDEXCEPTIONS) with checkDisposed() and instances of TransactionGuard(E_SOFTEXCEPTIONS) with nothing. A TransactionGuard would not establish a locked section per se (only would it engage in locking when TransactionManager::setWorkingMode is called, see the deadlock mentioned above), so the potential for introducing new races should be manageable. While at it, get rid of those implcp_* "debug methods" used to SAL_WARN about bad arguments to some UNO interface method implementations. Change-Id: I5ea9c1c8b20fd38457c558dbcb3a853a51a09b6e
2016-04-08Drop unused uses of TransactionBaseStephan Bergmann2-7/+2
Change-Id: I606fc8e06823df9caf8786b1ae4d432c061ddc80
2016-04-07Remove unused Int32HashCodeStephan Bergmann1-8/+0
Change-Id: I0f43db050155b231dda8f78ed8f8144609c7125b
2016-04-07Just use the hash<sal_Int16> defaultStephan Bergmann2-11/+1
Change-Id: Ice2c0cbf382997c2d07cc8cd4a7b085a153fffef
2016-04-07Resolve OUStringList typedefStephan Bergmann12-67/+65
Change-Id: Ifb5dc5128b5619abb83eea427c7fb1115fd825f3
2016-04-07vector::clear is just fineStephan Bergmann2-12/+6
Change-Id: I5d8ec98d437913861b584cf3077618a2d6b0a0be
2016-04-07Remove junk that erroneously remained in previous commitStephan Bergmann1-2/+0
Change-Id: I18ca0d4daf44eafe88d6f812fa17576edbfb8dfd
2016-04-07dllexport class deriving from template means trouble with MSVCStephan Bergmann2-11/+11
Change-Id: I9d170168eac26c52fd6ca8d22124e8ff78b81226
2016-04-07Get rid of BaseHash wrapper (to unbreak Windows build)Stephan Bergmann12-41/+17
Change-Id: Ieae7d6af7a4753958ebf2aeae9d2ae6fafe5efe9
2016-04-07Fold PropertySetHelper into its only use, FrameStephan Bergmann4-545/+400
Change-Id: I148e15c2c91a985cd110f5589adbf26c102b1cfb
2016-04-07[API CHANGE] Remove undocumented TabContainerWindow serviceStephan Bergmann3-542/+0
It originally got introduced with b1da5a57d93e8e9b43b9bba9fabc3b7e61289edc "CWS-TOOLING: integrate CWS alf01" but appears to have never been used. Curiously, there were two commits to its code (f565a4b3d9b47ca3336df4f8d8d56d4e2dcceec5 "#i107087# TabWindowService must set member pointer to zero on VCLEVENT_OBJECT_DYING. The window life time is controlled by the docking window! Adding missing RemoveEventListener call" and 84c0ebe7d3e7dbc3796967d52f9535fecc9e6947 "#i107087# Remove event listener from tab window on TabWindowService dtor") that mention <https://bz.apache.org/ooo/show_bug.cgi?id=107087> "button merged in standard toolbar + own UI caused office crash", but the description of which ("when i merge a toolbar button in a standard toolbar and provide own UI (via the toolkit) the office crashed sometimes") doesn't give a hint how this service would have been used. (Maybe it was intended to be used by extensions, but never got documented neither in offapi's UNOIDL nor in <https://wiki.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide>.) Change-Id: I86746f73ee99ebe7f5afbc902204a9353e5ccb7b
2016-04-07add waitForIdleEvent in remaining testsAkash Jain1-2/+2
add waitForIdleEvent in remaining tests in framework/qa/complex/XTitle/CheckXTitle.java Change-Id: Ibc98070c797ef56df60cd925353c9e364e83abe0 Reviewed-on: https://gerrit.libreoffice.org/23869 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-06revert to fix tdf#98783 missing menubarCaolán McNamara3-28/+15
Change-Id: Ia322149a7ed461f528af856d9907fe4620f9e97f
2016-04-06See if waitForEventIdle helps hereStephan Bergmann1-0/+3
...the test often fails with the assertNotNull in prepareQueryAndDispatch firing, suggesting there's a race in getting the dispatch processed before proceeding Change-Id: Ib338d761df638a0c5d53777352cfe7519742112b
2016-04-05Prevent broadcast of title change events without a sourceakash1-0/+3
Do not send title changed event if the source of the event is null. This case can occur in multi-threaded scenario where one thread calls disposing while some other thread calls impl_sendTitleChangedEvent(). Change-Id: I86a65824ab5c60a3fd8d3fb323f6d78944b57a23 Reviewed-on: https://gerrit.libreoffice.org/23736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-05m_dbg_bMakeItFaster is always falseStephan Bergmann1-22/+0
Change-Id: I7ee117fcc5538ab9bc92cd30fd0f61e52a5a93bd
2016-04-05Add unit tests for XTitle interfaceAkash Jain2-1/+287
Added several unit tests for the XTitle interface. Tests are for bugs tdf#96044,tdf#98837,tdf#96896 Change-Id: I9b3990dff02d5d5738024b60e94555199b625a2e Reviewed-on: https://gerrit.libreoffice.org/23834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-05tdf#96044 - After exiting print preview main window number bumps to #3akash1-0/+1
Make TitleHelper listen for controller events. When the controller disposes, it calls the disposing method and releases its leased number. Direct cast to XEventListener is ambiguous, so upcasting path has been defined. This commit depends on the commit f80de31099be1ba7c6f753187f6703a915151c27 Change-Id: I79d859edf8e66ae6e777ba8e8d6c9d1dac4048e1 Reviewed-on: https://gerrit.libreoffice.org/23722 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-05loplugin:constantparamNoel Grandin2-25/+9
Change-Id: I821ed77a6c6014c9a82d31a4b117ed6f1b4abf18 Reviewed-on: https://gerrit.libreoffice.org/23832 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>