[Libreoffice-commits] .: sfx2/source

Joseph Powers jpowers at kemper.freedesktop.org
Wed May 18 19:16:05 PDT 2011


 sfx2/source/doc/plugin.cxx |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

New commits:
commit 7dd30968f0d89382198b70a58a3e8d1c1cc5fc98
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Wed May 18 18:55:12 2011 -0700

    Convert SvCommandList from an OwnList to a vector<>

diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index 6991aab..475aab6 100644
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.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
@@ -99,9 +99,9 @@ void SAL_CALL PluginObject::initialize( const uno::Sequence< uno::Any >& aArgume
         aArguments[0] >>= mxObj;
 }
 
-sal_Bool SAL_CALL PluginObject::load( 
+sal_Bool SAL_CALL PluginObject::load(
     const uno::Sequence < com::sun::star::beans::PropertyValue >& /*lDescriptor*/,
-    const uno::Reference < frame::XFrame >& xFrame ) 
+    const uno::Reference < frame::XFrame >& xFrame )
 throw( uno::RuntimeException )
 {
     uno::Reference< plugin::XPluginManager > xPMgr( mxFact->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.plugin.PluginManager")) ), uno::UNO_QUERY );
@@ -116,14 +116,13 @@ throw( uno::RuntimeException )
         pWin->SetBackground();
         pWin->Show();
 
-        sal_uIntPtr nCount = maCmdList.Count();
+        size_t nCount = maCmdList.size();
         uno::Sequence < ::rtl::OUString > aCmds( nCount ), aArgs( nCount );
         ::rtl::OUString *pCmds = aCmds.getArray(), *pArgs = aArgs.getArray();
-        for( sal_uIntPtr i = 0; i < nCount; i++ )
+        for( size_t i = 0; i < nCount; i++ )
         {
-            SvCommand & rCmd = maCmdList.GetObject( i );
-            pCmds[i] = rCmd.GetCommand();
-            pArgs[i] = rCmd.GetArgument();
+            pCmds[i] = maCmdList[ i ].GetCommand();
+            pArgs[i] = maCmdList[ i ].GetArgument();
         }
 
         mxPlugin = xPMgr->createPluginFromURL(
@@ -216,7 +215,7 @@ void SAL_CALL PluginObject::setPropertyValue(const ::rtl::OUString& aPropertyNam
     }
     else if ( aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PluginCommands")) )
     {
-        maCmdList.Clear();
+        maCmdList.clear();
         uno::Sequence < beans::PropertyValue > aCommandSequence;
         if( aAny >>= aCommandSequence )
             maCmdList.FillFromSequence( aCommandSequence );


More information about the Libreoffice-commits mailing list