From d90a80b77797da78310badbf7cb16ad18a44c56c Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Mon, 25 Nov 2002 12:13:11 +0000 Subject: #105457# fixed error in last bugfix that caused autostyles not to be set on masterpage --- xmloff/source/draw/ximpshap.cxx | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'xmloff') 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 { -- cgit