[ooo-build-commit] Branch 'ooo-build-3-1-1' - patches/dev300 patches/vba
Noel Power
noelp at kemper.freedesktop.org
Wed Nov 18 08:23:59 PST 2009
patches/dev300/apply | 1 +
patches/vba/vba-fix-find-wraparound-onfail.diff | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
New commits:
commit 6d98caa89f7be6aa42a7503f8d297f1ee792c8b4
Author: Noel Power <noel.power at novell.com>
Date: Wed Nov 18 16:21:48 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 9f1dea0..cdc2c8b 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1895,6 +1895,7 @@ vba-fix-isempty.diff, bnc#541749
vba-fix-wsfunction-booleanparam.diff, bnc#541735
vba-fix-selection-dot-inproject.diff
vba-fix-override-exportproblem.diff
+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