[Libreoffice-commits] .: Branch 'integration/dev300_m101' - scripting/source xmlscript/inc xmlscript/source

Thorsten Behrens thorsten at kemper.freedesktop.org
Tue Mar 15 03:53:13 PDT 2011


 scripting/source/dlgprov/DialogModelProvider.cxx |    3 ++-
 scripting/source/dlgprov/dlgprov.cxx             |   23 +++++++++++------------
 scripting/source/dlgprov/dlgprov.hxx             |    1 +
 xmlscript/inc/xmlscript/xmldlg_imexp.hxx         |    2 +-
 xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx |    2 +-
 5 files changed, 16 insertions(+), 15 deletions(-)

New commits:
commit a0f7ff1225d59cf2fa8b9efd65e0b43d64b28eef
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Tue Mar 15 11:52:49 2011 +0100

    Fix build in scripting

diff --git a/scripting/source/dlgprov/DialogModelProvider.cxx b/scripting/source/dlgprov/DialogModelProvider.cxx
index d81f248..af51aa0 100755
--- a/scripting/source/dlgprov/DialogModelProvider.cxx
+++ b/scripting/source/dlgprov/DialogModelProvider.cxx
@@ -94,7 +94,8 @@ void SAL_CALL DialogModelProvider::initialize(const css::uno::Sequence< uno::Any
                 Any aDialogSourceURLAny;
                 aDialogSourceURLAny <<= sURL;
                 
-                m_xDialogModel.set( dlgprov::lcl_createDialogModel( m_xContext,xInput , xStringResourceManager, aDialogSourceURLAny  ), UNO_QUERY_THROW);
+                Reference< frame::XModel > xModel;
+                m_xDialogModel.set( dlgprov::lcl_createDialogModel( m_xContext, xInput , xModel, xStringResourceManager, aDialogSourceURLAny  ), UNO_QUERY_THROW);
                 m_xDialogModelProp.set(m_xDialogModel, UNO_QUERY_THROW);
             }
         }
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index d5b76d8..5be0acd 100755
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -138,6 +138,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
     }
     Reference< container::XNameContainer > lcl_createDialogModel( const Reference< XComponentContext >& i_xContext,
         const Reference< io::XInputStream >& xInput, 
+        const Reference< frame::XModel >& xModel,
         const Reference< resource::XStringResourceManager >& xStringResourceManager,
         const Any &aDialogSourceURL) throw ( Exception )
     {
@@ -147,7 +148,15 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
         Reference< beans::XPropertySet > xDlgPropSet( xDialogModel, UNO_QUERY );
         xDlgPropSet->setPropertyValue( aDlgSrcUrlPropName, aDialogSourceURL );
 
-        ::xmlscript::importDialogModel( xInput, xDialogModel, i_xContext );
+        // #TODO we really need to detect the source of the Dialog, is it
+        // the dialog. E.g. if the dialog was created from basic ( then we just
+        // can't tell  where its from )
+        // If we are happy to always substitute the form model for the awt
+        // one then maybe the presence of a document model is enough to trigger
+        // swapping out the models ( or perhaps we only want to do this
+        // for vba mode ) there are a number of feasible and valid possibilities
+        ::xmlscript::importDialogModel( xInput, xDialogModel, i_xContext, xModel );
+
         // Set resource property
         if( xStringResourceManager.is() )
         {
@@ -266,17 +275,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re
         const Reference< resource::XStringResourceManager >& xStringResourceManager,
         const Any &aDialogSourceURL) throw ( Exception )
     {
-        
-    
-        // #TODO we really need to detect the source of the Dialog, is it
-        // the dialog. E.g. if the dialog was created from basic ( then we just
-        // can't tell  where its from )
-        // If we are happy to always substitute the form model for the awt
-        // one then maybe the presence of a document model is enough to trigger
-        // swapping out the models ( or perhaps we only want to do this
-        // for vba mode ) there are a number of feasible and valid possibilities
-        ::xmlscript::importDialogModel( xInput, xDialogModel, m_xContext, m_xModel );
-        return lcl_createDialogModel(m_xContext,xInput,xStringResourceManager,aDialogSourceURL); 
+        return lcl_createDialogModel(m_xContext,xInput,m_xModel,xStringResourceManager,aDialogSourceURL);
     }
 
     Reference< XControlModel > DialogProviderImpl::createDialogModelForBasic() throw ( Exception )
diff --git a/scripting/source/dlgprov/dlgprov.hxx b/scripting/source/dlgprov/dlgprov.hxx
index a721d46..acbedd5 100755
--- a/scripting/source/dlgprov/dlgprov.hxx
+++ b/scripting/source/dlgprov/dlgprov.hxx
@@ -67,6 +67,7 @@ namespace dlgprov
     ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > lcl_createDialogModel( 
                 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_xContext,
                 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInput, 
+                const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
                 const ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager >& xStringResourceManager,
                 const ::com::sun::star::uno::Any &aDialogSourceURL) throw ( ::com::sun::star::uno::Exception );
 
diff --git a/xmlscript/inc/xmlscript/xmldlg_imexp.hxx b/xmlscript/inc/xmlscript/xmldlg_imexp.hxx
index 30d92bf..47d0d17 100755
--- a/xmlscript/inc/xmlscript/xmldlg_imexp.hxx
+++ b/xmlscript/inc/xmlscript/xmldlg_imexp.hxx
@@ -78,7 +78,7 @@ SAL_CALL exportDialogModel(
 //==============================================================================
 void SAL_CALL importDialogModel(
     ::com::sun::star::uno::Reference<
-    ::com::sun::star::io::XInputStream > xInput,
+    ::com::sun::star::io::XInputStream > const & xInput,
     ::com::sun::star::uno::Reference<
     ::com::sun::star::container::XNameContainer > const & xDialogModel,
     ::com::sun::star::uno::Reference<
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx
index 6564ee3..063337f 100755
--- a/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx
@@ -105,7 +105,7 @@ Reference< io::XInputStreamProvider > SAL_CALL exportDialogModel(
 
 //==================================================================================================
 void SAL_CALL importDialogModel(
-    Reference< io::XInputStream > xInput,
+    Reference< io::XInputStream > const & xInput,
     Reference< container::XNameContainer > const & xDialogModel,
     Reference< XComponentContext > const & xContext,
     Reference< XModel > const & xDocument )


More information about the Libreoffice-commits mailing list