diff options
author | Thorsten Behrens <tbehrens@novell.com> | 2011-08-12 15:53:12 +0200 |
---|---|---|
committer | Thorsten Behrens <tbehrens@novell.com> | 2011-08-12 16:56:31 +0200 |
commit | a81327ff2faaf21c22f1a902bea170942d5207e6 (patch) | |
tree | 907c30a7a582308957d7b2bacbef1877cb03b21a /oox/source/helper | |
parent | f418927e6fc5228d9d08a2d11e0234661038374c (diff) |
Import SmartArt graphics to Impress
Extending the existing functionality to
* properly parse and model the declarative shapes
* provide means for round-tripping, and re-rendering the
shapes from xml snippets
* implements the layouts composite, cycle, linear, and the
special 'text' node
This is based on the initial smartart work from hfiguiere@novell.com
Diffstat (limited to 'oox/source/helper')
-rw-r--r-- | oox/source/helper/storagebase.cxx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/oox/source/helper/storagebase.cxx b/oox/source/helper/storagebase.cxx index 2201320fad1a..7e5b2d0f4966 100644 --- a/oox/source/helper/storagebase.cxx +++ b/oox/source/helper/storagebase.cxx @@ -49,17 +49,25 @@ using ::rtl::OUStringBuffer; namespace { -void lclSplitFirstElement( OUString& orElement, OUString& orRemainder, const OUString& rFullName ) +void lclSplitFirstElement( OUString& orElement, OUString& orRemainder, OUString aFullName ) { - sal_Int32 nSlashPos = rFullName.indexOf( '/' ); - if( (0 <= nSlashPos) && (nSlashPos < rFullName.getLength()) ) + sal_Int32 nSlashPos = aFullName.indexOf( '/' ); + + // strip leading slashes + while( nSlashPos == 0 ) + { + aFullName = aFullName.copy(1); + nSlashPos = aFullName.indexOf( '/' ); + } + + if( (0 <= nSlashPos) && (nSlashPos < aFullName.getLength()) ) { - orElement = rFullName.copy( 0, nSlashPos ); - orRemainder = rFullName.copy( nSlashPos + 1 ); + orElement = aFullName.copy( 0, nSlashPos ); + orRemainder = aFullName.copy( nSlashPos + 1 ); } else { - orElement = rFullName; + orElement = aFullName; } } |