20#include <config_java.h>
21#include <core_resource.hxx>
55 const OUString& rUIXMLDescription,
const OUString& rId,
const SfxItemSet& rCoreAttrs,
58 , m_nControlFlags(nControlFlags)
64 m_xOptions = m_xBuilder->weld_entry(
"options");
116 bool bValid, bReadonly;
134 m_xCharset->SelectEntryByIanaName( pCharsetItem->GetValue() );
142 bool bChangedSomething =
false;
152 bChangedSomething =
true;
155 return bChangedSomething;
162 , m_xShowDeleted(m_xBuilder->weld_check_button(
"showDelRowsCheckbutton"))
163 , m_xFT_Message(m_xBuilder->weld_label(
"specMessageLabel"))
164 , m_xIndexes(m_xBuilder->weld_button(
"indiciesButton"))
176 return std::make_unique<ODbaseDetailsPage>(pPage, pController, *_rAttrSet);
182 bool bValid, bReadonly;
189 if (pTypeCollection && pUrlItem && pUrlItem->
GetValue().getLength())
209 return bChangedSomething;
220 m_xFT_Message->set_visible(m_xShowDeleted->get_active());
236 return std::make_unique<OAdoDetailsPage>(pPage, pController, *rAttrSet);
243 , m_xUseCatalog(m_xBuilder->weld_check_button(
"useCatalogCheckbutton"))
254 return std::make_unique<OOdbcDetailsPage>(pPage, pController, *pAttrSet);
261 return bChangedSomething;
266 bool bValid, bReadonly;
280 , m_xFTHostname(m_xBuilder->weld_label(
"hostnameft"))
281 , m_xEDHostname(m_xBuilder->weld_entry(
"hostname"))
282 , m_xPortNumber(m_xBuilder->weld_label(
"portnumberft"))
283 , m_xNFPortNumber(m_xBuilder->weld_spin_button(
"portnumber"))
284 , m_xUseCatalog(m_xBuilder->weld_check_button(
"usecatalog"))
295 return std::make_unique<OUserDriverDetailsPage>(pPage, pController, *pAttrSet);
306 return bChangedSomething;
324 bool bValid, bReadonly;
353 return std::make_unique<OMySQLODBCDetailsPage>(pPage, pController, *pAttrSet);
358 :
OCommonBehaviourTabPage(pPage, pController,
"dbaccess/ui/generalspecialjdbcdetailspage.ui",
"GeneralSpecialJDBCDetails",
360 , m_nPortId(_nPortId)
362 , m_xEDHostname(m_xBuilder->weld_entry(
"hostNameEntry"))
363 , m_xNFPortNumber(m_xBuilder->weld_spin_button(
"portNumberSpinbutton"))
364 , m_xFTSocket(m_xBuilder->weld_label(
"socketLabel"))
365 , m_xEDSocket(m_xBuilder->weld_entry(
"socketEntry"))
366 , m_xFTDriverClass(m_xBuilder->weld_label(
"driverClassLabel"))
367 , m_xEDDriverClass(m_xBuilder->weld_entry(
"jdbcDriverClassEntry"))
368 , m_xTestJavaDriver(m_xBuilder->weld_button(
"testDriverClassButton"))
373 if (pTypeCollection && pUrlItem && pUrlItem->
GetValue().getLength() )
411 return bChangedSomething;
416 bool bValid, bReadonly;
453 OSL_ENSURE(m_pAdminDialog,
"No Admin dialog set! ->GPF");
454 OSL_ENSURE(m_bUseClass,
"Who called me?");
456 bool bSuccess =
false;
460 if (!
o3tl::trim(m_xEDDriverClass->get_text()).empty())
464 m_xEDDriverClass->set_text(m_xEDDriverClass->get_text().trim());
465 bSuccess = ::connectivity::existsJavaClassByName(xJVM,m_xEDDriverClass->get_text());
472 TranslateId pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
490 , m_xMySQLSettingsContainer(m_xBuilder->weld_widget(
"MySQLSettingsContainer"))
492 , m_xSeparator1(m_xBuilder->weld_label(
"connectionheader"))
493 , m_xSeparator2(m_xBuilder->weld_label(
"userheader"))
494 , m_xUserNameLabel(m_xBuilder->weld_label(
"usernamelabel"))
495 , m_xUserName(m_xBuilder->weld_entry(
"username"))
496 , m_xPasswordRequired(m_xBuilder->weld_check_button(
"passwordrequired"))
535 bChangedSomething =
true;
539 return bChangedSomething;
544 bool bValid, bReadonly;
564 return std::make_unique<OGeneralSpecialJDBCDetailsPage>(pPage, pController, *_rAttrSet,
DSID_MYSQL_PORTNUMBER);
569 return std::make_unique<MySQLNativePage>(pPage, pController, *pAttrSet);
574 return std::make_unique<OGeneralSpecialJDBCDetailsPage>(pPage, pController, *_rAttrSet,
DSID_ORACLE_PORTNUMBER,
false);
581 , m_xETBaseDN(m_xBuilder->weld_entry(
"baseDNEntry"))
582 , m_xCBUseSSL(m_xBuilder->weld_check_button(
"useSSLCheckbutton"))
583 , m_xNFPortNumber(m_xBuilder->weld_spin_button(
"portNumberSpinbutton"))
584 , m_xNFRowCount(m_xBuilder->weld_spin_button(
"LDAPRowCountspinbutton"))
601 return std::make_unique<OLDAPDetailsPage>(pPage, pController, *_rAttrSet);
612 return bChangedSomething;
617 OnControlModifiedButtonClick(rCheckBox);
619 if (m_xCBUseSSL->get_active())
621 m_iNormalPort = m_xNFPortNumber->get_value();
622 m_xNFPortNumber->set_value(m_iSSLPort);
626 m_iSSLPort = m_xNFPortNumber->get_value();
627 m_xNFPortNumber->set_value(m_iNormalPort);
634 bool bValid, bReadonly;
667 return std::make_unique<OTextDetailsPage>(pPage, pController, *pAttrSet);
685 bool bValid, bReadonly;
696 return bChangedSomething;
706 return std::make_unique<GeneratedValuesPage>(pPage, pController, *_rAttrSet);
713 return std::make_unique<SpecialSettingsPage>(pPage, pController, *_rAttrSet, aMetaData);
const OUString & GetValue() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
allows an ODsnTypeCollection to be transported in an SfxItemSet
virtual void implInitControls(const SfxItemSet &_rSet, bool _bSaveValue) override
called from within Reset and ActivatePage, use to initialize the controls with the items from the giv...
std::unique_ptr< weld::Label > m_xSeparator2
std::unique_ptr< weld::Entry > m_xUserName
std::unique_ptr< weld::Label > m_xUserNameLabel
virtual void fillControls(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to save the value if necessary
std::unique_ptr< weld::Label > m_xSeparator1
virtual void fillWindows(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to disable if necessary
MySQLNativePage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rCoreAttrs)
virtual ~MySQLNativePage() override
virtual bool FillItemSet(SfxItemSet *_rCoreAttrs) override
std::unique_ptr< MySQLNativeSettings > m_xMySQLSettings
std::unique_ptr< weld::CheckButton > m_xPasswordRequired
OAdoDetailsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rCoreAttrs)
eases the implementation of tab pages handling user/password and/or character set and/or generic opti...
virtual void fillControls(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to save the value if necessary
virtual void implInitControls(const SfxItemSet &_rSet, bool _bSaveValue) override
called from within Reset and ActivatePage, use to initialize the controls with the items from the giv...
virtual bool FillItemSet(SfxItemSet *_rCoreAttrs) override
std::unique_ptr< weld::Label > m_xCharsetLabel
std::unique_ptr< weld::Label > m_xOptionsLabel
virtual ~OCommonBehaviourTabPage() override
OCommonBehaviourTabPage(weld::Container *pPage, weld::DialogController *pController, const OUString &rUIXMLDescription, const OUString &rId, const SfxItemSet &_rCoreAttrs, OCommonBehaviourTabPageFlags nControlFlags)
std::unique_ptr< weld::Entry > m_xOptions
virtual void fillWindows(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to disable if necessary
std::unique_ptr< weld::Label > m_xDataConvertLabel
std::unique_ptr< CharSetListBox > m_xCharset
OCommonBehaviourTabPageFlags m_nControlFlags
static OUString getDatasourceType(const SfxItemSet &_rSet)
extracts the connection type from the given setThe connection type is determined by the value of the ...
std::unique_ptr< weld::Button > m_xIndexes
virtual void implInitControls(const SfxItemSet &_rSet, bool _bSaveValue) override
called from within Reset and ActivatePage, use to initialize the controls with the items from the giv...
std::unique_ptr< weld::Label > m_xFT_Message
ODbaseDetailsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &_rCoreAttrs)
virtual ~ODbaseDetailsPage() override
virtual bool FillItemSet(SfxItemSet *_rCoreAttrs) override
std::unique_ptr< weld::CheckButton > m_xShowDeleted
std::unique_ptr< weld::Button > m_xTestJavaDriver
std::unique_ptr< weld::Label > m_xFTDriverClass
virtual bool FillItemSet(SfxItemSet *_rCoreAttrs) override
virtual ~OGeneralSpecialJDBCDetailsPage() override
std::unique_ptr< weld::Label > m_xFTSocket
std::unique_ptr< weld::Entry > m_xEDHostname
TypedWhichId< SfxInt32Item > m_nPortId
virtual void implInitControls(const SfxItemSet &_rSet, bool _bSaveValue) override
called from within Reset and ActivatePage, use to initialize the controls with the items from the giv...
virtual void callModifiedHdl(weld::Widget *pControl=nullptr) override
OGeneralSpecialJDBCDetailsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &_rCoreAttrs, sal_uInt16 _nPortId, bool bShowSocket=true)
OUString m_sDefaultJdbcDriverName
std::unique_ptr< weld::SpinButton > m_xNFPortNumber
std::unique_ptr< weld::Entry > m_xEDDriverClass
std::unique_ptr< weld::Entry > m_xEDSocket
static void getFlags(const SfxItemSet &_rSet, bool &_rValid, bool &_rReadonly)
analyze the invalid and the readonly flag which may be present in the set
static void fillString(SfxItemSet &_rSet, const weld::Entry *pEdit, TypedWhichId< SfxStringItem > _nID, bool &_bChangedSomething)
fills the String value into the item set when the value changed.
virtual void callModifiedHdl(weld::Widget *=nullptr)
virtual void implInitControls(const SfxItemSet &_rSet, bool _bSaveValue)
called from within Reset and ActivatePage, use to initialize the controls with the items from the giv...
static void fillBool(SfxItemSet &_rSet, const weld::CheckButton *pCheckBox, sal_uInt16 _nID, bool bOptionalBool, bool &_bChangedSomething, bool _bRevertValue=false)
fills the Boolean value into the item set when the value changed.
static void fillInt32(SfxItemSet &_rSet, const weld::SpinButton *pEdit, TypedWhichId< SfxInt32Item > _nID, bool &_bChangedSomething)
fills the int value into the item set when the value changed.
std::unique_ptr< weld::Entry > m_xETBaseDN
virtual bool FillItemSet(SfxItemSet *_rCoreAttrs) override
std::unique_ptr< weld::CheckButton > m_xCBUseSSL
virtual ~OLDAPDetailsPage() override
virtual void implInitControls(const SfxItemSet &_rSet, bool _bSaveValue) override
called from within Reset and ActivatePage, use to initialize the controls with the items from the giv...
OLDAPDetailsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rCoreAttrs)
std::unique_ptr< weld::SpinButton > m_xNFPortNumber
std::unique_ptr< weld::SpinButton > m_xNFRowCount
OMySQLODBCDetailsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rCoreAttrs)
virtual bool FillItemSet(SfxItemSet *_rCoreAttrs) override
virtual void implInitControls(const SfxItemSet &_rSet, bool _bSaveValue) override
called from within Reset and ActivatePage, use to initialize the controls with the items from the giv...
std::unique_ptr< weld::CheckButton > m_xUseCatalog
virtual ~OOdbcDetailsPage() override
OOdbcDetailsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rCoreAttrs)
virtual void fillWindows(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to disable if necessary
std::unique_ptr< OTextConnectionHelper > m_xTextConnectionHelper
virtual ~OTextDetailsPage() override
virtual bool prepareLeave() override
called from within DeactivatePage. The page is allowed to be deactivated if this method returns sal_T...
OTextDetailsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rCoreAttrs)
virtual bool FillItemSet(SfxItemSet *_rCoreAttrs) override
virtual void fillControls(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to save the value if necessary
virtual void implInitControls(const SfxItemSet &_rSet, bool _bSaveValue) override
called from within Reset and ActivatePage, use to initialize the controls with the items from the giv...
std::unique_ptr< weld::Entry > m_xEDHostname
virtual void fillControls(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to save the value if necessary
OUserDriverDetailsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &_rCoreAttrs)
std::unique_ptr< weld::Label > m_xPortNumber
virtual ~OUserDriverDetailsPage() override
std::unique_ptr< weld::CheckButton > m_xUseCatalog
virtual void implInitControls(const SfxItemSet &_rSet, bool _bSaveValue) override
called from within Reset and ActivatePage, use to initialize the controls with the items from the giv...
std::unique_ptr< weld::SpinButton > m_xNFPortNumber
virtual void fillWindows(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to disable if necessary
virtual bool FillItemSet(SfxItemSet *_rCoreAttrs) override
std::unique_ptr< weld::Label > m_xFTHostname
OCommonBehaviourTabPageFlags
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
#define DSID_CONN_LDAP_BASEDN
#define DSID_CONN_LDAP_PORTNUMBER
#define DSID_SHOWDELETEDROWS
#define DSID_CONN_LDAP_USESSL
#define DSID_CONN_LDAP_ROWCOUNT
#define DSID_TYPECOLLECTION
#define DSID_CONN_HOSTNAME
#define DSID_MYSQL_PORTNUMBER
#define DSID_ADDITIONALOPTIONS
#define DSID_CONN_PORTNUMBER
#define DSID_JDBCDRIVERCLASS
#define DSID_ORACLE_PORTNUMBER
#define DSID_PASSWORDREQUIRED
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(OApplicationController, OnClipboardChanged, TransferableDataHelper *, void)
IMPL_LINK(OApplicationController, OnSelectContainer, void *, _pType, void)
std::basic_string_view< charT, traits > trim(std::basic_string_view< charT, traits > str)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
Reference< XNameAccess > m_xContainer