summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/objserv.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/objserv.cxx')
-rw-r--r--sfx2/source/doc/objserv.cxx55
1 files changed, 19 insertions, 36 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index fb555c5edeec..cf70d0ea41db 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -88,7 +88,7 @@
#include "sfxtypes.hxx"
//#include "interno.hxx"
#include <sfx2/module.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "versdlg.hxx"
#include "doc.hrc"
#include <sfx2/docfac.hxx>
@@ -140,8 +140,6 @@ public:
#define SfxObjectShell
#include "sfxslots.hxx"
-svtools::AsynchronLink* pPendingCloser = 0;
-
//=========================================================================
@@ -283,7 +281,7 @@ void SfxObjectShell::PrintExec_Impl(SfxRequest &rReq)
void SfxObjectShell::PrintState_Impl(SfxItemSet &rSet)
{
bool bPrinting = false;
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst(this, TYPE(SfxTopViewFrame));
+ SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this );
if ( pFrame )
{
SfxPrinter *pPrinter = pFrame->GetViewShell()->GetPrinter();
@@ -391,7 +389,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if ( !pFrame )
return;
- if ( pFrame->GetFrame()->GetParentFrame() )
+ if ( pFrame->GetFrame().GetParentFrame() )
{
pFrame->GetTopViewFrame()->GetObjectShell()->ExecuteSlot( rReq );
return;
@@ -430,28 +428,15 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// collect data for dialog
String aURL, aTitle;
- if ( HasName() && !pImp->aNewName.Len() )
+ if ( HasName() )
{
aURL = GetMedium()->GetName();
aTitle = GetTitle();
}
else
{
- if ( !pImp->aNewName.Len() )
- {
- aURL = DEFINE_CONST_UNICODE( "private:factory/" );
- aURL += String::CreateFromAscii( GetFactory().GetShortName() );
- // aTitle = String( SfxResId( STR_NONAME ) );
- }
- else
- {
- aURL = DEFINE_CONST_UNICODE( "[private:factory/" );
- aURL += String::CreateFromAscii( GetFactory().GetShortName() );
- aURL += DEFINE_CONST_UNICODE( "]" );
- INetURLObject aURLObj( pImp->aNewName );
- aURL += String(aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI ));
- // aTitle = aURLObj.GetBase();
- }
+ aURL = DEFINE_CONST_UNICODE( "private:factory/" );
+ aURL += String::CreateFromAscii( GetFactory().GetShortName() );
aTitle = GetTitle();
}
@@ -542,10 +527,10 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// get statusindicator
uno::Reference< task::XStatusIndicator > xStatusIndicator;
SfxViewFrame *pFrame = GetFrame();
- if ( pFrame && pFrame->GetFrame() )
+ if ( pFrame )
{
uno::Reference< task::XStatusIndicatorFactory > xStatFactory(
- pFrame->GetFrame()->GetFrameInterface(),
+ pFrame->GetFrame().GetFrameInterface(),
uno::UNO_QUERY );
if( xStatFactory.is() )
xStatusIndicator = xStatFactory->createStatusIndicator();
@@ -665,9 +650,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
&& pFilt->GetVersion() >= SOFFICE_FILEFORMAT_60 )
{
SfxViewFrame* pDocViewFrame = SfxViewFrame::GetFirst( this );
- SfxFrame* pDocFrame = pDocViewFrame ? pDocViewFrame->GetFrame() : NULL;
- if ( pDocFrame )
- SfxHelp::OpenHelpAgent( pDocFrame, HID_DID_SAVE_PACKED_XML );
+ if ( pDocViewFrame )
+ SfxHelp::OpenHelpAgent( &pDocViewFrame->GetFrame(), HID_DID_SAVE_PACKED_XML );
}
// the StoreAsURL/StoreToURL method have called this method with false
@@ -731,7 +715,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
case SID_CLOSEDOC:
{
SfxViewFrame *pFrame = GetFrame();
- if ( pFrame && pFrame->GetFrame()->GetParentFrame() )
+ if ( pFrame && pFrame->GetFrame().GetParentFrame() )
{
// Wenn SID_CLOSEDOC "uber Menue etc. ausgef"uhrt wird, das
// aktuelle Dokument aber in einem Frame liegt, soll eigentlich
@@ -746,7 +730,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
pFrame = SfxViewFrame::GetFirst( this );
while ( pFrame )
{
- if ( pFrame->GetFrame()->GetParentFrame() )
+ if ( pFrame->GetFrame().GetParentFrame() )
{
// Auf dieses Dokument existiert noch eine Sicht, die
// in einem FrameSet liegt; diese darf nat"urlich nicht
@@ -765,8 +749,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
pFrame = SfxViewFrame::GetFirst( this );
while ( pFrame )
{
- if ( !pFrame->GetFrame()->GetParentFrame() )
- pFrame->GetFrame()->DoClose();
+ if ( !pFrame->GetFrame().GetParentFrame() )
+ pFrame->GetFrame().DoClose();
pFrame = SfxViewFrame::GetNext( *pFrame, this );
}
}
@@ -940,7 +924,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
pFrame = SfxViewFrame::GetFirst( this );
if ( pFrame )
{
- if ( pFrame->GetFrame()->GetParentFrame() )
+ if ( pFrame->GetFrame().GetParentFrame() )
{
pFrame = pFrame->GetTopViewFrame();
pDoc = pFrame->GetObjectShell();
@@ -973,7 +957,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
{
SfxObjectShell *pDoc = this;
SfxViewFrame *pFrame = GetFrame();
- if ( pFrame && pFrame->GetFrame()->GetParentFrame() )
+ if ( pFrame && pFrame->GetFrame().GetParentFrame() )
{
// Wenn SID_CLOSEDOC "uber Menue etc. ausgef"uhrt wird, das
// aktuelle Dokument aber in einem Frame liegt, soll eigentlich
@@ -1193,7 +1177,7 @@ void SfxObjectShell::StateProps_Impl(SfxItemSet &rSet)
case SID_CLOSING:
{
- rSet.Put( SfxBoolItem( SID_CLOSING, Get_Impl()->bInCloseEvent ) );
+ rSet.Put( SfxBoolItem( SID_CLOSING, false ) );
break;
}
@@ -1218,10 +1202,9 @@ void SfxObjectShell::ExecView_Impl(SfxRequest &rReq)
{
case SID_ACTIVATE:
{
- SfxViewFrame *pFrame =
- SfxViewFrame::GetFirst( this, TYPE(SfxTopViewFrame), TRUE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, TRUE );
if ( pFrame )
- pFrame->GetFrame()->Appear();
+ pFrame->GetFrame().Appear();
rReq.SetReturnValue( SfxObjectItem( 0, pFrame ) );
rReq.Done();
break;