summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-05-03 15:32:29 +0100
committerNoel Power <noel.power@suse.com>2013-05-07 09:56:28 +0100
commit44d1c6bb8623a85e8e1232a06f13bc718b73294a (patch)
tree7e828a1385014462c3be4e8ca6acaafc9bb566e9 /sc/source/ui/vba
parenta5af7a56cce03626b8438ac21fc302a11d722ddb (diff)
implement Application.Undo
Change-Id: Ibba3c5e2c617daea70fb75b3235636620a46f9ff
Diffstat (limited to 'sc/source/ui/vba')
-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 a15aeffa5034..3175f650d628 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1309,6 +1309,15 @@ void SAL_CALL ScVbaApplication::OnKey( const OUString& Key, const uno::Any& Proc
}
}
+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 );
+}
+
OUString
ScVbaApplication::getServiceImplName()
{
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index 1991714fb77a..3866403543b7 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 OUString getServiceImplName();
virtual css::uno::Sequence<OUString> getServiceNames();