Commit Graph

4290 Commits

Author SHA1 Message Date
e4ae5e2d40 SubToolBarController: Use initialize to change tb bits
update is called so late that the dropdown addition is
noticeable by the user.

Change-Id: I36d76770125f927a851caef010e81f12f40d4405
2016-04-27 22:20:22 +03:00
579c2de3a8 tdf#80999 Canceling password prompt should abort detection
... instead of continuing the detection loop and being
"detected" as plain text. The detection API will from now
return a type based on the file extension only, which is
far more useful than "plain text" anyway. Plus the media
descriptor has a flag to indicate that the detection wasn't
completed, which can be also used by the loading code to
abort the loading process.

Change-Id: Ida37e2687bd5cd86b5780620724e9bce82e11946
Reviewed-on: https://gerrit.libreoffice.org/24428
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-04-27 18:36:57 +00:00
5e4fc95409 clang-tidy modernize-loop-convert in f*
Change-Id: Id866aa244378758e3bdb9e99d02cdd2ae6104e16
2016-04-27 15:03:40 +02:00
a4da4cc660 tdf#99527: show all accelerators in menus of extensions
XCUBasedAcceleratorConfiguration::getPreferredKeyEventsForCommandList() throws
if the command string of a menu entry is empty. Parent entries of sub menus of
extensions are empty. As the method doesn't know about the source of the command
a dummy entry is supplied.

Change-Id: I1d12bbf41c22b66e9ee29f1f05ea216134168795
Reviewed-on: https://gerrit.libreoffice.org/24423
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2016-04-27 11:43:47 +00:00
0c817c3b4b Change label to title case similar to other surrounding labels
Change-Id: I4b02aada5e50e7b30ed23fe12fab1c99f38ccfeb
Reviewed-on: https://gerrit.libreoffice.org/24056
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-04-26 16:11:06 +00:00
178622f47c loplugin:salbool
Change-Id: I14a902c644c467d8e02474e5d0ba8d3dced2860f
2016-04-22 09:30:37 +02:00
b2e86d2e26 Fix typos
Change-Id: Iea11112a1bf1ff934de0e355b9e81979aa1966a3
Reviewed-on: https://gerrit.libreoffice.org/24286
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-04-22 06:47:06 +00:00
20f23c1a28 Fix typos
Change-Id: Ic4fbc8e7220eb4641f67ef4f85d4853608a369f4
Reviewed-on: https://gerrit.libreoffice.org/24257
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-04-21 20:36:29 +00:00
ed467869d8 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: Idf27ee5370f1fa24adf22908d9e801c7d40db935
2016-04-20 17:25:42 +02:00
0d7eb3ed98 Elide macros used once
Change-Id: I5d5c916c966c9e9f2c77c9655f3e8d13a7032117
2016-04-19 08:49:40 +02:00
a2f7c634b3 Remove unused XMLNS_XLINK
Change-Id: Ibb2831ed71f61461e7f23edd6eea29ba64df05a9
2016-04-18 17:40:13 +02:00
ead6507f06 Elide macro used once
Change-Id: Ie0ad7834f54a5bf9cea65b4bb6d7501a90da0f24
2016-04-18 17:36:43 +02:00
7d8bdf8462 Clean up framework/inc/dispatchcommands.h
Change-Id: I6a9a8ae34c2f5abafd4192287fb12d4289a761ff
2016-04-18 17:32:45 +02:00
ca440cf548 Remove dead ENABLE_COMPONENT_SELF_CHECK
There is no sign it got ever used past 4011187ff516846635d4e2c3256dca3eb8c3719f
"MWS_SRX644: migrate branch mws_srx644 -> HEAD" at least.

Change-Id: Ia98613420a095b326ad26c024ff74f3c62bf4f99
2016-04-18 16:49:28 +02:00
789055bc2a clang-tidy performance-unnecessary-copy-initialization
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-18 07:37:31 +00:00
150ac9cf05 clean-up: unused using declarations and includes
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-18 07:25:24 +00:00
eec11a3064 Race between Frame::dispose and timer-triggered LayoutManager::AsyncLayouHdl
Change-Id: I8e9ca61c2a8334697b7a0adef7a2fc20f503f299
2016-04-14 11:19:20 +02:00
7f863e8906 Avoid null ToolBox::mpData deref during Frame::close
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::frame::FrameActionEvent const&) at framework/source/layoutmanager/layoutmanager.cxx:2804
> (anonymous namespace)::Frame::implts_sendFrameActionEvent(com::sun::frame::FrameAction const&) at framework/source/services/frame.cxx:2953
> (anonymous namespace)::Frame::setComponent(com::sun::uno::Reference<com::sun::awt::XWindow> const&, com::sun::uno::Reference<com::sun::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-13 18:01:46 +02:00
9ced1d7f5a Tooltip/bits should also depend on state change
Change-Id: I18093e42dd2fc54483e620759e4ba00c988ce9db
2016-04-13 02:18:27 +03:00
5b24631807 Try to fix Windows build
Change-Id: I46d1d3428ba1cfd8c0ab47aff6b32807e52c3c48
2016-04-12 20:57:39 +03:00
f2fd2019b3 Yet another SaveToolbarController refactoring
Nothing changed for the end user.

Change-Id: Ib5833ae81e94a7cc9aa9ac0eba29702364ea755c
2016-04-12 20:34:01 +03:00
f045c536db clang-tidy performance-unnecessary-value-param in framework
Change-Id: I80987ea1bfac7478574de46ee30fc58fcc17eb68
2016-04-12 11:56:07 +02:00
4c7ec9f112 cleanup: remove unused com/sun/star/uno includes
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-12 06:38:26 +00:00
b0e678c861 FwkTabWindow is unused since d6d86237b1b438919609988049ac4a152612fee1
Change-Id: Ifad573ac687548a889165012e7b7bb2f4b82750c
2016-04-12 00:43:06 +03:00
747a0fdda2 SaveToolbarController: Better support of readonly docs
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-12 00:12:32 +03:00
e58b807598 SaveToolbarController: Blacklist RelationDesign in officecfg
Change-Id: I8aa14bb76a26aa12771000b393bee37d26ba85e7
2016-04-12 00:03:34 +03:00
5183dad60e Lock member access in Frame::disposing
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-11 16:58:48 +02:00
cd43b8cf32 Turn disableLayoutManager into a member function
Change-Id: I489859a53f98a1e70f8a79c3a974dd0d8954ccd1
2016-04-11 16:58:47 +02:00
819175e1f0 Remove leftover comments
Change-Id: Iabecc0d240c499ef81d8b85c8d0b37383813b06a
2016-04-11 16:58:47 +02:00
14b26b7347 Combine successive private blocks
Change-Id: Id0da294261d9f42e4ba31864827e38e29bf44ea0
2016-04-11 16:58:46 +02:00
9258fc222d protected -> private
Change-Id: Ic021240bbc2069d6d47b51c0b8e0d81739a72151
2016-04-11 16:58:45 +02:00
eda008c4fa Fold impl_initializePropInfo into initListeners
Change-Id: I14d6461d442a8e0ff1efd719e7e2233ffbc523a5
2016-04-11 16:58:44 +02:00
69741ccf3d No need to lock SolarMutex here
Change-Id: Id626dc7c5c75b885b3665e06596b7a58d225cd4c
2016-04-11 16:58:43 +02:00
654fa8aaed loplugin:stringconstant
Change-Id: I4776cca99c362998a979507880dce1eccf8e5e04
2016-04-11 13:43:16 +02:00
daf209b64d allow disabling recent files menu entry
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-11 10:37:17 +00:00
e9230b2b09 tdf#48300 bring window to top and restore window when minimized.
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-11 10:30:47 +00:00
b9d091e7d4 No need to clear component context during dispose
...which simplifies access to m_xContext member.

Change-Id: Ia028b5ae26d94527b6668365ab1197103afb8c22
2016-04-11 11:31:59 +02:00
d84ef731d8 tdf#94306 replace boost::noncopyable ...
... 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-11 07:22:50 +00:00
fbb96dcf54 Base Frame on WeakComponentImplHelper instead of TransactionManager
...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-08 14:03:53 +02:00
031d314eae Just use the hash<sal_Int16> default
Change-Id: Ice2c0cbf382997c2d07cc8cd4a7b085a153fffef
2016-04-07 21:49:06 +02:00
4be81de0d6 Resolve OUStringList typedef
Change-Id: Ifb5dc5128b5619abb83eea427c7fb1115fd825f3
2016-04-07 21:44:02 +02:00
9a2dea0640 dllexport class deriving from template means trouble with MSVC
Change-Id: I9d170168eac26c52fd6ca8d22124e8ff78b81226
2016-04-07 21:15:55 +02:00
f57c9921de Get rid of BaseHash wrapper (to unbreak Windows build)
Change-Id: Ieae7d6af7a4753958ebf2aeae9d2ae6fafe5efe9
2016-04-07 18:14:53 +02:00
e2ef269916 Fold PropertySetHelper into its only use, Frame
Change-Id: I148e15c2c91a985cd110f5589adbf26c102b1cfb
2016-04-07 17:33:26 +02:00
d6d86237b1 [API CHANGE] Remove undocumented TabContainerWindow service
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-07 15:22:42 +02:00
95b720f6d7 revert to fix tdf#98783 missing menubar
Change-Id: Ia322149a7ed461f528af856d9907fe4620f9e97f
2016-04-06 16:18:41 +01:00
1087ac3755 Prevent broadcast of title change events without a source
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-05 14:49:35 +00:00
062d0b1e36 m_dbg_bMakeItFaster is always false
Change-Id: I7ee117fcc5538ab9bc92cd30fd0f61e52a5a93bd
2016-04-05 16:49:11 +02:00
d0075ad8f2 tdf#96044 - After exiting print preview main window number bumps to #3
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-05 12:51:14 +00:00
9866efe3e5 loplugin:constantparam
Change-Id: I821ed77a6c6014c9a82d31a4b117ed6f1b4abf18
Reviewed-on: https://gerrit.libreoffice.org/23832
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-05 11:29:54 +00:00