[Libreoffice-commits] .: sw/source
Joseph Powers
jpowers at kemper.freedesktop.org
Fri Dec 31 13:00:51 PST 2010
sw/source/ui/utlui/glbltree.cxx | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
New commits:
commit 6c844dfb82ef15f334acb469289a44f1819f5d73
Author: Joseph Powers <jpowers27 at cox.net>
Date: Fri Dec 31 12:57:40 2010 -0800
Remove DECLARE_LIST( SfxMediumList, SfxMedium* )
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index 609dda1..143b86e 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.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
@@ -1380,18 +1380,17 @@ IMPL_LINK( SwGlobalTree, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
SfxMediumList* pMedList = pDocInserter->CreateMediumList();
if ( pMedList )
{
- Sequence< OUString >aFileNames( pMedList->Count() );
+ Sequence< OUString >aFileNames( pMedList->size() );
OUString* pFileNames = aFileNames.getArray();
- SfxMedium* pMed = pMedList->First();
sal_Int32 nPos = 0;
- while ( pMed )
+ for ( size_t i = 0, n = pMedList->size(); i < n; ++i )
{
+ SfxMedium* pMed = pMedList->at( i );
String sFileName = pMed->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
sFileName += sfx2::cTokenSeperator;
sFileName += pMed->GetFilter()->GetFilterName();
sFileName += sfx2::cTokenSeperator;
pFileNames[nPos++] = sFileName;
- pMed = pMedList->Next();
}
delete pMedList;
InsertRegion( pDocContent, aFileNames );
More information about the Libreoffice-commits
mailing list