summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/module/pyuno_runtime.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 283ffc53edd8..8eb64c7fe54d 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -39,6 +39,7 @@
#include <com/sun/star/script/Converter.hpp>
#include <com/sun/star/script/InvocationAdapterFactory.hpp>
#include <com/sun/star/reflection/theCoreReflection.hpp>
+#include <comphelper/sequence.hxx>
using com::sun::star::uno::Reference;
@@ -636,11 +637,7 @@ bool Runtime::pyIterUnpack( PyObject *const pObj, Any &a ) const
items.push_back( pyObject2Any( rItem.get() ) );
}
while( (pItem = PyIter_Next( pObj )) );
- Sequence<Any> aSeq( items.size() );
- ::std::list<Any>::iterator it = items.begin();
- for( int i = 0; it != items.end(); ++it )
- aSeq[i++] = *it;
- a <<= aSeq;
+ a <<= comphelper::containerToSequence<Any>(items);
return true;
}
2019-05-03Use hasElements to check Sequence emptiness in sfx2..svxArkadiy Illarionov Similar to clang-tidy readability-container-size-empty Change-Id: Icabd773f3b924d465b33e8581175f1fcf70c282e Reviewed-on: https://gerrit.libreoffice.org/71704 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2019-04-08tdf#42949 Fix IWYU warnings in include/sfx2/[t-z]*Gabor Kelemen Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib3252828385d1dc8faf48a428b1593199647a679 Reviewed-on: https://gerrit.libreoffice.org/70383 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 2019-02-07loplugin:flatten in sfx2Noel Grandin Change-Id: If4e07d497ead58a2ff58b5fdedd282b8784be421 Reviewed-on: https://gerrit.libreoffice.org/67435 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-10-09loplugin:constfields in sfx2Noel Grandin and we find that bSplitable in SfxDockingWindow is always true, ever since commit 4bd28a2fee0d36c67911019eeb7d934838e27cad Date: Tue Jan 29 15:27:40 2008 +0000 INTEGRATION: CWS fwk82_SRC680 (1.45.138); FILE MERGED so we can remove all of the non-splittable code there. ` Change-Id: Ia7fe607ed02d1a7c69a92bab57e220b19f0e6e87 Reviewed-on: https://gerrit.libreoffice.org/61550 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-09-17New loplugin:externalStephan Bergmann ...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2018-09-13tdf#42949 Fix IWYU warnings in include/ucbhelper/*Gabor Kelemen Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7bfeef47abaf94cfb355db95c0fdb928ce36c0a6 Reviewed-on: https://gerrit.libreoffice.org/60232 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> 2018-09-10loplugin:simplifyconstruct in sfx2..starmathNoel Grandin Change-Id: I9fbdd23ad61773e57aaf7d70fd19d05a50b8d399 Reviewed-on: https://gerrit.libreoffice.org/60238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-04-11return std::unique_ptr from SfxItemSet::CloneNoel Grandin Change-Id: Ie747b5c8ff0b82b9f8d268f9a60dbde41b5f022b Reviewed-on: https://gerrit.libreoffice.org/52712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-02-15loplugin:changetoolsgen in sfx2Noel Grandin Change-Id: I34a007711e2ffc70bdee6823ea9b85f60f819e6e Reviewed-on: https://gerrit.libreoffice.org/49727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-01-15More loplugin:cstylecast: sfx2Stephan Bergmann Change-Id: Ifdb964558f070e7c9ee87eabeaafa5c3c079c0c9 2018-01-14Fix typosAndrea Gelmini Change-Id: I2b4988e1d81fe60f7699362480cd739d2620c053 Reviewed-on: https://gerrit.libreoffice.org/47856 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> 2017-11-20look for =() in loplugin:unnecessaryparenNoel Grandin 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 Gelmini Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com> 2017-10-26vcl: make MapMode constructor explicitMichael Stahl Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988 2017-09-29loplugin:flatten check for throw in then clauseNoel Grandin 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-23loplugin:flatten in sdext..stocNoel Grandin Change-Id: I460e813e20a691c53738373376d3363f553bbab2 Reviewed-on: https://gerrit.libreoffice.org/42636 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-06-13Use unique_ptr for SfxPrinter::pOptionsStephan Bergmann Change-Id: I46be77225c0323f8b7f293de9c022f0de6f425b7 2017-05-19loplugin:stringcopy: sfx2Stephan Bergmann Change-Id: I9aa713a0839993fae202fc81431eb937d0604cb7 2017-05-11remove some unnecessary temporary OUStringsNoel Grandin found with: git grep -nP 'OUString\(\s*\w+\s*\)' | grep -v new | grep -v return Change-Id: I923109b4339210aed2639e423fbc4d5f19233f02 Reviewed-on: https://gerrit.libreoffice.org/37463 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-03-31use actual UNO enums in sfx2Noel Grandin Change-Id: Ide3ce0bc1afc9de46c2d06b161acff8d32fe1193 Reviewed-on: https://gerrit.libreoffice.org/35911 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-02-10convert InsertOperation to scoped enumNoel Grandin and drop unused LINK enumerator Change-Id: I6c42424ae5a7503b3e14e5f04fcf7a49b595b416 2017-02-05sal_uIntPtr to sal_uInt16Matteo Casalin Change-Id: If463ae457f53a0a8b12cc0748afbc654f54ae3c3 2017-02-02convert method names in tools::SvRef to be more like our other..Noel Grandin reference classes, uno::Reference and rtl::Reference. Specifically rename Is()->is() and Clear()->clear(). Change-Id: Icb7e05e2d09cb9977121508b837ba0961dabb4ae Reviewed-on: https://gerrit.libreoffice.org/33576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-01-26Remove dynamic exception specificationsStephan Bergmann ...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2017-01-17new loplugin: useuniqueptr: sfx2Noel Grandin Change-Id: I544c615105d14fa258fed7f30790d305e987f523 Reviewed-on: https://gerrit.libreoffice.org/33206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>