Kaydet (Commit) 73258d62 authored tarafından Jens-Heiner Rechtien's avatar Jens-Heiner Rechtien

INTEGRATION: CWS dba24a (1.26.120); FILE MERGED

2007/09/05 11:24:03 oj 1.26.120.3: unused param
2007/09/05 11:04:18 oj 1.26.120.2: #i68334# fix ref count prob
2007/08/30 09:04:43 oj 1.26.120.1: #i68334# release rtf and html when connection was disposed
üst e844f463
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: dbexchange.cxx,v $ * $RCSfile: dbexchange.cxx,v $
* *
* $Revision: 1.26 $ * $Revision: 1.27 $
* *
* last change: $Author: obo $ $Date: 2006-09-17 06:56:52 $ * last change: $Author: hr $ $Date: 2007-09-26 14:48:19 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -202,19 +202,20 @@ namespace dbaui ...@@ -202,19 +202,20 @@ namespace dbaui
sal_Bool ODataClipboard::GetData( const DataFlavor& rFlavor ) sal_Bool ODataClipboard::GetData( const DataFlavor& rFlavor )
{ {
ULONG nFormat = SotExchange::GetFormat(rFlavor); ULONG nFormat = SotExchange::GetFormat(rFlavor);
sal_uInt32 nHtml = SOT_FORMATSTR_ID_HTML_SIMPLE;
switch (nFormat) switch (nFormat)
{ {
case SOT_FORMAT_RTF: case SOT_FORMAT_RTF:
m_pRtf->initialize(getDescriptor()); if ( m_pRtf )
return SetObject(m_pRtf, SOT_FORMAT_RTF, rFlavor); m_pRtf->initialize(getDescriptor());
return m_pRtf && SetObject(m_pRtf, SOT_FORMAT_RTF, rFlavor);
case SOT_FORMATSTR_ID_HTML: case SOT_FORMATSTR_ID_HTML:
m_pHtml->initialize(getDescriptor()); nHtml = SOT_FORMATSTR_ID_HTML;
return SetObject(m_pHtml, SOT_FORMATSTR_ID_HTML, rFlavor); // run through
case SOT_FORMATSTR_ID_HTML_SIMPLE: case SOT_FORMATSTR_ID_HTML_SIMPLE:
m_pHtml->initialize(getDescriptor()); if ( m_pHtml )
return SetObject(m_pHtml, SOT_FORMATSTR_ID_HTML_SIMPLE, rFlavor); m_pHtml->initialize(getDescriptor());
return m_pHtml && SetObject(m_pHtml, nHtml, rFlavor);
} }
return ODataAccessObjectTransferable::GetData( rFlavor ); return ODataAccessObjectTransferable::GetData( rFlavor );
...@@ -236,16 +237,21 @@ namespace dbaui ...@@ -236,16 +237,21 @@ namespace dbaui
ODataAccessObjectTransferable::ObjectReleased( ); ODataAccessObjectTransferable::ObjectReleased( );
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void SAL_CALL ODataClipboard::disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException) void SAL_CALL ODataClipboard::disposing( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
{ {
if ( getDescriptor().has(daConnection) && getDescriptor()[daConnection] == Source.Source ) Reference<XConnection> xConnection;
{ Reference<XResultSet> xProp;
getDescriptor().erase(daConnection); if ( getDescriptor().has(daConnection) && (getDescriptor()[daConnection] >>= xConnection) )
} lcl_removeListener(xConnection,this);
else if ( getDescriptor().has(daCursor) && getDescriptor()[daCursor] == Source.Source ) if ( getDescriptor().has(daCursor) && (getDescriptor()[daCursor] >>= xProp) )
getDescriptor().erase(daCursor); lcl_removeListener(xProp,this);
ClearFormats();
getDescriptor().clear();
lcl_removeListener(Source.Source,this); m_pHtml = NULL;
m_pRtf = NULL;
m_aEventListeners.clear();
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
IMPLEMENT_FORWARD_XINTERFACE2( ODataClipboard, ODataAccessObjectTransferable, TDataClipboard_BASE ) IMPLEMENT_FORWARD_XINTERFACE2( ODataClipboard, ODataAccessObjectTransferable, TDataClipboard_BASE )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment