summaryrefslogtreecommitdiff
path: root/svtools
AgeCommit message (Collapse)Author
2018-01-15More loplugin:cstylecast: svtoolsStephan Bergmann
Change-Id: Ia9517b20d6579a77a81906aff16068b732ada878
2018-01-12More loplugin:cstylecast: svtoolsStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Ide9e7c53b554f0a36e2078a8823f5ef6fb5cc8fa
2018-01-11Replace macro with functionStephan Bergmann
Change-Id: Ie565845ffa9c310a5920fc0689bbe1758bcc194d Reviewed-on: https://gerrit.libreoffice.org/47749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-11[API CHANGE] migrate PackageKit usage to Modify2Caolán McNamara
xid dropped in favour of application_id Change-Id: Id1eb43aa9c8dfb4eac82f99eff0f84c5320e0da0 Reviewed-on: https://gerrit.libreoffice.org/47661 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-11tdf#36308 make double click not expand/collapse node in Navigator treeJim Raykowski
Change-Id: I0075af147e5aa02f09db57fc2113dcdfcab5bc57 Reviewed-on: https://gerrit.libreoffice.org/47241 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Heiko Tietze <tietze.heiko@gmail.com> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-11Modernize a bit svtoolsJulien Nabet
by using for-range loops and std::find_if Change-Id: I57f26828ed66cbdfc41857d9105b6694a02a4cf8 Reviewed-on: https://gerrit.libreoffice.org/47198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-11Optimize a bit fileview.cxx (svtools)Julien Nabet
by: - using for range loops - using returned iterator - using find_if - using std::distance (with a find_if) to avoid looping for searching a position - using erase-find_if idiom - declaring "const" all the aTab vars - avoiding creating a variable used once - using "++<var>" instead of "+= <var>+1" Change-Id: I4139a24e43c10151dd5f0baf57a7aef5bd994ec7 Reviewed-on: https://gerrit.libreoffice.org/47195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-11convert (a>b?a:b) to std::max(a,b)Noel Grandin
with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2' Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413 Reviewed-on: https://gerrit.libreoffice.org/47602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-07uitest: add more properties to SvSimpleTableContainer state mapMarkus Mohrhard
Change-Id: I821c2868b1e2216e9a7d5090943eaeb58a51d520 Reviewed-on: https://gerrit.libreoffice.org/47544 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-01-07uitest: support selecting and deselecting of tree list entriesMarkus Mohrhard
Change-Id: I686b913c31a7851607966347cccdf718628a8568 Reviewed-on: https://gerrit.libreoffice.org/47528 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-01-07SAL_WARN when using the interal GraphicObject URLTomaž Vajngerl
Write a warn if a URL is created from a internal GraphicObject URL as this is now deprecated. Extract the way to determine if a URL is internal to its own function, so it can be used to check and rewrite places that use it. Change-Id: Iedf13a596eab839094ea98e41787865bf6783adf Reviewed-on: https://gerrit.libreoffice.org/47495 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-01-07svtools: Simplify TabBar_Impl with std::unique_ptrTakeshi Abe
Change-Id: If477373f6e5a39ccd61332356a821f7c7d38d28d Reviewed-on: https://gerrit.libreoffice.org/47488 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2018-01-06svtools: Simplify HeaderBar with std::unique_ptrTakeshi Abe
Change-Id: I5376616ed1b1a1087dd8bac6830d31212252e4bd Reviewed-on: https://gerrit.libreoffice.org/47459 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-05tdf#114837 FILEOPEN: Image is blankNoel Grandin
revert commit e75abe6e0a4ea250366bb29c0ece697e9b1b80a1 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Tue Dec 12 09:33:14 2017 +0200 convert tolerance params to sal_uInt8 for now. Change-Id: Iafaada0fb338f60ecc9f94aafe138500dfb27cf7 Reviewed-on: https://gerrit.libreoffice.org/47453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-05lokdialog: Use only one of the installed langpacks when setting locale.Jan Holesovsky
Change-Id: I446775b121b7806a549f4dbbaa1f2dcf019d9bc2 Reviewed-on: https://gerrit.libreoffice.org/47386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-01-04drop OAddressBookSourceDialogUnoBase typedefNoel Grandin
Change-Id: Iffc9f3bda2293f02ea071cea7ce3f222aa7f9cd2 Reviewed-on: https://gerrit.libreoffice.org/47344 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-03Translate German comments and debug stringsJohnny_M
Additionally, improve an equal earlier translation made on commit ee536e482b5ad01ea4a8cae79a1fcd9e12db444f ( https://gerrit.libreoffice.org/#/c/7303/2/svtools/source/svrtf/parrtf.cxx@199 ) Change-Id: Idf1a95361a1bc54473a24c152902568574e21e69 Reviewed-on: https://gerrit.libreoffice.org/47099 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-02Treat OOO_VENDOR as (non-Unicode) plain char stringJan-Marek Glogowski
Fixes the loplugin:stringconstant complains when using a unicode vendor name. Change-Id: Ib15e558585fe388f734da469e728909a48686ef0 Co-authored-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/47278 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-02RID_* can be extern global variablesNoel Grandin
no need to access them via methods Change-Id: If0d1a65d6f56ce2fc585749d974ba13c9f2749b2 Reviewed-on: https://gerrit.libreoffice.org/47245 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-29Fix typosAndrea Gelmini
Change-Id: I0e56430afa65b6b5826d56212ac501c0244fce9b Reviewed-on: https://gerrit.libreoffice.org/47145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-27svtools: Simplify DoubleNumericField with std::unique_ptrTakeshi Abe
Change-Id: I25df3a06afa5e1eb2fa282f2be2ae1ea69aa0ab5 Reviewed-on: https://gerrit.libreoffice.org/47077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-26svtools: Use std::unique_ptr for LineListBoxTakeshi Abe
This also inlines LineListBox::ImplInit(). Note that m_vLineList never contains nullptr. Change-Id: Ia4798943fbb53e1720d51faff7643e46d2cd2585 Reviewed-on: https://gerrit.libreoffice.org/47046 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-26loplugin:passstuffbyref improved return in canvas and svtoolsNoel Grandin
and for now, ignore methods with params so we don't fall into the trap of thinking that calls to methods like: Bar& foo(Bar &p) { return p; } can be converted from Bar f() { return foo(Bar()); } to Bar const & f() { return foo(Bar()); } Change-Id: Ia3795eb2baf353cb6bec4ebf40451f2789d66ad7 Reviewed-on: https://gerrit.libreoffice.org/47034 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-25coverity#1426923 Pointer to local outside scopeCaolán McNamara
Change-Id: I200b09dc514b64fbd88050a1f5a8668ec640305f Reviewed-on: https://gerrit.libreoffice.org/47040 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-23svtools: Use std::unique_ptr for SvImpLBoxTakeshi Abe
Change-Id: I4c5917eaa478e76411e9d8bbc5bd59c655693383 Reviewed-on: https://gerrit.libreoffice.org/47012 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-22lokdialog: Allow switching language of some of the ResMgr's.Jan Holesovsky
This way, it is possible to have all the strings translated in dialogs even when different users use different languages. [It was already possible to have different languages previously, but not everything in the dialog has switched - like the buttons at the bottom of the dialogs etc.] Change-Id: I29a5ae6d31a370eec60397884200b684ec1bf5b9 Reviewed-on: https://gerrit.libreoffice.org/46417 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/46979 Tested-by: Jenkins <ci@libreoffice.org>
2017-12-22request installation of langpack via packagekitCaolán McNamara
if ui is set to track the locale automatically and the current locale has no match in installed resources but has a match in the list of languages that libreoffice was compiled to contain so e.g. de_AT locale shouldn't trigger the installation of anything if langpack-de is already installed and yue_HK shouldn't trigger install of anything cause that not supported (at time of writing) for libreoffice put Fedora/RHEL/Ubuntu naming schemes in here. I moved the lang code from svl to svtools so I could use the restart dialog to prompt to restart after the langpack is installed, but packagekit's blocking mode seems to be no longer blocking and control returns immediately which is a change since the last time I played with this stuff, so drop the restart thing for now. The lack of a blocking modal also makes the "run this on idle when there's a toplevel window up and running" a bit futile, but lets keep that for now anyway. caolanm->rene: I know you'd disable this anyway, so Debian is left out, there's also config key Office/Common/PackageKit/EnableLangpackInstallation to disable this too. Change-Id: Ice731be539850338ccdd8af87839e0b4d83f01e7 Reviewed-on: https://gerrit.libreoffice.org/46856 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-20tdf#79077: Cleanup PapersizeFromSetup related codeKatarina Behrens
Change-Id: If77c43a7eb97de0a2e23195a9539f00e452343d8 Reviewed-on: https://gerrit.libreoffice.org/45096 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-12-19wrap scoped enum around css::util::NumberFormatNoel Grandin
Change-Id: Icab5ded8bccdb95f79b3fa35ea164f47919c68fa Reviewed-on: https://gerrit.libreoffice.org/46339 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-12-19drop last CONTAINER_APPEND useCaolán McNamara
Change-Id: Ia4500cfef039100cf12bc8e8a8946395e26b6890 Reviewed-on: https://gerrit.libreoffice.org/46700 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-19svtools: Use std::unique_ptr for GraphicCacheEntryTakeshi Abe
... and GraphicDisplayCacheEntry. Change-Id: Ic4c4f6078837d96ce56e245caa926c7730034a08 Reviewed-on: https://gerrit.libreoffice.org/46732 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-18convert ColorPickerMode to scoped enumNoel Grandin
and drop unused Add constant Change-Id: I4e4f0d35e4d081883b78e0205ffd7086c9cadf04 Reviewed-on: https://gerrit.libreoffice.org/46587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-17Fix typosAndrea Gelmini
Change-Id: Ifcbf431291cc77ffc33cc1cbcc493181ffc9943d Reviewed-on: https://gerrit.libreoffice.org/46634 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-14sal_uIntPtr->sal_Int32 in MultiSelectionNoel Grandin
also replace the long/size_t with sal_Int32 so we have some consistency Change-Id: I9d3099b881354af7b9f59d312e6b15b213d1e580 Reviewed-on: https://gerrit.libreoffice.org/46395 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-14Related: tdf#114428 svtools HTML import: avoid XML declaration in body textMiklos Vajna
Just ignore it for now. Change-Id: Idf82af611370d957c6704cce250941a8a0b90637 Reviewed-on: https://gerrit.libreoffice.org/46388 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-13tools: reimplement SVLIBRARY macro & remove it from solar.hMichael Stahl
Change-Id: I03f8f5fd656d62410821f2f2851f1c584c97d1f4
2017-12-13tools: remove unused #include from solar.hMichael Stahl
Change-Id: I214e13add371380701ae39403d90a574a63e495d
2017-12-13convert tolerance params to sal_uInt8Noel Grandin
since their range is 0-255 Also drop pTols from ImplColReplaceParam, since it is always nullptr. Change-Id: I9e9ab7f7596e18cab1d67dd69922e5ac9867f45b Reviewed-on: https://gerrit.libreoffice.org/46274 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-12ensure dec ref if exception calledCaolán McNamara
Change-Id: I7aabfd98e89389e15bf7b78abb81d3385fe30342 Reviewed-on: https://gerrit.libreoffice.org/46245 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-12svtools: Simplify BrowserDataWin with std::unique_ptrTakeshi Abe
Change-Id: Ib63b60c1f5326cfc1b163164ae5a783ea8ba1919 Reviewed-on: https://gerrit.libreoffice.org/46256 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-09svtools: Simplify ImageMap with std::unique_ptrTakeshi Abe
Change-Id: I49b3c21ff4d8177fb75197d6641040be0ace6324 Reviewed-on: https://gerrit.libreoffice.org/46149 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-08loplugin:salcall vcl builder methodsNoel Grandin
these don't need to be SAL_CALL, and the function pointer definition was not annotated SAL_CALL either Change-Id: I3082d3d34c53dc723ad8d2083010fd0de0e89a1e Reviewed-on: https://gerrit.libreoffice.org/46067 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-06Remove unused #include <vcl/metaact.hxx> from vcl/outdev.hxxStephan Bergmann
...and fix the fallout Change-Id: Ie514bd95d5a9f990a887566619031e9844c40b92 Reviewed-on: https://gerrit.libreoffice.org/45195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin
first, since those are safer to change than virtual methods Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe Reviewed-on: https://gerrit.libreoffice.org/45798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-04Add Plautdietsch [pdt-CA] to language listboxEike Rathke
Change-Id: Icf2307649858721a7cde38e8fa892fc3cb1ff08c
2017-12-04new loplugin salcall: remove unnecessary SAL_CALLNoel Grandin
In this first commit, I use the plugin to verify the consistency of our SAL_CALL annotations. The point being to make the next commit more mechanical in nature, purely using the rewriter. There are various chunks of unix-only code that have never had to be compiled by MSVC, hence the inconsistencies. In bridges, I had to inline some typedefs to make the verification code happy, since it cannot see into typedefs. Change-Id: Iec6e274bed857febf7295cfcf5e9f21fe4a34da0 Reviewed-on: https://gerrit.libreoffice.org/45502 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-01tdf#102160 make 'Other CMIS' string localizableAndras Timar
Change-Id: I58cf9eea05f15223e32ff1542b946c5962041e6c Reviewed-on: https://gerrit.libreoffice.org/45577 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2017-12-01tdf#114098 Show vertical scrollbarXisco Fauli
Change-Id: I03b94d6860e559a4074a3a23fcc0407f22c21df4 Reviewed-on: https://gerrit.libreoffice.org/45686 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-30tdf#114124 Translate 'PNG Bitmap' string in Calc Paste dropdownGabor Kelemen
Change-Id: I8356f241d0742276cf32aa301c35055a7f3c5898 Reviewed-on: https://gerrit.libreoffice.org/45447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>