[Libreoffice-commits] .: tools/source
tools/source/generic/poly.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2dd1722d2729f0d6cda6e31297f3e03ae36c555f Author: Julien Nabet serval2...@yahoo.fr Date: Thu Feb 16 22:36:35 2012 +0100 Fix a bug found with cclang Null pointer passed as an argument to a 'nonnull' diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 3c86a7a..4e71b35 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -88,7 +88,7 @@ ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, sal_Bool bFlags ) if( bFlags ) { mpFlagAry = new sal_uInt8[ nInitSize ]; -memset( mpPointAry, 0, nInitSize ); +memset( mpFlagAry, 0, nInitSize ); } else mpFlagAry = NULL; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: tools/source
tools/source/fsys/dirent.cxx |4 ++-- tools/source/fsys/wntmsc.cxx |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit f433d5a9b8379f5207df92d80ce7dede9d9795d8 Author: Stephan Bergmann sberg...@redhat.com Date: Sat Jan 21 17:57:10 2012 +0100 Fix Windows. diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx index df3f163..a0d3d8e 100644 --- a/tools/source/fsys/dirent.cxx +++ b/tools/source/fsys/dirent.cxx @@ -1529,9 +1529,9 @@ DirEntry DirEntry::GetDevice() const if ( ( pTop-eFlag == FSYS_FLAG_ABSROOT || pTop-eFlag == FSYS_FLAG_RELROOT ) !pTop-aName.isEmpty() ) -return DirEntry( pTop-aName, FSYS_FLAG_VOLUME, FSYS_STYLE_HOST ); +return DirEntry( pTop-aName, FSYS_FLAG_VOLUME ); else -return DirEntry( rtl::OString(), FSYS_FLAG_INVALID, FSYS_STYLE_HOST ); +return DirEntry( rtl::OString(), FSYS_FLAG_INVALID ); } #endif diff --git a/tools/source/fsys/wntmsc.cxx b/tools/source/fsys/wntmsc.cxx index 9878480..361474d 100644 --- a/tools/source/fsys/wntmsc.cxx +++ b/tools/source/fsys/wntmsc.cxx @@ -315,13 +315,13 @@ USHORT DirReader_Impl::Read() DirEntry *pTemp = new DirEntry( rtl::OString(pDosEntry-d_name), eFlag ); #ifdef FEAT_FSYS_DOUBLESPEED -pTemp-ImpSetStat( new FileStat( (void*) pDosDir, (void*) 0 ) ); +pTemp-ImpSetStat( new FileStat( (void*) pDosDir ) ); #endif if ( pParent ) pTemp-ImpChangeParent( new DirEntry( *pParent ), sal_False ); if ( pDir-pStatLst ) //Status fuer Sort gewuenscht? { -FileStat *pNewStat = new FileStat( (void*) pDosDir, (void*) 0 ); +FileStat *pNewStat = new FileStat( (void*) pDosDir ); pDir-ImpSortedInsert( pTemp, pNewStat ); } else ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: tools/source
tools/source/stream/stream.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 75a6a51a9da2aa3b6eb0f0e43c0130844f6ab86c Author: Stephan Bergmann sberg...@redhat.com Date: Thu Jan 19 10:56:28 2012 +0100 Fix int/sal_Int32 mismatch. diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 6064a77..1ebbcb3 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -69,7 +69,7 @@ inline static void SwapLong( long r ) { r = SWAPLONG(r); } inline static void SwapULong( sal_uInt32 r ) { r = SWAPLONG(r); } -inline static void SwapLongInt( int r ) +inline static void SwapLongInt( sal_Int32 r ) { r = SWAPLONG(r); } inline static void SwapLongUInt( unsigned int r ) { r = SWAPLONG(r); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: tools/source
tools/source/stream/strmunx.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit 5785734a1947c6b3fb2081b7e33fe3d0bd125bbb Author: Tor Lillqvist tlillqv...@suse.com Date: Thu Jan 19 15:18:20 2012 +0200 Don't use too modern C++ diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index d2135fa..850eedc 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -710,13 +710,13 @@ void SvFileStream::Open( const String rFilename, StreamMode nOpenMode ) osl::FileStatus aStatus( osl_FileStatus_Mask_Type | osl_FileStatus_Mask_LinkTargetURL ); // FIXME: we really need to switch to a pure URL model ... -if ( osl::File::getFileURLFromSystemPath( aFilename, aFileURL ) != osl::FileBase::RC::E_None ) +if ( osl::File::getFileURLFromSystemPath( aFilename, aFileURL ) != osl::FileBase::E_None ) aFileURL = aFilename; -bool bStatValid = ( osl::DirectoryItem::get( aFileURL, aItem) != osl::FileBase::RC::E_None -aItem.getFileStatus( aStatus ) != osl::FileBase::RC::E_None ); +bool bStatValid = ( osl::DirectoryItem::get( aFileURL, aItem) != osl::FileBase::E_None +aItem.getFileStatus( aStatus ) != osl::FileBase::E_None ); // SvFileStream can't open a directory -if( bStatValid aStatus.getFileType() == osl::FileStatus::Type::Directory ) +if( bStatValid aStatus.getFileType() == osl::FileStatus::Directory ) { SetError( ::GetSvError( EISDIR ) ); return; @@ -742,11 +742,11 @@ void SvFileStream::Open( const String rFilename, StreamMode nOpenMode ) { if ( nOpenMode STREAM_COPY_ON_SYMLINK ) { -if ( bStatValid aStatus.getFileType() == osl::FileStatus::Type::Link +if ( bStatValid aStatus.getFileType() == osl::FileStatus::Link aStatus.getLinkTargetURL().getLength() 0 ) { // delete the symbolic link, and replace it with the contents of the link -if (osl::File::remove( aFileURL ) == osl::FileBase::RC::E_None ) +if (osl::File::remove( aFileURL ) == osl::FileBase::E_None ) { File::copy( aStatus.getLinkTargetURL(), aFileURL ); #if OSL_DEBUG_LEVEL 0 ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: tools/source
tools/source/rc/resmgr.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit de8c830947a756b6d8ab2d7ef33934c9ba28036a Author: Olivier Hallot olivier.hal...@alta.org.br Date: Mon Jan 16 19:10:45 2012 -0200 fix mistake in merging tools/source/rc/resmgr.cxx fix mistake in merging tools/source/rc/resmgr.cxx diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 4652f24..8d83533 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -203,7 +203,7 @@ void ResMgrContainer::init() nIndex = 0; while( nIndex = 0 ) { -OUString aPathElement( aEnvPath.getToken( 0, SEARCH_PATH_DELIMITER, nIndex ) ); +OUString aPathElement( aEnvPath.getToken( 0, SAL_PATHSEPARATOR, nIndex ) ); if( !aPathElement.isEmpty() ) { OUString aFileURL; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: tools/source
tools/source/stream/stream.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8173b0d29717438dcaa47b3cc2f7010c9646fbe0 Author: Kohei Yoshida kohei.yosh...@suse.com Date: Tue Jan 3 13:54:41 2012 -0500 Fix import of multi-line cell contents during csv import. Regression from 3.3.x. Import of tab-delimited csv documents containing multi-line cells were unfortunately broken with my fix for handling malformed csv documents. The intent was to break out of the loop only when a tab character is encountered before the closing quote is encountered, but the old code would break out whenever a tab character is encountered even outside the quotes. This commit fixes it. diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 3cfb900..f00e7ff 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1062,7 +1062,7 @@ sal_Bool SvStream::ReadCsvLine( String rStr, sal_Bool bEmbeddedLineBreak, { if (nQuotes) { -if (bTabSep *p == '\t') +if (bTabSep *p == '\t' (nQuotes % 2) != 0) { // When tab-delimited, tab char ends quoted sequence // even if we haven't reached the end quote. Doing ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: tools/source
tools/source/fsys/dirent.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 5de43a57cde537507de607c31573a31e90b4c5c8 Author: Stephan Bergmann sberg...@redhat.com Date: Tue Nov 22 12:15:39 2011 +0100 Avoid rtl::OString::copy(getLength() + 1). diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx index 315be4e..647dcfc 100644 --- a/tools/source/fsys/dirent.cxx +++ b/tools/source/fsys/dirent.cxx @@ -1805,7 +1805,8 @@ FSysError DirEntry::ImpParseUnixName( const rtl::OString rPfad, FSysPathStyle e } // den Restpfad bestimmen -aPfad = aPfad.copy(nPos + 1); +aPfad = nPos aPfad.getLength() +? aPfad.copy(nPos + 1) : rtl::OString(); while ( aPfad.getLength() ( aPfad[0] == '/' ) ) aPfad = aPfad.copy(1); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: tools/source
tools/source/stream/stream.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 125aa32e71eb9a8de6214a7f7bc3e3be13b14a7a Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Tue Nov 1 00:51:46 2011 +0100 we need to assign this value also for non unix platforms (fdo#40801) diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 34dc93d..2b9295b 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1308,10 +1308,8 @@ SvStream SvStream::operator(double r) #if defined UNX if (bSwap) SwapDouble(n); -r = n; -#else -(void) r; #endif +r = n; } return *this; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: tools/source
tools/source/memtools/multisel.cxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit aaa6e59711d3ba9b143d3719c78a815d96c3b1df Author: Ivan Timofeev timofeev@gmail.com Date: Wed Oct 12 17:06:45 2011 +0400 treat - as entire range diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx index bf504e5..1a21f0a 100644 --- a/tools/source/memtools/multisel.cxx +++ b/tools/source/memtools/multisel.cxx @@ -1024,16 +1024,17 @@ bool StringRangeEnumerator::setRange( const rtl::OUString i_rNewRange, bool i_b aNumberBuf.append( *pInput++ ); if( aNumberBuf.getLength() ) { -if( bSequence aNumbers.empty() ) -aNumbers.push_back( mnMin ); - sal_Int32 nNumber = aNumberBuf.makeStringAndClear().toInt32() + mnOffset; aNumbers.push_back( nNumber ); bSequence = false; } if( *pInput == sal_Unicode('-') ) +{ bSequence = true; +if( aNumbers.empty() ) +aNumbers.push_back( mnMin ); +} else if( *pInput == sal_Unicode(',') || *pInput == sal_Unicode(';') ) { if( bSequence !aNumbers.empty() ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: tools/source
tools/source/rc/resmgr.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 05239e246346598a3cdffc7febcfaad41f1dabd5 Author: Andras Timar ati...@suse.com Date: Thu Sep 29 15:17:42 2011 +0200 OSL_TRACE: Remove trailing newlines diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 4d9d749..1973419 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -183,7 +183,7 @@ ResMgrContainer::~ResMgrContainer() for( boost::unordered_map OUString, ContainerElement, OUStringHash ::iterator it = m_aResFiles.begin(); it != m_aResFiles.end(); ++it ) { -OSL_TRACE( Resource file %s loaded %d times\n, +OSL_TRACE( Resource file %s loaded %d times, OUStringToOString( it-second.aFileURL, osl_getThreadTextEncoding() ).getStr(), it-second.nLoadCount ); delete it-second.pResMgr; @@ -268,7 +268,7 @@ void ResMgrContainer::init() for( boost::unordered_map OUString, ContainerElement, OUStringHash ::const_iterator it = m_aResFiles.begin(); it != m_aResFiles.end(); ++it ) { -OSL_TRACE( ResMgrContainer: %s - %s\n, +OSL_TRACE( ResMgrContainer: %s - %s, OUStringToOString( it-first, osl_getThreadTextEncoding() ).getStr(), OUStringToOString( it-second.aFileURL, osl_getThreadTextEncoding() ).getStr() ); } @@ -1017,7 +1017,7 @@ void ResMgr::decStack() if( (rTop.Flags RC_FALLBACK_DOWN) ) { #if OSL_DEBUG_LEVEL 1 -OSL_TRACE( returning from fallback %s\n, +OSL_TRACE( returning from fallback %s, OUStringToOString(pFallbackResMgr-GetFileName(), osl_getThreadTextEncoding() ).getStr() ); #endif delete pFallbackResMgr; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits