Commit Graph
9970 Commits
Author SHA1 Message Date
Noel Grandin 73e6a7975b loplugin:unusedmethods
Change-Id: I7805ac9bc6f8c0aa5ba4804777e7d7c2c29a78f3
Reviewed-on: https://gerrit.libreoffice.org/52066
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29 14:45:43 +02:00
Caolán McNamara f98040a273 another stab at the ofx infinite rtf loop
Change-Id: I2dcc186fd7118a85e2059d061fc4cac555c96ee8
Reviewed-on: https://gerrit.libreoffice.org/51944
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-27 16:51:40 +02:00
Caolán McNamara 19ca4e8a5e Resolves: tdf#116540 Revert "ofz infinite loop"
This reverts commit e4551b905e.

Change-Id: I95634dd166c51586b5da47b996993a098823ca32
Reviewed-on: https://gerrit.libreoffice.org/51941
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-27 15:49:23 +02:00
Szymon Kłos 030c30b33b tdf#116241 Customizing value highlighting colors
Available in: Tools->Options->Application colors

Change-Id: I6e4f7a0dcad9a6ee222275019596853f0cbd3ab0
Reviewed-on: https://gerrit.libreoffice.org/51791
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-03-26 23:24:08 +02:00
Samuel Mehrbrodt a82cdccb0c Typo: GetSelectItemId -> GetSelectedItemId
Change-Id: Ieebb50b73f1f341c924693f3966f8cd2b09a136b
Reviewed-on: https://gerrit.libreoffice.org/51750
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-23 08:26:14 +01:00
Caolán McNamara 12efe34abb support both vcl and weld in genericunodialog for interim
Change-Id: Ife85dd7a4bd27260514b390ca3928152db0d688f
Reviewed-on: https://gerrit.libreoffice.org/51699
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-21 15:48:12 +01:00
Jochen Nitschke b2147abdf6 remove unused ucbstreamhelper includes
and a few vclunohelper includes

Change-Id: I4803605766d155fe5044c2a65c0444631146831c
Reviewed-on: https://gerrit.libreoffice.org/51496
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-19 07:38:49 +01:00
Noel Grandin e9c74a075c drop ErrCode::GetRest
it was always a broken API because it includes the code, the class, and
only part of the subsystemarea.

Change-Id: I6f88b54aed2feab02a6aeaa783d7c642054b8075
Reviewed-on: https://gerrit.libreoffice.org/51430
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-19 07:36:12 +01:00
Jan Holesovsky 1b9af08481 tdf#116334: Actually when there is no handler, we have to return 'true'.
Also use the return value of the link's Call() [as the SvTreeListBox::ExpandingHdl()
is doing], the appropriate callbacks seem to return the expected 'false' in
the cases I've reviewed...

Change-Id: I0cdd63e8ec4c794839070b914150e0b32f743359
Reviewed-on: https://gerrit.libreoffice.org/51211
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-03-13 16:28:40 +01:00
Tomaž Vajngerl afea2bbcd5 svtools: cleanup GraphicAccess
Change-Id: I1eb2b5dd6859653594771d950992dfca38161446
Reviewed-on: https://gerrit.libreoffice.org/51104
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-12 12:56:02 +01:00
Tomaž Vajngerl ab9eff78f0 remove support of GraphicObject URL from GraphicAccess
Change-Id: I4f14241f8528e025ddb108c73bee2df61f8927de
Reviewed-on: https://gerrit.libreoffice.org/51103
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-12 12:28:58 +01:00
Noel Grandin 2f5868c430 loplugin:redundantfcast look for redundant copies in return statements
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008
Reviewed-on: https://gerrit.libreoffice.org/50996
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-12 07:37:24 +01:00
Tomaž Vajngerl 7fbb96c2fb Move (and rename) graphic stuff from svtools to vcl
This is preparing to change how GraphicManager works where it
won't base itself around GraphicObject anymore but Graphic. No
functional or cosmetic change was made to the classes, only
changes that were needed because of the move and rename.

The only thing that wasn't moved is the GraphicRenderer as it
is not needed in vcl for now (but makes sense to move it in the
future to keep graphic stuff together).

grfmgr was renamed to GraphicObject as the GraphicManager will be
changed a lot and most likely moved out, so the name grfmgr won't
make any sense anymore.

All the UNO implementations were renamed with a prefix Uno and
used the same name as the class name. This is made to be more
specific which are the Uno objects (for example graphic.cxx
contained the implementation of XGraphic, which is similar to
graph.cxx contains Graphic).

Change-Id: I54a2fa6c7e997469aaa7770db05244adb9f64137
Reviewed-on: https://gerrit.libreoffice.org/51068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-11 13:37:21 +01:00
Tomaž Vajngerl 98eb91a1b9 remove whitespace
Change-Id: I2ae5c344da3f523072754340e78288fbb29c6348
Reviewed-on: https://gerrit.libreoffice.org/51067
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-11 05:03:53 +01:00
Tomaž Vajngerl d0b36b780d oox: remove unused methods that rely on GraphicObject URL
Change-Id: Ie68ccfa8d802bb284da8bb4af69882f4b66a3dac
Reviewed-on: https://gerrit.libreoffice.org/51010
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-10 02:11:58 +01:00
Caolán McNamara 48bca65f1c inherit welded dialogs from a common ancestor
Change-Id: Ifa6c871a134cf89bfba71b1049a115cf7c953c42
Reviewed-on: https://gerrit.libreoffice.org/50936
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-09 13:47:52 +01:00
Miklos Vajna a8ca72cbcd svtools: allow writing characters with HtmlWriter
The sw HTML image export already uses HtmlWriter, so need to extend this
to support XHTML alternate text, writing the character data directly is
not an option.

Change-Id: Iac3f2b9a3828175a5f1d0fb14ab505f8de389e52
Reviewed-on: https://gerrit.libreoffice.org/50965
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-08 18:53:53 +01:00
Noel Grandin c774ad610e loplugin:constantparam in svtools..unotools
Change-Id: I6e72fbe44dcb65ee5162448e9a72e6437d56b044
Reviewed-on: https://gerrit.libreoffice.org/50948
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-08 18:23:53 +01:00
Tomaž Vajngerl 19b6b8f894 transformer: clean-up and pass originURL to transfored graphic
Change-Id: Iab01a5123ce6774120e2a0242616511a9fbe4403
Reviewed-on: https://gerrit.libreoffice.org/50867
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-07 11:05:10 +01:00
Noel Grandin 26a016be81 use more Color in sfx2..svtools
Change-Id: Idd951841ce7e9c4b4e5229bc24efe5c7b8042617
Reviewed-on: https://gerrit.libreoffice.org/50817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-07 07:10:22 +01:00
Jan Holesovsky 7651e57573 tdf#115950: Indicate that the dialog was already destroyed.
The DoubleClickHdl()'s return value does not mean "was handled", but actually
"is there anything more to be done"; so if we actually destroy the dialog in
the aDoubleClickHdl.Call(this), we have to return 'false'.

Change-Id: I7c510e8341eb5f74703b4266f86cb1e840a2b1fd
Reviewed-on: https://gerrit.libreoffice.org/50261
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-03-01 15:41:13 +01:00
Miklos Vajna b4f3af91d3 sw HTML export: handle XHTML ns alias even with HTMLOutFuncs::Out_AsciiTag()
This is meant to be mechanical, full conversion to HtmlWriter has to be
done step by step in follow-up commits.

Change-Id: Ieab096f8c9936f0ecad029fbdfb51da7412ad83e
Reviewed-on: https://gerrit.libreoffice.org/50449
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-01 10:07:31 +01:00
Noel Grandin d3510bef84 make Color::GetRGBColor return Color instead of ColorData
Change-Id: I532959a7103c3857510f26ecce2f942d676a233b
Reviewed-on: https://gerrit.libreoffice.org/50487
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-01 08:24:24 +01:00
Noel Grandin efe22f3fa2 drop old tools/gen methods in reportdesign..xmloff
Change-Id: I398831c526ba51d861557fa6c13c0e2fb44dfbe0
Reviewed-on: https://gerrit.libreoffice.org/50447
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28 12:47:31 +01:00
Miklos Vajna 9df0ce081e sw HTML export: allow custom XHTML namespace alias
This helps in case the HTML filter expected to produce an XHTML fragment that
has an explicit namespace alias for <http://www.w3.org/1999/xhtml>.

This only has an effect when HtmlWriter is used to write elements,
though.

Change-Id: I161caf4bb6bc6d0c21a7a67433b08bb060b447f1
Reviewed-on: https://gerrit.libreoffice.org/50448
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-28 11:41:50 +01:00
Noel Grandin e2cb154195 convert COL_ constants to be of type Color
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48
Reviewed-on: https://gerrit.libreoffice.org/50373
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28 07:34:27 +01:00
Jochen Nitschke 35fc452721 remove unused vclunohelper.hxx includes
Change-Id: I68178379e5493d0e738861a4dce5aa6e4b58cd22
Reviewed-on: https://gerrit.libreoffice.org/50393
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27 15:00:06 +01:00
Noel Grandin c98d330302 replace Color(COL_*) with COL_*
using

    git grep -lwP "Color\s*\(\s*(COL_\w+)\s*\)"
    | xargs perl -pi -e "s/Color\s*\(\s*(COL_\w+)\s*\)//g"

and then some manual fixup where the resulting expression no longer
compiled

Change-Id: I0e268d78611c3be40bba9f60ecfdc087a36c0df4
Reviewed-on: https://gerrit.libreoffice.org/50372
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27 11:28:29 +01:00
Caolán McNamara 0fad8d3081 convert remaining WarningBox to weld::MessageDialog
Change-Id: I7e3c156a6ad47ac232636ae274280c1cb7556d4a
2018-02-27 09:52:32 +00:00
Miklos Vajna 61e4c00eee sw HTML import: allow custom XHTML namespace alias
This helps in case the HTML filter is given an XHTML that has an
explicit namespace alias for <http://www.w3.org/1999/xhtml>.

Change-Id: I437fa85ba19ce907c9c4b10c8d10aaf2217dc0ea
Reviewed-on: https://gerrit.libreoffice.org/50380
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-02-27 09:09:54 +01:00
Shubham Verma 63a342ec65 tdf#97228 Moved struct FltCallDialogParameter
Moved struct FltCallDialogParameter to svtools/inc as this struct is
used only in the files located there . A separate header file is made
named FltCallDialogParameter.hxx which has this struct and appropriate
modification are done to the inclusion of header files in each file.

Change-Id: I60326b58fcbbb9c34abdb7c3de48667268b5d5e5
Reviewed-on: https://gerrit.libreoffice.org/50265
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-02-27 08:56:36 +01:00
Caolán McNamara cc92324bed split out GetStandardWarningBoxImage
Change-Id: I2c8315c7223adac2d7e0e2aa403db0f865bdc48e
Reviewed-on: https://gerrit.libreoffice.org/50377
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-26 22:15:19 +01:00
Caolán McNamara 942f05996b convert remaining ErrorBox to weld::MessageDialog
and

convert remaining QueryBox to weld::MessageDialog

Change-Id: Ifb4c316dee8eabf57c4940c44e29c65a2781aa6c
2018-02-26 15:27:09 +00:00
Noel Grandin 08ab1f46b1 loplugin:oncevar extend to tools/gen.hxx types
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2
Reviewed-on: https://gerrit.libreoffice.org/50283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26 07:21:04 +01:00
Caolán McNamara d75144cf44 convert remaining InfoBox to weld::MessageDialog
Change-Id: I91d828e38d96264cf4a76f30940942556b8f78d8
Reviewed-on: https://gerrit.libreoffice.org/50205
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-25 20:03:26 +01:00
Caolán McNamara 6a4c464b49 weld native message dialogs
just the straight-forward MessageDialog cases first

a) remove border_width from message dialog .ui so as to take
the default border width
b) retain 12 as default message dialog border for vcl widget case
c) remove layour_style from message dialog button boxes so as to
take the default mode (a no-op for vcl widget case)
d) use gtk response ids (vcl builder will converts to vcl ones)

Change-Id: I7de281093a1b64f92f71ca11e7cbba42bb658154
Reviewed-on: https://gerrit.libreoffice.org/50143
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-22 22:07:38 +01:00
Caolán McNamara 5e85f475ee drop unused button mask enum
Change-Id: Id94c6ecdfc642888eea8c13e55d38326b2d7ad12
Reviewed-on: https://gerrit.libreoffice.org/50145
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-22 09:54:57 +01:00
Noel Grandin 331b4603be loplugin:redundantcopy extend to Color
Change-Id: I224cc955d49ee100d328e0171da710f38068d2d4
Reviewed-on: https://gerrit.libreoffice.org/50114
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-22 07:23:57 +01:00
Mike Kaganski f00e891f33 tdf#115892: properly get the box' saved value
Previously textual value like "10,5 pt" was converted to int as simply
10 (multiplied by 10, it became 100), which compared as different from
unchanged value of 105. This made the fractional values to be treated
as always changed.

This patch uses the same code to convert saved value as is used for
current edit box value.

Change-Id: I09a84a6bf33b17e0192b79b31af21ef14d7e9c63
Reviewed-on: https://gerrit.libreoffice.org/50066
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-21 08:11:23 +01:00
Stephan Bergmann ba8a70365e New loplugin:nestedunnamed
Change-Id: Ifb434589ef08428ce609bc7a40b015d4df13224c
Reviewed-on: https://gerrit.libreoffice.org/50048
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-21 08:09:46 +01:00
Noel Grandin 72593849bb ColorData->Color in sd..svx
Change-Id: I70de56b6bfb1ea4655ec03510fad92bf6645f64e
Reviewed-on: https://gerrit.libreoffice.org/50046
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-21 06:05:41 +01:00
Noel Grandin 7b8a0b7c0d loplugin:changetoolsgen in svtools
Change-Id: I63271ee3126368868db7e7e859aaaa76b15e559e
Reviewed-on: https://gerrit.libreoffice.org/50023
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-20 12:54:55 +01:00
Noel Grandin 19a906f096 drop Color::SetColor(ColorData) in favour of operator=
first stage of getting rid of ColorData

Change-Id: I5e4e95eb958722814c43c8d1ebfef17ad18c29ec
Reviewed-on: https://gerrit.libreoffice.org/49997
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-20 07:19:16 +01:00
Johnny_M 4c3fc27ee6 Translate German variable names
Akt -> Current in svparser

Change-Id: I6c883a7690ca518ea773a08ab093d5db323122f5
Reviewed-on: https://gerrit.libreoffice.org/49901
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-02-17 19:46:10 +01:00
Noel Grandin d03c6ee8d0 move transparency adjust code to BitmapEx
part of making Bitmap an internal implementation detail of vcl/

Change-Id: I6978d84c86c3d55b3ebbeacda60fd94b160daa29
Reviewed-on: https://gerrit.libreoffice.org/49667
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-14 07:29:33 +01:00
Tomaž Vajngerl 406004d3f5 pass originURL to the substitue graphic - work-around
We need to pretend that the substitue graphic has a originURL of
the original for now. Once Graphic will handle all the swapping
and substitution this won't be necessary anymore.

Change-Id: I9590b741c94d06d1b484273cc4ba5517951b77ec
Reviewed-on: https://gerrit.libreoffice.org/49647
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-13 20:29:48 +01:00
Jochen Nitschke 4f759834d3 cppcheck useInitializationList
unique_ptr don't need explicit nullptr initialization, same
goes for VclPtr in ImpEditEngine.

Change-Id: Id8f3163c2719bee6ee2724cae98449d564be5535
Reviewed-on: https://gerrit.libreoffice.org/49559
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-12 08:03:12 +01:00
Julien Nabet 91d798c51d tdf#115584: fix crash Base
Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=0fb4ae8767fa5ff791cd42934b4215011a269eb0

Change-Id: Ifcf183ebb4d0096193cccdd74a61eb59c7a06cdf
Reviewed-on: https://gerrit.libreoffice.org/49505
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-09 16:49:11 +01:00
Julien Nabet 0fb4ae8767 Modernize a bit svtools
by using for-range loops
+ use empty() instead of comparing begin and end iterator

Change-Id: I41c3ae0c9032d6349afb113d457cb78862ae9dcf
Reviewed-on: https://gerrit.libreoffice.org/49416
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-08 18:31:34 +01:00
Maxim Monastirsky 3ecf542af4 Different approach for tdf#115227
This reverts the previous attempt of commit
250ad9311a ("tdf#115227 svtools:
suppress UNO notifications for color selectors"), in favor of
a different fix. The advantage of this new approach is that
is doesn't affect events other than activate/deativate, and that
it covers more cases: Toolbar popups even if not based on
svtools::ToolbarPopup, or if closed by clicking outside them,
font name/size and paragraph style toolbar controls, notebookbar,
context and main menus (for the non gtk3 native case, the gtk3
native menus left for a future investigation). For now, keep this
logic inside toolkit, but ideally it should be in vcl (after
reviewing vcl internal listeners).

One side effect that I noticed after this change, is that there is
a deactivation/activation pair which suppressed when e.g. opening a
new document from the start center. But I'm not sure if that's a
problem, given that the focus state of the top window as a whole
wasn't changed, only its contents, and there are other APIs to track
activation of document components. This happens because the source
and the target windows of those events are the same, and we need to
suppress this case to fix the font name/size style controls, and also
the color picker after 27473d1c0f
("tdf#114935 Move the focus back to the document"). Otherwise we'll
need to find another way to move the focus to the document w/o
triggering listeners.

Another case that will see a change in behavior, is document event
listeners in dbaccess, as the Focus/UnFocus events there are based
on top window activation/deactivation. However, I think it's a good
change, as currently just opening of a toolbar popup or main/context
menus there triggers those document events, making them useless.

I would like to also mention here, that in fact those top window
activation events never really worked as tdf#115227 expects them, as
the superfluous events for at least the font name/size, style and
color toolbar buttons existed already in OOo. The behavior of the
color buttons changed in LO for a few years, but regressed again in
the work on a real focus grabbing for floating windows starting with
commit dd46727b99 ("Resolves; tdf#87120
no keyboard navigation inside floating windows"). That work also
introduced superfluous events when using menus.

And a note about the change in menubarwindow.cxx: When a menubar
popup is closed it's deleted using the lazydelete mechanism, which
reparents the popup window, so it doesn't appear anymore in the
hierarchy of the document window. Moreover, I suspect that at some
point the lazydelete thing will be replaced by a VclPtr mechanism,
which might break this even further, so the event won't appear as
coming from the popup window (which might be already disposed at
this stage). So instead, temporarily set the menubar window as the
current focus window, so the activation will appear as if it was
coming from the menu bar window itself.

Change-Id: I292232adfcbd1a31d66ce394cd2f1bf42a013ecb
Reviewed-on: https://gerrit.libreoffice.org/48746
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-02-08 09:22:42 +01:00