LibreOffice Module dbaccess (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
dbaui::DirectSQLDialog Class Referencefinal

#include <directsql.hxx>

Inheritance diagram for dbaui::DirectSQLDialog:
[legend]
Collaboration diagram for dbaui::DirectSQLDialog:
[legend]

Public Member Functions

 DirectSQLDialog (weld::Window *_pParent, const css::uno::Reference< css::sdbc::XConnection > &_rxConn)
 
virtual ~DirectSQLDialog () override
 
sal_Int32 getHistorySize () const
 number of history entries More...
 
- Public Member Functions inherited from weld::GenericDialogController
 GenericDialogController (weld::Widget *pParent, const OUString &rUIFile, const OUString &rDialogId, bool bMobile=false)
 
virtual DialoggetDialog () override
 
virtual ~GenericDialogController () COVERITY_NOEXCEPT_FALSE override
 
- Public Member Functions inherited from weld::DialogController
virtual DialoggetDialog ()=0
 
const DialoggetConstDialog () const
 
virtual short run ()
 
void set_title (const OUString &rTitle)
 
OUString get_title () const
 
void set_help_id (const OUString &rHelpId)
 
OUString get_help_id () const
 
void response (int nResponse)
 
virtual ~DialogController () COVERITY_NOEXCEPT_FALSE
 

Private Types

typedef std::deque< OUString > StringQueue
 

Private Member Functions

void executeCurrent ()
 
void switchToHistory (sal_Int32 _nHistoryPos)
 
virtual void _disposing (const css::lang::EventObject &_rSource) override
 
 DECL_LINK (OnExecute, weld::Button &, void)
 
 DECL_LINK (OnClose, void *, void)
 
 DECL_LINK (OnCloseClick, weld::Button &, void)
 
 DECL_LINK (OnListEntrySelected, weld::ComboBox &, void)
 
 DECL_LINK (OnStatementModified, LinkParamNone *, void)
 
void implAddToStatementHistory (const OUString &_rStatement)
 adds a statement to the statement history More...
 
void implEnsureHistoryLimit ()
 ensures that our history has at most m_nHistoryLimit entries More...
 
void implExecuteStatement (const OUString &_rStatement)
 executes the statement given, adds the status to the status list More...
 
void addStatusText (std::u16string_view _rMessage)
 adds a status text to the status list More...
 
void addOutputText (std::u16string_view _rMessage)
 adds a status text to the output list More...
 
void display (const css::uno::Reference< css::sdbc::XResultSet > &xRS)
 displays resultset More...
 
const char * impl_CheckInvariants () const
 

Private Attributes

::osl::Mutex m_aMutex
 
std::unique_ptr< weld::Buttonm_xExecute
 
std::unique_ptr< weld::ComboBoxm_xSQLHistory
 
std::unique_ptr< weld::TextViewm_xStatus
 
std::unique_ptr< weld::CheckButtonm_xDirectSQL
 
std::unique_ptr< weld::CheckButtonm_xShowOutput
 
std::unique_ptr< weld::TextViewm_xOutput
 
std::unique_ptr< weld::Buttonm_xClose
 
std::unique_ptr< SQLEditViewm_xSQL
 
std::unique_ptr< weld::CustomWeldm_xSQLEd
 
StringQueue m_aStatementHistory
 
StringQueue m_aNormalizedHistory
 
sal_Int32 m_nStatusCount
 
css::uno::Reference< css::sdbc::XConnection > m_xConnection
 
ImplSVEventm_pClosingEvent
 

Additional Inherited Members

- Static Public Member Functions inherited from weld::DialogController
static bool runAsync (const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
 
- Protected Member Functions inherited from utl::OEventListenerAdapter
 OEventListenerAdapter ()
 
virtual ~OEventListenerAdapter ()
 
void startComponentListening (const css::uno::Reference< css::lang::XComponent > &_rxComp)
 
void stopComponentListening (const css::uno::Reference< css::lang::XComponent > &_rxComp)
 
void stopAllComponentListening ()
 
virtual void _disposing (const css::lang::EventObject &_rSource)=0
 
- Protected Attributes inherited from weld::GenericDialogController
std::unique_ptr< weld::Builderm_xBuilder
 
std::shared_ptr< weld::Dialogm_xDialog
 

Detailed Description

Definition at line 39 of file directsql.hxx.

Member Typedef Documentation

◆ StringQueue

typedef std::deque< OUString > dbaui::DirectSQLDialog::StringQueue
private

Definition at line 55 of file directsql.hxx.

Constructor & Destructor Documentation

◆ DirectSQLDialog()

dbaui::DirectSQLDialog::DirectSQLDialog ( weld::Window _pParent,
const css::uno::Reference< css::sdbc::XConnection > &  _rxConn 
)

◆ ~DirectSQLDialog()

dbaui::DirectSQLDialog::~DirectSQLDialog ( )
overridevirtual

Member Function Documentation

◆ _disposing()

void dbaui::DirectSQLDialog::_disposing ( const css::lang::EventObject &  _rSource)
overrideprivatevirtual

◆ addOutputText()

void dbaui::DirectSQLDialog::addOutputText ( std::u16string_view  _rMessage)
private

adds a status text to the output list

Definition at line 358 of file directsql.cxx.

References m_xOutput.

Referenced by display(), and implExecuteStatement().

◆ addStatusText()

void dbaui::DirectSQLDialog::addStatusText ( std::u16string_view  _rMessage)
private

adds a status text to the status list

Definition at line 348 of file directsql.cxx.

References m_nStatusCount, and m_xStatus.

Referenced by implExecuteStatement().

◆ DECL_LINK() [1/5]

dbaui::DirectSQLDialog::DECL_LINK ( OnClose  ,
void *  ,
void   
)
private

◆ DECL_LINK() [2/5]

dbaui::DirectSQLDialog::DECL_LINK ( OnCloseClick  ,
weld::Button ,
void   
)
private

◆ DECL_LINK() [3/5]

dbaui::DirectSQLDialog::DECL_LINK ( OnExecute  ,
weld::Button ,
void   
)
private

◆ DECL_LINK() [4/5]

dbaui::DirectSQLDialog::DECL_LINK ( OnListEntrySelected  ,
weld::ComboBox ,
void   
)
private

◆ DECL_LINK() [5/5]

dbaui::DirectSQLDialog::DECL_LINK ( OnStatementModified  ,
LinkParamNone ,
void   
)
private

◆ display()

void dbaui::DirectSQLDialog::display ( const css::uno::Reference< css::sdbc::XResultSet > &  xRS)
private

displays resultset

Definition at line 306 of file directsql.cxx.

References addOutputText(), and i.

Referenced by implExecuteStatement().

◆ executeCurrent()

void dbaui::DirectSQLDialog::executeCurrent ( )
private

◆ getHistorySize()

sal_Int32 dbaui::DirectSQLDialog::getHistorySize ( ) const

number of history entries

Definition at line 112 of file directsql.cxx.

References impl_CheckInvariants(), m_aStatementHistory, and SAL_WARN.

Referenced by implEnsureHistoryLimit(), and switchToHistory().

◆ impl_CheckInvariants()

const char * dbaui::DirectSQLDialog::impl_CheckInvariants ( ) const
private

◆ implAddToStatementHistory()

void dbaui::DirectSQLDialog::implAddToStatementHistory ( const OUString &  _rStatement)
private

adds a statement to the statement history

Definition at line 147 of file directsql.cxx.

References impl_CheckInvariants(), implEnsureHistoryLimit(), m_aNormalizedHistory, m_aStatementHistory, m_xSQLHistory, and SAL_WARN.

Referenced by executeCurrent().

◆ implEnsureHistoryLimit()

void dbaui::DirectSQLDialog::implEnsureHistoryLimit ( )
private

ensures that our history has at most m_nHistoryLimit entries

Definition at line 124 of file directsql.cxx.

References dbaui::g_nHistoryLimit, getHistorySize(), impl_CheckInvariants(), m_aNormalizedHistory, m_aStatementHistory, m_xSQLHistory, and SAL_WARN.

Referenced by implAddToStatementHistory().

◆ implExecuteStatement()

void dbaui::DirectSQLDialog::implExecuteStatement ( const OUString &  _rStatement)
private

executes the statement given, adds the status to the status list

Definition at line 190 of file directsql.cxx.

References addOutputText(), addStatusText(), Any, DBA_RES, DBG_UNHANDLED_EXCEPTION, display(), Exception, impl_CheckInvariants(), m_aMutex, m_xConnection, m_xDirectSQL, m_xOutput, m_xShowOutput, PROPERTY_ESCAPE_PROCESSING(), SAL_WARN, and u.

Referenced by executeCurrent().

◆ switchToHistory()

void dbaui::DirectSQLDialog::switchToHistory ( sal_Int32  _nHistoryPos)
private

Member Data Documentation

◆ m_aMutex

::osl::Mutex dbaui::DirectSQLDialog::m_aMutex
private

Definition at line 43 of file directsql.hxx.

Referenced by _disposing(), implExecuteStatement(), and ~DirectSQLDialog().

◆ m_aNormalizedHistory

StringQueue dbaui::DirectSQLDialog::m_aNormalizedHistory
private

◆ m_aStatementHistory

StringQueue dbaui::DirectSQLDialog::m_aStatementHistory
private

◆ m_nStatusCount

sal_Int32 dbaui::DirectSQLDialog::m_nStatusCount
private

Definition at line 59 of file directsql.hxx.

Referenced by addStatusText().

◆ m_pClosingEvent

ImplSVEvent* dbaui::DirectSQLDialog::m_pClosingEvent
private

Definition at line 64 of file directsql.hxx.

Referenced by _disposing(), and ~DirectSQLDialog().

◆ m_xClose

std::unique_ptr<weld::Button> dbaui::DirectSQLDialog::m_xClose
private

Definition at line 51 of file directsql.hxx.

Referenced by DirectSQLDialog().

◆ m_xConnection

css::uno::Reference< css::sdbc::XConnection > dbaui::DirectSQLDialog::m_xConnection
private

◆ m_xDirectSQL

std::unique_ptr<weld::CheckButton> dbaui::DirectSQLDialog::m_xDirectSQL
private

Definition at line 48 of file directsql.hxx.

Referenced by implExecuteStatement().

◆ m_xExecute

std::unique_ptr<weld::Button> dbaui::DirectSQLDialog::m_xExecute
private

Definition at line 45 of file directsql.hxx.

Referenced by DirectSQLDialog().

◆ m_xOutput

std::unique_ptr<weld::TextView> dbaui::DirectSQLDialog::m_xOutput
private

Definition at line 50 of file directsql.hxx.

Referenced by addOutputText(), DirectSQLDialog(), and implExecuteStatement().

◆ m_xShowOutput

std::unique_ptr<weld::CheckButton> dbaui::DirectSQLDialog::m_xShowOutput
private

Definition at line 49 of file directsql.hxx.

Referenced by implExecuteStatement().

◆ m_xSQL

std::unique_ptr<SQLEditView> dbaui::DirectSQLDialog::m_xSQL
private

Definition at line 52 of file directsql.hxx.

Referenced by DirectSQLDialog(), executeCurrent(), and switchToHistory().

◆ m_xSQLEd

std::unique_ptr<weld::CustomWeld> dbaui::DirectSQLDialog::m_xSQLEd
private

Definition at line 53 of file directsql.hxx.

Referenced by DirectSQLDialog().

◆ m_xSQLHistory

std::unique_ptr<weld::ComboBox> dbaui::DirectSQLDialog::m_xSQLHistory
private

◆ m_xStatus

std::unique_ptr<weld::TextView> dbaui::DirectSQLDialog::m_xStatus
private

Definition at line 47 of file directsql.hxx.

Referenced by addStatusText(), and DirectSQLDialog().


The documentation for this class was generated from the following files: