summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2018-08-15tdf#119276 Fix loading of images with internal LO URLsTomaž Vajngerl
Change-Id: I30556aba4490bef7f4a6e6b3899cc05f4b6a06d4 Reviewed-on: https://gerrit.libreoffice.org/59104 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-08-15vcl: allow using pre-calculated layout in OutputDevice::DrawTextArray()Miklos Vajna
I plan to use this in SwFntObj::DrawText(). Change-Id: Ic5e167d90a7e72452d8efa9fad06b8067675a225 Reviewed-on: https://gerrit.libreoffice.org/59108 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-15a11y: Fix EDITBAR atk nameSamuel Thibault
ATK_ROLE_EDITBAR's nick name is actually "edit bar" (special-cased in atkobject.h) Change-Id: Icd4767d3513c7a5ad1774357d026922d74a42f90 Reviewed-on: https://gerrit.libreoffice.org/58762 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-08-15loplugin:useuniqueptr in GlyphCacheNoel Grandin
although I rather suspect these FreetypeFont objects would be better held by rtl::Reference Change-Id: I1a7d6ca47d1f78686637368a4bec57b1fcfaa6e9 Reviewed-on: https://gerrit.libreoffice.org/59020 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15loplugin:useuniqueptr in FreetypeManagerNoel Grandin
Change-Id: Idf8f843f2740bc20e6b0877b62dbfc778e31acd8 Reviewed-on: https://gerrit.libreoffice.org/59018 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-14tdf#116542 a11y: introduce STATIC roleSamuel Thibault
This should be used for brief non-editable text which is not meant to have a relation with another object (as opposed to text or label). Change-Id: I46bfa56042a51295e9fa0d332babdbb40668ff0b Reviewed-on: https://gerrit.libreoffice.org/58734 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-14mml needs pdffilter tooCaolán McNamara
Change-Id: If5faadee3504d88df8584850905d3b3de46c0328
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-13Fix typosAndrea Gelmini
Change-Id: I0bcdff1d355f374e9922cf3f318a88f01af86f4f Reviewed-on: https://gerrit.libreoffice.org/58929 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-08-13loplugin:includeformStephan Bergmann
Change-Id: I7c927bb46ce411138069f7c64a5036ce07077ced
2018-08-13vcl opengl windows: fix error handling in tryShaders()Miklos Vajna
Both of my GPUs failed to start with GL enabled in an enable-symbols build, but they were fine in a dbgutil build. It seems the problem was that in case CHECK_GL_ERROR() expands to an error reporting code, then we already correctly checked the error of the last GL call at the end of tryShaders() -- but in case it expanded to nothing, then previous (unrelated) errors signaled that shader compilation went wrong, even if it did not. Given that we have error handling right before glDeleteProgram(), clear the GL error queue before calling glDeleteProgram(). Change-Id: If58188d06a0b7009a71af82c476b5aa77823d9b0 Reviewed-on: https://gerrit.libreoffice.org/58852 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-12tdf#119133: Fix initial file and folder selectionKatarina Behrens
what d7fc00e1f7ab7a44e6102a and 1af4ab72e2488515fcaede already does for kde5 Change-Id: I924bdc5cfd6a12ff7bdbeef36d606c03307cb99b Reviewed-on: https://gerrit.libreoffice.org/58832 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-12Finally remove non-native menu barKatarina Behrens
Change-Id: I4758bc5afa9f9eaced7763b9923250f27df14259 Reviewed-on: https://gerrit.libreoffice.org/58834 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-12Revert templatization of Qt5Widget classKatarina Behrens
it was not a step in the right direction in 1st place. We distinguish between main window frame (QMainWindow) and everything else (QWidget) differently now Change-Id: I331c9760f7616b2f199e63e5e521df74b08acc62 Reviewed-on: https://gerrit.libreoffice.org/58853 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-12Set Qt5Widget to be a central widget of QMainWindowKatarina Behrens
this is meant to solve the problem of native menu bar overlapping w/ non-native, as well as the inability to place an object or select text dragging the mouse cursor w/ LMB pressed Change-Id: I29f590ebf79d1ecc7e17b402125384cf13774bf3 Reviewed-on: https://gerrit.libreoffice.org/58171 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
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: separate SalLayout from the rest of sallayout.hxxMiklos Vajna
This way SalLayout can be created separately (and potentially reused) outside vcl as well. Don't reformat the moved code, so git blame keeps working. This is a first step towards the goal of <https://wiki.documentfoundation.org/Development/Budget2017#Text_layout_performance>, in the context of code outside vcl. Change-Id: I8b40313b5fa531d3b56c153cbc4b5ca3cec8f8df Reviewed-on: https://gerrit.libreoffice.org/58851 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
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-10shrink scrtf fuzzerCaolán McNamara
Change-Id: I977636eff8a2962ca248287f8733422d635f8559 Reviewed-on: https://gerrit.libreoffice.org/58833 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
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-10Qt5 disable native draw via SAL_VCL_QT5_NO_NATIVEJan-Marek Glogowski
Primary as a debugging measure to compare output for Qt5Graphics. Checks mpToolkitName, so we just disable it for qt5 not kde5. Change-Id: Ib7a67c4bec16d81dd87b6351ba106f655d37948b Reviewed-on: https://gerrit.libreoffice.org/58790 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-08-10Qt5 fix nTransparency handlingJan-Marek Glogowski
So nTransparency is actually also in percent, i.e. max is 100, instead of the full byte range, like alpha colors in Qt and VCL. Fixes "SAL_USE_VCLPLUGIN=qt5 ./bin/run vcldemo --show poly" transparency. Change-Id: I723cbb2d6b5af4a37b18d3e6a5e0c5b81421221a Reviewed-on: https://gerrit.libreoffice.org/58789 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-08-10Qt5 also move color setting handling from kde5Jan-Marek Glogowski
This is all QStyle based. Font handling still to do. Change-Id: I784e64aa88d013146e2c9a07051a0a76a1369ff0 Reviewed-on: https://gerrit.libreoffice.org/58788 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
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-09Various fuzzers need pdffilter_component_getFactoryStephan Bergmann
Change-Id: I59c5499586c16768afde822cd6d580540d1bcd73 Reviewed-on: https://gerrit.libreoffice.org/58764 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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-08Fix typosAndrea Gelmini
Change-Id: Ib734b3d578f8036182a2f3e22eb1f3f8951b7fad Reviewed-on: https://gerrit.libreoffice.org/58699 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-08-08Fix typosAndrea Gelmini
Change-Id: I65836b437bbc27d4f6a5862fe436397d858564a2 Reviewed-on: https://gerrit.libreoffice.org/58701 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-08-07loplugin:includeformStephan Bergmann
Change-Id: Ibd50fa73a5ee63e3375ef0518df0ba84bf6fce1c
2018-08-07Qt5 move native control handing from kde5Jan-Marek Glogowski
The native painting code in the kde5 backend is Qt based only. To prevent multiple inheritance, it's moved into an extra class and just leaves the backend specific QImage blitting in the specific SalGraphics implementation. Change-Id: I3d5f58f42a37966794541fe1214c1b9557376a98 Reviewed-on: https://gerrit.libreoffice.org/58652 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-08-07Qt5 static_cast bitmap data should be enoughJan-Marek Glogowski
This failed to build to on Haiku with: /sources/core/vcl/qt5/Qt5Bitmap.cxx: In member function 'virtual bool Qt5Bitmap::Create(const SalBitmap&, sal_uInt16)': /sources/core/vcl/qt5/Qt5Bitmap.cxx:155:92: error: invalid cast from type 'unsigned int' to type 'sal_uInt32 {aka long unsigned int}' *image_data = reinterpret_cast<sal_uInt32>(colorTable.at(*buffer_data >> 4)); Change-Id: Ib536901f8c55f854715089bce0ad5d954dd529e9 Reviewed-on: https://gerrit.libreoffice.org/58651 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-08-07Qt5 fix main loop locking when processing eventsJan-Marek Glogowski
In commit bded890a44cc ("Qt5 just release the SolarMutex for Qt event") the Qt5 main loop was switched to running non-locked, as most other backends do, so now we must take the lock when processing Qt events. Eventually CallCallback should be virtual for security? Change-Id: I8cbfc9bb8b3de677a70ad3bd5cb3910fabec9b87 Reviewed-on: https://gerrit.libreoffice.org/58650 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-08-06Add 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') in files formerly omitted for oversight or non-cxx extension Change-Id: I327c573f44076c6ccfecf737eafccba2da72e1bd Reviewed-on: https://gerrit.libreoffice.org/58600 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-04crashtesting: bubble surface creation failure notification upwardsCaolán McNamara
e.g. on converting moz858095-2.svg to odg Change-Id: I1a222f1745cff9c4cb225f6c0c216072fb17b4f7 Reviewed-on: https://gerrit.libreoffice.org/58587 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
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>