summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2017-09-14clang-tidy modernize-use-emplace in vclNoel Grandin
Change-Id: Ie0a6d105b0167431275e628935df4f4c1a36d070 Reviewed-on: https://gerrit.libreoffice.org/42259 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-13Blind macOS -Werror,-Wunreachable-code fixStephan Bergmann
Change-Id: Ice41b6394bc4fc8e4b1d7b9c5689019361883b59
2017-09-13drop first/last link callbackCaolán McNamara
of course this stuff is exposed through uno through com::sun::star::awt::XSpinListener so VclEventId::SpinfieldFirst and VclEventId::SpinfieldLast have to be retained Change-Id: Icbf31cc8c62f2bc3bc0ccf966c0fd4f5c43dcf6b Reviewed-on: https://gerrit.libreoffice.org/42231 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-13Enable -Wunreachable-codeStephan Bergmann
...motivated by <https://gerrit.libreoffice.org/#/c/41565/2> adding dead code at the end of a switch statement, after the last case's "break". -Wunreachable-code appears to work well on Clang, while it appears to have no effect on GCC. Most of the affected places are apparently temporary/TODO/FIXME cases of disabling code via "if (false)", which can be written with an extra set of parentheses as "if ((false))" to silence -Wunreachable-code on Clang (which thus needed loplugin:unnecessaryparen to be adapted accordingly). In some cases, the controlling expression was more complex than just "false" and needed to be rewritten by taking it out of the if statement to silence Clang. One noteworthy case where the nature of the disabled code wasn't immediately apparent: Sep 12 16:59:58 <sberg> quikee, is that "if (false)" in ScExponentialSmoothingDialog::ApplyOutput (sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx) some work-in- progress or dead code? Sep 12 17:02:03 <quikee> sberg: WIP, but you can remove it Sep 12 17:04:47 <sberg> quikee, I'll wrap the false in an extra set of parentheses for now, to silence -Wunreachable-code (I wouldn't want to remove it, as I have no idea whether I should then also remove the "Initial value" comment preceding it) Sep 12 17:07:29 <quikee> sberg: both are different ways to calculate the "intital value"... so no Another case where the nature of the dead code, following while (true) loops without breaks, is unclear is sd/source/ui/remotecontrol/BluetoothServer.cxx, where I added TODO markers to the workarounds that silence the warnings for now. basic/source/sbx/sbxvalue.cxx had a variable of type double, of automatic storage duration, and without an initalizer at the top of a switch statement. Clang warning about it is arguably a false positive. Apart from that, this didn't find any cases of genuinely dead code in the existing code base. Change-Id: Ib00b822c8efec94278c048783d5997b8ba86a94c Reviewed-on: https://gerrit.libreoffice.org/42217 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-13Change assertion failure to SAL_WARNTor Lillqvist
I hit it multiple times and have no interest in figuring out why. Or time. Change-Id: I3f22c8b62fdcf987b760ac16bfe8a21a8870d33e Reviewed-on: https://gerrit.libreoffice.org/42212 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2017-09-12no CPDParser under AndroidCaolán McNamara
Change-Id: I3cf6df721f89493a527a0b65b24354d3e6135c68
2017-09-12loplugin:unnecessaryparenStephan Bergmann
Change-Id: I6fe1690b6f66e31753da993a256b7586478ef4f1
2017-09-12tdf#108299: Limit the width and height of opengl bitmap to...Dennis Francis
GL_MAX_TEXTURE_SIZE in OpenGLSalBitmap::Create() Change-Id: I3d9538cc8004241972bc63d09eeb2914ce511df6 Reviewed-on: https://gerrit.libreoffice.org/42194 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-12CUPS_VERSION_MAJOR is not definedCaolán McNamara
on arm Change-Id: Ibeca07800d02f5f69046c7bdee57143c78c03aad
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-12stub things to build without dbus or gioCaolán McNamara
Change-Id: Ibdcf33a6f0a688b322aedd531e8dfbf107e9e755
2017-09-12unnecessary thisCaolán McNamara
Change-Id: Ic5e325e12fb7270e448dd0d32e046b766e029d8e
2017-09-12Add Common Printing Dialog FunctionalityYash Srivastav
Summary: These set of commits add support for the Common Printing Dialog Backends being developed as part of GSoC'17. All backends exist as dbus-services which can be queried for printers, their options, etc. Test Plan: Firstly, without adding any CPD backend, LO printing should work as it works now with graceful fallback to CUPS. Next, we need to install a backend. The backend providing CUPS interface is at git@github.com:NilanjanaLodh/PrintDialog_Backend.git See README.md for installation instructions. After this, run LO and existing CUPS Printers should show up. Also printing does send a job to cups which can be seen at: http://localhost:631/jobs?which_jobs=completed Due to LO shutdown not being handled properly currently, the backend might need to be killed via `pkill print_backend_cups` Future Plans: * Fix shutdown actions. Change-Id: I3bdea5d3272ec4c9c0dfe510f5848fcb398b4b14 Reviewed-on: https://gerrit.libreoffice.org/40565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-12WIP: Implement Basic Common Printing BackendYash Srivastav
Can list printers and basic printing set up. Change-Id: I2be3ac448cec8f40f632dbfa22657088e9cf7ee9 Reviewed-on: https://gerrit.libreoffice.org/38987 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-12tdf#108963 PDF export of editeng text highlight: handle rotated textMiklos Vajna
The highlight rectangle was not rotated, handle it similar to PDFWriterImpl::drawStrikeoutChar(). Change-Id: I97a5b1fc05706729c58c92b90d6808629af8ca4c Reviewed-on: https://gerrit.libreoffice.org/42180 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-12cppcheck: identicalConditionAfterEarlyExitJochen Nitschke
Change-Id: I59d91390ee303eadc10315405cce44cfd7c37d56 Reviewed-on: https://gerrit.libreoffice.org/42179 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11cppcheck: knownConditionTrueFalseJochen Nitschke
Change-Id: I216635d7eed8d32c84b44fc80db2e6047b8ee252 Reviewed-on: https://gerrit.libreoffice.org/42158 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11Translate German comments/debug strings (leftovers in dirs vbahelper and vcl)Johnny_M
Translates leftovers found using a custom regex. Additionally: - Translated the "SGV Fonts for StarView" INI file parameter group in vcl/source/filter/sgf.ini and .../sgvtext.cxx Change-Id: I1360aac1a2f3fa825f86d77ac1b05e2de9ffb007 Reviewed-on: https://gerrit.libreoffice.org/42145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-11gtk3: flicker-free opengl transitionsCaolán McNamara
leave the GtkGLArea opengl context alone except for the final render into it, create a new context for the slide transitions to play with set up a pair of framebuffers, a scratch one to let the transitions render into, the other to take a snapshot when the transition is finished with it and then tell GtkGLArea we're ready to render it and when the callback comes around copy the snapshot into it. Change-Id: I3515614baf7eea0ff53c46edbaf9cf66f926eef2 Reviewed-on: https://gerrit.libreoffice.org/42144 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-11its really the contents we want to redrawCaolán McNamara
doesn't matter in practice though, but change it anyway Change-Id: I9df8304f01c80a899bdd7219fc4ce459bda7de08 Reviewed-on: https://gerrit.libreoffice.org/42065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-11hidpi+gtk3: move setting the opengl slide viewportCaolán McNamara
to when the window size is set, and adjust to gtk3 hidpi scaling factor Change-Id: Id9bd0defd0b6ae640ac57f88133d954202d4bcc3 Reviewed-on: https://gerrit.libreoffice.org/42143 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-10OSL_ASSERT->assert in putG4Bits (vcl)Julien Nabet
Change-Id: Iac93447146ba7d9b3ae7de4eca6fa272b1cc1187 Reviewed-on: https://gerrit.libreoffice.org/42133 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-08tdf#108722 vcl: fix bugs in TextEngine with TEXTATTR_PROTECTEDMichael Stahl
1. If the cursor is at the end of the paragraph, attributes ending at that position are skipped in TextEngine::FindCharAttrib(). 2. If a TEXTATTR_PROTECTED is found, TextView::KeyInput() retains the selection that was extended to cover the attribute after deleting the text, because it compares to the initial selection. Why delete/backspace keys only work with the "gtk" vcl-plug but not "gtk3", "gen" or "kde4" is a mystery to me. Change-Id: Id7a6f298332f5a99454c793dd2dd6d424a975ad4
2017-09-08tdf#110737 set user-events to a lower priority than system redrawCaolán McNamara
Change-Id: Ic6672fcce4cb5516d388fee22120383ccc70a4a5 Reviewed-on: https://gerrit.libreoffice.org/42066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-08loplugin:constantparamNoel Grandin
Change-Id: Ic87f0cc863490858b7cc7e74a7f90ec31992dd53 Reviewed-on: https://gerrit.libreoffice.org/42089 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-06Rename wrong name of vars in auto loopJulien Nabet
My commit https://cgit.freedesktop.org/libreoffice/core/commit/?id=8c7b42c942d6693915dc825ede80279f720a5775 was wrong for some variable names, var in for loops aren't iterators on objects but objects Change-Id: I13484e5faa50aa8585231661846afa007b7a6eab Reviewed-on: https://gerrit.libreoffice.org/42026 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-06Don't poll the extension install progress barJan-Marek Glogowski
Just start the Idle, if actually something changed. Quite probably we shouldn't rely on an Idle at all, but this fixes the busy loop while installing an extension waiting in a confirmation dialog. Change-Id: I3abbe2eb6651ce9320ef6e4d9c5251a23ab87216
2017-09-06ofz#3028 check bitmap creation for failureCaolán McNamara
Change-Id: I8c1a2c3873e53153564a5aabc4cc8903622cf054
2017-09-06Use o3tl::make_unique when var is unique_ptrJulien Nabet
Change-Id: I2d8b20aeb686bd4b59fe8dcaf695a17d94a440c9 Reviewed-on: https://gerrit.libreoffice.org/41967 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-05Resolves: tdf#107249 round ascent/descent/extleading on conversion to intCaolán McNamara
Change-Id: Ia3ab5960d5288f5831aaa4ade800ca7513dad766 Reviewed-on: https://gerrit.libreoffice.org/41944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-05Drop lazywrite property, which is silently ignored by configmgr anywayStephan Bergmann
...at least ever since the "new" configmgr reimplementation, 6b849a6aeeb9ea8b1e25e28d5a8be390e425f84e "#i101955# initial work in progress of a configmgr reimplementation (for now in an extra module 'configmgr2')" et al Change-Id: I43430d991647fb2e26762463d51175247db0604b
2017-09-05Revert "Resolves: tdf#107249 round ascent/descent/extleading on conversion ↵Stephan Bergmann
to int" This reverts commit e2159061db8e266a3fe9f31773c676887168b254, it broke CppunitTest_vcl_complextext.
2017-09-05rename GetTTFontMterics -> GetTTFontMetricsNoel Grandin
Change-Id: I9952ddf0b1256e768a664f4da70455245cf67f41 Reviewed-on: https://gerrit.libreoffice.org/41934 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-05Resolves: tdf#107249 round ascent/descent/extleading on conversion to intCaolán McNamara
Change-Id: Iaf30b90762818c57fc0277e771b5bf172fb558be Reviewed-on: https://gerrit.libreoffice.org/41933 Reviewed-by: Michael Meeks <michael@gnome.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-05Resolves: tdf#112180: avoid crash with specific ttfCaolán McNamara
Change-Id: I8cde147279173bffec0c991eb7676f5d4641138d Reviewed-on: https://gerrit.libreoffice.org/41935 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-05Resolves: tdf#107730 ensure per-thread epoxy_handle_external_wglMakeCurrentCaolán McNamara
Change-Id: Idc1e2da3a02715a09b5b8f4e8e736b8806e59f8e Reviewed-on: https://gerrit.libreoffice.org/41927 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-09-04Resolves: tdf#111073 incorrect gif background colorCaolán McNamara
a) set correct palette entries for the 1bit bitmap returned b) only use a BITMASK for the mask (like its AnimatedGraphicPrimitive2D brother in drawinglayer does) Change-Id: I704997de554dc4d0e523458d45ab329815b5046a Reviewed-on: https://gerrit.libreoffice.org/41905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-04tdf#39468 Translate German comments/termsAndreas Brandner
Change-Id: I528e7e4b4d365ff512cd03ea22f7517319541e05 Reviewed-on: https://gerrit.libreoffice.org/41907 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-04Resolves: tdf#111483 1 bit bitmaps with non-standard black/white indexesCaolán McNamara
can be left "untoggled" when converted to cairo A1 Change-Id: I18f3e2109cd4b57bce584545090e26c931de1200 Reviewed-on: https://gerrit.libreoffice.org/41895 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-04Resolves: tdf#110452 stop menubar processing Alt+foo if handled by core widgetCaolán McNamara
Change-Id: I69f975d0f7a753e55f72fcd63f6580e958a80f38 Reviewed-on: https://gerrit.libreoffice.org/41884 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-04Resolves: tdf#111864 render progress bar for Ambiance theme properlyCaolán McNamara
Change-Id: I8ce43e4516413ea3779a128b374a931b080ae970 Reviewed-on: https://gerrit.libreoffice.org/41879 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
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-03Assertion when editing pattern fieldTamás Zolnai
Change-Id: Ia515382556329feeec359254d3be3f90d2fd17ad Reviewed-on: https://gerrit.libreoffice.org/41870 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-03tdf#112180: avoid crash with specific ttfJulien Nabet
by synchronizing announced size of data (mnByteCount) with the real size of data (mpRawBytes) Change-Id: I973bec9deb1150b630d1df32c89b33c253e4b3d2 Reviewed-on: https://gerrit.libreoffice.org/41860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-02Just remove an unused variable, no need to keep it commented-outTor Lillqvist
Change-Id: I9719013074413c98f6557c2ef9605838d32855d2
2017-09-02MAC, remove build breaker in session.cxxjan Iversen
commented out unused variable, to allow mac to build. Change-Id: Ibc9f7418f402f4646cd68dd434597b3c1bee53df
2017-09-02add CVE-2016-10504 testcaseCaolán McNamara
Change-Id: I303259d7d1a92ef1fe5e0816ec154fe51fd831b2 Reviewed-on: https://gerrit.libreoffice.org/41830 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-02Replace list by vector session.cxx (vcl)Julien Nabet
+ simplify loops Change-Id: Ic25576db83fe47f7da45667912d24d8ec44494e1 Reviewed-on: https://gerrit.libreoffice.org/41803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>