summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-11-01 13:17:04 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-11-01 13:17:04 +0000
commitf9db522716b54296fb88895df8d548fed1ada679 (patch)
tree5df52f8714bab19a6ccceb48708d6858bf07ce8a /sd
parenteecb67b873276b3de29e6520e053f1b8ef608d44 (diff)
INTEGRATION: CWS impress109 (1.18.20); FILE MERGED
2006/10/23 15:03:21 af 1.18.20.1: #i68507# Made mpCurrentPage a WeakReference.
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx20
1 files changed, 12 insertions, 8 deletions
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 963130b55075..f4653361312e 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: DrawController.cxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: obo $ $Date: 2006-09-16 19:23:03 $
+ * last change: $Author: vg $ $Date: 2006-11-01 14:17:04 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -305,6 +305,7 @@ void SAL_CALL
DrawController::disposing (const lang::EventObject& rEventObject)
throw (uno::RuntimeException)
{
+ (void)rEventObject;
}
@@ -476,24 +477,26 @@ void DrawController::FireChangeLayerMode (bool bLayerMode) throw()
-void DrawController::FireSwitchCurrentPage (SdPage* pCurrentPage) throw()
+void DrawController::FireSwitchCurrentPage (SdPage* pNewCurrentPage) throw()
{
- if (pCurrentPage != mpCurrentPage)
+ SdrPage* pCurrentPage = mpCurrentPage.get();
+ if (pNewCurrentPage != pCurrentPage)
+ {
try
{
Any aNewValue (
- makeAny(Reference<drawing::XDrawPage>(pCurrentPage->getUnoPage(), UNO_QUERY)));
+ makeAny(Reference<drawing::XDrawPage>(pNewCurrentPage->getUnoPage(), UNO_QUERY)));
Any aOldValue;
- if (mpCurrentPage != NULL)
+ if (pCurrentPage != NULL)
{
- Reference<drawing::XDrawPage> xOldPage (mpCurrentPage->getUnoPage(), UNO_QUERY);
+ Reference<drawing::XDrawPage> xOldPage (pCurrentPage->getUnoPage(), UNO_QUERY);
aOldValue <<= xOldPage;
}
FirePropertyChange(PROPERTY_CURRENTPAGE, aNewValue, aOldValue);
- mpCurrentPage = pCurrentPage;
+ mpCurrentPage.reset(pNewCurrentPage);
}
catch( uno::Exception& e )
{
@@ -505,6 +508,7 @@ void DrawController::FireSwitchCurrentPage (SdPage* pCurrentPage) throw()
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 )).getStr() );
}
+ }
}