summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2018-08-04Use more basegfx deg<->rad functions, instead of direct formulasMike Kaganski
Also make the functions constexpr. Due to slight changes in floating-point arithmetics (90.0 instead of 180.0, M_PI2 instead of M_PI resp.), results might differ in last digits (usually 17th decimal digit). This has lead to need to tweak char2dump's PieChartTest unit test. Change-Id: I20323dd7dab27e4deb408ea4181e390cc05e7cd3 Reviewed-on: https://gerrit.libreoffice.org/58583 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-04use C++11 exception rethrowingCaolán McNamara
for those cases where we are doing relatively simple catching and rethrowing e.g. catch in one thread and throw in main thread. Change-Id: I6192017c4ec99dd671a9582f7b004096b0fc4525 Reviewed-on: https://gerrit.libreoffice.org/58588 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-03forcepoint#71 sanity check when copying pieces of imported pdfCaolán McNamara
Change-Id: I7e340e15c95cdfa8b185f61fad7e14bd00babf21 Reviewed-on: https://gerrit.libreoffice.org/58555 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-03Resolve unnecessary typedefStephan Bergmann
Change-Id: Ide89f6082f877046eac0415f23a3e29c5f7f1e65 Reviewed-on: https://gerrit.libreoffice.org/58554 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-02[API CHANGE] add some more asserts to the string functionsNoel Grandin
rtl_[u]String_alloc now requires that the length be >= 0. Since this function is only @since Libreoffice 4.1, it is unlikely to be widely used externally. Removed some unit tests that were testing invalid or out of range paramers, which are already not allowed according to the documented contract of those functions. The change in writerfilter is because the new asserts triggered when running testFdo74745 The change in SwTextNode::EraseText is because testFdo60842 triggered the assert in replaceAt. The change in SwFieldSlot::SwFieldSlot is because testMoveRange::Import_Export_Import triggered the assert in replaceAt. The changes in SwFieldSlot::SwFieldSlot and TabControl::ImplGetItemSize are due to failures in the uitests. Change-Id: Ib317261067649b0de96df12873ce31360cd24681 Reviewed-on: https://gerrit.libreoffice.org/58390 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-02forcepoint#66 make sure we don't get stuck endlessly reparsingCaolán McNamara
Change-Id: Ie2733e8d7f73e5f6a072604c477e949cd944189a Reviewed-on: https://gerrit.libreoffice.org/58441 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-02forcepoint#67 detect cairo surface creation failureCaolán McNamara
if e.g. too large Change-Id: I7de8748a5ed695c1b3ddc8c1358414f3acd68c94 Reviewed-on: https://gerrit.libreoffice.org/58453 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-01forcepoint#66 protect against infinite parse recurseCaolán McNamara
Change-Id: I0313cc141469a00b7d6a5bd15400e9d5a8f686cf Reviewed-on: https://gerrit.libreoffice.org/58440 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-01add operator+=(OUStringBuffer) method to OUStringNoel Grandin
to reduce needless object creation and copying some more And fix what looks like a bug in CSS hex color parsing at line 609 in sw/../parcss1.cxx that has been there since commit 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import" Change-Id: Ibad42b23721a56493bd1edcd7165e6104494a5c3 Reviewed-on: https://gerrit.libreoffice.org/58357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-01forcepoint#65 pdf page visiting revisits itselfCaolán McNamara
Change-Id: I6d9eb75f0850a94814fb4d69ea1442b826674496 Reviewed-on: https://gerrit.libreoffice.org/58416 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-01Resolves: rhbz#1610692 rectangles ctor takes topleft, bottomright pointsCaolán McNamara
so pass arguments in the topleft, bottomright order to avoid eventual... Gtk-CRITICAL **: 09:43:33.896: gtk_widget_queue_draw_area: assertion 'height >= 0' failed Change-Id: I2396f49470274331c49275a5e6d707f59277be4a Reviewed-on: https://gerrit.libreoffice.org/58391 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-01Fix typosAndrea Gelmini
Change-Id: Id59caa7da8fdfd613eb3b97196c52131aeb7378c Reviewed-on: https://gerrit.libreoffice.org/58375 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-31Font features: Use Graphite instead of HarfBuzz if availableTomaž Vajngerl
When searching for font features, use Graphtie if it is available instead of HarfBuzz, because HarfBuzz will only give a subset of OpenType features in a Graphite font, but will ignore additional features specific to Graphite. Change-Id: I00c8790ee4d1e1ab906928f649d2a3e54163557f Reviewed-on: https://gerrit.libreoffice.org/58306 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-07-31more fix windows --enable-debug buildNoel Grandin
follow on to commit cba7acca97ac0245b93e27ba46351285fd7c5ff2 fix windows --enable-debug build which tried to fix the regression from commit 9cceba9a928cf3b3447f293020be2fe76c035ed5 make DBG_TESTSOLARMUTEX available in assert builds Change-Id: I054552a53fd86a9b6cefcdad055f1f870c47e07c
2018-07-31fix windows --enable-debug buildNoel Grandin
regression from commit 9cceba9a928cf3b3447f293020be2fe76c035ed5 make DBG_TESTSOLARMUTEX available in assert builds Change-Id: Id3747e2a342830e0184251b909b577b2a8814543
2018-07-31Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directory vcl Change-Id: I205fe0f4e80a66cd9c3b19f7e9716411da1d1cf5 Reviewed-on: https://gerrit.libreoffice.org/58221 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-31uitest logger: log more eventsSaurav Chirania
Logging for the following: 1) Object Selection 2) Sidebar / Deck opening 3) Parameters of UNO commands 4) Element Selection (Math) 5) Set Zoom (Impress) 6) Calc - a) Autofilter Launch b) Select Cell / Range of cells c) Switch table 7) Writer - a) Goto page b) Set Zoom Change-Id: Ifc7f603f62d10cfd1062923ded68203e574aebb6 Reviewed-on: https://gerrit.libreoffice.org/57368 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-30Related: rhbz#1602589 rework to avoid bogus cppcheck double free warningCaolán McNamara
Change-Id: Ie673de68f39b903536c2287b8989fe6afcc9fd66 Reviewed-on: https://gerrit.libreoffice.org/58307 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-30fix OT font feature description ssxx and cvxx mixupTomaž Vajngerl
Change-Id: I20e169fede237e4760f8be905e70a3ed964c402f Reviewed-on: https://gerrit.libreoffice.org/58305 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-07-30make DBG_TESTSOLARMUTEX available in assert buildsNoel Grandin
where our QA people are more likely to trigger it Change-Id: I4ce7c8c72e7e21f2296c0f9cc9f019aaef32ed0b Reviewed-on: https://gerrit.libreoffice.org/58170 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-29more windows tinderbox fixNoel Grandin
Change-Id: Ie17b27f89c3c6d2fb43b869985febd18921a99f0 Reviewed-on: https://gerrit.libreoffice.org/58259 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-28uitest: support parameters when sending UNO commandsSaurav Chirania
This patch introduces a new function to send parameters with UNO commands in UI Tests and adds a test which uses the function to change the color of text in writer. Change-Id: Ic687872ab826b50360e1bd042d9668a9f6ddbf63 Reviewed-on: https://gerrit.libreoffice.org/57857 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-27tdf#118966 vcl: add a flag to determine if AA of fonts is used from the systemMiklos Vajna
This is on by default (as there are loads of vcl users who expect font AA working even if the default is off and they don't enable it), but the svx UnoGraphicExporter disables it to make everyone happy. The reason in practice AA was on by default is that the gtk backend uses the system settings in GtkInstance::GetCairoFontOptions() (and not the AA setting from the UI), and lclGetSystemTextAntiAliasMode() does the same on Windows (at least in the direct write case). So now these defaults again have higher priority than leaving the vcl-level default unchanged. Change-Id: I81267c0b036211525ac02d3282fa89d75510f4a8 Reviewed-on: https://gerrit.libreoffice.org/58199 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-07-27loplugin:returnconstant in vclNoel Grandin
Change-Id: I597ef6d75d1c21cdc15a91bf7f549bc14c851506 Reviewed-on: https://gerrit.libreoffice.org/58086 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27loplugin:stringloop in vclNoel Grandin
Change-Id: I086a809b6541041b627daa93f9a08be2a9218550 Reviewed-on: https://gerrit.libreoffice.org/58117 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27Related: rhbz#1602589 silence coverity copy_paste_errorCaolán McNamara
Change-Id: Idca4bfaaa9f127eae87ae879e2131aed747ce4b3 Reviewed-on: https://gerrit.libreoffice.org/58089 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-27vcl: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann
...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc.; and by removing explicitly user- provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non- deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already include, so why bother with non-inline functions.) Change-Id: Ife5d8eb699b8b6c84b9229ae275dc386fa189bce Reviewed-on: https://gerrit.libreoffice.org/58105 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-26Related: rhbz#1602589 silence coverity leaked_storageCaolán McNamara
Change-Id: Iae694be40b32cc3821d326bb362e6091dba19a35 Reviewed-on: https://gerrit.libreoffice.org/58079 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-26skip checking png block crcs when fuzzingCaolán McNamara
Change-Id: If4671f7db2afb46dc68aa7a8a92c509e1735ab9f Reviewed-on: https://gerrit.libreoffice.org/58051 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-26vcl cairo text renderer: support non-AA textMiklos Vajna
Non-AA lines were already working, but text was always anti-aliased. (Use-case is reference bitmaps in a testsuite, where AA just makes it harder to determine if the expected and actual rendering output match.) Change-Id: I7c5ab4c80675e1a523d67b71f3cd3cbc9c6416c3 Reviewed-on: https://gerrit.libreoffice.org/58035 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-07-26weld SwTextGridPageCaolán McNamara
Change-Id: I4f8e5f643126bea5deef7636b6d20f8080cb6662 Reviewed-on: https://gerrit.libreoffice.org/56309 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-26tdf#118860 svx opengl: avoid SalBitmap creation without solar mutexMiklos Vajna
The bugdoc has 2 slides. When switching to the second slide, the graphic is loaded in the background, but OpenGLSalBitmap::Create() can't work correctly if the caller doesn't own the solar mutex. This already asserts in OpenGLContext::prepareForYield() in a less obvious way. Focus on the correctness, so just hold the solar mutex during the whole ImportGrpahic() call. If it turns out that the purpose of running this on a thread is to avoid synchronous network traffic, then the data could be first copied to a memory stream, and only then take the lock + import the graphic. Change-Id: I88203c12b4e7a5f2b689928c01e2ba953c5b13c5 Reviewed-on: https://gerrit.libreoffice.org/57970 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2018-07-26Missing includes (Windows --disable-pch)Stephan Bergmann
Change-Id: Iea067e3529de9208bd0a00c276eb03858816bd00 Reviewed-on: https://gerrit.libreoffice.org/57996 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-25-Wc++11-narrowing (clang-cl)Stephan Bergmann
...from 'int' to 'FLOAT' (aka 'float') Change-Id: I999fc322d0ace0d32c675a22337077d7a95eed3c Reviewed-on: https://gerrit.libreoffice.org/58006 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-25loplugin:sallogareas (clang-cl)Stephan Bergmann
Change-Id: Id3f41fe72487a1e38ead75c8df6307edd1c3ccab Reviewed-on: https://gerrit.libreoffice.org/58005 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-24GetCharWidths always returns trueCaolán McNamara
Change-Id: I4a58b203a7c18484c3405f918e77297ac764725d Reviewed-on: https://gerrit.libreoffice.org/57925 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-24split buffers to clarify what it doesCaolán McNamara
Change-Id: Id7888d2e2ef1cdf21af4247207c2b0dda0aa3823 Reviewed-on: https://gerrit.libreoffice.org/57926 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-24forcepoint#53 restrict to expected index rangeCaolán McNamara
Change-Id: I22f01e5a3e3cf51b014ac841cd14071dce5baf0f Reviewed-on: https://gerrit.libreoffice.org/57920 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-24Fix typosAndrea Gelmini
Change-Id: I07cf04cd2acc5b50d64224edb9f2c2de2c61e356 Reviewed-on: https://gerrit.libreoffice.org/57884 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-24Fix typoAndrea Gelmini
Change-Id: I2f9f532890bedf4aa3d86bf2aa4b6961846a915a Reviewed-on: https://gerrit.libreoffice.org/57886 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-23Fix typosAndrea Gelmini
Change-Id: If0d8f4033d9bc20f521d33d732fb349f0df5eeef Reviewed-on: https://gerrit.libreoffice.org/57822 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-23Qt5 just release the SolarMutex for Qt eventsJan-Marek Glogowski
Just like the other backends, just release the SolarMutex when processing Qt events and keep it for user events. Change-Id: I0c4a7149f1541607b546a99e51e790836bc9b2f9 Reviewed-on: https://gerrit.libreoffice.org/57844 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-07-23loplugin:unnecessaryparenStephan Bergmann
Change-Id: Ie28001cf1eb5259f479caecdfb50355f98b80b7f
2018-07-23Avoid deadlock in case of events not driven by the userKatarina Behrens
e.g. progress bar updates. Release and re-acquire SolarMutex Change-Id: Ie4e12fed7b2b8ee9bcb163334d82e466025cb7fa Reviewed-on: https://gerrit.libreoffice.org/57780 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-07-23tdf#118453 Reactivate navitagor submenu drag mode and displaySalimHabchi
I add a function to get the data from the submenu Change-Id: If8aedc72abfc7ca967377f0e588167f9f62fe137 Reviewed-on: https://gerrit.libreoffice.org/57269 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-07-20Fix typosAndrea Gelmini
Change-Id: Ia3e6f17217b837517faa588ea7f2e72dc5aff6aa Reviewed-on: https://gerrit.libreoffice.org/57767 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-20implement pdf export of underline for outlined fontCaolán McNamara
just the simplest case of a straight solid line which is outlined, i.e. border in font color and filled with white Change-Id: I7d670a543475b6457cb2827e74a05bba6c4a91ea Reviewed-on: https://gerrit.libreoffice.org/57778 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-20undef more vcl_font_feature test on windowsNoel Grandin
Change-Id: If8697d13b8fa87fd07e8fef9cb6fdcb0f444fa71 Reviewed-on: https://gerrit.libreoffice.org/57775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-20Fix typosAndrea Gelmini
Change-Id: I1048bea42c66b81244021aa2188e5dfe2ce6e83d Reviewed-on: https://gerrit.libreoffice.org/57768 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-07-19Fix typosAndrea Gelmini
Change-Id: Id31aa22a98f7520a37e624cbb1dc4d949246c0fb Reviewed-on: https://gerrit.libreoffice.org/57622 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>