diff options
author | Oliver Specht <os@openoffice.org> | 2000-12-05 12:00:20 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2000-12-05 12:00:20 +0000 |
commit | b8ee13e6dd715b5effe3bc17d9d6a9dbef9abc84 (patch) | |
tree | 8f7ccffd899a6b64424b6fefac4bd2eb09071e92 /unotools | |
parent | 608a254a56f4a271c16bf7c8b92b5156c77e99f5 (diff) |
#79489# EnableNotification: handle second call; take const parameters in SUPD > 615
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/inc/unotools/configitem.hxx | 8 | ||||
-rw-r--r-- | unotools/source/config/configitem.cxx | 17 |
2 files changed, 19 insertions, 6 deletions
diff --git a/unotools/inc/unotools/configitem.hxx b/unotools/inc/unotools/configitem.hxx index 23f44454c58e..8e57341fd192 100644 --- a/unotools/inc/unotools/configitem.hxx +++ b/unotools/inc/unotools/configitem.hxx @@ -2,9 +2,9 @@ * * $RCSfile: configitem.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: os $ $Date: 2000-12-04 10:33:21 $ + * last change: $Author: os $ $Date: 2000-12-05 12:59:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -132,7 +132,11 @@ namespace utl const com::sun::star::uno::Sequence< rtl::OUString >& rNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Any>& rValues); +#if SUPD>615 + sal_Bool EnableNotification(const com::sun::star::uno::Sequence< rtl::OUString >& rNames); +#else sal_Bool EnableNotification(com::sun::star::uno::Sequence< rtl::OUString >& rNames); +#endif //returns all members of a node com::sun::star::uno::Sequence< rtl::OUString > diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx index d4fb069f01f9..07cf7a334b7f 100644 --- a/unotools/source/config/configitem.cxx +++ b/unotools/source/config/configitem.cxx @@ -2,9 +2,9 @@ * * $RCSfile: configitem.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: os $ $Date: 2000-12-04 10:53:07 $ + * last change: $Author: os $ $Date: 2000-12-05 13:00:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -127,7 +127,7 @@ namespace utl{ ConfigItem* pParent; const Sequence< OUString > aPropertyNames; public: - ConfigChangeListener_Impl(ConfigItem& rItem, Sequence< OUString >& rNames); + ConfigChangeListener_Impl(ConfigItem& rItem, const Sequence< OUString >& rNames); ~ConfigChangeListener_Impl(); //XChangesListener @@ -186,7 +186,7 @@ ValueCounter_Impl::~ValueCounter_Impl() ---------------------------------------------------------------------------*/ ConfigChangeListener_Impl::ConfigChangeListener_Impl( - ConfigItem& rItem, Sequence< OUString >& rNames) : + ConfigItem& rItem, const Sequence< OUString >& rNames) : pParent(&rItem), aPropertyNames(rNames) { @@ -468,11 +468,20 @@ sal_Bool ConfigItem::PutProperties( const Sequence< OUString >& rNames, /* -----------------------------29.08.00 16:19-------------------------------- ---------------------------------------------------------------------------*/ +#if SUPD>615 +sal_Bool ConfigItem::EnableNotification(const Sequence< OUString >& rNames) +#else sal_Bool ConfigItem::EnableNotification(Sequence< OUString >& rNames) +#endif { Reference<XChangesNotifier> xChgNot(xHierarchyAccess, UNO_QUERY); if(!xChgNot.is()) return sal_False; + + OSL_ENSURE(!xChangeLstnr.is(), "EnableNotification already called"); + if(xChangeLstnr.is()) + xChgNot->removeChangesListener( xChangeLstnr ); + sal_Bool bRet = sal_True; try |