summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2017-05-30remove duplicate 'using namespace'Jochen Nitschke
Change-Id: I7f8828f677cfb588135ff75c03ffb75895773440 Reviewed-on: https://gerrit.libreoffice.org/38201 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30vcl: replace dynamic lookups of Windows 7 APIs with static callsMichael Stahl
Change-Id: I5d4c4bb98e271e69c45b8e7f989f9b21d287c0bb
2017-05-30tdf#107682 - Repeated images replace correct ones in exported PDFMarco Cecchetti
The problem was due to the buffer acquire methods: in Bitmap::Checksum (old implementation) Bitmap::AcquireReadAccess is used to get the bitmap buffer: indeed this method relies on SalBitmap::AcquireBuffer (which is used in the new implementation) but in case the buffer acquisition fails, instead of giving up, it tries to update the imp bitmap instance embedded in the bitmap (see BitmapInfoAccess::ImplCreate). The solution is to perform this further attemp in Bitmap::Checksum when the value returned by ImpBitmap::GetChecksum is 0. Change-Id: Ib901ac941db57756e9a951bacbc573ca206316e0 Reviewed-on: https://gerrit.libreoffice.org/38165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-05-30loplugin:stringcopy (macOS)Stephan Bergmann
Change-Id: I917982ff7cd6e342125dc4349de7d16e1dad9f22
2017-05-30Revert "make LANGUAGE setting universal, not just gtk specific"Caolán McNamara
poxy cppunit tests can't use config here This reverts commit f55eeb7a45998d16eb0fe49088e172ce45ac4f2b.
2017-05-30make LANGUAGE setting universal, not just gtk specificCaolán McNamara
Change-Id: I5ff01f0232391933ad3704af6f2c2100d923c1fd
2017-05-30teach redundantcast plugin about functional castsNoel Grandin
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-29vcl PDF export, nss: use comphelper::HashMiklos Vajna
Allows removing the own HashContextScope, which did part of what is now provided by comphelper. Change-Id: I601a1cf841cdf1a094a71646d4a1eb042d42e985 Reviewed-on: https://gerrit.libreoffice.org/38155 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-29remove some unnecessary OString constructor callsNoel Grandin
Change-Id: I11358f17770cacb2a33011797f4be82dc02340b7 Reviewed-on: https://gerrit.libreoffice.org/38130 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28cppcheck: duplicateExpressionJochen Nitschke
> Same expression on both sides of '|' we don't need WB_CLOSEABLE in the mask if we add it anyway ever since commit a0e2cc39e2c9d1284ef17180b6ab659a1dd2c540 Date: Tue Aug 7 10:54:21 2001 +0000 #77230# - Close() works now correct Change-Id: I13d0f2ee8d12a9ab35080a1db09d398c7ac2cdb9 Reviewed-on: https://gerrit.libreoffice.org/38103 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-05-26Resolves: tdf##108069 2nd OpenGLContext::init should dispose earlier resultsCaolán McNamara
Change-Id: If6bb9517a4081576347d71ddf26d020119d34247
2017-05-25tdf#108056 PDF export: work with double page sizeMiklos Vajna
Our coordinate system has the origo in the top left corner, PDF's one is at the bottom left corner. So the page height affects the coordinate of all widths and y positions. That page width is 870.25 in the case of the bugdoc, but it was handled as 870 due to the integer rounding. The coordinates and heights are now closer to the expected ones. Change-Id: I9c7d77298df3850bbc170c9ace18120900d7e3fa Reviewed-on: https://gerrit.libreoffice.org/38030 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-25Bypass PdfExportTest::testTdf107868() in 64-bit WindowsMark Hung
It also failed with VS2015. Just bypass it now. Change-Id: Ic657d1d341e8c9598e163f5f32b6e0bbee3959e4 Reviewed-on: https://gerrit.libreoffice.org/37987 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2017-05-25loplugin:constantparamNoel Grandin
add the results files so I can just see the diff in future Change-Id: Ia20a1aa6418be95ed620719cde340c00b7b053e1 Reviewed-on: https://gerrit.libreoffice.org/37988 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-24vcl: parallelize JPEG import from ImportGraphics()Miklos Vajna
Just the expensive, pixel reading part, not the bitmap creation, which isn't thread-safe. Change-Id: I3723d80aa29ee5f2e604800cb2061c59b0b0324d Reviewed-on: https://gerrit.libreoffice.org/37978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-05-24vcl: factor out graphic import filter state to GraphicImportContextMiklos Vajna
Have all the data needed to read pixel data at one place. Change-Id: Ie00b154b941c775d6ff4bf11019464423b3e2425 Reviewed-on: https://gerrit.libreoffice.org/37975 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-24For some reason PdfExportTest::testTdf107868() fails in a 64-bit VS2017 buildTor Lillqvist
Just bypass it for now then. Change-Id: I78b088dd35b37378f1d29833b08cfd7afd6b5133
2017-05-23vcl GraphicFilter: invoke JPEG import directly in ImportGraphics()Miklos Vajna
So that later the two ImportJPEG() calls can be invoked in separate for loops. Change-Id: I7b806d7c604d406411d5113731229eb9f761eee4 Reviewed-on: https://gerrit.libreoffice.org/37955 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-23vcl GraphicFilter: add ImportGraphics()Miklos Vajna
This is similar to ImportGraphic(), but can handle multiple streams with one function call. Change-Id: I8d5dc8de64321c3c1fb9e1037527b411fd68dca8 Reviewed-on: https://gerrit.libreoffice.org/37953 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-23enhance useuniqueptr lopluginNoel Grandin
teach it to look for the following sequence in a destructor: delete m_pfoo; m_pfoo = nullptr; Change-Id: Icd6271a63a024e32b53cc9e599f8f59952160380 Reviewed-on: https://gerrit.libreoffice.org/37900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-23tdf#105461 PDF export of editeng fill color: restrict to logic map modesMiklos Vajna
The original use case was Writer/Impress shape text, but when the map mode is pixels, the reference device gives bogus values for the PixelToLogic() calls, affecting e.g. form controls. Just go back to the old way of not painting the background for those. Change-Id: I52f1901af15732274915fa3c77c06909b5164afb Reviewed-on: https://gerrit.libreoffice.org/37919 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-23test for DejaVuSansRene Engelhard
Change-Id: I963c9a9ac0239af5550de50f39f080b9f19d494f
2017-05-22tdf#103896: Fix wrong leading and trailing tabs within dialogs on macOSThorsten Wagner
Change-Id: Ia18b530f3cfd48273ae00471e23131cae0df9eda Reviewed-on: https://gerrit.libreoffice.org/37123 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-05-21if X11/Xregion.h is universally available, we can use that insteadCaolán McNamara
Change-Id: I6ede6066037bb97b927faefacfd9a149ac2a0eac Reviewed-on: https://gerrit.libreoffice.org/37881 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-21XRegion has to match the "real" XRegion structureCaolán McNamara
i.e. same as... commit 5470a365f25e5052b4dd74f76aa2196f0d70934b Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Nov 25 10:04:37 2015 +0000 XRegion has to match the "real" XRegion structure, even if we don't use some of the fields regression from commit dd351dd728687cffe432ce0ec9367ceb80e097fb Date: Tue Nov 24 08:50:39 2015 +0200 loplugin:unusedfields in vcl/ Change-Id: I8314eae6d507b6a7fb847d593458e15e666230c8
2017-05-21cppcheck: unusedStructMemberJochen Nitschke
Change-Id: I1e2859e7a12a61db953be12f11149aaecb462b5b Reviewed-on: https://gerrit.libreoffice.org/37871 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-05-21Fix typosAndrea Gelmini
Change-Id: I438b6719817e0bbb47370ec54561eed2bc402cba Reviewed-on: https://gerrit.libreoffice.org/37783 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-05-21cppcheck: duplicate breakJulien Nabet
Change-Id: I90a0758875f20950e1ec72198dc260e9d7aebe56 Reviewed-on: https://gerrit.libreoffice.org/37870 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-20cleanup unused css/uri/ includesJochen Nitschke
Change-Id: I08c7981ecce45e343ff9e98277dd3aea4ed68ab9 Reviewed-on: https://gerrit.libreoffice.org/37860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-19loplugin:stringcopy: vclStephan Bergmann
Change-Id: I41a9642a8707e9da5be55ddb942a83ebbb9f9c3f
2017-05-19make string translation loading more uniformCaolán McNamara
change various ResId classes that use conversion operator to OUString to functions that return a OUString drop various defines drop unnecessary toString calls Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92 Reviewed-on: https://gerrit.libreoffice.org/37817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-19remove unused languagetag.hxx includesJochen Nitschke
and fix the fallout Change-Id: I8f59944bcc01a8e2ab371808c40eaf9b5198c143 Reviewed-on: https://gerrit.libreoffice.org/37785 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-19ignore SIGPIPE in glx test processMarkus Mohrhard
Change-Id: I31977f86290b4fd7e0869af85f5132ae7cd9d5fd
2017-05-18Revert "Fix typos"Stephan Bergmann
This reverts commit 26a67002fcb9381b54de6cae1aaa37120d49066a. "Iff" is not a typo, see 2a65bf32ec270484dcea4d22d3c93552dc0c24dd "Revert 'Typo: iff->if'".
2017-05-18Fix typosAndrea Gelmini
Only replaced "iff" with "if" Change-Id: Ib9dfa5c12b05500043147fe3b65f923b1b12a581 Reviewed-on: https://gerrit.libreoffice.org/37782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-18Remove parentheses around some comparisonsStephan Bergmann
...where Clang would otherwise start to emit -Wparentheses-equality as soon as the order of arguments were switched by loplugin:comparisonwithconstant Change-Id: If064c2c6e2f81478154395137138b71f2d1c6534
2017-05-18Related: rhbz#1367846 queue and merge scroll eventsCaolán McNamara
Change-Id: Ib45f61bbb35bd240829491ac8a79803222974778 Reviewed-on: https://gerrit.libreoffice.org/37779 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-18Clean up a set of RTL-related commentsTor Lillqvist
It is fairly pointless to have a comment like "--- RTL --- (mirror mouse pos)" in front of code that obviously is related to RTL anyway, like "if( AllSettings::GetLayoutRTL() )". Also, the fact that many comment were exactly the same indicates that they has been added as an in-line version control change marker. In other places, comments were informational, but no need for them to include yet another metasyntax, "--- RTL ---". Just "RTL:" works fine. Change-Id: I20feef308ed8ac9d32a8bf440fc20b442753c4ff
2017-05-18Remove sfx2 include from vclMaxim Monastirsky
(And we don't have menus with item ids from sfx2 anymore.) Change-Id: Ic4d0f3c6a2d15cfda6498617a45ba2e25b5dd7f1
2017-05-16ExternalZoom and ExternalScroll are unusedCaolán McNamara
which leads to CommandWheelMode::ZOOM_SCALE becoming unused and so touch/touch.h is unnecessary Change-Id: I7cb9a4f6af2719deb0d768e35d514b59010daf79 Reviewed-on: https://gerrit.libreoffice.org/37671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-16Remove unused mpVirtDev (vcl/textview)Julien Nabet
Unused since commit 72edb6967f245f0c99c6a61e0ce8d0a245600cba "loplugin:unusedmethods in vcl" + remove useless EraseVirtualDevice Change-Id: I1b932bb49e9f84e3ddb5c3ab69b3d1b3131233e2 Reviewed-on: https://gerrit.libreoffice.org/37685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-16Resolves: rhbz#1367846 improve gtk3 trackpad scrollingCaolán McNamara
convert number of "lines" scrolled to double and allow fractional parts of lines/columns Change-Id: Ib99c815cfc8823e22fc1d76e201903c34ed0f61b Reviewed-on: https://gerrit.libreoffice.org/37669 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-15ofz#1612 avoid oomCaolán McNamara
Change-Id: I2e327ea449dad8ec88963b6b9429e478a3332e22
2017-05-12Look for help-specific images in the new images_helpimg archiveKatarina Behrens
This requires distinguishing between 2 kinds of images: internal to help (in helpcontent2/media/ and helpcontent2/res subfolder) and external images from core repo (mostly icons) referenced in help Change-Id: If1d639c255fb802c3ee7d7eab10fc0a84324f335 Reviewed-on: https://gerrit.libreoffice.org/31417 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-12loplugin:constantparamNoel Grandin
Change-Id: I67d74072c776c32a1f91df94c621efe180baf5dc Reviewed-on: https://gerrit.libreoffice.org/37481 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12remove unused uno::Reference varsNoel Grandin
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-11ensure cow_wrapper contents are queried through a const pointerCaolán McNamara
otherwise the query will call make_unique to make this a unique copy of the underlying shared font which is a waste if the contents are going to be the same and the if branch contents are skipped. I was tempted to call the Font accessors like GetLanguage, etc. but a bunch of the accessors have two versions, a const and non-const one which behave differently so that looks like another rats nest This relates to the changes of commit 188439aac2e2e85821b4a114c1298bdf36a7b2ea Date: Fri Apr 22 23:43:52 2016 +0200 tdf#62525 vcl: use cow_wrapper for font Change-Id: Ic0661fccb414b3636308975e265fe5751476e1b8 Reviewed-on: https://gerrit.libreoffice.org/37502 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-11remove some unnecessary temporary OUStringsNoel Grandin
found with: git grep -nP 'OUString\(\s*\w+\s*\)' | grep -v new | grep -v return Change-Id: I923109b4339210aed2639e423fbc4d5f19233f02 Reviewed-on: https://gerrit.libreoffice.org/37463 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-10Resolves: rhbz#144437 make gnome-documents not crash the whole timeCaolán McNamara
accept that once initted that LibreOffice cannot be deinitted and reinited (without lots of work), but allow the main loop to quit and restart so LOKs thread can run and exit successfully, new LOK connections will restart the main loop. The buckets of global state continues to be valid the whole time this way Change-Id: Ide54c0df2ce4065f7c192ae8c2cedfaaa2b58d72 Reviewed-on: https://gerrit.libreoffice.org/37399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>