openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o..@apache.org
Subject svn commit: r1551937 [11/29] - in /openoffice/branches/ooxml-osba: ./ extras/l10n/source/bg/ extras/l10n/source/de/ extras/l10n/source/nb/ extras/l10n/source/th/ main/ main/accessibility/inc/accessibility/extended/ main/accessibility/inc/accessibility/...
Date Wed, 18 Dec 2013 13:27:25 GMT
Modified: openoffice/branches/ooxml-osba/main/sd/source/filter/ppt/pptin.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ooxml-osba/main/sd/source/filter/ppt/pptin.cxx?rev=1551937&r1=1551936&r2=1551937&view=diff
==============================================================================
--- openoffice/branches/ooxml-osba/main/sd/source/filter/ppt/pptin.cxx (original)
+++ openoffice/branches/ooxml-osba/main/sd/source/filter/ppt/pptin.cxx Wed Dec 18 13:27:09 2013
@@ -87,7 +87,7 @@
 #include <editeng/editstat.hxx>
 #include <unotools/pathoptions.hxx>
 #include <sfx2/docfac.hxx>
-#define MAX_USER_MOVE		2
+#define MAX_USER_MOVE        2
 
 #include "pptinanimations.hxx"
 #include "ppt97animations.hxx"
@@ -116,7 +116,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument
         Section* pSection = (Section*)pSummaryInformation->GetSection( aPropSetGUID );
         if ( pSection )
         {
-		    PropItem aPropItem;
+            PropItem aPropItem;
             if ( pSection->GetProperty( PID_COMMENTS, aPropItem ) )
             {
                 String aComment;
@@ -131,30 +131,30 @@ SdPPTImport::SdPPTImport( SdDrawDocument
     delete pSummaryInformation;
 #endif
 
-	PowerPointImportParam aParam( rDocStream, nImportFlags, pTracer );
+    PowerPointImportParam aParam( rDocStream, nImportFlags, pTracer );
     SvStream* pCurrentUserStream = rStorage.OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "Current User" ) ), STREAM_STD_READ );
-	if( pCurrentUserStream )
-	{
-		*pCurrentUserStream >> aParam.aCurrentUserAtom;
-		delete pCurrentUserStream;
-	}
-
-	if( pDocument )
-	{
-		// iterate over all styles
-		SdStyleSheetPool* pStyleSheetPool = pDocument->GetSdStyleSheetPool();
-
-		sal_uInt32 nStyles = pStyleSheetPool ? pStyleSheetPool->GetStyles().size() : 0;
-		for (sal_uInt32 nStyle = 0; nStyle < nStyles; nStyle++)
-		{
-			SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>( pStyleSheetPool->GetStyles()[nStyle].get() );
-			SfxItemSet& rSet = pSheet->GetItemSet();
-
-			// if autokerning is set in style, override it, ppt has no autokerning
-			if( rSet.GetItemState( EE_CHAR_PAIRKERNING, sal_False ) == SFX_ITEM_SET )
-				rSet.ClearItem( EE_CHAR_PAIRKERNING );
-		}
-	}
+    if( pCurrentUserStream )
+    {
+        *pCurrentUserStream >> aParam.aCurrentUserAtom;
+        delete pCurrentUserStream;
+    }
+
+    if( pDocument )
+    {
+        // iterate over all styles
+        SdStyleSheetPool* pStyleSheetPool = pDocument->GetSdStyleSheetPool();
+
+        sal_uInt32 nStyles = pStyleSheetPool ? pStyleSheetPool->GetStyles().size() : 0;
+        for (sal_uInt32 nStyle = 0; nStyle < nStyles; nStyle++)
+        {
+            SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>( pStyleSheetPool->GetStyles()[nStyle].get() );
+            SfxItemSet& rSet = pSheet->GetItemSet();
+
+            // if autokerning is set in style, override it, ppt has no autokerning
+            if( rSet.GetItemState( EE_CHAR_PAIRKERNING, sal_False ) == SFX_ITEM_SET )
+                rSet.ClearItem( EE_CHAR_PAIRKERNING );
+        }
+    }
 
     pFilter = new ImplSdPPTImport( pDocument, rStorage, rMedium, aParam );
 }
@@ -170,60 +170,60 @@ SdPPTImport::~SdPPTImport()
 }
 
 ImplSdPPTImport::ImplSdPPTImport( SdDrawDocument* pDocument, SvStorage& rStorage_, SfxMedium& rMedium, PowerPointImportParam& rParam )
-:	SdrPowerPointImport     ( rParam, rMedium.GetBaseURL() )
-,	mrMed					( rMedium )
-,	mrStorage				( rStorage_ )
-,	mbDocumentFound			( sal_False )
-,	mnFilterOptions			( 0 )
+:    SdrPowerPointImport     ( rParam, rMedium.GetBaseURL() )
+,    mrMed                    ( rMedium )
+,    mrStorage                ( rStorage_ )
+,    mbDocumentFound            ( sal_False )
+,    mnFilterOptions            ( 0 )
 {
-	mpDoc = pDocument;
-	if ( bOk )
-	{
-		mbDocumentFound = SeekToDocument( &maDocHd ); 							// maDocHd = the latest DocumentHeader
-		while ( SeekToRec( rStCtrl, PPT_PST_Document, nStreamLen, &maDocHd ) )
-			mbDocumentFound = sal_True;
-
-		sal_uInt32 nDggContainerOfs = 0;
-
-		if ( mbDocumentFound )
-		{
-			sal_uLong nPosMerk = rStCtrl.Tell();
+    mpDoc = pDocument;
+    if ( bOk )
+    {
+        mbDocumentFound = SeekToDocument( &maDocHd );                             // maDocHd = the latest DocumentHeader
+        while ( SeekToRec( rStCtrl, PPT_PST_Document, nStreamLen, &maDocHd ) )
+            mbDocumentFound = sal_True;
+
+        sal_uInt32 nDggContainerOfs = 0;
+
+        if ( mbDocumentFound )
+        {
+            sal_uLong nPosMerk = rStCtrl.Tell();
 
             pStData = rStorage_.OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "Pictures" ) ), STREAM_STD_READ );
 
-			rStCtrl.Seek( maDocHd.GetRecBegFilePos() + 8 );
-			sal_uLong nDocLen = maDocHd.GetRecEndFilePos();
-			DffRecordHeader aPPDGHd;
-			if ( SeekToRec( rStCtrl, PPT_PST_PPDrawingGroup, nDocLen, &aPPDGHd ) )
-			{
-				sal_uLong nPPDGLen = aPPDGHd.GetRecEndFilePos();
-				if ( SeekToRec( rStCtrl, DFF_msofbtDggContainer, nPPDGLen, NULL ) )
-					nDggContainerOfs = rStCtrl.Tell();
-			}
-			rStCtrl.Seek( nPosMerk );
-		}
-		sal_uInt32 nSvxMSDffOLEConvFlags2 = 0;
-
-		SvtFilterOptions* pBasOpt = SvtFilterOptions::Get();
-		if ( pBasOpt )
-		{
-			if ( pBasOpt->IsLoadPPointBasicCode() )
-				mnFilterOptions |= 1;
-			if ( pBasOpt->IsMathType2Math() )
-				nSvxMSDffOLEConvFlags2 |= OLE_MATHTYPE_2_STARMATH;
-			if ( pBasOpt->IsWinWord2Writer() )
-				nSvxMSDffOLEConvFlags2 |= OLE_WINWORD_2_STARWRITER;
-			if ( pBasOpt->IsExcel2Calc() )
-				nSvxMSDffOLEConvFlags2 |= OLE_EXCEL_2_STARCALC;
-			if ( pBasOpt->IsPowerPoint2Impress() )
-				nSvxMSDffOLEConvFlags2 |= OLE_POWERPOINT_2_STARIMPRESS;
-		}
-
-		InitSvxMSDffManager( nDggContainerOfs, pStData, nSvxMSDffOLEConvFlags2 );
-		SetSvxMSDffSettings( SVXMSDFF_SETTINGS_CROP_BITMAPS
-			| SVXMSDFF_SETTINGS_IMPORT_PPT );
-		SetModel( mpDoc, 576 );
-	}
+            rStCtrl.Seek( maDocHd.GetRecBegFilePos() + 8 );
+            sal_uLong nDocLen = maDocHd.GetRecEndFilePos();
+            DffRecordHeader aPPDGHd;
+            if ( SeekToRec( rStCtrl, PPT_PST_PPDrawingGroup, nDocLen, &aPPDGHd ) )
+            {
+                sal_uLong nPPDGLen = aPPDGHd.GetRecEndFilePos();
+                if ( SeekToRec( rStCtrl, DFF_msofbtDggContainer, nPPDGLen, NULL ) )
+                    nDggContainerOfs = rStCtrl.Tell();
+            }
+            rStCtrl.Seek( nPosMerk );
+        }
+        sal_uInt32 nSvxMSDffOLEConvFlags2 = 0;
+
+        SvtFilterOptions* pBasOpt = SvtFilterOptions::Get();
+        if ( pBasOpt )
+        {
+            if ( pBasOpt->IsLoadPPointBasicCode() )
+                mnFilterOptions |= 1;
+            if ( pBasOpt->IsMathType2Math() )
+                nSvxMSDffOLEConvFlags2 |= OLE_MATHTYPE_2_STARMATH;
+            if ( pBasOpt->IsWinWord2Writer() )
+                nSvxMSDffOLEConvFlags2 |= OLE_WINWORD_2_STARWRITER;
+            if ( pBasOpt->IsExcel2Calc() )
+                nSvxMSDffOLEConvFlags2 |= OLE_EXCEL_2_STARCALC;
+            if ( pBasOpt->IsPowerPoint2Impress() )
+                nSvxMSDffOLEConvFlags2 |= OLE_POWERPOINT_2_STARIMPRESS;
+        }
+
+        InitSvxMSDffManager( nDggContainerOfs, pStData, nSvxMSDffOLEConvFlags2 );
+        SetSvxMSDffSettings( SVXMSDFF_SETTINGS_CROP_BITMAPS
+            | SVXMSDFF_SETTINGS_IMPORT_PPT );
+        SetModel( mpDoc, 576 );
+    }
 }
 
 //////////////////////////////////////////////////////////////////////////
@@ -234,9 +234,9 @@ ImplSdPPTImport::ImplSdPPTImport( SdDraw
 
 ImplSdPPTImport::~ImplSdPPTImport()
 {
-	for ( void* pPtr = maSlideNameList.First(); pPtr; pPtr = maSlideNameList.Next() )
-		delete (String*)pPtr;
-	delete pStData;
+    for ( void* pPtr = maSlideNameList.First(); pPtr; pPtr = maSlideNameList.Next() )
+        delete (String*)pPtr;
+    delete pStData;
 }
 
 //////////////////////////////////////////////////////////////////////////
@@ -247,201 +247,201 @@ ImplSdPPTImport::~ImplSdPPTImport()
 
 sal_Bool ImplSdPPTImport::Import()
 {
-	if ( !bOk )
-		return sal_False;
+    if ( !bOk )
+        return sal_False;
+
+    pSdrModel->setLock( sal_True );
+    pSdrModel->EnableUndo(false);
+
+    SdrOutliner& rOutl = mpDoc->GetDrawOutliner();
+    sal_uInt32 nControlWord = rOutl.GetEditEngine().GetControlWord();
+    nControlWord |=  EE_CNTRL_ULSPACESUMMATION;
+    nControlWord &=~ EE_CNTRL_ULSPACEFIRSTPARA;
+    ((EditEngine&)rOutl.GetEditEngine()).SetControlWord( nControlWord );
+
+    SdrLayerAdmin& rAdmin = mpDoc->GetLayerAdmin();
+    mnBackgroundLayerID = rAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRND )), sal_False );
+    mnBackgroundObjectsLayerID = rAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRNDOBJ )), sal_False );
+
+    ::sd::DrawDocShell* pDocShell = mpDoc->GetDocSh();
+    if ( pDocShell )
+        SeekOle( pDocShell, mnFilterOptions );
+
+    // hyperlinks
+    PropRead* pDInfoSec2 = new PropRead( mrStorage, String( RTL_CONSTASCII_USTRINGPARAM( "\005DocumentSummaryInformation" ) ) );
+    if ( pDInfoSec2->IsValid() )
+    {
+        PropItem aPropItem;
+
+        sal_uInt32 nType, nPropSize, nPropCount;
+
+        pDInfoSec2->Read();
+
+        sal_uInt8 aPropSetGUID[ 16 ] =
+        {
+            0x02, 0xd5, 0xcd, 0xd5, 0x9c, 0x2e, 0x1b, 0x10, 0x93, 0x97, 0x08, 0x00, 0x2b, 0x2c, 0xf9, 0xae
+        };
+        Section* pSection = (Section*)pDInfoSec2->GetSection( aPropSetGUID );
+        if ( pSection )
+        {
+            if ( pSection->GetProperty( PID_SLIDECOUNT, aPropItem ) )
+            {
+                aPropItem >> nType;
+                if ( ( nType == VT_I4 ) || ( nType == VT_UI4 ) )
+                {
+                    // examine PID_HEADINGPAIR to get the correct entry for PID_DOCPARTS
+                    sal_uInt32 nSlideCount, nVecCount;
+                    aPropItem >> nSlideCount;
+                    if ( nSlideCount && pSection->GetProperty( PID_HEADINGPAIR, aPropItem ) )
+                    {
+                        sal_uInt32    nSlideTitleIndex = 0, nSlideTitleCount = 0;
+                        sal_uInt32    nFontIndex, nFontCount = 0;
+                        sal_uInt32    nDesignTemplateIndex, nDesignTemplateCount = 0;
+                        sal_uInt32    i, nTemp, nEntryCount = 0;
+
+                        String aUString;
+
+                        aPropItem >> nType
+                                  >> nVecCount;
+
+                        if ( ( nType == ( VT_VARIANT | VT_VECTOR ) ) && ( nVecCount ^ 1 ) )
+                        {
+                            nVecCount >>= 1;
+
+                            for ( i = 0; i < nVecCount; i++ )
+                            {
+                                if ( !aPropItem.Read( aUString, VT_EMPTY, sal_False ) )
+                                    break;
+                                aPropItem >> nType;
+                                if ( ( nType != VT_I4 ) && ( nType != VT_UI4 ) )
+                                    break;
+                                aPropItem >> nTemp;
+                                if ( aUString.EqualsAscii("Slide Titles") || aUString.EqualsAscii("Folientitel") )
+                                {
+                                    nSlideTitleCount = nTemp;
+                                    nSlideTitleIndex = nEntryCount;
+                                }
+                                else if ( aUString.EqualsAscii("Fonts Used") )
+                                {
+                                    nFontCount = nTemp;
+                                    nFontIndex = nEntryCount;
+                                }
+                                else if ( aUString.EqualsAscii("Design Template") )
+                                {
+                                    nDesignTemplateCount = nTemp;
+                                    nDesignTemplateIndex = nEntryCount;
+                                }
+                                nEntryCount += nTemp;
+                            }
+                        }
+                        if ( ( nSlideCount == nSlideTitleCount ) && pSection->GetProperty( PID_DOCPARTS, aPropItem ) )
+                        {
+                            aPropItem >> nType
+                                      >> nVecCount;
+
+                            if ( ( nVecCount >= ( nSlideTitleIndex + nSlideTitleCount ) )
+                                    && ( nType == ( VT_LPSTR | VT_VECTOR ) ) )
+                            {
+                                for ( i = 0; i != nSlideTitleIndex; i++ )
+                                {
+                                    aPropItem >> nTemp;
+                                    aPropItem.SeekRel( nTemp );
+                                }
+                                for ( i = 0; i < nSlideTitleCount; i++ )
+                                {
+                                    if ( !aPropItem.Read( aUString, nType, sal_False ) )
+                                        break;
+                                    String* pString = new String( aUString );
+                                    if ( pString->EqualsAscii( "No Slide Title" ))
+                                        *pString = String();
+                                    else
+                                    {
+                                        void* pPtr;
+                                        for ( pPtr = maSlideNameList.First(); pPtr; pPtr = maSlideNameList.Next() )
+                                        {
+                                            if ( *((String*)pPtr ) == *pString )
+                                            {
+                                                *pString = String();
+                                                break;
+                                            }
+                                        }
+                                    }
+                                    maSlideNameList.Insert( pString, LIST_APPEND );
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            sal_uInt8 aUserPropSetGUID[ 16 ] =
+            {
+                0x05, 0xd5, 0xcd, 0xd5, 0x9c, 0x2e, 0x1b, 0x10, 0x93, 0x97, 0x08, 0x00, 0x2b, 0x2c, 0xf9, 0xae
+            };
+            pSection = (Section*)pDInfoSec2->GetSection( aUserPropSetGUID );
+            if ( pSection )
+            {
+                Dictionary aDict;
+                if ( pSection->GetDictionary( aDict ) )
+                {
+                    sal_uInt32 nPropId = aDict.GetProperty( rtl::OUString::createFromAscii("_PID_HLINKS" ));
+                    if ( nPropId )
+                    {
+                        if ( pSection->GetProperty( nPropId, aPropItem ) )
+                        {
+                            aPropItem.Seek( STREAM_SEEK_TO_BEGIN );
+                            aPropItem >> nType;
+                            if ( nType == VT_BLOB )
+                            {
+                                aPropItem >> nPropSize
+                                          >> nPropCount;
+
+                                if ( ! ( nPropCount % 6 ) )
+                                {
+                                    sal_uInt32 i;
 
-	pSdrModel->setLock( sal_True );
-	pSdrModel->EnableUndo(false);
+                                    nPropCount /= 6;    // 6 propertys a hyperlink
 
-	SdrOutliner& rOutl = mpDoc->GetDrawOutliner();
-	sal_uInt32 nControlWord = rOutl.GetEditEngine().GetControlWord();
-	nControlWord |=  EE_CNTRL_ULSPACESUMMATION;
-	nControlWord &=~ EE_CNTRL_ULSPACEFIRSTPARA;
-	((EditEngine&)rOutl.GetEditEngine()).SetControlWord( nControlWord );
-
-	SdrLayerAdmin& rAdmin = mpDoc->GetLayerAdmin();
-	mnBackgroundLayerID = rAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRND )), sal_False );
-	mnBackgroundObjectsLayerID = rAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRNDOBJ )), sal_False );
-
-	::sd::DrawDocShell* pDocShell = mpDoc->GetDocSh();
-	if ( pDocShell )
-		SeekOle( pDocShell, mnFilterOptions );
-
-	// hyperlinks
-	PropRead* pDInfoSec2 = new PropRead( mrStorage, String( RTL_CONSTASCII_USTRINGPARAM( "\005DocumentSummaryInformation" ) ) );
-	if ( pDInfoSec2->IsValid() )
-	{
-		PropItem aPropItem;
-
-		sal_uInt32 nType, nPropSize, nPropCount;
-
-		pDInfoSec2->Read();
-
-		sal_uInt8 aPropSetGUID[ 16 ] =
-		{
-			0x02, 0xd5, 0xcd, 0xd5, 0x9c, 0x2e, 0x1b, 0x10, 0x93, 0x97, 0x08, 0x00, 0x2b, 0x2c, 0xf9, 0xae
-		};
-		Section* pSection = (Section*)pDInfoSec2->GetSection( aPropSetGUID );
-		if ( pSection )
-		{
-			if ( pSection->GetProperty( PID_SLIDECOUNT, aPropItem ) )
-			{
-				aPropItem >> nType;
-				if ( ( nType == VT_I4 ) || ( nType == VT_UI4 ) )
-				{
-					// examine PID_HEADINGPAIR to get the correct entry for PID_DOCPARTS
-					sal_uInt32 nSlideCount, nVecCount;
-					aPropItem >> nSlideCount;
-					if ( nSlideCount && pSection->GetProperty( PID_HEADINGPAIR, aPropItem ) )
-					{
-						sal_uInt32	nSlideTitleIndex = 0, nSlideTitleCount = 0;
-						sal_uInt32	nFontIndex, nFontCount = 0;
-						sal_uInt32	nDesignTemplateIndex, nDesignTemplateCount = 0;
-						sal_uInt32	i, nTemp, nEntryCount = 0;
-
-						String aUString;
-
-						aPropItem >> nType
-								  >> nVecCount;
-
-						if ( ( nType == ( VT_VARIANT | VT_VECTOR ) ) && ( nVecCount ^ 1 ) )
-						{
-							nVecCount >>= 1;
-
-							for ( i = 0; i < nVecCount; i++ )
-							{
-								if ( !aPropItem.Read( aUString, VT_EMPTY, sal_False ) )
-									break;
-								aPropItem >> nType;
-								if ( ( nType != VT_I4 ) && ( nType != VT_UI4 ) )
-									break;
-								aPropItem >> nTemp;
-								if ( aUString.EqualsAscii("Slide Titles") || aUString.EqualsAscii("Folientitel") )
-								{
-									nSlideTitleCount = nTemp;
-									nSlideTitleIndex = nEntryCount;
-								}
-								else if ( aUString.EqualsAscii("Fonts Used") )
-								{
-									nFontCount = nTemp;
-									nFontIndex = nEntryCount;
-								}
-								else if ( aUString.EqualsAscii("Design Template") )
-								{
-									nDesignTemplateCount = nTemp;
-									nDesignTemplateIndex = nEntryCount;
-								}
-								nEntryCount += nTemp;
-							}
-						}
-						if ( ( nSlideCount == nSlideTitleCount ) && pSection->GetProperty( PID_DOCPARTS, aPropItem ) )
-						{
-							aPropItem >> nType
-									  >> nVecCount;
-
-							if ( ( nVecCount >= ( nSlideTitleIndex + nSlideTitleCount ) )
-									&& ( nType == ( VT_LPSTR | VT_VECTOR ) ) )
-							{
-								for ( i = 0; i != nSlideTitleIndex; i++ )
-								{
-									aPropItem >> nTemp;
-									aPropItem.SeekRel( nTemp );
-								}
-								for ( i = 0; i < nSlideTitleCount; i++ )
-								{
-									if ( !aPropItem.Read( aUString, nType, sal_False ) )
-										break;
-									String* pString = new String( aUString );
-									if ( pString->EqualsAscii( "No Slide Title" ))
-										*pString = String();
-									else
-									{
-										void* pPtr;
-										for ( pPtr = maSlideNameList.First(); pPtr; pPtr = maSlideNameList.Next() )
-										{
-											if ( *((String*)pPtr ) == *pString )
-											{
-												*pString = String();
-												break;
-											}
-										}
-									}
-									maSlideNameList.Insert( pString, LIST_APPEND );
-								}
-							}
-						}
-					}
-				}
-			}
-
-			sal_uInt8 aUserPropSetGUID[ 16 ] =
-			{
-				0x05, 0xd5, 0xcd, 0xd5, 0x9c, 0x2e, 0x1b, 0x10, 0x93, 0x97, 0x08, 0x00, 0x2b, 0x2c, 0xf9, 0xae
-			};
-			pSection = (Section*)pDInfoSec2->GetSection( aUserPropSetGUID );
-			if ( pSection )
-			{
-				Dictionary aDict;
-				if ( pSection->GetDictionary( aDict ) )
-				{
-					sal_uInt32 nPropId = aDict.GetProperty( rtl::OUString::createFromAscii("_PID_HLINKS" ));
-					if ( nPropId )
-					{
-						if ( pSection->GetProperty( nPropId, aPropItem ) )
-						{
-							aPropItem.Seek( STREAM_SEEK_TO_BEGIN );
-							aPropItem >> nType;
-							if ( nType == VT_BLOB )
-							{
-								aPropItem >> nPropSize
-										  >> nPropCount;
-
-								if ( ! ( nPropCount % 6 ) )
-								{
-									sal_uInt32 i;
-
-									nPropCount /= 6;	// 6 propertys a hyperlink
-
-									SdHyperlinkEntry* pHyperlink = 0;
-									for ( i = 0; i < nPropCount; i++ )
-									{
-										pHyperlink = new SdHyperlinkEntry;
-										pHyperlink->nIndex = 0;
-										aPropItem >> nType;
-										if ( nType != VT_I4 )
-											break;
-										aPropItem >> pHyperlink->nPrivate1
-												  >> nType;
-										if ( nType != VT_I4 )
-											break;
-										aPropItem >> pHyperlink->nPrivate2
-												  >> nType;
-										if ( nType != VT_I4 )
-											break;
-										aPropItem >> pHyperlink->nPrivate3
-												  >> nType;
-										if ( nType != VT_I4 )
-											break;
-										aPropItem >> pHyperlink->nInfo;
-										if ( !aPropItem.Read( pHyperlink->aTarget, VT_EMPTY ) )
-											break;
-										if ( !aPropItem.Read( pHyperlink->aSubAdress, VT_EMPTY ) )
-											break;
-										pHyperlink->nStartPos = pHyperlink->nEndPos = -1;
-
-						                if ( pHyperlink->aSubAdress.Len() ) // get the converted subadress
-						                {
-							                sal_uInt32 nPageNumber = 0;
-    						                String aString( pHyperlink->aSubAdress );
-							                ByteString aStringAry[ 3 ];
-							                sal_uInt16 nTokenCount = aString.GetTokenCount( ',' );
-							                if ( nTokenCount > 3 )
-								                nTokenCount = 3;
-											sal_uInt16 nToken;
+                                    SdHyperlinkEntry* pHyperlink = 0;
+                                    for ( i = 0; i < nPropCount; i++ )
+                                    {
+                                        pHyperlink = new SdHyperlinkEntry;
+                                        pHyperlink->nIndex = 0;
+                                        aPropItem >> nType;
+                                        if ( nType != VT_I4 )
+                                            break;
+                                        aPropItem >> pHyperlink->nPrivate1
+                                                  >> nType;
+                                        if ( nType != VT_I4 )
+                                            break;
+                                        aPropItem >> pHyperlink->nPrivate2
+                                                  >> nType;
+                                        if ( nType != VT_I4 )
+                                            break;
+                                        aPropItem >> pHyperlink->nPrivate3
+                                                  >> nType;
+                                        if ( nType != VT_I4 )
+                                            break;
+                                        aPropItem >> pHyperlink->nInfo;
+                                        if ( !aPropItem.Read( pHyperlink->aTarget, VT_EMPTY ) )
+                                            break;
+                                        if ( !aPropItem.Read( pHyperlink->aSubAdress, VT_EMPTY ) )
+                                            break;
+                                        pHyperlink->nStartPos = pHyperlink->nEndPos = -1;
+                                        
+                                        if ( pHyperlink->aSubAdress.Len() ) // get the converted subadress
+                                        {
+                                            sal_uInt32 nPageNumber = 0;
+                                            String aString( pHyperlink->aSubAdress );
+                                            ByteString aStringAry[ 3 ];
+                                            sal_uInt16 nTokenCount = aString.GetTokenCount( ',' );
+                                            if ( nTokenCount > 3 )
+                                                nTokenCount = 3;
+                                            sal_uInt16 nToken;
                                             for( nToken = 0; nToken < nTokenCount; nToken++ )
                                                 aStringAry[ nToken ] = ByteString( aString.GetToken( nToken, (sal_Unicode)',' ), RTL_TEXTENCODING_UTF8 );
 
-                                            sal_Bool bSucceeded = sal_False;
+                                            sal_Bool bDocInternalSubAddress = sal_False;
 
                                             // first pass, searching for a SlideId
                                             for( nToken = 0; nToken < nTokenCount; nToken++ )
@@ -451,37 +451,36 @@ sal_Bool ImplSdPPTImport::Import()
                                                     sal_Int32 nNumber = aStringAry[ nToken ].ToInt32();
                                                     if ( nNumber & ~0xff )
                                                     {
-											            PptSlidePersistList* pPageList = GetPageList( PPT_SLIDEPAGE );
-											            if ( pPageList )
-											            {
-												            sal_uInt16 nPage = pPageList->FindPage( nNumber );
-												            if ( nPage != PPTSLIDEPERSIST_ENTRY_NOTFOUND )
+                                                        PptSlidePersistList* pPageList = GetPageList( PPT_SLIDEPAGE );
+                                                        if ( pPageList )
+                                                        {
+                                                            sal_uInt16 nPage = pPageList->FindPage( nNumber );
+                                                            if ( nPage != PPTSLIDEPERSIST_ENTRY_NOTFOUND )
                                                             {
-													            nPageNumber = nPage;
-                                                                bSucceeded = sal_True;
+                                                                nPageNumber = nPage;
+                                                                bDocInternalSubAddress = sal_True;
                                                                 break;
                                                             }
-											            }
+                                                        }
                                                     }
                                                 }
                                             }
-                                            if ( !bSucceeded )
+                                            if ( !bDocInternalSubAddress )
                                             {   // second pass, searching for a SlideName
-							                    for ( nToken = 0; nToken < nTokenCount; nToken++ )
-							                    {
-							                        String aToken( aString.GetToken( nToken, (sal_Unicode)',' ) );
-								                    for ( void* pPtr = maSlideNameList.First(); pPtr; pPtr = maSlideNameList.Next() )
-								                    {
-									                    if ( *(String*)pPtr == aToken )
-									                    {
-										                    nPageNumber = maSlideNameList.GetCurPos();
-                                                            bSucceeded = sal_True;
-										                    break;
-									                    }
-								                    }
-							                    }
+                                                for ( nToken = 0; nToken < nTokenCount; nToken++ )
+                                                {
+                                                    for ( void* pPtr = maSlideNameList.First(); pPtr; pPtr = maSlideNameList.Next() )
+                                                    {
+                                                        if ( ByteString(*(String*)pPtr, RTL_TEXTENCODING_UTF8 ) == aStringAry[ nToken ] )
+                                                        {
+                                                            nPageNumber = maSlideNameList.GetCurPos();
+                                                            bDocInternalSubAddress = sal_True;
+                                                            break;
+                                                        }
+                                                    }
+                                                }
                                             }
-                                            if ( !bSucceeded )
+                                            if ( !bDocInternalSubAddress )
                                             {   // third pass, searching for a slide number
                                                 for ( nToken = 0; nToken < nTokenCount; nToken++ )
                                                 {
@@ -491,1021 +490,1028 @@ sal_Bool ImplSdPPTImport::Import()
                                                         if ( ( nNumber & ~0xff ) == 0 )
                                                         {
                                                             nPageNumber = (sal_uInt32)nNumber - 1;
-                                                            bSucceeded = sal_True;
+                                                            bDocInternalSubAddress = sal_True;
                                                             break;
                                                         }
                                                     }
                                                 }
                                             }
-                                            if ( bSucceeded )
+                                            // if a document internal sub address
+                                            if ( bDocInternalSubAddress )
                                             {
-												if ( nPageNumber < maSlideNameList.Count() )
-													pHyperlink->aConvSubString = *(String*)maSlideNameList.GetObject( nPageNumber );
-												if ( !pHyperlink->aConvSubString.Len() )
-												{
-	                                        		pHyperlink->aConvSubString = String( SdResId( STR_PAGE ) );
-			                                        pHyperlink->aConvSubString.Append( sal_Unicode( ' ' ) );
+                                                if ( nPageNumber < maSlideNameList.Count() )
+                                                    pHyperlink->aConvSubString = *(String*)maSlideNameList.GetObject( nPageNumber );
+                                                if ( !pHyperlink->aConvSubString.Len() )
+                                                {
+                                                    pHyperlink->aConvSubString = String( SdResId( STR_PAGE ) );
+                                                    pHyperlink->aConvSubString.Append( sal_Unicode( ' ' ) );
                                                     pHyperlink->aConvSubString.Append( mpDoc->CreatePageNumValue( (sal_uInt16)nPageNumber + 1 ) );
-							                    }
+                                                }
+                                            } else {
+                                                // if sub address is given but not internal, use it as it is
+                                                if ( !pHyperlink->aConvSubString.Len() )
+                                                {
+                                                    pHyperlink->aConvSubString = aString;
+                                                }
                                             }
                                         }
-										aHyperList.Insert( pHyperlink, LIST_APPEND );
-									}
-									if ( i != nPropCount )
-										delete pHyperlink;
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-	delete pDInfoSec2;
-
-	if ( mbDocumentFound )
-	{
-		rStCtrl.Seek( maDocHd.GetRecBegFilePos() + 8 );
-		// HyperList lesen / Indexe der einzelnen Eintraege setzen
-		DffRecordHeader aHyperHd;
-		if ( SeekToRec( rStCtrl, PPT_PST_ExObjList, maDocHd.GetRecEndFilePos(), &aHyperHd ) )
-		{
-			sal_uInt32 nExObjHyperListLen = aHyperHd.GetRecEndFilePos();
-			for ( void* pPtr = aHyperList.First(); pPtr; pPtr = aHyperList.Next() )
-			{
-				DffRecordHeader aHyperE;
-				if ( !SeekToRec( rStCtrl, PPT_PST_ExHyperlink, nExObjHyperListLen, &aHyperE ) )
-					break;
-				if ( !SeekToRec( rStCtrl, PPT_PST_ExHyperlinkAtom, nExObjHyperListLen, NULL, 0 ) )
-					break;
-				rStCtrl.SeekRel( 8 );
-				rStCtrl >> ((SdHyperlinkEntry*)pPtr)->nIndex;
-				aHyperE.SeekToEndOfRecord( rStCtrl );
-			}
-		}
-	}
+                                        aHyperList.Insert( pHyperlink, LIST_APPEND );
+                                    }
+                                    if ( i != nPropCount )
+                                        delete pHyperlink;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    delete pDInfoSec2;
+
+    if ( mbDocumentFound )
+    {
+        rStCtrl.Seek( maDocHd.GetRecBegFilePos() + 8 );
+        // HyperList lesen / Indexe der einzelnen Eintraege setzen
+        DffRecordHeader aHyperHd;
+        if ( SeekToRec( rStCtrl, PPT_PST_ExObjList, maDocHd.GetRecEndFilePos(), &aHyperHd ) )
+        {
+            sal_uInt32 nExObjHyperListLen = aHyperHd.GetRecEndFilePos();
+            for ( void* pPtr = aHyperList.First(); pPtr; pPtr = aHyperList.Next() )
+            {
+                DffRecordHeader aHyperE;
+                if ( !SeekToRec( rStCtrl, PPT_PST_ExHyperlink, nExObjHyperListLen, &aHyperE ) )
+                    break;
+                if ( !SeekToRec( rStCtrl, PPT_PST_ExHyperlinkAtom, nExObjHyperListLen, NULL, 0 ) )
+                    break;
+                rStCtrl.SeekRel( 8 );
+                rStCtrl >> ((SdHyperlinkEntry*)pPtr)->nIndex;
+                aHyperE.SeekToEndOfRecord( rStCtrl );
+            }
+        }
+    }
 
     Size aVisAreaSize;
-	switch ( aUserEditAtom.eLastViewType )
-	{
-		case 5 :	// notes master
-		case 3 :	// notes
+    switch ( aUserEditAtom.eLastViewType )
+    {
+        case 5 :    // notes master
+        case 3 :    // notes
             aVisAreaSize = aDocAtom.GetNotesPageSize();
         break;
         default :
             aVisAreaSize = aDocAtom.GetSlidesPageSize();
-	}
+    }
     Scale( aVisAreaSize );
     pDocShell->SetVisArea( Rectangle( Point(), aVisAreaSize ) );
 
-	///////////////////////////////////////////////////////////
-	// create master pages:
-	///////////////////////////////////////////////////////////
-	SfxProgress* pStbMgr = new SfxProgress( pDocShell, String( SdResId( STR_POWERPOINT_IMPORT ) ),
-			pMasterPages->Count() + pSlidePages->Count() + pNotePages->Count() );
-
-	sal_uInt32 nImportedPages = 0;
-	{
-		sal_uInt16			nMasterAnz = GetPageCount( PPT_MASTERPAGE );
-
-		for ( sal_uInt16 nMasterNum = 0; nMasterNum < nMasterAnz; nMasterNum++ )
-		{
-			SetPageNum( nMasterNum, PPT_MASTERPAGE );
-			SdPage* pPage = (SdPage*)MakeBlancPage( sal_True );
-			if ( pPage )
-			{
-				sal_Bool bNotesMaster = (*GetPageList( eAktPageKind ) )[ nAktPageNum ]->bNotesMaster;
-				sal_Bool bStarDrawFiller = (*GetPageList( eAktPageKind ) )[ nAktPageNum ]->bStarDrawFiller;
-
-				PageKind ePgKind = ( bNotesMaster ) ? PK_NOTES : PK_STANDARD;
-				sal_Bool bHandout = (*GetPageList( eAktPageKind ) )[ nAktPageNum ]->bHandoutMaster;
-				if ( bHandout )
-					ePgKind = PK_HANDOUT;
-
-				pPage->SetPageKind( ePgKind );
-				pSdrModel->InsertMasterPage( (SdrPage*)pPage );
-				if ( bNotesMaster && bStarDrawFiller )
-					((SdPage*)pPage)->SetAutoLayout( AUTOLAYOUT_NOTES, sal_True );
-				if ( nMasterNum )
-				{
-					boost::optional< sal_Int16 > oStartNumbering;
-					SfxStyleSheet* pSheet;
-					if ( nMasterNum == 1 )
-					{
-						///////////////////
-						// standardsheet //
-						///////////////////
-						pSheet = (SfxStyleSheet*)mpDoc->GetStyleSheetPool()->Find( String(SdResId( STR_STANDARD_STYLESHEET_NAME )), SD_STYLE_FAMILY_GRAPHICS );
-						if ( pSheet )
-						{
-							SfxItemSet& rItemSet = pSheet->GetItemSet();
-							PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_TYPE_TEXT_IN_SHAPE, 0 );
-							PPTPortionObj aPortion( *pPPTStyleSheet, TSS_TYPE_TEXT_IN_SHAPE, 0 );
-							aParagraph.AppendPortion( aPortion );
-							aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
-							aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
-						}
-					}
-
-					// PSEUDO
-					pSheet = (SfxStyleSheet*)mpDoc->GetStyleSheetPool()->Find( String(SdResId( STR_PSEUDOSHEET_BACKGROUNDOBJECTS )), SD_STYLE_FAMILY_PSEUDO );
-					if ( pSheet )
-					{
-						SfxItemSet& rItemSet = pSheet->GetItemSet();
-						PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_TYPE_TEXT_IN_SHAPE, 0 );
-						PPTPortionObj aPortion( *pPPTStyleSheet, TSS_TYPE_TEXT_IN_SHAPE, 0 );
-						aParagraph.AppendPortion( aPortion );
-						aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
-						aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
-					}
-
-					///////////////////////////////////////////////////////////
-					// create layoutstylesheets, set layoutname and stylesheet
-					// (nur auf Standard- und Notizseiten)
-					///////////////////////////////////////////////////////////
-					String aLayoutName( SdResId( STR_LAYOUT_DEFAULT_NAME ) );
-					if ( nMasterNum > 2 )
-					{
-						if ( ePgKind == PK_STANDARD )
-						{   // Standardseite: Neues Praesentationslayout erzeugen
-							aLayoutName = String( SdResId( STR_LAYOUT_DEFAULT_TITLE_NAME ) );
-							aLayoutName += String::CreateFromInt32( (sal_Int32)( ( nMasterNum + 1 ) / 2 - 1 ) );
-							( (SdStyleSheetPool*)mpDoc->GetStyleSheetPool() )->CreateLayoutStyleSheets( aLayoutName );
-						}
-						else	// Notizseite: Praesentationslayout von der Standardseite verwenden
-							aLayoutName = ( (SdPage*)mpDoc->GetMasterPage( nMasterNum - 1 ) )->GetName();
-					}
-					pPage->SetName( aLayoutName );
-					aLayoutName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ));
-					aLayoutName += String( SdResId( STR_LAYOUT_OUTLINE ) );
-					pPage->SetLayoutName( aLayoutName );
-
-					/////////////////////
-					// set stylesheets //
-					/////////////////////
-					if ( pPage->GetPageKind() == PK_STANDARD )
-					{
-						sal_uInt32 nTitleInstance = TSS_TYPE_PAGETITLE;
-						sal_uInt32 nOutlinerInstance = TSS_TYPE_BODY;
+    ///////////////////////////////////////////////////////////
+    // create master pages:
+    ///////////////////////////////////////////////////////////
+    SfxProgress* pStbMgr = new SfxProgress( pDocShell, String( SdResId( STR_POWERPOINT_IMPORT ) ),
+            pMasterPages->Count() + pSlidePages->Count() + pNotePages->Count() );
+
+    sal_uInt32 nImportedPages = 0;
+    {
+        sal_uInt16            nMasterAnz = GetPageCount( PPT_MASTERPAGE );
+
+        for ( sal_uInt16 nMasterNum = 0; nMasterNum < nMasterAnz; nMasterNum++ )
+        {
+            SetPageNum( nMasterNum, PPT_MASTERPAGE );
+            SdPage* pPage = (SdPage*)MakeBlancPage( sal_True );
+            if ( pPage )
+            {
+                sal_Bool bNotesMaster = (*GetPageList( eAktPageKind ) )[ nAktPageNum ]->bNotesMaster;
+                sal_Bool bStarDrawFiller = (*GetPageList( eAktPageKind ) )[ nAktPageNum ]->bStarDrawFiller;
+
+                PageKind ePgKind = ( bNotesMaster ) ? PK_NOTES : PK_STANDARD;
+                sal_Bool bHandout = (*GetPageList( eAktPageKind ) )[ nAktPageNum ]->bHandoutMaster;
+                if ( bHandout )
+                    ePgKind = PK_HANDOUT;
+
+                pPage->SetPageKind( ePgKind );
+                pSdrModel->InsertMasterPage( (SdrPage*)pPage );
+                if ( bNotesMaster && bStarDrawFiller )
+                    ((SdPage*)pPage)->SetAutoLayout( AUTOLAYOUT_NOTES, sal_True );
+                if ( nMasterNum )
+                {
+                    boost::optional< sal_Int16 > oStartNumbering;
+                    SfxStyleSheet* pSheet;
+                    if ( nMasterNum == 1 )
+                    {
+                        ///////////////////
+                        // standardsheet //
+                        ///////////////////
+                        pSheet = (SfxStyleSheet*)mpDoc->GetStyleSheetPool()->Find( String(SdResId( STR_STANDARD_STYLESHEET_NAME )), SD_STYLE_FAMILY_GRAPHICS );
+                        if ( pSheet )
+                        {
+                            SfxItemSet& rItemSet = pSheet->GetItemSet();
+                            PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_TYPE_TEXT_IN_SHAPE, 0 );
+                            PPTPortionObj aPortion( *pPPTStyleSheet, TSS_TYPE_TEXT_IN_SHAPE, 0 );
+                            aParagraph.AppendPortion( aPortion );
+                            aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
+                            aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
+                        }
+                    }
+
+                    // PSEUDO
+                    pSheet = (SfxStyleSheet*)mpDoc->GetStyleSheetPool()->Find( String(SdResId( STR_PSEUDOSHEET_BACKGROUNDOBJECTS )), SD_STYLE_FAMILY_PSEUDO );
+                    if ( pSheet )
+                    {
+                        SfxItemSet& rItemSet = pSheet->GetItemSet();
+                        PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_TYPE_TEXT_IN_SHAPE, 0 );
+                        PPTPortionObj aPortion( *pPPTStyleSheet, TSS_TYPE_TEXT_IN_SHAPE, 0 );
+                        aParagraph.AppendPortion( aPortion );
+                        aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
+                        aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
+                    }
+
+                    ///////////////////////////////////////////////////////////
+                    // create layoutstylesheets, set layoutname and stylesheet
+                    // (nur auf Standard- und Notizseiten)
+                    ///////////////////////////////////////////////////////////
+                    String aLayoutName( SdResId( STR_LAYOUT_DEFAULT_NAME ) );
+                    if ( nMasterNum > 2 )
+                    {
+                        if ( ePgKind == PK_STANDARD )
+                        {   // Standardseite: Neues Praesentationslayout erzeugen
+                            aLayoutName = String( SdResId( STR_LAYOUT_DEFAULT_TITLE_NAME ) );
+                            aLayoutName += String::CreateFromInt32( (sal_Int32)( ( nMasterNum + 1 ) / 2 - 1 ) );
+                            ( (SdStyleSheetPool*)mpDoc->GetStyleSheetPool() )->CreateLayoutStyleSheets( aLayoutName );
+                        }
+                        else    // Notizseite: Praesentationslayout von der Standardseite verwenden
+                            aLayoutName = ( (SdPage*)mpDoc->GetMasterPage( nMasterNum - 1 ) )->GetName();
+                    }
+                    pPage->SetName( aLayoutName );
+                    aLayoutName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ));
+                    aLayoutName += String( SdResId( STR_LAYOUT_OUTLINE ) );
+                    pPage->SetLayoutName( aLayoutName );
+
+                    /////////////////////
+                    // set stylesheets //
+                    /////////////////////
+                    if ( pPage->GetPageKind() == PK_STANDARD )
+                    {
+                        sal_uInt32 nTitleInstance = TSS_TYPE_PAGETITLE;
+                        sal_uInt32 nOutlinerInstance = TSS_TYPE_BODY;
                         const PptSlideLayoutAtom* pSlideLayout = GetSlideLayoutAtom();
-						sal_Bool bSwapStyleSheet = pSlideLayout->eLayout == PPT_LAYOUT_TITLEMASTERSLIDE;
-						if ( bSwapStyleSheet )
-						{
-							nTitleInstance = TSS_TYPE_TITLE;
-							nOutlinerInstance = TSS_TYPE_SUBTITLE;
-						}
-						/////////////////////
-						// titelstylesheet //
-						/////////////////////
-						pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE );
-						if ( pSheet )
-						{
-							SfxItemSet& rItemSet = pSheet->GetItemSet();
-							PPTParagraphObj aParagraph( *pPPTStyleSheet, nTitleInstance, 0 );
-							PPTPortionObj aPortion( *pPPTStyleSheet, nTitleInstance, 0 );
-							aParagraph.AppendPortion( aPortion );
-							aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
-							aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
-						}
-						////////////////////////
-						// outlinerstylesheet //
-						////////////////////////
-						sal_uInt16 nLevel;
-						PPTParagraphObj* pParagraphs[ 9 ];
-						PPTParagraphObj* pPreviousPara = NULL;
-
-						for ( nLevel = 0; nLevel < 9; nLevel++ )
-						{
-							String aName( pPage->GetLayoutName() );
-							aName.Append( (sal_Unicode)( ' ' ) );
-							aName.Append( String::CreateFromInt32( nLevel + 1 ) );
-							SfxStyleSheet* pOutlineSheet = (SfxStyleSheet*)mpDoc->GetStyleSheetPool()->Find( aName, SD_STYLE_FAMILY_MASTERPAGE );
-							DBG_ASSERT( pOutlineSheet, "Vorlage fuer Gliederungsobjekt nicht gefunden" );
-							if ( pOutlineSheet )
-							{
-								pParagraphs[ nLevel ] = new PPTParagraphObj( *pPPTStyleSheet, nOutlinerInstance, nLevel );
-								SfxItemSet& rItemSet = pOutlineSheet->GetItemSet();
-								PPTPortionObj aPortion( *pPPTStyleSheet, nOutlinerInstance, nLevel );
-								pParagraphs[ nLevel ]->AppendPortion( aPortion );
-								pParagraphs[ nLevel ]->ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, pPreviousPara );
-								aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
-								pPreviousPara = pParagraphs[ nLevel ];
-							}
-							else
-								pParagraphs[ nLevel ] = NULL;
-						}
-						for ( nLevel = 0; nLevel < 9; delete pParagraphs[ nLevel++ ] ) ;
-						/////////////////////////
-						// subtitle stylesheet //
-						/////////////////////////
-						pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TEXT );
-						if ( pSheet )
-						{
-							SfxItemSet& rItemSet = pSheet->GetItemSet();
-							PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_TYPE_SUBTITLE, 0 );
-							PPTPortionObj aPortion( *pPPTStyleSheet, TSS_TYPE_SUBTITLE, 0 );
-							aParagraph.AppendPortion( aPortion );
-							aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
-							aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
-						}
-					}
-					else if ( ePgKind == PK_NOTES )
-					{
-						pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_NOTES );
-						if ( pSheet )
-						{
-							SfxItemSet& rItemSet = pSheet->GetItemSet();
-							PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_TYPE_NOTES, 0 );
-							PPTPortionObj aPortion( *pPPTStyleSheet, TSS_TYPE_NOTES, 0 );
-							aParagraph.AppendPortion( aPortion );
-							aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
-							aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
-						}
-					}
-				}
-			}
-		}
-	}
-	SdPage* pMPage;
-	sal_uInt16 i;
-	for ( i = 0; i < mpDoc->GetMasterPageCount() && ( (pMPage = (SdPage*)mpDoc->GetMasterPage( i )) != 0 ); i++ )
-	{
-		SetPageNum( i, PPT_MASTERPAGE );
-		/////////////////////////////////////////////
-		// importing master page objects		   //
-		/////////////////////////////////////////////
-		PptSlidePersistList* pList = GetPageList( eAktPageKind );
-		PptSlidePersistEntry* pPersist = ( pList && ( nAktPageNum < pList->Count() ) )
-													? (*pList)[ nAktPageNum ] : NULL;
-		if ( pPersist )
-		{
-			if ( pPersist->bStarDrawFiller && pPersist->bNotesMaster && ( nAktPageNum > 2 ) && ( ( nAktPageNum & 1 ) == 0 ) )
-			{
-				pSdrModel->DeleteMasterPage( nAktPageNum );
-				SdrPage* pNotesClone = ((SdPage*)pSdrModel->GetMasterPage( 2 ))->Clone();
-				pSdrModel->InsertMasterPage( pNotesClone, nAktPageNum );
-				if ( pNotesClone )
-				{
-					String aLayoutName( ((SdPage*)pSdrModel->GetMasterPage( nAktPageNum - 1 ))->GetLayoutName() );
-					((SdPage*)pNotesClone)->SetPresentationLayout( aLayoutName, sal_False, sal_False, sal_False );
-					((SdPage*)pNotesClone)->SetLayoutName( aLayoutName );
-				}
-			}
-			else if ( ( pPersist->bStarDrawFiller == sal_False ) )
-			{
-				PptSlidePersistEntry* pE = pPersist;
-				while( ( pE->aSlideAtom.nFlags & 4 ) && pE->aSlideAtom.nMasterId )
-				{
-					sal_uInt16 nNextMaster = pMasterPages->FindPage( pE->aSlideAtom.nMasterId );
-					if ( nNextMaster == PPTSLIDEPERSIST_ENTRY_NOTFOUND )
-						break;
-					else
-    					pE = (*pList)[ nNextMaster ];
-				}
-				SdrObject* pObj = ImportPageBackgroundObject( *pMPage, pE->nBackgroundOffset, sal_True );	// import background
-				if ( pObj )
-					pMPage->NbcInsertObject( pObj );
-
-				sal_Bool bNewAnimationsUsed = sal_False;
-				ProcessData aProcessData( *(*pList)[ nAktPageNum ], (SdPage*)pMPage );
-				sal_uInt32 nFPosMerk = rStCtrl.Tell();
-				DffRecordHeader aPageHd;
-				if ( SeekToAktPage( &aPageHd ) )
-				{
-					if ( mbTracing )
-						mpTracer->AddAttribute( rtl::OUString::createFromAscii( "MasterPage" ), rtl::OUString::valueOf( (sal_Int32) (nAktPageNum + 1) ) );
-
-					while( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aPageHd.GetRecEndFilePos() ) )
-					{
-						DffRecordHeader aHd;
- 						rStCtrl >> aHd;
-						switch( aHd.nRecType )
-						{
-							case PPT_PST_PPDrawing :
-							{
-								aHd.SeekToBegOfRecord( rStCtrl );
-								DffRecordHeader aPPDrawHd;
-								if ( SeekToRec( rStCtrl, PPT_PST_PPDrawing, aHd.GetRecEndFilePos(), &aPPDrawHd ) )
-								{
-									sal_uInt32 nPPDrawEnd = aPPDrawHd.GetRecEndFilePos();
-									DffRecordHeader aEscherF002Hd;
-									if ( SeekToRec( rStCtrl, DFF_msofbtDgContainer, nPPDrawEnd, &aEscherF002Hd ) )
-									{
-										sal_uInt32 nEscherF002End = aEscherF002Hd.GetRecEndFilePos();
-										DffRecordHeader aEscherObjListHd;
-										if ( SeekToRec( rStCtrl, DFF_msofbtSpgrContainer, nEscherF002End, &aEscherObjListHd ) )
-										{
-											sal_uInt32 nObjCount = 0;
-											while( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aEscherObjListHd.GetRecEndFilePos() ) )
-											{
-												DffRecordHeader aHd2;
-												rStCtrl >> aHd2;
-												if ( ( aHd2.nRecType == DFF_msofbtSpContainer ) || ( aHd2.nRecType == DFF_msofbtSpgrContainer ) )
-												{
-													if ( nObjCount++ )		// skipping the first object
-													{
-														Rectangle aEmpty;
-														aHd2.SeekToBegOfRecord( rStCtrl );
-														SdrObject* pImpObj = ImportObj( rStCtrl, (void*)&aProcessData, aEmpty, aEmpty );
-														if ( pImpObj )
-														{
-															pImpObj->SetLayer( mnBackgroundObjectsLayerID );
-															pMPage->NbcInsertObject( pImpObj );
-														}
-													}
-												}
-												aHd2.SeekToEndOfRecord( rStCtrl );
-											}
-										}
-									}
-								}
-							}
-							break;
-
-							case PPT_PST_ProgTags :
-							{
-								DffRecordHeader aProgTagHd;
-								if ( SeekToContentOfProgTag( 10, rStCtrl, aPageHd, aProgTagHd ) )
-								{
-									while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aProgTagHd.GetRecEndFilePos() ) )
-									{
-										DffRecordHeader aProgTagContentHd;
-										rStCtrl >> aProgTagContentHd;
-										switch( aProgTagContentHd.nRecType )
-										{
-											case DFF_msofbtAnimGroup :
-											{
-												::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > xPage( pMPage->getUnoPage(), ::com::sun::star::uno::UNO_QUERY );
-												ppt::AnimationImporter aImporter( this, rStCtrl );
-												aImporter.import( xPage, aProgTagContentHd );
-												bNewAnimationsUsed = sal_True;
-											}
-											break;
-										}
-										aProgTagContentHd.SeekToEndOfRecord( rStCtrl );
-									}
-								}
-							}
-							break;
-						}
-						aHd.SeekToEndOfRecord( rStCtrl );
-					}
-					if ( mbTracing )
-						mpTracer->RemoveAttribute( rtl::OUString::createFromAscii( "MasterPage" ) );
-				}
-				rStCtrl.Seek( nFPosMerk );
-				ImportPageEffect( (SdPage*)pMPage, bNewAnimationsUsed );
-
-				///////////////////////
-				// background object //
-				///////////////////////
-				pObj = pMPage->GetObj( 0 );
-				if ( pObj && pObj->GetObjIdentifier() == OBJ_RECT )
-				{
-					if ( pMPage->GetPageKind() == PK_STANDARD )
-					{
+                        sal_Bool bSwapStyleSheet = pSlideLayout->eLayout == PPT_LAYOUT_TITLEMASTERSLIDE;
+                        if ( bSwapStyleSheet )
+                        {
+                            nTitleInstance = TSS_TYPE_TITLE;
+                            nOutlinerInstance = TSS_TYPE_SUBTITLE;
+                        }
+                        /////////////////////
+                        // titelstylesheet //
+                        /////////////////////
+                        pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE );
+                        if ( pSheet )
+                        {
+                            SfxItemSet& rItemSet = pSheet->GetItemSet();
+                            PPTParagraphObj aParagraph( *pPPTStyleSheet, nTitleInstance, 0 );
+                            PPTPortionObj aPortion( *pPPTStyleSheet, nTitleInstance, 0 );
+                            aParagraph.AppendPortion( aPortion );
+                            aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
+                            aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
+                        }
+                        ////////////////////////
+                        // outlinerstylesheet //
+                        ////////////////////////
+                        sal_uInt16 nLevel;
+                        PPTParagraphObj* pParagraphs[ 9 ];
+                        PPTParagraphObj* pPreviousPara = NULL;
+
+                        for ( nLevel = 0; nLevel < 9; nLevel++ )
+                        {
+                            String aName( pPage->GetLayoutName() );
+                            aName.Append( (sal_Unicode)( ' ' ) );
+                            aName.Append( String::CreateFromInt32( nLevel + 1 ) );
+                            SfxStyleSheet* pOutlineSheet = (SfxStyleSheet*)mpDoc->GetStyleSheetPool()->Find( aName, SD_STYLE_FAMILY_MASTERPAGE );
+                            DBG_ASSERT( pOutlineSheet, "Vorlage fuer Gliederungsobjekt nicht gefunden" );
+                            if ( pOutlineSheet )
+                            {
+                                pParagraphs[ nLevel ] = new PPTParagraphObj( *pPPTStyleSheet, nOutlinerInstance, nLevel );
+                                SfxItemSet& rItemSet = pOutlineSheet->GetItemSet();
+                                PPTPortionObj aPortion( *pPPTStyleSheet, nOutlinerInstance, nLevel );
+                                pParagraphs[ nLevel ]->AppendPortion( aPortion );
+                                pParagraphs[ nLevel ]->ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, pPreviousPara );
+                                aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
+                                pPreviousPara = pParagraphs[ nLevel ];
+                            }
+                            else
+                                pParagraphs[ nLevel ] = NULL;
+                        }
+                        for ( nLevel = 0; nLevel < 9; delete pParagraphs[ nLevel++ ] ) ;
+                        /////////////////////////
+                        // subtitle stylesheet //
+                        /////////////////////////
+                        pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TEXT );
+                        if ( pSheet )
+                        {
+                            SfxItemSet& rItemSet = pSheet->GetItemSet();
+                            PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_TYPE_SUBTITLE, 0 );
+                            PPTPortionObj aPortion( *pPPTStyleSheet, TSS_TYPE_SUBTITLE, 0 );
+                            aParagraph.AppendPortion( aPortion );
+                            aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
+                            aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
+                        }
+                    }
+                    else if ( ePgKind == PK_NOTES )
+                    {
+                        pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_NOTES );
+                        if ( pSheet )
+                        {
+                            SfxItemSet& rItemSet = pSheet->GetItemSet();
+                            PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_TYPE_NOTES, 0 );
+                            PPTPortionObj aPortion( *pPPTStyleSheet, TSS_TYPE_NOTES, 0 );
+                            aParagraph.AppendPortion( aPortion );
+                            aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
+                            aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
+                        }
+                    }
+                }
+            }
+        }
+    }
+    SdPage* pMPage;
+    sal_uInt16 i;
+    for ( i = 0; i < mpDoc->GetMasterPageCount() && ( (pMPage = (SdPage*)mpDoc->GetMasterPage( i )) != 0 ); i++ )
+    {
+        SetPageNum( i, PPT_MASTERPAGE );
+        /////////////////////////////////////////////
+        // importing master page objects           //
+        /////////////////////////////////////////////
+        PptSlidePersistList* pList = GetPageList( eAktPageKind );
+        PptSlidePersistEntry* pPersist = ( pList && ( nAktPageNum < pList->Count() ) )
+                                                    ? (*pList)[ nAktPageNum ] : NULL;
+        if ( pPersist )
+        {
+            if ( pPersist->bStarDrawFiller && pPersist->bNotesMaster && ( nAktPageNum > 2 ) && ( ( nAktPageNum & 1 ) == 0 ) )
+            {
+                pSdrModel->DeleteMasterPage( nAktPageNum );
+                SdrPage* pNotesClone = ((SdPage*)pSdrModel->GetMasterPage( 2 ))->Clone();
+                pSdrModel->InsertMasterPage( pNotesClone, nAktPageNum );
+                if ( pNotesClone )
+                {
+                    String aLayoutName( ((SdPage*)pSdrModel->GetMasterPage( nAktPageNum - 1 ))->GetLayoutName() );
+                    ((SdPage*)pNotesClone)->SetPresentationLayout( aLayoutName, sal_False, sal_False, sal_False );
+                    ((SdPage*)pNotesClone)->SetLayoutName( aLayoutName );
+                }
+            }
+            else if ( pPersist->bStarDrawFiller == sal_False )
+            {
+                PptSlidePersistEntry* pE = pPersist;
+                while( ( pE->aSlideAtom.nFlags & 4 ) && pE->aSlideAtom.nMasterId )
+                {
+                    sal_uInt16 nNextMaster = pMasterPages->FindPage( pE->aSlideAtom.nMasterId );
+                    if ( nNextMaster == PPTSLIDEPERSIST_ENTRY_NOTFOUND )
+                        break;
+                    else
+                        pE = (*pList)[ nNextMaster ];
+                }
+                SdrObject* pObj = ImportPageBackgroundObject( *pMPage, pE->nBackgroundOffset, sal_True );    // import background
+                if ( pObj )
+                    pMPage->NbcInsertObject( pObj );
+
+                sal_Bool bNewAnimationsUsed = sal_False;
+                ProcessData aProcessData( *(*pList)[ nAktPageNum ], (SdPage*)pMPage );
+                sal_uInt32 nFPosMerk = rStCtrl.Tell();
+                DffRecordHeader aPageHd;
+                if ( SeekToAktPage( &aPageHd ) )
+                {
+                    if ( mbTracing )
+                        mpTracer->AddAttribute( rtl::OUString::createFromAscii( "MasterPage" ), rtl::OUString::valueOf( (sal_Int32) (nAktPageNum + 1) ) );
+
+                    while( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aPageHd.GetRecEndFilePos() ) )
+                    {
+                        DffRecordHeader aHd;
+                         rStCtrl >> aHd;
+                        switch( aHd.nRecType )
+                        {
+                            case PPT_PST_PPDrawing :
+                            {
+                                aHd.SeekToBegOfRecord( rStCtrl );
+                                DffRecordHeader aPPDrawHd;
+                                if ( SeekToRec( rStCtrl, PPT_PST_PPDrawing, aHd.GetRecEndFilePos(), &aPPDrawHd ) )
+                                {
+                                    sal_uInt32 nPPDrawEnd = aPPDrawHd.GetRecEndFilePos();
+                                    DffRecordHeader aEscherF002Hd;
+                                    if ( SeekToRec( rStCtrl, DFF_msofbtDgContainer, nPPDrawEnd, &aEscherF002Hd ) )
+                                    {
+                                        sal_uInt32 nEscherF002End = aEscherF002Hd.GetRecEndFilePos();
+                                        DffRecordHeader aEscherObjListHd;
+                                        if ( SeekToRec( rStCtrl, DFF_msofbtSpgrContainer, nEscherF002End, &aEscherObjListHd ) )
+                                        {
+                                            sal_uInt32 nObjCount = 0;
+                                            while( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aEscherObjListHd.GetRecEndFilePos() ) )
+                                            {
+                                                DffRecordHeader aHd2;
+                                                rStCtrl >> aHd2;
+                                                if ( ( aHd2.nRecType == DFF_msofbtSpContainer ) || ( aHd2.nRecType == DFF_msofbtSpgrContainer ) )
+                                                {
+                                                    if ( nObjCount++ )        // skipping the first object
+                                                    {
+                                                        Rectangle aEmpty;
+                                                        aHd2.SeekToBegOfRecord( rStCtrl );
+                                                        SdrObject* pImpObj = ImportObj( rStCtrl, (void*)&aProcessData, aEmpty, aEmpty );
+                                                        if ( pImpObj )
+                                                        {
+                                                            pImpObj->SetLayer( mnBackgroundObjectsLayerID );
+                                                            pMPage->NbcInsertObject( pImpObj );
+                                                        }
+                                                    }
+                                                }
+                                                aHd2.SeekToEndOfRecord( rStCtrl );
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                            break;
+
+                            case PPT_PST_ProgTags :
+                            {
+                                DffRecordHeader aProgTagHd;
+                                if ( SeekToContentOfProgTag( 10, rStCtrl, aPageHd, aProgTagHd ) )
+                                {
+                                    while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aProgTagHd.GetRecEndFilePos() ) )
+                                    {
+                                        DffRecordHeader aProgTagContentHd;
+                                        rStCtrl >> aProgTagContentHd;
+                                        switch( aProgTagContentHd.nRecType )
+                                        {
+                                            case DFF_msofbtAnimGroup :
+                                            {
+                                                ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > xPage( pMPage->getUnoPage(), ::com::sun::star::uno::UNO_QUERY );
+                                                ppt::AnimationImporter aImporter( this, rStCtrl );
+                                                aImporter.import( xPage, aProgTagContentHd );
+                                                bNewAnimationsUsed = sal_True;
+                                            }
+                                            break;
+                                        }
+                                        aProgTagContentHd.SeekToEndOfRecord( rStCtrl );
+                                    }
+                                }
+                            }
+                            break;
+                        }
+                        aHd.SeekToEndOfRecord( rStCtrl );
+                    }
+                    if ( mbTracing )
+                        mpTracer->RemoveAttribute( rtl::OUString::createFromAscii( "MasterPage" ) );
+                }
+                rStCtrl.Seek( nFPosMerk );
+                ImportPageEffect( (SdPage*)pMPage, bNewAnimationsUsed );
+
+                ///////////////////////
+                // background object //
+                ///////////////////////
+                pObj = pMPage->GetObj( 0 );
+                if ( pObj && pObj->GetObjIdentifier() == OBJ_RECT )
+                {
+                    if ( pMPage->GetPageKind() == PK_STANDARD )
+                    {
                         // transform data from imported background object to new form
                         // and delete the object. It was used as container to transport
                         // the attributes of the MasterPage background fill
-						SfxStyleSheet* pSheet = pMPage->GetStyleSheetForMasterPageBackground();
+                        SfxStyleSheet* pSheet = pMPage->GetStyleSheetForMasterPageBackground();
 
                         if(pSheet)
                         {
                             // if we have a StyleSheet (for Masterpages), set attributes there and use it
-							pSheet->GetItemSet().ClearItem();
-							pSheet->GetItemSet().Put(pObj->GetMergedItemSet());
+                            pSheet->GetItemSet().ClearItem();
+                            pSheet->GetItemSet().Put(pObj->GetMergedItemSet());
                             pMPage->getSdrPageProperties().ClearItem();
                             pMPage->getSdrPageProperties().SetStyleSheet(pSheet);
                         }
                         else
                         {
                             // without StyleSheet, set attributes directly. This 
-							// should not be done at all and is an error (will be asserted by SdrPage)
+                            // should not be done at all and is an error (will be asserted by SdrPage)
                             pMPage->getSdrPageProperties().ClearItem();
                             pMPage->getSdrPageProperties().PutItemSet(pObj->GetMergedItemSet());
                         }
 
-					    pMPage->RemoveObject(pObj->GetOrdNum());
-					    SdrObject::Free(pObj);
-					}
-				}
-			}
-		}
-		if( pStbMgr )
-			pStbMgr->SetState( nImportedPages++ );
-	}
-	////////////////////////////////////
-	// importing slide pages		  //
-	////////////////////////////////////
-	{
-		sal_uInt32			nFPosMerk = rStCtrl.Tell();
-		PptPageKind 	ePageKind = eAktPageKind;
-		sal_uInt16			nPageNum = nAktPageNum;
-
-		SdPage* pHandoutPage = (SdPage*)MakeBlancPage( sal_False );
-		pHandoutPage->SetPageKind( PK_HANDOUT );
-		pSdrModel->InsertPage( pHandoutPage );
-
-		sal_uInt16 nPageAnz = GetPageCount( PPT_SLIDEPAGE );
-		if ( nPageAnz )
-		{
-			for ( sal_uInt16 nPage = 0; nPage < nPageAnz; nPage++ )
-			{
-				sal_Bool bNewAnimationsUsed = sal_False;
+                        pMPage->RemoveObject(pObj->GetOrdNum());
+                        SdrObject::Free(pObj);
+                    }
+                }
+            }
+        }
+        if( pStbMgr )
+            pStbMgr->SetState( nImportedPages++ );
+    }
+    ////////////////////////////////////
+    // importing slide pages          //
+    ////////////////////////////////////
+    {
+        sal_uInt32            nFPosMerk = rStCtrl.Tell();
+        PptPageKind     ePageKind = eAktPageKind;
+        sal_uInt16            nPageNum = nAktPageNum;
+
+        SdPage* pHandoutPage = (SdPage*)MakeBlancPage( sal_False );
+        pHandoutPage->SetPageKind( PK_HANDOUT );
+        pSdrModel->InsertPage( pHandoutPage );
+
+        sal_uInt16 nPageAnz = GetPageCount( PPT_SLIDEPAGE );
+        if ( nPageAnz )
+        {
+            for ( sal_uInt16 nPage = 0; nPage < nPageAnz; nPage++ )
+            {
+                sal_Bool bNewAnimationsUsed = sal_False;
 
-				mePresChange = PRESCHANGE_SEMIAUTO;
-				SetPageNum( nPage, PPT_SLIDEPAGE );
+                mePresChange = PRESCHANGE_SEMIAUTO;
+                SetPageNum( nPage, PPT_SLIDEPAGE );
                 SdPage* pPage = (SdPage*)MakeBlancPage( sal_False );
                 PptSlidePersistEntry* pMasterPersist = NULL;
-	            if ( HasMasterPage( nPage, PPT_SLIDEPAGE ) )     // try to get the LayoutName from the masterpage
-	            {
-		            sal_uInt16 nMasterNum = GetMasterPageIndex( nAktPageNum, eAktPageKind );
-		            pPage->TRG_SetMasterPage(*pSdrModel->GetMasterPage(nMasterNum));
-		            PptSlidePersistList* pPageList = GetPageList( PPT_MASTERPAGE );
+                if ( HasMasterPage( nPage, PPT_SLIDEPAGE ) )     // try to get the LayoutName from the masterpage
+                {
+                    sal_uInt16 nMasterNum = GetMasterPageIndex( nAktPageNum, eAktPageKind );
+                    pPage->TRG_SetMasterPage(*pSdrModel->GetMasterPage(nMasterNum));
+                    PptSlidePersistList* pPageList = GetPageList( PPT_MASTERPAGE );
                     if ( pPageList && nMasterNum < pPageList->Count() )
                         pMasterPersist = (*pPageList)[ nMasterNum ];
-			        pPage->SetLayoutName(((SdPage&)pPage->TRG_GetMasterPage()).GetLayoutName());
+                    pPage->SetLayoutName(((SdPage&)pPage->TRG_GetMasterPage()).GetLayoutName());
                 }
-				pPage->SetPageKind( PK_STANDARD );
-				pSdrModel->InsertPage( pPage );			// SJ: #i29625# because of form controls, the
-				ImportPage( pPage, pMasterPersist );	//  page must be inserted before importing
-				SetHeaderFooterPageSettings( pPage, pMasterPersist );
-				// CWS preseng01: pPage->SetPageKind( PK_STANDARD );
-
-				DffRecordHeader aPageHd;
-				if ( SeekToAktPage( &aPageHd ) )
-				{
-					aPageHd.SeekToContent( rStCtrl );
-					while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aPageHd.GetRecEndFilePos() ) )
-					{
-						DffRecordHeader aHd;
-						rStCtrl >> aHd;
-						switch ( aHd.nRecType )
-						{
-							case PPT_PST_ProgTags :
-							{
-								DffRecordHeader aProgTagHd;
-								if ( SeekToContentOfProgTag( 10, rStCtrl, aPageHd, aProgTagHd ) )
-								{
-									while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aProgTagHd.GetRecEndFilePos() ) )
-									{
-										DffRecordHeader aProgTagContentHd;
-										rStCtrl >> aProgTagContentHd;
-										switch( aProgTagContentHd.nRecType )
-										{
+                pPage->SetPageKind( PK_STANDARD );
+                pSdrModel->InsertPage( pPage );            // SJ: #i29625# because of form controls, the
+                ImportPage( pPage, pMasterPersist );    //  page must be inserted before importing
+                SetHeaderFooterPageSettings( pPage, pMasterPersist );
+                // CWS preseng01: pPage->SetPageKind( PK_STANDARD );
+
+                DffRecordHeader aPageHd;
+                if ( SeekToAktPage( &aPageHd ) )
+                {
+                    aPageHd.SeekToContent( rStCtrl );
+                    while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aPageHd.GetRecEndFilePos() ) )
+                    {
+                        DffRecordHeader aHd;
+                        rStCtrl >> aHd;
+                        switch ( aHd.nRecType )
+                        {
+                            case PPT_PST_ProgTags :
+                            {
+                                DffRecordHeader aProgTagHd;
+                                if ( SeekToContentOfProgTag( 10, rStCtrl, aPageHd, aProgTagHd ) )
+                                {
+                                    while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aProgTagHd.GetRecEndFilePos() ) )
+                                    {
+                                        DffRecordHeader aProgTagContentHd;
+                                        rStCtrl >> aProgTagContentHd;
+                                        switch( aProgTagContentHd.nRecType )
+                                        {
 /*
-											case PPT_PST_CommentContainer :
-											{
+                                            case PPT_PST_CommentContainer :
+                                            {
 
-											}
-											break;
+                                            }
+                                            break;
 */
-											case DFF_msofbtAnimGroup :
-											{
-												::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > xPage( pPage->getUnoPage(), ::com::sun::star::uno::UNO_QUERY );
-												ppt::AnimationImporter aImporter( this, rStCtrl );
-												aImporter.import( xPage, aProgTagContentHd );
-												bNewAnimationsUsed = sal_True;
-											}
-											break;
-
-											case PPT_PST_NewlyAddedAtomByXP11008 :	// ???
-											break;
-
-											case PPT_PST_NewlyAddedAtomByXP12011 :	// ??? don't know, this atom is always 8 bytes big
-											break;									// and is appearing in nearly every l10 progtag
-										}
-										aProgTagContentHd.SeekToEndOfRecord( rStCtrl );
-									}
-								}
-							}
-							break;
-
-							case PPT_PST_HeadersFooters :
-							case PPT_PST_PPDrawing :
-							default:
-							break;
-						}
-
-						aHd.SeekToEndOfRecord( rStCtrl );
-					}
-					ImportPageEffect( (SdPage*)pPage, bNewAnimationsUsed );
-				}
+                                            case DFF_msofbtAnimGroup :
+                                            {
+                                                ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > xPage( pPage->getUnoPage(), ::com::sun::star::uno::UNO_QUERY );
+                                                ppt::AnimationImporter aImporter( this, rStCtrl );
+                                                aImporter.import( xPage, aProgTagContentHd );
+                                                bNewAnimationsUsed = sal_True;
+                                            }
+                                            break;
+
+                                            case PPT_PST_NewlyAddedAtomByXP11008 :    // ???
+                                            break;
+
+                                            case PPT_PST_NewlyAddedAtomByXP12011 :    // ??? don't know, this atom is always 8 bytes big
+                                            break;                                    // and is appearing in nearly every l10 progtag
+                                        }
+                                        aProgTagContentHd.SeekToEndOfRecord( rStCtrl );
+                                    }
+                                }
+                            }
+                            break;
+
+                            case PPT_PST_HeadersFooters :
+                            case PPT_PST_PPDrawing :
+                            default:
+                            break;
+                        }
+
+                        aHd.SeekToEndOfRecord( rStCtrl );
+                    }
+                    ImportPageEffect( (SdPage*)pPage, bNewAnimationsUsed );
+                }
 
-				// creating the corresponding note page
-				eAktPageKind = PPT_NOTEPAGE;
+                // creating the corresponding note page
+                eAktPageKind = PPT_NOTEPAGE;
                 SdPage* pNotesPage = (SdPage*)MakeBlancPage( sal_False );
-				sal_uInt16 nNotesMasterNum = GetMasterPageIndex( nPage, PPT_SLIDEPAGE ) + 1;
-				sal_uInt32 nNotesPageId = GetNotesPageId( nPage );
-				if ( nNotesPageId )
-				{
-					nImportedPages++;
-					sal_uInt16 nNotesPageIndex = pNotePages->FindPage( nNotesPageId );
-					if ( nNotesPageIndex == PPTSLIDEPERSIST_ENTRY_NOTFOUND )
-						nNotesPageIndex = 0;
-					SetPageNum( nNotesPageIndex, PPT_NOTEPAGE );
+                sal_uInt16 nNotesMasterNum = GetMasterPageIndex( nPage, PPT_SLIDEPAGE ) + 1;
+                sal_uInt32 nNotesPageId = GetNotesPageId( nPage );
+                if ( nNotesPageId )
+                {
+                    nImportedPages++;
+                    sal_uInt16 nNotesPageIndex = pNotePages->FindPage( nNotesPageId );
+                    if ( nNotesPageIndex == PPTSLIDEPERSIST_ENTRY_NOTFOUND )
+                        nNotesPageIndex = 0;
+                    SetPageNum( nNotesPageIndex, PPT_NOTEPAGE );
                     PptSlidePersistEntry* pMasterPersist2 = NULL;
-	                if ( HasMasterPage( nNotesPageIndex, PPT_NOTEPAGE ) ) // try to get the LayoutName from the masterpage
-	                {
-		                pNotesPage->TRG_SetMasterPage(*pSdrModel->GetMasterPage(nNotesMasterNum));
-		                PptSlidePersistList* pPageList = GetPageList( PPT_MASTERPAGE );
+                    if ( HasMasterPage( nNotesPageIndex, PPT_NOTEPAGE ) ) // try to get the LayoutName from the masterpage
+                    {
+                        pNotesPage->TRG_SetMasterPage(*pSdrModel->GetMasterPage(nNotesMasterNum));
+                        PptSlidePersistList* pPageList = GetPageList( PPT_MASTERPAGE );
                         if ( pPageList && nNotesMasterNum < pPageList->Count() )
-							pMasterPersist2 = (*pPageList)[ nNotesMasterNum ];
-    			        pNotesPage->SetLayoutName( ((SdPage&)pNotesPage->TRG_GetMasterPage()).GetLayoutName() );
+                            pMasterPersist2 = (*pPageList)[ nNotesMasterNum ];
+                        pNotesPage->SetLayoutName( ((SdPage&)pNotesPage->TRG_GetMasterPage()).GetLayoutName() );
                     }
-					pNotesPage->SetPageKind( PK_NOTES );
-					pNotesPage->TRG_SetMasterPage(*pSdrModel->GetMasterPage(nNotesMasterNum));
-					pSdrModel->InsertPage( pNotesPage );		// SJ: #i29625# because of form controls, the
-                    ImportPage( pNotesPage, pMasterPersist2 );	// page must be inserted before importing
-					SetHeaderFooterPageSettings( pNotesPage, pMasterPersist2 );
-					pNotesPage->SetAutoLayout( AUTOLAYOUT_NOTES, sal_False );
-				}
-				else
-				{
-					pNotesPage->SetPageKind( PK_NOTES );
-					pNotesPage->TRG_SetMasterPage(*pSdrModel->GetMasterPage(nNotesMasterNum));
-					pNotesPage->SetAutoLayout( AUTOLAYOUT_NOTES, sal_True );
-					pSdrModel->InsertPage( pNotesPage );
-					SdrObject* pPageObj = pNotesPage->GetPresObj( PRESOBJ_PAGE, 1 );
-					if ( pPageObj )
-						((SdrPageObj*)pPageObj)->SetReferencedPage(pSdrModel->GetPage(( nPage << 1 ) + 1));
-				}
-
-				if( pStbMgr )
-					pStbMgr->SetState( nImportedPages++ );
-			}
-			//////////////
-		}
-		else
-		{
-			// Das kann bei Dokumentvorlagen vorkommen
-			eAktPageKind = PPT_SLIDEPAGE;
-			SdrPage* pPage = MakeBlancPage( sal_False );
-			pSdrModel->InsertPage( pPage );
-
-			// #i37397#, trying to set the title master for the first page
-			sal_uInt16 nMaster, nMasterCount = pSdrModel->GetMasterPageCount();
-			SdPage* pFoundMaster = NULL;
-			for ( nMaster = 1; nMaster < nMasterCount; nMaster++ )
-			{
-				SdPage* pMaster = static_cast<SdPage*>( pSdrModel->GetMasterPage( nMaster ) );
-				if ( pMaster->GetPageKind() == PK_STANDARD )
-				{
-					SetPageNum( nMaster, PPT_MASTERPAGE );
-					if ( !pFoundMaster )
-						pFoundMaster = pMaster;
-					else if ( GetSlideLayoutAtom()->eLayout == PPT_LAYOUT_TITLEMASTERSLIDE )
-						pFoundMaster = pMaster;
-					if ( GetSlideLayoutAtom()->eLayout == PPT_LAYOUT_TITLEMASTERSLIDE )
-						break;
-				}
-			}
-			if ( pFoundMaster )
-			{
-				((SdPage*)pPage)->TRG_SetMasterPage( *((SdPage*)pFoundMaster) );
-			    ((SdPage*)pPage)->SetLayoutName( ((SdPage*)pFoundMaster)->GetLayoutName() );
-			}
-			((SdPage*)pPage)->SetAutoLayout( AUTOLAYOUT_TITLE, sal_True, sal_True );
-
-			eAktPageKind = PPT_NOTEPAGE;
-			SdrPage* pNPage = MakeBlancPage( sal_False );
-			pSdrModel->InsertPage( pNPage );
-		}
-		SetPageNum( nPageNum, ePageKind );
-		rStCtrl.Seek( nFPosMerk );
-	}
-	///////////////////////////////////////////////////////////////////
-	// Handzettel und Notiz-Seiten erzeugen 						 //
-	///////////////////////////////////////////////////////////////////
-	bOk = mpDoc->CreateMissingNotesAndHandoutPages();
-	if ( bOk )
-	{
-		for ( i = 0; i < mpDoc->GetSdPageCount( PK_STANDARD ); i++ )
-		{
-			////////////////////
-			// set AutoLayout //
-			////////////////////
-			SetPageNum( i, PPT_SLIDEPAGE );
-			SdPage* pPage = mpDoc->GetSdPage( i, PK_STANDARD );
-			AutoLayout eAutoLayout = AUTOLAYOUT_NONE;
-			const PptSlideLayoutAtom* pSlideLayout = GetSlideLayoutAtom();
-			if ( pSlideLayout )
-			{
-				switch ( pSlideLayout->eLayout )			// Praesentationslayouts fuer Standard-Seiten
-				{
-					case PPT_LAYOUT_TITLEANDBODYSLIDE :
-					{
-						eAutoLayout = AUTOLAYOUT_ENUM;
-						sal_uInt16 nID1 = pSlideLayout->aPlaceholderId[ 1 ];
-						switch ( nID1 )
-						{
-							case PPT_PLACEHOLDER_BODY :
-								eAutoLayout = AUTOLAYOUT_ENUM;
-							break;
-							case PPT_PLACEHOLDER_TABLE :
-								eAutoLayout = AUTOLAYOUT_TAB;
-							break;
-							case PPT_PLACEHOLDER_ORGANISZATIONCHART :
-								eAutoLayout = AUTOLAYOUT_ORG;
-							break;
-							case PPT_PLACEHOLDER_GRAPH :
-								eAutoLayout = AUTOLAYOUT_CHART;
-							break;
-							case PPT_PLACEHOLDER_OBJECT :
-								eAutoLayout = AUTOLAYOUT_OBJ;
-							break;
-							case PPT_PLACEHOLDER_VERTICALTEXTBODY :
-								eAutoLayout = AUTOLAYOUT_TITLE_VERTICAL_OUTLINE;
-							break;
-						}
-					}
-					break;
-
-					case PPT_LAYOUT_2COLUMNSANDTITLE :
-					{
-						eAutoLayout = AUTOLAYOUT_2TEXT;
-						sal_uInt16 nID1 = pSlideLayout->aPlaceholderId[ 1 ];
-						sal_uInt16 nID2 = pSlideLayout->aPlaceholderId[ 2 ];
-						if ( nID1 == PPT_PLACEHOLDER_BODY && nID2 == PPT_PLACEHOLDER_GRAPH )
-							eAutoLayout = AUTOLAYOUT_TEXTCHART;
-						else if ( nID1 == PPT_PLACEHOLDER_GRAPH && nID2 == PPT_PLACEHOLDER_BODY )
-							eAutoLayout = AUTOLAYOUT_CHARTTEXT;
-						else if ( nID1 == PPT_PLACEHOLDER_BODY && nID2 == PPT_PLACEHOLDER_CLIPART )
-							eAutoLayout = AUTOLAYOUT_TEXTCLIP;
-						else if ( nID1 == PPT_PLACEHOLDER_CLIPART && nID2 == PPT_PLACEHOLDER_BODY )
-							eAutoLayout = AUTOLAYOUT_CLIPTEXT;
-						else if ( nID1 == PPT_PLACEHOLDER_CLIPART && nID2 == PPT_PLACEHOLDER_VERTICALTEXTBODY )
-							eAutoLayout = AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART;
-						else if ( ( nID1 == PPT_PLACEHOLDER_BODY )
-							&& ( ( nID2 == PPT_PLACEHOLDER_OBJECT ) || ( nID2 == PPT_PLACEHOLDER_MEDIACLIP ) ) )
-							eAutoLayout = AUTOLAYOUT_TEXTOBJ;
-						else if ( ( nID2 == PPT_PLACEHOLDER_BODY )
-							&& ( ( nID1 == PPT_PLACEHOLDER_OBJECT ) || ( nID1 == PPT_PLACEHOLDER_MEDIACLIP ) ) )
-							eAutoLayout = AUTOLAYOUT_OBJTEXT;
-                        else if ( ( nID1 == PPT_PLACEHOLDER_OBJECT ) && ( nID2 == PPT_PLACEHOLDER_OBJECT  ) )
-							eAutoLayout = AUTOLAYOUT_OBJ;
-					}
-					break;
-
-					case PPT_LAYOUT_2ROWSANDTITLE :
-					{
-						eAutoLayout = AUTOLAYOUT_2TEXT;
-						sal_uInt16 nID1 = pSlideLayout->aPlaceholderId[ 1 ];
-						sal_uInt16 nID2 = pSlideLayout->aPlaceholderId[ 2 ];
-						if ( nID1 == PPT_PLACEHOLDER_BODY && nID2 == PPT_PLACEHOLDER_OBJECT )
-							eAutoLayout = AUTOLAYOUT_TEXTOVEROBJ;
-						else if ( nID1 == PPT_PLACEHOLDER_OBJECT && nID2 == PPT_PLACEHOLDER_BODY )
-							eAutoLayout = AUTOLAYOUT_OBJOVERTEXT;
-					}
-					break;
-
-					case PPT_LAYOUT_TITLESLIDE :
-						eAutoLayout = AUTOLAYOUT_TITLE;
-					break;
-					case PPT_LAYOUT_ONLYTITLE :
-						eAutoLayout = AUTOLAYOUT_ONLY_TITLE;
-					break;
-					case PPT_LAYOUT_RIGHTCOLUMN2ROWS :
-						eAutoLayout = AUTOLAYOUT_TEXT2OBJ;
-					break;
-					case PPT_LAYOUT_LEFTCOLUMN2ROWS :
-						eAutoLayout = AUTOLAYOUT_2OBJTEXT;
-					break;
-					case PPT_LAYOUT_TOPROW2COLUMN :
-						eAutoLayout = AUTOLAYOUT_2OBJOVERTEXT;
-					break;
-					case PPT_LAYOUT_4OBJECTS :
-						eAutoLayout = AUTOLAYOUT_4OBJ;
-					break;
-					case PPT_LAYOUT_BIGOBJECT :
-						eAutoLayout = AUTOLAYOUT_OBJ;
-					break;
-					case PPT_LAYOUT_TITLERIGHTBODYLEFT :
-						eAutoLayout = AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE; // AUTOLAYOUT_ENUM;
-					break;
-					case PPT_LAYOUT_TITLERIGHT2BODIESLEFT :
-						eAutoLayout = AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART; // AUTOLAYOUT_TEXT2OBJ;
-					break;
-
-					case PPT_LAYOUT_BOTTOMROW2COLUMNS :
-					case PPT_LAYOUT_BLANCSLIDE :
-					case PPT_LAYOUT_MASTERSLIDE :			// Layout der Standard- und Titel-MasterPage
-					case PPT_LAYOUT_TITLEMASTERSLIDE :
-					case PPT_LAYOUT_MASTERNOTES :			// Layout der Notizen-MasterPage
-					case PPT_LAYOUT_NOTESTITLEBODY :		// Praesentationslayout fuer Notiz-Seiten
-					case PPT_LAYOUT_HANDOUTLAYOUT : 		// Praesentationslayout fuer Handzettelseiten
-						eAutoLayout = AUTOLAYOUT_NONE;
-					break;
-				}
-				if ( eAutoLayout != AUTOLAYOUT_NONE )
-					pPage->SetAutoLayout( eAutoLayout, sal_False );
-			}
-		}
-		//////////////////////////////////////////////////////////////
-		// Handzettel-MasterPage: Autolayout setzen 				//
-		//////////////////////////////////////////////////////////////
-		SdPage* pHandoutMPage = mpDoc->GetMasterSdPage( 0, PK_HANDOUT );
-		pHandoutMPage->SetAutoLayout( AUTOLAYOUT_HANDOUT6, sal_True, sal_True );
-	}
-
-	sal_uInt32 nSlideCount = GetPageCount();
-	for ( i = 0; ( i < nSlideCount) && ( i < maSlideNameList.Count() ); i++ )
-	{
-		SdPage* pPage = mpDoc->GetSdPage( i, PK_STANDARD );
-		String* pName = (String*)maSlideNameList.GetObject( i );
-		if ( pPage && pName )
-		{
-			if ( pName->Len() )
-				pPage->SetName( *pName );
-			else
-				*pName = pPage->GetName();
-		}
-	}
-	if ( mbDocumentFound )
-	{
-		mpDoc->SetSummationOfParagraphs( sal_True );
-		if ( pDocShell )
-		{
-			::sd::FrameView* pFrameView = mpDoc->GetFrameView( 0 );
-			if ( !pFrameView )
-			{
-				List* pFrameViewList = mpDoc->GetFrameViewList();
-				if ( pFrameViewList )
-				{
-					pFrameView = new ::sd::FrameView( mpDoc );
-					if ( pFrameView )
-						pFrameViewList->Insert( pFrameView );
-				}
-			}
-			if ( pFrameView )
-			{
-				sal_uInt16	nSelectedPage = 0;
-				PageKind	ePageKind = PK_STANDARD;
-				EditMode	eEditMode = EM_PAGE;
-
-				switch ( aUserEditAtom.eLastViewType )
-				{
-					case 7 :	// outliner view
-					{
-						SfxItemSet* pSet = mrMed.GetItemSet();
-						if ( pSet )
-							pSet->Put( SfxUInt16Item( SID_VIEW_ID, 3 ) );
-					}
-					break;
-					case 8 :	// slide sorter
-					{
-						SfxItemSet* pSet = mrMed.GetItemSet();
-						if ( pSet )
-							pSet->Put( SfxUInt16Item( SID_VIEW_ID, 2 ) );
-					}
-					break;
-					case 10 :	// titlemaster
-						nSelectedPage = 1;
-					case 2 :	// master
-					{
-						ePageKind = PK_STANDARD;
-						eEditMode = EM_MASTERPAGE;
-					}
-					break;
-					case 5 :	// notes master
-						eEditMode = EM_MASTERPAGE;
-					case 3 :	// notes
-						ePageKind = PK_NOTES;
-					break;
-					case 4 :	// handout
-						ePageKind = PK_HANDOUT;
-					break;
-					default :
-					case 1 :	// normal
-					break;
-				}
-				pFrameView->SetPageKind( ePageKind );
-				pFrameView->SetSelectedPage( nSelectedPage );
-				pFrameView->SetViewShEditMode( eEditMode, ePageKind );
-			}
-		}
-		DffRecordHeader aCustomShowHeader;
-		// custom show einlesen und setzen
-		rStCtrl.Seek( maDocHd.GetRecBegFilePos() + 8 );
-		if ( SeekToRec( rStCtrl, PPT_PST_NamedShows, maDocHd.GetRecEndFilePos(), &aCustomShowHeader ) )
-		{
-			DffRecordHeader aCuHeader;
-			while( SeekToRec( rStCtrl, PPT_PST_NamedShow, aCustomShowHeader.GetRecEndFilePos(), &aCuHeader ) )
-			{
-				DffRecordHeader aContent;
-				if ( SeekToRec( rStCtrl, PPT_PST_CString, aCuHeader.GetRecEndFilePos(), &aContent ) )
-				{
-					String aCuShow;
-					aContent.SeekToBegOfRecord( rStCtrl );
-					if ( ReadString( aCuShow ) )
-					{
-						if ( SeekToRec( rStCtrl, PPT_PST_NamedShowSlides, aCuHeader.GetRecEndFilePos(), &aContent ) )
-						{
-							PptSlidePersistList* pPageList = GetPageList( PPT_SLIDEPAGE );
-							sal_uInt32 nSCount = aContent.nRecLen >> 2;
-							if ( pPageList && nSCount )
-							{
-								List* pList = mpDoc->GetCustomShowList( sal_True );
-								if ( pList )
-								{
-									SdCustomShow* pSdCustomShow = new SdCustomShow( mpDoc );
-									if ( pSdCustomShow )
-									{
-										pSdCustomShow->SetName( aCuShow );
-										sal_uInt32 nFound = 0;
-										for ( sal_uInt32 nS = 0; nS < nSCount; nS++ )
-										{
-											sal_uInt32 nPageNumber;
-											rStCtrl >> nPageNumber;
-											sal_uInt16 nPage = pPageList->FindPage( nPageNumber );
-											if ( nPage != PPTSLIDEPERSIST_ENTRY_NOTFOUND )
-											{

[... 3018 lines stripped ...]


Mime
View raw message