[Libreoffice-commits] .: sfx2/inc sfx2/source
Joseph Powers
jpowers at kemper.freedesktop.org
Fri Dec 31 07:22:50 PST 2010
sfx2/inc/about.hxx | 5 +++--
sfx2/source/dialog/about.cxx | 25 +++++++++++--------------
2 files changed, 14 insertions(+), 16 deletions(-)
New commits:
commit 513b892490198039a5069d14c603c1c83257f2d8
Author: Joseph Powers <jpowers27 at cox.net>
Date: Fri Dec 31 07:22:44 2010 -0800
Remove DECLARE_LIST( AccelList, Accelerator* )
diff --git a/sfx2/inc/about.hxx b/sfx2/inc/about.hxx
index 56e71f0..25586cb 100644
--- a/sfx2/inc/about.hxx
+++ b/sfx2/inc/about.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
@@ -38,8 +38,9 @@
#include <svtools/stdctrl.hxx>
#include "svtools/fixedhyper.hxx"
#include <sfx2/basedlgs.hxx> // SfxModalDialog
+#include <vector>
-DECLARE_LIST( AccelList, Accelerator* )
+typedef ::std::vector< Accelerator* > AccelList;
// class AboutDialog -----------------------------------------------------
diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx
index d386b49..4055bce 100644
--- a/sfx2/source/dialog/about.cxx
+++ b/sfx2/source/dialog/about.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
@@ -129,7 +129,7 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
{
pPrevAccel = pAccel;
pAccel = new Accelerator;
- aAccelList.Insert( pAccel, LIST_APPEND );
+ aAccelList.push_back( pAccel );
USHORT nKey = aAccelStr.GetChar(i) - 'A' + KEY_A;
pAccel->InsertItem( 1, KeyCode( nKey, KEY_MOD1 ) );
if ( i > 0 )
@@ -190,13 +190,13 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
aVTCopyPnt.X() = ( aOutSiz.Width() - aVTCopySize.Width() ) / 2;
aVTCopyPnt.Y() = nY;
aVersionText.SetPosSizePixel( aVTCopyPnt, aVTCopySize );
-
+
nY += nCtrlMargin;
-
+
// OK-Button-Position (at the bottom and centered)
Size aOKSiz = aOKButton.GetSizePixel();
Point aOKPnt = aOKButton.GetPosPixel();
-
+
// FixedHyperlink with more info link
Point aLinkPnt = aInfoLink.GetPosPixel();
Size aLinkSize = aInfoLink.GetSizePixel();
@@ -238,16 +238,13 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
AboutDialog::~AboutDialog()
{
// L"oschen des Entwickleraufrufs
- if ( aAccelList.Count() )
+ if ( !aAccelList.empty() )
{
- GetpApp()->RemoveAccel( aAccelList.First() );
- Accelerator* pAccel = aAccelList.Last();
+ GetpApp()->RemoveAccel( aAccelList.front() );
- while ( pAccel )
- {
- delete pAccel;
- pAccel = aAccelList.Prev();
- }
+ for ( size_t i = 0, n = aAccelList.size(); i < n; ++i )
+ delete aAccelList[ i ];
+ aAccelList.clear();
}
}
@@ -295,7 +292,7 @@ IMPL_LINK( AboutDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
if ( ! sURL.getLength() ) // Nothing to do, when the URL is empty
return 1;
- try
+ try
{
uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
::comphelper::getProcessServiceFactory()->createInstance(
More information about the Libreoffice-commits
mailing list