summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-01-01 10:53:48 -0800
committerJoseph Powers <jpowers27@cox.net>2011-01-01 10:53:48 -0800
commitbbf42a4b013d2fa6c1814e681d07b75cc537df1b (patch)
tree1b3027139b4a7089b01ca713ed136753f1c1f485 /svx
parentadc8970cc7fbcf8362c98f062ac1cce7f21707e4 (diff)
Remove DECLARE_LIST( TargetList, String* )
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/imapdlg.hxx3
-rw-r--r--svx/inc/svx/svxdlg.hxx12
-rw-r--r--svx/source/dialog/hyprlink.cxx14
-rw-r--r--svx/source/dialog/imapdlg.cxx21
-rw-r--r--svx/source/dialog/imapwnd.cxx21
5 files changed, 35 insertions, 36 deletions
diff --git a/svx/inc/imapdlg.hxx b/svx/inc/imapdlg.hxx
index ccd77d8ba1..05e30ee342 100644
--- a/svx/inc/imapdlg.hxx
+++ b/svx/inc/imapdlg.hxx
@@ -45,6 +45,7 @@
#include <vcl/status.hxx>
#include "svx/svxdllapi.h"
+#include <vector>
#ifndef _GOMISC_HXX
@@ -59,7 +60,7 @@ class ImageMap;
\************************************************************************/
class Graphic;
-class TargetList;
+typedef ::std::vector< String* > TargetList;
class SVX_DLLPUBLIC SvxIMapDlgChildWindow : public SfxChildWindow
{
diff --git a/svx/inc/svx/svxdlg.hxx b/svx/inc/svx/svxdlg.hxx
index 0114e78301..2024e4e46c 100644
--- a/svx/inc/svx/svxdlg.hxx
+++ b/svx/inc/svx/svxdlg.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
@@ -40,6 +40,7 @@ class SdrView;
#include <com/sun/star/container/XIndexContainer.hpp> //add for FmShowColsDialog
#include <com/sun/star/container/XNameReplace.hpp> //add for SvxMacroAssignDlg
#include "svx/svxdllapi.h"
+#include <vector>
namespace com{namespace sun{namespace star{
namespace linguistic2{
@@ -56,7 +57,6 @@ typedef USHORT* (*DialogGetRanges)();
struct ExchangeData;
class INetURLObject;
class GalleryTheme;
-class TargetList;
class SvxHyperlinkTabPageBase;
class SearchAttrItemList;
class FmFormShell;
@@ -64,6 +64,8 @@ class Graphic;
class SdrObject;
class SvxSpellWrapper;
+typedef ::std::vector< String* > TargetList;
+
namespace svx{ class SpellDialogChildWindow;}
#define EMPTY_FRAME_REF com::sun::star::uno::Reference < com::sun::star::frame::XFrame >()
@@ -355,7 +357,7 @@ public:
SvxDistributeVertical eVer = SvxDistributeVerticalNone)= 0;
virtual AbstractFmShowColsDialog * CreateFmShowColsDialog( Window* pParent ) = 0;
-
+
virtual AbstractSvxZoomDialog * CreateSvxZoomDialog( Window* pParent, //add for SvxZoomDialog
const SfxItemSet& rCoreSet )=0;
@@ -487,7 +489,7 @@ public:
virtual VclAbstractDialog* CreateScriptErrorDialog(
Window* pParent, com::sun::star::uno::Any aException) = 0;
- virtual VclAbstractDialog* CreateSvxMacroAssignDlg(
+ virtual VclAbstractDialog* CreateSvxMacroAssignDlg(
Window* _pParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxDocumentFrame,
const bool _bUnoDialogMode,
@@ -500,7 +502,7 @@ public:
virtual SvxAbstractSplittTableDialog* CreateSvxSplittTableDialog( Window* pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal )=0;
virtual SvxAbstractNewTableDialog* CreateSvxNewTableDialog( Window* pParent ) = 0;
-
+
virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId ) = 0;
};
diff --git a/svx/source/dialog/hyprlink.cxx b/svx/source/dialog/hyprlink.cxx
index 8fc0b57aed..76dd98cf78 100644
--- a/svx/source/dialog/hyprlink.cxx
+++ b/svx/source/dialog/hyprlink.cxx
@@ -460,9 +460,9 @@ void SvxHyperlinkDlg::TargetMenu(const String& rSelEntry, BOOL bExecute)
TargetList aList;
pVwFrm->GetTopFrame().GetTargetList(aList);
- USHORT nCount = (USHORT)aList.Count();
- if( nCount )
+ if ( !aList.empty() )
{
+ size_t nCount = aList.size();
BOOL bChecked = FALSE;
if (pTargetMenu != NULL)
@@ -471,10 +471,10 @@ void SvxHyperlinkDlg::TargetMenu(const String& rSelEntry, BOOL bExecute)
pTargetMenu = new PopupMenu;
pTargetMenu->SetMenuFlags( pTargetMenu->GetMenuFlags() |
MENU_FLAG_NOAUTOMNEMONICS );
- USHORT i;
- for ( i = 0; i < nCount; i++ )
+
+ for ( size_t i = 0; i < nCount; i++ )
{
- String sEntry(*aList.GetObject(i));
+ String sEntry( *aList[ i ] );
pTargetMenu->InsertItem(i + 1, sEntry, MIB_RADIOCHECK|MIB_AUTOCHECK);
if (sEntry == rSelEntry)
@@ -483,8 +483,8 @@ void SvxHyperlinkDlg::TargetMenu(const String& rSelEntry, BOOL bExecute)
bChecked = TRUE;
}
}
- for ( i = nCount; i; i-- )
- delete aList.GetObject( i - 1 );
+ for ( size_t i = nCount; i; )
+ delete aList[ --i ];
if (!bChecked)
pTargetMenu->CheckItem(1);
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index ead58ff7c5..25d12c70c0 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -403,8 +403,8 @@ void SvxIMapDlg::SetTargetList( const TargetList& rTargetList )
maCbbTarget.Clear();
- for( String* pStr = aNewList.First(); pStr; pStr = aNewList.Next() )
- maCbbTarget.InsertEntry( *pStr );
+ for ( size_t i = 0, n = aNewList.size(); i < n; ++i )
+ maCbbTarget.InsertEntry( *aNewList[ i ] );
}
@@ -441,9 +441,9 @@ void SvxIMapDlg::Update( const Graphic& rGraphic, const ImageMap* pImageMap,
// UpdateTargetList loeschen, da diese Methode
// vor dem Zuschlagen des Update-Timers noch
// mehrmals gerufen werden kann( #46540 )
- for( String* pStr = pOwnData->aUpdateTargetList.First(); pStr; pStr = pOwnData->aUpdateTargetList.Next() )
- delete pStr;
- pOwnData->aUpdateTargetList.Clear();
+ for ( size_t i = 0, n = pOwnData->aUpdateTargetList.size(); i < n; ++i )
+ delete pOwnData->aUpdateTargetList[ i ];
+ pOwnData->aUpdateTargetList.clear();
// TargetListe muss kopiert werden, da sie im
// Besitz des Aufrufers ist und von ihm nach diesem
@@ -453,8 +453,8 @@ void SvxIMapDlg::Update( const Graphic& rGraphic, const ImageMap* pImageMap,
{
TargetList aTargetList( *pTargetList );
- for( String* pStr = aTargetList.First(); pStr; pStr = aTargetList.Next() )
- pOwnData->aUpdateTargetList.Insert( new String( *pStr ) );
+ for ( size_t i = 0, n = aTargetList.size(); i < n; ++i )
+ pOwnData->aUpdateTargetList.push_back( new String( *aTargetList[ i ] ) );
}
pOwnData->aTimer.Start();
@@ -948,10 +948,9 @@ IMPL_LINK( SvxIMapDlg, UpdateHdl, Timer*, EMPTYARG )
}
// die in der Update-Methode kopierte Liste wieder loeschen
- for( String* pStr = pOwnData->aUpdateTargetList.First(); pStr; pStr = pOwnData->aUpdateTargetList.Next() )
- delete pStr;
-
- pOwnData->aUpdateTargetList.Clear();
+ for ( size_t i = 0, n = pOwnData->aUpdateTargetList.size(); i < n; ++i )
+ delete pOwnData->aUpdateTargetList[ i ];
+ pOwnData->aUpdateTargetList.clear();
GetBindings().Invalidate( SID_IMAP_EXEC );
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 5e417a61b6..37e086797c 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.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
@@ -96,8 +96,8 @@ IMapWindow::IMapWindow( Window* pParent, const ResId& rResId, const Reference< X
IMapWindow::~IMapWindow()
{
// Liste loeschen
- for( String* pStr = aTargetList.First(); pStr; pStr = aTargetList.Next() )
- delete pStr;
+ for ( size_t i = 0, n = aTargetList.size(); i < n; ++i )
+ delete aTargetList[ i ];
SfxItemPool::Free(pIMapPool);
delete[] pItemInfo;
@@ -219,17 +219,14 @@ const ImageMap& IMapWindow::GetImageMap()
void IMapWindow::SetTargetList( TargetList& rTargetList )
{
- String* pStr;
-
// alte Liste loeschen
- for( pStr = aTargetList.First(); pStr; pStr = aTargetList.Next() )
- delete pStr;
-
- aTargetList.Clear();
+ for( size_t i = 0, n = aTargetList.size(); i < n; ++i )
+ delete aTargetList[ i ];
+ aTargetList.clear();
// mit uebergebener Liste fuellen
- for( pStr = rTargetList.First(); pStr; pStr = rTargetList.Next() )
- aTargetList.Insert( new String( *pStr ) );
+ for( size_t i = 0, n = rTargetList.size(); i < n; ++i )
+ aTargetList.push_back( new String( *rTargetList[ i ] ) );
pModel->SetChanged( sal_False );
}
@@ -823,7 +820,7 @@ void IMapWindow::DoMacroAssign()
aNamesItem.AddEvent( String::CreateFromAscii( "MouseOver" ), String(), SFX_EVENT_MOUSEOVER_OBJECT );
aNamesItem.AddEvent( String::CreateFromAscii( "MouseOut" ), String(), SFX_EVENT_MOUSEOUT_OBJECT );
aSet.Put( aNamesItem );
-
+
SvxMacroItem aMacroItem(SID_ATTR_MACROITEM);
IMapObject* pIMapObj = GetIMapObj( pSdrObj );
aMacroItem.SetMacroTable( pIMapObj->GetMacroTable() );