[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - sc/source
Noel Power
noel.power at suse.com
Thu Oct 24 09:58:30 PDT 2013
sc/source/ui/vba/vbarange.cxx | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
New commits:
commit 091a75a1740f1d018135f9ed0c585703ba3247d0
Author: Noel Power <noel.power at suse.com>
Date: Tue May 28 17:33:33 2013 +0100
some Worksheet.Change support
Change-Id: I91203e74d54adba17a20ef7b7d835d9ac49855be
(cherry picked from commit 20d792d6379600df8b56a2735f9dd1cb63967e4d)
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index a2470f1..7c6af04 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1831,6 +1831,7 @@ ScVbaRange::fillSeries( sheet::FillDirection nFillDirection, sheet::FillMode nFi
uno::Reference< sheet::XCellSeries > xCellSeries(mxRange, uno::UNO_QUERY_THROW );
xCellSeries->fillSeries( nFillDirection, nFillMode, nFillDateMode, fStep, fEndValue );
+ fireChangeEvent();
}
void
@@ -3095,7 +3096,28 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un
// OOo.org afaik
uno::Reference< util::XSearchDescriptor > xSearch( xDescriptor, uno::UNO_QUERY );
+ uno::Reference< container::XIndexAccess > xIndexAccess = xReplace->findAll( xSearch );
xReplace->replaceAll( xSearch );
+ if ( xIndexAccess.is() && xIndexAccess->getCount() > 0 )
+ {
+ for ( sal_Int32 i = 0; i < xIndexAccess->getCount(); ++i )
+ {
+ uno::Reference< table::XCellRange > xCellRange( xIndexAccess->getByIndex( i ), uno::UNO_QUERY );
+ if ( xCellRange.is() )
+ {
+ uno::Reference< excel::XRange > xRange( new ScVbaRange( mxParent, mxContext, xCellRange ) );
+ uno::Reference< container::XEnumerationAccess > xEnumAccess( xRange, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XEnumeration > xEnum = xEnumAccess->createEnumeration();
+ while ( xEnum->hasMoreElements() )
+ {
+ uno::Reference< excel::XRange > xNextRange( xEnum->nextElement(), uno::UNO_QUERY_THROW );
+ ScVbaRange* pRange = dynamic_cast< ScVbaRange * > ( xNextRange.get() );
+ if ( pRange )
+ pRange->fireChangeEvent();
+ }
+ }
+ }
+ }
}
return sal_True; // always
}
More information about the Libreoffice-commits
mailing list