summaryrefslogtreecommitdiff
path: root/tools/source/stream
AgeCommit message (Collapse)Author
2015-05-11loplugin:cstylecast: nop between pointer types of exactly same spellingStephan Bergmann
Change-Id: Ic4b6409013a19a78025973b26318ef05611a6984
2015-04-22Various #include <sal/log.hxx> fixupsStephan Bergmann
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. Cleaned up some, but something like grep -FwL sal/log.hxx $(git grep -Elw \ 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx) shows lots more files that potentially need fixing before the include can be removed from rtl/string.hxx and rtl/ustring.hxx. Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann
Change-Id: Ife048a705e899870a8b1d9987b109d5c0cd80599
2015-03-11V668 no sense in testing the result of new against nullCaolán McNamara
Change-Id: I4a33bd92fc8448638a4bfe1eab7e5041a4c5cc39
2015-02-12tdf#89319 SvFileStream: remove redundant osl_getFilePos() callsLászló Németh
on unx platform Change-Id: Ibdcb7017718154b11ab6dcfc4124beab5efd7b56
2015-02-05convert all remaining BOOST_STATIC_ASSERT to static_assertCaolán McNamara
and we can include a few less headers Change-Id: Id742849ff4c1c37a2b861aa3d6ab823f00ea87f8
2015-01-20Some more loplugin:cstylecast: toolsStephan Bergmann
Change-Id: I2b540c4c0c34823143e13d16559dac7458a38933
2015-01-07fdo#84938: convert COMPRESSMODE_ #defines to 'enum class'Noel Grandin
Change-Id: Ica501fc73e7e5f9dbd30dd9da3f337b2dc7e6f02
2015-01-07fix windows buildNoel Grandin
after my commit 7f8f277b94704a289fbbd1b836e4e5d66311580d "fdo#84938: convert STREAM_ #defines to 'enum class'" Change-Id: I82c5b7812687b6f080bea281485e9ad2ecc5353c
2015-01-07fdo#84938: convert STREAM_ #defines to 'enum class'Noel Grandin
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
2015-01-05valgrind: Conditional jump or move depends on uninitialised valueCaolán McNamara
Change-Id: Id5125052b49e322cdfa2c7d55d68e8a7a512965c
2015-01-05fdo#84938: replace NUMBERFORMAT_INT_ constants with 'enum class'Noel Grandin
Change-Id: I9c67de31f5571b282adc132d973b79bccb35fdc9
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl
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
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-26SvStream - rename WriteNumber methodsNoel Grandin
to Write?Int32AsString. Since the original name was so generic as to be meaningless. Change-Id: Iaaaf592904af51f2b9988fa8efb344c1b2bf9b0f
2014-08-20Remove more useless includes of tools/debug.hxxMarcos Paulo de Souza
Change-Id: If289dcbff125ac0088f01b5c9752f9f3173585dc Reviewed-on: https://gerrit.libreoffice.org/11020 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-08-15fdo#82644 write sal_Unicode chars as UnicodeDavid Tardon
Regression from commit de84529b55f5b295b089043a7119d6b0d8b92408. Change-Id: I8f0b148ec7df4f676341f588c04780a705c80a5c
2014-07-01clang scan-build: various warningsCaolán McNamara
Change-Id: I4bdfb074b3cf6fcb49765322308dfa4b9ed67713
2014-06-26clang: Assigned value is garbage or undefinedCaolán McNamara
Change-Id: Ida7a6ab077e1f0436f8b775956d30c82c4ad5338
2014-05-22fix-includes.pl: toolsThomas Arnhold
Change-Id: I66b3dc79998de018eae1c7eff8ce23f95e3c3f33
2014-04-14remove OV* debug stuffThomas Arnhold
2014-04-14remove outdated RS6000 checksThomas Arnhold
2014-03-30MSVC helpfully provides warning C4310: cast truncates constant valueMichael Stahl
Change-Id: I985216d7bade6cbb3a037b07fe44438543d63ba0
2014-03-30tools, sc: fix GCC -Werror=type-limits (comparison is always true)Michael Stahl
... on 32 bit platforms. These asserts appear to be impossible anyway. Change-Id: I6bd332ca49e9992740315e0f6c58e98ac337817c
2014-03-30deploy some asserts to detect truncated STREAM_SEEK_TO_ENDMichael Stahl
Since STREAM_SEEK_TO_END is now 64 bits it could happen that some existing code uses it in some indirect manner and it gets truncated to 32 bits somewhere (on 32 bit platforms); try to detect that with asserts. Of course the checked value is now a valid stream position, so perhaps the checks should eventually be removed. Change-Id: I4248c00d758220bdc3ee94c7aa7a7bd4c86c57f0
2014-03-29tools: try to fix std::min ambiguity for MSVCMichael Stahl
Change-Id: Id81ad8702d513c5bb3f4f8de2f9d7c75c7852d4d
2014-03-29tools: remove unused SvStream::IsA() and associated ID_*STREAM macrosMichael Stahl
Change-Id: I6ed0991fb5bd1d5085ee1b93323b57b1afc69860
2014-03-29tools: support 64-bit file positions in SvStreamMichael Stahl
Bump stream positions to 64 bits on: SvLockBytes::SetSize() SvStream::SeekPos() SvStream::SetSize() SvStream::SetStreamSize() SvStream::Seek() SvStream::SeekRel() SvStream::Tell() SvStream::remainingSize() SvStream::nActPos SvStream::nBufFilePos Change-Id: I0521fd60d31d1a33e5634cbf51dd42edc46ad919 TODO: adapt callers of Seek()/SeekRel()/Tell()/remainingSize()
2014-03-29tools: allow 64-bit positions on SvLockBytesMichael Stahl
Bump stream positions to 64 bits on: SvLockBytes::ReadAt() SvLockBytes::WriteAt() SvAsyncLockBytes::m_nSize SvOpenLockBytes::Seek() SvOpenLockBytes::Tell() SvOutputStreamOpenLockBytes::m_nPosition OInputStreamHelper::m_nActPos Change-Id: Ica3b674e0ab23a756260a51475e97a5396ecdddb
2014-03-28Remove remaining DBG_NAME* usesStephan Bergmann
...that had been used for DBG_CTOR, DBG_PROF, etc. Change-Id: I8eac38e24b7110511feb7813aaf5a20ab82bdbe0
2014-02-27do not crash if allocation failedDavid Tardon
Change-Id: I2fbc259de52a3c7f2c8c33027d74bb857d44b437
2014-02-25remove unused code SvStream::WriteUCharPtr(unsigned char const*)Noel Grandin
Change-Id: I7f341a10d2fffb8eda45478756bc221127ab72cf
2014-02-24make the implementation use the same type than the declarationNorbert Thiebaud
Change-Id: I860e6db6ea4a7a7194283ba4fc23ae30cb1de4f8 Reviewed-on: https://gerrit.libreoffice.org/8201 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-02-20Add SvStream::ReadCharAsBoolStephan Bergmann
Change-Id: I9dc0525e04de5ae79205872b779dcd0115a9cc14
2014-02-12more SvStream:operator>> conversionNoel Grandin
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 Grandin
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-07Simplify InternalStreamLock instance handlingStephan Bergmann
Change-Id: Id5bd445ad4f2397cbff01099ba3779736bb47e61
2014-02-07coverity#708893 unused pointer valueNoel Grandin
Change-Id: Ib029e08f7dc29330b1a0b5d93c1c0a356dbd59dd
2014-01-21TOOLS : Remove usage of DBG_CTOR and DBG_DTOR.Arnaud Versini
Valgrind is capable of detecting such bugs. No need for extra macros. Change-Id: Id75ca6991af0bf75e979c7bc2da452f323f389ea Reviewed-on: https://gerrit.libreoffice.org/7531 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-01-10re-write SvStream operator<< to non-overloaded methodsNoel Grandin
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-10Clang plugin to re-write SvStream operator<< to non-overloaded methodsNoel Grandin
Use a clang rewriter to rewrite SvStream::operator<< to methods like WriteUInt32. Note that the rewriter is not perfect, and hand-tweaking the output is necessary. Change-Id: I0291c8192ca74d6334ed3cf8cb713212b2f0c67d Reviewed-on: https://gerrit.libreoffice.org/7307 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-11-27Unwind occurrences of deprecated sal_sChar, sal_uCharStephan Bergmann
Change-Id: I76be464200d486efef9c8a7e957c310c9adae3b8
2013-11-13implement very simple SvScriptStream to read from processMatúš Kukan
It inherits from SvStream, so it could be used easily. Basically, it's just a simple wrapper around osl_executeProcess_WithRedirectedIO() and osl_readFile(). Change-Id: Ifa225c87d2c9be7e71ea113b0832a4fe83ec65b3
2013-10-23clean up places accessing the NULL at the of an OUStringNoel Grandin
There were only a couple of real bugs fixed, but we're a little bit safer now. This also fixes the assert and the comment in OUString::operator[] about this. Change-Id: Ibe16b5794e0ba7ecd345fa0801586d25b015974c
2013-10-22Bin comments that claim to say why some header is includedTor Lillqvist
They are practically always useless, often misleading or obsolete. Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-11-Werror,-Wunused-variableStephan Bergmann
Change-Id: Ia49c97f3ccecf42852e21f0a3690352b9620e16c
2013-10-02-Werror,-Wunused-functionStephan Bergmann
Change-Id: I8167a8134b043fa1737d9a1ea67c9401de1a38da
2013-09-01Remove some unused code from unusedcode.easyMarcos Paulo de Souza
Change-Id: Ic3e96eebbb914c5b905a8c58532ead9cb01dd41d Reviewed-on: https://gerrit.libreoffice.org/5721 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-07-16Delete SvCacheStream classPalenik Mihály
I changed SvCacheStream class to SvMemoryStream class in the following: MSE40HTMLClipFormatObj, SfxLockBytesItem, SwEditShell, INetMIMEMessageStream classes, MakeLockBytes_Impl function and SwUnoCursorHelper namespace. I modified header the precompiled_sw.hxx, wrtsh1.cxx, unoobj2.cxx. I added two functions in SvMemoryStream class: GetBuffer and GetSize, and I renamed the old GetSize function to GetBufSize. I deleted SvCacheStream class. Change-Id: I929236538dfbe23cccfd1eb85f10c1d5411baa8d Reviewed-on: https://gerrit.libreoffice.org/4847 Reviewed-by: Andras Timar <atimar@suse.com> Tested-by: Andras Timar <atimar@suse.com>
2013-07-02SvStream: remove the error prone operator<</>>(sal_Int64)Michael Stahl
As the recent regression after merging AOO patch adding code serializing "long" variables has shown, this overload (which was added in 7b2a0e541567be9750dfc7d98374555967da3470) is a bad idea. In a unxlngx build, nm finds uses of the symbols _ZN8SvStreamrsERl and _ZN8SvStreamlsEl in these files: - sbxvalue.cxx: this appears to be a legitimate use with sal_Int64 - dateitem.cxx: this was accidentally changed by commit 9830fd36dbdb72c79703b0c61efc027fba793c5a - atrfrm.cxx: this was added for Table Autoformat enhancement in 7e8c0bd73ee59ff3041e55268c77203373962e51, which is after the sal_Int64 operators were added, so the file format is now platform dependent Change-Id: I78352b5429b53612c4831cdb81b587b5de5180a9