summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-03-07 10:15:12 +0000
committerMichael Meeks <michael.meeks@novell.com>2011-03-07 10:15:12 +0000
commit25b3be376dd6731e1838840e5a928b82d7bc98b6 (patch)
tree506115f071c04fe2cf40c557b173514db4cac771
parentbd096100632c0d98dd255ba85007e9f3e100166d (diff)
build / merge cleanup
-rw-r--r--vbahelper/inc/vbahelper/vbadialogbase.hxx2
-rw-r--r--vbahelper/inc/vbahelper/vbaeventshelperbase.hxx11
-rw-r--r--vbahelper/source/msforms/vbauserform.cxx2
-rw-r--r--vbahelper/source/vbahelper/makefile.mk10
-rw-r--r--vbahelper/source/vbahelper/vbaapplicationbase.cxx6
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrol.cxx6
-rw-r--r--vbahelper/source/vbahelper/vbadialogbase.cxx32
-rw-r--r--vbahelper/source/vbahelper/vbadocumentbase.cxx29
8 files changed, 57 insertions, 41 deletions
diff --git a/vbahelper/inc/vbahelper/vbadialogbase.hxx b/vbahelper/inc/vbahelper/vbadialogbase.hxx
index 70bd565656..32e2f375c0 100644
--- a/vbahelper/inc/vbahelper/vbadialogbase.hxx
+++ b/vbahelper/inc/vbahelper/vbadialogbase.hxx
@@ -44,7 +44,7 @@ public:
virtual ~VbaDialogBase() {}
// Methods
- virtual void SAL_CALL Show() throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL Show() throw (css::uno::RuntimeException);
virtual rtl::OUString mapIndexToName( sal_Int32 nIndex ) = 0;
};
diff --git a/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx b/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx
index f5ccb61de5..6335392979 100644
--- a/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx
+++ b/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx
@@ -59,17 +59,6 @@ public:
// XEventListener
virtual void SAL_CALL disposing( const css::lang::EventObject& aSource ) throw (css::uno::RuntimeException);
- // little helpers ---------------------------------------------------------
-
- /** Throws, if the passed sequence does not contain a value at the specified index. */
- static inline void checkArgument( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException)
- { if( (nIndex < 0) || (nIndex >= rArgs.getLength()) ) throw css::lang::IllegalArgumentException(); }
-
- /** Throws, if the passed sequence does not contain a value of a specific at the specified index. */
- template< typename Type >
- static inline void checkArgumentType( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException)
- { checkArgument( rArgs, nIndex ); if( !rArgs[ nIndex ].has< Type >() ) throw css::lang::IllegalArgumentException(); }
-
protected:
// ------------------------------------------------------------------------
diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx
index 81db4d41b2..74f45a4f21 100644
--- a/vbahelper/source/msforms/vbauserform.cxx
+++ b/vbahelper/source/msforms/vbauserform.cxx
@@ -27,6 +27,7 @@
************************************************************************/
#include <vbahelper/helperdecl.hxx>
#include "vbauserform.hxx"
+#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/XControlContainer.hpp>
#include <com/sun/star/awt/XWindow2.hpp>
@@ -255,7 +256,6 @@ ScVbaUserForm::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::Un
pControl->setLibraryAndCodeName( m_sLibName.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ).concat( getName() ) );
aResult = uno::makeAny( xVBAControl );
}
- }
return aResult;
}
diff --git a/vbahelper/source/vbahelper/makefile.mk b/vbahelper/source/vbahelper/makefile.mk
index 22e8d90c5e..52f6f2bed6 100644
--- a/vbahelper/source/vbahelper/makefile.mk
+++ b/vbahelper/source/vbahelper/makefile.mk
@@ -77,4 +77,14 @@ SLOFILES=\
.INCLUDE : target.mk
+ALLTAR : \
+ $(MISC)$/$(TARGET).don \
+
+$(SLOFILES) : $(MISC)$/$(TARGET).don
+
+$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb
+ +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@
+ echo $@
+
+
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index 927054a8e4..6c53357619 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -347,8 +347,8 @@ uno::Any SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, con
// search the global tempalte
- VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( aMacroDocumentModel ), sMacro_only_Name, sal_True );
- if( aMacroInfo.IsResolved() )
+ MacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( aMacroDocumentModel ), sMacro_only_Name, sal_True );
+ if( aMacroInfo.mbFound )
{
// handle the arguments
const uno::Any* aArgsPtrArray[] = { &varg1, &varg2, &varg3, &varg4, &varg5, &varg6, &varg7, &varg8, &varg9, &varg10, &varg11, &varg12, &varg13, &varg14, &varg15, &varg16, &varg17, &varg18, &varg19, &varg20, &varg21, &varg22, &varg23, &varg24, &varg25, &varg26, &varg27, &varg28, &varg29, &varg30 };
@@ -374,7 +374,7 @@ uno::Any SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, con
uno::Any aRet;
uno::Any aDummyCaller;
- executeMacro( aMacroInfo.MacroDocContext(), aMacroInfo.ResolvedMacro(), aArgs, aRet, aDummyCaller );
+ executeMacro( aMacroInfo.mpDocContext, aMacroInfo.msResolvedMacro, aArgs, aRet, aDummyCaller );
return aRet;
}
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
index a8ebcdfaa9..e93b237429 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
@@ -79,10 +79,10 @@ ScVbaCommandBarControl::setOnAction( const ::rtl::OUString& _onaction ) throw (u
{
// get the current model
uno::Reference< frame::XModel > xModel( pCBarHelper->getModel() );
- VBAMacroResolvedInfo aResolvedMacro = ooo::vba::resolveVBAMacro( getSfxObjShell( xModel ), _onaction, true );
- if ( aResolvedMacro.IsResolved() )
+ MacroResolvedInfo aResolvedMacro = ooo::vba::resolveVBAMacro( getSfxObjShell( xModel ), _onaction, true );
+ if ( aResolvedMacro.mbFound )
{
- rtl::OUString aCommandURL = ooo::vba::makeMacroURL( aResolvedMacro.ResolvedMacro() );
+ rtl::OUString aCommandURL = ooo::vba::makeMacroURL( aResolvedMacro.msResolvedMacro );
OSL_TRACE(" ScVbaCommandBarControl::setOnAction: %s", rtl::OUStringToOString( aCommandURL, RTL_TEXTENCODING_UTF8 ).getStr() );
setPropertyValue( m_aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CommandURL")), uno::makeAny( aCommandURL ) );
ApplyChange();
diff --git a/vbahelper/source/vbahelper/vbadialogbase.cxx b/vbahelper/source/vbahelper/vbadialogbase.cxx
index ec7ecae9f4..302a565cf4 100644
--- a/vbahelper/source/vbahelper/vbadialogbase.cxx
+++ b/vbahelper/source/vbahelper/vbadialogbase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,11 +31,10 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-// fails silently
-void
-VbaDialogBase::Show() throw(uno::RuntimeException)
+sal_Bool SAL_CALL VbaDialogBase::Show() throw ( uno::RuntimeException )
{
rtl::OUString aURL;
+ sal_Bool bSuccess = sal_False;
if ( m_xModel.is() )
{
aURL = mapIndexToName( mnIndex );
@@ -42,7 +42,27 @@ VbaDialogBase::Show() throw(uno::RuntimeException)
throw uno::RuntimeException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " Unable to open the specified dialog " ) ),
uno::Reference< XInterface > () );
- dispatchRequests( m_xModel, aURL );
- }
-}
+ uno::Sequence< beans::PropertyValue > dispatchProps(0);
+ if ( aURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:PrinterSetup")) )
+ {
+ dispatchProps.realloc(1);
+ dispatchProps[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VBADialogResultRequest" ) );
+ dispatchProps[0].Value <<= (sal_Bool) sal_True;
+ }
+
+ 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;
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx
index 4195199c58..6514be874e 100644
--- a/vbahelper/source/vbahelper/vbadocumentbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx
@@ -173,29 +173,26 @@ VbaDocumentBase::Close( const uno::Any &rSaveArg, const uno::Any &rFileArg,
// The boolean parameter DeliverOwnership tells objects vetoing the close process that they may
// assume ownership if they object the closure by throwing a CloseVetoException
// Here we give up ownership. To be on the safe side, catch possible veto exception anyway.
- try{
- xCloseable->close(sal_True);
- }
- catch( util::CloseVetoException )
- {
- //close is cancelled, nothing to do
+ try {
+ xCloseable->close(sal_True);
+ }
+ catch( util::CloseVetoException ) {
+ //close is cancelled, nothing to do
+ }
}
- }
// If close is not supported by this model - try to dispose it.
// But if the model disagree with a reset request for the modify state
// we shouldn't do so. Otherwhise some strange things can happen.
- else
- {
+ else
+ {
uno::Reference< lang::XComponent > xDisposable ( getModel(), uno::UNO_QUERY );
if ( xDisposable.is() )
- {
- // To be on the safe side, catch possible veto exception anyway.
- try
- {
- xDisposable->dispose();
- }
- catch( uno::Exception& )
{
+ // To be on the safe side, catch possible veto exception anyway.
+ try {
+ xDisposable->dispose();
+ }
+ catch( uno::Exception& ) {}
}
}
}