24#include <com/sun/star/frame/XDesktop2.hpp>
25#include <com/sun/star/frame/XTerminateListener.hpp>
44 css::uno::Reference<css::text::XTextDocument>
m_xDoc;
50 :
public cppu::WeakComponentImplHelper<css::frame::XTerminateListener>
66 void start(
const css::uno::Reference<css::uno::XInterface>& rCloseable,
67 const css::uno::Reference<css::frame::XDesktop2>& rDesktop)
94 cppu::WeakComponentImplHelperBase::disposing();
97 void SAL_CALL
disposing(
const css::lang::EventObject& rEvent)
override
99 const bool bShutDown = (rEvent.Source ==
m_xDesktop);
112 const css::uno::Sequence<css::beans::PropertyValue>& rInfo)
override;
121 css::uno::Reference<css::sdbc::XDatabaseMetaData> SAL_CALL
getMetaData()
override;
122 css::uno::Reference<css::sdbcx::XTablesSupplier>
createCatalog()
override;
123 css::uno::Reference<css::sdbc::XStatement> SAL_CALL
createStatement()
override;
124 css::uno::Reference<css::sdbc::XPreparedStatement>
126 css::uno::Reference<css::sdbc::XPreparedStatement>
130 css::uno::Reference<css::text::XTextDocument>
const&
acquireDoc();
136 css::uno::Reference<css::text::XTextDocument>
m_xDoc;
149 const css::uno::Reference<css::text::XTextDocument>&
getDoc()
const {
return m_xDoc; }
std::unique_ptr< utl::CloseVeto > m_pCloseListener
close listener that vetoes so nobody else disposes m_xDoc
CloseVetoButTerminateListener()
void SAL_CALL disposing(const css::lang::EventObject &rEvent) override
css::uno::Reference< css::frame::XDesktop2 > m_xDesktop
but also listen to XDesktop and if app is terminating anyway, dispose m_xDoc while its still possible...
void start(const css::uno::Reference< css::uno::XInterface > &rCloseable, const css::uno::Reference< css::frame::XDesktop2 > &rDesktop)
void SAL_CALL queryTermination(const css::lang::EventObject &) override
void SAL_CALL notifyTermination(const css::lang::EventObject &) override
void SAL_CALL disposing() override
const css::uno::Reference< css::text::XTextDocument > & getDoc() const
css::uno::Reference< css::text::XTextDocument > m_xDoc
OWriterConnection * m_pConnection
ODocHolder(OWriterConnection *_pConnection)
css::uno::Reference< css::sdbc::XDatabaseMetaData > SAL_CALL getMetaData() override
OWriterConnection(ODriver *_pDriver)
css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareStatement(const OUString &sql) override
~OWriterConnection() override
rtl::Reference< CloseVetoButTerminateListener > m_xCloseVetoButTerminateListener
css::uno::Reference< css::sdbcx::XTablesSupplier > createCatalog() override
oslInterlockedCount m_nDocCount
css::uno::Reference< css::text::XTextDocument > m_xDoc
void SAL_CALL disposing() override
css::uno::Reference< css::sdbc::XStatement > SAL_CALL createStatement() override
void construct(const OUString &rURL, const css::uno::Sequence< css::beans::PropertyValue > &rInfo) override
css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareCall(const OUString &sql) override
css::uno::Reference< css::text::XTextDocument > const & acquireDoc()