summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2017-09-18loplugin:unusedfields in SvxPixelCtlNoel Grandin
aLineColor is unused since commit fa1807ad5457d10f8fa073c209a27547e8922c8c Date: Thu Aug 27 21:18:58 2015 +0300 tdf#93558 Hardcode black text on white background Change-Id: Idadfa926808568195256c7ea7ac92d71533fe9a9
2017-09-18svx: Assert that GetMarkedSdrObj() cannot be null hereTakeshi Abe
as such invalid ones have been removed already in advance. This could come togeher with c0e9968b4bbda9563213589bcb0472f8797bb553. Change-Id: I914031390d13dd4ad91d2ead61db7f2d53c78004 Reviewed-on: https://gerrit.libreoffice.org/42365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-17fix leak on exceptionsCaolán McNamara
Change-Id: I88201acb472dbdb2c3b49945b962c5f2689d3bae Reviewed-on: https://gerrit.libreoffice.org/42376 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-15borderline: Extended decomposeArmin Le Grand
Decompose of BorderLinePrimitive2D extended to take care of non-perpendicular line endings for matching. Improved matching, one error in calc fixed Change-Id: I869a75385711b58e6725daba0f22be8a98158ad9
2017-09-15borderline: Fixed PatternScaleArmin Le Grand
The applied PatternScale factor was not consequently used in svx::frame::Style so that the Previews in the Dialogs look weird. Fixed that and stumbled over Writer applying it's own scale which then was leading to double scaling, ceaned that up. Change-Id: I89f41bfd7884e5e743080301e219491e215054c3
2017-09-15borderline: extended the expand logicArmin Le Grand
Extended and checked the expand logic for creating the line extends. Now creating quite the right lines, will need to check some speccial cases. Also some cleanups. Change-Id: I3a3bd4d23c7017ecd873147df2d93af61de39fa6
2017-09-15borderline: Added merge BorderLinePrimitive2DArmin Le Grand
Added BorderLinePrimitive2D merges for Writer and fixes.
2017-09-15borderline: merge redefined, mirrored StylesArmin Le Grand
Redefined merge of BorderlinePrimitives, removed old Writer stuff for it. Also added support for handling Styles mirrored for extension calculations.
2017-09-15borderline: Adapted BorderLinePrimitive2D and usagesArmin Le Grand
Big changes to BorderLinePrimitive2D and BorderLine, freeing it from one/three entries, going to a free definition using gaps with width but without color. Adapted usages and creation, not yet tested much Change-Id: Ic1255a790401901c3166d200205bc23322b37185
2017-09-15borderline: Adapt ViewContactOfTableObjArmin Le Grand
Adapted to usage of svx::frame::Style helpers for primitive creation, need much less SvxBorderLine classes and less overhead. Class SdrBorderlinePrimitive2D completely removed. Working on Array::DrawRange to get it using the Coodinate Systems which are available and include the rotation. Solved problems in BorderLinePrimitive creation in DrawRange and DrawArray by completely restucturing these. Also changed to now return a sequence of primitives to the caller instead of handing over a primitive renderer and using it for each single primitve. This is a preparation for later buffering these and not re-create for each paint. Have now a working version that uses the Cell used by the Style and creates all info on the fly, so that the correct coordinate systems will be used. Works in Calc and it's dialogs with one or multiple cells.
2017-09-15borderline: Adapted Writer to use CreateBorderPrimitivesArmin Le Grand
Also further refined svx::frame::Style, some more cleanups in svx using CreateBorderPrimitives, got rid of one implementation of CreateBorderPrimitives Change-Id: I4c2481181df4fc4aa0dbb4cb9f4352066b9d8ec0
2017-09-15borderline: move geometry creation to linear algebraArmin Le Grand
Adapted Array::DrawRange to Style/Vector usages, feeding new CreateBorderPrimitives method. That one roughly feeds the old implementations to test and check (and keep working) Change-Id: I09557f826cd023d27db6b53e53aa69c149308711
2017-09-15borderline: Preparing further to use CellCoordinateSystemArmin Le Grand
Multiple cleanups, made svx::frame::Style a std::shared_ptr class, preparing basing all border stuff on transformations, so it will need a CellCoordinateSystem. Added stuff to get this Coordinate System from the svx::frame::Cell using the Frame and knowledge about ownerships Change-Id: Ic2cb59cc92e648ac2fef72f22f8913479769d3e2
2017-09-15borderline: Abstraction of BorderLinePrimitiveArmin Le Grand
As preparation for more detailed definition of BorderLine primitives I have adapted the BorderLine definition to work with motre possibilities to define the LineStartEnd definitions in a BorderLineExtend class. That one is flexible to hold all kinds of definitions - from none to all four possible extends (Start/End, Left/Right of vector) Cleanup of DiagStyle and others: DiagStyle is not needed anymore due to no longer using angles calculated, but being based on vectors defining the geometry. Also cleaned up quite a bit of no longer needed calculation stuff for the control.
2017-09-15convert SdrMeasureFieldKind to scoped enumNoel Grandin
Change-Id: I8896d46623843d3fe341c057d7ee0376a99f4741 Reviewed-on: https://gerrit.libreoffice.org/42310 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-15long->sal_Int32 in FractionNoel Grandin
because long is 32bits on Windows and 64bits on Linux. Reasoning: (a) all the users of Fraction used to be 32bit in the past (b) this makes the Linux code behave the same as the Windows code (c) changing it to 64bits would be dangerous because then call sites could see silent truncation. Change-Id: I2a36200623a3cf2e7d62ccad030a20614e1798fb Reviewed-on: https://gerrit.libreoffice.org/42200 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-14improve redundantcast lopluginNoel Grandin
to find c-style casts where the expression is a templated method Change-Id: Ifbd1e2cdc72d906fc95a7ec0f9408c3f6d2a836b Reviewed-on: https://gerrit.libreoffice.org/42275 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-14convert SvxCellOrientation to scoped enumNoel Grandin
Change-Id: Ia4c75c6394b47805f24a7daca593e0074a8ddf0b Reviewed-on: https://gerrit.libreoffice.org/42268 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13svx: Simplify SdrHelpLineList with std::unique_ptrTakeshi Abe
This also kills no longer used SdrHelpLineList::GetObject(). Change-Id: I6e08e44214657c536717e96693c89104d7118cfd Reviewed-on: https://gerrit.libreoffice.org/42234 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-13no need to call GetNumerator() / GetDenominator() for FractionNoel Grandin
simplify the calculations - why have a Fraction and then just split it up for the calculation? Change-Id: I81af95e1ee1633f77e088c0990f308b1c169a6a2 Reviewed-on: https://gerrit.libreoffice.org/42242 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13Fraction: make conversion operators and constructor explicitNoel Grandin
and simplify some of the calculations that needed to be changed. Which resulted in one unit test needing to change by one pixel, let's hope not an indication of a real problem. Change-Id: Ie56434f35f4e58d21ee6f671392e93dc7542fca3 Reviewed-on: https://gerrit.libreoffice.org/42240 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13clang-tidy modernize-use-emplace in svxNoel Grandin
Change-Id: I52f062bf0b4c1af44576546d0593699758d71084 Reviewed-on: https://gerrit.libreoffice.org/42232 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-12listening to modify is sufficient to get all changesCaolán McNamara
Change-Id: Ic6872ec80cc4a36192fe23f9abf76c4fa10b94bd Reviewed-on: https://gerrit.libreoffice.org/42213 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-12Resolves: tdf#106163 MouseMove/MouseLeave from crossing not mirrored in rtlCaolán McNamara
but we do mirror the event for normal mousemove, this looks like the real bug here Change-Id: I178d53f5f40dbd075984019e25e6d7665b6cdf87
2017-09-12Resolves: tdf#106163 safe fix for wrong final row/col selection in rtlCaolán McNamara
Change-Id: I773de03768b0a5b28e6b4f63bd65dd270dc975cd Reviewed-on: https://gerrit.libreoffice.org/42197 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-11Clean up SvxSwFramePosString::GetStringStephan Bergmann
...after 2687a5aca143c53c364cb44993ca601b8dd1c65e "-Werror,-Wtautological-compare with latest clang". Even with a compiler that chose int as the underlying type of StringId, eId could only be negative after UB has happened elsewhere, but nevertheless keep checking for it in the assert (which is a macro in which -Wtautological-compare is apparently disabled with recent Clang trunk at least). Change-Id: I448c6d48e9f84ef84089f4735776b6a66599dc67
2017-09-10iOS, avmedia library depend on autogen flag.jan Iversen
Disabled linking of avmedia if not present. Change-Id: Id64192ec8172d4388b3624b5f832a90f7af1179c
2017-09-10Fix double free since 030273e2e28ef9c4d2118ca3851c64498dfe000aTakeshi Abe
Change-Id: I426b0a6cdc11d3dc8660a440b3e5be9cb198d710 Reviewed-on: https://gerrit.libreoffice.org/42129 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-09tdf#111894: fix leak memory with PaletteManager with SvxColorListBoxJulien Nabet
m_xColorWindow is made with m_xPaletteManager so reset this last one before disposeAndClear first one By tracing constructor/destructor of PaletteManager, it seems there's no need to call m_xColorWindow.disposeAndClear() in SetSlotId. Change-Id: Ib3c236f8fd7fd12aaa86389f5c4c26fe58ba833e Reviewed-on: https://gerrit.libreoffice.org/42121 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-08-Werror,-Wtautological-compare with latest clangNoel Grandin
Change-Id: I073f1893b759f8d31a24187f542b031b86dc4b8a error: comparison of unsigned enum expression >= 0 is always true [-Werror,-Wtautological-compare] Reviewed-on: https://gerrit.libreoffice.org/42103 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-08clean up SdrDragStatNoel Grandin
- some light formatting in the header file - change aPnts from std::vector<Point*> to std::vector<Point>, no point in dynamically allocating a small value class - rename aPnts -> mvPnts - use std::unique_ptr for userdata - rename pUser to mpUserData - change some methods protected->private, since nothing external is using them Change-Id: I7a3f4c30c60ae1be3713f460fe65de95bed2f124 Reviewed-on: https://gerrit.libreoffice.org/42102 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-08svx: Make SdrDragStatUserData's dtor pure virtualTakeshi Abe
to clarify that it is an abstract base class, and to avoid memleak when deleting derived instance as pUser in SdrDragStat::Clear(). Change-Id: I39670841fda1ea3c45698585ce50aec944e0d4ab Reviewed-on: https://gerrit.libreoffice.org/42097 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-08set parent for file dialog helperCaolán McNamara
Change-Id: I3994ee48dcb5b2732cb27cb9ccb54926abf0828a Reviewed-on: https://gerrit.libreoffice.org/42048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-06Don't run the OLEObjCache timer for an empty cacheJan-Marek Glogowski
Change-Id: I210f6bdec14491bea6d15bca133011059091f21b
2017-09-06svx: Simplify code with std::unique_ptrTakeshi Abe
Change-Id: I6f22417edc70812c64f7b4a9c6d59947059db414 Reviewed-on: https://gerrit.libreoffice.org/41971 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-06loplugin:unnecessaryparen include case statementsNoel Grandin
Change-Id: I79fb3eec0d5d466e33b2e18621a7169695edf82f Reviewed-on: https://gerrit.libreoffice.org/41920 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-05tdf#112199 Fix and extend enabled state for items in find toolbarJim Raykowski
Fixes bug that sets enabled state for 'Find Next' and 'Find All' instead of the intended 'Find Previous' and 'Find Next'. Adds the same enabled state dependency to 'Find All'. Change-Id: I01d4f0effaa343e1498d9610755b256761dacfd7 Reviewed-on: https://gerrit.libreoffice.org/41264 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb Reviewed-on: https://gerrit.libreoffice.org/41874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-03iOS, avmedia lib not usedjan Iversen
Change-Id: I13636250552211fa53039178851a64b9e2715cef
2017-09-03svx: Fix memleak at early returns from SvxXMLXTableExportComponent::saveTakeshi Abe
Change-Id: Ic6da38a47f2c2f2e350a15bad2b2731ed12409a9 Reviewed-on: https://gerrit.libreoffice.org/41853 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-02svx: Simplify code with std::unique_ptrTakeshi Abe
as SdrPathObj owns mpDAC. Change-Id: I3e4411046fa55ae8ffae2da5e406ad7d20a7ca6e Reviewed-on: https://gerrit.libreoffice.org/41818 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-01svx: add mutex guards to SvxFmDrawPageMichael Stahl
These trigger asserts that were added in previous commit. Change-Id: I78f0768c0dc9e035f3bff633560be936a2a1e487
2017-09-01tdf#111970 svx: use SolarMutex for locking in FmXFormShellMichael Stahl
FmXFormShell has a confusing mess of 3 of its own locks plus some SolarMutexGuards in a couple functions. But despite all that, most members are accessed without any locking. First, add a "_Lock" suffix to all (non-API) functions that access members or call into VCL, then add SolarMutexGuard in all API entry points that call _Lock functions, and finally remove the existing silly mutex members. This should also fix the reported assertion (which probably doesn't happen on master any more since the Scheduler has its own mutex now). Change-Id: I215cdfe49ffe675229baa4b19ab419f440f0ffb0
2017-09-01bump FileDialogHelper to XFilePicker3Caolán McNamara
Change-Id: I726676aaa8944bc3b6418abe305ad03f8ec96c59 Reviewed-on: https://gerrit.libreoffice.org/41783 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-01Use named enum/constant instead of commentEike Rathke
Change-Id: I91c6e50518d2430e32312ba35f9ff5d76635460e
2017-08-31tdf#111734 Reorder buttons to reach them with the Down arrowGabor Kelemen
This seems to be enough to step through the buttons with the Down arrow. Change-Id: Ib9ad76bedb6abbf87164aafdf1c95cc438af8c3d Reviewed-on: https://gerrit.libreoffice.org/41772 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-30nothing is reading the futilely set WB_AUTOSIZE bitCaolán McNamara
Change-Id: Ifbc2dffcb8db1511d5c08e51c972e822355f41c6 Reviewed-on: https://gerrit.libreoffice.org/41737 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-29Resolves: tdf#112017 crash on particular odtCaolán McNamara
Change-Id: I6ba2e73562a16afecb6abdfe4f1a40b1e316379e Reviewed-on: https://gerrit.libreoffice.org/41685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-29move ListControl to vclMarkus Mohrhard
Change-Id: I022bba9a9a4d3d0bdb25ca8fa43aef2544decddb Reviewed-on: https://gerrit.libreoffice.org/41682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-08-29handle scroll wheel scrolling in new ListControlMarkus Mohrhard
Change-Id: I8dc68b674aabf446c4b949770ae066d41204efc3 Reviewed-on: https://gerrit.libreoffice.org/41680 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>