ooo-build r13112 - in trunk: . patches/vba
- From: jiaojh svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13112 - in trunk: . patches/vba
- Date: Tue, 8 Jul 2008 02:47:44 +0000 (UTC)
Author: jiaojh
Date: Tue Jul 8 02:47:44 2008
New Revision: 13112
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13112&view=rev
Log:
* patches/vba/vba-listbox-removeitem.diff:
upate the code easy to understand.
Modified:
trunk/ChangeLog
trunk/patches/vba/vba-listbox-removeitem.diff
Modified: trunk/patches/vba/vba-listbox-removeitem.diff
==============================================================================
--- trunk/patches/vba/vba-listbox-removeitem.diff (original)
+++ trunk/patches/vba/vba-listbox-removeitem.diff Tue Jul 8 02:47:44 2008
@@ -1,5 +1,5 @@
--- oovbaapi/org/openoffice/msforms/XListBox.idl.bak 2008-07-03 05:58:56.000000000 +0800
-+++ oovbaapi/org/openoffice/msforms/XListBox.idl 2008-07-03 01:02:40.000000000 +0800
++++ oovbaapi/org/openoffice/msforms/XListBox.idl 2008-07-08 10:43:12.000000000 +0800
@@ -47,6 +47,7 @@ interface XListBox: com::sun::star::uno:
[attribute] any ListIndex;
//[attribute] sequence< boolean > Selected;
@@ -9,7 +9,7 @@
any Selected( [in] long index );
};
--- sc/source/ui/vba/vbalistbox.hxx.bak 2008-07-03 01:08:08.000000000 +0800
-+++ sc/source/ui/vba/vbalistbox.hxx 2008-07-03 01:08:50.000000000 +0800
++++ sc/source/ui/vba/vbalistbox.hxx 2008-07-08 10:43:12.000000000 +0800
@@ -64,6 +64,7 @@ public:
// Methods
@@ -19,8 +19,8 @@
--- sc/source/ui/vba/vbalistbox.cxx.bak 2008-07-03 01:09:10.000000000 +0800
-+++ sc/source/ui/vba/vbalistbox.cxx 2008-07-03 04:32:19.000000000 +0800
-@@ -214,6 +214,55 @@ ScVbaListBox::AddItem( const uno::Any& p
++++ sc/source/ui/vba/vbalistbox.cxx 2008-07-08 10:43:12.000000000 +0800
+@@ -214,6 +214,35 @@ ScVbaListBox::AddItem( const uno::Any& p
}
void SAL_CALL
@@ -41,34 +41,14 @@
+ Clear();
+ return;
+ }
-+ // just copy those elements above the one to be inserted
-+ std::vector< rtl::OUString > sVec;
-+ // reserve just the amount we need to copy
-+ sVec.reserve( sList.getLength() - nIndex );
-+
-+ // point at first element to copy
-+ rtl::OUString* pString = sList.getArray() + nIndex + 1;
-+ const rtl::OUString* pEndString = sList.getArray() + sList.getLength();
-+ // copy elements
-+ for ( ; pString != pEndString; ++pString )
-+ {
-+ sVec.push_back( *pString );
-+ }
-+
-+ // point at first element to be overwritten
-+ pString = sList.getArray() + nIndex;
-+ std::vector< rtl::OUString >::iterator it = sVec.begin();
-+ while( it != sVec.end() )
++ for( sal_Int32 i = nIndex; i < ( sList.getLength()-1 ); i++ )
+ {
-+ *pString = *it;
-+ ++pString;
-+ ++it;
++ sList[i] = sList[i+1];
+ }
+ sList.realloc( sList.getLength() - 1 );
+ }
+
+ m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
-+
+ }
+}
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]