[ooo-build-commit] patches/dev300 patches/vba

Noel Power noelp at kemper.freedesktop.org
Wed Nov 18 08:15:48 PST 2009


 patches/dev300/apply                            |    1 +
 patches/vba/vba-fix-find-wraparound-onfail.diff |   18 ++++++++++++++++++
 2 files changed, 19 insertions(+)

New commits:
commit 063b224b3e97289c7a7f2f98a2bfd4d6f9bb82e1
Author: Noel Power <noel.power at novell.com>
Date:   Wed Nov 18 16:11:56 2009 +0000

    fix n#554261 ( find fails to wrap search when it fails )
    
    * patches/dev300/apply:
    * patches/vba/vba-fix-find-wraparound-onfail.diff: fix for n#554261, the Range.Find api can be specified with a cell ( in the range to search ) to start from, if the search fails then the search should be restarted from the begining of the range

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 1b1f7f0..868af61 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1689,6 +1689,7 @@ vba-thiscomponent-fix.diff
 vba-word-support-m4.diff, Fong
 vba-reenable-cwssheetproctectbits.diff
 eventhelper-closecrash-fix.diff, n#438606
+vba-fix-find-wraparound-onfail.diff, n#554261
 [VBAUntested]
 SectionOwner => noelpwer
 # doesn't work
diff --git a/patches/vba/vba-fix-find-wraparound-onfail.diff b/patches/vba/vba-fix-find-wraparound-onfail.diff
new file mode 100644
index 0000000..066ed12
--- /dev/null
+++ b/patches/vba/vba-fix-find-wraparound-onfail.diff
@@ -0,0 +1,18 @@
+diff --git sc/source/ui/vba/vbarange.cxx sc/source/ui/vba/vbarange.cxx
+index f327fed..735f913 100644
+--- sc/source/ui/vba/vbarange.cxx
++++ sc/source/ui/vba/vbarange.cxx
+@@ -2953,6 +2953,13 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
+         uno::Reference< util::XSearchDescriptor > xSearchDescriptor( xDescriptor, uno::UNO_QUERY );
+         uno::Reference< uno::XInterface > xInterface = xStartCell.is() ? xSearch->findNext( xStartCell, xSearchDescriptor) : xSearch->findFirst( xSearchDescriptor );
+         uno::Reference< table::XCellRange > xCellRange( xInterface, uno::UNO_QUERY );
++        // if we are searching from a starting cell and failed to find a match 
++        // then try from the begining
++        if ( !xCellRange.is() && xStartCell.is() )
++        { 
++            xInterface = xSearch->findFirst( xSearchDescriptor );
++            xCellRange.set( xInterface, uno::UNO_QUERY ); 
++        }
+         if ( xCellRange.is() )
+         {
+             uno::Reference< excel::XRange > xResultRange = new ScVbaRange( this, mxContext, xCellRange );


More information about the ooo-build-commit mailing list