Commit Graph

8968 Commits

Author SHA1 Message Date
f305b88286 unhook the alt handling thing from SystemWindow
so it could be used from things that aren't dialogs

Change-Id: I649c5a05ad9c0634be9cef2bbe16a4643e58fc12
2016-07-29 16:36:36 +01:00
7f262a4101 [GSoC] Fix recent colors in color popup widget
Save recent colors in user configuration.

Change-Id: I1637e9fe3150bd1892f72ff9df06dc2a7c3e1e9e
Reviewed-on: https://gerrit.libreoffice.org/27688
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-29 14:52:56 +00:00
7494466e43 svl: add SfxUndoAction::GetViewShellId()
In preparation of a Writer version that overrides this and remembers
which view shell introduced which action.

Change-Id: I4970f8ce9c56f1b57ab1ae92f3ea8be804ca27bf
Reviewed-on: https://gerrit.libreoffice.org/27682
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-29 12:49:34 +00:00
389d4d4142 sfx2: introduce SfxViewShell::GetViewShellId()
This is quite similar to SwFrame::GetFrameId(), i.e. it assigns a
numeric identifier to each instance to help debugging, as those
identifiers are stable accross runs.

Change-Id: I9cc57e316435f0284a1d481a956a703be859d67e
Reviewed-on: https://gerrit.libreoffice.org/27669
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-29 11:39:22 +00:00
a2095b1514 comphelper,vcl: let DeInitVCL() join some AsyncEventNotifier threads
comphelper::AsyncEventNotifier is an amazing class that dispatches
events in separate threads, no doubt implemented during times of
exuberant optimism about the tractability of shared-state
multi-threading.

Unfortunately the authors forgot to think about how all those awesome
threads will be joined, so if they are somehow blocked, then it may well
happen that the events are dispatched when the main thread is already in
DeInitVCL, and the objects required for the dispatching already smell
somewhat funny.

This happens quite reproducibly when changing dbaccess' ModelMethodGuard
to lock the SolarMutex too, then CppunitTest_dbaccess_RowSetClones
crashes in DeInitVCL() because one AsyncEventNotifier thread was blocked
until then by SolarMutexGuard, and this test never Yields once its
document is loaded.

Try to fix this by joining the "DocumentEventNotifier" threads from
DeInitVCL() itself.

Since there's no rtl::WeakReference to go with rtl::Reference, refactor
the AsyncEventNotifier and create a new AsyncEventNotifierAutoJoin
that has to be used with std::shared_ptr and std::weak_ptr.

Change-Id: I50a0749795acb04b0776e543f7125767b697ea35
Reviewed-on: https://gerrit.libreoffice.org/27581
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-07-29 10:05:47 +00:00
9da4c9bc71 loplugin:staticmethods
Change-Id: If32319c1d93756d633f07a21c76e0107181704b0
2016-07-29 10:32:41 +02:00
73c8bc849c sw layout xml dump: mention SfxViewShell addresses
Change-Id: I2e5c8102684494fd3d7c1c70971a09d0c940a124
Reviewed-on: https://gerrit.libreoffice.org/27637
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-29 07:08:00 +00:00
72e6f08c69 GSoC Emoji Control
Tab Window
Add emoji.json to installation directory
Read the JSON data from code
Filter emojis according to categories
Insert Emoji at cursor position
Toolbar control

Change-Id: Ia5a577ce41398132872914ebfa499e4d4077d57e
Reviewed-on: https://gerrit.libreoffice.org/26700
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Akshay Deep <akshaydeepiitr@gmail.com>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-07-28 20:54:44 +00:00
878c4f2490 vcl: remove Application::InsertIdleHdl() and ImplIdleMgr
This is obsolete since 5.0 introduced the new Idle scheduler.

Change-Id: I8555fe35e2befb0cc2a4c39ae469a5c32a32fcb9
Reviewed-on: https://gerrit.libreoffice.org/27598
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-07-28 09:05:04 +00:00
66dd26659e svx: fix loplugin:nullptr
Change-Id: Iff5fbb5c8b2885b0ba84c08f1357fdfc82ecf016
2016-07-28 08:25:40 +02:00
5f65ca15a2 svx lok: fix handling of text edit drawing when view/page changes
This is a follow-up to commit 9d91d371e92548c7f75a7d0155eecaf3769fdee6
(svx lok: draw text edits in all views, 2016-07-26). Two corner-cases
are now handled:

1) When the SfxViewShell is created after begin text edit and
2) When the other draw view is already created, but at the time begin
text edit happens, the other draw view shows a different page.

And the opposite of these: switching away from a page were we observe a
text edit done in an other view or destroying a view that observes a
text edit.

When the complete view goes away, then SdrObjEditView::HideSdrPage() is
not called, so also try to destroy the outliner view of the text edit
from SdrObjEditView::DeleteWindowFromPaintView(). The GetSfxViewShell()
call in SdrObjEditView::ShowSdrPage() is important, because we let the
other draw view create the outliner view, but the outliner view should
invoke our view shell, not the view shell of the other draw view.

Also improve the SdTiledRenderingTest::testCursorViews() testcase, so
that it asserts it managed to begin text edit and use a test document
that still has a single slide and shape, but the shape is not
auto-sized; otherwise invalidations happen even if outliner views are
not created in all draw views, so the test would pass even without the
fixes.

Change-Id: I2c3bb27826c6887115366db818599fc8adabc5a5
Reviewed-on: https://gerrit.libreoffice.org/27583
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-27 16:27:16 +00:00
f06a3503b6 tdf#100834 Extend ODF for integer/fraction delimiter
Any string can be used as delimiter between integer and fraction.
It is now saved/loaded to/from ODF, as it was from XLS.

Change-Id: Ie6364d1cdefc020ea615c18099118135c619f96b
Reviewed-on: https://gerrit.libreoffice.org/27262
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-07-27 13:12:34 +00:00
0d174c9748 Resolves: tdf#101003 don't give paras in editeng accessible names
change since...

commit c23ab5eaed57cc3fb5860e26c591c73c5b22687b
Author: Steve Yin <steve_y@apache.org>
Date:   Tue Nov 26 14:25:22 2013 +0000

    Integrate branch of IAccessible2

keep the accessible description, but drop thea accessible name which
is reportedly an undesirable change.

Change-Id: I8f9c53ef967c4e566fde1829832aa035efce4f23
2016-07-27 13:19:03 +01:00
8bb1726007 formally->formerly
Change-Id: I1d631f8dd09193c57b7b65e3202ed080ce15861b
2016-07-27 13:14:17 +01:00
aab21302fa tdf#100755 Extend ODF to allow 0 in fraction
As '0' is now allowed in numerator/denominator
this commit extend ODF to save/load this format

Change-Id: I3bc897dcce5393453acd7a434a21ae305feeb919
Reviewed-on: https://gerrit.libreoffice.org/27263
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-07-27 11:04:04 +00:00
c0f1c0da77 svx lok: avoid SfxViewShell::Current() during constructing a new view shell
Currently when a text edit is started, then in the LOK case if there is
an other view that shows the same page, then both draw views will have
an outliner view showing the text edit. This means that in case a view
shell is created after starting the text edit, that won't have an
outliner view for the text edit.

Before fixing this, calls to SfxViewShell::Current() has to be avoided
when we're in the process of setting up a new LOK view. In case of
Impress, this is a double initialization, and by the time
SdrObjEditView::ImpMakeOutlinerView() is called, we're already in the
process of setting up the second SfxViewShell (as part of
SdXImpressDocument::initializeForTiledRendering()), but
SfxViewShell::Current() still points to the old view shell.  Which means
that the outliner view would refer to a view shell that's deleted soon,
and we crash as soon as it tries to invoke a LOK callback.

Fix this by adding a virtual member function to SdrObjEditView, and
override it in sd, so in case applications want to provide a more
precise way of giving the view shell owning a draw view, then they can.

Change-Id: Ie0005f73237d4ff9cf576bf16fa5b46280f13759
Reviewed-on: https://gerrit.libreoffice.org/27561
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-27 10:07:51 +00:00
508c95f1b6 improve passstuffbyref return analysis
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
Reviewed-on: https://gerrit.libreoffice.org/27317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27 06:48:25 +00:00
d2e4753c3f tdf#75280 Cleaning up of sal_uIntPtr usage #4a
Change-Id: I488baed0ffc3fea9c42bad1647a034cd5e9b28bb
Reviewed-on: https://gerrit.libreoffice.org/27325
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-07-26 15:37:05 +00:00
00a58dfead Need to try to avoid TDR also with NVIDIA cards on Windows 7 or earlier
(TDR is Timeout detection and recovery, was introduced in Vista.)

Change-Id: Ic49629adf7630e61cebcdfcc431ca96ba3fbaf7e
Reviewed-on: https://gerrit.libreoffice.org/27518
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2016-07-26 07:41:38 +00:00
1b7ef90fba opengl: add VCL_GL_WARN to write warnings into api trace file
Change-Id: I416de926a769dccdf1c53072c1f7dda817c5402a
Reviewed-on: https://gerrit.libreoffice.org/27496
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-07-25 14:35:15 +00:00
eb09e512ae basegfx: initializer_list from polygon
Change-Id: I2d6cdb7189217e1fadb1ecf4e11cf4dd04043ec6
Reviewed-on: https://gerrit.libreoffice.org/27475
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-07-25 14:32:09 +00:00
db8ee31829 [GSoC] Fix palette selection in sidebar/toolbar color widget
Remember palette selection after the popup is destroyed

Change-Id: Iecd7fd4aa89cf9d2d6842c5b544d037df6818aaf
Reviewed-on: https://gerrit.libreoffice.org/27474
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-07-25 09:22:12 +00:00
938821fb08 new loplugin overrideparam
verify that parameters on override methods have the same set of default
values for their params as their parent/super-methods do.

Change-Id: Ibdbc1c6e417fbaa680ea025a6bbf5ba9c2e5bcd2
Reviewed-on: https://gerrit.libreoffice.org/27437
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-25 06:09:17 +00:00
15ed9d8100 inconsistent default param vals in SetMaxTextLen
so just remove them, only one call site was using them.

Change-Id: Ife00ad7f14d73f865058d1262f71dff1fd2a6abd
Reviewed-on: https://gerrit.libreoffice.org/27458
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-25 05:46:29 +00:00
8278be9860 Fix typos
Thanks to Carlo Bertoldi for the german translation.

Change-Id: I76f554e757318aed4e28b5a05fae0ba15bd46afb
Reviewed-on: https://gerrit.libreoffice.org/27355
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2016-07-22 21:45:22 +00:00
d7da58ae36 GSoC notebookbar: better default page handling
+ selected default tab page in the Impress
+ the default tab page is set when context isn't supported
+ switching between unsupported contexts is not causing
  switch to default tab to avoid closing of tab which was
  recently used by user

Change-Id: Ieeda8a79e6c67708551351f9bb49d8b006c0e74f
Reviewed-on: https://gerrit.libreoffice.org/27432
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-07-22 15:35:28 +00:00
897189cfc6 sw: add new LOK_CALLBACK_VIEW_LOCK callback
When we're after SdrBeginTextEdit(), but before SdrEndTextEdit(), and
have multiple views, then only the active view paints the edited text,
the other views look like the shape has no text at all.

Add a new callback that exposes the position and size of the rectangle
where the shape text will be painted after text edit ended, so clients
can draw some kind of locking indicator there. This way the rendered
result can differ in the "shape has no text" and the "shape text is
edited in an other view" cases.

Change-Id: I6096479a8a05c2547d15222e6d997b848af02945
Reviewed-on: https://gerrit.libreoffice.org/27441
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-22 15:13:07 +00:00
b949604b91 GSoC notebookbar: file menu
+ added icon to the notebookbar, after click the file menu will appear

Change-Id: I30e1ed7e2c4a194e150c7196652904fd4e5c9e8e
Reviewed-on: https://gerrit.libreoffice.org/27347
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-07-22 08:59:59 +00:00
29c892dfbe sd lok: fix hard to select a full table
It requires a precise mouse down button in the rectangle border bounds
to select a full table, so it has added a tolerance value.

Change-Id: Ia8213ae452f93cd2faa957a50246638d1eb2198e
Reviewed-on: https://gerrit.libreoffice.org/27356
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-07-21 13:30:01 +00:00
45e9ccb699 Remove PatternLB dead code
PatternLB is replaced by SvxPresetListBox in tppattern.cxx

Change-Id: Ie4ec100963b714e07807f8b600cca2e165fb4641
Reviewed-on: https://gerrit.libreoffice.org/27353
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-07-21 06:20:44 +00:00
b0db1f4c79 Make pattern preset preview resizeable
Change-Id: I24e46ca08993cb359eddade72cd9bc4fda4512ff
Reviewed-on: https://gerrit.libreoffice.org/27323
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-07-20 21:52:42 +00:00
83a0ba1207 Add XPatternList to SvxPresetListBox
Change-Id: I39bbf28c4468123c853577f7d7e94d619ec7da3b
Reviewed-on: https://gerrit.libreoffice.org/27324
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-07-20 20:24:47 +00:00
6ea8084487 sd lok: decouple vcl window focus from cursor visibility
The problem was the the blinking cursor was hidden when another vcl
window got its focus, so it wasn't possible to edit two shape text in
parallel in two windows.

The code path is like this:

- show cursor, cursor is created: SdrObjEditView::SdrBeginTextEdit() ->
  OutlinerView::ShowCursor()
- show cursor, focus case: sd::FuText::Activate() ->
  OutlinerView::ShowCursor()
- hide cursor, cursor is deleted: SdrObjEditView::SdrEndTextEdit() ->
  OutlinerView::HideCursor()
- hide cursor, focus case: sd::FuText::Deactivate() ->
  OutlinerView::HideCursor()

So add a new optional bool parameter that allows not emitting the
LOK_CALLBACK_CURSOR_VISIBLE callback in the focus change case.

Also, if we're at it, make sure that painting emits no show/cursor LOK
callbacks.

Change-Id: I1068a1b1f5cd76fd09b5a79066834bfb0daebc77
Reviewed-on: https://gerrit.libreoffice.org/27335
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-20 10:04:50 +00:00
8617010b85 Resolves: tdf#97404 outline space wrong on second level
Revert "tdf#42788: FORMATTING - Numbering/ordered list"

This reverts commit 6517141b6233c5f9667031bc92f66109fddf5b76.

https://gerrit.libreoffice.org/#/c/23006/ was apparently
intended to revert this, but it never was

Then there was https://gerrit.libreoffice.org/#/c/23427/
which was an attempt to improve it but it was abandoned

Then there was https://gerrit.libreoffice.org/#/c/23542/
whichw as another attempt to improve it, but it was too
abandoned.

all of which leaves us worse than when we started with
a pile of unhappy abandoned efforts and cruddy indent

Change-Id: I8b3666a957339030d5a946a2b387f452e7fb0099
2016-07-19 22:33:34 +01:00
3aa52d3682 GSOC - Handling namespace declaration missing case:
initialization parameter to FastParser will turn off
the namespace declaration missing exception. Test cases
have also been given to verify the same.

Change-Id: I4c3e02c7ad92d50e279f895ced53c78fc8f49b91
Reviewed-on: https://gerrit.libreoffice.org/27278
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-07-19 14:17:15 +00:00
90576b9324 clang-tidy performance-unnecessary-value-param in vcl
Change-Id: I0b53c4bf5b4619cde357cf4eb432b153b1f7e6b5
2016-07-19 10:50:07 +02:00
299b937746 sfx2 lok: expose part number in SfxLokHelper::notifyOtherViews()
This way a client can decide if the view cursor it gets is relevant (the
views show the same part) or not.

Change-Id: I7b274b28f0c4f0509df5071831acf50512eff640
Reviewed-on: https://gerrit.libreoffice.org/27311
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-19 08:31:50 +00:00
8624d2c8e3 Resolves: tdf#100731 include palette in checksum
Change-Id: I084d840b9fa078ebea3ff1471d8c8bc88171abc7
2016-07-18 15:33:31 +01:00
1d3ee7663d GSoC notebookbar: don't show empty space for hidden tabs
Change-Id: Ia00f64c1cb5d990e852cc297b6b7bd76df4b1b05
Reviewed-on: https://gerrit.libreoffice.org/27191
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-07-18 08:11:34 +00:00
1bc9a5a909 odd SvxBitmapCtl is used in only one place
Change-Id: I82a4c8f2e36153b0bc59571ce39956637e278fcb
2016-07-18 09:00:06 +01:00
c3addf79d4 nothing inherits from SvxBitmapCtl
Change-Id: Ie1796caf1a53d0beef3ff456f2c4b32213b8977e
2016-07-18 09:00:06 +01:00
76258ecb71 SvxBitmapCtl::nLines is never read
Change-Id: Ib03eb766b1f45247204e64543dbf80c24f8608c7
2016-07-18 09:00:06 +01:00
76ad32bec8 add tagging to ThreadTasks so we don't need more one pool
If more than one place in the code submits tasks to the shared
pool, then waitTillDone() becomes unreliable.
Add a tagging mechanism, so different callsites can wait
on different sets of tasks.

Also try to protect our worker threads against exceptions from
the thread tasks code.

Change-Id: Idde664ab50008d31a2dd73910bb22f50e62ae22f
Reviewed-on: https://gerrit.libreoffice.org/27042
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-18 06:49:09 +00:00
7b2966dbf2 nBufSiz can be a non-class local constant
Change-Id: I2a7d32eabd01622261a1163781ac2a8b64bdee3f
2016-07-16 18:27:18 +02:00
30d722a8f9 Reduce #include dependencies
Change-Id: I5c6c379717869028102ab2a1ae7929dfbc447904
2016-07-16 18:27:18 +02:00
018e89337d Improve loplugin:unnecessaryoverride
<sberg> thorsten, remember what that "TODO" in
 SvxAccessibleTextPropertySet::getSupportedServiceNames was to be about exactly,
 in a909acb7009acadffa53e74ea05ddb88803490f1 ?
<thorsten> sberg: that's a nonsense, prolly copy'n'pasted, or a 'please review
 me'
<sberg> thorsten, OK, thanks (that override will eventually go away with
 loplugin:unnecessaryoverride, and the TODO comment be lost)

Change-Id: Iba964c61768459aac4067bbd4e1f7d4f78f6adac
Reviewed-on: https://gerrit.libreoffice.org/27232
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:08:07 +00:00
6e72f0251b new loplugin unnecessary override
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb
Reviewed-on: https://gerrit.libreoffice.org/27135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:05:41 +00:00
e6d2827fc3 tdf#62525 vcl: use cow_wrapper for PPTCharPropSet
Change-Id: I506688a495ac145a25d2094be48ea53497d1e8a8
Reviewed-on: https://gerrit.libreoffice.org/25914
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-15 07:26:48 +00:00
908449639b let FormulaTokenArray::RemoveToken() return the actual count of tokens removed
Change-Id: Iebf654e7b4c682036b4ff334298948557b755eac
2016-07-14 22:31:20 +02:00
f9021f7eea re-add FormulaTokenArray::ReplaceToken() that was removed as unused, grml..
with 4ff5a5558472beee85eb1234dcc2aa2ed9000f6c

Change-Id: Id99c3ae74515f24c55a3734698c560dcac8bacd9
2016-07-14 22:26:25 +02:00