diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-11-02 16:46:14 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-11-02 16:46:14 +0000 |
commit | f03f8d3b857f8543273cb2b6c913409d1c89c472 (patch) | |
tree | 911dbc7a45e923dfe3512675516b675fa494dc20 /cosv | |
parent | INTEGRATION: CWS adc18 (1.1.4); FILE ADDED (diff) | |
download | core-f03f8d3b857f8543273cb2b6c913409d1c89c472.tar.gz core-f03f8d3b857f8543273cb2b6c913409d1c89c472.zip |
INTEGRATION: CWS adc18 (1.2.38); FILE MERGED
2007/09/20 12:16:14 np 1.2.38.1: #i81775#
Diffstat (limited to 'cosv')
-rw-r--r-- | cosv/source/storage/dirchain.cxx | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/cosv/source/storage/dirchain.cxx b/cosv/source/storage/dirchain.cxx index 84447fca5df9..8273019a4c21 100644 --- a/cosv/source/storage/dirchain.cxx +++ b/cosv/source/storage/dirchain.cxx @@ -4,9 +4,9 @@ * * $RCSfile: dirchain.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-08 08:05:30 $ + * last change: $Author: hr $ $Date: 2007-11-02 17:46:14 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -40,11 +40,14 @@ #include <cosv/bstream.hxx> + + namespace csv { namespace ploc { + DirectoryChain::DirectoryChain() { } @@ -65,15 +68,19 @@ DirectoryChain::Set( const char * i_sSubPath, bool i_bPathIsAlwaysDir, const char * i_sDelimiter ) { + csv_assert(i_sDelimiter != 0); + if (i_sSubPath == 0) + return; + const char * pRestPath = i_sSubPath; - if ( pRestPath != 0 ? *pRestPath == *i_sDelimiter : false ) + if (*pRestPath == *i_sDelimiter) ++pRestPath; for ( const char * pDirEnd = strchr(pRestPath,*i_sDelimiter); pDirEnd != 0; pDirEnd = strchr(pRestPath,*i_sDelimiter) ) { - aPath.push_back( String(pRestPath, pDirEnd - pRestPath) ); + aPath.push_back( String(pRestPath, pDirEnd) ); pRestPath = pDirEnd + 1; } if (*pRestPath != 0 AND i_bPathIsAlwaysDir) @@ -151,8 +158,6 @@ DirectoryChain::Get( bostream & o_rPath, + } // namespace ploc } // namespace csv - - - |