summaryrefslogtreecommitdiff
path: root/vbahelper/source
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-08-24 14:59:01 +0100
committerNoel Power <noel.power@suse.com>2012-08-26 09:49:23 +0100
commitdd91af40e384226e577f5a4b96b48e293cf31fa3 (patch)
treec8c416a3a5bc5a2d0a99864a978ca1906108cc7d /vbahelper/source
parent43b6f77506bdb5ef767ac2211f930bfc911f2046 (diff)
clean up unnecessary non working implementations
Change-Id: I4cbc0fbf17aa80db4b19df630d6f18f97b9f6982
Diffstat (limited to 'vbahelper/source')
-rw-r--r--vbahelper/source/vbahelper/vbadialogbase.cxx21
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx37
2 files changed, 4 insertions, 54 deletions
diff --git a/vbahelper/source/vbahelper/vbadialogbase.cxx b/vbahelper/source/vbahelper/vbadialogbase.cxx
index 3b5bfe00536d..48dcc037f03f 100644
--- a/vbahelper/source/vbahelper/vbadialogbase.cxx
+++ b/vbahelper/source/vbahelper/vbadialogbase.cxx
@@ -25,7 +25,6 @@ using namespace ::com::sun::star;
sal_Bool SAL_CALL VbaDialogBase::Show() throw ( uno::RuntimeException )
{
rtl::OUString aURL;
- sal_Bool bSuccess = sal_False;
if ( m_xModel.is() )
{
aURL = mapIndexToName( mnIndex );
@@ -35,25 +34,9 @@ sal_Bool SAL_CALL VbaDialogBase::Show() throw ( uno::RuntimeException )
uno::Reference< XInterface > () );
uno::Sequence< beans::PropertyValue > dispatchProps(0);
- if ( aURL == ".uno:PrinterSetup" )
- {
- dispatchProps.realloc(1);
- dispatchProps[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VBADialogResultRequest" ) );
- dispatchProps[0].Value <<= (sal_Bool) sal_True;
- }
+ dispatchRequests( m_xModel, aURL, dispatchProps );
- VBADispatchListener *pNotificationListener = new VBADispatchListener();
- uno::Reference< frame::XDispatchResultListener > rListener = pNotificationListener;
- dispatchRequests( m_xModel, aURL, dispatchProps, rListener, sal_False );
-
- bSuccess = pNotificationListener->getState();
- uno::Any aResult = pNotificationListener->getResult();
- if ( bSuccess )
- {
- if ( aResult.getValueTypeClass() == uno::TypeClass_BOOLEAN )
- aResult >>= bSuccess;
- }
}
- return bSuccess;
+ return sal_True;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 68b8a9b1946d..ff9681d4c721 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -144,7 +144,7 @@ void dispatchExecute(SfxViewShell* pViewShell, sal_uInt16 nSlot, SfxCallMode nCa
}
void
-dispatchRequests (const uno::Reference< frame::XModel>& xModel, const rtl::OUString & aUrl, const uno::Sequence< beans::PropertyValue >& sProps, const uno::Reference< frame::XDispatchResultListener >& rListener, const sal_Bool bSilent )
+dispatchRequests (const uno::Reference< frame::XModel>& xModel, const rtl::OUString & aUrl, const uno::Sequence< beans::PropertyValue >& sProps )
{
util::URL url;
url.Complete = aUrl;
@@ -172,7 +172,6 @@ dispatchRequests (const uno::Reference< frame::XModel>& xModel, const rtl::OUStr
}
uno::Reference<frame::XDispatch> xDispatcher = xDispatchProvider->queryDispatch(url,emptyString,0);
- uno::Reference< frame::XNotifyingDispatch > xNotifyingDispatcher( xDispatcher, uno::UNO_QUERY );
uno::Sequence<beans::PropertyValue> dispatchProps(1);
@@ -188,20 +187,10 @@ dispatchRequests (const uno::Reference< frame::XModel>& xModel, const rtl::OUStr
*pDest = *pSrc;
}
- if ( bSilent )
- {
- (*pDest).Name = rtl::OUString( "Silent" );
- (*pDest).Value <<= (sal_Bool)sal_True;
- }
-
- if ( !rListener.is() && xDispatcher.is() )
+ if ( xDispatcher.is() )
{
xDispatcher->dispatch( url, dispatchProps );
}
- else if ( rListener.is() && xNotifyingDispatcher.is() )
- {
- xNotifyingDispatcher->dispatchWithNotification( url, dispatchProps, rListener );
- }
}
void
@@ -1167,28 +1156,6 @@ double Millimeter::getInPoints(int _hmm)
return points;
}
-// Listener for XNotifyingDispatch
-VBADispatchListener::VBADispatchListener() : m_State( sal_False )
-{
-}
-
-// Listener for XNotifyingDispatch
-VBADispatchListener::~VBADispatchListener()
-{
-}
-
-// Listener for XNotifyingDispatch
-void SAL_CALL VBADispatchListener::dispatchFinished( const frame::DispatchResultEvent& aEvent ) throw ( uno::RuntimeException )
-{
- m_Result = aEvent.Result;
- m_State = ( aEvent.State == frame::DispatchResultState::SUCCESS ) ? sal_True : sal_False;
-}
-
-// Listener for XNotifyingDispatch
-void SAL_CALL VBADispatchListener::disposing( const lang::EventObject& /*aEvent*/ ) throw( uno::RuntimeException )
-{
-}
-
uno::Reference< XHelperInterface > getVBADocument( const uno::Reference< frame::XModel >& xModel )
{
uno::Reference< XHelperInterface > xIf;