Commit graph

431076 commits

Author SHA1 Message Date
Stephan Bergmann
e8e3b00baf Require at least gperf 3.1, which no longer emits "register"
...as discussed at
<https://lists.freedesktop.org/archives/libreoffice/2018-November/081435.html>
"minutes of ESC call ..."

Change-Id: I47b6d4a7b8370262ca942b4385e2c0e6f0adc613
Reviewed-on: https://gerrit.libreoffice.org/63953
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-28 12:07:44 +01:00
Stephan Bergmann
09b8d1f480 Require at least flex 2.6.0, which no longer emits "register"
...according to <https://github.com/westes/flex/blob/
83d5d1695a2ab1d69ea4d8e7df27146c644876fc/NEWS>.  Its use is no longer allowed in
C++17, so will start to cause build failures once we restrict builds to at least
C++17.  (The situation with gperf is similar, but instead of checking for a
minimal known-good version that no longer emits "register", we instead check for
it indirectly in configure.ac, by creating gperf-produced conftest.inc and
including that in the program used to test which -std= value to use.  We could
have done something similar for flex, but creating suitable flex output for
inclusion might be more work than it was for the simple gperf case.)

Change-Id: I662c6795ea5fde1420d9712c0ec910c0cadbc350
Reviewed-on: https://gerrit.libreoffice.org/63713
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-28 12:07:13 +01:00
Noel Grandin
9c56e63c43 -Werror=unused-but-set-variable
after
	commit 19c56b3bef
    loplugin:unusedfields in sw

Change-Id: I67314e86695a399fd211a64bdcf4cc3f18ca133d
2018-11-28 12:34:27 +02:00
Sabri Unal
9574dea627 Related: tdf#121629: Some menu items do not follow the Title Case rule
Change-Id: I6b071365ee1531c3ddba70a25e36d6bd98561ffc
Reviewed-on: https://gerrit.libreoffice.org/64135
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-11-28 11:00:42 +01:00
Olivier Hallot
ab641e7847 Update git submodules
* Update helpcontent2 from branch 'master'
  - tdf#121797 XHP extensions (Help part)
    
    WIP. This is the Help part.
    
    Extend the XML parser to include new incantations of the <paragraph>
    tag, namely
    <h1> to <h6>
    <note>, <tip> and <warning>
    
    Extension to the <item> tag:
    <menuitem>, <input>, <literal>, <widget> and <keycode>
    
    * removed test files
    
    Change-Id: I2a473ee8772606f5e84bb02e651bccc6749598f4
    Reviewed-on: https://gerrit.libreoffice.org/63954
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-11-28 10:53:51 +01:00
Olivier Hallot
1079385557 tdf#121697 XHP extensions
This is the core part of the bug, and is WIP

Extend the XML parser to include new incantations of the <paragraph>
tag, namely
<h1> to <h6>
<note>, <tip> and <warning>

Extension to the <item> tag:
<menuitem>, <input>, <literal>, <widget> and <keycode>

Change-Id: Idaed321cc8756fa6bcf4fbc170982365ff33d4d7
Reviewed-on: https://gerrit.libreoffice.org/63955
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-11-28 10:53:20 +01:00
Olivier Hallot
df22ca830c Update git submodules
* Update helpcontent2 from branch 'master'
  - tdf#121736 initial Help pages for Python scripts
    
    Work in progress, initial addition of help pages for python
    scripts in LO.
    
    Change-Id: Iee95b1340c821fdb08524fdedeca3817b0de1459
    Reviewed-on: https://gerrit.libreoffice.org/64137
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-11-28 10:48:08 +01:00
Thorsten Behrens
3588c6c5cc slideshow: get unit tests to work again
Change-Id: I7b5c7a20677ac0f720b41daf8ca59c3cc94f1283
Reviewed-on: https://gerrit.libreoffice.org/59964
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-11-28 10:09:32 +01:00
Noel Grandin
ae25d5d3a3 loplugin:unusedfields
Change-Id: Iffbb4e7107a0b1ae35c879c193a9ec209addf453
Reviewed-on: https://gerrit.libreoffice.org/64144
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-28 10:00:01 +01:00
Caolán McNamara
6db4b97ee1 Resolves: tdf#121695 call save_value
so get_value_changed_from_saved detects no-op

Change-Id: I2b72bc7a6bc4093f9d942aa56f90542521e23cd9
Reviewed-on: https://gerrit.libreoffice.org/64130
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-28 09:47:24 +01:00
Noel Grandin
19c56b3bef loplugin:unusedfields in sw
Change-Id: I7a9184511df96bf2a6c40e39091010a7e2974ed6
Reviewed-on: https://gerrit.libreoffice.org/64143
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-28 09:35:24 +01:00
Caolán McNamara
f913bdf712 tdf#90333 Dictionaries Path Cannot Be Changed
PathSettings::impl_storePath wants to be able to nil the Dictionaries
path in the old copy of properties

Change-Id: Id579914cfa8b459efce962d304e2f9d6185bd55f
Reviewed-on: https://gerrit.libreoffice.org/64115
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-28 09:28:58 +01:00
Miklos Vajna
099f481d36 sw RtfStringBufferValue: make members private
Change-Id: I82f8e96901312e91bbc9a2b5c93bea02e180e907
Reviewed-on: https://gerrit.libreoffice.org/64133
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-28 09:06:36 +01:00
Miklos Vajna
aedc5427e4 oox smartart, accent process: handle followSib axis of forEach
Currently the accept process document creates 0 connectors. Instead, it
creates empty custom shapes: this commit fixes the loop, so that only
one of them is created.

The whole purpose of the follow sibling axis is that N - 1 connectors
are created for N shapes, not N connectors.

Change-Id: I54244c7615b83f607ef53a4ff8d01d3c9594856e
Reviewed-on: https://gerrit.libreoffice.org/64122
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2018-11-28 09:06:24 +01:00
Noel Grandin
3abf4b91da loplugin:unusedmethods
Change-Id: Idbdf2d5d12fad894a3dfc3a86cae839502f42cf6
Reviewed-on: https://gerrit.libreoffice.org/64114
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-28 08:27:56 +01:00
andreas kainz
b15b1a2a90 Colibre icons: add impress Slide tab icons
Change-Id: Ia3d035d827c0f1b510f9ff3be8652f5bac69cead
Reviewed-on: https://gerrit.libreoffice.org/64136
Tested-by: Jenkins
Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-11-28 06:53:58 +01:00
Michael Meeks
da3432a0a8 Use HiDPI scaling to load scaled images.
We render these at apparently the same pixel size as normal images,
but the underlying canvas is larger so these then end up pixel-matching
the true underlying grid.

Change-Id: Ic4b749127e9c81da78d06b34d9f88c5635dc64b9
Reviewed-on: https://gerrit.libreoffice.org/64044
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-11-27 21:33:35 +01:00
Caolán McNamara
0f25a3c36f weld DataSourceDialog
Change-Id: I4d3eb8aa354043d3ff57b4996db7b28ad25e0262
Reviewed-on: https://gerrit.libreoffice.org/64072
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-27 21:10:52 +01:00
Caolán McNamara
471d6c3653 enable hiding gtk dialogs without ending their dialog loop
we need this to support reshowing dialog after an intermediate
range selection dialog executes

Change-Id: Ib6575e5d852bd1d29cc1a791a5dc2c19949b67a0
Reviewed-on: https://gerrit.libreoffice.org/64100
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-27 21:10:02 +01:00
Caolán McNamara
92c34111dd Related: tdf#94446 set parent for dialog
Change-Id: I174ec605f40e7cafbcb44e492941dfc36a4df3f2
Reviewed-on: https://gerrit.libreoffice.org/64120
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-27 21:09:13 +01:00
Caolán McNamara
e61dec64f8 Related: tdf#94446 don't assert on unsetting focus handlers
Change-Id: I7817f66974807eaf7d16a6d0dc30b4fbd6d366a5
Reviewed-on: https://gerrit.libreoffice.org/64118
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-27 21:08:38 +01:00
Stephan Bergmann
978a8357b2 Remove --enable-c++17 option
...reverting 0f3b0ec973 "Avoid C++17 mode for
Coverity Scan".  As far as I understand,
<https://lists.freedesktop.org/archives/libreoffice/2018-November/081454.html>
"New Defects reported by Coverity Scan for LibreOffice" has been run against
dd0e684929 "Temporarily drop --disable-c++17 from
Coverity builds" but doesn't let issues like the one discussed at
<https://lists.freedesktop.org/archives/libreoffice/2017-November/078966.html>
"Re: New Defects reported by Coverity Scan for LibreOffice" reappear.  So
disabling C++17 for Coverity Scan builds appears to no longer be necessary.

Change-Id: I22bfd9ad61da00e942a87aa5e1e0d1fab0004d49
Reviewed-on: https://gerrit.libreoffice.org/64121
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Jenkins
2018-11-27 20:43:06 +01:00
Noel Grandin
0d4298a988 loplugin:unnecessaryvirtual
Change-Id: I3e6424e10eade04951f8ab24bb61af4ce19d1204
Reviewed-on: https://gerrit.libreoffice.org/64113
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 18:43:53 +01:00
Noel Grandin
75dd5d2e73 add EvaluateAsInt compat function for latest clang
the old EvaluateAsInt method has been dropped as from current clang

Change-Id: Ie30d1547ad8de777badff4b380d2fc9fb261e8fe
Reviewed-on: https://gerrit.libreoffice.org/64107
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 17:16:05 +01:00
Stephan Bergmann
ecdf05d1b9 missing declarations/includes
Change-Id: I3a9b99011467bdfe34825da24ffdf9179a3bb194
2018-11-27 17:11:45 +01:00
Rizal Muttaqin
42827b2940 KJ+elementary: Sync with Colibre
Change-Id: I1d569983551d27b59fccfab84c0fc7b6bd86dc77
Reviewed-on: https://gerrit.libreoffice.org/64098
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
2018-11-27 16:24:42 +01:00
Tor Lillqvist
6fcf55e293 Prepare to bundle the Liberation fonts with the iOS app
The way the iOS app is built (over in the online repo), any
"resources" to be included need to be copied into the
workdir/CustomTarget/ios folder.

Change-Id: Ibac15b03dc447d6649e03404fe9a68ef3b4881b9
2018-11-27 16:07:27 +02:00
László Németh
f006b6339e tdf#112195 Writer: page background covers whole page
as in ODT implementation of Google Docs, and as in DOCX
supporting basic requirements of creating digital and
professional print media. This patch fixes DOCX import
(tdf#121668) and it gives the required PDF export, too.

In the case of solid color, color gradient, hatching,
pattern and tiled bitmap (except stretched bitmap),
this patch removes the obsolete white border around
the text area, if the user modifies the page background.

Note: likely the white border was good for home printing
in former times, but now it forms only a serious
barrier for most users to create de facto design
standard whole page background formatting instead of
its unacceptable poor man's version.

Note 2: the OpenDocument standard refers XSL/CSS here,
and browsers adapt background settings to the body margin
area the same way, as Google Docs and fixed LibreOffice do.

More information:

tdf#112195 "(Whole-Page-Filling) - Allow page background to cover the
whole page (reloaded)"

tdf#33041 "Allow page background to cover the whole page, not only
within page borders/margins"

tdf#121668 "FILEOPEN DOCX Page Color created with Word disappears on the
margins"

ooo#9370 "Off-margin page background"
(https://bz.apache.org/ooo/show_bug.cgi?id=9370)

Change-Id: I7c6c96ceaf7102b38e3e5c1ed767db0ee63520ab
Reviewed-on: https://gerrit.libreoffice.org/63914
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
2018-11-27 14:44:59 +01:00
Noel Grandin
7a581b977e remove unused BorderWindowStyle enum value
Change-Id: I05ae398b75bbafe9b144a90e6735cf7d5e532ce4
Reviewed-on: https://gerrit.libreoffice.org/64097
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 14:42:22 +01:00
Noel Grandin
dac1ff8b23 convert treeview::TVDom::Kind to scoped enum
Change-Id: Ia505df60f5758d40dd55bc5b24886fd8aec327ce
Reviewed-on: https://gerrit.libreoffice.org/64092
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 14:42:02 +01:00
Noel Grandin
b6449c65da remove unused EEControlBits enum value
Change-Id: Ic363903bb6e32c029f5aac6810f69d590df1bf79
Reviewed-on: https://gerrit.libreoffice.org/64091
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 14:41:41 +01:00
Noel Grandin
7290ce233d remove unused EVControlBits enum values
Change-Id: I4e10f0a2f40f9e7b6cc40a810468f43b2ab97aa9
Reviewed-on: https://gerrit.libreoffice.org/64090
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 14:41:22 +01:00
Noel Grandin
f691472b6c remove unused SfxObjectShellFlags enum values
Change-Id: I945047c0955bc66602d1a5033197a7405a69a8d3
Reviewed-on: https://gerrit.libreoffice.org/64089
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 14:41:06 +01:00
Noel Grandin
3145a03d14 remove unused GraphicsStateUpdateFlags enum values
Change-Id: I1a83c897d93a29d38aebccdba33be7b70592922e
Reviewed-on: https://gerrit.libreoffice.org/64096
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 14:04:45 +01:00
Noel Grandin
a4a98dd035 remove unused SfxViewShellFlags enum value
Change-Id: Ie754752203dcb066c69dff6effb835d7e1db1753
Reviewed-on: https://gerrit.libreoffice.org/64088
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 13:56:13 +01:00
Noel Grandin
4a68aec049 remove unused enum storeAccessMode value
Change-Id: I88a53e285cc3e8b6cc1c67b1e56322a918554de6
Reviewed-on: https://gerrit.libreoffice.org/64087
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 13:55:19 +01:00
Noel Grandin
3dba3a2984 remove unused BrowserMode enum values
Change-Id: I46eb4145bd79253c1c20b7a03d82b6873402d9ac
Reviewed-on: https://gerrit.libreoffice.org/64086
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 13:54:59 +01:00
Noel Grandin
1fb4a21198 remove unused SvxIconViewFlags enum values
Change-Id: I31f810383fb92b2d0dbe9fa9162b77f137154e91
Reviewed-on: https://gerrit.libreoffice.org/64085
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 13:54:09 +01:00
Noel Grandin
fb56de2ef7 remove unused RulerBorderStyle enum values
Change-Id: I4f10e323293485e7a1969fd4c80873aa05971e6c
Reviewed-on: https://gerrit.libreoffice.org/64084
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 13:53:26 +01:00
Noel Grandin
e54d65dea8 remove unused SvxLanguageListFlags enum values
Change-Id: I89a6244c01be811bfdfc443f687708ed6aec8a10
Reviewed-on: https://gerrit.libreoffice.org/64083
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 13:53:07 +01:00
Michael Meeks
bc8e23fc94 Add explicit API scaling via ImageTree API.
Also add image scale to in-memory cache lookup.

Change-Id: I1e84b922d4a9ab2f1723c5cb8a72f295c6940504
Reviewed-on: https://gerrit.libreoffice.org/64043
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-11-27 13:16:38 +01:00
Michael Meeks
a71ea5ceff Preserve stock images until render time.
This allows us to choose to render HiDPI images at the right time,
when we have the DPI of the device to render to.

The first step in a better, and more industry standard way of
improving our UI for HiDPI via rendering level scaling that should
retain a consistent look across the app with many fewer changes.

Change-Id: I36681f3242cb650de4f0b2d0fcdffbe5618e30fc
Reviewed-on: https://gerrit.libreoffice.org/64040
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-11-27 13:09:33 +01:00
Caolán McNamara
3f2ac501e6 tdf#121713 give filter a name
Change-Id: Ia1a45e7292a61efd21c4a7351af1a681b92e886e
Reviewed-on: https://gerrit.libreoffice.org/64077
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-27 12:30:03 +01:00
Caolán McNamara
b4111e9ba3 improve chart type dialog treeview width
Change-Id: I41a053f63db6bced24dd6586e2c347d286339c29
Reviewed-on: https://gerrit.libreoffice.org/64071
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-27 12:29:51 +01:00
Thorsten Behrens
56f276592d vcl: fix gtk debug code
Change-Id: I940e1ae01ec384069cf2704fdc81b7561e9f8d63
Reviewed-on: https://gerrit.libreoffice.org/64094
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-11-27 11:41:48 +01:00
Bartosz Kosiorek
f54c76e1ef tdf#121648 EMF+ Fix displaying DrawDriverString record
With introduing String rotation support
I made mistake by not removing Maping from DX-Array.
With this commit I'm fixing that issue.
Now drawing with DrawDriverString record,
and rotation is working perfectly.

Change-Id: I7ae051b3791d9d2d8e2143ed33d21b7bfbc551c6
Reviewed-on: https://gerrit.libreoffice.org/64079
Tested-by: Jenkins
Reviewed-by: Patrick Jaap <patrick.jaap@tu-dresden.de>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-11-27 11:34:57 +01:00
Armin Le Grand
d464d505fb Refactor calc non-linear ViewToDevice transform
This change solves the non-linear World-To-View trans-
formation that calc uses due to it's screen rendering
as good as currently possible (AFAIK).
Calcv view  is layouted on pixel base (due to better
homogen distances and full pixel lines between cells),
but this leads to having a non-linear transformation
between discrete units (pixels, view) and model coordinates
(World). In principle, each cell has it's own (so called)
ViewTransformation -> the position on screen depends on
the mappings of all cells top/left from it. This is
obvioulsly non-linear and can sometimes be seen by
producing 'offset' errors when many cells (small and thin)
are shown in low zoom stages.
No better solution for this comes to mind easily. The
extremes are - on the one hand AntiAliasing the whole
calc edit view and accept 'unsharp/AAed' lines - on the
other hand what we have now.
Maybe a future solution could find a mapping that gets
close to linear mapping for the full view. On the long
run this state is hard to keep correct. Even with this
extended solution the mapping of SdrObjects spawning
mutiple cells is assumed 'linear' in that area - which
is in reality currently not the case (!)
Note: This is only true for the screen visualization,
print and/or PDF export do not do that pixel-based
layouting.
Note2: This mechanism is general in DrawingLayer (look
for '.*GridOffset.*'. If it is deactivated by providing
no offsets, the result is the unchanged, linear mapping.

First step: Add interfaces to get a possible GridOffset
at ViewObjectContact. There it belongs, we have a view-
dependent offset per object and view. Add mechanisms to
create on-demand and reach back to the view (aka calc's
derivation of it).

Second step: Implement the on-demand creation, adapt to
use it in ViewObjectContact::getPrimitive2DSequence, add
stuff to reset on zoom change, disable temporarily old
mechanism -> paint already works. Need to adapt the
places from old mechanism where the GridOffset was used,
but no longer the geometry creations.

Third step: Isolated and disabled old mechanism (by
already removing SetGridOffset). Marked all places that
possibly need change with '//Z' tag. Main work now will
be to adapt in the SdrView implementations in svx to know
about having a SdrObject-dependent ViewTransformation
at all (currently not known, was hard-coded at some places
from the old code, ViewTransformation set as MapMode at
a target OutputDevice, not member at SdrView at all...).

Fourth step: Adapt the Handles and OverlayObjects to
use an evtl. existing GridOffset. The mechanism is that
the SdrHdl(s) can be seen as 'Model-Objects', these get
converted to OverlayObjects in the ::CreateB2dIAObject()
implementations, for all SdrMarkView and SdrPageView,
so this is the place where the ObjectContact is known
(the SdrPageWindow *is* a ObjectContact) and the view-
dependent GridOffset can be calculated per SdrObject.
I modified OverlayObject to be able to work with a
set Offset that embeds the created visualization using
this additionally.
Handles get now correctly set and have a working HitTest
(due to that already using the primitives). Some inter-
action stuff already working, some will need more
adaption. We simply have no concept for this stuff...
Refactored to not get dependencies to SdrObject in
ObjectContact.

Fifth Step: Make HitTest work by adding the View-And-
Object dependent GridOffset in the View when HitTest
is triggered. This is in SdrMarkView::CheckSingleSdrObjectHit
where pObj->GetCurrentBoundRect() is used that gets the
view-independent form. To make HitTest work, add a possible
GridOffset.
Since this will be necessary more often in SdrView hierarchy,
added a tooling method (getPossibleGridOffsetForSdrObject)
at that level after checking that at that level will be
reachable at all potential spots.
Inside that method the correct ObjectContact will be identified
and the object-specific offset requested there.

Sixth Step: Adaptions and started some cleanups. Still some
adaptions needed:
- After creation of new object, need to relocate from
  used GridOffset setting to WorldCoordinates
- Interactions, e.g. start with dragging handles or full
  object/points

Seventh Step: React on EndCreateObj. Here, the created
SdrObject is in model coordinates and needs to be adapted
to evtl. GridOffset. This is 'tricky' due to calculating
the possible offset based on new coordinates 'close'
to the target position, but may be in the wrong cell.
Nonetheless this is the best we can do here.
Last (hopefully) missing are now all interaction
viszualizations. They already work and are applied
correctly, but wrong visualized.
Have taken the time to unify adding OverlayObjects for
selection visualization to OverlayManager, see
handleNewOverlayObject. This does all needed when adding
OverlayObjects in one place where the GridOffset can
also be handled. It makles things more safe - not possible
to forget one of the three steps for others.

Eighth Step: Do the same unification for creating the
OverlayGeometry, also rename methods to make usage more
clear. We now have
  SdrHdl::insertNewlyCreatedOverlayObjectForSdrHdl
  SdrDragMethod::insertNewlyCreatedOverlayObjectForSdrDragMethod
which can do the needed GridOffset changes centralized.
Needed to get a ObjectContact for this at SdrDragMethod,
so adapted ::CreateOverlayGeometry implementations
accordingly. Missing is now the implementation in
insertNewlyCreatedOverlayObjectForSdrDragMethod to add
the GridOffset - if used. This has no SdrObject at this
time, so we will need a fallback to do the same using a
Range (Rectangle). The stuff doing this for SdrObject
already has a fallback and is based on using the Rectangle
from the SdrObject anyways, so this will be possible.

Ninth Step: Cleanup of old stuff (no more //Z), adapted
some usages of OverlayObject creations to use
getViewIndependentPrimitive2DContainer instead of the
view dependent parts so that offset applied to
drag-overlays is correct and not already added. Adapted
insertNewlyCreatedOverlayObjectForSdrDragMethod to use
calculateGridOffsetForB2DRange. Use now that instead of
SdrObject-based approach in calc - is more generic.
Getting closer, but still not complete - there is an
error with dragging the grepped handle somehow - the
offset for drag is somehow wrong.

Tenth Step: Corrected that offset error. Of course at
interaction start and progress (move) the coordinates
are in GrifOffset coordinates and need to be corrected
to Model coordinates. Done that at ::BegDragObj and
::MovDragObj, works well.
Of course there are exceptions for the crop-handles, so
needed to add setting the correct parameters at SdrHdl
when these got created, then all works as expected.

The strategy is to *not* change the model data itself
in any way, instead do all changes/adaptions in the
view-only code. This has minimal impact and is needed
due to having a 1:n relationship between model and
views anyways.
There are two directions: All visualizations are adapted
to take the GridOffset into account (SdrObjects, overlay,
handles, InteractionObjects, ...). In the other direction
input like MousePosition is in principle in calc EditView
in 'GridOffset'-coordinates and needs to be mapped back
before usage.

Change-Id: I2ecdd409def96a7248a26a65a22e59eb962880a0
Reviewed-on: https://gerrit.libreoffice.org/64057
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-11-27 11:33:10 +01:00
Michael Stahl
3e1e2b6687 gbuild: MacOSX: use tr instead of sed for newlines
At least on tinderbox MacOSX-x86_64@49-TDF the sed appears to ignore the
literal newline character, which is unfortunate, particularly since it
worked on the Jenkins builder.

Blind fix to replace this with a tr invocation that already appears to
work in Zip.mk.

Change-Id: I7a77e69774b050a018b12c73ddd9eff849c33a86
2018-11-27 10:40:40 +01:00
Gabor Kelemen
8067be0721 tdf#42949 Fix IWYU warnings in include/vcl/[f-h]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ice2eb8c5994bf2ccb88972332ca4a1d3ed41752a
Reviewed-on: https://gerrit.libreoffice.org/63826
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-27 10:35:30 +01:00
Noel Grandin
876463415a remove unused SdrSearchOptions enum values
Change-Id: I0a8867399699d1c5ce17c2e5dadf96510246f173
Reviewed-on: https://gerrit.libreoffice.org/64067
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 10:18:12 +01:00