summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)AuthorFilesLines
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann22-363/+363
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-25Remove visual noise from svlAlexander Wilms17-107/+107
Change-Id: Ib914ec8d161e24f4e3e1fb8e7684a780d3ae6209 Reviewed-on: https://gerrit.libreoffice.org/8319 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2014-02-25svl: don't forget about big-endian parts in filerec.cxxDouglas Mencken1-1/+1
Fixes: (build error) filerec.cxx:591: error: no match for 'operator>>' Change-Id: I412cc9121c50830069e8e71c35dfb4f8ce475357 Reviewed-on: https://gerrit.libreoffice.org/8206 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-02-25Replace deprecated std::auto_ptr with boost::scoped_ptrTakeshi Abe1-2/+2
Change-Id: I8e11ffe888aac8887c4c0875c41de51f343debae
2014-02-24Remove some temporaries around calls to SvNumberFormatter methodsMatteo Casalin1-4/+2
Change-Id: Ib03c97a52df120bac1ac9b2b9d2e52431ead1027
2014-02-23Remove unneccessary commentsAlexander Wilms28-280/+280
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-20Add SvStream::ReadCharAsBoolStephan Bergmann4-11/+11
Change-Id: I9dc0525e04de5ae79205872b779dcd0115a9cc14
2014-02-20svl: sal_Bool -> boolStephan Bergmann23-182/+182
Change-Id: Ic31455a1f5ffffa35d4fdde901dd70734207b6f4
2014-02-19coverity#738853 Uninitialized scalar fieldCaolán McNamara1-2/+4
Change-Id: I01e72000f9e624b73351306e7d52c0ba18cbd8e1
2014-02-19coverity#738854 Uninitialized scalar fieldCaolán McNamara1-0/+3
Change-Id: Iace6e3f93f05342d7b1652e8118be01a142b82cc
2014-02-18Stick to a single O[U]String hash functionStephan Bergmann1-2/+2
8f8bc0dcf3bc253ae49159d52db049767f476ced "Move string hash function into String class" had introduced a new getHash64 that, besides returning sal_uInt64 instead of just sal_Int32, didn't do sampling of only a handful of characters, but always computed the hash over all characters (as the usage in SfxItemSet and SdPage appears to require for either performance or approximated correctness). However, it would be advantageous to keep the stable URE interface as small as possible. Now, O(1) sampling was apparently considered state of the art when the rtl string classes were first created, closely copying java.lang.String, which at that time demanded sampling for hashCode(), too---but never sampling more than 15 characters, with the obvious (in hindsight, at least) performance catastrophes, so they changed it to O(n) somewhere along the way. Based on that, this commit changes the existing hash functions to not do sampling any more, and removes the newly introduced -64 variants again. (Where the extended value range of sal_uInt64 compared to sal_Int32 was hopefully not vital to the existing uses.) The old implementation used sampling only for strings of length >= 256, so I did a "make check" build with an instrumented hash function that flagged all uses with inputs of length >= 256, and grepped workdir/{Cppunit,Junit,Python}Test for hits. Of the 2849 hits encountered, 2845 where in the range from 256 to 295 characters, and only the remaining four where of 2472 characters. Those four were from CppunitTest_sc_subsequent_filters_test, importing long text into a cell, causing ScDocumentImport::setStringCell to call svl::SharedStringPool::intern, which internally uses an unordered_set. These results appear to justify the change. Change-Id: I78fcc3b0f07389bdf36a21701b95a1ff0a0d970f
2014-02-18coverity#984145 Uninitialized scalar fieldCaolán McNamara1-2/+3
Change-Id: I08d4de5fc4cbc56feda0f57f95ae76cd25b124e3
2014-02-17ucbhelper: sal_Bool -> boolStephan Bergmann1-6/+6
Change-Id: Iee327c3dd75bebb35d99de01eaa7103956e08974
2014-02-13SimplificationStephan Bergmann1-5/+4
Change-Id: I949bf3cb9c3b26a8c2de6bde20cef63d7630fc54
2014-02-13-Werror,-Wunused-variableStephan Bergmann1-1/+0
Change-Id: I91ab5f87f859b855c858a41afd218f57b03ad3a2
2014-02-13n#757432: Styles (rename &) copy to different decks.Muthu Subramanian1-0/+23
While copying slides to different slide decks, styles were not being copied if there is already one with the same name. This patch renames and copies those to keep the formatting intact. Change-Id: I66f71493f1fd658eed43e39aa7ae7ee7b5463b34
2014-02-12remove SvStream::operator>> methodsNoel Grandin1-3/+3
in favour of ReadXXX methods. Change-Id: Ic2c0a7b6b92ff4c236ae99b39d77f3d935b301e3 Reviewed-on: https://gerrit.libreoffice.org/7915 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-02-12more SvStream:operator>> conversionNoel Grandin2-2/+2
Convert the template based read_lenPrefixed methods to regular methods. Change-Id: Ifd0e93aca055e55a0575e4377ec2b8e266dfb019 Reviewed-on: https://gerrit.libreoffice.org/7895 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-02-12convert SvStream::operator>> methods to ReadXXX methodsNoel Grandin16-89/+89
First, I updated the clang rewriter to do the conversion. Then I lightly hand-tweaked the output for the few places where the rewriter messed up, mostly when dealing with calls on "this". Change-Id: I40a6a977959cd97415c678eafc8507de8aa3b1a9 Reviewed-on: https://gerrit.libreoffice.org/7879 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-02-11coverity#440944 Logically dead codeCaolán McNamara1-91/+65
Change-Id: Ie01738985311c915ca9f2d8dd47ca6cb96d1b26c
2014-02-05SfxItemSet::operator == should return boolStephan Bergmann1-8/+8
...and need not be virtual Change-Id: I8cf38c4942526c6ca66595fdc3297be750ec09a0
2014-02-04convert specialised SvStream::operator>> methods to ReadXXX methodsNoel Grandin3-3/+3
as preparation for converting the SvStream::operator>> methods on primitive types Change-Id: I62f134bced15c687d6e0d46924f56e8d1c3d95b9 Reviewed-on: https://gerrit.libreoffice.org/7798 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-01-30fdo#63154 Removed unused solar.h ref. in linguc., sfx2, starmath, svl and svxAlexandre Vicenzi1-1/+0
Change-Id: I241661119371b75804fcf9215ff5e5da2a5b9265 Reviewed-on: https://gerrit.libreoffice.org/7732 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-01-29bool improvementsStephan Bergmann2-2/+2
Change-Id: I0dc09b7a6ee2849bd0c2ffc31be45f81cd2c15ee
2014-01-28bool improvementsStephan Bergmann17-92/+92
Change-Id: I6cf511b92383f3cd60923620518b9233b82850c0
2014-01-23Let C++ inline functions return bool instead of sal_BoolStephan Bergmann1-2/+2
...to improve diagnosing misuses of boolean expressions in client code (cf. compilerplugins/clang/implicitboolconversion.cxx). This change should be transparent to client code. Missing overloads of insert() for bool have been added to OStringBuffer and OUStringBuffer (which required dropping one !VALID_CONVERSION check that would now pick that overload, but would be flagged by compilerplugins/clang/pointertobool.cxx). Change-Id: I2d64cd923b8f47bfaa31e753def6515c29a3f8c9
2014-01-22convert more SvStream::operator<< callsNoel Grandin5-38/+38
.. to more explicit SvStream::Write* calls This was done using another run of the clang rewriter, and then a lot of hand tweaking to fix all the places where the rewriter did not play nice with various macros. Change-Id: I7bcab93851c8dfb59cde6bc76290c6484d88fb18 Reviewed-on: https://gerrit.libreoffice.org/7494 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-01-22Clean up SfxItemSet::PutStephan Bergmann1-16/+3
* Make inherited overloads visible via "using" in SfxAllItemSet. * The overload with SfxItemSet argument: ** need not be virtual (verified by temporarily marking it SAL_FINAL); ** should apparently return bool. Change-Id: I5c57ec3d757d3d32a3e23be12964e7ebb81e6211
2014-01-22bool improvements (related to mixing bool/sal_Bool in &=, |=, ^=)Stephan Bergmann1-2/+2
Change-Id: I9869d9709f28b68ef7b518527175589d80644668
2014-01-21bool improvementsStephan Bergmann4-20/+20
Change-Id: I5c72b0bc34d87312437ae32a506567c3fb3bfa19
2014-01-21bool improvementsStephan Bergmann1-1/+1
Change-Id: I28697ffd7902321730435e15fcf3018c78a61c5f
2014-01-17Translate German ("kein break") comments to English ("no break").Sven Wehner1-1/+1
Change-Id: Ibbc706d1c3cd36e21da2a15077392f9d75ba39fd Reviewed-on: https://gerrit.libreoffice.org/7498 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-01-16convert SvStream::operator<< overloads to more explicit methodsNoel Grandin3-3/+3
This is in preparation for more conversion of SvStream::operator<< calls to use more explicit method names. This converts the subclasses that have their own convenience overloads of operator<< to use normal methods. Change-Id: I5efd5d9a24c264cb86d2471303dd5849bf91ba80
2014-01-16fdo#54938: Convert svx and svl to cppu::supportsService...Marcos Paulo de Souza2-23/+11
...final season Change-Id: Ie51ac231def4a8a6e2681b81de7580798c95eed2
2014-01-10Use boolStephan Bergmann1-3/+3
Change-Id: I38f7ec288b907e889c71821cfbfac46a9688ba0c
2014-01-10SfxItemSet::Set should return boolStephan Bergmann1-4/+4
Change-Id: Icb38319f1307e94ce5c6d43b999a08db1fc38d85
2014-01-10SfxPoolItem::operator ==, != should return boolStephan Bergmann22-36/+33
...and SfxEnumItemInterface::HasBoolValue, too. Change-Id: Ia032e3d35a4c3b4c1efdc515ca36e466be03fc0a
2014-01-10re-write SvStream operator<< to non-overloaded methodsNoel Grandin13-58/+62
This is the actual re-write. Use a clang rewriter to rewrite SvStream::operator<< to methods like WriteuInt32. Note that the rewriter is not perfect, and I hand-tweaked the output. In particular, I had to adjust places doing things like (*this) << 1; Change-Id: I5923eda3f4ebaa8b452b6ef109e726e116235a2a Reviewed-on: https://gerrit.libreoffice.org/7342 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-01-07Fix typo in my commitNoel Grandin1-1/+1
Fix typo in my commit 82625bb98e256b83351328d3bf2a14e3dd244eef "remove unnecessary sal_Unicode casts in OUStringBuffer::append calls" Change-Id: I593c6a8ce5be3d4e2783acd3800626d7eb9a0480
2014-01-07remove unnecessary sal_Unicode casts in OUStringBuffer::append callsNoel Grandin5-14/+14
Convert code like: buf.append( static_cast<sal_Unicode>('!') ); to: buf.append( '!' ); Change-Id: Iacb03a61de65a895540940953b49620677b3d051
2013-12-27cppcheck: fix var reassignedJulien Nabet1-3/+1
Change-Id: I10bb64672d02626814c162b09b8bdd615f7fcad8
2013-12-23fix crash when erasing entry while iterating through vectorMarkus Mohrhard1-1/+2
Broadcast might result in calling Remove on the same object which erases the entry from the listeners vector. If we create a copy we can still iterate through the vector as all iterators are still valid.
2013-12-23iterators are not pointersEike Rathke1-3/+3
Change-Id: Ic9809beead66cf0d0e6a6a28bb97b220fb667578
2013-12-21Make the broadcasting work even when about to destruct.Jan Holesovsky1-46/+47
Change-Id: Idba9302e1ec5234d3d472cda047c09ba52afd328
2013-12-21Don't call EndListening() on already destructed listeners.Jan Holesovsky1-15/+34
Change-Id: I9bda35f2246de9d37077dda33c710b89ee008e5a
2013-12-21Speedup destruction of sheets with too many listeners & broadcasters.Jan Holesovsky1-3/+6
Listeners and broadcasters are M:N relationship. If you want to destruct them, you easily end up in O(M*N) situation; where for every listener, you iterate all broadcasters, to remove that one listener. To avoid that, announce to the broadcasters that they are going to die, and the listeners do not have to bother with removing themselves from the broadcaster. The broadcaster will not broadcast anything after the PrepareForDesctruction() call anyway. Change-Id: I68d78b23e73bcbb944de9139448b2c20dfa14f62
2013-12-20typo fixesAndras Timar1-1/+1
Change-Id: Ia5f104bfd707bcf4e159c78ca2764c861fb0b6d9
2013-12-19svl: whitespace fixes in grabbagitemMiklos Vajna1-4/+4
Change-Id: I363e8c0f1a51a18bf0ad0ac4f931107137fd1c58
2013-12-17Adapt all (non-extension, SharedLibrary) .components to environment="..."Stephan Bergmann3-5/+6
Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83
2013-12-17remove unnecessary double calls to OUString constructorNoel Grandin1-8/+8
Change-Id: Ib2690e3ec9987b97363687b61fe8ddae4ace9058