diff options
author | Rüdiger Timm <rt@openoffice.org> | 2006-05-05 07:03:21 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2006-05-05 07:03:21 +0000 |
commit | 63f1f72201d47a8258895b25156d6ac6ef8e5104 (patch) | |
tree | 79dd82b1dd12a07395b80877b37d4268832a0c78 /starmath/source/unomodel.cxx | |
parent | 1706d985f2ebf2f04bc1ac8d74cfa13ef0aa719f (diff) |
INTEGRATION: CWS tl18 (1.34.38); FILE MERGED
2006/03/08 11:09:35 tl 1.34.38.3: #i59205# lock-/unlockControllers not needed to solve the problem
2006/03/06 13:38:49 tl 1.34.38.2: #i59205# allow for formulas to be resized correctly when programmatically changed
2006/01/24 13:00:19 tl 1.34.38.1: #i60111# avoid use of SmGetActiveView(SfxViewShell::Current) as much as possible
Diffstat (limited to 'starmath/source/unomodel.cxx')
-rw-r--r-- | starmath/source/unomodel.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 139d193639e1..8e25262ec637 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -4,9 +4,9 @@ * * $RCSfile: unomodel.cxx,v $ * - * $Revision: 1.36 $ + * $Revision: 1.37 $ * - * last change: $Author: vg $ $Date: 2006-04-07 14:20:01 $ + * last change: $Author: rt $ $Date: 2006-05-05 08:03:21 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1001,7 +1001,15 @@ void SAL_CALL SmModel::render( rSelection >>= xModel; if (xModel == pDocSh->GetModel()) { - SmViewShell *pView = SmGetActiveView(); + //!! when called via API we may not have an active view + //!! thus we go and look for a view that can be used. + const TypeId aTypeId = TYPE( SmViewShell ); + SfxViewShell* pViewSh = SfxViewShell::GetFirst( &aTypeId ); + while (pViewSh && pViewSh->GetObjectShell() != pDocSh) + pViewSh = SfxViewShell::GetNext( *pViewSh, &aTypeId ); + SmViewShell *pView = PTR_CAST( SmViewShell, pViewSh ); + DBG_ASSERT( pView, "SmModel::render : no SmViewShell found" ); + if (pView) { SmPrinterAccess aPrinterAccess( *pDocSh ); |