summaryrefslogtreecommitdiff
path: root/sd/source/ui/slidesorter/view
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-21 15:43:09 +0200
committerobo <obo@openoffice.org>2010-06-21 15:43:09 +0200
commit2fdd360a3255609ed2c445019cdc7866d8ed3010 (patch)
tree30f76642e3c1a88e3e19b00e0a1adb8a21acf1a1 /sd/source/ui/slidesorter/view
parentdb68edb033a9f8e5e40065e258992d1086c1d873 (diff)
parent510d424f855b70320b27f074fa0bf4fc8cd9b164 (diff)
CWS-TOOLING: integrate CWS impressaccessibility7
Diffstat (limited to 'sd/source/ui/slidesorter/view')
-rwxr-xr-xsd/source/ui/slidesorter/view/SlideSorterView.cxx52
1 files changed, 46 insertions, 6 deletions
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 47ce907be637..6ff6a1bf3109 100755
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -70,10 +70,9 @@
#include <svx/sdr/contact/objectcontact.hxx>
#include <svx/sdrpagewindow.hxx>
#include <svl/itempool.hxx>
-
-#ifndef _SFXITEMPOOL_HXX
#include <svl/itempool.hxx>
-#endif
+
+#include <boost/foreach.hpp>
using namespace std;
using namespace ::sd::slidesorter::model;
@@ -420,12 +419,23 @@ void SlideSorterView::DeterminePageObjectVisibilities (void)
pContact = pDescriptor->GetViewObjectContact();
if (pDescriptor.get() != NULL)
- pDescriptor->SetVisible (bIsVisible);
+ pDescriptor->SetVisible(bIsVisible);
}
}
- mnFirstVisiblePageIndex = nFirstIndex;
- mnLastVisiblePageIndex = nLastIndex;
+
+ if (mnFirstVisiblePageIndex != nFirstIndex
+ || mnLastVisiblePageIndex != nLastIndex)
+ {
+ mnFirstVisiblePageIndex = nFirstIndex;
+ mnLastVisiblePageIndex = nLastIndex;
+
+ // Tell the listeners that the visibility of some objects has changed.
+ ::std::vector<Link> aChangeListeners (maVisibilityChangeListeners);
+ BOOST_FOREACH(Link& rLink, aChangeListeners)
+ rLink.Call(NULL);
+ }
+
}
}
@@ -773,4 +783,34 @@ void SlideSorterView::AddSdrObject (SdrObject& rObject)
rObject.SetModel(&maPageModel);
}
+
+
+
+void SlideSorterView::AddVisibilityChangeListener (const Link& rListener)
+{
+ if (::std::find (
+ maVisibilityChangeListeners.begin(),
+ maVisibilityChangeListeners.end(),
+ rListener) == maVisibilityChangeListeners.end())
+ {
+ maVisibilityChangeListeners.push_back(rListener);
+ }
+}
+
+
+
+
+void SlideSorterView::RemoveVisibilityChangeListener(const Link&rListener)
+{
+ maVisibilityChangeListeners.erase (
+ ::std::find (
+ maVisibilityChangeListeners.begin(),
+ maVisibilityChangeListeners.end(),
+ rListener));
+}
+
+
+
+
+
} } } // end of namespace ::sd::slidesorter::view