summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-04-19 13:17:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-19 19:18:51 +0200
commite2c7a6bd572644b928704f6cb3696b568ac0aba1 (patch)
treeb9f64cf65d77edf2798b03de60d47602ebe95b15 /sd
parentfcf776a09a2c5cd692480c8ec4a678e3d04739c9 (diff)
loplugin::unusedmethods
Change-Id: I6a07860edb13588b83345babeb53675aedc43f7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/Library_sd.mk1
-rw-r--r--sd/source/filter/eppt/pptx-animations-nodectx.hxx1
-rw-r--r--sd/source/ui/app/sdxfer.cxx6
-rw-r--r--sd/source/ui/inc/SlideSorter.hxx22
-rw-r--r--sd/source/ui/inc/sdxfer.hxx1
-rw-r--r--sd/source/ui/inc/tools/ConfigurationAccess.hxx38
-rw-r--r--sd/source/ui/inc/tools/PropertySet.hxx109
-rw-r--r--sd/source/ui/slidesorter/controller/SlsProperties.cxx43
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx54
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorter.cxx13
-rw-r--r--sd/source/ui/tools/ConfigurationAccess.cxx60
-rw-r--r--sd/source/ui/tools/PropertySet.cxx153
12 files changed, 1 insertions, 500 deletions
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index 4ffb86b7d461..aeebc8b53b39 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -429,7 +429,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/tools/IconCache \
sd/source/ui/tools/IdleDetection \
sd/source/ui/tools/PreviewRenderer \
- sd/source/ui/tools/PropertySet \
sd/source/ui/tools/SdGlobalResourceContainer \
sd/source/ui/tools/SlotStateListener \
sd/source/ui/tools/TimerBasedTaskExecution \
diff --git a/sd/source/filter/eppt/pptx-animations-nodectx.hxx b/sd/source/filter/eppt/pptx-animations-nodectx.hxx
index 5e3ac0010602..14aeacd45c99 100644
--- a/sd/source/filter/eppt/pptx-animations-nodectx.hxx
+++ b/sd/source/filter/eppt/pptx-animations-nodectx.hxx
@@ -53,7 +53,6 @@ public:
NodeContext(const css::uno::Reference<css::animations::XAnimationNode>& xNode,
bool bMainSeqChild, bool bIsIterateChild);
const css::uno::Reference<css::animations::XAnimationNode>& getNode() const { return mxNode; }
- bool isMainSeqChild() const { return mbMainSeqChild; }
sal_Int16 getEffectNodeType() const { return mnEffectNodeType; }
sal_Int16 getEffectPresetClass() const { return mnEffectPresetClass; }
const OUString& getEffectPresetId() const { return msEffectPresetId; }
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index a6cf586eef65..693dd399c321 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -721,12 +721,6 @@ std::shared_ptr<SdTransferable::UserData> SdTransferable::GetUserData (const sal
return std::shared_ptr<UserData>();
}
-const css::uno::Sequence< sal_Int8 >& SdTransferable::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit theSdTransferableUnoTunnelId;
- return theSdTransferableUnoTunnelId.getSeq();
-}
-
SdTransferable* SdTransferable::getImplementation( const Reference< XInterface >& rxData ) noexcept
{
return dynamic_cast<SdTransferable*>(rxData.get());
diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx
index ae51bd518c09..67e376576081 100644
--- a/sd/source/ui/inc/SlideSorter.hxx
+++ b/sd/source/ui/inc/SlideSorter.hxx
@@ -68,14 +68,6 @@ public:
SlideSorter(const SlideSorter&) = delete;
SlideSorter& operator=(const SlideSorter&) = delete;
- /** Return whether the called SlideSorter object is valid and calling
- its Get(Model,View,Controller) methods is safe. When <FALSE/> is
- called then no other methods should be called.
- Calling this method should be necessary only during startup and
- shutdown (when that can be detected).
- */
- bool IsValid() const { return mbIsValid;}
-
/** Create a new slide sorter that is strongly coupled to the given view
shell. Use this function for a slide sorter in the left pane.
@param rViewShell
@@ -93,20 +85,6 @@ public:
ScrollAdaptor* pHorizontalScrollBar,
ScrollAdaptor* pVerticalScrollBar);
- /** Create a new slide sorter that is loosely coupled to the given view
- shell. The view shell may even be missing.
- @param rBase
- ViewShellBase object of the enclosing application.
- @param pViewShell
- Supply when at hand.
- @param rParentWindow
- The parent window of the internally created content window and
- scroll bars.
- */
- static std::shared_ptr<SlideSorter> CreateSlideSorter (
- ViewShellBase& rBase,
- vcl::Window& rParentWindow);
-
/** Return the control of the vertical scroll bar.
*/
const VclPtr<ScrollAdaptor>& GetVerticalScrollBar() const { return mpVerticalScrollBar;}
diff --git a/sd/source/ui/inc/sdxfer.hxx b/sd/source/ui/inc/sdxfer.hxx
index 46418992ba1d..d6d382870dbb 100644
--- a/sd/source/ui/inc/sdxfer.hxx
+++ b/sd/source/ui/inc/sdxfer.hxx
@@ -71,7 +71,6 @@ public:
bool SetTableRTF( SdDrawDocument* );
- static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
static SdTransferable* getImplementation( const css::uno::Reference< css::uno::XInterface >& rxData ) noexcept;
// SfxListener
diff --git a/sd/source/ui/inc/tools/ConfigurationAccess.hxx b/sd/source/ui/inc/tools/ConfigurationAccess.hxx
index b86a30fffdab..97b5e92dc041 100644
--- a/sd/source/ui/inc/tools/ConfigurationAccess.hxx
+++ b/sd/source/ui/inc/tools/ConfigurationAccess.hxx
@@ -54,11 +54,6 @@ public:
const OUString& rsRootName,
const WriteMode eMode);
- ConfigurationAccess(
- const css::uno::Reference<css::uno::XComponentContext>& rxContext,
- const OUString& rsRootName,
- const WriteMode eMode);
-
/** Return a configuration node below the root of the called object.
@param rsPathToNode
The relative path from the root (as given the constructor) to
@@ -97,39 +92,6 @@ public:
const OUString&,
const std::vector<css::uno::Any>&) > Functor;
- /** Execute a functor for all elements of the given container.
- @param rxContainer
- The container is a XNameAccess to a list of the configuration.
- This can be a node returned by GetConfigurationNode().
- @param rArguments
- The functor is called with arguments that are children of each
- element of the container. The set of children is specified in this
- list.
- @param rFunctor
- The functor to be executed for some or all of the elements in
- the given container.
- */
- static void ForAll (
- const css::uno::Reference<css::container::XNameAccess>& rxContainer,
- const ::std::vector<OUString>& rArguments,
- const Functor& rFunctor);
-
- /** Fill a list with the string contents of all sub-elements in the given container.
- @param rxContainer
- The container is a XNameAccess to a list of the configuration.
- This can be a node returned by GetConfigurationNode().
- @param rsArgument
- This specifies which string children of the elements in the
- container are to be inserted into the list. The specified child
- has to be of type string.
- @param rList
- The list to be filled.
- */
- static void FillList(
- const css::uno::Reference<css::container::XNameAccess>& rxContainer,
- const OUString& rsArgument,
- ::std::vector<OUString>& rList);
-
private:
css::uno::Reference<css::uno::XInterface> mxRoot;
diff --git a/sd/source/ui/inc/tools/PropertySet.hxx b/sd/source/ui/inc/tools/PropertySet.hxx
deleted file mode 100644
index 04727be0dbe4..000000000000
--- a/sd/source/ui/inc/tools/PropertySet.hxx
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#pragma once
-
-#include <comphelper/compbase.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <map>
-#include <memory>
-
-namespace sd::tools {
-
-typedef ::comphelper::WeakComponentImplHelper <
- css::beans::XPropertySet
-> PropertySetInterfaceBase;
-
-/** A very simple implementation of the XPropertySet interface. It does not
- support constrained properties and thus does not support vetoable
- listeners. It does not support the optional property set info.
-
- In order to use it you have to derive from this class and implement the
- GetPropertyValue() and SetPropertyValue() methods.
-*/
-class PropertySet : public PropertySetInterfaceBase
-{
-public:
- explicit PropertySet();
- virtual ~PropertySet() override;
-
- // XPropertySet
-
- virtual css::uno::Reference<css::beans::XPropertySetInfo>
- SAL_CALL getPropertySetInfo() override;
-
- virtual void SAL_CALL setPropertyValue (
- const OUString& rsPropertyName,
- const css::uno::Any& rsPropertyValue) override;
-
- virtual css::uno::Any SAL_CALL getPropertyValue (const OUString& rsPropertyName) override;
-
- virtual void SAL_CALL addPropertyChangeListener (
- const OUString& rsPropertyName,
- const css::uno::Reference<css::beans::XPropertyChangeListener>& rxListener) override;
-
- virtual void SAL_CALL removePropertyChangeListener (
- const OUString& rsPropertyName,
- const css::uno::Reference<css::beans::XPropertyChangeListener>& rxListener) override;
-
- virtual void SAL_CALL addVetoableChangeListener (
- const OUString& rsPropertyName,
- const css::uno::Reference<css::beans::XVetoableChangeListener>& rxListener) override;
-
- virtual void SAL_CALL removeVetoableChangeListener (
- const OUString& rsPropertyName,
- const css::uno::Reference<css::beans::XVetoableChangeListener>& rxListener) override;
-
-protected:
- /** Return the requested property value.
- @throw css::beans::UnknownPropertyException when the
- property is not supported.
- */
- virtual css::uno::Any GetPropertyValue (const OUString& rsPropertyName) = 0;
- /** Set the given property value.
- @return the old value.
- @throw css::beans::UnknownPropertyException when the
- property is not supported.
- */
- virtual css::uno::Any SetPropertyValue (
- const OUString& rsPropertyName,
- const css::uno::Any& rValue) = 0;
-
-private:
- typedef ::std::multimap<OUString,
- css::uno::Reference<css::beans::XPropertyChangeListener> > ChangeListenerContainer;
- std::unique_ptr<ChangeListenerContainer> mpChangeListeners;
-
- /** Call all listeners that are registered for the given property name.
- Call this method with an empty property name to call listeners that
- are registered for all properties.
- */
- void CallListeners (
- const OUString& rsPropertyName,
- const css::beans::PropertyChangeEvent& rEvent);
-
- /** @throws css::lang::DisposedException when the object has already been
- disposed.
- */
- void ThrowIfDisposed();
-};
-
-} // end of namespace ::sd::tools
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/controller/SlsProperties.cxx b/sd/source/ui/slidesorter/controller/SlsProperties.cxx
index f1152a3735e6..e0092816a327 100644
--- a/sd/source/ui/slidesorter/controller/SlsProperties.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsProperties.cxx
@@ -24,13 +24,7 @@
namespace sd::slidesorter::controller {
Properties::Properties()
- : mbIsHighlightCurrentSlide(false),
- mbIsShowSelection(true),
- mbIsShowFocus(true),
- mbIsCenterSelection(false),
- mbIsSmoothSelectionScrolling(true),
- mbIsSuspendPreviewUpdatesDuringFullScreenPresentation(true),
- maBackgroundColor(Application::GetSettings().GetStyleSettings().GetWindowColor()),
+ : maBackgroundColor(Application::GetSettings().GetStyleSettings().GetWindowColor()),
maTextColor(Application::GetSettings().GetStyleSettings().GetActiveTextColor()),
maSelectionColor(Application::GetSettings().GetStyleSettings().GetHighlightColor()),
maHighlightColor(Application::GetSettings().GetStyleSettings().GetMenuHighlightColor()),
@@ -46,36 +40,6 @@ void Properties::HandleDataChangeEvent()
maHighlightColor = Application::GetSettings().GetStyleSettings().GetMenuHighlightColor();
}
-void Properties::SetHighlightCurrentSlide (const bool bIsHighlightCurrentSlide)
-{
- mbIsHighlightCurrentSlide = bIsHighlightCurrentSlide;
-}
-
-void Properties::SetShowSelection (const bool bIsShowSelection)
-{
- mbIsShowSelection = bIsShowSelection;
-}
-
-void Properties::SetShowFocus (const bool bIsShowFocus)
-{
- mbIsShowFocus = bIsShowFocus;
-}
-
-void Properties::SetCenterSelection (const bool bIsCenterSelection)
-{
- mbIsCenterSelection = bIsCenterSelection;
-}
-
-void Properties::SetSmoothSelectionScrolling (const bool bIsSmoothSelectionScrolling)
-{
- mbIsSmoothSelectionScrolling = bIsSmoothSelectionScrolling;
-}
-
-void Properties::SetSuspendPreviewUpdatesDuringFullScreenPresentation (const bool bFlag)
-{
- mbIsSuspendPreviewUpdatesDuringFullScreenPresentation = bFlag;
-}
-
void Properties::SetBackgroundColor (const Color& rColor)
{
maBackgroundColor = rColor;
@@ -96,11 +60,6 @@ void Properties::SetHighlightColor (const Color& rColor)
maHighlightColor = rColor;
}
-void Properties::SetUIReadOnly (const bool bIsUIReadOnly)
-{
- mbIsUIReadOnly = bIsUIReadOnly;
-}
-
} // end of namespace ::sd::slidesorter::controller
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
index 344ac67f38bd..1a57670d62f7 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
@@ -35,51 +35,6 @@ public:
*/
void HandleDataChangeEvent();
- /** When this method returns <TRUE/> then the current slide is
- highlighted in the view. The default value is <FALSE/>.
- */
- bool IsHighlightCurrentSlide() const { return mbIsHighlightCurrentSlide; }
- void SetHighlightCurrentSlide(const bool bIsHighlightCurrentSlide);
-
- /** When this method returns <TRUE/> then the selection is indicated in
- the view (typically by drawing rectangles around the selected
- slides.) The default value is <TRUE/>.
- */
- bool IsShowSelection() const { return mbIsShowSelection; }
- void SetShowSelection(const bool bIsShowSelection);
-
- /** When this method returns <TRUE/> then the focusdselection is indicated in
- the view (typically by drawing dotted rectangles around the selected
- slides.) The default value is <TRUE/>.
- */
- bool IsShowFocus() const { return mbIsShowFocus; }
- void SetShowFocus(const bool bIsShowFocus);
-
- /** When this method returns <TRUE/> then on a selection change the
- visible area is adapted so that the selected slides are shown
- centered in the view. This can be used to center the current slide
- by selecting only the current slide. The default value is <FALSE/>.
- */
- bool IsCenterSelection() const { return mbIsCenterSelection; }
- void SetCenterSelection(const bool bIsCenterSelection);
-
- /** When this method returns <TRUE/> then the view may try to change the
- visible area by scrolling it smoothly on the screen. Experimental.
- Default value is <FALSE/>.
- */
- bool IsSmoothSelectionScrolling() const { return mbIsSmoothSelectionScrolling; }
- void SetSmoothSelectionScrolling(const bool bIsSmoothSelectionScrolling);
-
- /** When this method returns <TRUE/> then during a full screen
- presentation the previews in a slide sorter are not updated.
- Default value is <TRUE/>.
- */
- bool IsSuspendPreviewUpdatesDuringFullScreenPresentation() const
- {
- return mbIsSuspendPreviewUpdatesDuringFullScreenPresentation;
- }
- void SetSuspendPreviewUpdatesDuringFullScreenPresentation(const bool bFlag);
-
/** Return the background color.
*/
const Color& GetBackgroundColor() const { return maBackgroundColor; }
@@ -87,7 +42,6 @@ public:
/** Return the text color.
*/
- const Color& GetTextColor() const { return maTextColor; }
void SetTextColor(const Color& rColor);
/** Return the color in which selections are to be painted.
@@ -97,22 +51,14 @@ public:
/** Return the color used for highlighting e.g. the current slide.
*/
- const Color& GetHighlightColor() const { return maHighlightColor; }
void SetHighlightColor(const Color& rColor);
/** The UI can be set to be read only independently from the model status.
Used for instance in the presenter view.
*/
bool IsUIReadOnly() const { return mbIsUIReadOnly; }
- void SetUIReadOnly(const bool bIsUIReadOnly);
private:
- bool mbIsHighlightCurrentSlide;
- bool mbIsShowSelection;
- bool mbIsShowFocus;
- bool mbIsCenterSelection;
- bool mbIsSmoothSelectionScrolling;
- bool mbIsSuspendPreviewUpdatesDuringFullScreenPresentation;
Color maBackgroundColor;
Color maTextColor;
Color maSelectionColor;
diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
index 6fc906ded600..b29f5e054432 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
@@ -83,19 +83,6 @@ std::shared_ptr<SlideSorter> SlideSorter::CreateSlideSorter(
return pSlideSorter;
}
-std::shared_ptr<SlideSorter> SlideSorter::CreateSlideSorter (
- ViewShellBase& rBase,
- vcl::Window& rParentWindow)
-{
- std::shared_ptr<SlideSorter> pSlideSorter(
- new SlideSorter(
- rBase,
- rParentWindow),
- o3tl::default_delete<SlideSorter>());
- pSlideSorter->Init();
- return pSlideSorter;
-}
-
SlideSorter::SlideSorter (
ViewShell& rViewShell,
sd::Window* pContentWindow,
diff --git a/sd/source/ui/tools/ConfigurationAccess.cxx b/sd/source/ui/tools/ConfigurationAccess.cxx
index d3fd2fa5a096..35ccadba3783 100644
--- a/sd/source/ui/tools/ConfigurationAccess.cxx
+++ b/sd/source/ui/tools/ConfigurationAccess.cxx
@@ -34,16 +34,6 @@ using namespace ::com::sun::star::uno;
namespace sd::tools {
ConfigurationAccess::ConfigurationAccess (
- const Reference<XComponentContext>& rxContext,
- const OUString& rsRootName,
- const WriteMode eMode)
-{
- Reference<lang::XMultiServiceFactory> xProvider =
- configuration::theDefaultProvider::get( rxContext );
- Initialize(xProvider, rsRootName, eMode);
-}
-
-ConfigurationAccess::ConfigurationAccess (
const OUString& rsRootName,
const WriteMode eMode)
{
@@ -118,56 +108,6 @@ void ConfigurationAccess::CommitChanges()
xConfiguration->commitChanges();
}
-void ConfigurationAccess::ForAll (
- const Reference<container::XNameAccess>& rxContainer,
- const ::std::vector<OUString>& rArguments,
- const Functor& rFunctor)
-{
- if (!rxContainer.is())
- return;
-
- ::std::vector<Any> aValues(rArguments.size());
- const Sequence<OUString> aKeys (rxContainer->getElementNames());
- for (const OUString& rsKey : aKeys)
- {
- Reference<container::XNameAccess> xSetItem (rxContainer->getByName(rsKey), UNO_QUERY);
- if (xSetItem.is())
- {
- // Get from the current item of the container the children
- // that match the names in the rArguments list.
- for (size_t nValueIndex=0; nValueIndex<aValues.size(); ++nValueIndex)
- aValues[nValueIndex] = xSetItem->getByName(rArguments[nValueIndex]);
- }
- rFunctor(rsKey, aValues);
- }
-}
-
-void ConfigurationAccess::FillList(
- const Reference<container::XNameAccess>& rxContainer,
- const OUString& rsArgument,
- ::std::vector<OUString>& rList)
-{
- try
- {
- if (rxContainer.is())
- {
- Sequence<OUString> aKeys (rxContainer->getElementNames());
- rList.resize(aKeys.getLength());
- for (sal_Int32 nItemIndex=0; nItemIndex<aKeys.getLength(); ++nItemIndex)
- {
- Reference<container::XNameAccess> xSetItem (
- rxContainer->getByName(aKeys[nItemIndex]), UNO_QUERY);
- if (xSetItem.is())
- {
- xSetItem->getByName(rsArgument) >>= rList[nItemIndex];
- }
- }
- }
- }
- catch (RuntimeException&)
- {}
-}
-
} // end of namespace sd::tools
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/tools/PropertySet.cxx b/sd/source/ui/tools/PropertySet.cxx
deleted file mode 100644
index c50a617de1b0..000000000000
--- a/sd/source/ui/tools/PropertySet.cxx
+++ /dev/null
@@ -1,153 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <tools/PropertySet.hxx>
-#include <algorithm>
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-
-namespace sd::tools {
-
-PropertySet::PropertySet()
- : mpChangeListeners(new ChangeListenerContainer)
-{
-}
-
-PropertySet::~PropertySet()
-{
-}
-
-//----- XPropertySet ----------------------------------------------------------
-
-Reference<beans::XPropertySetInfo> SAL_CALL PropertySet::getPropertySetInfo()
-{
- return nullptr;
-}
-
-void SAL_CALL PropertySet::setPropertyValue (
- const OUString& rsPropertyName,
- const css::uno::Any& rsPropertyValue)
-{
- ThrowIfDisposed();
-
- Any aOldValue (SetPropertyValue(rsPropertyName,rsPropertyValue));
- if (aOldValue == rsPropertyValue)
- return;
-
- // Inform listeners that are registered specifically for the
- // property and those registered for any property.
- beans::PropertyChangeEvent aEvent(
- static_cast<XWeak*>(this),
- rsPropertyName,
- false,
- -1,
- aOldValue,
- rsPropertyValue);
- CallListeners(rsPropertyName, aEvent);
- CallListeners(OUString(), aEvent);
-}
-
-Any SAL_CALL PropertySet::getPropertyValue (const OUString& rsPropertyName)
-{
- ThrowIfDisposed();
-
- return GetPropertyValue(rsPropertyName);
-}
-
-void SAL_CALL PropertySet::addPropertyChangeListener (
- const OUString& rsPropertyName,
- const css::uno::Reference<css::beans::XPropertyChangeListener>& rxListener)
-{
- if ( ! rxListener.is())
- throw lang::IllegalArgumentException();
-
- if (m_bDisposed)
- return;
-
- mpChangeListeners->emplace(rsPropertyName, rxListener);
-}
-
-void SAL_CALL PropertySet::removePropertyChangeListener (
- const OUString& rsPropertyName,
- const css::uno::Reference<css::beans::XPropertyChangeListener>& rxListener)
-{
- ::std::pair<ChangeListenerContainer::iterator,ChangeListenerContainer::iterator>
- aRange (mpChangeListeners->equal_range(rsPropertyName));
-
- ChangeListenerContainer::iterator iListener (
- ::std::find_if(
- aRange.first,
- aRange.second,
- [&rxListener] (const ChangeListenerContainer::value_type& listener) {
- return listener.second == rxListener;
- }));
-
- if (iListener == mpChangeListeners->end())
- {
- throw lang::IllegalArgumentException();
- }
-
- mpChangeListeners->erase(iListener);
-
-}
-
-void SAL_CALL PropertySet::addVetoableChangeListener (
- const OUString&,
- const css::uno::Reference<css::beans::XVetoableChangeListener>&)
-{
- // Constraint properties are not supported and thus no vetoable
- // listeners.
-}
-
-void SAL_CALL PropertySet::removeVetoableChangeListener (
- const OUString&,
- const css::uno::Reference<css::beans::XVetoableChangeListener>&)
-{
- // Constraint properties are not supported and thus no vetoable
- // listeners.
-}
-
-void PropertySet::CallListeners (
- const OUString& rsPropertyName,
- const beans::PropertyChangeEvent& rEvent)
-{
- ::std::pair<ChangeListenerContainer::iterator,ChangeListenerContainer::iterator>
- aRange (mpChangeListeners->equal_range(rsPropertyName));
- ChangeListenerContainer::const_iterator iListener;
- for (iListener=aRange.first; iListener!=aRange.second; ++iListener)
- {
- if (iListener->second.is())
- iListener->second->propertyChange(rEvent);
- }
-}
-
-void PropertySet::ThrowIfDisposed()
-{
- if (m_bDisposed)
- {
- throw lang::DisposedException (
- "PropertySet object has already been disposed",
- static_cast<uno::XWeak*>(this));
- }
-}
-
-} // end of namespace ::sd::tools
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */