summaryrefslogtreecommitdiff
path: root/vcl/source
AgeCommit message (Collapse)Author
2018-08-15loplugin:useuniqueptr in PhysicalFontCollectionNoel Grandin
Change-Id: Id0a6a44848541968e9084a198366accda9c1149a Reviewed-on: https://gerrit.libreoffice.org/59017 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15loplugin:useuniqueptr in TilingEmitNoel Grandin
Change-Id: Idf591f6d8557f1477eec4f8d69358ff41d9acff3 Reviewed-on: https://gerrit.libreoffice.org/59016 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14Resolves: tdf#119251 parse non-default units in user inputted valuesCaolán McNamara
Change-Id: I28f8338f5c318f2228b742e2e171d53820cb0cc8 Reviewed-on: https://gerrit.libreoffice.org/58984 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-14create appendCopy method in OUStringBufferNoel Grandin
so we can avoid temporary copies when appending a substring of an OUString to the buffer. I would have preferred to call the method just "append" but that results in ambiguous method errors when the callsite is something like sal_Int32 n; OUStringBuffer s; s.append(n, 10); I'm not sure why Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f Reviewed-on: https://gerrit.libreoffice.org/58666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-11set copy_paste_error to false rather than intentionalCaolán McNamara
Change-Id: I152482ef594c286d3c2a94cab62feff49bbf79fa Reviewed-on: https://gerrit.libreoffice.org/58884 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-10vcl text layout: return early for empty stringsMiklos Vajna
It seems the only side effect of GenericSalLayout::LayoutText() is push_back() calls on m_GlyphItems, which doesn't happen for an empty string input, so it's safe short-circuit this case. Change-Id: Ia6e2865117bca60573e2874f11d3742413e9df4b Reviewed-on: https://gerrit.libreoffice.org/58850 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-08-10vcl statusbar: fix last non-use of pre-calculated layoutMiklos Vajna
Use it in the offscreen rendering case as well. Layout calls are visible by logging the invocations of GenericSalLayout::LayoutText(). Change-Id: I9157aa56d22b6c0cee71cdaeca4d61d1c673c79e Reviewed-on: https://gerrit.libreoffice.org/58831 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-10vcl statusbar: store calculated layout in StatusBar::SetItemText()Miklos Vajna
Otherwise we calculate the layout of the text multiple times, which is a waste of resources. This effectively reverts commit a4ed3d9a1ffa1b51ba4352a955c950235f099fdc (tdf#115353 Status bar: no cache in settext, 2018-03-01). That seems to be safe, given that I can't reproduce tdf#115353 after this change, and reading through the comments the bug was reported fixed after both the mentioned commit and commit 8d42909cd326cb26d8ba1fb383b5578f820c72ed (tdf#115353 layout fix, 2018-02-23). So either the first one was not necessary, or it just worked around an underlying problem that has been fixed in the meantime. Change-Id: I79c014e9ce41be0c06dae65b5195a23d0d88c2aa Reviewed-on: https://gerrit.libreoffice.org/58830 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-10tdf#117058: Simplify calls to Menu::CheckItemArnold Dumas
Change-Id: I2a8375eb35c86c445d04f71755aef0cdbb051024 Reviewed-on: https://gerrit.libreoffice.org/58802 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
2018-08-09loplugin:unusedmethodsNoel Grandin
Change-Id: I0308ddd467ab6e283c0503f98885a248eb28290c Reviewed-on: https://gerrit.libreoffice.org/58738 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-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-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-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-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-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-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-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-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-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-19tdf#108012 - Clicking in the font field should select the contentsNickson Thanda
Change-Id: I1276976e031b419ca5cc3cc8e848f2af58ce4cfb Reviewed-on: https://gerrit.libreoffice.org/56865 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
2018-07-19loplugin:constantparamNoel Grandin
Change-Id: I8e2e9009f0a70d2fa390e03688a988ac935d5f36 Reviewed-on: https://gerrit.libreoffice.org/57643 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-19loplugin:unusedmethodsNoel Grandin
Change-Id: I2b7a055a44c63bfc072b82580811898e177fbb8e Reviewed-on: https://gerrit.libreoffice.org/57628 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-18lokdialog: no invalidation when in init showPranav Kant
This improves LOK dialog opening time considerably. libreofficekit/tilebench results: Before: profile run: initialization - 346.5185(ms) load document - 2162.5881(ms) open dialog - 7077.8980(ms) wait for dialog - 52.7742(ms) render dialog - 256.9597(ms) post close dialog - 523.7811(ms) destroy document - 58.3723(ms) Total: 10.4789(s) After: profile run: initialization - 336.5867(ms) load document - 2155.5481(ms) open dialog - 1151.4130(ms) wait for dialog - 51.5332(ms) render dialog - 260.3197(ms) post close dialog - 519.8729(ms) destroy document - 56.7322(ms) Total: 4.5320(s) Change-Id: I6345aca33c5881aba33c8a5f74765b99fe098711 Reviewed-on: https://gerrit.libreoffice.org/57561 Tested-by: Jenkins Reviewed-by: pranavk <pranavk@collabora.co.uk>
2018-07-18Fix typosAndrea Gelmini
Change-Id: I5195d13b351c0eebad1eae901f7ce8408a9e5c92 Reviewed-on: https://gerrit.libreoffice.org/57028 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-07-16move freeze/thaw to WidgetCaolán McNamara
Change-Id: I3944092c26ca81028912f6fb206b148b49e4f172 Reviewed-on: https://gerrit.libreoffice.org/57489 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-16cppcheck: useInitializationList in vclJochen Nitschke
reorder members of GIFLZWDecompressor to ease initialization. use rtl_allocateZeroMemory in ImplVectMap to avoid memset in ctor. Change-Id: Icfcfe73ec7e52988036995d8dbc604361aee893b Reviewed-on: https://gerrit.libreoffice.org/57481 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-07-15tdf#118377 Do not use disposed OutputDeviceArmin Le Grand
Change-Id: I7e085f69ce18e8e3c47fde690a939948454d4d15 Reviewed-on: https://gerrit.libreoffice.org/57319 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-07-13Inaccurate symbol signs fixed (tdf#118381)Thorsten Wagner
Change-Id: I2af1d3e4c924acd2ae601f0b40fcf1b2be17c397 Reviewed-on: https://gerrit.libreoffice.org/56426 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-07-13merge IUndoManager into SfxUndoManagerNoel Grandin
SfxUndoManager is the only implementation of the IUnderManager "interface", and it lives in the same header. Plus this way we can get rid of some covariant parameters, which will make using std::unique_ptr easier. Change-Id: I6661b9876b18da830bead78794d237886cd3c5c9 Reviewed-on: https://gerrit.libreoffice.org/57317 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>