summaryrefslogtreecommitdiffstats
path: root/scripting/source
Commit message (Collapse)AuthorAgeFilesLines
* cppcheck: Possible inefficient checking for <var> emptinessJulien Nabet2015-01-043-3/+3
| | | | Change-Id: I6ca0e477a4429e762c48c721951b9876db3a5c6c
* boost::unordered_map->std::unordered_mapCaolán McNamara2015-01-046-34/+24
| | | | Change-Id: I5d458f43616edc395faa8c27edaddc7d515166db
* fdo#39440 reduce scope of local variablesMichael Weghorn2014-12-212-2/+2
| | | | | | This addresses some cppcheck warnings. Change-Id: I390607e002e93cf7a6babc26d9be084d9f185058
* scripting: Use appropriate OUString functions on string constantsStephan Bergmann2014-12-184-5/+5
| | | | Change-Id: Iacb434225e779de4911e9acc8431662f5eabcee3
* scripting: Use appropriate OUString functions on string constantsStephan Bergmann2014-12-153-7/+7
| | | | Change-Id: I8ee8eb92ac95937893c894e67882e9df2c16a67d
* pyuno: move "officehelper.py" from scripting to pyunoMichael Stahl2014-12-021-84/+0
| | | | | | | | | | | | | | ... because at least in Fedora packages with system python it's a pain to use officehelper.bootstrap() because unlike pyuno it is not installed in the standard python directories but in libreoffice/program. You might think that bootstrap() is not appropriate functionality for a UNO langauge binding, but then why does ::cppu::bootstrap() exist? Change-Id: I5fd4b344a811c087d32fb6304e55105ab3cb137e Reviewed-on: https://gerrit.libreoffice.org/12968 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
* sal: clean up public headers with include-what-you-useMichael Stahl2014-11-173-0/+3
| | | | | | | | | Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
* Fix common typos. No automatic tools. Handmade…Andrea Gelmini2014-11-121-1/+1
| | | | | | | Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* fdo#38835 strip out OUString globalsNoel Grandin2014-11-054-58/+19
| | | | | | | they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
* coverity#1237350 use our double-locking templates for thisCaolán McNamara2014-10-242-23/+25
| | | | Change-Id: I589468e9663ffd01a237a1684345985396bc4eac
* More -Werror,-Wunused-private-fieldStephan Bergmann2014-10-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...detected with a modified trunk Clang with > Index: lib/Sema/SemaDeclCXX.cpp > =================================================================== > --- lib/Sema/SemaDeclCXX.cpp (revision 219190) > +++ lib/Sema/SemaDeclCXX.cpp (working copy) > @@ -1917,9 +1917,10 @@ > const Type *T = FD.getType()->getBaseElementTypeUnsafe(); > // FIXME: Destruction of ObjC lifetime types has side-effects. > if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) > - return !RD->isCompleteDefinition() || > - !RD->hasTrivialDefaultConstructor() || > - !RD->hasTrivialDestructor(); > + return !RD->hasAttr<WarnUnusedAttr>() && > + (!RD->isCompleteDefinition() || > + !RD->hasTrivialDefaultConstructor() || > + !RD->hasTrivialDestructor()); > return false; > } > > @@ -3517,9 +3518,11 @@ > bool addFieldInitializer(CXXCtorInitializer *Init) { > AllToInit.push_back(Init); > > +#if 0 > // Check whether this initializer makes the field "used". > if (Init->getInit()->HasSideEffects(S.Context)) > S.UnusedPrivateFields.remove(Init->getAnyMember()); > +#endif > > return false; > } to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about initializations with side effects (cf. <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html> "-Wunused-private-field distracted by side effects"). Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
* coverity#1209004 Unchecked return valueNorbert Thiebaud2014-10-051-1/+1
| | | | Change-Id: I8749a5d6f176406e181312d94a1e643974d87617
* scripting: std::auto_ptr -> std::unique_ptrStephan Bergmann2014-10-011-1/+1
| | | | Change-Id: I91f4a037dfcfbea83cb1ea546ea73880f0480961
* scripting: another missing SolarMutex guardMichael Stahl2014-09-301-0/+2
| | | | Change-Id: I762dad4d94ab4f27912b4ddac5b6a77f7d685cb8
* fdo#83512 Make use of OUStringHash and OStringHashDaniel Sikeler2014-09-181-20/+2
| | | | | Change-Id: I33cafe68c798e3d54943ea1790fa4e73f85e525d Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
* Improve loggingStephan Bergmann2014-09-171-1/+3
| | | | Change-Id: I9c879cc16de0d5353a5ab8ce4c8a8cd7f000a170
* BRAND_BIN_SUBDIR -> BRAND_INI_DIR, to cater for new Mac OS X layoutStephan Bergmann2014-09-171-1/+1
| | | | Change-Id: Ic367545895a25a4cf6e95fc1be2f5db9f36a221b
* SfxHint: convert home-grown RTTI to normal C++ RTTINoel Grandin2014-09-061-1/+1
| | | | | | | | | | Also note that I fixed a bug in SvxFontMenuControl::Notify where the if statement had the check the wrong way around. Change-Id: I611e8929c65818191e36bd80f2b985820ada4411 Reviewed-on: https://gerrit.libreoffice.org/11147 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
* coverity#707084 Uncaught exceptionCaolán McNamara2014-09-022-2/+5
| | | | Change-Id: I89459f7a77fcb5785cfb2e8288326fce65202d9c
* createNonDocMSPs->ensureNonDocMSPsCaolán McNamara2014-09-022-22/+26
| | | | | | | put the double-lockery into ensureNonDocMSPs and the contents into a new createNonDocMSPs Change-Id: Id09c933396e1a6ae1c45be79131a75729b16932b
* Fix some *_component_getFactory function typesStephan Bergmann2014-08-282-4/+4
| | | | Change-Id: I912f9d1454c049419e9ead6f0ff8d7fa7d8cd6c5
* Avoid possible memory leaks in case of exceptionsTakeshi Abe2014-08-261-6/+3
| | | | Change-Id: Ib4a87cab2729e18b2c830cbd7e7a34d62b5f0f45
* convert SBX flag bits to type-safe enumNoel Grandin2014-08-261-1/+1
| | | | | | | Change-Id: I18d5d6a27f06ee60a5cb3dc393bf05b51bba4817 Reviewed-on: https://gerrit.libreoffice.org/11070 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* Fix *_component_getFactory function typeStephan Bergmann2014-08-211-2/+2
| | | | Change-Id: I966824af73effed95d975c09cb8a7f9ae022843f
* Fix *_component_getFactory function typeStephan Bergmann2014-08-211-2/+2
| | | | Change-Id: Id16c653554f5573dc862e0798747b7337ff74d44
* ErrorBox->MessageDialogCaolán McNamara2014-08-181-2/+2
| | | | Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
* new loplugin: externalandnotdefinedNoel Grandin2014-07-112-19/+13
| | | | | | | | Find "missing headers," where a function is declared directly in the .cxx (as extern) and not defined, and should arguably instead be declared in an include file. Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
* remove SFX_APP() macro that was a mer wrapper for SfxGetApp()Norbert Thiebaud2014-06-273-4/+4
| | | | Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
* fixes for up-casting to Reference<XInterface>Noel Grandin2014-06-252-4/+4
| | | | | | | | | Fix regressions introduced with 6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 "Use the new type-checking Reference constructor to reduce code noise" Change-Id: I85662856f21c810a7db497fe3b0e116f075b1687 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
* Related fdo#58774 Alternative dialog Find & Replace for WriterJulien Nabet2014-06-211-1/+1
| | | | | | | | | | | | After having installed the extension from http://extensions.libreoffice.org/extension-center/alternative-dialog-find-replace-for-writer/releases/1.4 I had a crash, extract of bt: 5 0x00002aaad3ee13df in rtl::OUString::copy (this=0x7fffffff2510, beginIndex=147, count=-15) at /home/julien/compile-libreoffice/libreoffice/include/rtl/ustring.hxx:1481 6 0x00002aaad3edc10e in stringresource::StringResourcePersistenceImpl::implScanLocaleNames (this=0x8e2bba0, aContentSeq=uno::Sequence of length 24 = {...}) at /home/julien/compile-libreoffice/libreoffice/scripting/source/stringresource/stringresource.cxx:1728 So add a quick check to be sure iDot > iSlash Change-Id: I944a852d6cc9a35c451985ac96032f0d848136e8
* loplugin: inlinesimplememberfunctionsNoel Grandin2014-06-092-6/+1
| | | | Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
* scripting: remove SAL_THROW macroNoel Grandin2014-06-0510-37/+6
| | | | Change-Id: I535a57d043ac51926ae6f640d721d0dd1571c3fa
* compareToAscii -> equalsAsciiNoel Grandin2014-06-041-1/+1
| | | | | | convert places using compareToAscii that should be using equalsAscii Change-Id: I97b4da7f6e867c3967b2f65b70d6886f83b4a4e5
* fdo#68849: Add header guards to all include filesJens Carl2014-06-013-0/+17
| | | | | | | | | Added header guards to files in directories sal/, sal/, and scripting/ Change-Id: Ieb7f224f2d27bd671618c516f47f5b7f08c1d294 Reviewed-on: https://gerrit.libreoffice.org/9582 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
* remove more unnecesary OUString constructor useNoel Grandin2014-05-292-21/+6
| | | | | | when throwing exceptions Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac
* remove more unnecessary use of OUString constructorNoel Grandin2014-05-271-5/+5
| | | | Change-Id: Iae14cb3df65295b6894fd9e05411c5698e9c8aba
* remove boilerplate in UNO Exception constructor callsNoel Grandin2014-05-2311-76/+43
| | | | | | | Now that we have default values for Exception constructor params, remove lots of boilerplate code. Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
* Resolves: #i113481# query script invocation from the current frame...Tsutomu Uchino2014-05-181-0/+40
| | | | | | | | when the controller is not yet attached (cherry picked from commit 03a410876fbdb5f9e1a7216d9d622557275d4896) Change-Id: I1da3b3da258445d5187dcc75c4d151d08f9017dc
* Correct common misspellings, and remove some ASCII art along the way.Chris Laplante2014-05-171-1/+1
| | | | | | | Change-Id: I42787db31769e8bde984c5f4f0aa90335e889b1c Reviewed-on: https://gerrit.libreoffice.org/9356 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
* various loplugin:passsequencebyrefNoel Grandin2014-05-141-2/+2
| | | | Change-Id: Id1045a7f66b4fa10b6491587ba07246a31ceba72
* Fix previous commit (scripting part)Julien Nabet2014-05-111-2/+2
| | | | Change-Id: Ib451642924909c11db4252e81d0c6db690c0e838
* Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part10Julien Nabet2014-05-112-3/+3
| | | | Change-Id: I67acda35fa127547dcea0cd18c9dc16db7c00294
* scripting: sal_Bool->boolNoel Grandin2014-04-249-27/+27
| | | | Change-Id: I1550c49cce2ad64f9d62b06ec20512a750f83b84
* remove comments why a file gets includedThomas Arnhold2014-04-211-1/+0
| | | | | | also remove some commented out code Change-Id: Ia80c5c57d8d2a74418032de50eee95642cc0969d
* fixincludeguards.sh: some smaller dirsThomas Arnhold2014-04-1917-45/+45
| | | | Change-Id: Ic25bd678dc299627299b22145efd7bebcf2b39d0
* Clean up function declarationsStephan Bergmann2014-04-148-63/+83
| | | | Change-Id: Ie204bb9dc1fb4ded416087f5a3d962924b3dec82
* remove unnecessary scope qualifier from sal_Bool usesNoel Grandin2014-04-034-30/+30
| | | | | | i.e. convert "::sal_Bool" to "sal_Bool" Change-Id: Ie5943aee4fee617bf2670655558927ed25b7e067
* Explicitly mark overriding destructors as "virtual"Stephan Bergmann2014-04-014-8/+8
| | | | | | | | It appears that the C++ standard allows overriding destructors to be marked "override," but at least some MSVC versions complain about it, so at least make sure such destructors are explicitly marked "virtual." Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
* coverity#704287 Logically dead codeCaolán McNamara2014-03-291-43/+40
| | | | Change-Id: Iab22d2d12319bc01f9aebc1dcf40f47881d40446
* Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann2014-03-2711-104/+104
| | | | | | | ...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: Ie656f9d653fc716f72ac175925272696d509038f