summaryrefslogtreecommitdiff
path: root/dbaccess/source
AgeCommit message (Collapse)AuthorFilesLines
2020-07-01reorder parameters of SvXMLExport::SvXMLExportNoel Grandin1-1/+1
so they all have similar order Change-Id: Id8baef058d52f6cce9d9be41b0341eec8ad648b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97628 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-01weld EditControl for browseboxCaolán McNamara9-62/+99
Change-Id: I8f21c12f7ee10e1b9ba883a8ff01bb5252429f09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97353 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: dbaccessStephan Bergmann7-10/+10
Change-Id: I49932a9d89d2933bebd313d3f1f64af84f0e52cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97552 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-25loplugin:virtualdeadNoel Grandin2-5/+0
Change-Id: Idcaaecd5be080e43b731f8edcbbfb8aed5e2e28c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97048 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-24use more std::container::insert instead of std::copyNoel Grandin3-10/+6
which is both more compact code, and more efficient, since the insert method can do smarter resizing Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-23tdf#97694 Add test for macro signature preservation in BaseSamuel Mehrbrodt1-4/+7
Change-Id: I35fb8d499eed66f9a5e208a4778a1f0f12637079 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93630 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-06-11Use comphelper::ScopeGuard to reliably uninitialize COM hereMike Kaganski1-5/+6
Change-Id: I60ccdf51731352b1749109a40c7ad61220a67d84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96135 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-06-11Use o3tl::safeCoInitializeEx and counterpart (dbaccess/adodatalinks)Julien Nabet1-2/+8
+ add calls to o3tl::safeCoUninitializeReinit in error case blocks Change-Id: I781f174a43cd1c6b827299657a667fbb34f50143 Change-Id: I9895db229814837f0c0d756bca2c52c54d3d2e9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95690 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-06-09Fix variable nameSamuel Mehrbrodt1-4/+4
Change-Id: I307f4bca16cc54de8c049df570ba36c635f4e4d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93713 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-06-08rework treeview initial toggle button col to be like expander colCaolán McNamara4-34/+33
cause this assumption is baked into the vcl one making it hard to adapt remaining cases Change-Id: I75dd5264c65b1ffbf4d26c9a86f6d4d08b400d90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95622 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-05have just one way to set expander imageCaolán McNamara3-7/+7
Change-Id: Ic07709a864620c6146616c8e0a1417343c0937de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95590 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-05tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctornienzu2-4/+2
Change-Id: Ic61c1d5829b510a71b8d444f29ffed36ee540ea8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94717 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-06-04loplugin:simplifypointertobool improve (2)Noel Grandin1-1/+1
to look for the x.get() == null pattern, which can be simplified to !x Change-Id: I0eddf93257ab53ab31949961d7c33ac2dd7288ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95400 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-03Upcoming loplugin:elidestringvar: dbaccessStephan Bergmann7-20/+12
Change-Id: I5dc074a250ee169812f3ffd0cc4e598972ab87dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95396 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-29Clean up dead codeStephan Bergmann3-10/+0
The sole consumer of sURL in OTableSubscriptionPage::implInitControls had been removed with 32171521e23453dba193acba7cff455e436e3bac "INTEGRATION: CWS hsqldb". Change-Id: I198c3204281fb99d21dd403de22abf74231ffe35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95138 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-29loplugin:simplifybool in dbaccess..frameworkNoel Grandin1-1/+1
Change-Id: I0d73bb7d8d3fde426edc0a10c0750758b68aceb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95099 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-29change TreeView toggle signal to provide an iter instead of a row indexCaolán McNamara4-11/+7
Change-Id: Ib611780816d170daa40f394b9798640ff6284d68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95056 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-28Make loplugin:simplifypointertobool handle parenthesized expressionsStephan Bergmann2-2/+2
...as discussed as an open TODO in the commit message of fe6cce01c88d045a1fcf09acf049c34c22299b02 "Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptr". The necessary changes across the code base have been done fully automatically with the rewriting plugin on Linux. (All those changes apparently involve uses of macro arguments wrapped in parentheses in the macro body, but always in conditionally-converted-to-bool contexts. In other contexts, such automatic rewriting would add the "bool" to the macro body, which would be wrong in general, but we apparently get away with that sloppy coding for now.) The parenExprs_ stack that fe6cce01c88d045a1fcf09acf049c34c22299b02 had introduced to treat such (then-undetected, it had turned out) parenthesized cases now turns out to not be needed after all. Change-Id: I2021f61c2e2805be7e18b38edf8744d186cac3cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95010 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-26Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptrStephan Bergmann15-31/+31
...where the get member function is defined on a std::__shared_ptr base class, so loplugin:simplifypointertobool used to miss those until now. (While e.g. using libc++ on macOS found those cases.) 366d08f2f6d4de922f6099c62bb81b49d89e0a68 "new loplugin:simplifypointertobool" was mistaken in breaking isSmartPointerType(const clang::Type* t) out of isSmartPointerType(const Expr* e); c874294ad9fb178df47c66875bfbdec466e39763 "Fix detection of std::unique_ptr/shared_ptr in loplugin:redundantpointerops" had introduced that indivisible two-step algorithm on purpose. The amount of additional hits (on Linux) apparently asked for turning loplugin:simplifypointertobool into a rewriting plugin. Which in turn showed that the naive adivce to just "drop the get()" is not sufficient in places that are not contextually converted to bool, as those places need to be wrapped in a bool(...) functional cast now. If the expression was already wrapped in parentheses, those could be reused as part of the functional cast, but implementing that showed that such cases are not yet found at all by the existing loplugin:simplifypointertobool. Lets leave that TODO for another commit. Besides the changes to compilerplugins/ itself, this change has been generated fully automatically with the rewriting plugin on Linux. Change-Id: I83107d6f634fc9ac232986f49044d7017df83e2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94888 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-05-22Prefer CoInitializeEx instead of CoInitializeJulien Nabet1-2/+2
As https://docs.microsoft.com/fr-fr/windows/win32/api/objbase/nf-objbase-coinitialize?redirectedfrom=MSDN advised. Moreover, it'll make concurrency model explicit Change-Id: I247a49248bf45beb64a7985a7c0d078ee48efe2d Change-Id: I6e755fd516d9fb2dd2a9df0c66d9afd6070447ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94669 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-22move InterimItemWindow to vclCaolán McNamara1-1/+1
Change-Id: If0a4a14708810c44d087b51961f2ecb3fda4df23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94649 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-21weld ListBoxControlCaolán McNamara4-90/+118
Change-Id: I5a8c7d68e4c147eb938b0217dc6368c832e465c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94154 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-20weld ComboBoxControlCaolán McNamara3-25/+38
Change-Id: Ie862bb782b4c3e203af88d45c850ce0cab60f2e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94123 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-20use for-range on Sequence in d*Noel Grandin5-20/+17
and fix bug in GenericClipboard::initialize, where it was looping through the arguments, but always reading the first one. I'm guessing it was never an issue because it is always called with only one argument Change-Id: I8f72b6bce8c77a69c7d75115e34630e2c308261e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94553 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-17tdf#97416: fix Database password properties in ODB file not re-settable via UIJulien Nabet1-0/+1
Just call save_state() of the checkbox Change-Id: I3fa434b080efdcd284fba8e2f73d8e4846870576 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94363 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-15comphelper,sfx2,dbaccess: add ODFVER_013_TEXT constantMichael Stahl1-1/+7
This is used for Version of package in API. Change-Id: I23d162c4dfff2f56c541a7c6c2e21c87ed7d8213 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93087 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-15use more try_emplaceNoel Grandin1-4/+2
specifically looking for the pattern if (map.find(...) == map.end() map[...] = value Change-Id: I99f20d73f6e71a10726c9d39d8644c2e51120091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94151 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-13aInfo should be usedTomoyuki Kubota1-1/+0
Change-Id: I6a62a65462fde741b3425f9095195c29924ce85c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94092 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-13loplugin:unusedvariableplusNoel Grandin1-1/+0
Change-Id: I58a466ac18debafa3bc2ff31c648ff51e126ab8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94083 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-11remove archaic Content.xml fallbackCaolán McNamara1-14/+2
there's no evidence that Content.xml (or Meta.xml) was written by any released version to necessitate the fallback reportdesign Settings.xml and Style.xml fallbacks appear to be cargocult influenced by the Content.xml/Meta.xml examples Change-Id: I51d138344edaffc6d21e17c2d28047ea6316304e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93970 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-05-10new loplugin:simplifypointertoboolNoel Grandin5-5/+5
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10CopyTableWizard: make code less confusingLionel Elie Mamane4-108/+132
createTable looked into the requested operation, and depending on that, either created the table or fetched the existing one. For a function named createTable, that made for confusing reading. Split that into: * createTable that creates the table * getTable that fetches the existing table * returnTable that automagically creates or fetches an existing table, depending on the requested operation. Change-Id: I91be67c24026c850530dcaef5ec95ab508e81434 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93882 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2020-05-09Fix mapping CompositionType->EComposeRule (dbaccess/tablename)Julien Nabet1-1/+1
Digging in git history, I got this: commit bf7690bc1b444278bef1e355c7463d27381a8700 Author: Noel Grandin <noel@peralex.com> Date: Thu Feb 25 09:38:09 2016 +0200 convert EComposeRule to scoped enum Change-Id: I5a2e4f6f6f0f353c75dff85e865608b12c2104f9 but the bug was there from the beginning: commit ce7d8915eadfa24c27e7ae261fa222344a3f2e22 Author: Oliver Bolte <obo@openoffice.org> Date: Mon Jul 10 14:20:25 2006 +0000 INTEGRATION: CWS qiq (1.1.2); FILE ADDED 2006/05/24 06:54:32 fs 1.1.2.1: XTableName implementation Change-Id: I3f253f0fc6659d8853798ade3ad2bf2e72a8be82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93841 Tested-by: Lionel Elie Mamane <lionel@mamane.lu> Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2020-05-08replace ODFDefaultVersion usage with ODFSaneDefaultVersion...Michael Stahl1-5/+5
... in SvXMLExportPropertyMapper. The condition nCurrentVersion == SvtSaveOptions::ODFVER_UNKNOWN is impossible since d571a509aa324db9a425110a67ea142d157256b2. ODFVER_UNKNOWN isn't a value of ODFSaneDefaultVersion so use std::optional to handle the remaining usage. Change-Id: I1e33cb707c289224664a385b4e4425e6788b2943 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92728 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-05-08improve loplugin:referencecastingNoel Grandin3-3/+3
to catch a few more cases Change-Id: I0323fba51bb2b4ba255e1db5aa0d890c5c6a2e1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93726 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-08compact namespace in dbaccess..dtransNoel Grandin31-68/+54
Change-Id: Ie4b619dd19cc4d12d240759abea9c3ffdedd5c7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-07replace ODFDefaultVersion usage with ODFSaneDefaultVersionMichael Stahl1-3/+3
Compare with ODFSVER_012 mostly works the same, except for places where namespaces are defined where the ODFSVER_EXTENDED bit should be checked. Change-Id: I86469b763bc2f903632976bc9d6ec04d543d705e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92727 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-04-29simplify handling of comparing XML_NAMESPACE valuesNoel Grandin1-2/+2
Change-Id: I18bbf1ee206285842250891ce556d523489855b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-29weld SfxTemplatePanelControlCaolán McNamara1-0/+2
Change-Id: Ib3f6d01ddec37afc3987423dc15ab84ad6475f37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92942 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-28Fix typo in codeAndrea Gelmini1-14/+14
Change-Id: I857308750454f913be574547a9ac4e7437ddf3a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92936 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-04-28move the castToFastAttributeList functionNoel Grandin12-39/+13
to the slightly higher namespace, to make it easy and more readable to use directly in a for-loop-range expression. And make it return a reference rather than a pointer, since it is never allowed to be nullptr. Change-Id: I15d0b32493ef65cfc601b247c272b318f1eadfd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93049 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27loplugin:unusedfieldsNoel Grandin4-6/+2
Change-Id: I47034909e6258fc4d65d39f484d71290f793107d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27loplugin:makeshared in dbaccessNoel Grandin8-12/+11
Change-Id: Idf5f6179771edaf7af85d95e10b092ce0e3344f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92969 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27tdf#42949 Fix IWYU warnings in dbaccess/source/ui/[m-u]*/*cxxGabor Kelemen71-357/+29
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I6bf360b331589692141f6fca52eee5b8e11ef7bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92827 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann9-2/+12
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-25Typo: *Comparsion* -> *Comparison* in dbaccess/connectivityJulien Nabet2-4/+4
Change-Id: I9dfe37b290dbb83b1dfb2f92669ae254898ee72e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92898 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-04-24loplugin:unusedmethodsNoel Grandin2-41/+0
Change-Id: Ieec5099a8ce9fa3f07e36be244071efc1b101cf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92803 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-23loplugin:makeshared in dbaccessNoel Grandin6-35/+32
Change-Id: If4208532d2905410a07b846afee46fba2fe1e549 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92748 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-22move InterimItemWindow to svtoolsCaolán McNamara1-1/+1
Change-Id: I058b1d96a3ddfaa1aa96f66d0ebc6fa68900a48c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92697 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-22tdf#42949 Simplify use of rtl::math::approxEqual in include/basegfx/Gabor Kelemen1-0/+1
Turns out we can save about 500Mb of preprocessor input if we use rtl_math_approxEqual from rtl/math.h instead of its C++ wrapper rtl::math::approxEqual from rtl/math.hxx and manage the fallout accordingly. Before: bin/includebloat.awk | head sum total bytes included (excluding system headers): 19017296671 After: $ bin/includebloat.awk | head sum total bytes included (excluding system headers): 18535432672 Change-Id: I1691171f3a309405a7099882ad9989d147f59118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92508 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>