[Libreoffice-commits] .: 2 commits - cui/inc cui/source
Joseph Powers
jpowers at kemper.freedesktop.org
Sat Feb 12 11:17:52 PST 2011
cui/inc/pch/precompiled_cui.hxx | 3 --
cui/source/dialogs/cuigaldlg.cxx | 43 +++++++++++++++++++--------------------
cui/source/inc/cuigaldlg.hxx | 6 +++--
3 files changed, 26 insertions(+), 26 deletions(-)
New commits:
commit f6651c5ae34c9580ea167e31ae2f3f2f60ae7b6d
Author: Joseph Powers <jpowers27 at cox.net>
Date: Sat Feb 12 10:36:08 2011 -0800
Remove #include "bootstrp/sstring.hxx"
This file is no longer needed outside of tools.
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx
index b2cf013..da8c76e 100644
--- a/cui/inc/pch/precompiled_cui.hxx
+++ b/cui/inc/pch/precompiled_cui.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
@@ -55,7 +55,6 @@
#include "boost/scoped_ptr.hpp"
#include "boost/shared_ptr.hpp"
#include "boost/spirit/core.hpp"
-#include "bootstrp/sstring.hxx"
#include "com/sun/star/accessibility/AccessibleEventId.hpp"
#include "com/sun/star/accessibility/AccessibleEventObject.hpp"
#include "com/sun/star/accessibility/AccessibleRelationType.hpp"
commit 9d4ca81e87fe482dd8de439db4f2b501ae514065
Author: Joseph Powers <jpowers27 at cox.net>
Date: Sat Feb 12 09:13:46 2011 -0800
Remove DECLARE_LIST( UniStringList, UniString* )
I converted the DECLARE_LIST() into a vector<> and moved it to the .hxx
file. This also means I no longer have to reference /bootstrp/sstring.hxx.
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 22ec078..f006609 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.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
@@ -194,12 +194,12 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL,
{
SolarMutexGuard aGuard;
- mpBrowser->aFoundList.Insert(
- new String( aFoundURL.GetMainURL( INetURLObject::NO_DECODE ) ),
- LIST_APPEND );
+ mpBrowser->aFoundList.push_back(
+ new String( aFoundURL.GetMainURL( INetURLObject::NO_DECODE ) )
+ );
mpBrowser->aLbxFound.InsertEntry(
GetReducedString( aFoundURL, 50 ),
- (USHORT) mpBrowser->aFoundList.Count() - 1 );
+ (USHORT) mpBrowser->aFoundList.size() - 1 );
}
}
}
@@ -315,9 +315,9 @@ void SAL_CALL TakeThread::run()
{
// kompletten Filenamen aus FoundList holen
if( mpBrowser->bTakeAll )
- aURL = INetURLObject(*mpBrowser->aFoundList.GetObject( nPos = i ));
+ aURL = INetURLObject( *mpBrowser->aFoundList[ nPos = i ] );
else
- aURL = INetURLObject(*mpBrowser->aFoundList.GetObject( nPos = mpBrowser->aLbxFound.GetSelectEntryPos( i ) ));
+ aURL = INetURLObject(*mpBrowser->aFoundList[ nPos = mpBrowser->aLbxFound.GetSelectEntryPos( i ) ]);
// Position in Taken-Liste uebernehmen
mrTakenList.Insert( (void*) (ULONG)nPos, LIST_APPEND );
@@ -384,7 +384,7 @@ IMPL_LINK( TakeProgress, ClickCancelBtn, void*, EMPTYARG )
IMPL_LINK( TakeProgress, CleanUpHdl, void*, EMPTYARG )
{
TPGalleryThemeProperties* mpBrowser = (TPGalleryThemeProperties*) GetParent();
- ::std::vector<bool, std::allocator<bool> > aRemoveEntries( mpBrowser->aFoundList.Count(), false );
+ ::std::vector<bool, std::allocator<bool> > aRemoveEntries( mpBrowser->aFoundList.size(), false );
::std::vector< String > aRemainingVector;
sal_uInt32 i, nCount;
@@ -401,15 +401,14 @@ IMPL_LINK( TakeProgress, CleanUpHdl, void*, EMPTYARG )
// refill found list
for( i = 0, nCount = aRemoveEntries.size(); i < nCount; ++i )
if( !aRemoveEntries[ i ] )
- aRemainingVector.push_back( *mpBrowser->aFoundList.GetObject( i ) );
-
- for( String* pStr = mpBrowser->aFoundList.First(); pStr; pStr = mpBrowser->aFoundList.Next() )
- delete pStr;
+ aRemainingVector.push_back( *mpBrowser->aFoundList[ i ] );
- mpBrowser->aFoundList.Clear();
+ for ( i = 0, nCount = mpBrowser->aFoundList.size(); i < nCount; ++i )
+ delete mpBrowser->aFoundList[ i ];
+ mpBrowser->aFoundList.clear();
for( i = 0, nCount = aRemainingVector.size(); i < nCount; ++i )
- mpBrowser->aFoundList.Insert( new String( aRemainingVector[ i ] ), LIST_APPEND );
+ mpBrowser->aFoundList.push_back( new String( aRemainingVector[ i ] ) );
aRemainingVector.clear();
@@ -818,8 +817,8 @@ TPGalleryThemeProperties::~TPGalleryThemeProperties()
xMediaPlayer.clear();
xDialogListener.clear();
- for( String* pStr = aFoundList.First(); pStr; pStr = aFoundList.Next() )
- delete pStr;
+ for ( size_t i = 0, n = aFoundList.size(); i < n; ++i )
+ delete aFoundList[ i ];
for( void* pEntry = aFilterEntryList.First(); pEntry; pEntry = aFilterEntryList.Next() )
delete (FilterEntry*) pEntry;
@@ -997,10 +996,10 @@ void TPGalleryThemeProperties::SearchFiles()
{
SearchProgress* pProgress = new SearchProgress( this, aURL );
- for( String* pStr = aFoundList.First(); pStr; pStr = aFoundList.Next() )
- delete pStr;
+ for ( size_t i = 0, n = aFoundList.size(); i < n; ++i )
+ delete aFoundList[ i ];
+ aFoundList.clear();
- aFoundList.Clear();
aLbxFound.Clear();
pProgress->SetFileType( aCbbFileType.GetText() );
@@ -1115,7 +1114,7 @@ void TPGalleryThemeProperties::DoPreview()
if( aString != aPreviewString )
{
- INetURLObject _aURL( *aFoundList.GetObject( aLbxFound.GetEntryPos( aString ) ) );
+ INetURLObject _aURL( *aFoundList[ aLbxFound.GetEntryPos( aString ) ] );
bInputAllowed = FALSE;
if ( !aWndPreview.SetGraphic( _aURL ) )
@@ -1197,7 +1196,7 @@ IMPL_LINK( TPGalleryThemeProperties, SelectFoundHdl, void *, EMPTYARG )
else
aCbxPreview.Disable();
- if( aFoundList.Count() )
+ if( aFoundList.size() )
aBtnTakeAll.Enable();
else
aBtnTakeAll.Disable();
@@ -1238,7 +1237,7 @@ IMPL_LINK( TPGalleryThemeProperties, PreviewTimerHdl, void *, EMPTYARG )
IMPL_LINK( TPGalleryThemeProperties, EndSearchProgressHdl, SearchProgress *, EMPTYARG )
{
- if( aFoundList.Count() )
+ if( aFoundList.size() )
{
aLbxFound.SelectEntryPos( 0 );
aBtnTakeAll.Enable();
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 6a418c0..4151ce8 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.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
@@ -47,7 +47,7 @@
#include <com/sun/star/media/XPlayer.hpp>
#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
#include <svtools/dialogclosedlistener.hxx>
-#include <bootstrp/sstring.hxx>
+#include <vector>
// ------------
// - Forwards -
@@ -59,6 +59,8 @@ class SearchProgress;
class TakeProgress;
class TPGalleryThemeProperties;
+typedef ::std::vector< UniString* > StringList;
+
// ---------------
// - FilterEntry -
// ---------------
More information about the Libreoffice-commits
mailing list