summaryrefslogtreecommitdiff
path: root/forms
AgeCommit message (Collapse)AuthorFilesLines
2018-08-14create appendCopy method in OUStringBufferNoel Grandin1-1/+1
so we can avoid temporary copies when appending a substring of an OUString to the buffer. I would have preferred to call the method just "append" but that results in ambiguous method errors when the callsite is something like sal_Int32 n; OUStringBuffer s; s.append(n, 10); I'm not sure why Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f Reviewed-on: https://gerrit.libreoffice.org/58666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-13loplugin:returnconstant in forms..fpickerNoel Grandin4-11/+7
Change-Id: I3f0bead636632682488cbe677fd7fee60350f04d Reviewed-on: https://gerrit.libreoffice.org/58876 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-02loplugin:stringloop in variousNoel Grandin1-8/+7
Change-Id: Ia400e67108e622ae63a8d59667eae96c858f22dc Reviewed-on: https://gerrit.libreoffice.org/58463 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-30Add missing sal/log.hxx headersGabor Kelemen13-0/+13
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from filter to jvmfwk Change-Id: I2a73d63f2aaef5f26d7d08957daaa8a30b412ac5 Reviewed-on: https://gerrit.libreoffice.org/58204 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-20Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia3e6f17217b837517faa588ea7f2e72dc5aff6aa Reviewed-on: https://gerrit.libreoffice.org/57767 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-10pass SvStream around by std::unique_ptrNoel Grandin4-10/+8
and give utl::OStreamWrapper a new constructor so that it knows it is taking ownership of the SvStream, which appears to fix several leaks Change-Id: Idcbcca9b81a4f0345fd8b8c8a2f4e84213686a6b Reviewed-on: https://gerrit.libreoffice.org/57187 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-29Improved loplugin:redundantcast (const-qualified typedefs): formsStephan Bergmann5-6/+6
Change-Id: Iaf50a40576e0fc1dde1e221a791bda6e183e5072 Reviewed-on: https://gerrit.libreoffice.org/56696 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-21Fix typoAndrea Gelmini1-2/+2
Change-Id: I73aa1fe0f37b9cb5f44042850c952d3f9e425f79 Reviewed-on: https://gerrit.libreoffice.org/56231 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-06-21loplugin:useuniqueptr in OClickableImageBaseModelNoel Grandin2-14/+5
Change-Id: Ia262bb241d26197f93023f47a7164d0231cc8b70 Reviewed-on: https://gerrit.libreoffice.org/56188 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-21loplugin:useuniqueptr in frm::ODatabaseFormNoel Grandin2-4/+4
Change-Id: I55a0ee19476d1e656cd9ff82d44666d43ba4ca58 Reviewed-on: https://gerrit.libreoffice.org/56189 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-21loplugin:useuniqueptr in PropertySetBaseNoel Grandin2-4/+2
Change-Id: I82af72050329bd206c4e796334a3ac9bc1177768 Reviewed-on: https://gerrit.libreoffice.org/56187 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-21loplugin:useuniqueptr in StandardFormatsSupplierNoel Grandin1-4/+3
Change-Id: I54e0b958f4b6e6b6d99b7e82c327817cf2967e3d Reviewed-on: https://gerrit.libreoffice.org/56186 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-21loplugin:useuniqueptr in frm::AttributeStateNoel Grandin1-6/+4
Change-Id: I48e8285a1c3a029e69371e5ba9f936e4517b6db3 Reviewed-on: https://gerrit.libreoffice.org/56185 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11new loplugin:shouldreturnboolNoel Grandin2-4/+4
look for methods returning only 1 and/or 0, which (most of the time) should be returning bool. Off by default, because some of this is a matter of taste Change-Id: Ib17782e629888255196e89d4a178618a9612a0de Reviewed-on: https://gerrit.libreoffice.org/54379 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-08look for unnecessary calls to Reference::is() after an UNO_QUERY_THROWNoel Grandin1-1/+0
Since the previous call would throw if there was nothing to be assigned to the value. Idea from tml. Used the following script to find places: git grep -A3 -n UNO_QUERY_THROW | grep -B3 -F 'is()' Change-Id: I36ba7b00bcd014bdf16c0455ab91056f82194969 Reviewed-on: https://gerrit.libreoffice.org/55417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-06-05forms - move the Bitmap accessing code inside BitmapExNoel Grandin1-63/+19
Change-Id: I58d5200332c133146adb6bb99b4b88697f03990a Reviewed-on: https://gerrit.libreoffice.org/55313 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke39-24/+31
and fix the fallout Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e Reviewed-on: https://gerrit.libreoffice.org/54882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-03tdf#96099 Remove some trivial std::vector typedefsArkadiy Illarionov3-5/+3
Change-Id: I21171bd90b5e19fe8e5b8f2d125b6dfcb9a8b766 Reviewed-on: https://gerrit.libreoffice.org/55198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-05-25Improve re-throwing of UNO exceptionsNoel Grandin2-4/+8
(*) if we are already throwing a Wrapped*Exception, get the exception using cppu::getCaughtexception. (*) when catching and then immediately throwing UNO exceptions, use cppu::getCaughtException to prevent exception slicing (*) if we are going to catch an exception and then immediately throw a RuntimeException, rather throw a WrappedTargetRuntimeException and preserve the original exception information. Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558 Reviewed-on: https://gerrit.libreoffice.org/54692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-10loplugin:unnecessaryvirtual improvementsNoel Grandin6-55/+0
look for virtual methods where all of the overrides of the method are empty Change-Id: I87d99a0b647700a8d53498e0ab5f0437d3508553 Reviewed-on: https://gerrit.libreoffice.org/54060 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-05Fix typosAndrea Gelmini1-1/+1
Change-Id: I92078fdece135754744d85424956dbb071f3899e Reviewed-on: https://gerrit.libreoffice.org/53638 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-01improve AttributeState compare operatorJochen Nitschke1-2/+2
guess this was the original intention, else the nullptr checks would be pointless Change-Id: Ifb41b125c6d297c76c1d1b5c06c8f9f127b8e613 Reviewed-on: https://gerrit.libreoffice.org/53644 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-24Revert "work around clang-cl ABI bug PR25641"Stephan Bergmann1-3/+0
This reverts commit 81ce629c9e8a4fc26ded9d49157e3f3263991e03, now that <https://bugs.llvm.org/show_bug.cgi?id=25641> "clang-cl: vtordisp thunks not emitted for functions with class template specializations in their signatures" is fixed.
2018-04-17remove no longer necessary operator new/delete overridesNoel Grandin2-5/+3
and use "using" statements for the places where the overrides were resolving ambiguities Change-Id: Icb1d1a41f19e00f28a19947aa2c40bd5778fff94 Reviewed-on: https://gerrit.libreoffice.org/52993 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-15remove some unused comphelper includesJochen Nitschke9-13/+0
and fix the fallout Change-Id: I5d0c2040f57a3ac354a7e277592da31d09a5f359 Reviewed-on: https://gerrit.libreoffice.org/52894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-12make SvxEditSource::Clone return std::unique_ptrNoel Grandin2-3/+3
Change-Id: If0d93024a642cc80a2a84d0c15525af1c0596546 Reviewed-on: https://gerrit.libreoffice.org/52715 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-06weld linkeditdialogCaolán McNamara2-2/+3
which enables changing FileDialogHelper over to welded Change-Id: I988342a6574cb7ed09b2724929e8c7117474a56c Reviewed-on: https://gerrit.libreoffice.org/52388 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-03new loplugin:dbgunhandledexceptionNoel Grandin2-12/+12
enforce that DBG_UNHANDLED_EXCEPTION is called first in a catch block, otherwise it cannot do it's job properly Change-Id: I906436c6861212c44f8f21552ccbceb54f15c6e1 Reviewed-on: https://gerrit.libreoffice.org/52303 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-03tdf#93173: Remove arbitrary line spacing limitMike Kaganski1-1/+1
OASIS Open Document Format for Office Applications (OpenDocument) v.1.2 doesn't limit the value of fo:line-height. But we have arbitrary limits in proportional mode for both minimal (50%) and maximal (200%) values. The implementation uses sal_uInt16 to store the value, so fix places where sal_uInt8 was unreasonably used to set it, change the upper limit to max sal_uInt16 value, and set lower limit to 6% (to match Word's minimal factor of 0.06). Change-Id: I4c2ac5f0acf65d7573328e71bcf36ac9abb5ffd5 Reviewed-on: https://gerrit.libreoffice.org/52252 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-04-03pass area param to DBG_UNHANDLED_EXCEPTIONNoel Grandin18-68/+68
and update sallogareas plugin to enforce this Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a Reviewed-on: https://gerrit.libreoffice.org/52249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-01fix some openoffice bugzilla linksdennisroczek1-1/+1
* remove redirects * use https links * replace old attchment links with working ones Change-Id: Ic9a154f46e142138f0adea7d7b8be3b6cfe8af18 Reviewed-on: https://gerrit.libreoffice.org/52224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke30-30/+0
and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-03-23loplugin:useuniqueptr in RichTextControlImplNoel Grandin2-6/+6
Change-Id: I3fcf9a4edf6dbed496bcc9160847e627777f04f1 Reviewed-on: https://gerrit.libreoffice.org/51740 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-20drop unnecessary includesCaolán McNamara1-1/+0
Change-Id: I1a817d5575bbd57ecaa874a27158b9218e4210cc Reviewed-on: https://gerrit.libreoffice.org/51603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-17Use for-range loops in formsJulien Nabet6-48/+35
Change-Id: I23f63f2a98ce64513f5cb4b06e373b5ec9509d62 Reviewed-on: https://gerrit.libreoffice.org/51445 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-15forms: Don't create a GraphicObject URL if we have xGraphic anywayTomaž Vajngerl1-9/+1
Change-Id: Ia80df77372ed08abc4ff816515c216c26d8330b4 Reviewed-on: https://gerrit.libreoffice.org/51326 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-07use more Color in editeng..formsNoel Grandin6-19/+20
Change-Id: If6c862e7bb61cd78c3379afde11b528a74162900 Reviewed-on: https://gerrit.libreoffice.org/50860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28convert COL_ constants to be of type ColorNoel Grandin4-6/+6
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48 Reviewed-on: https://gerrit.libreoffice.org/50373 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27remove unused vclunohelper.hxx includesJochen Nitschke1-1/+0
Change-Id: I68178379e5493d0e738861a4dce5aa6e4b58cd22 Reviewed-on: https://gerrit.libreoffice.org/50393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27replace Color(COL_*) with COL_*Noel Grandin2-3/+3
using git grep -lwP "Color\s*\(\s*(COL_\w+)\s*\)" | xargs perl -pi -e "s/Color\s*\(\s*(COL_\w+)\s*\)//g" and then some manual fixup where the resulting expression no longer compiled Change-Id: I0e268d78611c3be40bba9f60ecfdc087a36c0df4 Reviewed-on: https://gerrit.libreoffice.org/50372 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26convert remaining ErrorBox to weld::MessageDialogCaolán McNamara1-11/+17
and convert remaining QueryBox to weld::MessageDialog Change-Id: Ifb4c316dee8eabf57c4940c44e29c65a2781aa6c
2018-02-16Revert "loplugin:changetoolsgen in filter..framework" and reapply pluginNoel Grandin2-7/+7
because I (a) forgot to insert parentheses which changes the meaning of some expressions and (b) I now use the AdjustFoo calls when changing unary operations, which reads much better This reverts commit bf8a6cacd06d7c1961b5db8cc79ee4bbdb342e43. Change-Id: I4b5a9bf0c38ee1b57af91e6b7f184f1e8807f6f7 Reviewed-on: https://gerrit.libreoffice.org/49843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-14loplugin:changetoolsgen in filter..frameworkNoel Grandin2-9/+9
Change-Id: I622da8a0c096c74efd97326451c4576b230f0483 Reviewed-on: https://gerrit.libreoffice.org/49701 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-07use scanline when reading pixel dataNoel Grandin1-6/+12
extracts code from the innermost part of fairly hot loops And add a GetIndexFromData method to make the call sites a little easier to read. Change-Id: I4ce5c5a687ecdb6982562a0aafce8513d86f9107 Reviewed-on: https://gerrit.libreoffice.org/49337 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-06clean up some include guard terminatorsNoel Grandin2-6/+2
found with git grep -n -A10 '#endif // INCLUDED' | grep -v endif | grep -v vim | grep -v -- '--' Change-Id: I7ae67cd7c1313e76f059fb8e6afb723caca8a6d7 Reviewed-on: https://gerrit.libreoffice.org/49244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-01Typo: invlidateParameters->invalidateParameters (forms)Julien Nabet2-6/+6
Change-Id: Ia25e5e9968038849d539f9bc112a4a56e6190277 Reviewed-on: https://gerrit.libreoffice.org/49088 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-27Modernize a bit formsJulien Nabet7-125/+80
by using for-range loops + use returned iterator by erase call Change-Id: Ia41c9fae190dbad6a25b62a9b15ad51e89dd2906 Reviewed-on: https://gerrit.libreoffice.org/48759 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-26tdf#108473: don't let empty date in datetime in formsJulien Nabet1-0/+3
If only an hour is given (so no date part), copy behavior for table and query and put 30/12/99 by default Change-Id: Ifb371758538d2d11bd02b101a347d34816b6fddf Reviewed-on: https://gerrit.libreoffice.org/48665 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-23new loplugin: pointerboolNoel Grandin1-1/+1
look for possibly bogus implicit conversions to bool when passing (normally pointer) args to bool params. this plugin comes in the wake of a couple of bugs caused by refactoring, where some of the call sites were not currently updated. Of the changes, the following are real bugs: desktop/../dp_persmap.cxx StartInputFieldDlg in sw/../fldmgr.cxx which occurred as a result of commit 39d719a80d8c87856c84e3ecd569d45fa6f8a30e Date: Tue May 3 11:39:37 2016 +0200 tdf#99529 sw: don't pop up input field dialog before inserting field CSerializationURLEncoded::encode_and_append in forms/../serialization_urlencoded.cxx XclExpCFImpl::XclExpCFImpl in sc/../xecontent.cxx I have no idea how to properly fix this, just made a guess. SwDocTest::test64kPageDescs in sw/qa/core/uwriter.cxx which looks like a simple copy/paste error. Change-Id: I795ebd5ef485a1d36863dc27fe13832989f5a441 Reviewed-on: https://gerrit.libreoffice.org/48291 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-23Fix odd check for nFieldLen range, assuming typosStephan Bergmann1-1/+1
The code used the odd combination of checking signed nFieldLen for != 0 and <= USHRT_MAX, and then converting to sal_Int16 (not sal_uInt16) ever since bf4154eb5307ec8c35f000fd1df39ef3abb2eb6d "initial import". But there are indeed various MaxTextLen properties in offapi of type short, not unsigned short, so for one assume that checking for <= SAL_MAX_INT16 (not SAL_MAX_UINT16) was actually intended. And, for another, also assume that checking nFieldLen for > 0 instead of != 0 was intended. Change-Id: I119ef3ce71ee397cb6cbca714bca154e29e6599d Reviewed-on: https://gerrit.libreoffice.org/48348 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>