summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbaccess/inc/genericcontroller.hxx38
-rw-r--r--dbaccess/inc/singledoccontroller.hxx10
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx108
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.hxx10
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx6
-rw-r--r--dbaccess/source/ui/app/AppController.cxx16
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx7
-rw-r--r--dbaccess/source/ui/misc/singledoccontroller.cxx64
-rw-r--r--reportdesign/inc/ReportDefinition.hxx25
9 files changed, 134 insertions, 150 deletions
diff --git a/dbaccess/inc/genericcontroller.hxx b/dbaccess/inc/genericcontroller.hxx
index c2afc03ea..4aba58a1e 100644
--- a/dbaccess/inc/genericcontroller.hxx
+++ b/dbaccess/inc/genericcontroller.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: genericcontroller.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: kz $ $Date: 2008-04-04 14:29:58 $
+ * last change: $Author: kz $ $Date: 2008-04-08 12:42:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -67,8 +67,7 @@
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/stl_types.hxx>
#include <connectivity/dbexception.hxx>
-#include <cppuhelper/compbase10.hxx>
-#include <cppuhelper/compbase1.hxx>
+#include <cppuhelper/compbase11.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <boost/optional.hpp>
@@ -186,27 +185,25 @@ namespace dbaui
}
};
-
- typedef ::cppu::WeakComponentImplHelper10 < ::com::sun::star::frame::XDispatch
- , ::com::sun::star::frame::XDispatchProviderInterceptor
- , ::com::sun::star::util::XModifyListener
- , ::com::sun::star::view::XSelectionSupplier
- , ::com::sun::star::frame::XFrameActionListener
- , ::com::sun::star::lang::XInitialization
- , ::com::sun::star::lang::XServiceInfo
- , ::com::sun::star::frame::XDispatchInformationProvider
+ typedef ::comphelper::OBaseMutex OGenericUnoController_MBASE;
+
+ typedef ::cppu::WeakComponentImplHelper11 < ::com::sun::star::frame::XDispatch
+ , ::com::sun::star::frame::XDispatchProviderInterceptor
+ , ::com::sun::star::util::XModifyListener
+ , ::com::sun::star::view::XSelectionSupplier
+ , ::com::sun::star::frame::XFrameActionListener
+ , ::com::sun::star::lang::XInitialization
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::frame::XDispatchInformationProvider
+ , ::com::sun::star::frame::XController
, ::com::sun::star::frame::XTitle
, ::com::sun::star::frame::XTitleChangeBroadcaster
- > OGenericUnoController_COMPBASE;
-
- typedef ::cppu::ImplHelper1 < ::com::sun::star::frame::XController
- > OGenericUnoController_CTRBASE;
+ > OGenericUnoController_Base;
// ====================================================================
class DBACCESS_DLLPUBLIC OGenericUnoController
:public OGenericUnoController_MBASE
,public OGenericUnoController_Base
- ,public OGenericUnoController_CTRBASE
,public IController
{
private:
@@ -502,8 +499,6 @@ namespace dbaui
virtual ::com::sun::star::uno::Sequence< ::sal_Int16 > SAL_CALL getSupportedCommandGroups() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation( ::sal_Int16 ) throw (::com::sun::star::uno::RuntimeException);
- protected:
- OGenericUnoController(); // never implemented
// XTitle
virtual ::rtl::OUString SAL_CALL getTitle( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setTitle( const ::rtl::OUString& sTitle ) throw (::com::sun::star::uno::RuntimeException);
@@ -511,6 +506,9 @@ namespace dbaui
// XTitleChangeBroadcaster
virtual void SAL_CALL addTitleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitleChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeTitleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitleChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ protected:
+ OGenericUnoController(); // never implemented
};
}
diff --git a/dbaccess/inc/singledoccontroller.hxx b/dbaccess/inc/singledoccontroller.hxx
index 5b8845165..d845b016d 100644
--- a/dbaccess/inc/singledoccontroller.hxx
+++ b/dbaccess/inc/singledoccontroller.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: singledoccontroller.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: kz $ $Date: 2008-04-04 14:29:15 $
+ * last change: $Author: kz $ $Date: 2008-04-08 12:42:40 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -178,6 +178,7 @@ namespace dbaui
// ::com::sun::star::frame::XController
virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL attachModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) throw( ::com::sun::star::uno::RuntimeException );
// XScriptInvocationContext
virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedScripts > SAL_CALL getScriptContainer() throw (::com::sun::star::uno::RuntimeException);
@@ -214,10 +215,11 @@ namespace dbaui
// XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
+ protected:
+ sal_Int32 getCurrentStartNumber() const;
+
private:
OSingleDocumentController(); // never implemented
-
- sal_Int32 getCurrentStartNumber() const;
};
//........................................................................
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index e0c31e1b8..98857f313 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: databasedocument.cxx,v $
*
- * $Revision: 1.41 $
+ * $Revision: 1.42 $
*
- * last change: $Author: kz $ $Date: 2008-04-04 14:32:17 $
+ * last change: $Author: kz $ $Date: 2008-04-08 12:43:21 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -196,6 +196,16 @@ ODatabaseDocument::~ODatabaseDocument()
//------------------------------------------------------------------------------
Any SAL_CALL ODatabaseDocument::queryInterface(const Type& _rType) throw (RuntimeException)
{
+ // strip XEmbeddedScripts and XScriptInvocationContext if we have any form/report
+ // which already contains macros. In this case, the database document itself is not
+ // allowed to contain macros, too.
+ if ( impl_shouldDisallowScripting_nolck_nothrow()
+ && ( _rType.equals( XEmbeddedScripts::static_type() )
+ || _rType.equals( XScriptInvocationContext::static_type() )
+ )
+ )
+ return Any();
+
Any aReturn = ODatabaseDocument_OfficeDocument::queryInterface(_rType);
if (!aReturn.hasValue())
aReturn = ODatabaseDocument_Title::queryInterface(_rType);
@@ -215,59 +225,10 @@ void SAL_CALL ODatabaseDocument::release( ) throw ()
//------------------------------------------------------------------------------
Sequence< Type > SAL_CALL ODatabaseDocument::getTypes( ) throw (RuntimeException)
{
- return ::comphelper::concatSequences(
+ Sequence< Type > aTypes = ::comphelper::concatSequences(
ODatabaseDocument_OfficeDocument::getTypes(),
ODatabaseDocument_Title::getTypes()
);
-}
-//------------------------------------------------------------------------------
-Sequence< sal_Int8 > SAL_CALL ODatabaseDocument::getImplementationId( ) throw (RuntimeException)
-{
- static ::cppu::OImplementationId * pId = 0;
- if (! pId)
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if (! pId)
- {
- static ::cppu::OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
-}
-
-// -----------------------------------------------------------------------------
-bool ODatabaseDocument::impl_shouldDisallowScripting_nolck_nothrow() const
-{
- ::osl::MutexGuard aGuard( getMutex() );
- // TODO: revert to the disabled code. The current version is just to be able
- // to integrate an intermediate version of the CWS, which should behave as
- // if no macros in DB docs are allowed
-// if ( m_pImpl.is() && m_pImpl->hasAnyObjectWithMacros() )
- return true;
-// return false;
-}
-
-// -----------------------------------------------------------------------------
-Any SAL_CALL ODatabaseDocument::queryInterface( const Type& _rType ) throw (RuntimeException)
-{
- // strip XEmbeddedScripts and XScriptInvocationContext if we have any form/report
- // which already contains macros. In this case, the database document itself is not
- // allowed to contain macros, too.
- if ( impl_shouldDisallowScripting_nolck_nothrow()
- && ( _rType.equals( XEmbeddedScripts::static_type() )
- || _rType.equals( XScriptInvocationContext::static_type() )
- )
- )
- return Any();
-
- return ODatabaseDocument_OfficeDocument::queryInterface( _rType );
-}
-
-// -----------------------------------------------------------------------------
-Sequence< Type > SAL_CALL ODatabaseDocument::getTypes( ) throw (RuntimeException)
-{
- Sequence< Type > aTypes( ODatabaseDocument_OfficeDocument::getTypes() );
// strip XEmbeddedScripts and XScriptInvocationContext if we have any form/report
// which already contains macros. In this case, the database document itself is not
@@ -302,6 +263,33 @@ Sequence< Type > SAL_CALL ODatabaseDocument::getTypes( ) throw (RuntimeExceptio
return aTypes;
}
+//------------------------------------------------------------------------------
+Sequence< sal_Int8 > SAL_CALL ODatabaseDocument::getImplementationId( ) throw (RuntimeException)
+{
+ static ::cppu::OImplementationId * pId = 0;
+ if (! pId)
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if (! pId)
+ {
+ static ::cppu::OImplementationId aId;
+ pId = &aId;
+ }
+ }
+ return pId->getImplementationId();
+}
+
+// -----------------------------------------------------------------------------
+bool ODatabaseDocument::impl_shouldDisallowScripting_nolck_nothrow() const
+{
+ ::osl::MutexGuard aGuard( getMutex() );
+ // TODO: revert to the disabled code. The current version is just to be able
+ // to integrate an intermediate version of the CWS, which should behave as
+ // if no macros in DB docs are allowed
+// if ( m_pImpl.is() && m_pImpl->hasAnyObjectWithMacros() )
+ return true;
+// return false;
+}
// -----------------------------------------------------------------------------
// local functions
@@ -1217,8 +1205,8 @@ void ODatabaseDocument::disposing()
Reference< XModel > xHoldAlive( this );
{
{
- ::osl::ClearableMutexGuard aGuard( getMutex() );
- impl_notifyEvent( "OnUnload", aGuard );
+ document::EventObject aEvent( *this, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnLoad" ) ) );
+ impl_notifyEvent_nolck_nothrow( aEvent );
}
lang::EventObject aDisposeEvent(static_cast<XWeak*>(this));
@@ -1466,16 +1454,18 @@ Reference< XController > SAL_CALL ODatabaseDocument::createViewController( const
}
// -----------------------------------------------------------------------------
//=============================================================================
-uno::Reference< frame::XTitle > ODatabaseDocument::impl_getTitleHelper_throw()
+Reference< XTitle > ODatabaseDocument::impl_getTitleHelper_throw()
{
ModelMethodGuard aGuard( *this );
if ( ! m_xTitleHelper.is ())
{
- uno::Reference< frame::XUntitledNumbers > xDesktop(m_pImpl->m_xServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))), css::uno::UNO_QUERY_THROW);
- uno::Reference< frame::XModel > xThis (getThis(), uno::UNO_QUERY_THROW);
+ Reference< XUntitledNumbers > xDesktop(
+ m_pImpl->m_aContext.createComponent( "com.sun.star.frame.Desktop" ),
+ UNO_QUERY_THROW );
+ uno::Reference< frame::XModel > xThis (getThis(), uno::UNO_QUERY_THROW);
- ::framework::TitleHelper* pHelper = new ::framework::TitleHelper(m_pImpl->m_xServiceFactory);
+ ::framework::TitleHelper* pHelper = new ::framework::TitleHelper(m_pImpl->m_aContext.getLegacyServiceFactory());
m_xTitleHelper.set(static_cast< ::cppu::OWeakObject* >(pHelper), uno::UNO_QUERY_THROW);
pHelper->setOwner (xThis );
pHelper->connectWithUntitledNumbers (xDesktop);
@@ -1490,7 +1480,7 @@ uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHel
ModelMethodGuard aGuard( *this );
if ( !m_xModuleManager.is() )
- m_xModuleManager.set( m_pImpl->m_xServiceFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager")) ), UNO_QUERY_THROW );
+ m_xModuleManager.set( m_pImpl->m_aContext.createComponent( "com.sun.star.frame.ModuleManager" ), UNO_QUERY_THROW );
::rtl::OUString sModuleId = m_xModuleManager->identify( _xComponent );
diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx
index 6f250d9d0..7d86d769e 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.hxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: databasedocument.hxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: kz $ $Date: 2008-04-04 14:33:18 $
+ * last change: $Author: kz $ $Date: 2008-04-08 12:43:13 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -220,12 +220,6 @@ public:
return new ODatabaseDocument( _pImpl );
}
- // XInterface
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
-
- // XTypeProvider
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
-
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index e762c3c37..66ef67391 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: documentdefinition.cxx,v $
*
- * $Revision: 1.57 $
+ * $Revision: 1.58 $
*
- * last change: $Author: kz $ $Date: 2008-04-04 14:49:32 $
+ * last change: $Author: kz $ $Date: 2008-04-08 12:42:32 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1546,7 +1546,7 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC
// .........................................................................
// put the common load arguments into the document's media descriptor
- lcl_putLoadArgs( aMediaDesc, _bSuppressMacros, _bReadOnly, m_pImpl->m_aProps.aTitle );
+ lcl_putLoadArgs( aMediaDesc, _bSuppressMacros, _bReadOnly );
return aMediaDesc.getPropertyValues();
}
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index fe9b977b8..c990f88cf 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: AppController.cxx,v $
*
- * $Revision: 1.57 $
+ * $Revision: 1.58 $
*
- * last change: $Author: kz $ $Date: 2008-04-04 14:53:36 $
+ * last change: $Author: kz $ $Date: 2008-04-08 12:42:49 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1296,7 +1296,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
SharedConnection xConnection( ensureConnection() );
if ( xConnection.is() )
{
- RelationDesigner aDesigner( getORB(), this, m_xCurrentFrame );
+ RelationDesigner aDesigner( getORB(), this, m_aCurrentFrame.getFrame() );
Reference< XDataSource > xDataSource( m_xDataSource, UNO_QUERY );
Reference< XComponent > xComponent( aDesigner.createNew( xDataSource ), UNO_QUERY );
addDocumentListener( xComponent, NULL );
@@ -1808,23 +1808,23 @@ Reference< XComponent > OApplicationController::openElement(const ::rtl::OUStrin
if ( _eType == E_TABLE )
{
if ( impl_isAlterableView_nothrow( _sName ) )
- pDesigner.reset( new QueryDesigner( getORB(), this, m_xCurrentFrame, true, bQuerySQLMode ) );
+ pDesigner.reset( new QueryDesigner( getORB(), this, m_aCurrentFrame.getFrame(), true, bQuerySQLMode ) );
else
- pDesigner.reset( new TableDesigner( getORB(), this, m_xCurrentFrame ) );
+ pDesigner.reset( new TableDesigner( getORB(), this, m_aCurrentFrame.getFrame() ) );
}
else if ( _eType == E_QUERY )
{
- pDesigner.reset( new QueryDesigner( getORB(), this, m_xCurrentFrame, false, bQuerySQLMode ) );
+ pDesigner.reset( new QueryDesigner( getORB(), this, m_aCurrentFrame.getFrame(), false, bQuerySQLMode ) );
}
else if ( _eType == E_REPORT )
{
- pDesigner.reset( new ReportDesigner( getORB(),this, m_xCurrentFrame ) );
+ pDesigner.reset( new ReportDesigner( getORB(),this, m_aCurrentFrame.getFrame() ) );
}
aDataSource <<= m_xDataSource;
}
else
{
- pDesigner.reset( new ResultSetBrowser( getORB(), this, m_xCurrentFrame, _eType == E_TABLE ) );
+ pDesigner.reset( new ResultSetBrowser( getORB(), this, m_aCurrentFrame.getFrame(), _eType == E_TABLE ) );
aArgs.realloc(1);
aArgs[0].Name = PROPERTY_SHOWMENU;
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index b6574dd5c..160c87082 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: genericcontroller.cxx,v $
*
- * $Revision: 1.85 $
+ * $Revision: 1.86 $
*
- * last change: $Author: kz $ $Date: 2008-04-04 14:56:57 $
+ * last change: $Author: kz $ $Date: 2008-04-08 12:43:05 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -398,8 +398,7 @@ void OGenericUnoController::attachFrame( const Reference< XFrame >& _rxFrame ) t
stopFrameListening( m_aCurrentFrame.getFrame() );
Reference< XFrame > xFrame = m_aCurrentFrame.attachFrame( _rxFrame );
- if( startFrameListening( xFrame ) )
- m_bFrameUiActive = m_xCurrentFrame->isActive();
+ startFrameListening( xFrame );
loadMenu( xFrame );
diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx
index 912c63143..536755e9a 100644
--- a/dbaccess/source/ui/misc/singledoccontroller.cxx
+++ b/dbaccess/source/ui/misc/singledoccontroller.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: singledoccontroller.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: kz $ $Date: 2008-04-07 12:32:46 $
+ * last change: $Author: kz $ $Date: 2008-04-08 12:42:57 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -43,10 +43,9 @@
#include "dbustrings.hrc"
#include "moduledbu.hxx"
#include "singledoccontroller.hxx"
-#include "UITools.hxx"
+#include <com/sun/star/frame/XUntitledNumbers.hpp>
/** === begin UNO includes === **/
-#include <com/sun/star/frame/XUntitledNumbers.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -54,20 +53,19 @@
#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/frame/XUntitledNumbers.hpp>
/** === end UNO includes === **/
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
-#include <vcl/msgbox.hxx>
-#include <cppuhelper/typeprovider.hxx>
#include <connectivity/dbexception.hxx>
#include <connectivity/dbtools.hxx>
#include <cppuhelper/typeprovider.hxx>
+#include <rtl/ustrbuf.hxx>
#include <toolkit/unohlp.hxx>
#include <tools/debug.hxx>
#include <vcl/msgbox.hxx>
-#include <rtl/ustrbuf.hxx>
//........................................................................
namespace dbaui
{
@@ -102,6 +100,7 @@ namespace dbaui
using ::com::sun::star::lang::IllegalArgumentException;
using ::com::sun::star::uno::UNO_SET_THROW;
using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::frame::XUntitledNumbers;
/** === end UNO using === **/
class DataSourceHolder
@@ -156,14 +155,14 @@ namespace dbaui
DataSourceHolder m_aDataSource;
Reference< XModel > m_xDocument;
Reference< XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier
- sal_Int32 m_nDocStartNumber;
+ sal_Int32 m_nDocStartNumber;
sal_Bool m_bSuspended; // is true when the controller was already suspended
sal_Bool m_bEditable; // is the control readonly or not
sal_Bool m_bModified; // is the data modified
OSingleDocumentControllerImpl()
:m_aDocScriptSupport()
- , m_nDocStartNumber(1)
+ ,m_nDocStartNumber(1)
,m_bSuspended( sal_False )
,m_bEditable(sal_True)
,m_bModified(sal_False)
@@ -232,10 +231,6 @@ namespace dbaui
connectionLostMessage();
throw IllegalArgumentException();
}
- Reference< XUntitledNumbers > xUntitledProvider(getModel(), UNO_QUERY );
- m_pImpl->m_nDocStartNumber = 1;
- if ( xUntitledProvider.is() )
- m_pImpl->m_nDocStartNumber = xUntitledProvider->leaseNumber(static_cast<XWeak*>(this));
}
//--------------------------------------------------------------------
@@ -476,6 +471,21 @@ namespace dbaui
return sal_True;
}
+
+ // -----------------------------------------------------------------------------
+ sal_Bool SAL_CALL OSingleDocumentController::attachModel( const Reference< XModel > & _rxModel) throw( RuntimeException )
+ {
+ if ( !OSingleDocumentController_Base::attachModel( _rxModel ) )
+ return sal_False;
+
+ Reference< XUntitledNumbers > xUntitledProvider( _rxModel, UNO_QUERY );
+ m_pImpl->m_nDocStartNumber = 1;
+ if ( xUntitledProvider.is() )
+ m_pImpl->m_nDocStartNumber = xUntitledProvider->leaseNumber( static_cast< XWeak* >( this ) );
+
+ return sal_True;
+ }
+
// -----------------------------------------------------------------------------
FeatureState OSingleDocumentController::GetState(sal_uInt16 _nId) const
{
@@ -650,32 +660,21 @@ namespace dbaui
}
// -----------------------------------------------------------------------------
- Reference< XEmbeddedScripts > SAL_CALL OSingleDocumentController::getScriptContainer() throw (RuntimeException)
- {
- ::osl::MutexGuard aGuard( m_aMutex );
- if ( !m_pImpl->documentHasScriptSupport() )
- return NULL;
-
- return Reference< XEmbeddedScripts >( getDatabaseDocument(), UNO_QUERY_THROW );
- }
-
- // -----------------------------------------------------------------------------
- uno::Reference< frame::XModel > OSingleDocumentController::getPrivateModel() const
+ Reference< XModel > OSingleDocumentController::getPrivateModel() const
{
return getDatabaseDocument();
}
-
// -----------------------------------------------------------------------------
// XTitle
::rtl::OUString SAL_CALL OSingleDocumentController::getTitle()
- throw (uno::RuntimeException)
+ throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
if ( m_bExternalTitle )
return impl_getTitleHelper_throw()->getTitle ();
::rtl::OUStringBuffer sTitle;
- Reference< XTitle > xTitle(getPrivateModel(),uno::UNO_QUERY);
+ Reference< XTitle > xTitle(getPrivateModel(),UNO_QUERY);
if ( xTitle.is() )
{
sTitle.append( xTitle->getTitle() );
@@ -697,6 +696,17 @@ namespace dbaui
{
return m_pImpl->m_nDocStartNumber;
}
+
+ // -----------------------------------------------------------------------------
+ Reference< XEmbeddedScripts > SAL_CALL OSingleDocumentController::getScriptContainer() throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_pImpl->documentHasScriptSupport() )
+ return NULL;
+
+ return Reference< XEmbeddedScripts >( getDatabaseDocument(), UNO_QUERY_THROW );
+ }
+
//........................................................................
} // namespace dbaui
//........................................................................
diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx
index 254ab13fc..e6268800c 100644
--- a/reportdesign/inc/ReportDefinition.hxx
+++ b/reportdesign/inc/ReportDefinition.hxx
@@ -6,9 +6,9 @@
*
* $RCSfile: ReportDefinition.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: kz $ $Date: 2008-04-04 15:06:56 $
+ * last change: $Author: kz $ $Date: 2008-04-08 12:46:07 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -361,21 +361,6 @@ namespace reportdesign
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getNumberFormatSettings( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > SAL_CALL getNumberFormats( ) throw (::com::sun::star::uno::RuntimeException);
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getContext();
-
- /** return the SdrModel of the real model
- *
- * \return
- */
- ::boost::shared_ptr<rptui::OReportModel> getSdrModel() const;
-
- static ::boost::shared_ptr<rptui::OReportModel> getSdrModel(::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& _xReportDefinition);
-
- // comphelper::IEmbeddedHelper
- virtual com::sun::star::uno::Reference < com::sun::star::embed::XStorage > getStorage() const;
- virtual ::comphelper::EmbeddedObjectContainer& getEmbeddedObjectContainer() const;
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > getInteractionHandler() const;
- virtual bool isEnableSetModified() const;
// XTitle
virtual ::rtl::OUString SAL_CALL getTitle( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setTitle( const ::rtl::OUString& sTitle ) throw (::com::sun::star::uno::RuntimeException);
@@ -389,6 +374,12 @@ namespace reportdesign
virtual void SAL_CALL releaseNumber( ::sal_Int32 nNumber ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL releaseNumberForComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xComponent ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::rtl::OUString SAL_CALL getUntitledPrefix( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // comphelper::IEmbeddedHelper
+ virtual com::sun::star::uno::Reference < com::sun::star::embed::XStorage > getStorage() const;
+ virtual ::comphelper::EmbeddedObjectContainer& getEmbeddedObjectContainer() const;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > getInteractionHandler() const;
+ virtual bool isEnableSetModified() const;
};
// =============================================================================
} // namespace reportdesign