summaryrefslogtreecommitdiff
path: root/vcl/unx
AgeCommit message (Collapse)Author
2014-03-21coverity#708662 Uninitialized pointer fieldCaolán McNamara
Change-Id: Icfa4ee2a525016775b5917143b5c4333212db362
2014-03-21coverity#705331 Missing break in switchCaolán McNamara
Change-Id: Ie7416ac3b6cadce8e07d87b290869c0101c39783
2014-03-21coverity#705973 Dereference before null checkCaolán McNamara
Change-Id: Iee76f24ad73d103507594fb1433fba7d1294d759
2014-03-21coverity#708674 Uninitialized pointer fieldCaolán McNamara
Change-Id: Ie48cefda1ac7f626e8b5f969209c6960c124a889
2014-03-21coverity#735563 Logically dead codeCaolán McNamara
Change-Id: Idebbefe8c3d18df559fe4d9635dc407f51ec9f1d
2014-03-21move remaining padmin dialogs into vclCaolán McNamara
and so padmin is no more Change-Id: I554cefa8b38581daad8a78bafa167448b0a0ef61
2014-03-21move the cups password dialog from padmin to vclCaolán McNamara
now we don't have to dlopen padmin to get it so we can drop that complicated stuff. Change-Id: I2f01bd104aae8f17ada9a445da653b441a927c70
2014-03-21Avoid possible resource leaks by boost::scoped_arrayTakeshi Abe
Change-Id: I4287fa05e35c132fb6e11d95dd17c3d3bf29defc
2014-03-21drop spadminCaolán McNamara
Change-Id: Ie10ee80f1d35b40c0baf9d7ba5c1181b52405b5f
2014-03-20cosmetic: split PhysicalFontFamily/Collection out of outdev3.cxxNorbert Thiebaud
Change-Id: Iae8eb15413c0c069c14edd92c94ecb0113d9d371
2014-03-20cosmetic: split PhysicalFontFace class it its own source/headerNorbert Thiebaud
oudev,2,3,4,5,6 are a dumping ground for a lot of things chipping at it one class at the time... organize the #include of the impacted source while at it. Change-Id: I57bbb1f9e3c6b2ac6b3ca127e5976bf16f3e3cf8
2014-03-20rename ImplDevFontList to PhysicalFontCollectionNorbert Thiebaud
again, convergence of teh naming with what is normally used in the underlying native API, where FontFace ) FontFamily ) FontCollection Change-Id: Ieb098b782ea828a3365f00d07914b9566278caba
2014-03-20disallow disabling cupsCaolán McNamara
which means that there is only one option left in "add a printer" in spadmin, that to add a pdf so remove the intermediate page Change-Id: I5f19b526b5da9307bec77c731f305280b0ebecc3
2014-03-20Resolves: #i49980# Autosense fax4cups devices and configure automaticallyCaolán McNamara
If there is a "Dial" ppd key then it's a fax device. If the Dial is set to "Manually" then ignore that it's a fax device and don't prompt for a fax number. If we have a fax number, then set the jobname to the number given that "printing will result in sending the fax to the number contained in the job name" Remove the weird and wonderful non-macosx-unix-only, non-pdf-print-backend, text "scraping" of phone numbers out of the print out in the @@#PHONE@@ format. Allow the phone entry dialog to accept multiple fax numbers separated by ; Change-Id: Ie1d84b68584e82df15ceda5f32c7c75086b035c8 Related: rhbz#159153, #i49981#, #i49920#
2014-03-19coverity#738941 Uninitialized pointer fieldCaolán McNamara
Change-Id: Id7d9e1700c513ffe72ffc4fa8d369d07370a4db9
2014-03-14KDE4: prevent blocking in Display::YieldJan-Marek Glogowski
SalX11Display registers a Yield handler, which splits check and and processing into two functions, which both lock the yield mutex. Normally this no problem, but during a Drag'n'Drop operation the D'n'D thread also checks and processes XEvents (for D'n'D). So the XNextEvent in Display::Yield will actually block, if the seen XEvent was for D'n'D and was already processed. Change-Id: I9f8d96d4f9986997cbe150a2b66bc767b4bbc2f1
2014-03-14KDE4: add Qt4 glib ExcludeSocket runtime checkJan-Marek Glogowski
Add a runtime check and configure warning to disable KDE4 native file pickers, if the Qt4 glib dispatcher doesn't honor the QEventLoop::ExcludeSocketNotifiers flag. This way polling the QClipboard using the event loop won't crash LibreOffice with recursive paint events, See https://bugreports.qt-project.org/browse/QTBUG-37380 Change-Id: I5cad30ead74571e49a075c084cca7a19acff7523
2014-03-14KDE4: change eventLoopType enum to glib boolJan-Marek Glogowski
Just check for glib; it's the default in later Qt4 versions on unix. Change-Id: Ia99466e9010eb835bea0c3c4420da3c8b3cd4671
2014-03-14Revert "Rewrite Qt4 based nested yield mutex locking."Jan-Marek Glogowski
This reverts the unx/kde4/KDEXLib.cxx part of commit 13a34f4c6307d1bd2443cbf3fbd83bfdd8cdbafb. Conflicts: vcl/unx/kde4/KDE4FilePicker.cxx vcl/unx/kde4/KDEXLib.cxx Change-Id: Ica8a0f678f080ae7d763bb7da7761d20ceec328c
2014-03-14Revert "fdo#67011: Run Display::Yield through KDEXLib::Yield."Jan-Marek Glogowski
This reverts commit 95f60222e75486336b6569afa8f34d60b51c94ad.
2014-03-14Revert "KDE4: sleep in yield for native file picker"Jan-Marek Glogowski
This reverts commit 380f3b4b6cbbe8e82b58ddf55e95c5005307b51f. Conflicts: vcl/unx/kde4/KDEXLib.cxx vcl/unx/kde4/KDEXLib.hxx Change-Id: I8a201c89be63cebab7401124002261be23e049c7
2014-03-14Resolves: coverity#1078567 help coverity outCaolán McNamara
so it know that its the same rPPDCache in use to avoid various warnings Change-Id: I89cb7830f375f1907b2457bd05fd2df5d36c3696
2014-03-13vcl: prefer passing OUString and OString by referenceNoel Grandin
Change-Id: I6c2c6f597ca62c004ad7dc606cef3a3b10e810b6
2014-03-11coverity#441225 Dereference null return valueCaolán McNamara
Change-Id: I9ff48e869cd03847d5338c5f8fb6acceee522e34
2014-03-10fdo#73115: Always run timeouts as eventsJan-Marek Glogowski
Right-click popup menus run click events throught the LO main loop. In case of KDE4 the LO main loop is run by a timer in the main thread, with Qt::DirectConnection execution. If the timeout actually starts a nested event loop for a new dialog, the timer is blocked, the nested mainloop detects it was started from the timeout and drops the blocked timout from polling, which blocks any further LibreOffice event loop processing. This changes the timers to Qt::QueuedConnection, so they always generate an event and are processed by the Qt event loop. Change-Id: Ie626b22be3d8f9b8934bcc5e9e0e67a365549cfc
2014-03-09Avoid possible resource leaks with boost::scoped_ptrTakeshi Abe
Change-Id: Ic6e8482dfb022f32532b5c1a6e045092c3485106
2014-03-07coverity#735999 Dereference after null checkCaolán McNamara
Change-Id: Icd48e7051fa9eddedcf66c5589cdbd50ec98b843
2014-03-06coverity#708652 Uninitialized scalar fieldCaolán McNamara
Change-Id: Ideadc6cd30edeb993ca19fd28f97c8665c6bb4a6
2014-03-05Simplify resolution calculationKeith Curtis
Removed unnecessary complexity with resolutions because X in 2014 isn't telling the truth about the size of the screen. My brand-new 13" laptop with the latest X and everything apparently has a 33" x 18" monitor. So if the data isn't reliable, just use 96 dpi anyway which is a very reasonable default. Also got rid of exact resolution member variable. LibreOffice can just always think it has exact resolution. If it doesn't, then it just means the code needs to be smarter, not that we need a flag about whether the data we have is "exact" or not. Change-Id: Ic41bdc3a82dbd1fdb6a987d6dc49adad8194ce14 Reviewed-on: https://gerrit.libreoffice.org/8166 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-03-03Use cstdlib std::abs instead of stdlib.h absStephan Bergmann
...because the latter lacks the abs(long) overload in some popular environments, cf. <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60401> "stdlib.h does not provide abs(long) overload." Similarly, stdlib.h lacks the abs(float), abs(double), abs(long double) overloads compared to cmath there, whose use was apparently intended in sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx. Rewrote that to use CPPUNIT_ASSERT_DOUBLES_EQUAL instead, which revealed that the comparisons need rather large deltas of .1 resp. .2 (which the original code hid with an implicit conversion to integral type, thus using an effective delta of 1). Discovered with -Wabsolute-value ("absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value") recently introduced on Clang trunk towards 3.5. Change-Id: I4c41575ffdccb2944498b662bd3a53fd510cb0c0
2014-03-03KDE4: evaluate frameWidth in the Qt threadJan-Marek Glogowski
When opening a document via Java UNO without a running LO instance, one gets the following Qt error messages: CE> QObject: Cannot create children for a parent that is in a different thread. CE> (Parent is Oxygen::WidgetStateEngine(0x8deb878), parent's thread is QThread(0x8d6cf70), current thread is QThread(0xa8fa7fc8) CE> QObject::installEventFilter(): Cannot filter events for objects in a different thread. CE> QObject::installEventFilter(): Cannot filter events for objects in a different thread. CE> QObject::installEventFilter(): Cannot filter events for objects in a different thread. This happens, because the Java UNO call is processed in the first / Qt thread while document loading happens in a second thread. Document loading actually just calls getNativeControlRegion, which should not involve any drawing. But the KDE4 backend does some style processing to get the correct frame width (QWidget::ensurePolished(), which uses GUI based events and need to be processed in the Qt thread. Change-Id: I344d5089d958963c48a9a8a84bfa9fe8f092b75a
2014-03-03fdo#45935: try hard to paint a frame for menusJan-Marek Glogowski
Current Oxygen theme doesn't draw frames for menus, but uses shaped and "colored" background images. This workaround paints the window and menu frame for menus. Any frame seems to be better then no frame at all. Change-Id: I4d553ea58cac2729826f8395cb2597fa200187b6
2014-03-03KDE4: Report correct check and radio item sizesJan-Marek Glogowski
Use the correct sizs from the current style. Change-Id: I7e163bdc8d467baf2d6e3d0d2bc3e1da7558cf42
2014-03-03KDE4: sleep in yield for native file pickerJan-Marek Glogowski
As it seems to be the only way to poll the clipboard, reintroduce m_pApplication->clipboard()->setProperty( "useEventLoopWhenWaiting", true ); To prevent crashes, disable event processing in the Qt thread while the dialog is open. Instead this applies the same workaround as the Windows backend to sleep a ms, which keeps the FP dialogs more usable, but feels like a horrible workaround. This is still slower then running processEvent in Yield but still much better then the current situation. Change-Id: I10c422f1c0d7448d4a7ad28e57a32ed2cb42f48f
2014-03-03KDE4: Drop Qt 4.9 supportJan-Marek Glogowski
I don't think there will ever be any 4.9 release, so drop all the unused code. Change-Id: I4b72de96e6064240582cd83d4e45547096a2efb0
2014-03-02coverity#735998 Dereference after null checkCaolán McNamara
Change-Id: I882bcb2cdde8697ffb5272fd80e2fd602ed54743
2014-03-01fdo#74064 The filename gets properly highlighted in the Save As dialog.Rachit Gupta
The filename was missing the extension which was causing problems. The extension is retained now by disabling the autoextension checkbox. Change-Id: If913124c22265da2bacb043d83386fd8f5710ca8 Reviewed-on: https://gerrit.libreoffice.org/8364 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-28Rename GetGraphics to AcquireGraphicsChris Sherlock
Currently there are a number of classes that have a function called GetGraphics(). It returns a SalGraphics instance if one is available for the sole use of the caller. Some variants keep a pool of available SalGraphics and return one not currently in use by anyone, creating extra ones on demand, sometimes up to a set limit and returning NULL on reaching that limit of simultaneously in use SalGraphics. This is confusing. What is really happening from the perspective of the calling is that is that we are attempting to *acquire* ownership of a SalGraphics instance. Therefore, rename GetGraphics to AcquireGraphics() which returns a handle to a SalGraphics if we can acquire a free graphics instance, and NULL if we cannot, which makes it cleared that ReleaseGraphics should be called on the result of AcquireGraphics. The classes that were changed to include the new acquire function are: * SalFrame * SalVirtualDevice * SalInfoPrinter * PspSalInfoPrinter * X11SalFrame * X11SalVirtualDevice * GtkSalFrame * KDESalFrame * TDESalFrame * WinSalFrame * WinSalInfoPrinter * WinSalVirtualDevice * SvpSalFrame * SvpSalVirtualDevice * AquaSalFrame * AquaSalInfoPrinter * AquaSalVirtualDevice Change-Id: Ic39c08a4bcaf665ae08ba2808cd03b0e80790c46 Reviewed-on: https://gerrit.libreoffice.org/8070 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-28bool clean-up fixupStephan Bergmann
Change-Id: I0a302d7f91ef07992f95a8ccd48efec862519ab1
2014-02-28WaE: implicit conversion (IntegralCast) from bool to 'int'Tor Lillqvist
Change-Id: I8094180c898c89351caa4805e395c3f3f2b0a946
2014-02-28WaE: implicit conversion (IntegralCast) from bool to 'int'Tor Lillqvist
Hack to avoid false positive from loplugin. Change-Id: I2b25f06299e40ea0cb155a6b748f38e1cb1ffc0d
2014-02-28WaE: implicit conversion (IntegralCast) from bool to 'long'Tor Lillqvist
Change-Id: If0d7ca02e8ecbc15eabc7807a71554ce11d92552
2014-02-28WaE: implicit conversion (IntegralCast) from bool to 'int'Tor Lillqvist
Change-Id: Ifaeeb0f01dbcd0225ee50c15d0b2417f99b1bd0e
2014-02-28sal_Bool -> bool in mostly vcl moduleChris Sherlock
Conflicts: include/vcl/settings.hxx svtools/source/table/tablecontrol_impl.cxx sw/source/core/frmedt/fecopy.cxx vcl/inc/canvasbitmap.hxx vcl/inc/headless/svpframe.hxx vcl/inc/unx/salframe.h vcl/inc/win/salframe.h vcl/inc/win/salprn.h vcl/inc/win/salvd.h vcl/osx/DragSource.cxx vcl/osx/DragSource.hxx vcl/osx/DropTarget.cxx vcl/osx/DropTarget.hxx vcl/osx/OSXTransferable.cxx vcl/osx/OSXTransferable.hxx vcl/osx/clipboard.cxx vcl/osx/clipboard.hxx vcl/osx/salprn.cxx vcl/qa/cppunit/canvasbitmaptest.cxx vcl/source/components/fontident.cxx vcl/source/control/edit.cxx vcl/source/control/spinfld.cxx vcl/source/gdi/gdimtf.cxx vcl/source/gdi/virdev.cxx vcl/source/helper/canvasbitmap.cxx vcl/source/window/dockwin.cxx vcl/unx/generic/dtrans/X11_selection.hxx vcl/unx/kde/UnxFilePicker.cxx vcl/unx/kde/UnxFilePicker.hxx vcl/unx/kde4/KDE4FilePicker.cxx vcl/unx/kde4/KDE4FilePicker.hxx vcl/unx/kde4/KDESalFrame.hxx Change-Id: I9866d985da86dea2a56feff23f91c1467a1636b0 Reviewed-on: https://gerrit.libreoffice.org/8219 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-28debug only code SalDisplay::PrintInfo()Noel Grandin
Change-Id: I9ead37ff69dc7198faae6758a346111ed1d029e3
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26Remove visual noise from vclAlexander Wilms
Conflicts: vcl/source/app/settings.cxx vcl/source/window/dockmgr.cxx vcl/source/window/dockwin.cxx vcl/source/window/floatwin.cxx vcl/source/window/toolbox2.cxx Change-Id: Ie67681549a76e77064b09d4b5bf80fe4c6010341 Reviewed-on: https://gerrit.libreoffice.org/8339 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-25Add config_libraries.h definitions to get library names easily.Matúš Kukan
Works for libmerged too, so we can get rid of LIBO_MERGELIBS. And remove few more #defines in vcl. It's generated by gbuild, so probably abusing config_host directory. Open to improvements. Change-Id: I87ab109bf109e42751766011daf076e9cdf8f5ee
2014-02-23Remove unneccessary commentsAlexander Wilms
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-21Adapt vcl to various loplugin warnings on Mac OS XStephan Bergmann
Change-Id: I4553ce218fbcf2ac681b284c71e7d558a451511c