summaryrefslogtreecommitdiff
path: root/vcl/source/app
AgeCommit message (Collapse)Author
2014-11-05idle: implement ProcessAllIdleHandlers.László Németh
It is often useful to flush all pending idle / GUI work for testing and/or profiling - so make that easy to do with this new method. Also tag idle Timers with a boolean, for ease of use. Change-Id: I57e883be8fe8637b3715008e8074d0fa258ca0c3
2014-11-05Basic Idle handler implementationTobias Madl
An idle handler will ultimately be a zero time timeout with prioritisation layered on top of that. Change-Id: I3f0802d5001172fc7b8409274bc5a3632e5dad34
2014-11-01vcl/source: get rid of redundant svsys.h includesDouglas Mencken
+ adapted for WNT (it does really need it for app/settings.cxx) Change-Id: I33a65d24f7c6c46a36718e4421ae88de180a9739 Reviewed-on: https://gerrit.libreoffice.org/11814 Reviewed-by: Douglas Mencken <dougmencken@gmail.com> Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-10-31drop KeyCode::IsDefinedKeyCodeEqualNoel Grandin
because it's implementation is the same as operator== Change-Id: If9b63abcd13f899735d59d85be3da54406a6e324
2014-10-30Fixed typos. No automatic tools (sed, and so on).Andrea Gelmini
Change-Id: Ia43976d84eede6f699381bc4f3daf89b95e4cb4f Reviewed-on: https://gerrit.libreoffice.org/12150 Reviewed-by: Bryan Quigley <gquigs@gmail.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-10-29remove unnecessary 'using namespace rtl' declarationsNoel Grandin
It turns out that almost none of them were necessary. Change-Id: I1311ed28409c682b57ea8d149bcbaf2c49133e83 Reviewed-on: https://gerrit.libreoffice.org/12133 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-27cid#705053 Dereference after null checkNoel Grandin
re-arrange the code to help coverity out Change-Id: Iddc9284cbdcbaae7a0dc17e62d0e8f4b4832297c
2014-10-06Don't unintentionally unload the tk libraryTor Lillqvist
Fixes the root cause for the crashes in vcldemo and ui-previewer that indirectly were fixed by 0b7631bccb2a47ab71a0c1edbabe8a5892ff5f9c and f5cfed29b05184894ec6ad2d14f73bff0b5a2783. Those two commits are now reverted. Change-Id: If5dac37f032d2b74c977562c339e9799bbc4454c
2014-10-02coverity#1242494 Resource leakCaolán McNamara
Change-Id: I4956890da9978381e2de7e8b1af37495884d4965
2014-10-02Improved striped rows implementationSamuel Mehrbrodt
Some renaming, use variable for row background when not striped Change-Id: I5b36fc751aa163dbb127406d7aefad01974fa371
2014-10-01fdo#82577: Handle TimeNoel Grandin
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11 Time typedef. Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866 Reviewed-on: https://gerrit.libreoffice.org/11684 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-30Improve SvTreeListBox classPalenik Mihály
It is possible to set alternating rows. Expert Configuration dialog use it. Change-Id: Ie43a87ca05be73fdb345fa4866f31c2c36b7cdf1 Reviewed-on: https://gerrit.libreoffice.org/11663 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-09-29fdo#59299 Personas for bottom toolbarsMichael Jaumann
Change-Id: If823964bf3bb67563504db61b6c5d557cab89243 Reviewed-on: https://gerrit.libreoffice.org/11609 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-09-29loplugin: cstylecastNoel Grandin
Change-Id: I58ec00d6f8a4cc6188877db1330c5e32c9db12e5
2014-09-25vcl: avoid crashes from Timer Queues on shutdownMichael Stahl
The timer callback SalTimerProc can be called after DeInitVCL has deleted the SalInstance, and crash. Avoid that by calling WinSalTimer::Stop() and also using the INVALID_HANDLE_VALUE parameter which waits until the timer callback is done executing. Change-Id: Ia4cf2cf9dc48904d077e0a691e14107256c50ded
2014-09-23fdo#84000 - unwind recursive timer issues.Michael Meeks
Seemingly timers were not being issued or re-queued. Handle recursion issues in the main thread, not in the timer thread. Change-Id: I4f49341115bb7c7b1613e61f77a467154818a8aa
2014-09-23fdo#82577: Handle WindowNoel Grandin
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-18fdo#82577: Handle FontNoel Grandin
Put the VCL Font class in the vcl namespace. Avoids clash with the X11 Font typedef. Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
2014-09-17Reduce ColorValueSetMaximumRowCount to 20 from 40Krisztian Pinter
Change-Id: Id37698c20e5ded3034b62b753d25964541643fd7
2014-08-26fix nasty memory leak on shutdownMarkus Mohrhard
This makes the output of Lsan so much more useful. Change-Id: I6c7624d4f6f767454c125c00ce037f5d2ec3cd61
2014-08-23fdo#82577: Handle KeyCodeTor Lillqvist
Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11 KeyCode typedef. Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028
2014-08-22remove special casing for default theme in vclBjoern Michaelsen
Change-Id: I4d7a37ab9b31fcce7704f07d883d6f7806f066ec
2014-08-20vcl: use enum for complex text layout constantsNoel Grandin
Since these constants are bitfield flags, we define some methods to make working with them reasonably type safe. Move the definitions to outdevstate.hxx, since we need the values there, and that appears to be the "root most" header file. Also dump TEXT_LAYOUT_BIDI_LTR constant, since it means the same thing as TEXT_LAYOUT_DEFAULT (ie. 0), and leaving it in causes people to write weird code thinking that it's a real flag. Change-Id: Iddab86cd6c78181ceb8caa48e77e1f5a8e526343 Reviewed-on: https://gerrit.libreoffice.org/10676 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-08-18missing InfoBoxCaolán McNamara
Change-Id: I67e6e60e5a03696ec27b11afaa62ea443c5924ce
2014-08-18ErrorBox->MessageDialogCaolán McNamara
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
2014-08-14Added feature of clearing the registry in case something goes wrong.Rachit Gupta
If the installed extension is removed, then the persona settings in the registry are cleared to avoid odd look in the UI. Change-Id: Iaa99f4c87ec6ce4a663e1a3cebb3f8ff45e02079
2014-08-14Moved the personas installed through extensions handling to 'own'.Rachit Gupta
Change-Id: I12baaf22bfad73e228d3ed55dcf365f8eba9cf0a
2014-08-14The Personas can be install through oxt extensions.Rachit Gupta
The user can install an oxt extension and choose his/her theme from the Personalization page. * Created a template in Common.xcs registry to hold the values for the PersonasList set. * Added 3 buttons to personalization_tab.ui to incorporate the latest 3 personas installed through extensions. * Currently, only 3 installed personas are shown alongwith the default available personas. Change-Id: I30a40ae48d17f4ed8caef33854ef88afcbec5a54
2014-08-14Added functionality to apply default themes.Rachit Gupta
* The themes are stored in the share folder under the personas directory in the gallery. The information is stored in a personas_list.txt which contains the info in the form headerFile;footerFile;textColor;AccentColor for the default themes. * Changed the personalization_tab.ui to include _three_ buttons to show the default images. * Changed the vcl/source/app/settings.cxx to read the persona information properly in the case of default personas. * Some variable name changes. Change-Id: Ib5f2167729a5fb7eb8061925679560accb934a44
2014-08-11Resolves fdo#79278: not too dark, not too bright background colorAdolfo Jayme Barrientos
This patch is based on Caolán's one at 68075a61c28a5c72429f78776a822ed45fdcb4a7 I've chosen the background color used in Windows program Paint.NET as our default background color. It's a nice compromise that doesn't look out of place anywhere. Change-Id: I5081201043be4a7ad6152d1ce59451daa4ece1ac Reviewed-on: https://gerrit.libreoffice.org/10527 Reviewed-by: Stefan Knorr <heinzlesspam@gmail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-on: https://gerrit.libreoffice.org/10520 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-08-08vcl: don't throw misleading exceptions on every failed accessMichael Stahl
During the build different instances of gengal will create a temp file called "instdir/share/config/cdefghij.klm", and enumerate the directories in instdir/share/config; it may happen that the enumeration sees the temp file, and it is removed before fetchFileStatus is called, resulting in E_NOENT rc and the exception. The FileIsValidIconTheme() should be able to handle most errors here. (regression from 60954a8a96a66ff11e06b850838f3d16e8e1625f) Change-Id: Id9361a37b8569d01509efcc8cda2bc17e9eabcd8
2014-07-21Our log area checking Clang plugin requires it to be a string literalTor Lillqvist
And even if that wasn't a problem, we don't use a macro for the log area anywhere else in the codebase, so why suddenly introduce such a convention here? What's the gain from that? On the contrary, haven't we been *reducing* the amount of pointless #define FOO "foo" style stuff? Change-Id: I1247dc499136cdf3ae1921e6ffe7c7f63d57cfc1
2014-07-21fdo#81532 Handle symlinks to icon themes correctlyTobias Lippert
- added logging for icon theme scanning. Change-Id: I799c5fc09879411020142f7808da0d9f2f63dc17 Reviewed-on: https://gerrit.libreoffice.org/10406 Tested-by: Rene Engelhard <rene@debian.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-07-11new loplugin: externalandnotdefinedNoel Grandin
Find "missing headers," where a function is declared directly in the .cxx (as extern) and not defined, and should arguably instead be declared in an include file. Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-06-30use VCL_HIDE_WINDOWS env on Mac to 'simulate' headless mode on MacNorbert Thiebaud
Building, and running the unit/subsequent test on Mac cause massive amount of flashing windows creation/destruction that make building with test very annoying on a box used for other purposes. This patch prevent the windows to be actually displayed hence mitigating the problem Change-Id: Ied2a36699b50856e0c4e6b618212481796ec99d3
2014-06-28vcl: don't do expensive desktop probing in headless mode.Michael Meeks
Change-Id: I10d6493997b4f3bfab769340c990c01a26f3da20
2014-06-28Avoid loading persona images in headless mode.Michael Meeks
Change-Id: Ie3bb69d93b97deab0830c2b45ba3428a8931a949
2014-06-27tweak assert so comment appears in abort messageCaolán McNamara
Change-Id: Ibf78e5cd1620f0b61cae030e3870be4a6f87e71d
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-09gbuild: remove config_libraries.h and gb_Helper_generate_config_librariesMichael Stahl
This much ugly complexity, generating a header on every gbuild startup etc. is really not warranted for 6 callers of the generated macros. Also, the Win32 make has problems with the quoting. Change-Id: If945e09c1730e52174a6084677842dc611d66b2f
2014-06-04DeInitVCL at end of testsStephan Bergmann
This required some changes to the framework: * Init-/DeInitVCL is no longer done per individual test in BootstrapFixture, but once per CppunitTest invocation in a new vclbootstrapprotector (similarly to the exisiting unobootstrapprotector). CppunitTests that need VCL now need to declare gb_CppunitTest_use_vcl. * For things to work properly, the UNO component context needs to be disposed from within DeInitVCL (cf. Desktop's Application::DeInit called from DeInitVCL). The easiest solution was to introduce an Application::setDeInitHook (where the hook is called from DeInitVCL) specifically for vclbootstrapprotector to call. * PythonTests don't (yet) call DeInitVCL; they still hook into BootstrapFixture's original test_init functionality (to call InitVCL), and do not make use of the vclbootstrapprotector. Change-Id: I4f3a3c75db30b58c1cd49d81c51db14902ed68b2
2014-05-22Avoid including <config_features.h> in <vcl/svapp.hxx>Tor Lillqvist
Change-Id: I711621c89e8f75d4450867e303ccdc8017bcd9d7
2014-05-22Initial cut at some infinite monkeys work.Michael Meeks
Change-Id: I71c7fe027262305893d8eabee94a726f4aa909d6
2014-05-13vcl: Move ImplDelData functions to app/svdata.cxxChris Sherlock
Change-Id: I5b0ef6a1ab77dec1aef0feb0a64d985c1a44820c
2014-05-09Revert font initialization fooCaolán McNamara
this reverts 081a0854635f4bc9f6f743ef4e2675c208405f74 because the heights and widths of the non .ui-converted dialogs are all too low and everything is squished in them Change-Id: I103eda4b3d43365c02ecedb6f37b995a682b2cf9
2014-05-08RFC: add IsValueChangedFromSaved to VCL button and listboxNoel Grandin
Add a method bool IsValueChangedFromSaved() to the various Button and Listbox classes. Use it to simplify code like if ( maBoldAppFont.GetSavedValue() != TriState(maBoldAppFont.IsChecked()) ) to if ( maBoldAppFont.IsValueChangedFromSaved() ) Change-Id: I26b291d0980237497063ee301d63a49c7d2bc227 Reviewed-on: https://gerrit.libreoffice.org/9250 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-05-07Handle non-initialized pImplSVData in InitAppFontDataChris Sherlock
If pSVData->maWinData.mpFirstFrame is null in Application::InitAppFontData() then we need to create a new WorkWindow. Change-Id: I6665ff6525321554c8fd4943ec623978ce35f168 Reviewed-on: https://gerrit.libreoffice.org/9272 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2014-05-07The opaque PostUserEvent IDs are actually pointersStephan Bergmann
...so declare them as such. This avoids the recurring mistake of storing such IDs as sal_uInt32, truncating in 64 bit environments, causing RemoveUserEvent to potentially not remove the event, it thus firing "too late" and probably causing a crash. While at it, consolidate the trivially unnecessary overloads of both Application::PostUserEvent and Window::PostUserEvent. And in each of them, it looks like deleting the mpLink member was missing from the failure branch. Change-Id: Iab13afbb06e12ac15dec6a6b5b85a7e402a3c654
2014-05-07VCL: make it more clear that this is a static function we are calling onChris Sherlock
Change-Id: Ic7ac1a1bc3ac3901c844ee6e1c59a1518043f761
2014-05-07Move ImplInitAppFontData from Window to Application (take 2)Chris Sherlock
I have renamed ImplInitAppFontData to InitAppFontData and moved it from Window to Application. This is because this is something that sets *application* global variables, it just so happens it gets it from a Window parameter. But it should be set when the application starts, so I have moved it to Main(). This was previously reverted, but I have since located what was causing unit tests to fail and the font dropdowns to stop loading in writer: see commit c6d7ba5f33c3 where Application::SetSettings() was setting pImplSVData->maGDIData.mnAppFontX to zero. Change-Id: I5da7073b0d8541f1a71a09b0a8337d012fc4134b