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 .
22 #include <com/sun/star/uno/Reference.hxx>
23 #include <rtl/ref.hxx>
24 #include <salhelper/simplereferenceobject.hxx>
26 namespace com::sun::star
{
31 class XPropertySetInfo
;
42 class XSDDataType
: public salhelper::SimpleReferenceObject
45 css::uno::Reference
< css::xsd::XDataType
>
47 css::uno::Reference
< css::beans::XPropertySetInfo
>
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;
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
);
78 virtual ~XSDDataType() override
;
81 XSDDataType( const XSDDataType
& ) = delete;
82 XSDDataType
& operator=( const XSDDataType
& ) = delete;
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */