/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef INCLUDED_TEST_INC_UNOAPIPROPERTYTESTERS_HXX #define INCLUDED_TEST_INC_UNOAPIPROPERTYTESTERS_HXX #include #include #include #include #include namespace apitest { /** @brief Tester for property type 'boolean' of a @see com::sun::star::beans::XPropertySet. * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. */ void OOO_DLLPUBLIC_TEST testBooleanProperty( css::uno::Reference const& xPropertySet, const OUString& name); /** @brief Tester for optional property type 'boolean' of a @see com::sun::star::beans::XPropertySet. * * Pass the test also if the property doesn't exists (throws a com::sun::star::beans::UnknownPropertyException) * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. */ void OOO_DLLPUBLIC_TEST testBooleanOptionalProperty( css::uno::Reference const& xPropertySet, const OUString& name); /** @brief Tester for read-only property type 'boolean' of a @see com::sun::star::beans::XPropertySet. * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. */ void OOO_DLLPUBLIC_TEST testBooleanReadonlyProperty( css::uno::Reference const& xPropertySet, const OUString& name); /** @brief Tester for property type 'double' of a @see com::sun::star::beans::XPropertySet. * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. * @param nValue Value to use when setting a new value. */ void OOO_DLLPUBLIC_TEST testDoubleProperty(css::uno::Reference const& xPropertySet, const OUString& name, const double& dValue = 42.0); /** @brief Tester for read-only property type 'double' of a @see com::sun::star::beans::XPropertySet. * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. * @param nValue Value to use when setting a new value. */ void OOO_DLLPUBLIC_TEST testDoubleReadonlyProperty(css::uno::Reference const& xPropertySet, const OUString& name, const double& dValue = 42.0); /** @brief Tester for property type 'long' of a @see com::sun::star::beans::XPropertySet. * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. * @param nValue Value to use when setting a new value. */ void OOO_DLLPUBLIC_TEST testLongProperty(css::uno::Reference const& xPropertySet, const OUString& name, const sal_Int32& nValue = 42); /** @brief Tester for optional property type 'long' of a @see com::sun::star::beans::XPropertySet. * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. * @param nValue Value to use when setting a new value. */ void OOO_DLLPUBLIC_TEST testLongOptionalProperty(css::uno::Reference const& xPropertySet, const OUString& name, const sal_Int32& nValue = 42); /** @brief Tester for read-only property type 'long' of a @see com::sun::star::beans::XPropertySet. * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. * @param nValue Value to use when setting a new value. */ void OOO_DLLPUBLIC_TEST testLongReadonlyProperty(css::uno::Reference const& xPropertySet, const OUString& name, const sal_Int32& nValue = 42); /** @brief Tester for property type 'short' of a @see com::sun::star::beans::XPropertySet. * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. * @param nValue Value to use when setting a new value. */ void OOO_DLLPUBLIC_TEST testShortProperty(css::uno::Reference const& xPropertySet, const OUString& name, const sal_Int16& nValue = 42); /** @brief Tester for optional property type 'short' of a @see com::sun::star::beans::XPropertySet. * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. * @param nValue Value to use when setting a new value. */ void OOO_DLLPUBLIC_TEST testShortOptionalProperty(css::uno::Reference const& xPropertySet, const OUString& name, const sal_Int16& nValue = 42); /** @brief Tester for read-only property type 'short' of a @see com::sun::star::beans::XPropertySet. * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. * @param nValue Value to use when setting a new value. */ void OOO_DLLPUBLIC_TEST testShortReadonlyProperty(css::uno::Reference const& xPropertySet, const OUString& name, const sal_Int16& nValue = 42); /** @brief Tester for property type 'string' of a @see com::sun::star::beans::XPropertySet. * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. * @param rValue Value to use when setting a new value. */ void OOO_DLLPUBLIC_TEST testStringProperty(css::uno::Reference const& xPropertySet, const OUString& name, const OUString& rValue); /** @brief Tester for optional property type 'string' of a @see com::sun::star::beans::XPropertySet. * * Pass the test also if the property doesn't exists (throws a com::sun::star::beans::UnknownPropertyException) * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. * @param rValue Value to use when setting a new value. */ void OOO_DLLPUBLIC_TEST testStringOptionalProperty(css::uno::Reference const& xPropertySet, const OUString& name, const OUString& rValue = OUString("StringValue")); /** @brief Tester for read-only property type 'string' of a @see com::sun::star::beans::XPropertySet. * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. * @param rValue Value to use when setting a new value. */ void OOO_DLLPUBLIC_TEST testStringReadonlyProperty(css::uno::Reference const& xPropertySet, const OUString& name, const OUString& rValue); /** @brief Tester for property type com::sun::star::util::Color of a @see com::sun::star::beans::XPropertySet. * * @param xPropertySet The property set, which contains the property to test against. * @param name Name of property to test. * @param rValue Value to use when setting a new value. */ void OOO_DLLPUBLIC_TEST testColorProperty( css::uno::Reference const& xPropertySet, const OUString& name, const css::util::Color& rValue = css::util::Color(0x12345678)); } // namespace apitest #endif // INCLUDED_TEST_INC_UNOAPIPROPERTYTESTERS_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ 6-appup LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2024-10-25tdf#143148 Use #pragma once instead of include guardsJaxkDev
2022-09-28sal_uLong->sal_uInt32 in CommandStructNoel Grandin
2022-05-03add o3tl::equalsAsciiNoel Grandin
2021-10-18sw: prefix members of MailDeliveryErrorNotifier, SwAddressIterator, ...Miklos Vajna
2020-03-13Revert "loplugin:constfields in sw"Noel Grandin
2019-12-12use covariant return type for SfxPoolItem::CloneCaolán McNamara
2019-11-04loplugin:finalclasses in sw/incNoel Grandin
2019-07-05tdf#42949 Fix IWYU warnings in sw/inc/*Gabor Kelemen
2018-10-03loplugin:constfields in swNoel Grandin
2018-10-02Silence new Clang trunk -Wdefaulted-function-deletedStephan Bergmann
2018-07-27sw: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann
2018-02-08Fix some IWYU warningsMiklos Vajna
2017-03-03Remove redundant 'inline' keywordStephan Bergmann
2017-02-13convert Master_CollConditions to scoped enumNoel Grandin
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
2016-09-08loplugin:constantparam in swNoel Grandin
2015-11-24loplugin:unusedfields in sw/Noel Grandin
2015-11-115th step to remove tools/rtti.hxxOliver Specht
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
2015-03-23loplugin:constantfunction: swNoel Grandin
2014-04-01Explicitly mark overriding destructors as "virtual"Stephan Bergmann
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann
2014-03-26Split TYPEINFO into plain and TYPEINFO_OVERRIDEStephan Bergmann
2014-02-27Remove visual noise from swAlexander Wilms
2014-01-10SfxPoolItem::operator ==, != should return boolStephan Bergmann
2013-11-05fixincludeguards.sh: swThomas Arnhold
2013-10-20drop unnecessary tools/string includesCaolán McNamara
2013-08-08sw: convert SwCondCollItem to OUStringMichael Stahl
2013-07-14Mark as constTakeshi Abe
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák
2012-06-21re-base on ALv2 code.Michael Meeks
2012-01-05Removed unnecessary tools includes.Marcel Metz
2011-03-14Merge commit 'ooo/DEV300_m101' into integration/dev300_m101Michael Meeks
2011-01-17removetooltypes01: #i112600# Remove tools types from swCarsten Driesner
2010-11-08Commented code fragments, meaningless and bogus comments removed.Robert Roth
2010-10-14Add vim/emacs modelines to all source filesSebastian Spaeth
2010-10-05more removed include guards using fixguard.pyPetr Mladek
2010-02-12changefileheader2: #i109125#: change source file copyright notice from Sun Mi...Jens-Heiner Rechtien
2009-10-16#i103496#: split svtools; improve ConfitItemsMathias Bauer
2008-04-10INTEGRATION: CWS changefileheader (1.3.738); FILE MERGEDRüdiger Timm