summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/appserv.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-12-14 12:55:05 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-12-14 12:55:05 +0100
commit16dacff35f047b4acb5ea594ed01e9ce76fc525e (patch)
tree885e3cfc3753249559a84d55bedafd667b25202b /sfx2/source/appl/appserv.cxx
parent3df3758bd64435d207ccc1aff7d9aba4466a3095 (diff)
autorecovery: replace some SfxFrameItem occurences by SfxUnoFrameItem
As a consequence, replace some occurences of SfxFrame with XFrame. This allows getting rid of yet some more Sfx code in the (SFX) doc loader. Also, it prevents premature creations of SfxFrame instances during loading, since now the frame is really created when it is needed only.
Diffstat (limited to 'sfx2/source/appl/appserv.cxx')
-rw-r--r--sfx2/source/appl/appserv.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 02cb82963930..e40d2dea29ba 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -266,9 +266,9 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
Reference< XFrame > xFrame;
const SfxItemSet* pIntSet = rReq.GetInternalArgs_Impl();
- SFX_ITEMSET_ARG( pIntSet, pFrame, SfxUnoAnyItem, SID_FILLFRAME, FALSE );
- if (pFrame)
- pFrame->GetValue() >>= xFrame;
+ SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
+ if ( pFrameItem )
+ xFrame = pFrameItem->GetFrame();
SfxAbstractTabDialog* pDlg = pFact->CreateTabDialog(
RID_SVXDLG_CUSTOMIZE,
@@ -895,7 +895,10 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
const SfxPoolItem* pItem = NULL;
Reference < XFrame > xFrame;
if ( pArgs && pArgs->GetItemState( SID_FILLFRAME, sal_False, &pItem ) == SFX_ITEM_SET )
- ( (SfxUnoAnyItem*)pItem )->GetValue() >>= xFrame;
+ {
+ OSL_ENSURE( pItem->ISA( SfxUnoFrameItem ), "SfxApplication::OfaExec_Impl: XFrames are to be transported via SfxUnoFrameItem by now!" );
+ xFrame = static_cast< const SfxUnoFrameItem*>( pItem )->GetFrame();
+ }
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
{
@@ -1063,9 +1066,9 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
Reference< XFrame > xFrame;
const SfxItemSet* pIntSet = rReq.GetInternalArgs_Impl();
- SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoAnyItem, SID_FILLFRAME, FALSE );
+ SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
if ( pFrameItem )
- pFrameItem->GetValue() >>= xFrame;
+ xFrame = pFrameItem->GetFrame();
if ( !xFrame.is() )
{