summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-04-26 19:45:47 +0000
committerKurt Zenker <kz@openoffice.org>2006-04-26 19:45:47 +0000
commitcd90347d341538f55ad3b15b113a5c59efc98065 (patch)
tree6d9d7848db5f0121557d5be3803d5ebfee795bba
parentc4be88a3267973d9b2602cfe6b8db197cb6a9025 (diff)
INTEGRATION: CWS impress91 (1.20.12); FILE MERGED
2006/04/04 11:43:12 cl 1.20.12.1: #i61368# optimize ::onChangePage() to check if page is already visible
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx21
1 files changed, 13 insertions, 8 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 8ef3021e8adf..afa4a4c90f5a 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: CustomAnimationPane.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: kz $ $Date: 2006-04-26 20:44:27 $
+ * last change: $Author: kz $ $Date: 2006-04-26 20:45:47 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -202,6 +202,7 @@ using ::com::sun::star::beans::XPropertyChangeListener;
using ::com::sun::star::drawing::XDrawView;
using ::com::sun::star::drawing::XShape;
using ::com::sun::star::drawing::XShapes;
+using ::com::sun::star::drawing::XDrawPage;
using ::com::sun::star::container::XIndexAccess;
using ::com::sun::star::container::XEnumerationAccess;
using ::com::sun::star::container::XEnumeration;
@@ -1689,14 +1690,18 @@ void CustomAnimationPane::onChangeCurrentPage()
{
if( mxView.is() ) try
{
- mxCurrentPage = mxView->getCurrentPage();
- SdPage* pPage = SdPage::getImplementation( mxCurrentPage );
- if( pPage )
+ Reference< XDrawPage > xNewPage( mxView->getCurrentPage() );
+ if( xNewPage != mxCurrentPage )
{
- mpMainSequence = pPage->getMainSequence();
- mpCustomAnimationList->update( mpMainSequence );
+ mxCurrentPage = xNewPage;
+ SdPage* pPage = SdPage::getImplementation( mxCurrentPage );
+ if( pPage )
+ {
+ mpMainSequence = pPage->getMainSequence();
+ mpCustomAnimationList->update( mpMainSequence );
+ }
+ updateControls();
}
- updateControls();
}
catch( Exception& )
{