tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / ucb / source / ucp / file / filrow.hxx
blob1a33565a6aa11fae4a3e723a39b9094d5c2e7a9a
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 .
19 #pragma once
21 #include <com/sun/star/sdbc/XRow.hpp>
22 #include <com/sun/star/script/XTypeConverter.hpp>
23 #include <cppuhelper/implbase.hxx>
24 #include <mutex>
26 namespace fileaccess {
28 class TaskManager;
30 class XRow_impl: public cppu::WeakImplHelper<
31 css::sdbc::XRow >
33 public:
34 XRow_impl( TaskManager* pShell,const css::uno::Sequence< css::uno::Any >& aValueMap );
35 virtual ~XRow_impl() override;
37 virtual sal_Bool SAL_CALL
38 wasNull() override;
40 virtual OUString SAL_CALL
41 getString( sal_Int32 columnIndex ) override;
43 virtual sal_Bool SAL_CALL
44 getBoolean( sal_Int32 columnIndex ) override;
46 virtual sal_Int8 SAL_CALL
47 getByte( sal_Int32 columnIndex ) override;
49 virtual sal_Int16 SAL_CALL
50 getShort( sal_Int32 columnIndex ) override;
52 virtual sal_Int32 SAL_CALL
53 getInt( sal_Int32 columnIndex ) override;
55 virtual sal_Int64 SAL_CALL
56 getLong( sal_Int32 columnIndex ) override;
58 virtual float SAL_CALL
59 getFloat( sal_Int32 columnIndex ) override;
61 virtual double SAL_CALL
62 getDouble(
63 sal_Int32 columnIndex ) override;
65 virtual css::uno::Sequence< sal_Int8 > SAL_CALL
66 getBytes( sal_Int32 columnIndex ) override;
68 virtual css::util::Date SAL_CALL
69 getDate( sal_Int32 columnIndex ) override;
71 virtual css::util::Time SAL_CALL
72 getTime( sal_Int32 columnIndex ) override;
74 virtual css::util::DateTime SAL_CALL
75 getTimestamp( sal_Int32 columnIndex ) override;
77 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL
78 getBinaryStream( sal_Int32 columnIndex ) override;
80 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL
81 getCharacterStream( sal_Int32 columnIndex ) override;
83 virtual css::uno::Any SAL_CALL
84 getObject(
85 sal_Int32 columnIndex,
86 const css::uno::Reference< css::container::XNameAccess >& typeMap ) override;
88 virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL
89 getRef( sal_Int32 columnIndex ) override;
91 virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL
92 getBlob( sal_Int32 columnIndex ) override;
94 virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL
95 getClob( sal_Int32 columnIndex ) override;
97 virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL
98 getArray( sal_Int32 columnIndex ) override;
100 private:
101 std::mutex m_aMutex;
102 css::uno::Sequence< css::uno::Any > m_aValueMap;
103 bool m_nWasNull;
104 TaskManager* m_pMyShell;
105 css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter;
107 bool isIndexOutOfBounds( sal_Int32 nIndex ) const;
108 template<typename T>
109 T getValue(sal_Int32 columnIndex);
112 } // end namespace fileaccess
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */