summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2017-11-07Resolves: rhbz#1505379 gtk3+X: open comboboxes block sessionCaolán McNamara
if there's none of our windows under the mouse when clicked then close the popup window. There's similar code for gtk2, but using deprecated apis, do this again but with the recommended apis Change-Id: I9d844d098d09d0109dcbbc06390562e83edda397 Reviewed-on: https://gerrit.libreoffice.org/44402 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-07Fix harfbuzz font lifecycle in CommonSalLayoutJan-Marek Glogowski
The harfbuzz font is attached to the system font face and therefore inherits its lifecycle. This means it can be used in multiple CommonSalLayout objects, so the user data parameter of hb_face_create_for_tables can't be the layout, but must be the font. This moves the special Qt5Font handling into it's own function, so accessing the switching parameter mbUseQt5 is not needed. Regression from commit b66a7cbd8491fe436126e11975c360f47ae346ed. Change-Id: Ic34cc5b60e401562c73b239a58176a59fe4bf9be Reviewed-on: https://gerrit.libreoffice.org/44398 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-07add 1-2-3 fuzzerCaolán McNamara
Change-Id: I74ab2c0d36b619fa3b7ed6d52129264930ea9553 Reviewed-on: https://gerrit.libreoffice.org/44368 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-07fix !HAVE_FEATURE_PDFIUM buildCaolán McNamara
Change-Id: Ied661aafbaf9d85b01ef57e83bbacd9f9a828f2b
2017-11-07QT5 initial keyboard supportJan-Marek Glogowski
No idea, if we can / should map those vendor specific keys, like Gtk+ does. This also prefixes the non-virtual functions with "handle". Change-Id: Id8c42651e07d33728ff6deced06a82de29aa3fad
2017-11-07QT5 queue paint update on showJan-Marek Glogowski
Something like gtk_widget_set_redraw_on_allocate. On resize of dialogs, we still get artefacts, but at least you see something without forcing an event. And since there isn't any Qt5 theming yet, we let VCL paint the menus with a border. Change-Id: Ia2ff6b199ee25e481e3fb29a921b0d3d490f1535
2017-11-07tdf#112770 Filter input on the correct windowJan-Marek Glogowski
This filters the input event on the correct window in SalX11Display::Dispatch. I'm not sure there is a point of skipping the filter for input events, which are not on our windows, as we already filter all non-key input events. Has been like that in the initial import, but whi knows what input methods do with different events... After reviewing the original "Unify SalUserEvent handling" commit e310c00709ed4fe0788aeff5142e3581d8b4d319, I found two more places, which now have handled user events wrong and fixed them. Change-Id: I50a60f6dacc3f795e659b6fbfd107548d07a3341 Reviewed-on: https://gerrit.libreoffice.org/44371 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-11-07tdf#113550 RTF import: fix incorrect text indentMiklos Vajna
Left indent was set to non-zero in the style, but direct formatting set it back to zero. Teach deduplication to remove the NS_ooxml::LN_CT_PPrBase_ind SPRM itself in case the last attribute was removed. Change-Id: I01b202f0241b02816b2b392326737b1150caffc2 Reviewed-on: https://gerrit.libreoffice.org/44385 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-07Fix memory leak for skipped Sal user eventsJan-Marek Glogowski
User SalEvents allocate an ImplSVEvent data structure, which must be freed in DispatchUserEvents, if it's skipped. Change-Id: I17874f06a2da996b6546b14dd886061e3e81f35c Reviewed-on: https://gerrit.libreoffice.org/44370 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-07add 1-2-3 wks to fftesterCaolán McNamara
Change-Id: I4deb6831a809d516d286a90903b7b89c8e07b2b0 Reviewed-on: https://gerrit.libreoffice.org/44367 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-06Removed duplicated includeAndrea Gelmini
Change-Id: I1d6d4a6ce285e46b3910f5e48b6beb1685460f74 Reviewed-on: https://gerrit.libreoffice.org/44376 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-06vcl: CppunitTest_vcl_complextext requires DejaVu fontsMichael Stahl
The TEST_FONTS_MISSING is already handling the --without-fonts case, but if we build fonts we need a dependency. Change-Id: I5164fc5c5974bbce7481b0b1ef4d6013eb9c0a11
2017-11-06tdf#108748 generate PDF preview on SwapInJan-Marek Glogowski
When including a PDF as an image, it's represented internally as a Bitmap with additional PDF data. On SwapIn, LibreOffice just imported the PDF data missing the PDF preview. The Graphic also gad the wrong image type, which results in a busy loop on master, with a strange / unhelpful STR_COMCORE_READERROR generated by SwNoTextFrame::PaintPicture. This is a workaround to generate the Bitmap on SwapIn, which will really slow down LibreOffice when importing many PDFs. I guess the job of generating the PDF previews should probably be deferred to a thread or a low priority Scheduler task, just like the general image loading is handled. Change-Id: I8084e4533995ecddc5b03ef19cb0c6a2dbf60ebd Reviewed-on: https://gerrit.libreoffice.org/43906 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-11-06add calc rtf fuzzerCaolán McNamara
Change-Id: I11838f35c9c8ae5d754b129ac0fb30a2ca2b0ab2 Reviewed-on: https://gerrit.libreoffice.org/44201 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-06vcl: fix loplugin:implicitboolconversion warningMiklos Vajna
Change-Id: I3f84396def32c657f58842647e9af5d4a48e43be
2017-11-06QT5 fix build issues & cleanupsJan-Marek Glogowski
1. Linking problem on Windows due to Windows macros via <vcl/sysdata.hxx> include 2. Drop the custom MOC target for the old KF5 plugin 3. Correctly handle QT5 build without using QFont 4. ImplJobSetup is in the VL library, not the gen plugin Change-Id: Iad97b1b9b57a8c356aaa88178aff03d0c14558c7
2017-11-06QT5 fixup non-qt5 buildThorsten Behrens
Change-Id: Ifea73d81ba3863fd6a99453cb38303eb729f6ff4
2017-11-06QT5 implement Graphics damage trackingJan-Marek Glogowski
Since we implement SalGraphics handling like the gtk3 backend, we need damage tracking to queue updates. Since there is no native damage tracking in Qt5, we have to log the damage in our subclassed QPainter, which will queue an update on destruction. Change-Id: Ife17770750a5be9959c2fc2633b422908d196869
2017-11-06QT5 implement alpha based drawingJan-Marek Glogowski
Change-Id: Ide2ef42110798ed061f7e32e49e38b6428c22c01
2017-11-06QT5 port quarz Polgon and PolyPolygon handlingJan-Marek Glogowski
Change-Id: I53807bff3db9c9e4300f03e56857381cad7c9431
2017-11-06QT5 unify Graphics constructorsJan-Marek Glogowski
Change-Id: I85ce73e0e79927fa9233230bc4a9134db4c513dc
2017-11-06QT5 always generate a QPainterJan-Marek Glogowski
Change-Id: Ie8684cd4be56fb6d88d9643a6326307590115a80
2017-11-06QT5 implement some mouse handlingJan-Marek Glogowski
Scrollwheel handling seems to work with mouse, but not correct when using a touchpad - at least for me. Change-Id: I4f1b32205516912e31f9c52605ba2bf4ec6059a8
2017-11-06QT5 port more of the gtk3 positioning codeJan-Marek Glogowski
Change-Id: I36631c332ddffbca73768cdc4a596213e0b026ef
2017-11-06QT5 rotate generated bitmapJan-Marek Glogowski
QImage stores the scanlines from top => bottom. Change-Id: I0a176066ab631179b8460b61a6c2b07ad2179d31
2017-11-06QT5 implement cursor supportJan-Marek Glogowski
Change-Id: Ie47b8def36d67255b61eab04bc7e3818bb1d8ea8
2017-11-06QT5 first stab on implementing CommonSalLayoutJan-Marek Glogowski
CommonSalLayout doesn't rally have an interface. It's cluttered with #ifdefs. Currently we have to move the Qt5Font into the VCL library. Someone should refactor this... Doen't render any text yet, but reports some sizes. Eventually that would cut down the public interface again. Change-Id: I12f32affb05b37e070c6cbc80db01779f84590b6
2017-11-06QT5 implement cairo rendering pathJan-Marek Glogowski
Instead of QImage, this uses cairo_surface_t internally and just blits the composed image in the Qt5Widgets paint function. To enable this rendering path set SAL_VCL_QT5_USE_CAIRO. Change-Id: Ieddda9bad2596ce46d7d07d4d7060e40d44997db
2017-11-06QT5 rename from KF5Jan-Marek Glogowski
Move out of unx, as this will eventually compile on other OS platforms. At least currently it doesn't contain platform dependant code. Change-Id: Iea0bebf574201881ea158381fe7ba8af2a9a6488
2017-11-06KF5 implement some more stuffJan-Marek Glogowski
Change-Id: Icc322ea94708f0799011a2e4ee1499c184254690
2017-11-06KF5 add initial SalBitmap implementationJan-Marek Glogowski
Change-Id: I1f7b1894272096a0f0b23b63c3eeae310fb28c6f
2017-11-06KF5 add initial SalObject implementationJan-Marek Glogowski
Change-Id: Id8d901e9d283ee93cc952e6af267dbafd7f9b9aa
2017-11-06KF5 add FontFace implementationJan-Marek Glogowski
To pass the "Application error: no fonts and no vcl resource found on your system" failure from OutputDevice::ImplInitFontList. Just saw there is a SAL_NO_FONT_LOOKUP, which probably also would have helped. Change-Id: I2c818313c4f8b0f1d36242281e5c51973315b642
2017-11-06KF5 minimal graphics supportJan-Marek Glogowski
This way we pass the "No mpGraphics set" message. Change-Id: I097a823c295b251304dfbec8a71eba31b3d2b9ef
2017-11-06KF5 add QWidget to Kf5FrameJan-Marek Glogowski
Change-Id: I53845519d0dda324c9544f057b18c6afd4cf858a
2017-11-06KF5 correctly initialize QApplicationJan-Marek Glogowski
This turned out more tricky then expected. Originally the KAboutData was assigned to a non-existing QApplication object. Somehow this was prevending the later crashes, if the QApplication was initialized before KAboutData and we were creating QWidgets. The problem turned out to be the referenced arguments to QApplication. While we already passed the command arguments from allocated / heap memory, the argc argument was just the local stack variable! The simple fix is to allocate an int to pass to QApplication and the crashes are gone when assigning KAboutData after QApplication. Also removes some Qt initialization warnings on startup. Change-Id: Ic5b1eea578039fd5875097d23de587b970a6dfca
2017-11-06KF5 seperate Qt5 detection from KF5Jan-Marek Glogowski
Splits the configure checks into a Qt5 and KF5 specific part. Change-Id: I0a616ba031e1f7fd0385219ac48179adb4bdaf14
2017-11-06KF5 add event processing codeJan-Marek Glogowski
Change-Id: Ida7c4858cb770d1ce2d05aa6adc332c89bddd795
2017-11-06KF5 initial VCL pluginJan-Marek Glogowski
Something that compiles, basically just interface stubs. All used Svp classes don't use any cairo. Change-Id: I9a8858c930989438cc2a3f3346c01a7abc579d62
2017-11-06mbIDAT is actually set when mbIDAT is complete, not when startedCaolán McNamara
Change-Id: I8d733ab07b6e989c05f131b61441da7e6d124772
2017-11-06fix png fftester pathCaolán McNamara
Change-Id: Ia25bc32dda97ef3413b468142176c1197bd5e8c7
2017-11-06loplugin:constparams in various(2)Noel Grandin
Change-Id: I533a7eb724b15e168a28dc92cd5962a39bc96e7c Reviewed-on: https://gerrit.libreoffice.org/44313 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-06convert various vcl system fields from unsigned long -> sal_uInt32Noel Grandin
Change-Id: Iaa08ecb3a9a17f384267f2b685a4b672277db1ca Reviewed-on: https://gerrit.libreoffice.org/44317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-05PPDCache: fix segfault due to access after deleteAshod Nakashian
Regression introduced in: commit afe4d2527ec72e7493a2b1431559652ef45bebab Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Wed Oct 18 09:43:21 2017 +0200 use std::unique_ptr in PPDCache Removing a naked pointer before inserting a possibly existing one in a container is safe. This insured uniqueness (as the comment suggests). However with unique_ptr, removal before inserting deletes the pointer (when it exists), and the insertion now taints the container with a wild pointer. The fix is to skip adding if the pointer is already in the container and add only when missing. Change-Id: Ifc6b517451abb564949ccadfee10d98bf827540d Reviewed-on: https://gerrit.libreoffice.org/44333 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-11-04Replace lists by vectors in SalGtkFilePicker (vcl)Julien Nabet
Change-Id: Iaf6115080c7b22e2e5b7cbc04314a48ad7fecdae Reviewed-on: https://gerrit.libreoffice.org/44312 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-04Related: tdf#113160 set parent of warning dialogs during loadCaolán McNamara
to the new window frame being constructed that (may) contain the progress bar, that way such modal dialogs affect the loading document window and not whatever window happens to be active Change-Id: I1c7d3185e47fa316eef003b80d18b31d341b79d6 Reviewed-on: https://gerrit.libreoffice.org/44269 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-04Make Windows error reporting more robustMike Kaganski
https://msdn.microsoft.com/en-us/library/ms679351 describes that "it is unsafe to take an arbitrary system error code returned from an API and use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS" Previously in case when an error string would contain inserts, function returned error, so the error message wasn't shown (at least it didn't crash, thanks to nullptr as the function's last argument). As the function may fail, we now pre-nullify the buffer pointer to avoid dereferencing uninitialized pointer later (though at least for some Windows versions, the function nullifies the pointer in case of FORMAT_MESSAGE_ALLOCATE_BUFFER, but there's no explicit guarantee of this). Also release of allocated buffer is changed to recommended use of HeapFree. The code that doesn't make use of OUString is left directly calling FormatMessage, to avoid introducing new dependencies. Where it makes sense, we now use WindowsErrorString from <comphelper/windowserrorstring.hxx> Change-Id: I834c08eb6d92987e7d3d01e2c36ec55e42aea848 Reviewed-on: https://gerrit.libreoffice.org/44206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-04gtk3: fix popover placement in RTLCaolán McNamara
Change-Id: I8c20b277ce943f915941b2af9353f98c66f9065c Reviewed-on: https://gerrit.libreoffice.org/44271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-03Resolves: tdf#113160 changing all warning dialogs to non-modal is unsafeCaolán McNamara
existing code doesn't expect that so stuff crashes partial revert of... commit db6b703d391838c481fd090065f6d329edcd4efa Date: Thu Aug 24 18:32:38 2017 +0200 Allow non-modal Dialogs during FileImport/Load Change-Id: I152feb849186cf035664a700d3f94ee049cdf6d3 Reviewed-on: https://gerrit.libreoffice.org/44227 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-03loplugin:constparam in vcl,svtoolsNoel Grandin
Change-Id: I7a3eb2bfda869e9e66db919f929ead60cf8890a4 Reviewed-on: https://gerrit.libreoffice.org/44209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>