[Libreoffice-commits] .: binfilter/bf_basic binfilter/bf_sfx2 binfilter/bf_so3 binfilter/bf_sw binfilter/inc filter/source

Joseph Powers jpowers at kemper.freedesktop.org
Tue May 17 19:14:15 PDT 2011


 binfilter/bf_basic/source/basmgr/basmgr.cxx     |    8 +-
 binfilter/bf_sfx2/source/config/sfx2_cfgmgr.cxx |   42 +++++++--------
 binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx   |    8 +-
 binfilter/bf_so3/source/persist/persist.cxx     |    6 +-
 binfilter/bf_sw/source/ui/app/sw_docshini.cxx   |   24 +++++---
 binfilter/inc/bf_so3/svstor.hxx                 |    4 -
 filter/source/msfilter/svdfppt.cxx              |   66 ++++++++++++------------
 filter/source/msfilter/svxmsbas.cxx             |   36 ++++++-------
 8 files changed, 99 insertions(+), 95 deletions(-)

New commits:
commit 8d72d45329f028919b5eb300eb851c0b533b40fc
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Sun May 15 19:43:08 2011 -0700

    Change SvStorageInfoList from an OwnList to vector<>
    
    Simple changes.

diff --git a/binfilter/bf_basic/source/basmgr/basmgr.cxx b/binfilter/bf_basic/source/basmgr/basmgr.cxx
index 7be38bb..5481ed3 100644
--- a/binfilter/bf_basic/source/basmgr/basmgr.cxx
+++ b/binfilter/bf_basic/source/basmgr/basmgr.cxx
@@ -1555,18 +1555,18 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage )
 
                 // Wenn kein weiterer Stream vorhanden,
                 // dann auch den SubStorage loeschen.
-                SvStorageInfoList aInfoList( 0, 4 );
+                SvStorageInfoList aInfoList;
                 xBasicStorage->FillInfoList( &aInfoList );
-                if ( !aInfoList.Count() )
+                if ( aInfoList.empty() )
                 {
                     xBasicStorage.Clear();
                     xStorage->Remove( BasicStreamName );
                     xStorage->Commit();
                     // Wenn kein weiterer Streams oder SubStorages vorhanden,
                     // dann auch den Storage loeschen.
-                    aInfoList.Clear();
+                    aInfoList.clear();
                     xStorage->FillInfoList( &aInfoList );
-                    if ( !aInfoList.Count() )
+                    if ( aInfoList.empty() )
                     {
                         String aName_( xStorage->GetName() );
                         xStorage.Clear();
diff --git a/binfilter/bf_sfx2/source/config/sfx2_cfgmgr.cxx b/binfilter/bf_sfx2/source/config/sfx2_cfgmgr.cxx
index 6e2aa7d..bf597c1 100644
--- a/binfilter/bf_sfx2/source/config/sfx2_cfgmgr.cxx
+++ b/binfilter/bf_sfx2/source/config/sfx2_cfgmgr.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -184,9 +184,9 @@ static const char pStorageName[] = "Configurations";
 /*N*/
 /*N*/     SvStorageInfoList aList;
 /*N*/     rStorage.FillInfoList( &aList );
-/*N*/     for( USHORT i = 0; i < aList.Count(); i++ )
+/*N*/     for( size_t i = 0; i < aList.size(); i++ )
 /*N*/     {
-/*?*/         SvStorageInfo& rInfo = aList.GetObject( i );
+/*?*/         SvStorageInfo& rInfo = aList[ i ];
 /*?*/         if ( rInfo.IsStream() )
 /*?*/         {
 /*?*/             // get StreamName and ItemType
@@ -437,7 +437,7 @@ static const char pStorageName[] = "Configurations";
 /*N*/ #define CFG_STREAM_BUFFER_SIZE  5000
 /*N*/ static const USHORT nVersion = 26;
 /*N*/ static const char cCtrlZ = 26;
-/*N*/ 
+/*N*/
 /*N*/ static const USHORT nTypesCount = 82;
 
 /*N*/ BOOL SfxConfigManagerImExport_Impl::HasConfiguration( SotStorage& rStorage )
@@ -451,13 +451,13 @@ static const char pStorageName[] = "Configurations";
 /*N*/         pInStorage->OpenSotStream( String::CreateFromAscii(pHeader), STREAM_STD_READ );
 /*N*/ 	if ( aStr->GetError() )
 /*N*/ 		return SfxConfigManager::ERR_OPEN;
-/*N*/ 
+/*N*/
 /*N*/ 	SvStream* pStream = aStr;
 /*N*/ 	pStream->SetVersion( SOFFICE_FILEFORMAT_40 );
 /*N*/ 	pStream->SetBufferSize( CFG_STREAM_BUFFER_SIZE );
 /*N*/ 	pStream->Seek(0);
 /*N*/ 	USHORT nRet = SfxConfigManager::ERR_NO;
-/*N*/ 
+/*N*/
 /*N*/ 	// check header
 /*N*/ 	const unsigned nLen = strlen( pHeader );
 /*N*/ 	char *pBuf = new char[nLen+1];
@@ -468,9 +468,9 @@ static const char pStorageName[] = "Configurations";
 /*N*/ 		delete[] pBuf;
 /*?*/ 		return SfxConfigManager::ERR_FILETYPE;
 /*N*/ 	}
-/*N*/ 
+/*N*/
 /*N*/ 	delete[] pBuf;
-/*N*/ 
+/*N*/
 /*N*/ 	// compare version
 /*N*/ 	char c;
 /*N*/ 	USHORT nFileVersion;
@@ -480,22 +480,22 @@ static const char pStorageName[] = "Configurations";
 /*N*/ 	{
 /*?*/ 		return SfxConfigManager::ERR_VERSION;
 /*N*/ 	}
-/*N*/ 
+/*N*/
 /*N*/ 	// get position of directory
 /*N*/ 	long lDirPos;
 /*N*/ 	(*pStream) >> lDirPos;
 /*N*/ 	pStream->Seek(lDirPos);
-/*N*/ 
+/*N*/
 /*N*/ 	// get number of items
 /*N*/ 	USHORT nCount;
 /*N*/ 	(*pStream) >> nCount;
-/*N*/ 
+/*N*/
 /*N*/ 	// read in directory and convert items
 /*N*/ 	for( USHORT i=0; i < nCount; ++i )
 /*N*/ 	{
 /*N*/ 		SfxConfigItem_Impl* pItem = new SfxConfigItem_Impl;
 /*N*/ 		pItemArr->Insert( pItem, pItemArr->Count() );
-/*N*/ 
+/*N*/
 /*N*/ 		// retrieve type of item and human readable name
 /*N*/ 		long lLength, lPos;	            // dummies
 /*N*/         (*pStream) >> pItem->nType >> lPos >> lLength;
@@ -506,7 +506,7 @@ static const char pStorageName[] = "Configurations";
 /*?*/             pItem->bDefault = TRUE;
 /*?*/             return SfxConfigManager::ERR_READ;
 /*N*/         }
-/*N*/ 
+/*N*/
 /*N*/ 		// convert into new format
 /*N*/         if ( !pItem->bDefault )
 /*N*/         {
@@ -516,20 +516,20 @@ static const char pStorageName[] = "Configurations";
 /*N*/             {
 /*N*/                 long lOldPos = pStream->Tell();
 /*N*/                 pStream->Seek( lPos );
-/*N*/ 
+/*N*/
 /*N*/                 // check for correct type id, inequality is allowed for userdef toolboxes
 /*N*/                 USHORT nType;
 /*N*/                 (*pStream) >> nType;
 /*N*/                 BOOL bOk = ( (nType == pItem->nType) ||
 /*N*/                             (1294 <= nType && nType <= 1301 &&
 /*N*/                             1294 <= pItem->nType && pItem->nType <= 1301) );
-/*N*/ 
+/*N*/
 /*N*/                 if ( !bOk || !ImportItem( pItem, pStream, pStorage ) )
 /*N*/                 {
 /*?*/                     pItem->bDefault = TRUE;
 /*?*/                     nRet = SfxConfigManager::ERR_IMPORT;
 /*N*/                 }
-/*N*/ 
+/*N*/
 /*N*/                 pStream->Seek( lOldPos );
 /*N*/             }
 /*N*/             else
@@ -538,7 +538,7 @@ static const char pStorageName[] = "Configurations";
 /*N*/                 // force error message that saving this document would lose some configuration information
 /*N*/             }
 /*N*/         }
-/*N*/ 
+/*N*/
 /*N*/         if ( !pItem->aStreamName.Len() )
 /*N*/ 		{
 /*N*/             // no real config item anymore
@@ -546,7 +546,7 @@ static const char pStorageName[] = "Configurations";
 /*N*/ 			pItemArr->Remove( pItemArr->Count() - 1 );
 /*N*/ 		}
 /*N*/ 	}
-/*N*/ 
+/*N*/
 /*N*/ 	return nRet;
 /*N*/ }
 
@@ -571,17 +571,17 @@ static const char pStorageName[] = "Configurations";
 /*N*/ {
 /*N*/         if ( 11 == nType )
 /*N*/             return String::CreateFromAscii( "eventbindings.xml" );
-/*?*/ 
+/*?*/
 /*?*/     return String();
 /*N*/ }
 
 /*?*/ USHORT SfxConfigManagerImExport_Impl::GetType( const String& rStreamName )
 /*?*/ {
 /*NBFF*/     ByteString aCmp( rStreamName, RTL_TEXTENCODING_ASCII_US );
-/*NBFF*/ 
+/*NBFF*/
 /*NBFF*/         if ( !strcmp( aCmp.GetBuffer(), "eventbindings.xml" ) )
 /*NBFF*/             return 11;
-/*NBFF*/ 
+/*NBFF*/
 /*?*/     return 0;
 /*?*/ }
 
diff --git a/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx b/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
index ea1120f..a34251d 100644
--- a/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
+++ b/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
@@ -353,7 +353,7 @@ sal_False           Das Objekt konnte nicht geladen werden
             SetError( nError );
     }
 
-    if ( GetError() == ERRCODE_NONE && pMed->IsStorage() ) 
+    if ( GetError() == ERRCODE_NONE && pMed->IsStorage() )
     {
         SvStorageRef xStor( pMed->GetStorage() );
         if( pMed->GetLastStorageCreationState() == ERRCODE_NONE )
@@ -377,7 +377,7 @@ sal_False           Das Objekt konnte nicht geladen werden
             {
                 SvStorageInfoList aList;
                 xStor->FillInfoList( &aList );
-                if ( !aList.Count() && !xStor->IsOLEStorage() )
+                if ( aList.empty() && !xStor->IsOLEStorage() )
                     SetError( ERRCODE_IO_BROKENPACKAGE );
                 else
                 {
@@ -426,7 +426,7 @@ sal_False           Das Objekt konnte nicht geladen werden
         bHasName = sal_True;
         // Importieren
         const String aOldURL( ::binfilter::StaticBaseUrl::GetBaseURL() );
-        if( aBaseURL.Len() ) 
+        if( aBaseURL.Len() )
             ::binfilter::StaticBaseUrl::SetBaseURL( aBaseURL );
         if( !pMedium->GetFilter()->UsesStorage() )
             pMedium->GetInStream();
@@ -698,7 +698,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
     Lock_Impl( this, sal_True );
 
     sal_Bool bOk = sal_False;
-    if( sal_True ) 
+    if( sal_True )
     {
         SvStorageRef aMedRef = rMedium.GetStorage();
         if ( !aMedRef.Is() )
diff --git a/binfilter/bf_so3/source/persist/persist.cxx b/binfilter/bf_so3/source/persist/persist.cxx
index a05e696..f4e0e65 100644
--- a/binfilter/bf_so3/source/persist/persist.cxx
+++ b/binfilter/bf_so3/source/persist/persist.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -76,7 +76,7 @@ SvInfoObject::SvInfoObject( SvPersist * pObj, const String & rName )
 }
 
 SvInfoObject::SvInfoObject( const String& rObjName,
-                            const SvGlobalName& rClassName ) 
+                            const SvGlobalName& rClassName )
     : pImp( new SvInfoObject_Impl )
     , bDeleted( FALSE )
 {
@@ -668,7 +668,7 @@ BOOL SvPersist::ImplCopy( SvPersist* pSrc, const String& rStorageName, BOOL bMov
             {
                 SvStorageInfoList aList;
                 aSrcEleStor->FillInfoList( &aList );
-                bSave = !aList.Count();
+                bSave = aList.empty();
                 if ( !bSave )
                 {
                     if( pStor->GetVersion() <= SOFFICE_FILEFORMAT_50 )
diff --git a/binfilter/bf_sw/source/ui/app/sw_docshini.cxx b/binfilter/bf_sw/source/ui/app/sw_docshini.cxx
index 4e78125..f151238 100644
--- a/binfilter/bf_sw/source/ui/app/sw_docshini.cxx
+++ b/binfilter/bf_sw/source/ui/app/sw_docshini.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -583,12 +583,16 @@ using namespace ::rtl;
 /*N*/
 /*N*/ 			// erstmal alle nicht "OLE-Objecte" aus der Liste entfernen
                 sal_uInt32 n;
-/*N*/ 			for( n = aInfoList.Count(); n; )
+/*N*/ 			for( n = aInfoList.size(); n; )
 /*N*/ 			{
-/*N*/ 				const String& rName = aInfoList.GetObject( --n ).GetName();
+/*N*/ 				const String& rName = aInfoList[ --n ].GetName();
 /*N*/ 				// in ndole.cxx wird dieser PreFix benutzt
 /*N*/ 				if( 3 != rName.Match( String::CreateFromAscii("Obj") ))
-/*N*/ 					aInfoList.Remove( n );
+                    {
+                        SvStorageInfoList::iterator it = aInfoList.begin();
+                        ::std::advance( it, n );
+                        aInfoList.erase( it );
+                    }
 /*N*/ 			}
 /*N*/
 /*N*/ 			// dann alle referenzierten Object aus der Liste entfernen
@@ -600,12 +604,14 @@ using namespace ::rtl;
 /*N*/ 				if( pOLENd )
 /*N*/ 				{
 /*N*/ 					const String& rOLEName = pOLENd->GetOLEObj().GetName();
-/*N*/ 					for( n = aInfoList.Count(); n; )
+/*N*/ 					for( n = aInfoList.size(); n; )
 /*N*/ 					{
-/*N*/ 						const String& rName = aInfoList.GetObject( --n ).GetName();
+/*N*/ 						const String& rName = aInfoList[ --n ].GetName();
 /*N*/ 						if( rOLEName == rName )
 /*N*/ 						{
-/*N*/ 							aInfoList.Remove( n );
+                                SvStorageInfoList::iterator it = aInfoList.begin();
+                                ::std::advance( it, n );
+                                aInfoList.erase( it );
 /*N*/ 							break;
 /*N*/ 						}
 /*N*/ 					}
@@ -614,9 +620,9 @@ using namespace ::rtl;
             // und jetzt haben wir alle Objecte, die nicht mehr
             // referenziert werden
 /*N*/ 			SvPersist* p = this;
-/*N*/ 			for( n = aInfoList.Count(); n; )
+/*N*/ 			for( n = aInfoList.size(); n; )
 /*N*/ 			{
-/*?*/ 				const String& rName = aInfoList.GetObject( --n ).GetName();
+/*?*/ 				const String& rName = aInfoList[ --n ].GetName();
 /*?*/ 				SvInfoObjectRef aRef( p->Find( rName ) );
 /*?*/ 				if( aRef.Is() )
 /*?*/ 					p->Remove( &aRef );
diff --git a/binfilter/inc/bf_so3/svstor.hxx b/binfilter/inc/bf_so3/svstor.hxx
index 3526d68..826aa20 100644
--- a/binfilter/inc/bf_so3/svstor.hxx
+++ b/binfilter/inc/bf_so3/svstor.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -45,8 +45,6 @@
 #undef SvStorageStreamRef
 #endif
 
-class  SvStorageInfoList;
-
 namespace binfilter {
 
 class SvStorage;
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 9c6da58..9ad5202 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -2031,7 +2031,7 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
                                         sal_uInt32 i;
 
                                         sal_Bool bCopied = sal_True;
-                                        for ( i = 0; i < aList.Count(); i++ )	// copy all entrys
+                                        for ( i = 0; i < aList.size(); i++ )	// copy all entrys
                                         {
                                             const SvStorageInfo& rInfo = aList[ i ];
                                             if ( !xSource->CopyTo( rInfo.GetName(), xMacros, rInfo.GetName() ) )
@@ -2346,7 +2346,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
                     if ( *oStartNumbering != nLastStartNumbering )
                         rOutliner.SetNumberingStartValue( nParaIndex, *oStartNumbering );
                     else
-                        rOutliner.SetNumberingStartValue( nParaIndex, -1 );		
+                        rOutliner.SetNumberingStartValue( nParaIndex, -1 );
                     nLastStartNumbering = *oStartNumbering;
                 }
                 else
@@ -2402,7 +2402,7 @@ sal_Bool SdrPowerPointImport::SeekToContentOfProgTag( sal_Int32 nVersion, SvStre
     DffRecordHeader aProgTagsHd, aProgTagBinaryDataHd;
     rSourceHd.SeekToContent( rSt );
     sal_Bool bFound = rSourceHd.nRecType == PPT_PST_ProgTags;
-    if ( !bFound )	
+    if ( !bFound )
         bFound = SeekToRec( rSt, PPT_PST_ProgTags, rSourceHd.GetRecEndFilePos(), &aProgTagsHd );
     if ( bFound )
     {
@@ -2940,8 +2940,8 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
                         }
                         if ( rSlidePersist.pBObj )
                         {
-                            // #i99386# transfer the attributes from the temporary BackgroundObject 
-                            // to the Page and delete it. Maybe rSlidePersist.bBObjIsTemporary is 
+                            // #i99386# transfer the attributes from the temporary BackgroundObject
+                            // to the Page and delete it. Maybe rSlidePersist.bBObjIsTemporary is
                             // obsolete here, too.
                             pRet->getSdrPageProperties().ClearItem();
                             pRet->getSdrPageProperties().PutItemSet(rSlidePersist.pBObj->GetMergedItemSet());
@@ -4761,7 +4761,7 @@ void StyleTextProp9::Read( SvStream& rIn )
         rIn >> mnBuBlip;
     if ( mnExtParagraphMask & 0x2000000 )
         rIn >> mnHasAnm;
-    if ( mnExtParagraphMask & 0x1000000 )	
+    if ( mnExtParagraphMask & 0x1000000 )
         rIn >> mnAnmScheme;
     if ( mnExtParagraphMask & 0x4000000 )
         rIn >> mpfPP10Ext;
@@ -4782,7 +4782,7 @@ PPTStyleTextPropReader::PPTStyleTextPropReader( SvStream& rIn, SdrPowerPointImpo
 }
 
 void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport& rMan, const DffRecordHeader& rTextHeader,
-                                            const String& aString, PPTTextRulerInterpreter& rRuler, 
+                                            const String& aString, PPTTextRulerInterpreter& rRuler,
                                             sal_uInt32& nCharCount, sal_Bool& bTextPropAtom )
 {
     sal_uInt32  nMask = 0; //TODO: nMask initialized here to suppress warning for now, see corresponding TODO below
@@ -4924,11 +4924,11 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport&
     }
 }
 
-void PPTStyleTextPropReader::ReadCharProps( SvStream& rIn, PPTCharPropSet& aCharPropSet, const String& aString, 
+void PPTStyleTextPropReader::ReadCharProps( SvStream& rIn, PPTCharPropSet& aCharPropSet, const String& aString,
                                             sal_uInt32& nCharCount, sal_uInt32 nCharAnzRead,
-                                            sal_Bool& bTextPropAtom, sal_uInt32 nExtParaPos, 
-                                            const std::vector< StyleTextProp9 >& aStyleTextProp9, 
-                                            sal_uInt32& nExtParaFlags, sal_uInt16& nBuBlip, 
+                                            sal_Bool& bTextPropAtom, sal_uInt32 nExtParaPos,
+                                            const std::vector< StyleTextProp9 >& aStyleTextProp9,
+                                            sal_uInt32& nExtParaFlags, sal_uInt16& nBuBlip,
                                             sal_uInt16& nHasAnm, sal_uInt32& nAnmScheme )
 {
     sal_uInt32  nMask = 0; //TODO: nMask initialized here to suppress warning for now, see corresponding TODO below
@@ -5008,7 +5008,7 @@ void PPTStyleTextPropReader::ReadCharProps( SvStream& rIn, PPTCharPropSet& aChar
         {
             if ( nExtParaNibble && ( ( nExtBuInd + nExtParaNibble ) < aStyleTextProp9.size() ) )
                 nExtBuInd += nExtParaNibble;
-                            
+
             nExtParaFlags = aStyleTextProp9[ nExtBuInd ].mnExtParagraphMask;
             nBuBlip = aStyleTextProp9[ nExtBuInd ].mnBuBlip;
             nHasAnm = aStyleTextProp9[ nExtBuInd ].mnHasAnm;
@@ -5124,10 +5124,10 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con
             sal_uInt32 nExtParaFlags = 0, nAnmScheme = 0;
             sal_uInt16 nBuBlip = 0xffff, nHasAnm = 0;
             ReadCharProps( rIn, aCharPropSet, aString, nCharCount, nCharAnzRead,
-                           bTextPropAtom, nExtParaPos, aStyleTextProp9, nExtParaFlags, 
+                           bTextPropAtom, nExtParaPos, aStyleTextProp9, nExtParaFlags,
                            nBuBlip, nHasAnm, nAnmScheme );
-            
-            aCharPropList.Insert( 
+
+            aCharPropList.Insert(
                 new PPTCharPropSet( aCharPropSet, 0 ), LIST_APPEND );
         }
     }
@@ -5153,7 +5153,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con
             PPTCharPropSet aCharPropSet( nCurrentPara );
             if ( bTextPropAtom )
                 ReadCharProps( rIn, aCharPropSet, aString, nCharCount, nCharAnzRead,
-                               bTextPropAtom, nExtParaPos, aStyleTextProp9, nExtParaFlags, 
+                               bTextPropAtom, nExtParaPos, aStyleTextProp9, nExtParaFlags,
                                nBuBlip, nHasAnm, nAnmScheme );
             else
                 nCharCount = nStringLen;
@@ -6481,11 +6481,11 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
                     mpImplTextObj->mnInstance = nInstance;
 
                     sal_uInt32 nFilePos = rIn.Tell();
-                    if ( rSdrPowerPointImport.SeekToRec2( PPT_PST_TextBytesAtom, 
-                                                          PPT_PST_TextCharsAtom, 
-                                                          aClientTextBoxHd.GetRecEndFilePos() ) 
+                    if ( rSdrPowerPointImport.SeekToRec2( PPT_PST_TextBytesAtom,
+                                                          PPT_PST_TextCharsAtom,
+                                                          aClientTextBoxHd.GetRecEndFilePos() )
                          || rSdrPowerPointImport.SeekToRec( rIn,
-                                                            PPT_PST_StyleTextPropAtom, 
+                                                            PPT_PST_StyleTextPropAtom,
                                                             aClientTextBoxHd.GetRecEndFilePos() ) )
                     {
                         PPTTextRulerInterpreter aTextRulerInterpreter( nTextRulerAtomOfs, rSdrPowerPointImport,
@@ -7144,7 +7144,7 @@ void CreateTableRows( Reference< XTableRows > xTableRows, const std::set< sal_In
     Reference< XIndexAccess > xIndexAccess( xTableRows, UNO_QUERY_THROW );
     for ( sal_Int32 n = 0; n < xIndexAccess->getCount(); n++ )
     {
-        sal_Int32 nHeight; 
+        sal_Int32 nHeight;
         if ( ++aIter != rRows.end() )
         {
             nHeight = *aIter - nLastPosition;
@@ -7170,7 +7170,7 @@ void CreateTableColumns( Reference< XTableColumns > xTableColumns, const std::se
     for ( sal_Int32 n = 0; n < xIndexAccess->getCount(); n++ )
     {
         sal_Int32 nWidth;
-        if ( ++aIter != rColumns.end() ) 
+        if ( ++aIter != rColumns.end() )
         {
             nWidth = *aIter - nLastPosition;
             nLastPosition = *aIter;
@@ -7201,7 +7201,7 @@ void MergeCells( const Reference< XTable >& xTable, sal_Int32 nCol, sal_Int32 nR
    {
        DBG_ASSERT( false, "exception caught!" );
    }
-} 
+}
 
 void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
 {
@@ -7339,7 +7339,7 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
             static const rtl::OUString sTopBorder( String( RTL_CONSTASCII_USTRINGPARAM( "TopBorder" ) ) );
             static const rtl::OUString sBottomBorder( String( RTL_CONSTASCII_USTRINGPARAM( "BottomBorder" ) ) );
             static const rtl::OUString sLeftBorder( String( RTL_CONSTASCII_USTRINGPARAM( "LeftBorder" ) ) );
-            static const rtl::OUString sRightBorder( String( RTL_CONSTASCII_USTRINGPARAM( "RightBorder" ) ) );	
+            static const rtl::OUString sRightBorder( String( RTL_CONSTASCII_USTRINGPARAM( "RightBorder" ) ) );
             static const rtl::OUString	sDiagonalTLBR( RTL_CONSTASCII_USTRINGPARAM ( "DiagonalTLBR" ) );
             static const rtl::OUString	sDiagonalBLTR( RTL_CONSTASCII_USTRINGPARAM ( "DiagonalBLTR" ) );
 
@@ -7350,7 +7350,7 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
             Reference< XCell > xCell( xCellRange->getCellByPosition( nColumn, nRow ) );
             Reference< XPropertySet > xPropSet( xCell, UNO_QUERY_THROW );
 
-            if ( nFlags & LinePositionLeft ) 
+            if ( nFlags & LinePositionLeft )
                 xPropSet->setPropertyValue( sLeftBorder, Any( aBorderLine ) );
             if ( nFlags & LinePositionTop )
                 xPropSet->setPropertyValue( sTopBorder, Any( aBorderLine ) );
@@ -7363,7 +7363,7 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
             if ( nFlags & LinePositionBLTR )
                 xPropSet->setPropertyValue( sDiagonalBLTR, Any( sal_True ) );
             ++aIter;
-        }	
+        }
     }
     catch( Exception& )
     {
@@ -7402,7 +7402,7 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
 
                 CreateTableRows( xColumnRowRange->getRows(), aRows, pGroup->GetSnapRect().Bottom() );
                 CreateTableColumns( xColumnRowRange->getColumns(), aColumns, pGroup->GetSnapRect().Right() );
-                
+
                 sal_Int32 nCellCount = aRows.size() * aColumns.size();
                 sal_Int32 *pMergedCellIndexTable = new sal_Int32[ nCellCount ];
                 for ( sal_Int32 i = 0; i < nCellCount; i++ )
@@ -7438,7 +7438,7 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
                                     }
                                 }
                             }
-        
+
                             // applying text
                             OutlinerParaObject* pParaObject = pObj->GetOutlinerParaObject();
                             if ( pParaObject )
@@ -7458,21 +7458,21 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
                     {
                         std::vector< sal_Int32 > vPositions;	// containing cell indexes + cell position
                         GetLinePositions( pObj, aRows, aColumns, vPositions, pGroup->GetSnapRect() );
-                        
+
                         // correcting merged cell position
                         std::vector< sal_Int32 >::iterator aIter( vPositions.begin() );
                         while( aIter != vPositions.end() )
                         {
                             sal_Int32 nOldPosition = *aIter & 0xffff;
-                            sal_Int32 nOldFlags = *aIter & 0xffff0000;					
+                            sal_Int32 nOldFlags = *aIter & 0xffff0000;
                             sal_Int32 nNewPosition = pMergedCellIndexTable[ nOldPosition ] | nOldFlags;
-                            *aIter++ = nNewPosition; 
+                            *aIter++ = nNewPosition;
                         }
                         ApplyCellLineAttributes( pObj, xTable, vPositions, aColumns.size() );
                     }
                 }
                 delete[] pMergedCellIndexTable;
-                
+
                 // we are replacing the whole group object by a single table object, so
                 // possibly connections to the group object have to be removed.
                 if ( pSolverContainer )
diff --git a/filter/source/msfilter/svxmsbas.cxx b/filter/source/msfilter/svxmsbas.cxx
index 5423045..412356f 100644
--- a/filter/source/msfilter/svxmsbas.cxx
+++ b/filter/source/msfilter/svxmsbas.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -63,7 +63,7 @@ using namespace com::sun::star;
 
 using rtl::OUString;
 
-static ::rtl::OUString sVBAOption( RTL_CONSTASCII_USTRINGPARAM( "Option VBASupport 1\n" ) ); 
+static ::rtl::OUString sVBAOption( RTL_CONSTASCII_USTRINGPARAM( "Option VBASupport 1\n" ) );
 
 void SvxImportMSVBasic::extractAttribute( const String& rAttribute, const String& rModName )
 {
@@ -75,11 +75,11 @@ void SvxImportMSVBasic::extractAttribute( const String& rAttribute, const String
     if ( rAttribute.Search( sControlAttribute ) !=  STRING_NOTFOUND )
     {
         String sRest = rAttribute.Copy( sControlAttribute.Len() );
-        xub_StrLen nPos = 0; 
+        xub_StrLen nPos = 0;
         String sCntrlName = sRest.GetToken( 0, ',', nPos );
-        
+
         sal_Int32 nCntrlId = sRest.GetToken( 0, ',', nPos).ToInt32();
-        OSL_TRACE("In module %s, assiging %d controlname %s", 
+        OSL_TRACE("In module %s, assiging %d controlname %s",
             rtl::OUStringToOString( rModName, RTL_TEXTENCODING_UTF8 ).getStr(), nCntrlId,
             rtl::OUStringToOString( sCntrlName, RTL_TEXTENCODING_UTF8 ).getStr() );
         m_ModuleNameToObjIdHash[ rModName ][ nCntrlId ] =  sCntrlName;
@@ -100,7 +100,7 @@ int SvxImportMSVBasic::Import( const String& rStorageName,
 {
         msProjectName = rtl::OUString();
     int nRet = 0;
-    if( bImport && ImportCode_Impl( rStorageName, rSubStorageName, codeNames, 
+    if( bImport && ImportCode_Impl( rStorageName, rSubStorageName, codeNames,
                                     bAsComment, bStripped ))
         nRet |= 1;
 
@@ -118,11 +118,11 @@ bool SvxImportMSVBasic::ImportForms_Impl(const String& rStorageName,
 {
     bool bRet = false;
     // #FIXME VBA_Impl ( or some other new class ) should handle both userforms
-    // and code 
+    // and code
     VBA_Impl aVBA( *xRoot, sal_True );
     // This call is a waste we read the source ( again ) only to get the refereneces
     // *AGAIN*, we really need to rewrite all of this
-    aVBA.Open( rStorageName, rSubStorageName ); 
+    aVBA.Open( rStorageName, rSubStorageName );
 
     bRet = ImportForms_Impl( aVBA, rStorageName, rSubStorageName, bVBAMode );
     std::vector<rtl::OUString> sProjectRefs = aVBA.ProjectReferences();
@@ -130,7 +130,7 @@ bool SvxImportMSVBasic::ImportForms_Impl(const String& rStorageName,
     for ( std::vector<rtl::OUString>::iterator it = sProjectRefs.begin(); it != sProjectRefs.end(); ++it )
     {
        rtl::OUString sFileName = *it;
-#ifndef WIN 
+#ifndef WIN
 #ifdef DEBUG
        // hacky test code to read referenced projects on linux
        sal_Int32 nPos = (*it).lastIndexOf('\\');
@@ -139,7 +139,7 @@ bool SvxImportMSVBasic::ImportForms_Impl(const String& rStorageName,
 #endif
 #endif
        SotStorageRef rRoot = new SotStorage( sFileName, STREAM_STD_READWRITE, STORAGE_TRANSACTED );
-       VBA_Impl refVBA( *rRoot, sal_True );        
+       VBA_Impl refVBA( *rRoot, sal_True );
        refVBA.Open( rStorageName, rSubStorageName );
        // The return from ImportForms doesn't indicate and error ( it could )
        // but also it just means no userforms were imported
@@ -159,9 +159,9 @@ bool SvxImportMSVBasic::ImportForms_Impl( VBA_Impl& rVBA, const String& rStorage
     std::vector<String> aUserForms;
     SvStorageInfoList aContents;
     xVBAStg->FillInfoList(&aContents);
-    for (sal_uInt16 nI = 0; nI < aContents.Count(); ++nI)
+    for (sal_uInt16 nI = 0; nI < aContents.size(); ++nI)
     {
-          SvStorageInfo& rInfo = aContents.GetObject(nI);
+          SvStorageInfo& rInfo = aContents[ nI ];
           if (!rInfo.IsStream() && rInfo.GetName() != rSubStorageName)
               aUserForms.push_back(rInfo.GetName());
     }
@@ -303,7 +303,7 @@ sal_Bool SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
 {
     sal_Bool bRet = sal_False;
     VBA_Impl aVBA( *xRoot, bAsComment );
-        
+
     if( aVBA.Open(rStorageName,rSubStorageName) )
     {
         msProjectName = aVBA.ProjectName();
@@ -313,7 +313,7 @@ sal_Bool SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
 
         bRet = ImportCode_Impl( aVBA, codeNames, bAsComment, bStripped );
         std::vector<rtl::OUString> sProjectRefs = aVBA.ProjectReferences();
-    
+
         for ( std::vector<rtl::OUString>::iterator it = sProjectRefs.begin(); it != sProjectRefs.end(); ++it )
         {
             rtl::OUString sFileName = *it;
@@ -333,7 +333,7 @@ sal_Bool SvxImportMSVBasic::ImportCode_Impl( VBA_Impl& aVBA, const std::vector<
     sal_Bool bRet = sal_False;
         Reference<XLibraryContainer> xLibContainer = rDocSh.GetBasicContainer();
         DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" );
-        
+
         /*  Set library container to VBA compatibility mode. This will create
             the VBA Globals object and store it in the Basic manager of the
             document. */
@@ -447,7 +447,7 @@ sal_Bool SvxImportMSVBasic::ImportCode_Impl( VBA_Impl& aVBA, const std::vector<
                         DBG_ERRORFILE( "SvxImportMSVBasic::ImportCode_Impl - unknown module type" );
                         break;
                 }
-                static ::rtl::OUString sClassOption( RTL_CONSTASCII_USTRINGPARAM( "Option ClassModule\n" ) ); 
+                static ::rtl::OUString sClassOption( RTL_CONSTASCII_USTRINGPARAM( "Option ClassModule\n" ) );
                 if ( !bAsComment )
                 {
                     modeTypeComment += sVBAOption;
@@ -561,7 +561,7 @@ sal_Bool SvxImportMSVBasic::ImportCode_Impl( VBA_Impl& aVBA, const std::vector<
                         {
                             try
                             {
-                                sModuleInfo.ModuleObject.set( xVBACodeNamedObjectAccess->getByName( it->first ), uno::UNO_QUERY );    
+                                sModuleInfo.ModuleObject.set( xVBACodeNamedObjectAccess->getByName( it->first ), uno::UNO_QUERY );
                                 OSL_TRACE("** Straight up creation of Module");
                             }
                             catch(uno::Exception& e)
@@ -572,7 +572,7 @@ sal_Bool SvxImportMSVBasic::ImportCode_Impl( VBA_Impl& aVBA, const std::vector<
                     }
                     xVBAModuleInfo->insertModuleInfo( it->first, sModuleInfo );
                 }
-                     
+
                 if( xLib->hasByName( it->first ) )
                     xLib->replaceByName( it->first, it->second );
                 else


More information about the Libreoffice-commits mailing list