diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-19 12:51:29 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-20 07:05:25 +0000 |
commit | 1b62841b1859ae3443e2bf1ebe99ec3d6afb6cc2 (patch) | |
tree | e3b7af8a34c55d7aad95752ad5d642a271523d08 /include/comphelper/anycompare.hxx | |
parent | b1659c95b0620cfd1291f889eae767757f696ae1 (diff) |
com::sun::star->css in include/comphelper
Change-Id: Ice569b724732da1fd67a18a4ccf2f92f530cd689
Reviewed-on: https://gerrit.libreoffice.org/19459
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/comphelper/anycompare.hxx')
-rw-r--r-- | include/comphelper/anycompare.hxx | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/include/comphelper/anycompare.hxx b/include/comphelper/anycompare.hxx index de9f806ee2f7..a871fd80a0a9 100644 --- a/include/comphelper/anycompare.hxx +++ b/include/comphelper/anycompare.hxx @@ -41,21 +41,21 @@ namespace comphelper class SAL_NO_VTABLE IKeyPredicateLess { public: - virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const = 0; + virtual bool isLess( css::uno::Any const & _lhs, css::uno::Any const & _rhs ) const = 0; virtual ~IKeyPredicateLess() {} }; //= LessPredicateAdapter - struct LessPredicateAdapter : public ::std::binary_function< ::com::sun::star::uno::Any, ::com::sun::star::uno::Any, bool > + struct LessPredicateAdapter : public ::std::binary_function< css::uno::Any, css::uno::Any, bool > { LessPredicateAdapter( const IKeyPredicateLess& _predicate ) :m_predicate( _predicate ) { } - bool operator()( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + bool operator()( css::uno::Any const & _lhs, css::uno::Any const & _rhs ) const { return m_predicate.isLess( _lhs, _rhs ); } @@ -74,13 +74,13 @@ namespace comphelper class ScalarPredicateLess : public IKeyPredicateLess { public: - virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const override + virtual bool isLess( css::uno::Any const & _lhs, css::uno::Any const & _rhs ) const override { SCALAR lhs(0), rhs(0); if ( !( _lhs >>= lhs ) || !( _rhs >>= rhs ) ) - throw ::com::sun::star::lang::IllegalArgumentException(); + throw css::lang::IllegalArgumentException(); return lhs < rhs; } }; @@ -91,13 +91,13 @@ namespace comphelper class StringPredicateLess : public IKeyPredicateLess { public: - virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const override + virtual bool isLess( css::uno::Any const & _lhs, css::uno::Any const & _rhs ) const override { OUString lhs, rhs; if ( !( _lhs >>= lhs ) || !( _rhs >>= rhs ) ) - throw ::com::sun::star::lang::IllegalArgumentException(); + throw css::lang::IllegalArgumentException(); return lhs < rhs; } }; @@ -108,23 +108,23 @@ namespace comphelper class StringCollationPredicateLess : public IKeyPredicateLess { public: - StringCollationPredicateLess( ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > const & i_collator ) + StringCollationPredicateLess( css::uno::Reference< css::i18n::XCollator > const & i_collator ) :m_collator( i_collator ) { } - virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const override + virtual bool isLess( css::uno::Any const & _lhs, css::uno::Any const & _rhs ) const override { OUString lhs, rhs; if ( !( _lhs >>= lhs ) || !( _rhs >>= rhs ) ) - throw ::com::sun::star::lang::IllegalArgumentException(); + throw css::lang::IllegalArgumentException(); return m_collator->compareString( lhs, rhs ) < 0; } private: - ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > const m_collator; + css::uno::Reference< css::i18n::XCollator > const m_collator; }; @@ -133,13 +133,13 @@ namespace comphelper class TypePredicateLess : public IKeyPredicateLess { public: - virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const override + virtual bool isLess( css::uno::Any const & _lhs, css::uno::Any const & _rhs ) const override { - ::com::sun::star::uno::Type lhs, rhs; + css::uno::Type lhs, rhs; if ( !( _lhs >>= lhs ) || !( _rhs >>= rhs ) ) - throw ::com::sun::star::lang::IllegalArgumentException(); + throw css::lang::IllegalArgumentException(); return lhs.getTypeName() < rhs.getTypeName(); } }; @@ -150,12 +150,12 @@ namespace comphelper class EnumPredicateLess : public IKeyPredicateLess { public: - EnumPredicateLess( ::com::sun::star::uno::Type const & _enumType ) + EnumPredicateLess( css::uno::Type const & _enumType ) :m_enumType( _enumType ) { } - virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const override + virtual bool isLess( css::uno::Any const & _lhs, css::uno::Any const & _rhs ) const override { sal_Int32 lhs(0), rhs(0); if ( !::cppu::enum2int( lhs, _lhs ) @@ -163,12 +163,12 @@ namespace comphelper || !_lhs.getValueType().equals( m_enumType ) || !_rhs.getValueType().equals( m_enumType ) ) - throw ::com::sun::star::lang::IllegalArgumentException(); + throw css::lang::IllegalArgumentException(); return lhs < rhs; } private: - ::com::sun::star::uno::Type const m_enumType; + css::uno::Type const m_enumType; }; @@ -177,15 +177,15 @@ namespace comphelper class InterfacePredicateLess : public IKeyPredicateLess { public: - virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const override + virtual bool isLess( css::uno::Any const & _lhs, css::uno::Any const & _rhs ) const override { - if ( ( _lhs.getValueTypeClass() != ::com::sun::star::uno::TypeClass_INTERFACE ) - || ( _rhs.getValueTypeClass() != ::com::sun::star::uno::TypeClass_INTERFACE ) + if ( ( _lhs.getValueTypeClass() != css::uno::TypeClass_INTERFACE ) + || ( _rhs.getValueTypeClass() != css::uno::TypeClass_INTERFACE ) ) - throw ::com::sun::star::lang::IllegalArgumentException(); + throw css::lang::IllegalArgumentException(); - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > lhs( _lhs, ::com::sun::star::uno::UNO_QUERY ); - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > rhs( _rhs, ::com::sun::star::uno::UNO_QUERY ); + css::uno::Reference< css::uno::XInterface > lhs( _lhs, css::uno::UNO_QUERY ); + css::uno::Reference< css::uno::XInterface > rhs( _rhs, css::uno::UNO_QUERY ); return lhs.get() < rhs.get(); } }; @@ -206,8 +206,8 @@ namespace comphelper */ ::std::unique_ptr< IKeyPredicateLess > COMPHELPER_DLLPUBLIC getStandardLessPredicate( - ::com::sun::star::uno::Type const & i_type, - ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > const & i_collator + css::uno::Type const & i_type, + css::uno::Reference< css::i18n::XCollator > const & i_collator ); |