Commit Graph

2404 Commits

Author SHA1 Message Date
2aea9e37d6 Introduce generic sub toolbar controller
Currently many toolbar controllers are basically doing the
same thing - show some docked toolbar. So the idea here is
to have one generic controller that will handle all these
cases in a unified way. It will get the name of the toolbar
that it's supposed to show from the configuration, based on
the command it was registered for.

Right now it can handle both simple (i.e. with DROPDOWNONLY
bits) and split (i.e. with DROPDOWN bits) scenarios, where
for split kind it replaces the function (and the image) of
the main part of the button, with the last selected function,
for easy reusing. A button is considered to be a split one,
if the name of the initial default command was passed along
with the sub toolbar name, otherwise it will be a simple
button.

The core change is in framework/. Other parts are a usage
example, in form of converting the custom shapes buttons
to this new controller.

Change-Id: I087cc58c3db1889ca69a26546d4f00fe07e2a58d
Reviewed-on: https://gerrit.libreoffice.org/16967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-07-13 12:09:52 +00:00
5b16fff9ac loplugin:staticmethods
Change-Id: I8b57b7ce707438ad3c7c901b03c94d9045585ed8
2015-07-13 09:21:51 +02:00
7f0161d88e WaE: C2872 chart is ambiguous
Change-Id: Ib847a0f4ec804766727a2d7a247912f93b30045c
2015-07-12 21:28:45 +01:00
9c5fc87cee WaE: C4065 switch contains default but no case
Change-Id: I33620609d0b39c8bedf5641101e5c0229364cde0
2015-07-12 21:27:48 +01:00
5d5667062c add ChartElements panel
Change-Id: I935a0d637a9ea3a1716d6e839e65c4e565a2c840
2015-07-12 18:56:49 +02:00
b33b2afe6a big step towards real chart sidebar
Change-Id: I9b7d1f963746f7689b02099fbae77c9c943bad58
2015-07-12 18:56:49 +02:00
efd13b27a4 finally manage to register chart2 in the ChartController
We need to do some jumps through pink hoops to connect the chart
controller with the host sidebar.

Would we use the chart window as parent for our sidebar the sidebar
would be directlz beside the chart and not at the border of the host
window.

Change-Id: Ica44ae370518882ef367999f57251b1256907016
2015-07-12 18:56:48 +02:00
498e03c2a3 fix crash
Change-Id: Ic1bc31b68c4a2aafb1e40ebff84fbf052df7041f
2015-07-12 18:56:47 +02:00
04716cb9ac add SidebarChangeHandler to chart2
I still need to wire the correct frame to the correct sidebar for it to
work.

Change-Id: I0fecc2be674d6b024bc39e707930a4c30f67cb81
2015-07-12 18:56:47 +02:00
2b5ebcc45b chart2: typed Link<>
Change-Id: I98c882d64cb4d6430390ac705f3f2208dd523598
2015-07-08 08:59:06 +02:00
799cc41b53 Fix typos
Change-Id: I70b03c152f63e48341dc5629a99b0eeab7b497c0
Reviewed-on: https://gerrit.libreoffice.org/16834
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-07-08 05:48:18 +00:00
ffa8892c5a Fix typos
Change-Id: I75b4ad61785bf0ba1cb07735d938c0977356b8cc
Reviewed-on: https://gerrit.libreoffice.org/16705
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-04 10:23:17 +00:00
1a8915ef83 Fix typos
Change-Id: I1c5e4970d4e90bdea68a901294594104de5e189e
Reviewed-on: https://gerrit.libreoffice.org/16582
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-06-30 15:57:12 +00:00
5d5dc059cb Fix typos
Change-Id: I80995af6459af9f647e66d1c85da2eedad2647b9
Reviewed-on: https://gerrit.libreoffice.org/16523
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-06-28 12:35:58 +00:00
aade27554d Fix typos
Change-Id: I60ed5eb658d50cbc7dc572facb5463b7527b4d9b
Reviewed-on: https://gerrit.libreoffice.org/16408
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-22 12:36:21 +00:00
4729774b24 remove unnecessary check for null when calling delete
Idea originally from caolan.
Found using the following command:
find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;'

Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-06-15 14:46:41 +02:00
dcf6abfcdf cppcheck:unreadVariable
Change-Id: I03981ceba67280e8ed98a9add7f24b3bd958d522
2015-06-15 14:06:31 +02:00
4ea281a3cc cppcheck:redundantAssignment
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
2015-06-15 13:34:14 +02:00
b226928c6d cppcheck: redundantCondition [part1]
Change-Id: I21c5340e7b5ec09248b08aa76f43acf883c56cd8
2015-06-14 12:17:55 +02:00
d203948fdb convert 'it.begin() == it.end()' to 'it.empty()'
Change-Id: I244a9eb6bce6b1c649653ec38ebb9a39f8b4c145
Reviewed-on: https://gerrit.libreoffice.org/16212
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-11 06:48:29 +00:00
bc14d27dd0 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: If5ab427ab320e2623df182e6143c4e7123610eae
2015-06-08 16:23:25 +02:00
0f71828a95 cppcheck: noExplicitConstructor
Change-Id: I8b03c27188b02c3c4a9a9fbbe0df1fb1ae1c5caf
2015-06-08 11:14:38 +01:00
b9f9576949 WaE: ‘<::’ cannot begin a template-argument list
This is an internal include file deep inside chart2, so just use css::. The
file uses css:: already in a couple of places anyway. So maybe I should have
been brave and just changed all the ugly ::com::sun:: into css::?

Change-Id: I705db39ff55f3e47c7e9d2f79fee625d76a22ca0
2015-06-05 17:48:33 +03:00
81610561ed uno::Sequence provides now begin and end
use begin() and end() when calling std::copy on an uno::Sequence

Inspired by commit b34b648fc3262c5d9aa295f621e8fe9c97d4c6b2
"uno::Sequence provides now begin and end"

Change-Id: I08e8c3fd6144e77b95a26f85bc0daf6a9edeeb0b
Reviewed-on: https://gerrit.libreoffice.org/16057
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-04 06:35:44 +00:00
20bb2e7074 GL3D Bar chart -> experimental
Change-Id: I2d5948651e5c31a6ce3cadcc9ff09683a60d49bd
Reviewed-on: https://gerrit.libreoffice.org/16022
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-06-02 08:46:22 +00:00
7e5c1101cb Time based charting -> experimental
Change-Id: I1c190be0ef226d1f14d083f292cf2ea15a6d1645
Reviewed-on: https://gerrit.libreoffice.org/16023
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-06-02 08:46:00 +00:00
9509ce6103 some whitespace clean-up
Change-Id: I80aa6692c528176e38b5414145b484a32a9906f6
2015-06-02 00:14:43 +02:00
ba81e5c6bd tdf#91702 - fix stack-based MessBox allocation.
Change-Id: I62dd164e281911d9db3de453789a5badc7cd5fd7
Reviewed-on: https://gerrit.libreoffice.org/15954
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-05-29 12:16:28 +00:00
e0b2e6e3f7 loplugin:loopvartoosmall
Change-Id: Icbe68b31d4ab04ca3cd9f572e3598413946a75c7
2015-05-29 08:48:41 +02:00
cc7b8dab75 tdf#91633 - dispose chart data-table entries correctly.
Change-Id: Ia26df029888f47a0395ea3c8bd7e0e51a1706c2a
2015-05-26 17:54:28 +01:00
bb7ce3137d convert INVALIDATE constants to scoped enum
fixing a bug in Window::ImplMoveAllInvalidateRegions, and improving the
IDL docs for XWindowPeer

Change-Id: Idb774ac913945db2ac7c492c11cf86c370624c3d
2015-05-26 08:30:18 +02:00
ac3802da9a convert WINDOW_POSSIZE constants to scoped enum
Change-Id: Id85137ffc7309a66b04132d588d289db136117b9
2015-05-22 10:37:59 +02:00
24600dcf31 loplugin:constantfunction
Change-Id: I7cb5b0c2cf9ade557173ca596ea5d42d853ff448
2015-05-22 09:59:46 +02:00
e929194317 convert POINTER constants to scoped enum
Change-Id: Iea29ce5fd6c620535197d3ca8538335078430e19
Reviewed-on: https://gerrit.libreoffice.org/15825
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-22 06:32:35 +00:00
5bf6fecde7 tdf#91054: cleanup weirdo function prototypes
cleanup the folders chart2/ and ucb/

Change-Id: Ia5f230703e55da5710eaa52bbd9e22a6395a49ad
Reviewed-on: https://gerrit.libreoffice.org/15832
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-21 06:34:45 +00:00
ab465b90f6 bin/rename-sw-abbreviations.sh
renames the most annoying abbreviations in Writer (and partially
in the shared code too).

Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-20 13:05:49 +02:00
456c379ffd convert ANTIALIASING constants to scoped enum
Change-Id: I175b8ea4e8bc01c3cdd3dd90506eba01b35e0085
2015-05-20 09:52:09 +02:00
3cbdf64ad5 convert DRAWMODE constants to scoped enum
Change-Id: I36cbe8057d09226f8b302963bdd94dc5600b686f
2015-05-20 09:52:08 +02:00
4b4c23acc7 fix old GCC build
after my commit 10749bbf8247f0b17201b33f95a090dfc4fc3211
"remove the last of the OUString #defines in header files"

Change-Id: I592e918f7b718ddff99a8eaff04b11064fad65d9
2015-05-19 10:11:53 +02:00
5b1337f7b2 tdf#62475: partial handmade fixes
Change-Id: Ib9af202c43b916b9af4b4e18db35d470a8692fe4
Reviewed-on: https://gerrit.libreoffice.org/15712
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-05-15 17:55:15 +00:00
73e45da4f5 refactor chart2 classes to use RenderContext
Change-Id: I245af77126739bb219f6a085a47cee2efac2c351
2015-05-14 09:58:14 +09:00
47ac1b7445 perform a proper boundary check, just in case
Change-Id: I4713b88a2130658513fd64793129c855169f0187
Reviewed-on: https://gerrit.libreoffice.org/15720
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-05-13 10:56:21 +00:00
0ac8026773 add PostPaint and change PrePaint to include RenderContext param.
Change-Id: I26e03159fa6115025c6cf376e6ce71443bc98cec
2015-05-13 13:57:46 +09:00
936a496467 Switch VclBuilder constructors to use VclPtr.
Change-Id: Id35a86eb52bbde6ca09a5e61a0b1a79b23be8faf
2015-05-12 09:40:38 +01:00
667910530d Revert "Switch VclBuilder constructors to use VclPtr."
Behaves oddly; not ready yet.

This reverts commit 9f016bd69422bdfb4cf7c4f5e57356eb98db2d8c.

Change-Id: I30d746eac29d1dbe78d3072b10d2e22c051e3f4e
2015-05-11 16:28:22 +01:00
9f016bd694 Switch VclBuilder constructors to use VclPtr.
Change-Id: Id35a86eb52bbde6ca09a5e61a0b1a79b23be8faf
2015-05-11 15:12:08 +01:00
82d68f9cbc convert COMMAND_ constants to scoped enum
Change-Id: I88e67f89dbbab0646e8f106dfeb32c6ee1bb0b95
Reviewed-on: https://gerrit.libreoffice.org/15671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-11 12:17:42 +00:00
ffaa8e48b5 fix regression from 1c4025babd7037a3292aa530c7d45ab8d6ef6dcb
Change-Id: I28543128b75315be1eda1a82f6e856778c38a33e
2015-05-11 05:19:45 +02:00
6dc42c82ba Use IMPL_LINK_NOARG[_TYPED] where applicable
Change-Id: I70598072c1d492e360ef46dd7b5ef5a2fa4be495
2015-05-10 12:06:16 +02:00
9bb254fc85 NOINSTANCE is implied now in IMPL_STATIC_LINK...
Change-Id: Ifb032457d6c1b279c4183282ef2b271c706dd71a
2015-05-10 11:25:47 +02:00