[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - 2 commits - basic/source odk/CustomTarget_doxygen.mk offapi/com

Stephan Bergmann sbergman at redhat.com
Wed May 29 08:40:10 PDT 2013


 basic/source/classes/eventatt.cxx          |   44 ++++++++++++++---------------
 odk/CustomTarget_doxygen.mk                |    5 +--
 offapi/com/sun/star/awt/DialogProvider.idl |    5 +--
 3 files changed, 28 insertions(+), 26 deletions(-)

New commits:
commit d24df4c708b8eb8dc3689fa72cbfc4e02e97f6b1
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed May 29 17:35:06 2013 +0200

    Improve DialogProvider service ctor
    
    ...recently introduced with c75a46fbd0ba4daf857fcd7d70badeed5aae8e28 "fdo#46808,
    use DialogProvider service constructor."  The general theme of this additional
    ctor appears to be more about "Scripting" than "Listener," and the DialogLib
    argument is actually expected to be of XNameContainer type.
    
    Change-Id: Iea7d906d9b2ffc3b3ee5b2cbfaf7c58191037c9b
    (cherry picked from commit 69e697deefc9bebefa2daac4ae4b8cde5ae742f1)

diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx
index f74bb95..68ba831 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -330,9 +330,9 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any
     }
 }
 
-Any implFindDialogLibForDialog( const Any& rDlgAny, SbxObject* pBasic )
+css::uno::Reference< css::container::XNameContainer > implFindDialogLibForDialog( const Any& rDlgAny, SbxObject* pBasic )
 {
-    Any aRetDlgLibAny;
+    css::uno::Reference< css::container::XNameContainer > aRetDlgLib;
 
     SbxVariable* pDlgLibContVar = pBasic->Find(OUString("DialogLibraries"), SbxCLASS_OBJECT);
     if( pDlgLibContVar && pDlgLibContVar->ISA(SbUnoObject) )
@@ -356,20 +356,20 @@ Any implFindDialogLibForDialog( const Any& rDlgAny, SbxObject* pBasic )
 
                 Any aDlgLibAny = xDlgLibContNameAccess->getByName( pLibNames[ iLib ] );
 
-                Reference< XNameAccess > xDlgLibNameAccess( aDlgLibAny, UNO_QUERY );
-                OSL_ENSURE( xDlgLibNameAccess.is(), "implFindDialogLibForDialog: invalid dialog lib!" );
-                if( xDlgLibNameAccess.is() )
+                Reference< XNameContainer > xDlgLibNameCont( aDlgLibAny, UNO_QUERY );
+                OSL_ENSURE( xDlgLibNameCont.is(), "implFindDialogLibForDialog: invalid dialog lib!" );
+                if( xDlgLibNameCont.is() )
                 {
-                    Sequence< OUString > aDlgNames = xDlgLibNameAccess->getElementNames();
+                    Sequence< OUString > aDlgNames = xDlgLibNameCont->getElementNames();
                     const OUString* pDlgNames = aDlgNames.getConstArray();
                     sal_Int32 nDlgNameCount = aDlgNames.getLength();
 
                     for( sal_Int32 iDlg = 0 ; iDlg < nDlgNameCount ; iDlg++ )
                     {
-                        Any aDlgAny = xDlgLibNameAccess->getByName( pDlgNames[ iDlg ] );
+                        Any aDlgAny = xDlgLibNameCont->getByName( pDlgNames[ iDlg ] );
                         if( aDlgAny == rDlgAny )
                         {
-                            aRetDlgLibAny = aDlgLibAny;
+                            aRetDlgLib = xDlgLibNameCont;
                             break;
                         }
                     }
@@ -378,12 +378,12 @@ Any implFindDialogLibForDialog( const Any& rDlgAny, SbxObject* pBasic )
         }
     }
 
-    return aRetDlgLibAny;
+    return aRetDlgLib;
 }
 
-Any implFindDialogLibForDialogBasic( const Any& aAnyISP, SbxObject* pBasic, StarBASIC*& pFoundBasic )
+css::uno::Reference< css::container::XNameContainer > implFindDialogLibForDialogBasic( const Any& aAnyISP, SbxObject* pBasic, StarBASIC*& pFoundBasic )
 {
-    Any aDlgLibAny;
+    css::uno::Reference< css::container::XNameContainer > aDlgLib;
     // Find dialog library for dialog, direct access is not possible here
     StarBASIC* pStartedBasic = (StarBASIC*)pBasic;
     SbxObject* pParentBasic = pStartedBasic ? pStartedBasic->GetParent() : NULL;
@@ -403,19 +403,19 @@ Any implFindDialogLibForDialogBasic( const Any& aAnyISP, SbxObject* pBasic, Star
     }
     if( pSearchBasic1 )
     {
-        aDlgLibAny = implFindDialogLibForDialog( aAnyISP, pSearchBasic1 );
+        aDlgLib = implFindDialogLibForDialog( aAnyISP, pSearchBasic1 );
 
-        if ( aDlgLibAny.hasValue() )
+        if ( aDlgLib.is() )
             pFoundBasic = (StarBASIC*)pSearchBasic1;
 
         else if( pSearchBasic2 )
         {
-            aDlgLibAny = implFindDialogLibForDialog( aAnyISP, pSearchBasic2 );
-            if ( aDlgLibAny.hasValue() )
+            aDlgLib = implFindDialogLibForDialog( aAnyISP, pSearchBasic2 );
+            if ( aDlgLib.is() )
                 pFoundBasic = (StarBASIC*)pSearchBasic2;
         }
     }
-    return aDlgLibAny;
+    return aDlgLib;
 }
 
 void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
@@ -489,12 +489,12 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrit
         {}
     }
 
-    Any aDlgLibAny;
+    css::uno::Reference< css::container::XNameContainer > aDlgLib;
     bool bDocDialog = false;
     StarBASIC* pFoundBasic = NULL;
     OSL_TRACE("About to try get a hold of ThisComponent");
     Reference< frame::XModel > xModel = StarBASIC::GetModelFromBasic( GetSbData()->pInst->GetBasic() ) ;
-    aDlgLibAny = implFindDialogLibForDialogBasic( aAnyISP, GetSbData()->pInst->GetBasic(), pFoundBasic );
+    aDlgLib = implFindDialogLibForDialogBasic( aAnyISP, GetSbData()->pInst->GetBasic(), pFoundBasic );
     // If we found the dialog then it belongs to the Search basic
     if ( !pFoundBasic )
     {
@@ -515,9 +515,9 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrit
                     BasicManager* pMgr = basic::BasicManagerRepository::getDocumentBasicManager( xNextModel );
                     if ( pMgr )
                     {
-                        aDlgLibAny = implFindDialogLibForDialogBasic( aAnyISP, pMgr->GetLib(0), pFoundBasic );
+                        aDlgLib = implFindDialogLibForDialogBasic( aAnyISP, pMgr->GetLib(0), pFoundBasic );
                     }
-                    if ( aDlgLibAny.hasValue() )
+                    if ( aDlgLib.is() )
                     {
                         bDocDialog = true;
                         xModel = xNextModel;
@@ -539,9 +539,9 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrit
     {
        Reference< XDialogProvider >  xDlgProv;;
        if( bDocDialog )
-           xDlgProv = css::awt::DialogProvider::createWithModelAndListener( xContext, xModel, xInput, aDlgLibAny, xScriptListener );
+           xDlgProv = css::awt::DialogProvider::createWithModelAndScripting( xContext, xModel, xInput, aDlgLib, xScriptListener );
        else
-           xDlgProv = css::awt::DialogProvider::createWithModelAndListener( xContext, uno::Reference< frame::XModel >(), xInput, aDlgLibAny, xScriptListener );
+           xDlgProv = css::awt::DialogProvider::createWithModelAndScripting( xContext, uno::Reference< frame::XModel >(), xInput, aDlgLib, xScriptListener );
 
        xCntrl.set( xDlgProv->createDialog(OUString() ), UNO_QUERY_THROW );
        // Add dialog model to dispose vector
diff --git a/offapi/com/sun/star/awt/DialogProvider.idl b/offapi/com/sun/star/awt/DialogProvider.idl
index e259ad7..fa9ec93 100644
--- a/offapi/com/sun/star/awt/DialogProvider.idl
+++ b/offapi/com/sun/star/awt/DialogProvider.idl
@@ -21,6 +21,7 @@
 #define __com_sun_star_awt_DialogProvider_idl__
 
 #include <com/sun/star/awt/XDialogProvider.idl>
+#include <com/sun/star/container/XNameContainer.idl>
 #include <com/sun/star/frame/XModel.idl>
 #include <com/sun/star/io/XInputStream.idl>
 #include <com/sun/star/script/XScriptListener.idl>
@@ -38,9 +39,9 @@ service DialogProvider : com::sun::star::awt::XDialogProvider
 
     createWithModel([in] com::sun::star::frame::XModel Model);
 
-    createWithModelAndListener([in] com::sun::star::frame::XModel Model,
+    createWithModelAndScripting([in] com::sun::star::frame::XModel Model,
                      [in] com::sun::star::io::XInputStream InStream,
-                     [in] any DialogLib,
+                     [in] com::sun::star::container::XNameContainer DialogLib,
                      [in] com::sun::star::script::XScriptListener ScriptListener);
 };
 
commit 31ee8934f8d3c5e2016c5d4f5686b74e46fb893e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed May 29 10:43:06 2013 +0200

    Adapt Doxygen STRIP_FROM_PATH to moved headers
    
    Change-Id: I949a5cf0cb2f4595db7d25103f7caf51b861e8ec
    (cherry picked from commit 07b348f51d4af8b6cf78deaf80f5e05bc550e019)

diff --git a/odk/CustomTarget_doxygen.mk b/odk/CustomTarget_doxygen.mk
index 6558193..eae8ba1b 100644
--- a/odk/CustomTarget_doxygen.mk
+++ b/odk/CustomTarget_doxygen.mk
@@ -25,13 +25,14 @@ odk_INCFILELIST := com/sun/star/uno/Any.h \
 	com/sun/star/uno/Type.hxx
 
 # Cygwin Doxygen needs unix paths
+DOXY_INCLUDEDIR := $(INSTDIR)/$(gb_Package_SDKDIRNAME)/include
 DOXY_INPUT := $(SRCDIR)/odk/pack/gendocu/main.dox $(SRCDIR)/include/sal/log-areas.dox \
-	$(addprefix $(INSTDIR)/$(gb_Package_SDKDIRNAME)/include/,$(odk_INCDIRLIST) $(odk_INCFILELIST))
+	$(addprefix $(DOXY_INCLUDEDIR)/,$(odk_INCDIRLIST) $(odk_INCFILELIST))
 DOXY_INPUT := $(if $(filter WNT,$(OS)),$(shell cygpath -u $(DOXY_INPUT)),$(DOXY_INPUT))
 DOXY_WORKDIR := $(if $(filter WNT,$(OS)),\
 	$(shell cygpath -u $(call gb_CustomTarget_get_workdir,odk/docs/cpp)/ref),\
 	$(call gb_CustomTarget_get_workdir,odk/docs/cpp)/ref)
-DOXY_STRIP_PATH := $(if $(filter WNT,$(OS)),$(shell cygpath -u $(OUTDIR)/inc),$(OUTDIR)/inc)
+DOXY_STRIP_PATH := $(if $(filter WNT,$(OS)),$(shell cygpath -u $(DOXY_INCLUDEDIR)),$(DOXY_INCLUDEDIR))
 
 
 $(eval $(call gb_CustomTarget_register_targets,odk/docs/cpp,\


More information about the Libreoffice-commits mailing list