summaryrefslogtreecommitdiff
path: root/sd/source/ui/tools/IdleDetection.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2006-02-09 13:06:31 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2006-02-09 13:06:31 +0000
commitb89a83a169e4b361263f73ed4d613c776d2caeff (patch)
tree4a75fffee70c669eefe33df584a3f5af5f6ab2fb /sd/source/ui/tools/IdleDetection.cxx
parentf5125a2ac2056ed2f0fb2ee99c5e0b0aca7c2c37 (diff)
INTEGRATION: CWS impress84 (1.5.2); FILE MERGED
2006/01/26 15:56:22 af 1.5.2.1: #130645# Made calling XFrame::isActive() more robust.
Diffstat (limited to 'sd/source/ui/tools/IdleDetection.cxx')
-rw-r--r--sd/source/ui/tools/IdleDetection.cxx25
1 files changed, 18 insertions, 7 deletions
diff --git a/sd/source/ui/tools/IdleDetection.cxx b/sd/source/ui/tools/IdleDetection.cxx
index dea156b26..b92457030 100644
--- a/sd/source/ui/tools/IdleDetection.cxx
+++ b/sd/source/ui/tools/IdleDetection.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: IdleDetection.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: obo $ $Date: 2006-01-19 12:56:19 $
+ * last change: $Author: rt $ $Date: 2006-02-09 14:06:31 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -83,13 +83,24 @@ sal_Int32 IdleDetection::CheckSlideShowRunning (void)
pViewFrame!=NULL && !bIsSlideShowShowing;
pViewFrame = SfxViewFrame::GetNext(*pViewFrame))
{
- // Check whether the frame is the active one.
- uno::Reference<frame::XFrame> xFrame (pViewFrame->GetFrame()->GetFrameInterface());
- if (xFrame.is() && ! xFrame->isActive())
+ // Ignore the current frame when it does not exist, is not valid, or
+ // is not active.
+ bool bIgnoreFrame (true);
+ if (pViewFrame->GetFrame() != NULL)
{
- // Frames that are not active are ignored.
- continue;
+ uno::Reference<frame::XFrame> xFrame (pViewFrame->GetFrame()->GetFrameInterface());
+ try
+ {
+ if (xFrame.is() && xFrame->isActive())
+ bIgnoreFrame = false;
+ }
+ catch (uno::RuntimeException e)
+ {
+ (void) e;
+ }
}
+ if (bIgnoreFrame)
+ continue;
// Get sd::ViewShell from active frame.
ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pViewFrame);