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 .
20 #ifndef INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_FORMBROWSERTOOLS_HXX
21 #define INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_FORMBROWSERTOOLS_HXX
23 #include <com/sun/star/uno/Any.hxx>
24 #include <com/sun/star/beans/Property.hpp>
25 #include <rtl/ustring.hxx>
35 OUString
GetUIHeadlineName(sal_Int16 _nClassId
, const css::uno::Any
& _rUnoObject
);
36 sal_Int16
classifyComponent( const css::uno::Reference
< css::uno::XInterface
>& _rxComponent
);
39 struct FindPropertyByHandle
: public std::unary_function
< css::beans::Property
, bool >
45 explicit FindPropertyByHandle( sal_Int32 _nId
) : m_nId ( _nId
) { }
46 bool operator()( const css::beans::Property
& _rProp
) const
48 return m_nId
== _rProp
.Handle
;
53 struct FindPropertyByName
: public std::unary_function
< css::beans::Property
, bool >
59 explicit FindPropertyByName( const OUString
& _rName
) : m_sName( _rName
) { }
60 bool operator()( const css::beans::Property
& _rProp
) const
62 return m_sName
== _rProp
.Name
;
67 struct PropertyLessByName
68 :public std::binary_function
< css::beans::Property
,
73 bool operator() (const css::beans::Property
& _rLhs
, const css::beans::Property
& _rRhs
) const
75 return _rLhs
.Name
< _rRhs
.Name
;
81 :public std::binary_function
< css::uno::Type
,
86 bool operator() (const css::uno::Type
& _rLhs
, const css::uno::Type
& _rRhs
) const
88 return _rLhs
.getTypeName() < _rRhs
.getTypeName();
93 typedef std::set
< css::beans::Property
, PropertyLessByName
> PropertyBag
;
99 #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_FORMBROWSERTOOLS_HXX
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */