diff options
author | Christian Lippka <cl@openoffice.org> | 2002-11-25 12:13:11 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2002-11-25 12:13:11 +0000 |
commit | d90a80b77797da78310badbf7cb16ad18a44c56c (patch) | |
tree | 4088be0289719e5990fc58fc29c13217f41a6c86 /xmloff | |
parent | b180348a22b401e41811a7fa7b27ffa551e6dd4f (diff) |
#105457# fixed error in last bugfix that caused autostyles not to be set on masterpage
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 150f2c932112..1e72a2dbe3d9 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ximpshap.cxx,v $ * - * $Revision: 1.77 $ + * $Revision: 1.78 $ * - * last change: $Author: cl $ $Date: 2002-11-08 12:12:18 $ + * last change: $Author: cl $ $Date: 2002-11-25 13:13:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -622,23 +622,14 @@ void SdXMLShapeContext::SetStyle() if( XML_STYLE_FAMILY_SD_PRESENTATION_ID == mnStyleFamily ) { - sal_Int32 nPos = -1; - OUString aFamily; - - do + sal_Int32 nPos = aStyleName.lastIndexOf( sal_Unicode('-') ); + if( -1 != nPos ) { - nPos++; - nPos = aStyleName.lastIndexOf( sal_Unicode('-'), nPos ); - if( -1 != nPos ) - aFamily = aStyleName.copy( 0, nPos ); - - } while( -1 != nPos && !xFamilies->hasByName( aFamily ) ); - - if( -1 == nPos ) - break; + OUString aFamily( aStyleName.copy( 0, nPos ) ); - xFamilies->getByName( aFamily ) >>= xFamily; - aStyleName = aStyleName.copy( nPos + 1 ); + xFamilies->getByName( aFamily ) >>= xFamily; + aStyleName = aStyleName.copy( nPos + 1 ); + } } else { |