summaryrefslogtreecommitdiff
path: root/forms
AgeCommit message (Collapse)AuthorFilesLines
2019-05-31Use hasElements to check Sequence emptiness in [e-i]*Arkadiy Illarionov5-16/+16
Similar to clang-tidy readability-container-size-empty Change-Id: I79e31919db8f4132216f09a7868d18835eeb154b Reviewed-on: https://gerrit.libreoffice.org/71795 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-23Re-enable JunitTest_forms_unoapi_2 forms.ODateModelStephan Bergmann1-1/+1
f9905401d8cf2d73576231ebd84cfa5f4f73bcac "tdf#125170 Deliver mouse events also when clicking into document content" had disabled it because its gerrit_linux_clang_dbgutil Jenkins build had failed it successively like > LOG> Execute: Date > LOG> try to set: > LOG> old = com.sun.star.util.Date@271053e1{1, 1, 1800} > LOG> new = com.sun.star.util.Date@589838eb{2, 0, 0} > warn:tools.datetime:303:1063:tools/source/datetime/tdate.cxx:102: Date::setDateFromDMY - sure about 0 year? It's not in the calendar. > LOG> Property Date is void > LOG> Value for 'Date' hasn't changed as expected > LOG> result = com.sun.star.util.Date@42dafa95{1, 1, 1800} > Method Date finished with state FAILED > LOG> Date: COMPLETED.FAILED (<https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/32715/>). But it is unclear how that commit would have affected that test, and at least a recent local build of mine succeeds with > LOG> Execute: Date > LOG> try to set: > LOG> old = com.sun.star.util.Date@dc24521{0, 0, 0} > LOG> new = com.sun.star.util.Date@10bdf5e5{1, 0, 0} > warn:tools.datetime:10048:10220:tools/source/datetime/tdate.cxx:102: Date::setDateFromDMY - sure about 0 year? It's not in the calendar. > LOG> Property Date is void > LOG> Property 'Date' OK > LOG> result = com.sun.star.util.Date@6e1ec318{1, 0, 0} > Method Date finished with state OK > LOG> Date: COMPLETED.OK (note the difference of initial date, {1, 1, 1800} vs. {0, 0, 0}, whether or not that is relevant), so lets re-enable the test for now and see... Change-Id: I53b462954650e32de85c795c94f9b8038dc01918 Reviewed-on: https://gerrit.libreoffice.org/72863 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-22New loplugin:dataStephan Bergmann2-2/+2
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-16tdf#125170 Deliver mouse events also when clicking into document contentSamuel Mehrbrodt1-1/+1
Event listeners are added once VCLXWindow::SetWindow is called. This never happened for the document content window. So we need to call Window::GetComponentInterface which will create an XWindowPeer and then call UnoWrapper::SetWindowInterface which calls VCLXWindow::SetWindow. After that, event listeners are registered so that we can deliver events. Change-Id: I2ed01f1ab20d87fedc4803bdbd96f5ef14d40043 Reviewed-on: https://gerrit.libreoffice.org/71948 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin3-7/+7
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-10an uno -> a unoCaolán McNamara1-1/+1
Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d Reviewed-on: https://gerrit.libreoffice.org/72105 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-10an is used before a vowel soundCaolán McNamara2-4/+4
not before vowels with a consonant sound so its a url not an url Change-Id: Ic27ff3bee67469284d460c31ced6f63cb3633db2 Reviewed-on: https://gerrit.libreoffice.org/72062 Reviewed-by: Jens Carl <j.carl43@gmx.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-09regenerate PCH headers for the 4 new levelsLuboš Luňák1-37/+22
Plus some build fixes triggered by this. Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50 Reviewed-on: https://gerrit.libreoffice.org/71581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-09avoid copying when placing items into SfxItemSetNoel Grandin2-9/+4
Change-Id: I05c627f590e7794c1ba11b66021dc30aa3285eb0 Reviewed-on: https://gerrit.libreoffice.org/71941 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-07Fix typoAndrea Gelmini1-1/+1
Change-Id: I43ba5d6591be6ad782bc72bac1938ae9763c7103 Reviewed-on: https://gerrit.libreoffice.org/71900 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-21Fix typoAndrea Gelmini1-1/+1
Change-Id: I5bacb30918f72d8b6a992c88a209b30647303177 Reviewed-on: https://gerrit.libreoffice.org/71031 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-20Fix typoAndrea Gelmini1-2/+2
Change-Id: I39f878774386c896b842e23b3ad6e6637dc79f64 Reviewed-on: https://gerrit.libreoffice.org/71000 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-19Fix typoAndrea Gelmini1-1/+1
Change-Id: I10729c848b6b5db0e9880ac2ca27b2d0ef24b5f4 Reviewed-on: https://gerrit.libreoffice.org/70977 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-18Fix typoAndrea Gelmini1-1/+1
Change-Id: If0104ebab265a98982808fa5003a499deae542b6 Reviewed-on: https://gerrit.libreoffice.org/70908 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-13loplugin:sequentialassign in filter..fpickerNoel Grandin3-7/+3
Change-Id: I4ba0e1e982897bd570612f6cda8ba1e6a9fa5dbd Reviewed-on: https://gerrit.libreoffice.org/70700 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-09[API CHANGE] Asserts to never clear already cleared guardMike Kaganski2-3/+1
... which could help catch copy-paste errors when wrong guard is cleared second time. Also an assert added that when resetting, there's something to reset (i.e., no descendant class had cleared protected pResetT, making reset impossible, and thus actually unable to guard anything). framework/source/layoutmanager/layoutmanager.cxx: made sure to not call clear() second time framework/source/layoutmanager/toolbarlayoutmanager.cxx: restored lock lost in commit 777bc22ca6490a4300f30fc1b45287dce789a36f forms/source/misc/InterfaceContainer.cxx: removed a leftover from commit a19cd21e3c03559877428315bebc0ceaf367a461 which reduced guarded scope forms/source/component/DatabaseForm.cxx: fixed clear-reset sequence broken from the initial commit bf4154eb5307ec8c35f000fd1df39ef3abb2eb6d Change-Id: Ibab6660c79561eee31faf3e6c1128ab141a7e8a3 Reviewed-on: https://gerrit.libreoffice.org/70381 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-07Don't use resettable/clearable guard where plain guard is enoughMike Kaganski3-12/+12
Also use scope where possible. This allows to limit guard scope at language level; visualises the scope clearly; and helps avoiding errors like fixed in commit 61e4437c857854b331fa01da6f39b2b3b58a800b. Change-Id: Ifeca96e2df8e8a0897770d9546b2536806275f41 Reviewed-on: https://gerrit.libreoffice.org/70376 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-06Use char version of OString/OStringBuffer methodsMatteo Casalin1-12/+12
Change-Id: I0222e6675f63797f870746fd34a29702ad190311 Reviewed-on: https://gerrit.libreoffice.org/69240 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-04-06Use getTokenCount and indexed getTokenMatteo Casalin1-10/+4
Change-Id: Id57a1771c897c69b05d02a359f22e5fb2b1f5a31 Reviewed-on: https://gerrit.libreoffice.org/69239 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-04-05Remove unused using declarations in directories [e-l]*Gabor Kelemen8-18/+0
Found by: run-clang-tidy-7 -checks=-*,misc-unused-using-decls Change-Id: Iee4e9df37d4c971ea97256d041afbc3d3aaa3d27 Reviewed-on: https://gerrit.libreoffice.org/70027 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-28tdf#42949 Fix IWYU warnings in include/sfx2/[e-M]*Gabor Kelemen2-0/+3
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I6e97c7ed6c0211dfafee83b9bdbea672e415fc49 Reviewed-on: https://gerrit.libreoffice.org/69715 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-25new loplugin:unoqueryNoel Grandin3-7/+7
look for places we are doing code like: Reference<XProperty>(model, css::uno::UNO_QUERY)->getAsProperty() which might result in a SIGSEGV is the query fails Change-Id: I5cbdbc9e64bd0bed588297c512bf60cbacb9442e Reviewed-on: https://gerrit.libreoffice.org/69044 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-20Improve parseDateTime tokenization and reduce OUString copiesMatteo Casalin1-13/+6
Change-Id: If84f455c235176d56d72bdc11d813f1ee1e3122e Reviewed-on: https://gerrit.libreoffice.org/69241 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-12tdf#42949 Fix IWYU warnings in include/connectivity/*Gabor Kelemen4-0/+4
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I02f75be483529ba1f7a6e460e34c4752b4265221 Reviewed-on: https://gerrit.libreoffice.org/68893 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-07log nice exception messages whereever possibleNoel Grandin2-2/+4
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin4-41/+45
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin5-6/+2
fields private Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27 Reviewed-on: https://gerrit.libreoffice.org/68302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-23loplugin:unusedfields in forms..fpickerNoel Grandin4-10/+0
Change-Id: Ifd3afbf276100e3cef802bbcc0792b43a9cd84f8 Reviewed-on: https://gerrit.libreoffice.org/68228 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18use unique_ptr in OComponentEventThreadNoel Grandin6-38/+12
and simplify - by passing in a std::unique_ptr to addEvent we avoid the need to have a virtual clone method Change-Id: Ie425476a3158c7a66e399c2a9f33d2612dab5cbb Reviewed-on: https://gerrit.libreoffice.org/67962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18use clear() instead of erase(begin, end)Noel Grandin1-2/+2
Change-Id: Ie1dcff4c2e5f52521b4172ef5726413a9d048214 Reviewed-on: https://gerrit.libreoffice.org/67961 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18Simplify containers iterations in [f-l]*Arkadiy Illarionov3-25/+15
Use range-based loop or replace with STL functions Change-Id: Ib3fab47318d1bfbb4df8f886a8cd9596525a420f Reviewed-on: https://gerrit.libreoffice.org/67914 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-13Pointer is pointlessNoel Grandin1-1/+0
since it is just a wrapper around PointerStyle Change-Id: I51f065e0d4ad8bd91f5c84c5819048c720a19267 Reviewed-on: https://gerrit.libreoffice.org/67711 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09loplugin:indentation in forms..fpickerNoel Grandin4-9/+9
Change-Id: If01379c43519cc1dbcf8dfaefde545fbe7e24fc2 Reviewed-on: https://gerrit.libreoffice.org/67556 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-24fix load/save of forms with HAVINGNoel Grandin1-13/+21
Since commit 2b1d6f0d3b0b025148c81986ba7f109659d838af Date: Sun Jul 30 17:57:14 2017 +0200 tdf#96370 rework filtering to be aware of WHERE vs HAVING clause (1) the code was saving PROPERTY_FILTER and PROPERTY_SORT, but loading PROPERTY_FILTER and PROPERTY_HAVINGCLAUSE (2) the loading code was not putting the properties into m_xAggregateSet So I fixed the load/save mismatch, put the properties into the right location, and added the HAVING property, which meant I needed to do a version bump. I will note that this is somewhat of a backwards/forwards compatibility mess - the commit referenced above added new fields in the middle of the output stream, which means that older versions of LO will not be able to properly load forms generated after that commit. Change-Id: I9a13877b29d7c6bc5e6d014cfbcefd3069ddc4b5 Reviewed-on: https://gerrit.libreoffice.org/66830 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2019-01-21Avoid -Werror=format-truncation=Stephan Bergmann1-4/+4
...as emitted by at least GCC 8.2 with --enable-optimized, about trying to output up to 4 bytes into a destionation of size 3 Change-Id: I42c3c9bb7a0355a7d4a1574c6c65d6f74a97f1dc Reviewed-on: https://gerrit.libreoffice.org/66617 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-15tdf#42949 Fix IWYU warnings in include/toolkit/*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Icebcf1a6ab073dce935a74ce79ee0f302b62e8a8 Reviewed-on: https://gerrit.libreoffice.org/65947 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-11Replace OUStringBuffer::appendCopy with append(std::u16string_view)Stephan Bergmann1-1/+5
...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-07tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen4-0/+5
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4 Reviewed-on: https://gerrit.libreoffice.org/65614 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-17tdf#122152 set dialog parentCaolán McNamara1-3/+18
Change-Id: I15f6d577c3584d28f667a04b5571de80effe53fe Reviewed-on: https://gerrit.libreoffice.org/65274 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-10tdf#42949 Fix IWYU warnings in include/vcl/s*Gabor Kelemen3-0/+3
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152 Reviewed-on: https://gerrit.libreoffice.org/64479 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann4-5/+5
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-05remove unused SvLockBytesStatFlag enumNoel Grandin1-3/+3
Change-Id: I90b82f1bbf4b51fc76cde10ec55448053345018c Reviewed-on: https://gerrit.libreoffice.org/64561 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-26drop some unnecessary includesCaolán McNamara1-1/+0
Change-Id: I4a45110e69fc76ff5b12e014586a0684c3737dfe Reviewed-on: https://gerrit.libreoffice.org/64000 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-22--enable-dbgutil --disable-assert-always-abort fixesStephan Bergmann2-3/+3
...which <https://ci.libreoffice.org/job/lo_tb_random_config_linux/> occasionally stumbles across; plus some related loplugin:staticmethods fixes Change-Id: If6998c302cfbabfcad626d9c68d94d3368548a41 Reviewed-on: https://gerrit.libreoffice.org/63808 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-21improve function-local statics in forms..reportdesignNoel Grandin7-45/+20
Change-Id: I285e2e75c8d9cad35445c89f00ef68b155806ea2 Reviewed-on: https://gerrit.libreoffice.org/63703 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-21loplugin:redundantfcast improvementsNoel Grandin1-1/+1
check for calls to constructors, and extend the list of types we check for unnecessary temporary creation Change-Id: Ia2c1f202b41ed6866779fff5343c821128033eec Reviewed-on: https://gerrit.libreoffice.org/63472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-21tdf#42949 Fix IWYU warnings in include/vcl/[B-E]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iabe571aa8f00492902c499094bea8365a3e17fca Reviewed-on: https://gerrit.libreoffice.org/63623 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-19tdf#42949 Fix IWYU warnings in include/vcl/[ab]*Gabor Kelemen5-0/+5
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: If18c80fc64e55d797953e24e40e5d5e62bd9c625 Reviewed-on: https://gerrit.libreoffice.org/63453 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-17Adapt to C++2a char_tStephan Bergmann1-1/+1
u8 literals incompatibly change their type (as implemented by recent Clang trunk) Change-Id: Ia4f7b91f5d86656a056303d2754981ab2093a739 Reviewed-on: https://gerrit.libreoffice.org/63494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-10Replace deprecated boost::optional::reset(val) with operator =Mike Kaganski1-2/+2
Change-Id: I7340a561e0df0c781fd834388deb4b9f83800f9b Reviewed-on: https://gerrit.libreoffice.org/63221 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>