diff options
author | Rüdiger Timm <rt@openoffice.org> | 2003-09-19 07:02:41 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2003-09-19 07:02:41 +0000 |
commit | 8cbaf0db335dd442ff2171e2331ce6a35288b9fd (patch) | |
tree | c675568e5cfbb7bd511c1fe2bd45420ac937425f /sfx2 | |
parent | e5c5a01ad74f9adfbde199926ed8dfc1eff34466 (diff) |
INTEGRATION: CWS fwkq1 (1.29.30); FILE MERGED
2003/08/28 13:09:25 mba 1.29.30.3: #110843#: make FrameItem usable for API calls because Wizards are triggered by dispatch API
2003/08/20 11:13:39 mba 1.29.30.2: #110843#: obsolete code removed
2003/07/14 18:00:21 mba 1.29.30.1: #110843#: get rid of factories
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/frame.cxx | 57 |
1 files changed, 49 insertions, 8 deletions
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index fe7c63e53961..25bb2ec04ac2 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -2,9 +2,9 @@ * * $RCSfile: frame.cxx,v $ * - * $Revision: 1.29 $ + * $Revision: 1.30 $ * - * last change: $Author: vg $ $Date: 2003-05-26 08:30:17 $ + * last change: $Author: rt $ $Date: 2003-09-19 08:02:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -128,7 +128,6 @@ #include "appuno.hxx" #include "topfrm.hxx" #include "workwin.hxx" -#include "fsetvwsh.hxx" #include "sfxuno.hxx" #include "msgpool.hxx" #include "objshimp.hxx" @@ -144,7 +143,7 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::frame; TYPEINIT1(SfxFrame, SfxListener); -TYPEINIT1(SfxFrameItem, SfxPoolItem); +TYPEINIT1_AUTOFACTORY(SfxFrameItem, SfxPoolItem); TYPEINIT1(SfxUsrAnyItem, SfxPoolItem); void SfxFrame::SetLoadCancelable_Impl( SfxCancellable* pCbl ) @@ -1103,6 +1102,18 @@ SfxFrameItem::SfxFrameItem( sal_uInt16 nWhich, SfxViewFrame *p ) wFrame = pFrame; } +SfxFrameItem::SfxFrameItem( sal_uInt16 nWhich, SfxFrame *p ): + SfxPoolItem( nWhich ), + pFrame( p ), wFrame( p ) +{ +} + +SfxFrameItem::SfxFrameItem( SfxFrame *p ): + SfxPoolItem( 0 ), + pFrame( p ), wFrame( p ) +{ +} + int SfxFrameItem::operator==( const SfxPoolItem &rItem ) const { return ((SfxFrameItem&)rItem).pFrame == pFrame && @@ -1123,6 +1134,40 @@ SfxPoolItem* SfxFrameItem::Clone( SfxItemPool *) const return pNew; } +sal_Bool SfxFrameItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const +{ + if ( wFrame ) + { + rVal <<= wFrame->GetFrameInterface(); + return TRUE; + } + + return FALSE; +} + +sal_Bool SfxFrameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE ) +{ + Reference < XFrame > xFrame; + if ( (rVal >>= xFrame) && xFrame.is() ) + { + SfxFrame* pFr = SfxFrame::GetFirst(); + while ( pFr ) + { + if ( pFr->GetFrameInterface() == xFrame ) + { + wFrame = pFrame = pFr; + return TRUE; + } + + pFr = SfxFrame::GetNext( *pFr ); + } + return TRUE; + } + + return FALSE; +} + + SfxUsrAnyItem::SfxUsrAnyItem( sal_uInt16 nWhich, const ::com::sun::star::uno::Any& rAny ) : SfxPoolItem( nWhich ) { @@ -1474,10 +1519,6 @@ void SfxFrame::GrabFocusOnComponent_Impl() void SfxFrame::ReFill_Impl( const SfxFrameSetDescriptor* pSet ) { - SfxFrameSetViewShell *pView = PTR_CAST( SfxFrameSetViewShell, GetCurrentViewFrame()->GetViewShell() ); - if ( pView ) - pView->ReFill( pSet ); - else { SfxFrameSetDescriptor *pOld = pImp->pDescr->GetFrameSet(); SfxFrameSetDescriptor *pNew = pSet->Clone(); |