tdf#150789 - FILEOPEN PPTX: fix text in SmartArt vertically off
[LibreOffice.git] / connectivity / source / drivers / firebird / StatementCommonBase.hxx
blob92eac1ec521dc21eeceba477f8d18ca8d88b5345
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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 #pragma once
22 #include <sal/config.h>
24 #include <string_view>
26 #include "Connection.hxx"
27 #include "SubComponent.hxx"
29 #include <ibase.h>
31 #include <cppuhelper/compbase.hxx>
32 #include <rtl/ref.hxx>
34 #include <com/sun/star/sdbc/XCloseable.hpp>
35 #include <com/sun/star/sdbc/XMultipleResults.hpp>
36 #include <com/sun/star/sdbc/XWarningsSupplier.hpp>
37 #include <com/sun/star/util/XCancellable.hpp>
39 namespace connectivity::firebird
41 class OResultSet;
43 typedef ::cppu::WeakComponentImplHelper< css::sdbc::XWarningsSupplier,
44 css::util::XCancellable,
45 css::sdbc::XCloseable,
46 css::sdbc::XMultipleResults> OStatementCommonBase_Base;
48 class OStatementCommonBase : public OStatementCommonBase_Base,
49 public ::cppu::OPropertySetHelper,
50 public OPropertyArrayUsageHelper<OStatementCommonBase>
53 protected:
54 ::osl::Mutex m_aMutex;
56 rtl::Reference<OResultSet> m_xResultSet; // The last ResultSet created
57 // for this Statement
59 ::rtl::Reference<Connection> m_pConnection;
61 ISC_STATUS_ARRAY m_statusVector;
62 isc_stmt_handle m_aStatementHandle;
64 protected:
65 virtual void disposeResultSet();
66 /// @throws css::sdbc::SQLException
67 void freeStatementHandle();
69 // OPropertyArrayUsageHelper
70 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
71 // OPropertySetHelper
72 using OPropertySetHelper::getFastPropertyValue;
73 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
74 virtual sal_Bool SAL_CALL convertFastPropertyValue(
75 css::uno::Any & rConvertedValue,
76 css::uno::Any & rOldValue,
77 sal_Int32 nHandle,
78 const css::uno::Any& rValue ) override;
79 virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
80 sal_Int32 nHandle,
81 const css::uno::Any& rValue) override;
82 virtual void SAL_CALL getFastPropertyValue(
83 css::uno::Any& rValue,
84 sal_Int32 nHandle) const override;
85 virtual ~OStatementCommonBase() override;
87 /// @throws css::sdbc::SQLException
88 void prepareAndDescribeStatement(std::u16string_view sqlIn, XSQLDA*& pOutSqlda);
90 /// @throws css::sdbc::SQLException
91 short getSqlInfoItem(char aInfoItem);
92 /// @throws css::sdbc::SQLException
93 bool isDDLStatement();
94 /// @throws css::sdbc::SQLException
95 sal_Int32 getStatementChangeCount();
97 public:
99 explicit OStatementCommonBase(Connection* _pConnection);
100 using OStatementCommonBase_Base::operator css::uno::Reference< css::uno::XInterface >;
102 // OComponentHelper
103 virtual void SAL_CALL disposing() override {
104 disposeResultSet();
105 OStatementCommonBase_Base::disposing();
107 // XInterface
108 virtual void SAL_CALL release() noexcept override;
109 virtual void SAL_CALL acquire() noexcept override;
110 // XInterface
111 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
112 //XTypeProvider
113 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
115 // XPropertySet
116 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
118 // XWarningsSupplier - UNSUPPORTED
119 virtual css::uno::Any SAL_CALL getWarnings( ) override;
120 virtual void SAL_CALL clearWarnings( ) override;
121 // XMultipleResults - UNSUPPORTED
122 virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getResultSet( ) override;
123 virtual sal_Int32 SAL_CALL getUpdateCount( ) override;
124 virtual sal_Bool SAL_CALL getMoreResults( ) override;
126 // XCancellable
127 virtual void SAL_CALL cancel( ) override;
128 // XCloseable
129 virtual void SAL_CALL close( ) override;
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */