2010-10-27 12:33:13 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-14 17:39:53 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2004-08-02 14:54:59 +00:00
|
|
|
|
|
|
|
#ifndef DBAUI_USERADMINDLG_HXX
|
|
|
|
#define DBAUI_USERADMINDLG_HXX
|
|
|
|
|
|
|
|
#include <sfx2/tabdlg.hxx>
|
|
|
|
#include "dsntypes.hxx"
|
|
|
|
#include "IItemSetHelper.hxx"
|
|
|
|
#include <comphelper/uno3.hxx>
|
|
|
|
#include "moduledbu.hxx"
|
|
|
|
#include <memory>
|
|
|
|
|
2011-08-11 19:53:21 -04:00
|
|
|
namespace com { namespace sun { namespace star {
|
|
|
|
namespace sdbc {
|
|
|
|
class XConnection;
|
|
|
|
}
|
|
|
|
namespace lang {
|
|
|
|
class XMultiServiceFactory;
|
|
|
|
}
|
|
|
|
}}}
|
2004-08-02 14:54:59 +00:00
|
|
|
|
|
|
|
namespace dbaui
|
|
|
|
{
|
|
|
|
class ODbDataSourceAdministrationHelper;
|
2013-08-17 23:43:14 +02:00
|
|
|
// OUserAdminDlg
|
2004-08-02 14:54:59 +00:00
|
|
|
|
|
|
|
/** implements the user adin dialog
|
|
|
|
*/
|
2007-05-10 09:29:52 +00:00
|
|
|
class OUserAdminDlg : public SfxTabDialog, public IItemSetHelper, public IDatabaseSettingsDialog,public dbaui::OModuleClient
|
2004-08-02 14:54:59 +00:00
|
|
|
{
|
2007-07-06 07:26:19 +00:00
|
|
|
OModuleClient m_aModuleClient;
|
2004-08-02 14:54:59 +00:00
|
|
|
::std::auto_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
|
|
|
|
SfxItemSet* m_pItemSet;
|
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
|
2005-03-18 09:10:57 +00:00
|
|
|
sal_Bool m_bOwnConnection;
|
2004-08-02 14:54:59 +00:00
|
|
|
protected:
|
2011-01-14 15:00:11 +01:00
|
|
|
virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage);
|
2004-08-02 14:54:59 +00:00
|
|
|
public:
|
|
|
|
OUserAdminDlg( Window* _pParent
|
|
|
|
,SfxItemSet* _pItems
|
2013-01-04 09:12:44 +02:00
|
|
|
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB
|
2005-03-18 09:10:57 +00:00
|
|
|
,const ::com::sun::star::uno::Any& _aDataSourceName
|
|
|
|
,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection);
|
2004-08-02 14:54:59 +00:00
|
|
|
|
|
|
|
virtual ~OUserAdminDlg();
|
|
|
|
|
|
|
|
virtual const SfxItemSet* getOutputSet() const;
|
|
|
|
virtual SfxItemSet* getWriteOutputSet();
|
|
|
|
|
|
|
|
virtual short Execute();
|
|
|
|
|
|
|
|
// forwards to ODbDataSourceAdministrationHelper
|
2013-01-04 09:12:44 +02:00
|
|
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getORB() const;
|
2005-01-21 16:17:44 +00:00
|
|
|
virtual ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >,sal_Bool> createConnection();
|
2004-08-02 14:54:59 +00:00
|
|
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver();
|
2013-04-07 12:06:47 +02:00
|
|
|
virtual OUString getDatasourceType(const SfxItemSet& _rSet) const;
|
2004-08-02 14:54:59 +00:00
|
|
|
virtual void clearPassword();
|
|
|
|
virtual sal_Bool saveDatasource();
|
2013-04-07 12:06:47 +02:00
|
|
|
virtual void setTitle(const OUString& _sTitle);
|
2007-05-10 09:29:52 +00:00
|
|
|
virtual void enableConfirmSettings( bool _bEnable );
|
2004-08-02 14:54:59 +00:00
|
|
|
};
|
|
|
|
} // namespace dbaui
|
|
|
|
|
|
|
|
#endif // DBAUI_USERADMINDLG_HXX
|
2010-10-27 12:33:13 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|