summaryrefslogtreecommitdiff
path: root/sfx2/source/appl
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r--sfx2/source/appl/app.cxx21
-rw-r--r--sfx2/source/appl/app.src5
-rw-r--r--sfx2/source/appl/appbas.cxx12
-rw-r--r--sfx2/source/appl/appcfg.cxx15
-rw-r--r--sfx2/source/appl/appchild.cxx4
-rw-r--r--sfx2/source/appl/appdata.cxx2
-rw-r--r--sfx2/source/appl/appdde.cxx9
-rw-r--r--sfx2/source/appl/appmisc.cxx9
-rw-r--r--sfx2/source/appl/appopen.cxx268
-rw-r--r--sfx2/source/appl/appquit.cxx3
-rw-r--r--sfx2/source/appl/appreg.cxx4
-rw-r--r--sfx2/source/appl/appserv.cxx129
-rw-r--r--sfx2/source/appl/appuno.cxx142
-rw-r--r--sfx2/source/appl/fileobj.cxx10
-rw-r--r--sfx2/source/appl/fileobj.hxx1
-rw-r--r--sfx2/source/appl/linkmgr2.cxx10
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx2
-rw-r--r--sfx2/source/appl/workwin.cxx6
18 files changed, 224 insertions, 428 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index d5c26f0fb0be..d42d203e57f5 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -108,7 +108,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/genlink.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "appdata.hxx"
#include "openflag.hxx"
#include "app.hrc"
@@ -472,9 +472,6 @@ SfxDispatcher* SfxApplication::GetDispatcher_Impl()
//--------------------------------------------------------------------
void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame )
{
- if( pFrame && !pFrame->IsSetViewFrameAllowed_Impl() )
- return;
-
if ( pFrame != pAppData_Impl->pViewFrame )
{
// get the containerframes ( if one of the frames is an InPlaceFrame )
@@ -491,12 +488,6 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame )
// BOOL bDocWinActivate = pOldContainerFrame && pNewContainerFrame &&
// pOldContainerFrame->GetTopViewFrame() == pNewContainerFrame->GetTopViewFrame();
BOOL bTaskActivate = pOldContainerFrame != pNewContainerFrame;
- if ( pAppData_Impl->pViewFrame )
- {
- if ( bTaskActivate )
- // prepare UI for deacivation
- pAppData_Impl->pViewFrame->GetFrame()->Deactivate_Impl();
- }
if ( pOldContainerFrame )
{
@@ -565,11 +556,11 @@ short SfxApplication::QuerySave_Impl( SfxObjectShell& rDoc, sal_Bool /*bAutoSave
String aMsg( SfxResId( STR_ISMODIFIED ) );
aMsg.SearchAndReplaceAscii( "%1", rDoc.GetTitle() );
- SfxFrame *pFrame = SfxViewFrame::GetFirst(&rDoc)->GetFrame();
- pFrame->Appear();
+ SfxFrame& rFrame = SfxViewFrame::GetFirst(&rDoc)->GetFrame();
+ rFrame.Appear();
WinBits nBits = WB_YES_NO_CANCEL | WB_DEF_NO;
- QueryBox aBox( &pFrame->GetWindow(), nBits, aMsg );
+ QueryBox aBox( &rFrame.GetWindow(), nBits, aMsg );
return aBox.Execute();
}
@@ -693,7 +684,7 @@ uno::Reference< task::XStatusIndicator > SfxApplication::GetStatusIndicator() co
while ( pTop->GetParentViewFrame_Impl() )
pTop = pTop->GetParentViewFrame_Impl();
- return pTop->GetFrame()->GetWorkWindow_Impl()->GetStatusIndicator();
+ return pTop->GetFrame().GetWorkWindow_Impl()->GetStatusIndicator();
}
SfxTbxCtrlFactArr_Impl& SfxApplication::GetTbxCtrlFactories_Impl() const
@@ -810,7 +801,7 @@ SfxApplication::ChooseScript()
OSL_TRACE("create selector dialog");
const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
- const SfxFrame* pFrame = pViewFrame ? pViewFrame->GetFrame() : NULL;
+ const SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetFrame() : NULL;
uno::Reference< frame::XFrame > xFrame( pFrame ? pFrame->GetFrameInterface() : uno::Reference< frame::XFrame >() );
AbstractScriptSelectorDialog* pDlg =
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index 9081cd79f6ee..0858e66e7347 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -652,11 +652,6 @@ ToolBox RID_ENVTOOLBOX
};
ToolBoxItem
{
- Identifier = SID_BROWSE_STOP ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
Type = TOOLBOXITEM_SEPARATOR ;
};
ToolBoxItem
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 3ace03605d5c..10c4a6bc6797 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -351,7 +351,7 @@ void SfxApplication::EnterBasicCall()
}
// die SbxObjects der SfxShells auf den Stacks der Frames erzeugen
- for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(0,0,sal_False);
+ for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(0,sal_False);
pFrame;
pFrame = SfxViewFrame::GetNext(*pFrame,0,0,sal_False) )
{
@@ -422,16 +422,6 @@ void SfxApplication::PropExec_Impl( SfxRequest &rReq )
break;
}
- case SID_WIN_POSSIZE:
- {
- break;
- }
-
- case SID_INTERACTIVEMODE:
- {
- break;
- }
-
case SID_ATTR_UNDO_COUNT:
{
SFX_REQUEST_ARG(rReq, pCountItem, SfxUInt16Item, nSID, sal_False);
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 54e91df22f3d..6afa8c68ed83 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -268,14 +268,6 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
bRet = FALSE;
}
break;
- case SID_ATTR_SAVEDOCWINS :
- {
- bRet = TRUE;
- if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVEDOCWINS))
- if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_SAVEDOCWINS ), aSaveOptions.IsSaveDocWins())))
- bRet = FALSE;
- }
- break;
case SID_ATTR_SAVEDOCVIEW :
{
bRet = TRUE;
@@ -627,13 +619,6 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
aSaveOptions.SetSaveWorkingSet(((const SfxBoolItem *)pItem)->GetValue());
}
- // offene Fenster speichern
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCWINS), TRUE, &pItem))
- {
- DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
- aSaveOptions.SetSaveDocWins(((const SfxBoolItem *)pItem)->GetValue());
- }
-
// Fenster-Einstellung speichern
if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCVIEW), TRUE, &pItem))
{
diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx
index e69be0caadc9..b18fc905abdc 100644
--- a/sfx2/source/appl/appchild.cxx
+++ b/sfx2/source/appl/appchild.cxx
@@ -167,9 +167,9 @@ SfxTemplateDialog* SfxApplication::GetTemplateDialog()
SfxWorkWindow* SfxApplication::GetWorkWindow_Impl(const SfxViewFrame *pFrame) const
{
if ( pFrame )
- return pFrame->GetFrame()->GetWorkWindow_Impl();
+ return pFrame->GetFrame().GetWorkWindow_Impl();
else if ( pAppData_Impl->pViewFrame )
- return pAppData_Impl->pViewFrame->GetFrame()->GetWorkWindow_Impl();
+ return pAppData_Impl->pViewFrame->GetFrame().GetWorkWindow_Impl();
else
return NULL;
}
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index f9abd921cbef..a07623df46b1 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -98,7 +98,6 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* pApp ) :
pTopFrames( new SfxFrameArr_Impl ),
pInitLinkList(0),
pMatcher( 0 ),
- pCancelMgr( 0 ),
pLabelResMgr( 0 ),
pAppDispatch(NULL),
pTemplates( 0 ),
@@ -148,7 +147,6 @@ SfxAppData_Impl::~SfxAppData_Impl()
{
DeInitDDE();
delete pTopFrames;
- delete pCancelMgr;
delete pSecureURLs;
delete pBasicManager;
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 70e52e9a24f1..808731f8bba8 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -46,7 +46,7 @@
#include "appdata.hxx"
#include <sfx2/objsh.hxx>
#include <sfx2/viewfrm.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include "sfxtypes.hxx"
#include <sfx2/sfxsids.hrc>
@@ -593,17 +593,12 @@ BOOL ImplDdeService::MakeTopic( const String& rNm )
// dann versuche die Datei zu laden:
SfxStringItem aName( SID_FILE_NAME, aFile.GetMainURL( INetURLObject::NO_DECODE ) );
SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, TRUE);
-// SfxBoolItem aHidden(SID_HIDDEN, TRUE);
- // minimiert!
- SfxUInt16Item aViewStat( SID_VIEW_ZOOM_MODE, 0 );
- SfxRectangleItem aRectItem( SID_VIEW_POS_SIZE, Rectangle() );
SfxBoolItem aSilent(SID_SILENT, TRUE);
SfxDispatcher* pDispatcher = SFX_APP()->GetDispatcher_Impl();
const SfxPoolItem* pRet = pDispatcher->Execute( SID_OPENDOC,
SFX_CALLMODE_SYNCHRON,
&aName, &aNewView,
- &aViewStat,&aRectItem/*aHidden*/,
&aSilent, 0L );
if( pRet && pRet->ISA( SfxViewFrameItem ) &&
@@ -629,7 +624,7 @@ String ImplDdeService::Topics()
SfxObjectShell* pShell = SfxObjectShell::GetFirst( &aType );
while( pShell )
{
- if( SfxViewFrame::GetFirst( pShell, TYPE(SfxTopViewFrame) ))
+ if( SfxViewFrame::GetFirst( pShell ) )
{
if( sRet.Len() )
sRet += '\t';
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
index 5d8a03609c2a..70147e8d9146 100644
--- a/sfx2/source/appl/appmisc.cxx
+++ b/sfx2/source/appl/appmisc.cxx
@@ -86,7 +86,7 @@
#include <sfx2/templdlg.hxx>
#include <sfx2/module.hxx>
#include <sfx2/msgpool.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "openflag.hxx"
#include <sfx2/viewsh.hxx>
#include <sfx2/objface.hxx>
@@ -326,13 +326,6 @@ ISfxTemplateCommon* SfxApplication::GetCurrentTemplateCommon( SfxBindings& rBind
return 0;
}
-SfxCancelManager* SfxApplication::GetCancelManager() const
-{
- if ( !pAppData_Impl->pCancelMgr )
- pAppData_Impl->pCancelMgr = new SfxCancelManager;
- return pAppData_Impl->pCancelMgr;
-}
-
SfxResourceManager& SfxApplication::GetResourceManager() const { return *pAppData_Impl->pResMgr; }
BOOL SfxApplication::IsDowning() const { return pAppData_Impl->bDowning; }
SfxDispatcher* SfxApplication::GetAppDispatcher_Impl() { return pAppData_Impl->pAppDispat; }
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 14f3162f0abf..89bb5f23f1de 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -101,7 +101,7 @@
#include "sfxresid.hxx"
#include <sfx2/viewsh.hxx>
#include "app.hrc"
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include <sfx2/sfxuno.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/filedlghelper.hxx>
@@ -193,7 +193,7 @@ SfxObjectShellRef SfxApplication::DocAlreadyLoaded
// Vergleiche anhand der URLs
INetURLObject aUrl( xDoc->GetMedium()->GetName() );
if ( !aUrl.HasError() && aUrl == aUrlToFind &&
- (!bForbidVisible || !SfxViewFrame::GetFirst( xDoc, 0, TRUE )) &&
+ (!bForbidVisible || !SfxViewFrame::GetFirst( xDoc, TRUE )) &&
!xDoc->IsLoading())
{
break;
@@ -210,12 +210,10 @@ SfxObjectShellRef SfxApplication::DocAlreadyLoaded
DBG_ASSERT(
!bForbidVisible, "Unsichtbares kann nicht aktiviert werden" );
- SfxTopViewFrame *pFrame;
- for( pFrame = (SfxTopViewFrame*)
- SfxViewFrame::GetFirst( xDoc, TYPE(SfxTopViewFrame) );
+ SfxViewFrame* pFrame;
+ for( pFrame = SfxViewFrame::GetFirst( xDoc );
pFrame && !pFrame->IsVisible();
- pFrame = (SfxTopViewFrame*)
- SfxViewFrame::GetNext( *pFrame, xDoc, TYPE(SfxTopViewFrame) ) ) ;
+ pFrame = SfxViewFrame::GetNext( *pFrame, xDoc ) ) ;
if ( pFrame )
{
SfxViewFrame *pCur = SfxViewFrame::Current();
@@ -511,65 +509,6 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
//--------------------------------------------------------------------
-SfxObjectShellLock SfxApplication::NewDoc_Impl( const String& rFact, const SfxItemSet *pSet )
-{
- SfxObjectShellLock xDoc;
- String aFact( rFact );
- String aPrefix = String::CreateFromAscii( "private:factory/" );
- if ( aPrefix.Len() == aFact.Match( aPrefix ) )
- aFact.Erase( 0, aPrefix.Len() );
- USHORT nPos = aFact.Search( '?' );
- String aParam;
- if ( nPos != STRING_NOTFOUND )
- {
- aParam = aFact.Copy( nPos, aFact.Len() );
- aFact.Erase( nPos, aFact.Len() );
- aParam.Erase(0,1);
- }
-
- xDoc = SfxObjectShell::CreateObjectByFactoryName( aFact );
- aParam = INetURLObject::decode( aParam, '%', INetURLObject::DECODE_WITH_CHARSET );
- if( xDoc.Is() )
- xDoc->DoInitNew_Impl( aParam );
-
- if ( xDoc.Is() )
- {
- if ( pSet )
- {
- // TODO/LATER: Should the other arguments be transfered as well?
- SFX_ITEMSET_ARG( pSet, pDefaultPathItem, SfxStringItem, SID_DEFAULTFILEPATH, FALSE);
- if ( pDefaultPathItem )
- xDoc->GetMedium()->GetItemSet()->Put( *pDefaultPathItem );
- SFX_ITEMSET_ARG( pSet, pDefaultNameItem, SfxStringItem, SID_DEFAULTFILENAME, FALSE);
- if ( pDefaultNameItem )
- xDoc->GetMedium()->GetItemSet()->Put( *pDefaultNameItem );
- SFX_ITEMSET_ARG( pSet, pTitleItem, SfxStringItem, SID_DOCINFO_TITLE, FALSE );
- if ( pTitleItem )
- xDoc->GetMedium()->GetItemSet()->Put( *pTitleItem );
- }
-
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel ( xDoc->GetModel(), ::com::sun::star::uno::UNO_QUERY );
- if ( xModel.is() )
- {
- SfxItemSet* pNew = xDoc->GetMedium()->GetItemSet()->Clone();
- pNew->ClearItem( SID_PROGRESS_STATUSBAR_CONTROL );
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
- TransformItems( SID_OPENDOC, *pNew, aArgs );
-
- sal_Int32 nLength = aArgs.getLength();
- aArgs.realloc( nLength + 1 );
-
- aArgs[nLength].Name = DEFINE_CONST_UNICODE("Title");
- aArgs[nLength].Value <<= ::rtl::OUString( xDoc->GetTitle( SFX_TITLE_DETECT ) );
-
- xModel->attachResource( ::rtl::OUString(), aArgs );
- delete pNew;
- }
- }
-
- return xDoc;
-}
-
void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
{
DBG_MEMTEST();
@@ -603,131 +542,6 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
rReq.SetReturnValue( SfxFrameItem( 0, pItem->GetFrame() ) );
}
-const SfxPoolItem* SfxApplication::NewDocDirectExec_ImplOld( SfxRequest& rReq )
-{
- DBG_MEMTEST();
-/*
- SFX_REQUEST_ARG(rReq, pHidden, SfxBoolItem, SID_HIDDEN, FALSE);
-//(mba)/task
-
- if ( !pHidden || !pHidden->GetValue() )
- Application::GetAppWindow()->EnterWait();
-*/
- SfxObjectShellLock xDoc;
-
- // Factory-RegNo kann per Parameter angegeben sein
- SfxErrorContext aEc(ERRCTX_SFX_NEWDOCDIRECT);
- rReq.GetArgs(); // -Wall required??
- String aFactory;
- rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, TRUE ) );
- SFX_REQUEST_ARG( rReq, pFactoryName, SfxStringItem, SID_NEWDOCDIRECT, FALSE );
- if( pFactoryName )
- aFactory = pFactoryName->GetValue();
- else
- aFactory = SvtModuleOptions().GetDefaultModuleName();
-
- SFX_REQUEST_ARG( rReq, pFileFlagsItem, SfxStringItem, SID_OPTIONS, FALSE);
- if ( pFileFlagsItem )
- {
- // Werte auf einzelne Items verteilen
- String aFileFlags = pFileFlagsItem->GetValue();
- aFileFlags.ToUpperAscii();
- if ( STRING_NOTFOUND != aFileFlags.Search( 0x0054 ) ) // T = 54h
- rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, TRUE ) );
- if ( STRING_NOTFOUND != aFileFlags.Search( 0x0048 ) ) // H = 48h
- rReq.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) );
- if ( STRING_NOTFOUND != aFileFlags.Search( 0x0052 ) ) // R = 52h
- rReq.AppendItem( SfxBoolItem( SID_DOC_READONLY, TRUE ) );
- if ( STRING_NOTFOUND != aFileFlags.Search( 0x0042 ) ) // B = 42h
- rReq.AppendItem( SfxBoolItem( SID_PREVIEW, TRUE ) );
- if ( STRING_NOTFOUND != aFileFlags.Search( 0x0053 ) ) // S = 53h
- rReq.AppendItem( SfxBoolItem( SID_SILENT, TRUE ) );
- }
-
- xDoc = NewDoc_Impl( aFactory, rReq.GetArgs() );
- if ( xDoc.Is() )
- {
- SFX_REQUEST_ARG(rReq, pReadonly, SfxBoolItem, SID_DOC_READONLY, FALSE);
- if ( pReadonly )
- xDoc->GetMedium()->GetItemSet()->Put( *pReadonly );
-
- SFX_REQUEST_ARG(rReq, pPreview, SfxBoolItem, SID_PREVIEW, FALSE);
- if ( pPreview )
- xDoc->GetMedium()->GetItemSet()->Put( *pPreview );
-
- SFX_REQUEST_ARG(rReq, pSilent, SfxBoolItem, SID_SILENT, FALSE);
- if ( pSilent )
- xDoc->GetMedium()->GetItemSet()->Put( *pSilent );
-
- SFX_REQUEST_ARG(rReq, pFlags, SfxStringItem, SID_OPTIONS, FALSE);
- if ( pFlags )
- xDoc->GetMedium()->GetItemSet()->Put( *pFlags );
- }
-
- // View erzeugen
- if ( xDoc.Is() )
- {
- SFX_REQUEST_ARG(rReq, pHidden, SfxBoolItem, SID_HIDDEN, FALSE);
- BOOL bHidden = FALSE;
- if ( pHidden )
- {
- xDoc->GetMedium()->GetItemSet()->Put( *pHidden, SID_HIDDEN );
- bHidden = pHidden->GetValue();
- }
-
- SFX_REQUEST_ARG(rReq, pViewId, SfxUInt16Item, SID_VIEW_ID, FALSE);
- USHORT nViewId = 0;
- if ( pViewId )
- {
- xDoc->GetMedium()->GetItemSet()->Put( *pViewId, SID_VIEW_ID );
- nViewId = pViewId->GetValue();
- }
-
- xDoc->SetActivateEvent_Impl( SFX_EVENT_CREATEDOC );
-// xDoc->Get_Impl()->nLoadedFlags = SFX_LOADED_ALL;
- const SfxItemSet* pInternalArgs = rReq.GetInternalArgs_Impl();
- if( pInternalArgs )
- xDoc->GetMedium()->GetItemSet()->Put( *pInternalArgs );
- SFX_REQUEST_ARG(rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE);
-
- SfxFrame* pFrame = NULL;
- if (pFrameItem)
- pFrame = pFrameItem->GetFrame();
- else
- pFrame = (SfxFrame*)SfxTopFrame::Create(xDoc, nViewId, bHidden, pInternalArgs);
- if ( pFrame )
- {
- if ( pFrame->GetCurrentDocument() == xDoc || pFrame->PrepareClose_Impl( TRUE, TRUE ) == TRUE )
- {
- if ( bHidden )
- {
- xDoc->RestoreNoDelete();
- xDoc->OwnerLock( TRUE );
- xDoc->Get_Impl()->bHiddenLockedByAPI = TRUE;
- }
-
- if ( pFrame->GetCurrentDocument() != xDoc )
- {
- if ( pFrame->InsertDocument( xDoc ) )
- rReq.SetReturnValue( SfxFrameItem( 0, pFrame ) );
- else
- xDoc->DoClose();
- }
- }
- else
- xDoc.Clear();
- }
- }
-
- return rReq.GetReturnValue();
-
-//(mba)/task
-/*
- if ( !pHidden || !pHidden->GetValue() )
- Application::GetAppWindow()->LeaveWait();
- */
-}
-
//--------------------------------------------------------------------
void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
@@ -1303,12 +1117,22 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
return;
}
- SFX_REQUEST_ARG(rReq, pFrmItem, SfxFrameItem, SID_DOCFRAME, FALSE);
- SfxFrame *pFrame = NULL;
- if ( pFrmItem )
- pFrame = pFrmItem->GetFrame();
- else if ( SfxViewFrame::Current() )
- pFrame = SfxViewFrame::Current()->GetFrame();
+ SfxFrame* pTargetFrame = NULL;
+ Reference< XFrame > xTargetFrame;
+
+ SFX_REQUEST_ARG(rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE);
+ if ( pFrameItem )
+ pTargetFrame = pFrameItem->GetFrame();
+
+ if ( !pTargetFrame )
+ {
+ SFX_REQUEST_ARG(rReq, pUnoFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE);
+ if ( pUnoFrameItem )
+ xTargetFrame = pUnoFrameItem->GetFrame();
+ }
+
+ if ( !pTargetFrame && !xTargetFrame.is() && SfxViewFrame::Current() )
+ pTargetFrame = &SfxViewFrame::Current()->GetFrame();
// check if caller has set a callback
SFX_REQUEST_ARG(rReq, pLinkItem, SfxLinkItem, SID_DONELINK, FALSE );
@@ -1319,21 +1143,6 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
rReq.RemoveItem( SID_DONELINK );
- // check if caller wants to create a view
- BOOL bCreateView = TRUE;
- SFX_REQUEST_ARG( rReq, pCreateViewItem, SfxBoolItem, SID_VIEW, FALSE );
- if ( pCreateViewItem )
- {
- if ( !pCreateViewItem->GetValue() )
- bCreateView = FALSE;
- // this is an "SFX only" parameter
- rReq.RemoveItem( SID_VIEW );
- }
-
- // we can't load without a view - switch to hidden view
- if ( !bCreateView )
- rReq.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) );
-
// check if the view must be hidden
BOOL bHidden = FALSE;
SFX_REQUEST_ARG(rReq, pHidItem, SfxBoolItem, SID_HIDDEN, FALSE);
@@ -1385,18 +1194,24 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// {
// if a frame is given, it must be used for the starting point of the targetting mechanism
// this code is also used if asynchronous loading is possible, because loadComponent always is synchron
- Reference < XFrame > xFrame;
- if ( pFrame )
- xFrame = pFrame->GetFrameInterface();
- else
- xFrame = Reference < XFrame >( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY );
+ if ( !xTargetFrame.is() )
+ {
+ if ( pTargetFrame )
+ {
+ xTargetFrame = pTargetFrame->GetFrameInterface();
+ }
+ else
+ {
+ xTargetFrame.set( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY );
+ }
+ }
// make URL ready
SFX_REQUEST_ARG( rReq, pURLItem, SfxStringItem, SID_FILE_NAME, FALSE );
aFileName = pURLItem->GetValue();
if( aFileName.Len() && aFileName.GetChar(0) == '#' ) // Mark without URL
{
- SfxViewFrame *pView = pFrame ? pFrame->GetCurrentViewFrame() : 0;
+ SfxViewFrame *pView = pTargetFrame ? pTargetFrame->GetCurrentViewFrame() : 0;
if ( !pView )
pView = SfxViewFrame::Current();
pView->GetViewShell()->JumpToMark( aFileName.Copy(1) );
@@ -1414,13 +1229,13 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// if loading must be done synchron, we must wait for completion to get a return value
// find frame by myself; I must konw the exact frame to get the controller for the return value from it
//if( aTarget.getLength() )
- // xFrame = xFrame->findFrame( aTarget, FrameSearchFlag::ALL );
+ // xTargetFrame = xTargetFrame->findFrame( aTarget, FrameSearchFlag::ALL );
Reference < XComponent > xComp;
try
{
- xComp = ::comphelper::SynchronousDispatch::dispatch( xFrame, aFileName, aTarget, 0, aArgs );
-// Reference < XComponentLoader > xLoader( xFrame, UNO_QUERY );
+ xComp = ::comphelper::SynchronousDispatch::dispatch( xTargetFrame, aFileName, aTarget, 0, aArgs );
+// Reference < XComponentLoader > xLoader( xTargetFrame, UNO_QUERY );
// xComp = xLoader->loadComponentFromURL( aFileName, aTarget, 0, aArgs );
}
catch(const RuntimeException&)
@@ -1445,7 +1260,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), UNO_QUERY );
xTrans->parseStrict( aURL );
- Reference < XDispatchProvider > xProv( xFrame, UNO_QUERY );
+ Reference < XDispatchProvider > xProv( xTargetFrame, UNO_QUERY );
Reference < XDispatch > xDisp = xProv.is() ? xProv->queryDispatch( aURL, aTarget, FrameSearchFlag::ALL ) : Reference < XDispatch >();;
RTL_LOGFILE_PRODUCT_CONTEXT( aLog2, "PERFORMANCE - SfxApplication::OpenDocExec_Impl" );
if ( xDisp.is() )
@@ -1491,7 +1306,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
if ( pShell->GetController() == xController )
{
- pCntrFrame = pShell->GetViewFrame()->GetFrame();
+ pCntrFrame = &pShell->GetViewFrame()->GetFrame();
break;
}
}
@@ -1501,12 +1316,9 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
SfxObjectShell* pSh = pCntrFrame->GetCurrentDocument();
DBG_ASSERT( pSh, "Controller without ObjectShell ?!" );
- if ( bCreateView )
- rReq.SetReturnValue( SfxViewFrameItem( 0, pCntrFrame->GetCurrentViewFrame() ) );
- else
- rReq.SetReturnValue( SfxObjectItem( 0, pSh ) );
+ rReq.SetReturnValue( SfxViewFrameItem( 0, pCntrFrame->GetCurrentViewFrame() ) );
- if( ( bHidden || !bCreateView ) )
+ if ( bHidden )
pSh->RestoreNoDelete();
}
}
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index c316a9847886..4da32cf9f566 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -116,9 +116,6 @@ BOOL SfxApplication::QueryExit_Impl()
}
}
*/
- // alles canceln was zu canceln ist
- GetCancelManager()->Cancel(TRUE);
-
/*
SfxObjectShell *pLastDocSh = SfxObjectShell::GetFirst();
if ( bQuit )
diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx
index a2f34b472732..47bf98292316 100644
--- a/sfx2/source/appl/appreg.cxx
+++ b/sfx2/source/appl/appreg.cxx
@@ -43,7 +43,7 @@
#include "stbitem.hxx"
#include <sfx2/navigat.hxx>
#include <sfx2/module.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "partwnd.hxx"
#include <sfx2/sfxsids.hrc>
#include "recfloat.hxx"
@@ -59,7 +59,6 @@ void SfxApplication::Registrations_Impl()
SfxApplication::RegisterInterface();
SfxModule::RegisterInterface();
SfxViewFrame::RegisterInterface();
- SfxTopViewFrame::RegisterInterface();
SfxObjectShell::RegisterInterface();
SfxViewShell::RegisterInterface();
@@ -73,7 +72,6 @@ void SfxApplication::Registrations_Impl()
// Controller
SfxToolBoxControl::RegisterControl(SID_REPEAT);
SfxURLToolBoxControl_Impl::RegisterControl(SID_OPENURL);
- SfxCancelToolBoxControl_Impl::RegisterControl(SID_BROWSE_STOP);
SfxAppToolBoxControl_Impl::RegisterControl( SID_NEWDOCDIRECT );
SfxAppToolBoxControl_Impl::RegisterControl( SID_AUTOPILOTMENU );
};
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 53cf115382e5..14789100bb24 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -68,7 +68,6 @@
#include <tools/config.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/msgbox.hxx>
-#include <svl/cancel.hxx>
#include <svl/intitem.hxx>
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
@@ -93,9 +92,11 @@
#include <cppuhelper/exc_hlp.hxx>
#include <com/sun/star/script/provider/XScriptProviderFactory.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include "about.hxx"
+#include "frmload.hxx"
#include "referers.hxx"
#include <sfx2/app.hxx>
#include <sfx2/request.hxx>
@@ -129,7 +130,7 @@
#include "minfitem.hxx"
#include <sfx2/event.hxx>
#include <sfx2/module.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "sfxpicklist.hxx"
#include "imestatuswindow.hxx"
#include <sfx2/sfxdlg.hxx>
@@ -262,9 +263,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,
@@ -822,6 +823,60 @@ namespace
}
return _pFallback;
}
+
+ const ::rtl::OUString& lcl_getBasicIDEServiceName()
+ {
+ static const ::rtl::OUString s_sBasicName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.BasicIDE" ) );
+ return s_sBasicName;
+ }
+
+ SfxViewFrame* lcl_getBasicIDEViewFrame( SfxObjectShell* i_pBasicIDE )
+ {
+ SfxViewFrame* pView = SfxViewFrame::GetFirst( i_pBasicIDE );
+ while ( pView )
+ {
+ if ( pView->GetObjectShell()->GetFactory().GetDocumentServiceName() == lcl_getBasicIDEServiceName() )
+ break;
+ pView = SfxViewFrame::GetNext( *pView, i_pBasicIDE );
+ }
+ return pView;
+ }
+ Reference< XFrame > lcl_findStartModuleFrame( const ::comphelper::ComponentContext& i_rContext )
+ {
+ try
+ {
+ Reference < XFramesSupplier > xSupplier( i_rContext.createComponent( "com.sun.star.frame.Desktop" ), UNO_QUERY_THROW );
+ Reference < XIndexAccess > xContainer( xSupplier->getFrames(), UNO_QUERY_THROW );
+
+ Reference< XModuleManager > xCheck( i_rContext.createComponent( "com.sun.star.frame.ModuleManager" ), UNO_QUERY_THROW );
+
+ sal_Int32 nCount = xContainer->getCount();
+ for ( sal_Int32 i=0; i<nCount; ++i )
+ {
+ try
+ {
+ Reference < XFrame > xFrame( xContainer->getByIndex(i), UNO_QUERY_THROW );
+ ::rtl::OUString sModule = xCheck->identify( xFrame );
+ if ( sModule.equalsAscii( "com.sun.star.frame.StartModule" ) )
+ return xFrame;
+ }
+ catch( const UnknownModuleException& )
+ {
+ // silence
+ }
+ catch(const Exception&)
+ {
+ // re-throw, caught below
+ throw;
+ }
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return NULL;
+ }
}
void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
@@ -839,7 +894,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 )
{
@@ -902,26 +960,46 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
case SID_BASICIDE_APPEAR:
{
- SfxViewFrame* pView = SfxViewFrame::GetFirst();
- ::rtl::OUString aBasicName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.BasicIDE" ) );
- while ( pView )
- {
- if ( pView->GetObjectShell()->GetFactory().GetDocumentServiceName() == aBasicName )
- break;
- pView = SfxViewFrame::GetNext( *pView );
- }
-
+ SfxViewFrame* pView = lcl_getBasicIDEViewFrame( NULL );
if ( !pView )
{
- SfxObjectShell* pDocShell = SfxObjectShell::CreateObject( aBasicName );
- pDocShell->DoInitNew( 0 );
- pDocShell->SetModified( FALSE );
- pView = SfxViewFrame::CreateViewFrame( *pDocShell, 0 );
- pView->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "BASIC:1" ) ) );
+ SfxObjectShell* pBasicIDE = SfxObjectShell::CreateObject( lcl_getBasicIDEServiceName() );
+ pBasicIDE->DoInitNew( 0 );
+ pBasicIDE->SetModified( FALSE );
+ try
+ {
+ // load the Basic IDE via direct access to the SFX frame loader. A generic loadComponentFromURL
+ // (which could be done via SfxViewFrame::LoadDocumentIntoFrame) is not feasible here, since the Basic IDE
+ // does not really play nice with the framework's concept. For instance, it is a "singleton document",
+ // which conflicts, at the latest, with the framework's concept of loading into _blank frames.
+ // So, since we know that our frame loader can handle it, we skip the generic framework loader
+ // mechanism, and the type detection (which doesn't know about the Basic IDE).
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< XSynchronousFrameLoader > xLoader( aContext.createComponent(
+ SfxFrameLoader_Impl::impl_getStaticImplementationName() ), UNO_QUERY_THROW );
+ ::comphelper::NamedValueCollection aLoadArgs;
+ aLoadArgs.put( "Model", pBasicIDE->GetModel() );
+ aLoadArgs.put( "URL", ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:factory/sbasic" ) ) );
+
+ Reference< XFrame > xTargetFrame( lcl_findStartModuleFrame( aContext ) );
+ if ( !xTargetFrame.is() )
+ xTargetFrame = SfxFrame::CreateBlankFrame();
+ ENSURE_OR_THROW( xTargetFrame.is(), "could not obtain a frameto load the Basic IDE into!" );
+
+ xLoader->load( aLoadArgs.getPropertyValues(), xTargetFrame );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ pView = lcl_getBasicIDEViewFrame( pBasicIDE );
+ if ( pView )
+ pView->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "BASIC:1" ) ) );
}
if ( pView )
- pView->GetFrame()->Appear();
+ pView->GetFrame().Appear();
const SfxItemSet* pArgs = rReq.GetArgs();
if ( pArgs && pView )
@@ -988,16 +1066,15 @@ 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() )
{
const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
- const SfxFrame* pFrame = pViewFrame ? pViewFrame->GetFrame() : NULL;
- if ( pFrame )
- xFrame = pFrame->GetFrameInterface();
+ if ( pViewFrame )
+ xFrame = pViewFrame->GetFrame().GetFrameInterface();
}
do // artificial loop for flow control
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 05c23627a3b9..8b7e06c231cd 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -144,54 +144,53 @@ using namespace ::com::sun::star::io;
#define FRAMELOADER_SERVICENAME "com.sun.star.frame.FrameLoader"
#define PROTOCOLHANDLER_SERVICENAME "com.sun.star.frame.ProtocolHandler"
-static const String sTemplateRegionName = String::CreateFromAscii( "TemplateRegionName" );
-static const String sTemplateName = String::CreateFromAscii( "TemplateName" );
-static const String sAsTemplate = String::CreateFromAscii( "AsTemplate" );
-static const String sOpenNewView = String::CreateFromAscii( "OpenNewView" );
-static const String sViewId = String::CreateFromAscii( "ViewId" );
-static const String sPluginMode = String::CreateFromAscii( "PluginMode" );
-static const String sReadOnly = String::CreateFromAscii( "ReadOnly" );
-static const String sStartPresentation = String::CreateFromAscii( "StartPresentation" );
-static const String sFrameName = String::CreateFromAscii( "FrameName" );
-static const String sMediaType = String::CreateFromAscii( "MediaType" );
-static const String sPostData = String::CreateFromAscii( "PostData" );
-static const String sCharacterSet = String::CreateFromAscii( "CharacterSet" );
-static const String sInputStream = String::CreateFromAscii( "InputStream" );
-static const String sStream = String::CreateFromAscii( "Stream" );
-static const String sOutputStream = String::CreateFromAscii( "OutputStream" );
-static const String sHidden = String::CreateFromAscii( "Hidden" );
-static const String sPreview = String::CreateFromAscii( "Preview" );
-static const String sViewOnly = String::CreateFromAscii( "ViewOnly" );
-static const String sDontEdit = String::CreateFromAscii( "DontEdit" );
-static const String sSilent = String::CreateFromAscii( "Silent" );
-static const String sJumpMark = String::CreateFromAscii( "JumpMark" );
-static const String sFileName = String::CreateFromAscii( "FileName" );
-static const String sSalvageURL = String::CreateFromAscii( "SalvagedFile" );
-static const String sStatusInd = String::CreateFromAscii( "StatusIndicator" );
-static const String sModel = String::CreateFromAscii( "Model" );
-static const String sFrame = String::CreateFromAscii( "Frame" );
-static const String sViewData = String::CreateFromAscii( "ViewData" );
-static const String sFilterData = String::CreateFromAscii( "FilterData" );
-static const String sSelectionOnly = String::CreateFromAscii( "SelectionOnly" );
-static const String sFilterFlags = String::CreateFromAscii( "FilterFlags" );
-static const String sMacroExecMode = String::CreateFromAscii( "MacroExecutionMode" );
-static const String sUpdateDocMode = String::CreateFromAscii( "UpdateDocMode" );
-static const String sMinimized = String::CreateFromAscii( "Minimized" );
-static const String sInteractionHdl = String::CreateFromAscii( "InteractionHandler" );
-static const String sWindowState = String::CreateFromAscii( "WindowState" );
-static const String sUCBContent = String::CreateFromAscii( "UCBContent" );
-static const String sRepairPackage = String::CreateFromAscii( "RepairPackage" );
-static const String sDocumentTitle = String::CreateFromAscii( "DocumentTitle" );
-static const String sComponentData = String::CreateFromAscii( "ComponentData" );
-static const String sComponentContext = String::CreateFromAscii( "ComponentContext" );
-static const String sDocumentBaseURL = String::CreateFromAscii( "DocumentBaseURL" );
-static const String sHierarchicalDocumentName = String::CreateFromAscii( "HierarchicalDocumentName" );
-static const String sCopyStreamIfPossible = String::CreateFromAscii( "CopyStreamIfPossible" );
-static const String sNoAutoSave = String::CreateFromAscii( "NoAutoSave" );
-static const String sFolderName = String::CreateFromAscii( "FolderName" );
-static const String sUseSystemDialog = String::CreateFromAscii( "UseSystemDialog" );
-static const String sStandardDir = String::CreateFromAscii( "StandardDir" );
-static const String sBlackList = String::CreateFromAscii( "BlackList" );
+static const String sTemplateRegionName = String::CreateFromAscii( "TemplateRegionName" );
+static const String sTemplateName = String::CreateFromAscii( "TemplateName" );
+static const String sAsTemplate = String::CreateFromAscii( "AsTemplate" );
+static const String sOpenNewView = String::CreateFromAscii( "OpenNewView" );
+static const String sViewId = String::CreateFromAscii( "ViewId" );
+static const String sPluginMode = String::CreateFromAscii( "PluginMode" );
+static const String sReadOnly = String::CreateFromAscii( "ReadOnly" );
+static const String sStartPresentation = String::CreateFromAscii( "StartPresentation" );
+static const String sFrameName = String::CreateFromAscii( "FrameName" );
+static const String sMediaType = String::CreateFromAscii( "MediaType" );
+static const String sPostData = String::CreateFromAscii( "PostData" );
+static const String sCharacterSet = String::CreateFromAscii( "CharacterSet" );
+static const String sInputStream = String::CreateFromAscii( "InputStream" );
+static const String sStream = String::CreateFromAscii( "Stream" );
+static const String sOutputStream = String::CreateFromAscii( "OutputStream" );
+static const String sHidden = String::CreateFromAscii( "Hidden" );
+static const String sPreview = String::CreateFromAscii( "Preview" );
+static const String sViewOnly = String::CreateFromAscii( "ViewOnly" );
+static const String sDontEdit = String::CreateFromAscii( "DontEdit" );
+static const String sSilent = String::CreateFromAscii( "Silent" );
+static const String sJumpMark = String::CreateFromAscii( "JumpMark" );
+static const String sFileName = String::CreateFromAscii( "FileName" );
+static const String sSalvageURL = String::CreateFromAscii( "SalvagedFile" );
+static const String sStatusInd = String::CreateFromAscii( "StatusIndicator" );
+static const String sModel = String::CreateFromAscii( "Model" );
+static const String sFrame = String::CreateFromAscii( "Frame" );
+static const String sViewData = String::CreateFromAscii( "ViewData" );
+static const String sFilterData = String::CreateFromAscii( "FilterData" );
+static const String sSelectionOnly = String::CreateFromAscii( "SelectionOnly" );
+static const String sFilterFlags = String::CreateFromAscii( "FilterFlags" );
+static const String sMacroExecMode = String::CreateFromAscii( "MacroExecutionMode" );
+static const String sUpdateDocMode = String::CreateFromAscii( "UpdateDocMode" );
+static const String sMinimized = String::CreateFromAscii( "Minimized" );
+static const String sInteractionHdl = String::CreateFromAscii( "InteractionHandler" );
+static const String sUCBContent = String::CreateFromAscii( "UCBContent" );
+static const String sRepairPackage = String::CreateFromAscii( "RepairPackage" );
+static const String sDocumentTitle = String::CreateFromAscii( "DocumentTitle" );
+static const String sComponentData = String::CreateFromAscii( "ComponentData" );
+static const String sComponentContext = String::CreateFromAscii( "ComponentContext" );
+static const String sDocumentBaseURL = String::CreateFromAscii( "DocumentBaseURL" );
+static const String sHierarchicalDocumentName = String::CreateFromAscii( "HierarchicalDocumentName" );
+static const String sCopyStreamIfPossible = String::CreateFromAscii( "CopyStreamIfPossible" );
+static const String sNoAutoSave = String::CreateFromAscii( "NoAutoSave" );
+static const String sFolderName = String::CreateFromAscii( "FolderName" );
+static const String sUseSystemDialog = String::CreateFromAscii( "UseSystemDialog" );
+static const String sStandardDir = String::CreateFromAscii( "StandardDir" );
+static const String sBlackList = String::CreateFromAscii( "BlackList" );
void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot )
{
@@ -468,7 +467,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n];
String aName = rProp.Name;
if ( aName == sFrame )
- rSet.Put( SfxUnoAnyItem( SID_FILLFRAME, rProp.Value ) );
+ {
+ Reference< XFrame > xFrame;
+ OSL_VERIFY( rProp.Value >>= xFrame );
+ rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) );
+ }
else
if ( aName == sHidden )
{
@@ -560,11 +563,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
}
else if ( aName == sFrame )
{
- Reference< XFrame > xVal;
- sal_Bool bOK = (rProp.Value >>= xVal);
+ Reference< XFrame > xFrame;
+ sal_Bool bOK = (rProp.Value >>= xFrame);
DBG_ASSERT( bOK, "invalid type for Frame" );
if (bOK)
- rSet.Put( SfxUnoAnyItem( SID_FILLFRAME, rProp.Value ) );
+ rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) );
}
else if ( aName == sAsTemplate )
{
@@ -738,14 +741,6 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_CONTENTTYPE, sVal ) );
}
- else if ( aName == sWindowState )
- {
- ::rtl::OUString sVal;
- sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
- DBG_ASSERT( bOK, "invalid type or value for WindowState" );
- if (bOK)
- rSet.Put( SfxStringItem( SID_WIN_POSSIZE, sVal ) );
- }
else if ( aName == sTemplateName )
{
::rtl::OUString sVal;
@@ -1015,10 +1010,6 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
nAdditional++;
if ( rSet.GetItemState( SID_CONTENTTYPE ) == SFX_ITEM_SET )
nAdditional++;
- if ( rSet.GetItemState( SID_WIN_POSSIZE ) == SFX_ITEM_SET )
- nAdditional++;
- // if ( rSet.GetItemState( SID_VIEW_POS_SIZE ) == SFX_ITEM_SET )
- // nAdditional++;
if ( rSet.GetItemState( SID_POSTDATA ) == SFX_ITEM_SET )
nAdditional++;
if ( rSet.GetItemState( SID_FILLFRAME ) == SFX_ITEM_SET )
@@ -1174,8 +1165,6 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
continue;
if ( nId == SID_CONTENTTYPE )
continue;
- if ( nId == SID_WIN_POSSIZE )
- continue;
if ( nId == SID_TEMPLATE_NAME )
continue;
if ( nId == SID_TEMPLATE_REGIONNAME )
@@ -1392,7 +1381,15 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
if ( rSet.GetItemState( SID_FILLFRAME, sal_False, &pItem ) == SFX_ITEM_SET )
{
pValue[nActProp].Name = sFrame;
- pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+ if ( pItem->ISA( SfxUsrAnyItem ) )
+ {
+ OSL_ENSURE( false, "TransformItems: transporting an XFrame via an SfxUsrAnyItem is not deprecated!" );
+ pValue[nActProp++].Value = static_cast< const SfxUsrAnyItem* >( pItem )->GetValue();
+ }
+ else if ( pItem->ISA( SfxUnoFrameItem ) )
+ pValue[nActProp++].Value <<= static_cast< const SfxUnoFrameItem* >( pItem )->GetFrame();
+ else
+ OSL_ENSURE( false, "TransformItems: invalid item type for SID_FILLFRAME!" );
}
if ( rSet.GetItemState( SID_TEMPLATE, sal_False, &pItem ) == SFX_ITEM_SET )
{
@@ -1497,11 +1494,6 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
pValue[nActProp].Name = sMediaType;
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
- if ( rSet.GetItemState( SID_WIN_POSSIZE, sal_False, &pItem ) == SFX_ITEM_SET )
- {
- pValue[nActProp].Name = sWindowState;
- pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
- }
if ( rSet.GetItemState( SID_TEMPLATE_NAME, sal_False, &pItem ) == SFX_ITEM_SET )
{
pValue[nActProp].Name = sTemplateName;
@@ -1518,12 +1510,6 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
- SFX_ITEMSET_ARG( &rSet, pRectItem, SfxRectangleItem, SID_VIEW_POS_SIZE, sal_False );
- if ( pRectItem )
- {
- DBG_ERROR("PosSizeItem not supported yet!");
- }
-
if ( rSet.GetItemState( SID_CHARSET, sal_False, &pItem ) == SFX_ITEM_SET )
{
pValue[nActProp].Name = sCharacterSet;
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index ecc457760392..294d6ef17da5 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -291,8 +291,6 @@ BOOL SvFileObject::LoadFile_Impl()
aStreamToLoadFrom.m_xInputStreamToLoadFrom,
aStreamToLoadFrom.m_bIsReadOnly);
// setStreamToLoadFrom(0,0);
- // Keinen Eintrag im Roter Button Menu
- xMed->SetDontCreateCancellable();
if( sReferer.Len() )
xMed->SetReferer( sReferer );
@@ -682,9 +680,6 @@ BOOL SvFileObject::IsDataComplete() const
void SvFileObject::CancelTransfers()
{
- if( xMed.Is() )
- xMed->CancelTransfers();
-
// und aus dem Cache austragen, wenn man mitten im Laden ist
if( !bDataReady )
{
@@ -696,11 +691,6 @@ void SvFileObject::CancelTransfers()
}
-void SvFileObject::SetTransferPriority( USHORT )
-{
-}
-
-
void SvFileObject::SendStateChg_Impl( sfx2::LinkManager::LinkState nState )
{
if( !bStateChangeCalled && HasDataLinks() )
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index 58a3c662b92c..50f934a75436 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -88,7 +88,6 @@ public:
virtual BOOL IsDataComplete() const;
void CancelTransfers();
- void SetTransferPriority( USHORT nPrio );
};
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 3f5dcb78a677..ce69ba225157 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -430,16 +430,6 @@ void LinkManager::CancelTransfers()
pFileObj->CancelTransfers();
}
-void LinkManager::SetTransferPriority( sfx2::SvBaseLink& /*rLink*/, USHORT /*nPrio*/ )
-{
-// SvFileObject* pFileObj =
-// (SvFileObject*)SvFileObject::ClassFactory()->
-// CastAndAddRef( rLink.GetObj() );
-// OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & rLink.GetObjType()) ?
-// (SvFileObject*)rLink.GetObj() : 0;
-}
-
-
// um Status Informationen aus dem FileObject an den BaseLink zu
// senden, gibt es eine eigene ClipBoardId. Das SvData-Object hat
// dann die entsprechenden Informationen als String.
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 54add7271ae1..0074faac192f 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -446,7 +446,7 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint )
return;
// ignore hidden documents
- if ( !SfxViewFrame::GetFirst( pDocSh, 0, TRUE ) )
+ if ( !SfxViewFrame::GetFirst( pDocSh, TRUE ) )
return;
::rtl::OUString aTitle = pDocSh->GetTitle(SFX_TITLE_PICKLIST);
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index dcc087767469..24cf7dab8095 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -38,7 +38,7 @@
#include <sfx2/objsh.hxx>
#include <sfx2/app.hxx>
#include "workwin.hxx"
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "arrdecl.hxx"
#include <sfx2/viewfrm.hxx>
#include <sfx2/module.hxx>
@@ -1431,8 +1431,8 @@ sal_Bool SfxWorkWindow::IsPluginMode( SfxObjectShell* pObjShell )
if ( pDispatcher )
{
SfxViewFrame* pFrame = pDispatcher->GetFrame();
- if ( pFrame && pFrame->GetFrame() )
- xFrame = pFrame->GetFrame()->GetFrameInterface();
+ if ( pFrame )
+ xFrame = pFrame->GetFrame().GetFrameInterface();
}
return xFrame;