summaryrefslogtreecommitdiff
path: root/sw/source/ui/envelp/syncbtn.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-04-17 14:26:34 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-04-17 14:26:34 +0000
commitf043c8c4b2878355b79f994c304eb8b8d36d76ed (patch)
tree7e79ac609506b4d48632b4c387494035f48a089a /sw/source/ui/envelp/syncbtn.cxx
parenta1369c8a48636b6bafe7a5ef8c03e4b5dc4e0645 (diff)
INTEGRATION: CWS os8 (1.2.138); FILE MERGED
2003/04/10 10:14:34 os 1.2.138.2: #108729# check whether active writer view can be retrieved 2003/04/03 07:14:08 os 1.2.138.1: #108583# precompiled headers removed
Diffstat (limited to 'sw/source/ui/envelp/syncbtn.cxx')
-rw-r--r--sw/source/ui/envelp/syncbtn.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/sw/source/ui/envelp/syncbtn.cxx b/sw/source/ui/envelp/syncbtn.cxx
index 0c8b838627dc..fdebd6e1ae06 100644
--- a/sw/source/ui/envelp/syncbtn.cxx
+++ b/sw/source/ui/envelp/syncbtn.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: syncbtn.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: os $ $Date: 2002-12-05 12:40:34 $
+ * last change: $Author: vg $ $Date: 2003-04-17 15:26:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,9 +59,6 @@
*
************************************************************************/
-#ifdef PRECOMPILED
-#include "ui_pch.hxx"
-#endif
#pragma hdrstop
@@ -100,8 +97,14 @@ SwSyncChildWin::SwSyncChildWin( Window* pParent,
if (!pInfo->aSize.Width() || !pInfo->aSize.Height())
{
- const SwEditWin &rEditWin = ::GetActiveView()->GetEditWin();
- pWindow->SetPosPixel(rEditWin.OutputToScreenPixel(Point(0, 0)));
+ SwView* pActiveView = ::GetActiveView();
+ if(pActiveView)
+ {
+ const SwEditWin &rEditWin = pActiveView->GetEditWin();
+ pWindow->SetPosPixel(rEditWin.OutputToScreenPixel(Point(0, 0)));
+ }
+ else
+ pWindow->SetPosPixel(pParent->OutputToScreenPixel(Point(0, 0)));
pInfo->aPos = pWindow->GetPosPixel();
pInfo->aSize = pWindow->GetSizePixel();
}