1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef DBACCESS_ADVANCEDSETTINGSDLG_HXX
21 #define DBACCESS_ADVANCEDSETTINGSDLG_HXX
23 #include "IItemSetHelper.hxx"
24 #include "moduledbu.hxx"
26 #include <sfx2/tabdlg.hxx>
30 //........................................................................
33 //........................................................................
35 //=========================================================================
36 //= AdvancedSettingsDialog
37 //=========================================================================
38 class ODbDataSourceAdministrationHelper
;
39 /** implements the advanced page dlg of the data source properties.
41 class AdvancedSettingsDialog
:public SfxTabDialog
42 ,public IItemSetHelper
43 ,public IDatabaseSettingsDialog
45 OModuleClient m_aModuleClient
;
46 ::std::auto_ptr
<ODbDataSourceAdministrationHelper
> m_pImpl
;
49 virtual void PageCreated(sal_uInt16 _nId
, SfxTabPage
& _rPage
);
52 AdvancedSettingsDialog( Window
* _pParent
54 ,const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxORB
55 ,const ::com::sun::star::uno::Any
& _aDataSourceName
);
57 virtual ~AdvancedSettingsDialog();
59 /// determines whether or not the given data source type has any advanced setting
60 static bool doesHaveAnyAdvancedSettings( const OUString
& _sURL
);
62 virtual const SfxItemSet
* getOutputSet() const;
63 virtual SfxItemSet
* getWriteOutputSet();
65 virtual short Execute();
67 // forwards to ODbDataSourceAdministrationHelper
68 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> getORB() const;
69 virtual ::std::pair
< ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>,sal_Bool
> createConnection();
70 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XDriver
> getDriver();
71 virtual OUString
getDatasourceType(const SfxItemSet
& _rSet
) const;
72 virtual void clearPassword();
73 virtual sal_Bool
saveDatasource();
74 virtual void setTitle(const OUString
& _sTitle
);
75 virtual void enableConfirmSettings( bool _bEnable
);
78 //........................................................................
80 //........................................................................
82 #endif // DBACCESS_ADVANCEDSETTINGSDLG_HXX
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */