summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-04-26 10:26:25 +0100
committerNoel Power <noel.power@suse.com>2013-04-26 15:30:37 +0100
commitbda63da4b1027bdeabb8428e2602e3010d755313 (patch)
tree12500ac0208c78ae2ce08ca3117e2363497c4ea9 /sc
parent0e32584f5e732adfef200c36132a4c2cddd2e5ff (diff)
implement Application.Undo
Change-Id: I0579efa9dc26be93cd0fa01c23220d9c723a9a26
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx9
-rw-r--r--sc/source/ui/vba/vbaapplication.hxx1
2 files changed, 10 insertions, 0 deletions
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index db8bcaf03fc9..a5b60dc1b8f8 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1312,6 +1312,15 @@ void SAL_CALL ScVbaApplication::OnKey( const ::rtl::OUString& Key, const uno::An
}
}
+void SAL_CALL ScVbaApplication::Undo() throw (uno::RuntimeException)
+{
+ uno::Reference< frame::XModel > xModel( getThisExcelDoc( mxContext ), uno::UNO_SET_THROW );
+
+ ScTabViewShell* pViewShell = excel::getBestViewShell( xModel );
+ if ( pViewShell )
+ dispatchExecute( pViewShell, SID_UNDO );
+}
+
rtl::OUString
ScVbaApplication::getServiceImplName()
{
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index 754117845722..8d59082f538c 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -124,6 +124,7 @@ public:
virtual css::uno::Any SAL_CALL Caller( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL GetOpenFilename( const css::uno::Any& rFileFilter, const css::uno::Any& rFilterIndex, const css::uno::Any& rTitle, const css::uno::Any& rButtonText, const css::uno::Any& rMultiSelect ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL GetSaveAsFilename( const css::uno::Any& rInitialFileName, const css::uno::Any& rFileFilter, const css::uno::Any& rFilterIndex, const css::uno::Any& rTitle, const css::uno::Any& rButtonText ) throw (css::uno::RuntimeException);
+ virtual void Undo() throw (css::uno::RuntimeException);
// XHelperInterface
virtual rtl::OUString getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();