Kaydet (Commit) c2838a50 authored tarafından Rüdiger Timm's avatar Rüdiger Timm

INTEGRATION: CWS dba30c (1.36.8); FILE MERGED

2008/05/13 08:56:50 fs 1.36.8.2: joining changes from CWS odbmacros3 to CWS dba30c:
2008/05/08 12:59:49 fs 1.36.2.1: #i49133# don't let the controller plug itself into the frame, do this in the loader
2008/04/30 13:46:15 oj 1.36.8.1: #i88873# merge problem with titles02 and odbmacros
üst 4783c3b8
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite * OpenOffice.org - a multi-platform office productivity suite
* *
* $RCSfile: dbloader.cxx,v $ * $RCSfile: dbloader.cxx,v $
* $Revision: 1.36 $ * $Revision: 1.37 $
* *
* This file is part of OpenOffice.org. * This file is part of OpenOffice.org.
* *
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XSet.hpp> #include <com/sun/star/container/XSet.hpp>
#include <com/sun/star/document/XEventListener.hpp> #include <com/sun/star/document/XEventListener.hpp>
#include <com/sun/star/frame/XController.hpp> #include <com/sun/star/frame/XController2.hpp>
#include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XFrameLoader.hpp> #include <com/sun/star/frame/XFrameLoader.hpp>
#include <com/sun/star/frame/XLoadEventListener.hpp> #include <com/sun/star/frame/XLoadEventListener.hpp>
...@@ -211,11 +211,12 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const :: ...@@ -211,11 +211,12 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const ::
ServiceNameToImplName( URL_COMPONENT_DATASOURCEBROWSER, "org.openoffice.comp.dbu.ODatasourceBrowser" ), ServiceNameToImplName( URL_COMPONENT_DATASOURCEBROWSER, "org.openoffice.comp.dbu.ODatasourceBrowser" ),
ServiceNameToImplName( URL_COMPONENT_QUERYDESIGN, "org.openoffice.comp.dbu.OQueryDesign" ), ServiceNameToImplName( URL_COMPONENT_QUERYDESIGN, "org.openoffice.comp.dbu.OQueryDesign" ),
ServiceNameToImplName( URL_COMPONENT_TABLEDESIGN, "org.openoffice.comp.dbu.OTableDesign" ), ServiceNameToImplName( URL_COMPONENT_TABLEDESIGN, "org.openoffice.comp.dbu.OTableDesign" ),
ServiceNameToImplName( URL_COMPONENT_RELATIONDESIGN, "org.openoffice.comp.dbu.ORelationDesign" ) ServiceNameToImplName( URL_COMPONENT_RELATIONDESIGN, "org.openoffice.comp.dbu.ORelationDesign" ),
ServiceNameToImplName( URL_COMPONENT_VIEWDESIGN, "org.openoffice.comp.dbu.OViewDesign" )
}; };
INetURLObject aParser( rURL ); INetURLObject aParser( rURL );
Reference< XController > xController; Reference< XController2 > xController;
const ::rtl::OUString sComponentURL( aParser.GetMainURL( INetURLObject::DECODE_TO_IURI ) ); const ::rtl::OUString sComponentURL( aParser.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
for ( size_t i=0; i < sizeof( aImplementations ) / sizeof( aImplementations[0] ); ++i ) for ( size_t i=0; i < sizeof( aImplementations ) / sizeof( aImplementations[0] ); ++i )
...@@ -268,8 +269,8 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const :: ...@@ -268,8 +269,8 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const ::
if ( xController.is() ) if ( xController.is() )
{ {
xController->attachModel( xReportModel ); xController->attachModel( xReportModel );
xReportModel->connectController( xController ); xReportModel->connectController( xController.get() );
xReportModel->setCurrentController( xController ); xReportModel->setCurrentController( xController.get() );
} }
} }
} }
...@@ -329,7 +330,10 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const :: ...@@ -329,7 +330,10 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const ::
if ( bSuccess ) if ( bSuccess )
{ {
if ( xController.is() && rFrame.is() ) if ( xController.is() && rFrame.is() )
{
rFrame->setComponent( xController->getComponentWindow(), xController.get() );
xController->attachFrame(rFrame); xController->attachFrame(rFrame);
}
if ( xDatabaseDocument.is() ) if ( xDatabaseDocument.is() )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment