tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / extensions / source / propctrlr / xsddatatypes.hxx
blob0413d0250eeefebb2b52c4654294df243cbb1e73
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 #pragma once
22 #include <com/sun/star/uno/Reference.hxx>
23 #include <rtl/ref.hxx>
24 #include <salhelper/simplereferenceobject.hxx>
26 namespace com::sun::star {
27 namespace xsd {
28 class XDataType;
30 namespace beans {
31 class XPropertySetInfo;
36 namespace pcr
40 //= XSDDataType
42 class XSDDataType : public salhelper::SimpleReferenceObject
44 private:
45 css::uno::Reference< css::xsd::XDataType >
46 m_xDataType;
47 css::uno::Reference< css::beans::XPropertySetInfo >
48 m_xFacetInfo;
50 public:
51 explicit XSDDataType(
52 const css::uno::Reference< css::xsd::XDataType >& _rxDataType
55 /// retrieves the underlying UNO component
56 const css::uno::Reference< css::xsd::XDataType >&
57 getUnoDataType() const { return m_xDataType; }
59 /// classifies the data typ
60 sal_Int16 classify() const;
62 // attribute access
63 OUString getName() const;
64 bool isBasicType() const;
66 /// determines whether a given facet exists at the type
67 bool hasFacet( const OUString& _rFacetName ) const;
68 /// retrieves a facet value
69 css::uno::Any getFacet( const OUString& _rFacetName );
70 /// sets a facet value
71 void setFacet( const OUString& _rFacetName, const css::uno::Any& _rFacetValue );
73 /** copies as much facets (values, respectively) from a give data type instance
75 void copyFacetsFrom( const ::rtl::Reference< XSDDataType >& _pSourceType );
77 protected:
78 virtual ~XSDDataType() override;
80 private:
81 XSDDataType( const XSDDataType& ) = delete;
82 XSDDataType& operator=( const XSDDataType& ) = delete;
86 } // namespace pcr
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */