build fix: no comphelper/profilezone.hxx in this branch
[LibreOffice.git] / dbaccess / source / ui / uno / composerdialogs.hxx
blob2f6dd6eae4a55149d84f19df35d91bfe835574d2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 INCLUDED_DBACCESS_SOURCE_UI_UNO_COMPOSERDIALOGS_HXX
21 #define INCLUDED_DBACCESS_SOURCE_UI_UNO_COMPOSERDIALOGS_HXX
23 #include <com/sun/star/container/XNameAccess.hpp>
24 #include <com/sun/star/sdbc/XConnection.hpp>
25 #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
26 #include <com/sun/star/beans/XPropertySet.hpp>
27 #include <com/sun/star/sdbc/XRowSet.hpp>
29 #include <svtools/genericunodialog.hxx>
30 #include "moduledbu.hxx"
31 #include "apitools.hxx"
33 namespace dbaui
36 // ComposerDialog
37 class ComposerDialog;
38 typedef ::comphelper::OPropertyArrayUsageHelper< ComposerDialog > ComposerDialog_PBASE;
40 class ComposerDialog
41 :public svt::OGenericUnoDialog
42 ,public ComposerDialog_PBASE
44 OModuleClient m_aModuleClient;
45 protected:
46 // <properties>
47 css::uno::Reference< css::sdb::XSingleSelectQueryComposer >
48 m_xComposer;
49 css::uno::Reference< css::sdbc::XRowSet >
50 m_xRowSet;
51 // </properties>
53 protected:
54 explicit ComposerDialog(const css::uno::Reference< css::uno::XComponentContext >& _rxORB);
55 virtual ~ComposerDialog() override;
57 public:
58 virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId()
59 throw (css::uno::RuntimeException, std::exception) override;
61 DECLARE_PROPERTYCONTAINER_DEFAULTS( );
63 protected:
64 // own overridables
65 virtual VclPtr<Dialog> createComposerDialog(
66 vcl::Window* _pParent,
67 const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
68 const css::uno::Reference< css::container::XNameAccess >& _rxColumns
69 ) = 0;
71 private:
72 // OGenericUnoDialog overridables
73 virtual VclPtr<Dialog> createDialog(vcl::Window* _pParent) override;
76 // RowsetFilterDialog
77 class RowsetFilterDialog : public ComposerDialog
79 public:
80 explicit RowsetFilterDialog(
81 const css::uno::Reference< css::uno::XComponentContext >& _rxORB
84 DECLARE_SERVICE_INFO();
85 /// @throws css::uno::RuntimeException
86 static OUString SAL_CALL getImplementationName_Static( ) throw (css::uno::RuntimeException);
87 /// @throws css::uno::RuntimeException
88 static css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static( ) throw(css::uno::RuntimeException);
89 static css::uno::Reference< css::uno::XInterface >
90 SAL_CALL Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&);
92 protected:
93 // own overridables
94 virtual VclPtr<Dialog> createComposerDialog(
95 vcl::Window* _pParent,
96 const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
97 const css::uno::Reference< css::container::XNameAccess >& _rxColumns
98 ) override;
100 // OGenericUnoDialog overridables
101 virtual void executedDialog( sal_Int16 _nExecutionResult ) override;
102 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
103 throw (css::uno::Exception, css::uno::RuntimeException, std::exception) override;
107 // RowsetOrderDialog
108 class RowsetOrderDialog : public ComposerDialog
110 public:
111 explicit RowsetOrderDialog(
112 const css::uno::Reference< css::uno::XComponentContext >& _rxORB
115 DECLARE_SERVICE_INFO();
116 /// @throws css::uno::RuntimeException
117 static OUString SAL_CALL getImplementationName_Static( ) throw (css::uno::RuntimeException);
118 /// @throws css::uno::RuntimeException
119 static css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static( ) throw(css::uno::RuntimeException);
120 static css::uno::Reference< css::uno::XInterface >
121 SAL_CALL Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&);
123 protected:
124 // own overridables
125 virtual VclPtr<Dialog> createComposerDialog(
126 vcl::Window* _pParent,
127 const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
128 const css::uno::Reference< css::container::XNameAccess >& _rxColumns
129 ) override;
131 // OGenericUnoDialog overridables
132 virtual void executedDialog( sal_Int16 _nExecutionResult ) override;
133 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
134 throw (css::uno::Exception, css::uno::RuntimeException, std::exception) override;
137 } // namespace dbaui
139 #endif // INCLUDED_DBACCESS_SOURCE_UI_UNO_COMPOSERDIALOGS_HXX
141 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */