summaryrefslogtreecommitdiff
path: root/framework/source/services
AgeCommit message (Collapse)AuthorFilesLines
2019-05-14Don't call Application::Quit() in Desktop::terminate() on iOSTor Lillqvist1-0/+4
When exiting from a document in the iOS app, the Application::Quit() would post an ImplQuitMsg user event that would however not be handled for that document. Instead, it would be handled by the next document opened and thus the code would immediately stop editing the document, causing grief. Change-Id: Id24c843b3f329673035da55f53c2134265fce003
2018-03-25tdf#115218 framework: decouple HiddenForConversion from HiddenMiklos Vajna1-1/+1
Commit 4a0f506f0d8c2a017f0cf880481d3c0c32a48909 (framework: disable layout manager in hidden frames, 2018-01-17) added support for bypassing the framework layout manager for doc conversion purposes, but the Hidden flag has the meaning that the doc is only initially hidden, it may be visible later, so reusing Hidden broke mail merge. Introduce a dedicated HiddenForConversion flag, clients interested in improved performance can opt in for that, and this way behavior for Hidden is not changing. Change-Id: If7537197900f8819f714b164c9e056b4ae69286d Reviewed-on: https://gerrit.libreoffice.org/49302 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 42c58f1c0ca4d310834f561f9145df340a893af1)
2018-03-21framework: disable layout manager in hidden framesMiklos Vajna3-9/+27
The point of hidden frames is that they are not visible on the UI, only their doc model / layout is accessible via the API or file format conversion. That means that laying out the UI elements like menus and toolbars is pointless. So change Frame::initialize() and Frame::setLayoutManager() to not enable the layout manager for hidden frames. To do this, we need a new window style flag, as both hidden and visible frames have an underlying hidden window at the time the framework layout manager would be enabled. Times for 200 hello world inputs: 5780 -> 5054 ms is spent in XHTML-load + ODT export + close (87% of original). Change-Id: I841507bbb62f8fc2979d20e2d579d0bb47b98f37 Reviewed-on: https://gerrit.libreoffice.org/48068 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 4a0f506f0d8c2a017f0cf880481d3c0c32a48909)
2018-01-10tdf#107039: Avoid deadlock by locking the SolarMutex early on in one placeTor Lillqvist1-0/+1
See bug report for backtraces of the deadlocking threads. Change-Id: I0334118e173c37b6f9596249e1e2f0d196bbab3f Reviewed-on: https://gerrit.libreoffice.org/47249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit de84816c1acefe0607827418f73477ff7163728d) Reviewed-on: https://gerrit.libreoffice.org/47613 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-30tdf#114025 framework: avoid deadlock between Desktop init ...Michael Stahl1-5/+25
... and SolarMutex: the problem is that rtl::StaticWithArg will first lock the implicit mutex of the C++11 static variable, and then the SolarMutex. So if one thread creates the Desktop singleton with SolarMutex locked and another thread without SolarMutex locked, this can deadlock. If we use rtl_Instance directly with SolarMutex, then there is still a static variable, but the SolarMutex will always be locked first, preventing this deadlock. Change-Id: Ibd37fdfa96a4a2b57f661be3814dd597eb52d338 Reviewed-on: https://gerrit.libreoffice.org/45508 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit fa9c083c6071a0a4dc812f3c34731f347ddbabf7) Reviewed-on: https://gerrit.libreoffice.org/45557 Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-11-20look for =() in loplugin:unnecessaryparenNoel Grandin1-2/+2
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0 Reviewed-on: https://gerrit.libreoffice.org/44944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13Fix typosAndrea Gelmini1-3/+3
Change-Id: I677512213d97d01832bebe162fbf7de2998bf4d0 Reviewed-on: https://gerrit.libreoffice.org/44664 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-13Fix typosAndrea Gelmini2-4/+4
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-09rename AvoidConfig to FuzzingCaolán McNamara1-1/+1
cause that's what its really used for and a couple of cases are not specifically about avoiding config but avoiding uninteresting disk acccess and what not Change-Id: I4c6454f98388579fcd0bf9798321d30408ab65ee Reviewed-on: https://gerrit.libreoffice.org/44491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-23loplugin:includeform: frameworkStephan Bergmann2-3/+3
Change-Id: Ib5eaab06ff0cc1b44db9e4057ab349a0990af14d
2017-10-23overload std::hash for OUString and OStringNoel Grandin3-3/+3
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin1-3/+3
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-03framework, lok: It's okay to have valid non-existent user inst. pathPranav Kant1-1/+5
Change-Id: I3b9f00adb76fc702e1847d9fab866b7796cfd942 Reviewed-on: https://gerrit.libreoffice.org/43061 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-03new loplugin:blockblockNoel Grandin1-6/+6
Change-Id: I7b68b70fa4c7234e8882f7627026959a596968fd Reviewed-on: https://gerrit.libreoffice.org/43025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-01throw more useful uno::Exception'sNoel Grandin1-2/+2
if we're going to throw the base class of the exception hierarchy, we can at least put a useful message in there to make the source a little bit easier to locate. Change-Id: I2f3106c99ba25125eacef8fa77e2f3a2c89f2566 Reviewed-on: https://gerrit.libreoffice.org/42968 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-29loplugin:flatten check for throw in then clauseNoel Grandin1-4/+2
also make the plugin ignore the case where we have var decl's in the clause we want to flatten, which could lead to problematic extension of variable lifetime Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59 Reviewed-on: https://gerrit.libreoffice.org/42889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-27tdf#112646 Flush the clipboard holding SolarMutexJan-Marek Glogowski1-4/+5
It seems Desktop::terminate can be called with or without the SolarMutex. So make sure we actually hold the mutex to release it correctly when flushing the clipboard on termination. Change-Id: Ie42daf5dba0f4208318a8c1fe463cd3a80dd9141 Reviewed-on: https://gerrit.libreoffice.org/42802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2017-09-25Fix typosAndrea Gelmini2-2/+2
Change-Id: I879a52820d78d9151ef64dd21612379f617f66e2 Reviewed-on: https://gerrit.libreoffice.org/42726 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-22loplugin:flatten in filter..i18npoolNoel Grandin2-9/+5
Change-Id: I9024b8b614a4de83a4d927e1918f6d4904a7fccb Reviewed-on: https://gerrit.libreoffice.org/42592 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-19unused m_xLastFrame in DesktopNoel Grandin1-4/+2
sinice commit abf3022d6378deb71946d644de92d26c73515ac2 Date: Wed Jul 31 10:03:28 2002 +0000 #101886# roll it back temp. Change-Id: If1058c0130d1a2c68bc041a3f7433df87effc0e4
2017-09-14improve redundantcast lopluginNoel Grandin1-2/+2
to find c-style casts where the expression is a templated method Change-Id: Ifbd1e2cdc72d906fc95a7ec0f9408c3f6d2a836b Reviewed-on: https://gerrit.libreoffice.org/42275 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11clang-tidy modernize-use-emplace in editeng..frameworkNoel Grandin1-3/+3
Change-Id: I7739c4f77c856d34f8484754244df13d8fef840e Reviewed-on: https://gerrit.libreoffice.org/42151 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11tdf#46037: Replace ConfigurationHelper with new configuration APIIvan Safonov1-167/+105
Remove all occurences of ConfigurationHelper in /framework/source/services/autorecovery.cxx. com.sun.star.configuration.ConfigurationAccess used only to receive configuration updates. In the second version of the patch corrected the indentation and fdo replaced with tdf in the patch title. comphelper::ConfigurationChanges::create returns shared_ptr, using unique_ptr can result in bugs. Also rebase this patch. Change-Id: I27d34dd4d4b59e2e9cc701d4726bcd7f5fb45b3c Reviewed-on: https://gerrit.libreoffice.org/41477 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-02use more ErrCode.IsWarning()Noel Grandin1-1/+1
Change-Id: I92a84cbe3d9a9e794d3e875c60d8db7cb40ae5bd Reviewed-on: https://gerrit.libreoffice.org/41827 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-01Replace list by vector in substitutepathvars (framework)Julien Nabet1-2/+2
Change-Id: I40cfc4925f14ebdc6f7b01274d2d60149008b426 Reviewed-on: https://gerrit.libreoffice.org/41800 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-25Drop gratuitous initial :: from comphelper::ProfileZoneTor Lillqvist1-1/+1
Change-Id: Iae7d86b857d0563d9ed9d9b4187e009554698412
2017-08-23convert message box style bits to scoped enumNoel Grandin1-1/+1
and fix harmless bug in ImpSVGDialog::ImpSVGDialog, which there since commit 6456f1d81090dd5fe44455c09ae3ede7ec6ac38a Date: Fri Feb 4 14:52:54 2011 +0100 ka102: added/removed files for SVG import and module cleanup Change-Id: I66b2ec2b029431ab453e54e962863e4ed7d78962 Reviewed-on: https://gerrit.libreoffice.org/41412 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-19convert extended WinBits to scoped enumNoel Grandin1-1/+1
Change-Id: If35f4fcda2415c858ba8f963e9f471c87169bc99 Reviewed-on: https://gerrit.libreoffice.org/41301 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-18Fix typosAndrea Gelmini2-2/+2
Change-Id: If13c1408a3e597c6f9b21d209722ef6bc87c0c94 Reviewed-on: https://gerrit.libreoffice.org/41270 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-11convert std::map::insert to std::map::emplace IINoel Grandin1-3/+2
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331 Reviewed-on: https://gerrit.libreoffice.org/41019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplaceNoel Grandin1-2/+1
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31loplugin:oncevarNoel Grandin1-2/+1
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21migrate to boost::gettextCaolán McNamara2-2/+2
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-20loplugin:constparams in frameworkNoel Grandin1-4/+4
Change-Id: Iecd19a0cbb3cc78158c17bfa064cc23bafc44b18 Reviewed-on: https://gerrit.libreoffice.org/40206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13use more OUString::operator== in forms..salNoel Grandin1-6/+6
Change-Id: I70d7e50f8c1e019524ccad915f0cca912c5035dc Reviewed-on: https://gerrit.libreoffice.org/39899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin3-28/+7
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-02notify the clipboard terminate listener before any other terminate listenerMarkus Mohrhard1-0/+44
Otherwise we may have destroyed a service that is needed to generate one of the clipboard formats requested by the system clipboard. Change-Id: Id05de3ac569e3ed38cd97efc4c48326bc6a8db0b Reviewed-on: https://gerrit.libreoffice.org/39429 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-06-25loplugin:oncevar in formula..frameworkNoel Grandin2-8/+5
Change-Id: I96d6af49c1994ebd7d6dcc41469127e3151b4350 Reviewed-on: https://gerrit.libreoffice.org/39186 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23loplugin:unusedfields in forms..idlcNoel Grandin1-7/+0
Change-Id: If250ff47c1f375fe24c61b5bf271da9a9c330822 Reviewed-on: https://gerrit.libreoffice.org/39133 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-16Profiling API: add ProfileZonesLászló Németh1-0/+2
Change-Id: Ie5669bd75d9b4be047d98402cb69ac313ab618df Reviewed-on: https://gerrit.libreoffice.org/38787 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-12cleanup unused css/frame/* includesJochen Nitschke1-1/+0
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65 Reviewed-on: https://gerrit.libreoffice.org/38633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-08framework: replace double checked locking patternsJochen Nitschke2-41/+8
with thread safe local statics. Change-Id: I660f6a899d1821bab627ed4972c4fc0d40610de2 Reviewed-on: https://gerrit.libreoffice.org/38541 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-20Translate German comments and debug strings (leftovers in f... dirs)Johnny_M1-2/+2
Translates all (leftovers) found using a custom regex, in directories not shown by /bin/find-german-comments and beginning with "f". Additionally: - Fixed translation in formula/source/ui/dlg/funcutl.cxx (translated in https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=5e04331fc0a6434c61d3d18843cb4f80a44e5989 ), because clearing an event is quite the opposite of its triggering. Change-Id: I0fd62193a29883796cd05e5a80ce8a2900636b6c Reviewed-on: https://gerrit.libreoffice.org/37839 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-05-17FwkResId and FwlResId are the sameCaolán McNamara2-3/+3
and FWK_RESSTR/.toString can be removed now Change-Id: I7d2d56681fc9be31948bbb4dae737a75cc59d065
2017-05-12remove unused uno::Reference varsNoel Grandin2-2/+0
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-10Resolves: rhbz#144437 make gnome-documents not crash the whole timeCaolán McNamara1-3/+5
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>
2017-05-07revert OSL_ASSERT changesChris Sherlock1-1/+1
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert framework module away from OSL_ASSERT to assertChris Sherlock1-1/+1
Change-Id: Iac0093a2a69d53c91c827ebba01fcdb5353e9b96
2017-05-02loplugin:checkunusedparams in frameworkNoel Grandin3-32/+26
Change-Id: I963159550da9d735bb70636917ecc290744298b4 Reviewed-on: https://gerrit.libreoffice.org/37142 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-26use strong_int for LanguageTypeNoel Grandin1-1/+1
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448 Reviewed-on: https://gerrit.libreoffice.org/36629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>