diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-03-06 18:48:00 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-03-06 18:48:00 +0000 |
commit | 07a2c8e48941b6f2dc51e78f0a5a37d7829432ce (patch) | |
tree | 14ffcda636552638182082f4f51772bfe1027f44 /sfx2/source/appl/app.cxx | |
parent | d049cee1c6340f4b276866725d526b49fb2b6a9b (diff) |
INTEGRATION: CWS odbmacros2 (1.109.38); FILE MERGED
2008/03/04 12:11:32 fs 1.109.38.5: RESYNC: (1.109-1.110); FILE MERGED
2007/12/22 13:40:24 fs 1.109.38.4: #i49133#
SfxApplication::SetViewFrame_Impl: even if the frame actually didn't change,
ensure its document is forwarded to SfxObjectShell::SetCurrentComponent.
2007/12/20 10:20:42 fs 1.109.38.3: #i49133# there's a better fix - reverted the previous change
2007/12/19 20:03:08 fs 1.109.38.2: #i49133#
SfxApplication::SetViewFrame_Impl: even if the frame actually didn't change,
ensure its document is forwarded to SfxObjectShell::SetCurrentComponent.
2007/12/10 08:54:33 fs 1.109.38.1: #i49133# CreateScriptSelectorDialog taking a frame now
Diffstat (limited to 'sfx2/source/appl/app.cxx')
-rw-r--r-- | sfx2/source/appl/app.cxx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 7882792e5d25..0fe1947f575c 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -4,9 +4,9 @@ * * $RCSfile: app.cxx,v $ * - * $Revision: 1.110 $ + * $Revision: 1.111 $ * - * last change: $Author: obo $ $Date: 2008-02-25 17:27:51 $ + * last change: $Author: kz $ $Date: 2008-03-06 19:48:00 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -594,6 +594,14 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame ) } } } + + // even if the frame actually didn't change, ensure its document is forwarded + // to SfxObjectShell::SetCurrentComponent. + // Otherwise, the CurrentComponent might not be correct, in case it has meanwhile + // been reset to some other document, by some non-SFX component. + // #i49133# / 2007-12-19 / frank.schoenheit@sun.com + if ( pFrame && pFrame->GetViewShell() ) + pFrame->GetViewShell()->SetCurrentDocument(); } //-------------------------------------------------------------------- @@ -850,8 +858,12 @@ SfxApplication::ChooseScript() { OSL_TRACE("create selector dialog"); + const SfxViewFrame* pViewFrame = SfxViewFrame::Current(); + const SfxFrame* pFrame = pViewFrame ? pViewFrame->GetFrame() : NULL; + uno::Reference< frame::XFrame > xFrame( pFrame ? pFrame->GetFrameInterface() : uno::Reference< frame::XFrame >() ); + AbstractScriptSelectorDialog* pDlg = - pFact->CreateScriptSelectorDialog( NULL ); + pFact->CreateScriptSelectorDialog( NULL, FALSE, xFrame ); OSL_TRACE("done, now exec it"); |