LibreOffice Module dbaccess (master) 1
|
#include <directsql.hxx>
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 Dialog * | getDialog () override |
virtual | ~GenericDialogController () COVERITY_NOEXCEPT_FALSE override |
Public Member Functions inherited from weld::DialogController | |
virtual Dialog * | getDialog ()=0 |
const Dialog * | getConstDialog () 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::Button > | m_xExecute |
std::unique_ptr< weld::ComboBox > | m_xSQLHistory |
std::unique_ptr< weld::TextView > | m_xStatus |
std::unique_ptr< weld::CheckButton > | m_xDirectSQL |
std::unique_ptr< weld::CheckButton > | m_xShowOutput |
std::unique_ptr< weld::TextView > | m_xOutput |
std::unique_ptr< weld::Button > | m_xClose |
std::unique_ptr< SQLEditView > | m_xSQL |
std::unique_ptr< weld::CustomWeld > | m_xSQLEd |
StringQueue | m_aStatementHistory |
StringQueue | m_aNormalizedHistory |
sal_Int32 | m_nStatusCount |
css::uno::Reference< css::sdbc::XConnection > | m_xConnection |
ImplSVEvent * | m_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::Builder > | m_xBuilder |
std::shared_ptr< weld::Dialog > | m_xDialog |
Definition at line 39 of file directsql.hxx.
|
private |
Definition at line 55 of file directsql.hxx.
dbaui::DirectSQLDialog::DirectSQLDialog | ( | weld::Window * | _pParent, |
const css::uno::Reference< css::sdbc::XConnection > & | _rxConn | ||
) |
Definition at line 45 of file directsql.cxx.
References LINK, m_xClose, m_xConnection, m_xExecute, m_xOutput, m_xOutput, m_xSQL, m_xSQLEd, m_xSQLHistory, m_xStatus, and utl::OEventListenerAdapter::startComponentListening().
|
overridevirtual |
Definition at line 83 of file directsql.cxx.
References m_aMutex, m_pClosingEvent, Application::RemoveUserEvent(), and utl::OEventListenerAdapter::stopAllComponentListening().
|
overrideprivatevirtual |
Implements utl::OEventListenerAdapter.
Definition at line 91 of file directsql.cxx.
References Application::CreateMessageDialog(), DBA_RES, LINK, m_aMutex, m_pClosingEvent, m_xConnection, weld::GenericDialogController::m_xDialog, Application::PostUserEvent(), and sMessage.
|
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().
|
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().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
displays resultset
Definition at line 306 of file directsql.cxx.
References addOutputText(), and i.
Referenced by implExecuteStatement().
|
private |
Definition at line 366 of file directsql.cxx.
References impl_CheckInvariants(), implAddToStatementHistory(), implExecuteStatement(), m_xSQL, and SAL_WARN.
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().
|
private |
Definition at line 172 of file directsql.cxx.
References m_aNormalizedHistory, m_aStatementHistory, m_xConnection, and m_xSQLHistory.
Referenced by executeCurrent(), getHistorySize(), implAddToStatementHistory(), implEnsureHistoryLimit(), implExecuteStatement(), and switchToHistory().
|
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().
|
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().
|
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().
|
private |
Definition at line 387 of file directsql.cxx.
References getHistorySize(), impl_CheckInvariants(), m_aStatementHistory, m_xSQL, and SAL_WARN.
|
private |
Definition at line 43 of file directsql.hxx.
Referenced by _disposing(), implExecuteStatement(), and ~DirectSQLDialog().
|
private |
Definition at line 57 of file directsql.hxx.
Referenced by impl_CheckInvariants(), implAddToStatementHistory(), and implEnsureHistoryLimit().
|
private |
Definition at line 56 of file directsql.hxx.
Referenced by getHistorySize(), impl_CheckInvariants(), implAddToStatementHistory(), implEnsureHistoryLimit(), and switchToHistory().
|
private |
Definition at line 59 of file directsql.hxx.
Referenced by addStatusText().
|
private |
Definition at line 64 of file directsql.hxx.
Referenced by _disposing(), and ~DirectSQLDialog().
|
private |
Definition at line 51 of file directsql.hxx.
Referenced by DirectSQLDialog().
|
private |
Definition at line 62 of file directsql.hxx.
Referenced by _disposing(), DirectSQLDialog(), impl_CheckInvariants(), and implExecuteStatement().
|
private |
Definition at line 48 of file directsql.hxx.
Referenced by implExecuteStatement().
|
private |
Definition at line 45 of file directsql.hxx.
Referenced by DirectSQLDialog().
|
private |
Definition at line 50 of file directsql.hxx.
Referenced by addOutputText(), DirectSQLDialog(), and implExecuteStatement().
|
private |
Definition at line 49 of file directsql.hxx.
Referenced by implExecuteStatement().
|
private |
Definition at line 52 of file directsql.hxx.
Referenced by DirectSQLDialog(), executeCurrent(), and switchToHistory().
|
private |
Definition at line 53 of file directsql.hxx.
Referenced by DirectSQLDialog().
|
private |
Definition at line 46 of file directsql.hxx.
Referenced by DirectSQLDialog(), impl_CheckInvariants(), implAddToStatementHistory(), and implEnsureHistoryLimit().
|
private |
Definition at line 47 of file directsql.hxx.
Referenced by addStatusText(), and DirectSQLDialog().