2010-10-12 15:59:03 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-14 17:39:53 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2006-09-17 05:39:41 +00:00
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
#include "datasource.hxx"
|
2008-01-30 07:33:58 +00:00
|
|
|
#include "module_dba.hxx"
|
2000-09-18 23:16:46 +00:00
|
|
|
#include "userinformation.hxx"
|
2004-08-02 14:09:24 +00:00
|
|
|
#include "commandcontainer.hxx"
|
2008-01-30 07:33:58 +00:00
|
|
|
#include "dbastrings.hrc"
|
|
|
|
#include "core_resource.hxx"
|
|
|
|
#include "core_resource.hrc"
|
|
|
|
#include "connection.hxx"
|
2011-07-23 10:13:13 +02:00
|
|
|
#include "SharedConnection.hxx"
|
2006-04-19 12:19:05 +00:00
|
|
|
#include "databasedocument.hxx"
|
2010-03-16 10:59:46 +01:00
|
|
|
#include "OAuthenticationContinuation.hxx"
|
2008-01-30 07:33:58 +00:00
|
|
|
|
2009-12-16 12:46:33 +01:00
|
|
|
|
2006-08-15 09:44:50 +00:00
|
|
|
#include <com/sun/star/beans/NamedValue.hpp>
|
|
|
|
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
|
|
|
#include <com/sun/star/beans/PropertyState.hpp>
|
2008-08-19 08:52:59 +00:00
|
|
|
#include <com/sun/star/beans/XPropertyContainer.hpp>
|
2005-07-08 09:36:39 +00:00
|
|
|
#include <com/sun/star/document/XDocumentSubStorageSupplier.hpp>
|
2005-03-10 15:34:20 +00:00
|
|
|
#include <com/sun/star/document/XEventBroadcaster.hpp>
|
2008-08-19 08:52:59 +00:00
|
|
|
#include <com/sun/star/embed/XTransactedObject.hpp>
|
|
|
|
#include <com/sun/star/lang/DisposedException.hpp>
|
|
|
|
#include <com/sun/star/reflection/XProxyFactory.hpp>
|
|
|
|
#include <com/sun/star/sdbc/XDriverAccess.hpp>
|
|
|
|
#include <com/sun/star/sdbc/XDriverManager.hpp>
|
|
|
|
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
|
|
|
|
#include <com/sun/star/ucb/AuthenticationRequest.hpp>
|
|
|
|
#include <com/sun/star/ucb/XInteractionSupplyAuthentication.hpp>
|
2005-03-10 15:34:20 +00:00
|
|
|
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
2008-08-19 08:52:59 +00:00
|
|
|
#include <com/sun/star/view/XPrintable.hpp>
|
|
|
|
|
|
|
|
#include <comphelper/extract.hxx>
|
|
|
|
#include <comphelper/guarding.hxx>
|
|
|
|
#include <comphelper/interaction.hxx>
|
|
|
|
#include <comphelper/namedvaluecollection.hxx>
|
|
|
|
#include <comphelper/property.hxx>
|
|
|
|
#include <comphelper/seqstream.hxx>
|
|
|
|
#include <comphelper/sequence.hxx>
|
|
|
|
#include <connectivity/dbexception.hxx>
|
2009-12-16 12:46:33 +01:00
|
|
|
#include <connectivity/dbtools.hxx>
|
2008-08-19 08:52:59 +00:00
|
|
|
#include <cppuhelper/typeprovider.hxx>
|
|
|
|
#include <tools/debug.hxx>
|
|
|
|
#include <tools/diagnose_ex.h>
|
2011-02-03 00:33:36 +01:00
|
|
|
#include <osl/diagnose.h>
|
2008-08-19 08:52:59 +00:00
|
|
|
#include <tools/urlobj.hxx>
|
|
|
|
#include <typelib/typedescription.hxx>
|
|
|
|
#include <unotools/confignode.hxx>
|
|
|
|
#include <unotools/sharedunocomponent.hxx>
|
2009-04-23 10:42:05 +00:00
|
|
|
#include <rtl/logfile.hxx>
|
2009-11-27 10:17:16 +01:00
|
|
|
#include <rtl/digest.h>
|
2001-11-01 15:45:25 +00:00
|
|
|
#include <algorithm>
|
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
using namespace ::com::sun::star::sdbc;
|
2000-12-12 11:20:31 +00:00
|
|
|
using namespace ::com::sun::star::sdbcx;
|
2000-09-18 23:16:46 +00:00
|
|
|
using namespace ::com::sun::star::sdb;
|
|
|
|
using namespace ::com::sun::star::beans;
|
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::lang;
|
2004-08-02 14:09:24 +00:00
|
|
|
using namespace ::com::sun::star::embed;
|
2000-09-18 23:16:46 +00:00
|
|
|
using namespace ::com::sun::star::container;
|
|
|
|
using namespace ::com::sun::star::util;
|
|
|
|
using namespace ::com::sun::star::io;
|
2000-11-08 15:05:02 +00:00
|
|
|
using namespace ::com::sun::star::task;
|
|
|
|
using namespace ::com::sun::star::ucb;
|
2004-08-02 14:09:24 +00:00
|
|
|
using namespace ::com::sun::star::frame;
|
2002-08-12 07:54:24 +00:00
|
|
|
using namespace ::com::sun::star::reflection;
|
2000-09-18 23:16:46 +00:00
|
|
|
using namespace ::cppu;
|
|
|
|
using namespace ::osl;
|
2000-11-06 16:48:22 +00:00
|
|
|
using namespace ::dbtools;
|
2000-11-08 15:05:02 +00:00
|
|
|
using namespace ::comphelper;
|
2005-03-04 08:43:20 +00:00
|
|
|
namespace css = ::com::sun::star;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2000-10-18 15:16:39 +00:00
|
|
|
namespace dbaccess
|
|
|
|
{
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
//============================================================
|
|
|
|
//= FlushNotificationAdapter
|
|
|
|
//============================================================
|
|
|
|
typedef ::cppu::WeakImplHelper1< XFlushListener > FlushNotificationAdapter_Base;
|
|
|
|
/** helper class which implements a XFlushListener, and forwards all
|
|
|
|
notification events to another XFlushListener
|
|
|
|
|
|
|
|
The speciality is that the foreign XFlushListener instance, to which
|
|
|
|
the notifications are forwarded, is held weak.
|
|
|
|
|
|
|
|
Thus, the class can be used with XFlushable instance which hold
|
|
|
|
their listeners with a hard reference, if you simply do not *want*
|
|
|
|
to be held hard-ref-wise.
|
|
|
|
*/
|
|
|
|
class FlushNotificationAdapter : public FlushNotificationAdapter_Base
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
WeakReference< XFlushable > m_aBroadcaster;
|
|
|
|
WeakReference< XFlushListener > m_aListener;
|
2005-10-24 07:28:36 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
public:
|
|
|
|
static void installAdapter( const Reference< XFlushable >& _rxBroadcaster, const Reference< XFlushListener >& _rxListener )
|
2005-10-24 07:28:36 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
Reference< XFlushListener > xAdapter( new FlushNotificationAdapter( _rxBroadcaster, _rxListener ) );
|
|
|
|
}
|
2005-10-24 07:28:36 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
protected:
|
|
|
|
FlushNotificationAdapter( const Reference< XFlushable >& _rxBroadcaster, const Reference< XFlushListener >& _rxListener );
|
|
|
|
~FlushNotificationAdapter();
|
|
|
|
|
|
|
|
void SAL_CALL impl_dispose( bool _bRevokeListener );
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// XFlushListener
|
|
|
|
virtual void SAL_CALL flushed( const ::com::sun::star::lang::EventObject& rEvent ) throw (::com::sun::star::uno::RuntimeException);
|
|
|
|
// XEventListener
|
|
|
|
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
|
|
|
|
};
|
|
|
|
|
|
|
|
//------------------------------------------------------------
|
|
|
|
DBG_NAME( FlushNotificationAdapter )
|
|
|
|
//------------------------------------------------------------
|
|
|
|
FlushNotificationAdapter::FlushNotificationAdapter( const Reference< XFlushable >& _rxBroadcaster, const Reference< XFlushListener >& _rxListener )
|
|
|
|
:m_aBroadcaster( _rxBroadcaster )
|
|
|
|
,m_aListener( _rxListener )
|
|
|
|
{
|
|
|
|
DBG_CTOR( FlushNotificationAdapter, NULL );
|
2011-02-03 00:33:36 +01:00
|
|
|
OSL_ENSURE( _rxBroadcaster.is(), "FlushNotificationAdapter::FlushNotificationAdapter: invalid flushable!" );
|
2005-10-24 07:28:36 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
osl_incrementInterlockedCount( &m_refCount );
|
2005-10-24 07:28:36 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
if ( _rxBroadcaster.is() )
|
|
|
|
_rxBroadcaster->addFlushListener( this );
|
2005-10-24 07:28:36 +00:00
|
|
|
}
|
2009-04-23 10:42:05 +00:00
|
|
|
osl_decrementInterlockedCount( &m_refCount );
|
2011-02-03 00:33:36 +01:00
|
|
|
OSL_ENSURE( m_refCount == 1, "FlushNotificationAdapter::FlushNotificationAdapter: broadcaster isn't holding by hard ref!?" );
|
2009-04-23 10:42:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------
|
|
|
|
FlushNotificationAdapter::~FlushNotificationAdapter()
|
|
|
|
{
|
|
|
|
DBG_DTOR( FlushNotificationAdapter, NULL );
|
|
|
|
}
|
2005-10-24 07:28:36 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
void SAL_CALL FlushNotificationAdapter::impl_dispose( bool _bRevokeListener )
|
|
|
|
{
|
|
|
|
Reference< XFlushListener > xKeepAlive( this );
|
|
|
|
|
|
|
|
if ( _bRevokeListener )
|
2005-10-24 07:28:36 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
Reference< XFlushable > xFlushable( m_aBroadcaster );
|
|
|
|
if ( xFlushable.is() )
|
|
|
|
xFlushable->removeFlushListener( this );
|
2005-10-24 07:28:36 +00:00
|
|
|
}
|
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
m_aListener = Reference< XFlushListener >();
|
|
|
|
m_aBroadcaster = Reference< XFlushable >();
|
|
|
|
}
|
2005-10-24 07:28:36 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
void SAL_CALL FlushNotificationAdapter::flushed( const EventObject& rEvent ) throw (RuntimeException)
|
|
|
|
{
|
|
|
|
Reference< XFlushListener > xListener( m_aListener );
|
|
|
|
if ( xListener.is() )
|
|
|
|
xListener->flushed( rEvent );
|
|
|
|
else
|
|
|
|
impl_dispose( true );
|
|
|
|
}
|
2005-10-24 07:28:36 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
void SAL_CALL FlushNotificationAdapter::disposing( const EventObject& Source ) throw (RuntimeException)
|
|
|
|
{
|
|
|
|
Reference< XFlushListener > xListener( m_aListener );
|
|
|
|
if ( xListener.is() )
|
|
|
|
xListener->disposing( Source );
|
2005-10-24 07:28:36 +00:00
|
|
|
|
2011-01-03 14:41:49 +01:00
|
|
|
impl_dispose( true );
|
2009-04-23 10:42:05 +00:00
|
|
|
}
|
2005-10-24 07:28:36 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
OAuthenticationContinuation::OAuthenticationContinuation()
|
2010-11-09 22:15:21 +00:00
|
|
|
:m_bRemberPassword(sal_True), // TODO: a meaningful default
|
2010-03-16 10:59:46 +01:00
|
|
|
m_bCanSetUserName(sal_True)
|
2009-04-23 10:42:05 +00:00
|
|
|
{
|
|
|
|
}
|
2005-10-24 07:28:36 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
sal_Bool SAL_CALL OAuthenticationContinuation::canSetRealm( ) throw(RuntimeException)
|
|
|
|
{
|
|
|
|
return sal_False;
|
|
|
|
}
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
void SAL_CALL OAuthenticationContinuation::setRealm( const ::rtl::OUString& /*Realm*/ ) throw(RuntimeException)
|
|
|
|
{
|
2011-02-25 17:47:41 +01:00
|
|
|
OSL_FAIL("OAuthenticationContinuation::setRealm: not supported!");
|
2009-04-23 10:42:05 +00:00
|
|
|
}
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
sal_Bool SAL_CALL OAuthenticationContinuation::canSetUserName( ) throw(RuntimeException)
|
|
|
|
{
|
2010-11-09 22:15:21 +00:00
|
|
|
// we always allow this, even if the database document is read-only. In this case,
|
2009-04-23 10:42:05 +00:00
|
|
|
// it's simply that the user cannot store the new user name.
|
2010-03-16 10:59:46 +01:00
|
|
|
return m_bCanSetUserName;
|
2009-04-23 10:42:05 +00:00
|
|
|
}
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
void SAL_CALL OAuthenticationContinuation::setUserName( const ::rtl::OUString& _rUser ) throw(RuntimeException)
|
|
|
|
{
|
|
|
|
m_sUser = _rUser;
|
|
|
|
}
|
2001-05-15 10:24:21 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
sal_Bool SAL_CALL OAuthenticationContinuation::canSetPassword( ) throw(RuntimeException)
|
|
|
|
{
|
|
|
|
return sal_True;
|
|
|
|
}
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
void SAL_CALL OAuthenticationContinuation::setPassword( const ::rtl::OUString& _rPassword ) throw(RuntimeException)
|
|
|
|
{
|
|
|
|
m_sPassword = _rPassword;
|
|
|
|
}
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
Sequence< RememberAuthentication > SAL_CALL OAuthenticationContinuation::getRememberPasswordModes( RememberAuthentication& _reDefault ) throw(RuntimeException)
|
|
|
|
{
|
|
|
|
Sequence< RememberAuthentication > aReturn(1);
|
|
|
|
_reDefault = aReturn[0] = RememberAuthentication_SESSION;
|
|
|
|
return aReturn;
|
|
|
|
}
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
void SAL_CALL OAuthenticationContinuation::setRememberPassword( RememberAuthentication _eRemember ) throw(RuntimeException)
|
|
|
|
{
|
|
|
|
m_bRemberPassword = (RememberAuthentication_NO != _eRemember);
|
|
|
|
}
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
sal_Bool SAL_CALL OAuthenticationContinuation::canSetAccount( ) throw(RuntimeException)
|
|
|
|
{
|
|
|
|
return sal_False;
|
|
|
|
}
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
void SAL_CALL OAuthenticationContinuation::setAccount( const ::rtl::OUString& ) throw(RuntimeException)
|
|
|
|
{
|
2011-02-25 17:47:41 +01:00
|
|
|
OSL_FAIL("OAuthenticationContinuation::setAccount: not supported!");
|
2009-04-23 10:42:05 +00:00
|
|
|
}
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
Sequence< RememberAuthentication > SAL_CALL OAuthenticationContinuation::getRememberAccountModes( RememberAuthentication& _reDefault ) throw(RuntimeException)
|
|
|
|
{
|
|
|
|
Sequence < RememberAuthentication > aReturn(1);
|
|
|
|
aReturn[0] = RememberAuthentication_NO;
|
|
|
|
_reDefault = RememberAuthentication_NO;
|
|
|
|
return aReturn;
|
|
|
|
}
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
void SAL_CALL OAuthenticationContinuation::setRememberAccount( RememberAuthentication /*Remember*/ ) throw(RuntimeException)
|
|
|
|
{
|
2011-03-01 17:52:28 +01:00
|
|
|
OSL_FAIL("OAuthenticationContinuation::setRememberAccount: not supported!");
|
2009-04-23 10:42:05 +00:00
|
|
|
}
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
/** The class OSharedConnectionManager implements a structure to share connections.
|
|
|
|
It owns the master connections which will be disposed when the last connection proxy is gone.
|
|
|
|
*/
|
|
|
|
typedef ::cppu::WeakImplHelper1< XEventListener > OConnectionHelper_BASE;
|
|
|
|
// need to hold the digest
|
|
|
|
struct TDigestHolder
|
|
|
|
{
|
|
|
|
sal_uInt8 m_pBuffer[RTL_DIGEST_LENGTH_SHA1];
|
|
|
|
TDigestHolder()
|
2000-11-08 15:05:02 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
m_pBuffer[0] = 0;
|
2000-11-08 15:05:02 +00:00
|
|
|
}
|
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
};
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
class OSharedConnectionManager : public OConnectionHelper_BASE
|
|
|
|
{
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
// contains the currently used master connections
|
|
|
|
typedef struct
|
2000-11-08 15:05:02 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
Reference< XConnection > xMasterConnection;
|
|
|
|
oslInterlockedCount nALiveCount;
|
|
|
|
} TConnectionHolder;
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
// the less-compare functor, used for the stl::map
|
|
|
|
struct TDigestLess : public ::std::binary_function< TDigestHolder, TDigestHolder, bool>
|
2002-08-13 12:26:58 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
bool operator() (const TDigestHolder& x, const TDigestHolder& y) const
|
2002-08-13 12:26:58 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
sal_uInt32 i;
|
|
|
|
for(i=0;i < RTL_DIGEST_LENGTH_SHA1 && (x.m_pBuffer[i] >= y.m_pBuffer[i]); ++i)
|
|
|
|
;
|
|
|
|
return i < RTL_DIGEST_LENGTH_SHA1;
|
2002-08-13 12:26:58 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
typedef ::std::map< TDigestHolder,TConnectionHolder,TDigestLess> TConnectionMap; // holds the master connections
|
|
|
|
typedef ::std::map< Reference< XConnection >,TConnectionMap::iterator> TSharedConnectionMap;// holds the shared connections
|
2002-08-12 07:54:24 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
::osl::Mutex m_aMutex;
|
2010-11-09 22:15:21 +00:00
|
|
|
TConnectionMap m_aConnections; // remember the master connection in conjunction with the digest
|
2009-04-23 10:42:05 +00:00
|
|
|
TSharedConnectionMap m_aSharedConnection; // the shared connections with conjunction with an iterator into the connections map
|
|
|
|
Reference< XProxyFactory > m_xProxyFactory;
|
2002-08-12 07:54:24 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
protected:
|
|
|
|
~OSharedConnectionManager();
|
2002-08-12 07:54:24 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
public:
|
|
|
|
OSharedConnectionManager(const Reference< XMultiServiceFactory >& _rxServiceFactory);
|
2002-08-12 07:54:24 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException);
|
|
|
|
Reference<XConnection> getConnection( const rtl::OUString& url,
|
|
|
|
const rtl::OUString& user,
|
|
|
|
const rtl::OUString& password,
|
|
|
|
const Sequence< PropertyValue >& _aInfo,
|
|
|
|
ODatabaseSource* _pDataSource);
|
|
|
|
void addEventListener(const Reference<XConnection>& _rxConnection,TConnectionMap::iterator& _rIter);
|
|
|
|
};
|
2002-08-12 07:54:24 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
DBG_NAME(OSharedConnectionManager)
|
|
|
|
OSharedConnectionManager::OSharedConnectionManager(const Reference< XMultiServiceFactory >& _rxServiceFactory)
|
|
|
|
{
|
|
|
|
DBG_CTOR(OSharedConnectionManager,NULL);
|
|
|
|
m_xProxyFactory.set(_rxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.ProxyFactory"))),UNO_QUERY);
|
|
|
|
}
|
2004-08-02 14:09:24 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
OSharedConnectionManager::~OSharedConnectionManager()
|
|
|
|
{
|
|
|
|
DBG_DTOR(OSharedConnectionManager,NULL);
|
|
|
|
}
|
2002-08-12 07:54:24 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
void SAL_CALL OSharedConnectionManager::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException)
|
|
|
|
{
|
|
|
|
MutexGuard aGuard(m_aMutex);
|
|
|
|
Reference<XConnection> xConnection(Source.Source,UNO_QUERY);
|
|
|
|
TSharedConnectionMap::iterator aFind = m_aSharedConnection.find(xConnection);
|
|
|
|
if ( m_aSharedConnection.end() != aFind )
|
2002-08-12 07:54:24 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
osl_decrementInterlockedCount(&aFind->second->second.nALiveCount);
|
|
|
|
if ( !aFind->second->second.nALiveCount )
|
2002-08-12 07:54:24 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
::comphelper::disposeComponent(aFind->second->second.xMasterConnection);
|
|
|
|
m_aConnections.erase(aFind->second);
|
2002-08-12 07:54:24 +00:00
|
|
|
}
|
2009-04-23 10:42:05 +00:00
|
|
|
m_aSharedConnection.erase(aFind);
|
2002-08-12 07:54:24 +00:00
|
|
|
}
|
2009-04-23 10:42:05 +00:00
|
|
|
}
|
2002-08-12 07:54:24 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
Reference<XConnection> OSharedConnectionManager::getConnection( const rtl::OUString& url,
|
|
|
|
const rtl::OUString& user,
|
|
|
|
const rtl::OUString& password,
|
|
|
|
const Sequence< PropertyValue >& _aInfo,
|
|
|
|
ODatabaseSource* _pDataSource)
|
|
|
|
{
|
|
|
|
MutexGuard aGuard(m_aMutex);
|
|
|
|
TConnectionMap::key_type nId;
|
|
|
|
Sequence< PropertyValue > aInfoCopy(_aInfo);
|
|
|
|
sal_Int32 nPos = aInfoCopy.getLength();
|
|
|
|
aInfoCopy.realloc( nPos + 2 );
|
|
|
|
aInfoCopy[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TableFilter"));
|
|
|
|
aInfoCopy[nPos++].Value <<= _pDataSource->m_pImpl->m_aTableFilter;
|
|
|
|
aInfoCopy[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TableTypeFilter"));
|
2011-02-07 20:20:28 +01:00
|
|
|
aInfoCopy[nPos++].Value <<= _pDataSource->m_pImpl->m_aTableTypeFilter;
|
2009-04-23 10:42:05 +00:00
|
|
|
|
|
|
|
::rtl::OUString sUser = user;
|
|
|
|
::rtl::OUString sPassword = password;
|
2011-12-19 18:10:37 -02:00
|
|
|
if ((sUser.isEmpty()) && (sPassword.isEmpty()) && (!_pDataSource->m_pImpl->m_sUser.isEmpty()))
|
2009-04-23 10:42:05 +00:00
|
|
|
{ // ease the usage of this method. data source which are intended to have a user automatically
|
|
|
|
// fill in the user/password combination if the caller of this method does not specify otherwise
|
|
|
|
sUser = _pDataSource->m_pImpl->m_sUser;
|
2011-12-19 18:10:37 -02:00
|
|
|
if (!_pDataSource->m_pImpl->m_aPassword.isEmpty())
|
2009-04-23 10:42:05 +00:00
|
|
|
sPassword = _pDataSource->m_pImpl->m_aPassword;
|
|
|
|
}
|
2002-08-12 07:54:24 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
::connectivity::OConnectionWrapper::createUniqueId(url,aInfoCopy,nId.m_pBuffer,sUser,sPassword);
|
|
|
|
TConnectionMap::iterator aIter = m_aConnections.find(nId);
|
2002-08-12 07:54:24 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
if ( m_aConnections.end() == aIter )
|
|
|
|
{
|
|
|
|
TConnectionHolder aHolder;
|
|
|
|
aHolder.nALiveCount = 0; // will be incremented by addListener
|
|
|
|
aHolder.xMasterConnection = _pDataSource->buildIsolatedConnection(user,password);
|
|
|
|
aIter = m_aConnections.insert(TConnectionMap::value_type(nId,aHolder)).first;
|
2002-08-12 07:54:24 +00:00
|
|
|
}
|
2009-04-23 10:42:05 +00:00
|
|
|
|
|
|
|
Reference<XConnection> xRet;
|
|
|
|
if ( aIter->second.xMasterConnection.is() )
|
2002-08-12 07:54:24 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
Reference< XAggregation > xConProxy = m_xProxyFactory->createProxy(aIter->second.xMasterConnection.get());
|
|
|
|
xRet = new OSharedConnection(xConProxy);
|
|
|
|
m_aSharedConnection.insert(TSharedConnectionMap::value_type(xRet,aIter));
|
|
|
|
addEventListener(xRet,aIter);
|
2002-08-12 07:54:24 +00:00
|
|
|
}
|
2002-08-12 08:21:59 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
return xRet;
|
|
|
|
}
|
|
|
|
void OSharedConnectionManager::addEventListener(const Reference<XConnection>& _rxConnection,TConnectionMap::iterator& _rIter)
|
|
|
|
{
|
|
|
|
Reference<XComponent> xComp(_rxConnection,UNO_QUERY);
|
|
|
|
xComp->addEventListener(this);
|
|
|
|
OSL_ENSURE( m_aConnections.end() != _rIter , "Iterator is end!");
|
|
|
|
osl_incrementInterlockedCount(&_rIter->second.nALiveCount);
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace
|
|
|
|
{
|
|
|
|
Sequence< PropertyValue > lcl_filterDriverProperties( const Reference< XDriver >& _xDriver, const ::rtl::OUString& _sUrl,
|
|
|
|
const Sequence< PropertyValue >& _rDataSourceSettings, const AsciiPropertyValue* _pKnownSettings )
|
2004-08-02 14:09:24 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
if ( _xDriver.is() )
|
2004-08-02 14:09:24 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
Sequence< DriverPropertyInfo > aDriverInfo(_xDriver->getPropertyInfo(_sUrl,_rDataSourceSettings));
|
2004-08-02 14:09:24 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
const PropertyValue* pDataSourceSetting = _rDataSourceSettings.getConstArray();
|
|
|
|
const PropertyValue* pEnd = pDataSourceSetting + _rDataSourceSettings.getLength();
|
2004-08-02 14:09:24 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
::std::vector< PropertyValue > aRet;
|
2004-08-02 14:09:24 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
for ( ; pDataSourceSetting != pEnd ; ++pDataSourceSetting )
|
|
|
|
{
|
|
|
|
sal_Bool bAllowSetting = sal_False;
|
|
|
|
const AsciiPropertyValue* pSetting = _pKnownSettings;
|
|
|
|
for ( ; pSetting->AsciiName; ++pSetting )
|
2004-08-02 14:09:24 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
if ( !pDataSourceSetting->Name.compareToAscii( pSetting->AsciiName ) )
|
|
|
|
{ // the particular data source setting is known
|
|
|
|
|
|
|
|
const DriverPropertyInfo* pAllowedDriverSetting = aDriverInfo.getConstArray();
|
|
|
|
const DriverPropertyInfo* pDriverSettingsEnd = pAllowedDriverSetting + aDriverInfo.getLength();
|
|
|
|
for ( ; pAllowedDriverSetting != pDriverSettingsEnd; ++pAllowedDriverSetting )
|
|
|
|
{
|
|
|
|
if ( !pAllowedDriverSetting->Name.compareToAscii( pSetting->AsciiName ) )
|
|
|
|
{ // the driver also allows this setting
|
|
|
|
bAllowSetting = sal_True;
|
|
|
|
break;
|
2004-08-02 14:09:24 +00:00
|
|
|
}
|
|
|
|
}
|
2009-04-23 10:42:05 +00:00
|
|
|
break;
|
2004-08-02 14:09:24 +00:00
|
|
|
}
|
|
|
|
}
|
2009-04-23 10:42:05 +00:00
|
|
|
if ( bAllowSetting || !pSetting->AsciiName )
|
|
|
|
{ // if the driver allows this particular setting, or if the setting is completely unknown,
|
|
|
|
// we pass it to the driver
|
|
|
|
aRet.push_back( *pDataSourceSetting );
|
|
|
|
}
|
2004-08-02 14:09:24 +00:00
|
|
|
}
|
2009-04-23 10:42:05 +00:00
|
|
|
if ( !aRet.empty() )
|
|
|
|
return Sequence< PropertyValue >(&(*aRet.begin()),aRet.size());
|
2004-08-02 14:09:24 +00:00
|
|
|
}
|
2009-04-23 10:42:05 +00:00
|
|
|
return Sequence< PropertyValue >();
|
|
|
|
}
|
2006-08-15 09:44:50 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
typedef ::std::map< ::rtl::OUString, sal_Int32 > PropertyAttributeCache;
|
2007-07-24 11:05:01 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
struct IsDefaultAndNotRemoveable : public ::std::unary_function< PropertyValue, bool >
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
const PropertyAttributeCache& m_rAttribs;
|
2007-07-24 11:05:01 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
public:
|
|
|
|
IsDefaultAndNotRemoveable( const PropertyAttributeCache& _rAttribs ) : m_rAttribs( _rAttribs ) { }
|
2007-07-24 11:05:01 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
bool operator()( const PropertyValue& _rProp )
|
|
|
|
{
|
|
|
|
if ( _rProp.State != PropertyState_DEFAULT_VALUE )
|
|
|
|
return false;
|
2007-07-24 11:05:01 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
bool bRemoveable = true;
|
2007-07-24 11:05:01 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
PropertyAttributeCache::const_iterator pos = m_rAttribs.find( _rProp.Name );
|
|
|
|
OSL_ENSURE( pos != m_rAttribs.end(), "IsDefaultAndNotRemoveable: illegal property name!" );
|
|
|
|
if ( pos != m_rAttribs.end() )
|
|
|
|
bRemoveable = ( ( pos->second & PropertyAttribute::REMOVEABLE ) != 0 );
|
2007-07-24 11:05:01 +00:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
return !bRemoveable;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
2000-10-18 15:16:39 +00:00
|
|
|
//============================================================
|
|
|
|
//= ODatabaseContext
|
|
|
|
//============================================================
|
2000-10-24 14:00:08 +00:00
|
|
|
DBG_NAME(ODatabaseSource)
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
extern "C" void SAL_CALL createRegistryInfo_ODatabaseSource()
|
|
|
|
{
|
2008-01-30 07:33:58 +00:00
|
|
|
static ::dba::OAutoRegistration< ODatabaseSource > aAutoRegistration;
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
2005-03-10 15:34:20 +00:00
|
|
|
|
|
|
|
ODatabaseSource::ODatabaseSource(const ::rtl::Reference<ODatabaseModelImpl>& _pImpl)
|
2005-12-21 12:35:18 +00:00
|
|
|
:ModelDependentComponent( _pImpl )
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
,ODatabaseSource_Base( getMutex() )
|
|
|
|
,OPropertySetHelper( ODatabaseSource_Base::rBHelper )
|
2005-12-21 12:35:18 +00:00
|
|
|
,m_aBookmarks( *this, getMutex() )
|
|
|
|
,m_aFlushListeners( getMutex() )
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2000-10-11 10:21:40 +00:00
|
|
|
// some kind of default
|
2001-07-26 08:15:31 +00:00
|
|
|
DBG_CTOR(ODatabaseSource,NULL);
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
OSL_TRACE( "DS: ctor: %p: %p", this, m_pImpl.get() );
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ODatabaseSource::~ODatabaseSource()
|
|
|
|
{
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
OSL_TRACE( "DS: dtor: %p: %p", this, m_pImpl.get() );
|
2000-09-18 23:16:46 +00:00
|
|
|
DBG_DTOR(ODatabaseSource,NULL);
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
if ( !ODatabaseSource_Base::rBHelper.bInDispose && !ODatabaseSource_Base::rBHelper.bDisposed )
|
2004-08-02 14:09:24 +00:00
|
|
|
{
|
|
|
|
acquire();
|
|
|
|
dispose();
|
|
|
|
}
|
|
|
|
}
|
2008-06-25 11:32:03 +00:00
|
|
|
|
|
|
|
void ODatabaseSource::setName( const Reference< XDocumentDataSource >& _rxDocument, const ::rtl::OUString& _rNewName, DBContextAccess )
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::setName" );
|
2008-06-25 11:32:03 +00:00
|
|
|
ODatabaseSource& rModelImpl = dynamic_cast< ODatabaseSource& >( *_rxDocument.get() );
|
|
|
|
|
2008-12-01 12:31:27 +00:00
|
|
|
::osl::MutexGuard aGuard( rModelImpl.m_aMutex );
|
2008-06-25 11:32:03 +00:00
|
|
|
if ( rModelImpl.m_pImpl.is() )
|
|
|
|
rModelImpl.m_pImpl->m_sName = _rNewName;
|
|
|
|
}
|
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
// com::sun::star::lang::XTypeProvider
|
|
|
|
Sequence< Type > ODatabaseSource::getTypes() throw (RuntimeException)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getTypes" );
|
2001-01-23 07:32:02 +00:00
|
|
|
OTypeCollection aPropertyHelperTypes( ::getCppuType( (const Reference< XFastPropertySet > *)0 ),
|
|
|
|
::getCppuType( (const Reference< XPropertySet > *)0 ),
|
|
|
|
::getCppuType( (const Reference< XMultiPropertySet > *)0 ));
|
|
|
|
|
|
|
|
return ::comphelper::concatSequences(
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
ODatabaseSource_Base::getTypes(),
|
|
|
|
aPropertyHelperTypes.getTypes()
|
2001-01-23 07:32:02 +00:00
|
|
|
);
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
2004-08-02 14:09:24 +00:00
|
|
|
Sequence< sal_Int8 > ODatabaseSource::getImplementationId() throw (RuntimeException)
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getImplementationId" );
|
2000-09-18 23:16:46 +00:00
|
|
|
static OImplementationId * pId = 0;
|
|
|
|
if (! pId)
|
|
|
|
{
|
|
|
|
MutexGuard aGuard( Mutex::getGlobalMutex() );
|
|
|
|
if (! pId)
|
|
|
|
{
|
|
|
|
static OImplementationId aId;
|
|
|
|
pId = &aId;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return pId->getImplementationId();
|
|
|
|
}
|
|
|
|
|
|
|
|
// com::sun::star::uno::XInterface
|
|
|
|
Any ODatabaseSource::queryInterface( const Type & rType ) throw (RuntimeException)
|
|
|
|
{
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
Any aIface = ODatabaseSource_Base::queryInterface( rType );
|
|
|
|
if ( !aIface.hasValue() )
|
|
|
|
aIface = ::cppu::OPropertySetHelper::queryInterface( rType );
|
2000-09-18 23:16:46 +00:00
|
|
|
return aIface;
|
|
|
|
}
|
|
|
|
|
2001-11-01 15:29:21 +00:00
|
|
|
void ODatabaseSource::acquire() throw ()
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
ODatabaseSource_Base::acquire();
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
2001-11-01 15:29:21 +00:00
|
|
|
void ODatabaseSource::release() throw ()
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
ODatabaseSource_Base::release();
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2002-08-12 07:54:24 +00:00
|
|
|
void SAL_CALL ODatabaseSource::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException)
|
2000-11-14 12:32:59 +00:00
|
|
|
{
|
2005-03-10 15:34:20 +00:00
|
|
|
if ( m_pImpl.is() )
|
|
|
|
m_pImpl->disposing(Source);
|
2000-11-14 12:32:59 +00:00
|
|
|
}
|
2000-09-18 23:16:46 +00:00
|
|
|
// XServiceInfo
|
|
|
|
rtl::OUString ODatabaseSource::getImplementationName( ) throw(RuntimeException)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getImplementationName" );
|
2008-01-30 07:33:58 +00:00
|
|
|
return getImplementationName_static();
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
2008-01-30 07:33:58 +00:00
|
|
|
rtl::OUString ODatabaseSource::getImplementationName_static( ) throw(RuntimeException)
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getImplementationName_static" );
|
2010-11-11 10:19:47 -03:00
|
|
|
return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dba.ODatabaseSource"));
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Sequence< ::rtl::OUString > ODatabaseSource::getSupportedServiceNames( ) throw (RuntimeException)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getSupportedServiceNames" );
|
2008-01-30 07:33:58 +00:00
|
|
|
return getSupportedServiceNames_static();
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2008-01-30 07:33:58 +00:00
|
|
|
Reference< XInterface > ODatabaseSource::Create( const Reference< XComponentContext >& _rxContext )
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::Create" );
|
2008-01-30 07:33:58 +00:00
|
|
|
::comphelper::ComponentContext aContext( _rxContext );
|
|
|
|
Reference< XSingleServiceFactory > xDBContext( aContext.createComponent( (::rtl::OUString)SERVICE_SDB_DATABASECONTEXT ), UNO_QUERY_THROW );
|
|
|
|
return xDBContext->createInstance();
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
2008-01-30 07:33:58 +00:00
|
|
|
Sequence< ::rtl::OUString > ODatabaseSource::getSupportedServiceNames_static( ) throw (RuntimeException)
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getSupportedServiceNames_static" );
|
2005-03-10 15:34:20 +00:00
|
|
|
Sequence< ::rtl::OUString > aSNS( 2 );
|
2000-09-18 23:16:46 +00:00
|
|
|
aSNS[0] = SERVICE_SDB_DATASOURCE;
|
2005-03-10 15:34:20 +00:00
|
|
|
aSNS[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DocumentDataSource"));
|
2000-09-18 23:16:46 +00:00
|
|
|
return aSNS;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool ODatabaseSource::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::supportsService" );
|
2000-10-11 10:21:40 +00:00
|
|
|
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
// OComponentHelper
|
|
|
|
void ODatabaseSource::disposing()
|
|
|
|
{
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
OSL_TRACE( "DS: disp: %p, %p", this, m_pImpl.get() );
|
|
|
|
ODatabaseSource_Base::WeakComponentImplHelperBase::disposing();
|
2000-09-18 23:16:46 +00:00
|
|
|
OPropertySetHelper::disposing();
|
|
|
|
|
2004-08-02 14:09:24 +00:00
|
|
|
EventObject aDisposeEvent(static_cast<XWeak*>(this));
|
2004-10-22 07:59:06 +00:00
|
|
|
m_aFlushListeners.disposeAndClear( aDisposeEvent );
|
2006-04-19 12:19:05 +00:00
|
|
|
|
|
|
|
ODatabaseDocument::clearObjectContainer(m_pImpl->m_xCommandDefinitions);
|
|
|
|
ODatabaseDocument::clearObjectContainer(m_pImpl->m_xTableDefinitions);
|
2005-03-10 15:34:20 +00:00
|
|
|
m_pImpl.clear();
|
2004-08-02 14:09:24 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::OUString& _rUid, const ::rtl::OUString& _rPwd)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::buildLowLevelConnection" );
|
2000-09-18 23:16:46 +00:00
|
|
|
Reference< XConnection > xReturn;
|
2008-03-06 16:58:49 +00:00
|
|
|
|
|
|
|
Reference< XDriverManager > xManager;
|
|
|
|
if ( !m_pImpl->m_aContext.createComponent( "com.sun.star.sdbc.ConnectionPool", xManager ) )
|
|
|
|
// no connection pool installed, fall back to driver manager
|
|
|
|
m_pImpl->m_aContext.createComponent( "com.sun.star.sdbc.DriverManager", xManager );
|
2001-05-08 12:27:16 +00:00
|
|
|
|
|
|
|
::rtl::OUString sUser(_rUid);
|
|
|
|
::rtl::OUString sPwd(_rPwd);
|
2011-12-19 18:10:37 -02:00
|
|
|
if ((sUser.isEmpty()) && (sPwd.isEmpty()) && (!m_pImpl->m_sUser.isEmpty()))
|
2001-05-08 12:27:16 +00:00
|
|
|
{ // ease the usage of this method. data source which are intended to have a user automatically
|
|
|
|
// fill in the user/password combination if the caller of this method does not specify otherwise
|
2005-03-10 15:34:20 +00:00
|
|
|
sUser = m_pImpl->m_sUser;
|
2011-12-19 18:10:37 -02:00
|
|
|
if (!m_pImpl->m_aPassword.isEmpty())
|
2005-03-10 15:34:20 +00:00
|
|
|
sPwd = m_pImpl->m_aPassword;
|
2001-05-08 12:27:16 +00:00
|
|
|
}
|
|
|
|
|
2001-08-28 14:59:32 +00:00
|
|
|
sal_uInt16 nExceptionMessageId = RID_STR_COULDNOTCONNECT_UNSPECIFIED;
|
2000-09-18 23:16:46 +00:00
|
|
|
if (xManager.is())
|
|
|
|
{
|
|
|
|
sal_Int32 nAdditionalArgs(0);
|
2011-12-19 18:10:37 -02:00
|
|
|
if (!sUser.isEmpty()) ++nAdditionalArgs;
|
|
|
|
if (!sPwd.isEmpty()) ++nAdditionalArgs;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
Sequence< PropertyValue > aUserPwd(nAdditionalArgs);
|
2002-02-06 11:50:25 +00:00
|
|
|
sal_Int32 nArgPos = 0;
|
2001-05-08 12:27:16 +00:00
|
|
|
if (sUser.getLength())
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2010-11-11 10:19:47 -03:00
|
|
|
aUserPwd[ nArgPos ].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user"));
|
2002-02-06 11:50:25 +00:00
|
|
|
aUserPwd[ nArgPos ].Value <<= sUser;
|
|
|
|
++nArgPos;
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
2011-12-19 18:10:37 -02:00
|
|
|
if (!sPwd.isEmpty())
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2010-11-11 10:19:47 -03:00
|
|
|
aUserPwd[ nArgPos ].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("password"));
|
2002-02-06 11:50:25 +00:00
|
|
|
aUserPwd[ nArgPos ].Value <<= sPwd;
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
2004-08-02 14:09:24 +00:00
|
|
|
Reference< XDriver > xDriver;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Reference< XDriverAccess > xAccessDrivers( xManager, UNO_QUERY );
|
|
|
|
if ( xAccessDrivers.is() )
|
2005-03-10 15:34:20 +00:00
|
|
|
xDriver = xAccessDrivers->getDriverByURL( m_pImpl->m_sConnectURL );
|
2004-08-02 14:09:24 +00:00
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
2011-02-25 17:47:41 +01:00
|
|
|
OSL_FAIL( "ODatabaseSource::buildLowLevelConnection: got a strange exception while analyzing the error!" );
|
2004-08-02 14:09:24 +00:00
|
|
|
}
|
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
|
|
|
if ( !xDriver.is() || !xDriver->acceptsURL( m_pImpl->m_sConnectURL ) )
|
|
|
|
{
|
|
|
|
// Nowadays, it's allowed for a driver to be registered for a given URL, but actually not to accept it.
|
|
|
|
// This is because registration nowadays happens at compile time (by adding respective configuration data),
|
|
|
|
// but acceptance is decided at runtime.
|
2004-08-02 14:09:24 +00:00
|
|
|
nExceptionMessageId = RID_STR_COULDNOTCONNECT_NODRIVER;
|
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
|
|
|
}
|
2000-09-18 23:16:46 +00:00
|
|
|
else
|
2001-08-28 14:59:32 +00:00
|
|
|
{
|
2006-08-15 09:44:50 +00:00
|
|
|
Sequence< PropertyValue > aDriverInfo = lcl_filterDriverProperties(
|
|
|
|
xDriver,
|
|
|
|
m_pImpl->m_sConnectURL,
|
|
|
|
m_pImpl->m_xSettings->getPropertyValues(),
|
|
|
|
m_pImpl->getDefaultDataSourceSettings()
|
|
|
|
);
|
2001-08-28 14:59:32 +00:00
|
|
|
|
2005-03-23 08:46:37 +00:00
|
|
|
if ( m_pImpl->isEmbeddedDatabase() )
|
2004-11-09 11:25:39 +00:00
|
|
|
{
|
|
|
|
sal_Int32 nCount = aDriverInfo.getLength();
|
|
|
|
aDriverInfo.realloc(nCount + 2 );
|
|
|
|
aDriverInfo[nCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"));
|
2005-03-10 15:34:20 +00:00
|
|
|
aDriverInfo[nCount++].Value <<= m_pImpl->getURL();
|
2004-11-09 11:25:39 +00:00
|
|
|
aDriverInfo[nCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Storage"));
|
2005-07-08 09:36:39 +00:00
|
|
|
Reference< css::document::XDocumentSubStorageSupplier> xDocSup( m_pImpl->getDocumentSubStorageSupplier() );
|
|
|
|
aDriverInfo[nCount++].Value <<= xDocSup->getDocumentSubStorage(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("database")),ElementModes::READWRITE);
|
2004-11-09 11:25:39 +00:00
|
|
|
}
|
2004-08-02 14:09:24 +00:00
|
|
|
if (nAdditionalArgs)
|
2005-03-10 15:34:20 +00:00
|
|
|
xReturn = xManager->getConnectionWithInfo(m_pImpl->m_sConnectURL, ::comphelper::concatSequences(aUserPwd,aDriverInfo));
|
2004-08-02 14:09:24 +00:00
|
|
|
else
|
2005-03-10 15:34:20 +00:00
|
|
|
xReturn = xManager->getConnectionWithInfo(m_pImpl->m_sConnectURL,aDriverInfo);
|
2005-10-24 07:28:36 +00:00
|
|
|
|
|
|
|
if ( m_pImpl->isEmbeddedDatabase() )
|
|
|
|
{
|
|
|
|
// see ODatabaseSource::flushed for comment on why we register as FlushListener
|
|
|
|
// at the connection
|
|
|
|
Reference< XFlushable > xFlushable( xReturn, UNO_QUERY );
|
|
|
|
if ( xFlushable.is() )
|
|
|
|
FlushNotificationAdapter::installAdapter( xFlushable, this );
|
|
|
|
}
|
2001-08-28 14:59:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
nExceptionMessageId = RID_STR_COULDNOTLOAD_MANAGER;
|
|
|
|
|
|
|
|
if ( !xReturn.is() )
|
|
|
|
{
|
|
|
|
::rtl::OUString sMessage = DBACORE_RESSTRING( nExceptionMessageId );
|
|
|
|
|
|
|
|
SQLContext aContext;
|
2012-02-15 15:26:43 +01:00
|
|
|
aContext.Message = DBACORE_RESSTRING(RID_STR_CONNECTION_REQUEST).
|
2012-03-08 00:49:32 +01:00
|
|
|
replaceFirst("$name$", m_pImpl->m_sConnectURL);
|
2001-08-28 14:59:32 +00:00
|
|
|
|
|
|
|
throwGenericSQLException( sMessage, static_cast< XDataSource* >( this ), makeAny( aContext ) );
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return xReturn;
|
|
|
|
}
|
|
|
|
|
|
|
|
// OPropertySetHelper
|
|
|
|
Reference< XPropertySetInfo > ODatabaseSource::getPropertySetInfo() throw (RuntimeException)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getPropertySetInfo" );
|
2000-09-18 23:16:46 +00:00
|
|
|
return createPropertySetInfo( getInfoHelper() ) ;
|
|
|
|
}
|
|
|
|
|
2000-10-11 10:21:40 +00:00
|
|
|
// comphelper::OPropertyArrayUsageHelper
|
2000-09-18 23:16:46 +00:00
|
|
|
::cppu::IPropertyArrayHelper* ODatabaseSource::createArrayHelper( ) const
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::createArrayHelper" );
|
2006-08-15 09:44:50 +00:00
|
|
|
BEGIN_PROPERTY_HELPER(13)
|
|
|
|
DECL_PROP1(INFO, Sequence< PropertyValue >, BOUND);
|
2000-09-18 23:16:46 +00:00
|
|
|
DECL_PROP1_BOOL(ISPASSWORDREQUIRED, BOUND);
|
|
|
|
DECL_PROP1_BOOL(ISREADONLY, READONLY);
|
2006-08-15 09:44:50 +00:00
|
|
|
DECL_PROP1(LAYOUTINFORMATION, Sequence< PropertyValue >, BOUND);
|
2000-09-18 23:16:46 +00:00
|
|
|
DECL_PROP1(NAME, ::rtl::OUString, READONLY);
|
2001-08-30 13:50:17 +00:00
|
|
|
DECL_PROP2_IFACE(NUMBERFORMATSSUPPLIER, XNumberFormatsSupplier, READONLY, TRANSIENT);
|
2000-11-09 06:31:10 +00:00
|
|
|
DECL_PROP1(PASSWORD, ::rtl::OUString, TRANSIENT);
|
2006-08-15 09:44:50 +00:00
|
|
|
DECL_PROP2_IFACE(SETTINGS, XPropertySet, BOUND, READONLY);
|
2000-10-20 08:52:06 +00:00
|
|
|
DECL_PROP1_BOOL(SUPPRESSVERSIONCL, BOUND);
|
2000-09-18 23:16:46 +00:00
|
|
|
DECL_PROP1(TABLEFILTER, Sequence< ::rtl::OUString >,BOUND);
|
|
|
|
DECL_PROP1(TABLETYPEFILTER, Sequence< ::rtl::OUString >,BOUND);
|
2004-08-02 14:09:24 +00:00
|
|
|
DECL_PROP1(URL, ::rtl::OUString, BOUND);
|
2000-09-18 23:16:46 +00:00
|
|
|
DECL_PROP1(USER, ::rtl::OUString, BOUND);
|
|
|
|
END_PROPERTY_HELPER();
|
|
|
|
}
|
|
|
|
|
|
|
|
// cppu::OPropertySetHelper
|
|
|
|
::cppu::IPropertyArrayHelper& ODatabaseSource::getInfoHelper()
|
|
|
|
{
|
|
|
|
return *getArrayHelper();
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException )
|
|
|
|
{
|
|
|
|
sal_Bool bModified(sal_False);
|
2005-03-10 15:34:20 +00:00
|
|
|
if ( m_pImpl.is() )
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2005-03-10 15:34:20 +00:00
|
|
|
switch (nHandle)
|
|
|
|
{
|
|
|
|
case PROPERTY_ID_TABLEFILTER:
|
|
|
|
bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_pImpl->m_aTableFilter);
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_TABLETYPEFILTER:
|
|
|
|
bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_pImpl->m_aTableTypeFilter);
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_USER:
|
|
|
|
bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_pImpl->m_sUser);
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_PASSWORD:
|
|
|
|
bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_pImpl->m_aPassword);
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_ISPASSWORDREQUIRED:
|
|
|
|
bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_pImpl->m_bPasswordRequired);
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_SUPPRESSVERSIONCL:
|
|
|
|
bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_pImpl->m_bSuppressVersionColumns);
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_LAYOUTINFORMATION:
|
|
|
|
bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_pImpl->m_aLayoutInformation);
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_URL:
|
2004-08-02 14:09:24 +00:00
|
|
|
{
|
2005-03-10 15:34:20 +00:00
|
|
|
bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_pImpl->m_sConnectURL);
|
|
|
|
} break;
|
|
|
|
case PROPERTY_ID_INFO:
|
|
|
|
{
|
|
|
|
Sequence<PropertyValue> aValues;
|
|
|
|
if (!(rValue >>= aValues))
|
2002-08-19 10:53:58 +00:00
|
|
|
throw IllegalArgumentException();
|
2004-08-02 14:09:24 +00:00
|
|
|
|
2006-06-20 01:44:44 +00:00
|
|
|
const PropertyValue* valueEnd = aValues.getConstArray() + aValues.getLength();
|
|
|
|
const PropertyValue* checkName = aValues.getConstArray();
|
|
|
|
for ( ;checkName != valueEnd; ++checkName )
|
2004-08-02 14:09:24 +00:00
|
|
|
{
|
2011-12-19 18:10:37 -02:00
|
|
|
if ( checkName->Name.isEmpty() )
|
2005-03-10 15:34:20 +00:00
|
|
|
throw IllegalArgumentException();
|
|
|
|
}
|
|
|
|
|
2006-08-15 09:44:50 +00:00
|
|
|
Sequence< PropertyValue > aSettings = m_pImpl->m_xSettings->getPropertyValues();
|
|
|
|
bModified = aSettings.getLength() != aValues.getLength();
|
2005-03-10 15:34:20 +00:00
|
|
|
if ( !bModified )
|
|
|
|
{
|
2006-08-15 09:44:50 +00:00
|
|
|
const PropertyValue* pInfoIter = aSettings.getConstArray();
|
2006-06-20 01:44:44 +00:00
|
|
|
const PropertyValue* checkValue = aValues.getConstArray();
|
|
|
|
for ( ;!bModified && checkValue != valueEnd ; ++checkValue,++pInfoIter)
|
2004-08-02 14:09:24 +00:00
|
|
|
{
|
2006-06-20 01:44:44 +00:00
|
|
|
bModified = checkValue->Name != pInfoIter->Name;
|
2005-03-10 15:34:20 +00:00
|
|
|
if ( !bModified )
|
|
|
|
{
|
2006-06-20 01:44:44 +00:00
|
|
|
bModified = !::comphelper::compare(checkValue->Value,pInfoIter->Value);
|
2005-03-10 15:34:20 +00:00
|
|
|
}
|
2004-08-02 14:09:24 +00:00
|
|
|
}
|
|
|
|
}
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2005-03-10 15:34:20 +00:00
|
|
|
rConvertedValue = rValue;
|
2006-08-15 09:44:50 +00:00
|
|
|
rOldValue <<= aSettings;
|
|
|
|
}
|
|
|
|
break;
|
2005-03-10 15:34:20 +00:00
|
|
|
default:
|
2011-02-25 17:47:41 +01:00
|
|
|
OSL_FAIL( "ODatabaseSource::convertFastPropertyValue: unknown or readonly Property!" );
|
2005-03-10 15:34:20 +00:00
|
|
|
}
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
return bModified;
|
|
|
|
}
|
|
|
|
|
2006-08-15 09:44:50 +00:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
struct SelectPropertyName : public ::std::unary_function< PropertyValue, ::rtl::OUString >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
const ::rtl::OUString& operator()( const PropertyValue& _lhs )
|
|
|
|
{
|
|
|
|
return _lhs.Name;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-11-09 22:15:21 +00:00
|
|
|
/** sets a new set of property values for a given property bag instance
|
2006-08-15 09:44:50 +00:00
|
|
|
|
2010-11-09 22:15:21 +00:00
|
|
|
The method takes a property bag, and a sequence of property values to set for this bag.
|
2006-08-15 09:44:50 +00:00
|
|
|
Upon return, every property which is not part of the given sequence is
|
|
|
|
<ul><li>removed from the bag, if it's a removeable property</li>
|
|
|
|
<li><em>or</em>reset to its default value, if it's not a removeable property</li>
|
|
|
|
</ul>.
|
|
|
|
|
|
|
|
@param _rxPropertyBag
|
|
|
|
the property bag to operate on
|
|
|
|
@param _rAllNewPropertyValues
|
2010-11-09 22:15:21 +00:00
|
|
|
the new property values to set for the bag
|
2006-08-15 09:44:50 +00:00
|
|
|
*/
|
|
|
|
void lcl_setPropertyValues_resetOrRemoveOther( const Reference< XPropertyAccess >& _rxPropertyBag, const Sequence< PropertyValue >& _rAllNewPropertyValues )
|
|
|
|
{
|
|
|
|
// sequences are ugly to operate on
|
|
|
|
typedef ::std::set< ::rtl::OUString > StringSet;
|
|
|
|
StringSet aToBeSetPropertyNames;
|
|
|
|
::std::transform(
|
|
|
|
_rAllNewPropertyValues.getConstArray(),
|
|
|
|
_rAllNewPropertyValues.getConstArray() + _rAllNewPropertyValues.getLength(),
|
|
|
|
::std::insert_iterator< StringSet >( aToBeSetPropertyNames, aToBeSetPropertyNames.end() ),
|
|
|
|
SelectPropertyName()
|
|
|
|
);
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
// obtain all properties currently known at the bag
|
|
|
|
Reference< XPropertySet > xPropertySet( _rxPropertyBag, UNO_QUERY_THROW );
|
|
|
|
Reference< XPropertySetInfo > xPSI( xPropertySet->getPropertySetInfo(), UNO_QUERY_THROW );
|
|
|
|
Sequence< Property > aAllExistentProperties( xPSI->getProperties() );
|
|
|
|
|
|
|
|
Reference< XPropertyState > xPropertyState( _rxPropertyBag, UNO_QUERY_THROW );
|
|
|
|
Reference< XPropertyContainer > xPropertyContainer( _rxPropertyBag, UNO_QUERY_THROW );
|
|
|
|
|
|
|
|
// loop through them, and reset resp. default properties which are not to be set
|
|
|
|
const Property* pExistentProperty( aAllExistentProperties.getConstArray() );
|
|
|
|
const Property* pExistentPropertyEnd( aAllExistentProperties.getConstArray() + aAllExistentProperties.getLength() );
|
|
|
|
for ( ; pExistentProperty != pExistentPropertyEnd; ++pExistentProperty )
|
|
|
|
{
|
|
|
|
if ( aToBeSetPropertyNames.find( pExistentProperty->Name ) != aToBeSetPropertyNames.end() )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
// this property is not to be set, but currently exists in the bag.
|
2010-11-09 22:15:21 +00:00
|
|
|
// -> Remove it, or reset it to the default.
|
2006-08-15 09:44:50 +00:00
|
|
|
if ( ( pExistentProperty->Attributes & PropertyAttribute::REMOVEABLE ) != 0 )
|
|
|
|
xPropertyContainer->removeProperty( pExistentProperty->Name );
|
|
|
|
else
|
|
|
|
xPropertyState->setPropertyToDefault( pExistentProperty->Name );
|
|
|
|
}
|
|
|
|
|
|
|
|
// finally, set the new property values
|
|
|
|
_rxPropertyBag->setPropertyValues( _rAllNewPropertyValues );
|
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
void ODatabaseSource::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::setFastPropertyValue_NoBroadcast" );
|
2005-03-10 15:34:20 +00:00
|
|
|
if ( m_pImpl.is() )
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2005-03-10 15:34:20 +00:00
|
|
|
switch(nHandle)
|
|
|
|
{
|
|
|
|
case PROPERTY_ID_TABLEFILTER:
|
|
|
|
rValue >>= m_pImpl->m_aTableFilter;
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_TABLETYPEFILTER:
|
|
|
|
rValue >>= m_pImpl->m_aTableTypeFilter;
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_USER:
|
|
|
|
rValue >>= m_pImpl->m_sUser;
|
2010-11-09 22:15:21 +00:00
|
|
|
// if the user name has changed, reset the password
|
2005-03-10 15:34:20 +00:00
|
|
|
m_pImpl->m_aPassword = ::rtl::OUString();
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_PASSWORD:
|
|
|
|
rValue >>= m_pImpl->m_aPassword;
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_ISPASSWORDREQUIRED:
|
|
|
|
m_pImpl->m_bPasswordRequired = any2bool(rValue);
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_SUPPRESSVERSIONCL:
|
|
|
|
m_pImpl->m_bSuppressVersionColumns = any2bool(rValue);
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_URL:
|
|
|
|
rValue >>= m_pImpl->m_sConnectURL;
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_INFO:
|
2006-08-15 09:44:50 +00:00
|
|
|
{
|
|
|
|
Sequence< PropertyValue > aInfo;
|
|
|
|
OSL_VERIFY( rValue >>= aInfo );
|
|
|
|
lcl_setPropertyValues_resetOrRemoveOther( m_pImpl->m_xSettings, aInfo );
|
|
|
|
}
|
|
|
|
break;
|
2005-03-10 15:34:20 +00:00
|
|
|
case PROPERTY_ID_LAYOUTINFORMATION:
|
|
|
|
rValue >>= m_pImpl->m_aLayoutInformation;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
m_pImpl->setModified(sal_True);
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ODatabaseSource::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getFastPropertyValue" );
|
2005-03-10 15:34:20 +00:00
|
|
|
if ( m_pImpl.is() )
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2005-03-10 15:34:20 +00:00
|
|
|
switch (nHandle)
|
|
|
|
{
|
|
|
|
case PROPERTY_ID_TABLEFILTER:
|
|
|
|
rValue <<= m_pImpl->m_aTableFilter;
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_TABLETYPEFILTER:
|
|
|
|
rValue <<= m_pImpl->m_aTableTypeFilter;
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_USER:
|
|
|
|
rValue <<= m_pImpl->m_sUser;
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_PASSWORD:
|
|
|
|
rValue <<= m_pImpl->m_aPassword;
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_ISPASSWORDREQUIRED:
|
|
|
|
rValue = bool2any(m_pImpl->m_bPasswordRequired);
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_SUPPRESSVERSIONCL:
|
|
|
|
rValue = bool2any(m_pImpl->m_bSuppressVersionColumns);
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_ISREADONLY:
|
|
|
|
rValue = bool2any(m_pImpl->m_bReadOnly);
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_INFO:
|
2006-08-15 09:44:50 +00:00
|
|
|
{
|
2007-07-24 11:05:01 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
// collect the property attributes of all current settings
|
|
|
|
Reference< XPropertySet > xSettingsAsProps( m_pImpl->m_xSettings, UNO_QUERY_THROW );
|
|
|
|
Reference< XPropertySetInfo > xPST( xSettingsAsProps->getPropertySetInfo(), UNO_QUERY_THROW );
|
|
|
|
Sequence< Property > aSettings( xPST->getProperties() );
|
|
|
|
::std::map< ::rtl::OUString, sal_Int32 > aPropertyAttributes;
|
|
|
|
for ( const Property* pSettings = aSettings.getConstArray();
|
|
|
|
pSettings != aSettings.getConstArray() + aSettings.getLength();
|
|
|
|
++pSettings
|
|
|
|
)
|
|
|
|
{
|
|
|
|
aPropertyAttributes[ pSettings->Name ] = pSettings->Attributes;
|
|
|
|
}
|
|
|
|
|
|
|
|
// get all current settings with their values
|
|
|
|
Sequence< PropertyValue > aValues( m_pImpl->m_xSettings->getPropertyValues() );
|
|
|
|
|
|
|
|
// transform them so that only property values which fulfill certain
|
2010-11-09 22:15:21 +00:00
|
|
|
// criteria survive
|
2007-07-24 11:05:01 +00:00
|
|
|
Sequence< PropertyValue > aNonDefaultOrUserDefined( aValues.getLength() );
|
|
|
|
const PropertyValue* pCopyEnd = ::std::remove_copy_if(
|
|
|
|
aValues.getConstArray(),
|
|
|
|
aValues.getConstArray() + aValues.getLength(),
|
|
|
|
aNonDefaultOrUserDefined.getArray(),
|
|
|
|
IsDefaultAndNotRemoveable( aPropertyAttributes )
|
|
|
|
);
|
|
|
|
aNonDefaultOrUserDefined.realloc( pCopyEnd - aNonDefaultOrUserDefined.getArray() );
|
|
|
|
rValue <<= aNonDefaultOrUserDefined;
|
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
|
|
|
}
|
2006-08-15 09:44:50 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_SETTINGS:
|
|
|
|
rValue <<= m_pImpl->m_xSettings;
|
2005-03-10 15:34:20 +00:00
|
|
|
break;
|
|
|
|
case PROPERTY_ID_URL:
|
|
|
|
rValue <<= m_pImpl->m_sConnectURL;
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_NUMBERFORMATSSUPPLIER:
|
|
|
|
rValue <<= m_pImpl->getNumberFormatsSupplier();
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_NAME:
|
|
|
|
rValue <<= m_pImpl->m_sName;
|
|
|
|
break;
|
|
|
|
case PROPERTY_ID_LAYOUTINFORMATION:
|
|
|
|
rValue <<= m_pImpl->m_aLayoutInformation;
|
|
|
|
break;
|
|
|
|
default:
|
2011-02-25 17:47:41 +01:00
|
|
|
OSL_FAIL("unknown Property");
|
2005-03-10 15:34:20 +00:00
|
|
|
}
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// XDataSource
|
|
|
|
void ODatabaseSource::setLoginTimeout(sal_Int32 seconds) throw( SQLException, RuntimeException )
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::setLoginTimeout" );
|
2005-12-21 12:35:18 +00:00
|
|
|
ModelMethodGuard aGuard( *this );
|
2005-03-10 15:34:20 +00:00
|
|
|
m_pImpl->m_nLoginTimeout = seconds;
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 ODatabaseSource::getLoginTimeout(void) throw( SQLException, RuntimeException )
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getLoginTimeout" );
|
2005-12-21 12:35:18 +00:00
|
|
|
ModelMethodGuard aGuard( *this );
|
2005-03-10 15:34:20 +00:00
|
|
|
return m_pImpl->m_nLoginTimeout;
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
2000-11-08 15:05:02 +00:00
|
|
|
// XCompletedConnection
|
|
|
|
Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const Reference< XInteractionHandler >& _rxHandler ) throw(SQLException, RuntimeException)
|
2002-08-12 07:54:24 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::connectWithCompletion" );
|
2002-08-12 07:54:24 +00:00
|
|
|
return connectWithCompletion(_rxHandler,sal_False);
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2002-08-12 07:54:24 +00:00
|
|
|
Reference< XConnection > ODatabaseSource::getConnection(const rtl::OUString& user, const rtl::OUString& password) throw( SQLException, RuntimeException )
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getConnection" );
|
2002-08-12 07:54:24 +00:00
|
|
|
return getConnection(user,password,sal_False);
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2002-08-12 07:54:24 +00:00
|
|
|
Reference< XConnection > SAL_CALL ODatabaseSource::getIsolatedConnection( const ::rtl::OUString& user, const ::rtl::OUString& password ) throw(SQLException, RuntimeException)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getIsolatedConnection" );
|
2002-08-12 07:54:24 +00:00
|
|
|
return getConnection(user,password,sal_True);
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2002-08-12 07:54:24 +00:00
|
|
|
Reference< XConnection > SAL_CALL ODatabaseSource::getIsolatedConnectionWithCompletion( const Reference< XInteractionHandler >& _rxHandler ) throw(SQLException, RuntimeException)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getIsolatedConnectionWithCompletion" );
|
2002-08-12 07:54:24 +00:00
|
|
|
return connectWithCompletion(_rxHandler,sal_True);
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2002-08-12 07:54:24 +00:00
|
|
|
Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const Reference< XInteractionHandler >& _rxHandler,sal_Bool _bIsolated ) throw(SQLException, RuntimeException)
|
2000-11-08 15:05:02 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::connectWithCompletion" );
|
2005-12-21 12:35:18 +00:00
|
|
|
ModelMethodGuard aGuard( *this );
|
2000-11-08 15:05:02 +00:00
|
|
|
|
|
|
|
if (!_rxHandler.is())
|
|
|
|
{
|
2011-02-25 17:47:41 +01:00
|
|
|
OSL_FAIL("ODatabaseSource::connectWithCompletion: invalid interaction handler!");
|
2005-03-10 15:34:20 +00:00
|
|
|
return getConnection(m_pImpl->m_sUser, m_pImpl->m_aPassword,_bIsolated);
|
2000-11-08 15:05:02 +00:00
|
|
|
}
|
|
|
|
|
2005-03-10 15:34:20 +00:00
|
|
|
::rtl::OUString sUser(m_pImpl->m_sUser), sPassword(m_pImpl->m_aPassword);
|
2000-11-09 06:31:10 +00:00
|
|
|
sal_Bool bNewPasswordGiven = sal_False;
|
2000-11-08 15:05:02 +00:00
|
|
|
|
2011-12-19 18:10:37 -02:00
|
|
|
if (m_pImpl->m_bPasswordRequired && sPassword.isEmpty())
|
2000-11-08 15:05:02 +00:00
|
|
|
{ // we need a password, but don't have one yet.
|
|
|
|
// -> ask the user
|
|
|
|
|
|
|
|
// build an interaction request
|
|
|
|
// two continuations (Ok and Cancel)
|
|
|
|
OInteractionAbort* pAbort = new OInteractionAbort;
|
2008-03-06 16:58:49 +00:00
|
|
|
OAuthenticationContinuation* pAuthenticate = new OAuthenticationContinuation;
|
|
|
|
|
|
|
|
// the name which should be referred in the login dialog
|
|
|
|
::rtl::OUString sServerName( m_pImpl->m_sName );
|
|
|
|
INetURLObject aURLCheck( sServerName );
|
|
|
|
if ( aURLCheck.GetProtocol() != INET_PROT_NOT_VALID )
|
2008-12-01 12:31:27 +00:00
|
|
|
sServerName = aURLCheck.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_UNAMBIGUOUS );
|
2001-05-15 10:24:21 +00:00
|
|
|
|
2000-11-08 15:05:02 +00:00
|
|
|
// the request
|
|
|
|
AuthenticationRequest aRequest;
|
2008-03-06 16:58:49 +00:00
|
|
|
aRequest.ServerName = sServerName;
|
2000-11-08 15:05:02 +00:00
|
|
|
aRequest.HasRealm = aRequest.HasAccount = sal_False;
|
|
|
|
aRequest.HasUserName = aRequest.HasPassword = sal_True;
|
2005-03-10 15:34:20 +00:00
|
|
|
aRequest.UserName = m_pImpl->m_sUser;
|
2011-12-19 18:10:37 -02:00
|
|
|
aRequest.Password = m_pImpl->m_sFailedPassword.isEmpty() ? m_pImpl->m_aPassword : m_pImpl->m_sFailedPassword;
|
2000-11-08 15:05:02 +00:00
|
|
|
OInteractionRequest* pRequest = new OInteractionRequest(makeAny(aRequest));
|
|
|
|
Reference< XInteractionRequest > xRequest(pRequest);
|
|
|
|
// some knittings
|
|
|
|
pRequest->addContinuation(pAbort);
|
|
|
|
pRequest->addContinuation(pAuthenticate);
|
|
|
|
|
|
|
|
// handle the request
|
|
|
|
try
|
|
|
|
{
|
2005-12-21 12:35:18 +00:00
|
|
|
MutexRelease aRelease( getMutex() );
|
2001-05-17 08:09:05 +00:00
|
|
|
// release the mutex when calling the handler, it may need to lock the SolarMutex
|
2000-11-08 15:05:02 +00:00
|
|
|
_rxHandler->handle(xRequest);
|
|
|
|
}
|
|
|
|
catch(Exception&)
|
|
|
|
{
|
2005-12-21 12:35:18 +00:00
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
2000-11-08 15:05:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!pAuthenticate->wasSelected())
|
|
|
|
return Reference< XConnection >();
|
|
|
|
|
|
|
|
// get the result
|
2005-03-10 15:34:20 +00:00
|
|
|
sUser = m_pImpl->m_sUser = pAuthenticate->getUser();
|
2000-11-08 15:05:02 +00:00
|
|
|
sPassword = pAuthenticate->getPassword();
|
|
|
|
|
|
|
|
if (pAuthenticate->getRememberPassword())
|
2000-11-09 06:31:10 +00:00
|
|
|
{
|
2005-03-10 15:34:20 +00:00
|
|
|
m_pImpl->m_aPassword = pAuthenticate->getPassword();
|
2000-11-09 06:31:10 +00:00
|
|
|
bNewPasswordGiven = sal_True;
|
|
|
|
}
|
2008-03-06 16:58:49 +00:00
|
|
|
m_pImpl->m_sFailedPassword = ::rtl::OUString();
|
2000-11-09 06:31:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
2002-08-12 07:54:24 +00:00
|
|
|
return getConnection(sUser, sPassword,_bIsolated);
|
2000-11-09 06:31:10 +00:00
|
|
|
}
|
|
|
|
catch(Exception&)
|
|
|
|
{
|
|
|
|
if (bNewPasswordGiven)
|
2008-03-06 16:58:49 +00:00
|
|
|
{
|
|
|
|
m_pImpl->m_sFailedPassword = m_pImpl->m_aPassword;
|
2006-06-20 01:44:44 +00:00
|
|
|
// assume that we had an authentication problem. Without this we may, after an unsucessful connect, while
|
2000-11-09 06:31:10 +00:00
|
|
|
// the user gave us a password an the order to remember it, never allow an password input again (at least
|
|
|
|
// not without restarting the session)
|
2005-03-10 15:34:20 +00:00
|
|
|
m_pImpl->m_aPassword = ::rtl::OUString();
|
2008-03-06 16:58:49 +00:00
|
|
|
}
|
2000-11-09 06:31:10 +00:00
|
|
|
throw;
|
2000-11-08 15:05:02 +00:00
|
|
|
}
|
|
|
|
}
|
2008-03-06 16:58:49 +00:00
|
|
|
|
2002-08-12 07:54:24 +00:00
|
|
|
Reference< XConnection > ODatabaseSource::buildIsolatedConnection(const rtl::OUString& user, const rtl::OUString& password)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::buildIsolatedConnection" );
|
2002-08-12 07:54:24 +00:00
|
|
|
Reference< XConnection > xConn;
|
|
|
|
Reference< XConnection > xSdbcConn = buildLowLevelConnection(user, password);
|
2011-02-03 00:33:36 +01:00
|
|
|
OSL_ENSURE( xSdbcConn.is(), "ODatabaseSource::buildIsolatedConnection: invalid return value of buildLowLevelConnection!" );
|
2002-08-12 07:54:24 +00:00
|
|
|
// buildLowLevelConnection is expected to always succeed
|
|
|
|
if ( xSdbcConn.is() )
|
|
|
|
{
|
|
|
|
// build a connection server and return it (no stubs)
|
2008-03-06 16:58:49 +00:00
|
|
|
xConn = new OConnection(*this, xSdbcConn, m_pImpl->m_aContext.getLegacyServiceFactory());
|
2002-08-12 07:54:24 +00:00
|
|
|
}
|
|
|
|
return xConn;
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2002-08-12 07:54:24 +00:00
|
|
|
Reference< XConnection > ODatabaseSource::getConnection(const rtl::OUString& user, const rtl::OUString& password,sal_Bool _bIsolated) throw( SQLException, RuntimeException )
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getConnection" );
|
2005-12-21 12:35:18 +00:00
|
|
|
ModelMethodGuard aGuard( *this );
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
Reference< XConnection > xConn;
|
2002-08-12 07:54:24 +00:00
|
|
|
if ( _bIsolated )
|
2000-11-14 12:32:59 +00:00
|
|
|
{
|
2002-08-12 07:54:24 +00:00
|
|
|
xConn = buildIsolatedConnection(user,password);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // create a new proxy for the connection
|
2005-03-10 15:34:20 +00:00
|
|
|
if ( !m_pImpl->m_xSharedConnectionManager.is() )
|
2001-08-28 14:59:32 +00:00
|
|
|
{
|
2008-03-06 16:58:49 +00:00
|
|
|
m_pImpl->m_pSharedConnectionManager = new OSharedConnectionManager( m_pImpl->m_aContext.getLegacyServiceFactory() );
|
2005-03-10 15:34:20 +00:00
|
|
|
m_pImpl->m_xSharedConnectionManager = m_pImpl->m_pSharedConnectionManager;
|
2001-08-28 14:59:32 +00:00
|
|
|
}
|
2006-08-15 09:44:50 +00:00
|
|
|
xConn = m_pImpl->m_pSharedConnectionManager->getConnection(
|
|
|
|
m_pImpl->m_sConnectURL, user, password, m_pImpl->m_xSettings->getPropertyValues(), this );
|
2002-08-12 07:54:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( xConn.is() )
|
|
|
|
{
|
|
|
|
Reference< XComponent> xComp(xConn,UNO_QUERY);
|
|
|
|
if ( xComp.is() )
|
2005-10-24 07:28:36 +00:00
|
|
|
xComp->addEventListener( static_cast< XContainerListener* >( this ) );
|
2005-03-10 15:34:20 +00:00
|
|
|
m_pImpl->m_aConnections.push_back(OWeakConnection(xConn));
|
2000-11-14 12:32:59 +00:00
|
|
|
}
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
return xConn;
|
|
|
|
}
|
|
|
|
|
2001-04-26 10:27:16 +00:00
|
|
|
Reference< XNameAccess > SAL_CALL ODatabaseSource::getBookmarks( ) throw (RuntimeException)
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getBookmarks" );
|
2005-12-21 12:35:18 +00:00
|
|
|
ModelMethodGuard aGuard( *this );
|
2001-04-26 10:27:16 +00:00
|
|
|
return static_cast< XNameContainer* >(&m_aBookmarks);
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Reference< XNameAccess > SAL_CALL ODatabaseSource::getQueryDefinitions( ) throw(RuntimeException)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getQueryDefinitions" );
|
2005-12-21 12:35:18 +00:00
|
|
|
ModelMethodGuard aGuard( *this );
|
|
|
|
|
2005-03-10 15:34:20 +00:00
|
|
|
Reference< XNameAccess > xContainer = m_pImpl->m_xCommandDefinitions;
|
2004-08-02 14:09:24 +00:00
|
|
|
if ( !xContainer.is() )
|
|
|
|
{
|
2009-12-16 12:46:33 +01:00
|
|
|
Any aValue;
|
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xMy(*this);
|
2010-02-10 13:08:22 +01:00
|
|
|
if ( dbtools::getDataSourceSetting(xMy,"CommandDefinitions",aValue) )
|
2009-12-16 12:46:33 +01:00
|
|
|
{
|
|
|
|
::rtl::OUString sSupportService;
|
|
|
|
aValue >>= sSupportService;
|
2011-12-19 18:10:37 -02:00
|
|
|
if ( !sSupportService.isEmpty() )
|
2009-12-16 12:46:33 +01:00
|
|
|
{
|
|
|
|
Sequence<Any> aArgs(1);
|
|
|
|
aArgs[0] <<= NamedValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataSource")),makeAny(xMy));
|
|
|
|
xContainer.set(m_pImpl->m_aContext.createComponentWithArguments(sSupportService,aArgs),UNO_QUERY);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( !xContainer.is() )
|
|
|
|
{
|
|
|
|
TContentPtr& rContainerData( m_pImpl->getObjectContainer( ODatabaseModelImpl::E_QUERY ) );
|
|
|
|
xContainer = new OCommandContainer( m_pImpl->m_aContext.getLegacyServiceFactory(), *this, rContainerData, sal_False );
|
|
|
|
}
|
2005-03-10 15:34:20 +00:00
|
|
|
m_pImpl->m_xCommandDefinitions = xContainer;
|
2004-08-02 14:09:24 +00:00
|
|
|
}
|
|
|
|
return xContainer;
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2004-08-02 14:09:24 +00:00
|
|
|
// XTablesSupplier
|
|
|
|
Reference< XNameAccess > ODatabaseSource::getTables() throw( RuntimeException )
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getTables" );
|
2005-12-21 12:35:18 +00:00
|
|
|
ModelMethodGuard aGuard( *this );
|
|
|
|
|
2005-03-10 15:34:20 +00:00
|
|
|
Reference< XNameAccess > xContainer = m_pImpl->m_xTableDefinitions;
|
2004-08-02 14:09:24 +00:00
|
|
|
if ( !xContainer.is() )
|
2000-10-13 15:00:03 +00:00
|
|
|
{
|
2007-11-21 14:37:59 +00:00
|
|
|
TContentPtr& rContainerData( m_pImpl->getObjectContainer( ODatabaseModelImpl::E_TABLE ) );
|
2008-03-06 16:58:49 +00:00
|
|
|
xContainer = new OCommandContainer( m_pImpl->m_aContext.getLegacyServiceFactory(), *this, rContainerData, sal_True );
|
2005-03-10 15:34:20 +00:00
|
|
|
m_pImpl->m_xTableDefinitions = xContainer;
|
2000-10-13 15:00:03 +00:00
|
|
|
}
|
2004-08-02 14:09:24 +00:00
|
|
|
return xContainer;
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2005-03-10 15:34:20 +00:00
|
|
|
void SAL_CALL ODatabaseSource::flush( ) throw (RuntimeException)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::flush" );
|
2005-03-10 15:34:20 +00:00
|
|
|
try
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
// SYNCHRONIZED ->
|
2006-03-29 11:34:19 +00:00
|
|
|
{
|
|
|
|
ModelMethodGuard aGuard( *this );
|
|
|
|
|
|
|
|
typedef ::utl::SharedUNOComponent< XModel, ::utl::CloseableComponent > SharedModel;
|
|
|
|
SharedModel xModel( m_pImpl->getModel_noCreate(), SharedModel::NoTakeOwnership );
|
|
|
|
|
|
|
|
if ( !xModel.is() )
|
2008-10-16 06:57:26 +00:00
|
|
|
xModel.reset( m_pImpl->createNewModel_deliverOwnership( false ), SharedModel::TakeOwnership );
|
2006-03-29 11:34:19 +00:00
|
|
|
|
|
|
|
Reference< css::frame::XStorable> xStorable( xModel, UNO_QUERY_THROW );
|
2005-03-10 15:34:20 +00:00
|
|
|
xStorable->store();
|
2006-03-29 11:34:19 +00:00
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
// <- SYNCHRONIZED
|
2005-03-10 15:34:20 +00:00
|
|
|
|
2005-12-21 12:35:18 +00:00
|
|
|
css::lang::EventObject aFlushedEvent(*this);
|
|
|
|
m_aFlushListeners.notifyEach( &XFlushListener::flushed, aFlushedEvent );
|
2005-03-10 15:34:20 +00:00
|
|
|
}
|
2006-03-29 11:34:19 +00:00
|
|
|
catch( const Exception& )
|
2005-03-10 15:34:20 +00:00
|
|
|
{
|
2006-03-29 11:34:19 +00:00
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
2005-03-10 15:34:20 +00:00
|
|
|
}
|
|
|
|
}
|
2005-10-24 07:28:36 +00:00
|
|
|
|
2006-06-20 01:44:44 +00:00
|
|
|
void SAL_CALL ODatabaseSource::flushed( const EventObject& /*rEvent*/ ) throw (RuntimeException)
|
2005-10-24 07:28:36 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::flushed" );
|
2005-12-21 12:35:18 +00:00
|
|
|
ModelMethodGuard aGuard( *this );
|
2005-10-24 07:28:36 +00:00
|
|
|
|
|
|
|
// Okay, this is some hack.
|
|
|
|
//
|
|
|
|
// In general, we have the problem that embedded databases write into their underlying storage, which
|
|
|
|
// logically is one of our sub storage, and practically is a temporary file maintained by the
|
|
|
|
// package implementation. As long as we did not commit this storage and our main storage,
|
2008-10-16 06:57:26 +00:00
|
|
|
// the changes made by the embedded database engine are not really reflected in the database document
|
2005-10-24 07:28:36 +00:00
|
|
|
// file. This is Bad (TM) for a "real" database application - imagine somebody entering some
|
|
|
|
// data, and then crashing: For a database application, you would expect that the data still is present
|
|
|
|
// when you connect to the database next time.
|
|
|
|
//
|
|
|
|
// Since this is a conceptual problem as long as we do use those ZIP packages (in fact, we *cannot*
|
|
|
|
// provide the desired functionality as long as we do not have a package format which allows O(1) writes),
|
|
|
|
// we cannot completely fix this. However, we can relax the problem by commiting more often - often
|
|
|
|
// enough so that data loss is more seldom, and seldom enough so that there's no noticable performance
|
|
|
|
// decrease.
|
|
|
|
//
|
|
|
|
// For this, we introduced a few places which XFlushable::flush their connections, and register as
|
|
|
|
// XFlushListener at the embedded connection (which needs to provide the XFlushable functionality).
|
|
|
|
// Then, when the connection is flushed, we commit both the database storage and our main storage.
|
|
|
|
//
|
2011-02-27 22:55:22 +01:00
|
|
|
// #i55274#
|
2005-10-24 07:28:36 +00:00
|
|
|
|
|
|
|
OSL_ENSURE( m_pImpl->isEmbeddedDatabase(), "ODatabaseSource::flushed: no embedded database?!" );
|
|
|
|
sal_Bool bWasModified = m_pImpl->m_bModified;
|
|
|
|
m_pImpl->commitEmbeddedStorage();
|
|
|
|
m_pImpl->setModified( bWasModified );
|
|
|
|
}
|
|
|
|
|
2005-03-10 15:34:20 +00:00
|
|
|
void SAL_CALL ODatabaseSource::addFlushListener( const Reference< ::com::sun::star::util::XFlushListener >& _xListener ) throw (RuntimeException)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::addFlushListener" );
|
2005-03-10 15:34:20 +00:00
|
|
|
m_aFlushListeners.addInterface(_xListener);
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2005-03-10 15:34:20 +00:00
|
|
|
void SAL_CALL ODatabaseSource::removeFlushListener( const Reference< ::com::sun::star::util::XFlushListener >& _xListener ) throw (RuntimeException)
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::removeFlushListener" );
|
2005-03-10 15:34:20 +00:00
|
|
|
m_aFlushListeners.removeInterface(_xListener);
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2006-06-20 01:44:44 +00:00
|
|
|
void SAL_CALL ODatabaseSource::elementInserted( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
|
2005-03-10 15:34:20 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::elementInserted" );
|
2005-12-21 12:35:18 +00:00
|
|
|
ModelMethodGuard aGuard( *this );
|
2005-03-10 15:34:20 +00:00
|
|
|
if ( m_pImpl.is() )
|
|
|
|
m_pImpl->setModified(sal_True);
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2006-06-20 01:44:44 +00:00
|
|
|
void SAL_CALL ODatabaseSource::elementRemoved( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
|
2005-03-10 15:34:20 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::elementRemoved" );
|
2005-12-21 12:35:18 +00:00
|
|
|
ModelMethodGuard aGuard( *this );
|
2005-03-10 15:34:20 +00:00
|
|
|
if ( m_pImpl.is() )
|
|
|
|
m_pImpl->setModified(sal_True);
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2006-06-20 01:44:44 +00:00
|
|
|
void SAL_CALL ODatabaseSource::elementReplaced( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
|
2005-03-10 15:34:20 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::elementReplaced" );
|
2005-12-21 12:35:18 +00:00
|
|
|
ModelMethodGuard aGuard( *this );
|
2005-03-10 15:34:20 +00:00
|
|
|
if ( m_pImpl.is() )
|
|
|
|
m_pImpl->setModified(sal_True);
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2005-03-10 15:34:20 +00:00
|
|
|
// XDocumentDataSource
|
2005-07-08 09:36:39 +00:00
|
|
|
Reference< XOfficeDatabaseDocument > SAL_CALL ODatabaseSource::getDatabaseDocument() throw (RuntimeException)
|
2005-03-10 15:34:20 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getDatabaseDocument" );
|
2005-12-21 12:35:18 +00:00
|
|
|
ModelMethodGuard aGuard( *this );
|
2006-03-29 11:34:19 +00:00
|
|
|
|
|
|
|
Reference< XModel > xModel( m_pImpl->getModel_noCreate() );
|
|
|
|
if ( !xModel.is() )
|
2008-10-16 06:57:26 +00:00
|
|
|
xModel = m_pImpl->createNewModel_deliverOwnership( false );
|
2006-03-29 11:34:19 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
return Reference< XOfficeDatabaseDocument >( xModel, UNO_QUERY_THROW );
|
2005-03-10 15:34:20 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2008-03-06 16:58:49 +00:00
|
|
|
Reference< XInterface > ODatabaseSource::getThis() const
|
2005-12-21 12:35:18 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getThis" );
|
2008-03-06 16:58:49 +00:00
|
|
|
return *const_cast< ODatabaseSource* >( this );
|
2005-12-21 12:35:18 +00:00
|
|
|
}
|
2005-03-04 08:43:20 +00:00
|
|
|
|
2010-10-12 23:48:07 +02:00
|
|
|
} // namespace dbaccess
|
2010-10-12 15:59:03 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|