summaryrefslogtreecommitdiff
path: root/sw/source/ui/app
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-04-28 17:52:28 +0200
committerMichael Stahl <mst@openoffice.org>2010-04-28 17:52:28 +0200
commitec28d2f4aa2d449ae4b6dead85675d5c14085cae (patch)
treea8fa537519ab65a917ec15d81b2934202a108a5c /sw/source/ui/app
parentbfe661492df0e45f49c9ad9fc23b36440f6dde03 (diff)
parentb812217fb9701fc0b0bca438668611fc8a10cc10 (diff)
merge DEV300_m77
Diffstat (limited to 'sw/source/ui/app')
-rw-r--r--sw/source/ui/app/appenv.cxx4
-rw-r--r--sw/source/ui/app/apphdl.cxx27
-rw-r--r--sw/source/ui/app/applab.cxx26
-rw-r--r--sw/source/ui/app/docsh.cxx7
-rw-r--r--sw/source/ui/app/docsh2.cxx22
-rw-r--r--sw/source/ui/app/docshini.cxx24
-rw-r--r--sw/source/ui/app/docst.cxx16
-rw-r--r--sw/source/ui/app/makefile.mk1
-rw-r--r--sw/source/ui/app/swmodul1.cxx2
-rw-r--r--sw/source/ui/app/swwait.cxx8
10 files changed, 57 insertions, 80 deletions
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index a35bc90f38f0..ce06c22cfc88 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -191,7 +191,7 @@ static USHORT nTitleNo = 0;
// Neues Dokument erzeugen (kein Show!)
SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
xDocSh->DoInitNew( 0 );
- pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE );
+ pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
pNewView = (SwView*) pFrame->GetViewShell();
pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird.
pSh = pNewView->GetWrtShellPtr();
@@ -501,7 +501,7 @@ static USHORT nTitleNo = 0;
if (nMode == ENV_NEWDOC)
{
- pFrame->GetFrame()->Appear();
+ pFrame->GetFrame().Appear();
if ( rItem.aAddrText.indexOf('<') >= 0 )
{
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index accb052033f6..8d8fc095b5be 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -240,7 +240,7 @@ SwView* lcl_LoadDoc(SwView* pView, const String& rURL)
if( pViewShell->ISA(SwView) )
{
pNewView = PTR_CAST(SwView,pViewShell);
- pNewView->GetViewFrame()->GetFrame()->Appear();
+ pNewView->GetViewFrame()->GetFrame().Appear();
}
else
{
@@ -474,7 +474,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
{
SwView* pTargetView = m_pMMConfig->GetTargetView();
uno::Reference< frame::XFrame > xFrame =
- m_pView->GetViewFrame()->GetFrame()->GetFrameInterface();
+ m_pView->GetViewFrame()->GetFrame().GetFrameInterface();
xFrame->getContainerWindow()->setVisible(sal_False);
DBG_ASSERT(pTargetView, "No target view has been created");
if(pTargetView)
@@ -520,7 +520,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
{
m_pView2Close = pTargetView;
pTargetView->GetViewFrame()->GetTopViewFrame()->GetWindow().Hide();
- pSourceView->GetViewFrame()->GetFrame()->AppearWithUpdate();
+ pSourceView->GetViewFrame()->GetFrame().AppearWithUpdate();
// the current view has be be set when the target is destroyed
m_pView = pSourceView;
m_pMMConfig->SetTargetView(0);
@@ -559,7 +559,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
if(pDocShell->HasName() && !pDocShell->IsModified())
m_pMMConfig->GetSourceView()->GetViewFrame()->DoClose();
else
- m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame()->Appear();
+ m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().Appear();
}
ExecutionFinished( true );
break;
@@ -593,7 +593,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, CancelHdl, AbstractMailMergeWizard*, EMPTY
m_pMMConfig->SetTargetView(0);
}
if(m_pMMConfig->GetSourceView())
- m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame()->AppearWithUpdate();
+ m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().AppearWithUpdate();
m_pMMConfig->Commit();
delete m_pMMConfig;
@@ -959,21 +959,8 @@ void NewXForms( SfxRequest& rReq )
// initialize XForms
static_cast<SwDocShell*>( &xDocSh )->GetDoc()->initXForms( true );
- // put document into frame
- const SfxItemSet* pArgs = rReq.GetArgs();
- DBG_ASSERT( pArgs, "no arguments in SfxRequest");
- if( pArgs != NULL )
- {
- const SfxPoolItem* pFrameItem = NULL;
- pArgs->GetItemState( SID_DOCFRAME, FALSE, &pFrameItem );
- if( pFrameItem != NULL )
- {
- SfxFrame* pFrame =
- static_cast<const SfxFrameItem*>( pFrameItem )->GetFrame();
- DBG_ASSERT( pFrame != NULL, "no frame?" );
- pFrame->InsertDocument( xDocSh );
- }
- }
+ // load document into frame
+ SfxViewFrame::DisplayNewDocument( *xDocSh, rReq );
// set return value
rReq.SetReturnValue( SfxVoidItem( rReq.GetSlot() ) );
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index 311276e26d51..41f055f86050 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -220,25 +220,9 @@ static sal_uInt16 nBCTitleNo = 0;
pDocSh->getIDocumentDeviceAccess()->setJobsetup(pPrt->GetJobSetup());
}
- const SfxItemSet *pArgs = rReq.GetArgs();
- DBG_ASSERT( pArgs, "no arguments in SfxRequest");
- const SfxPoolItem* pFrameItem = 0;
- if(pArgs)
- pArgs->GetItemState(SID_DOCFRAME, FALSE, &pFrameItem);
-
- SfxViewFrame* pFrame = 0;
- if( pFrameItem )
- {
- SfxFrame* pFr = ((const SfxFrameItem*)pFrameItem)->GetFrame();
- xDocSh->PutItem(SfxBoolItem(SID_HIDDEN, TRUE));
- pFr->InsertDocument(xDocSh);
- pFrame = pFr->GetCurrentViewFrame();
- }
- else
- {
- pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE );
- }
- SwView *pNewView = (SwView*) pFrame->GetViewShell();
+ SfxViewFrame* pViewFrame = SfxViewFrame::DisplayNewDocument( *xDocSh, rReq );
+
+ SwView *pNewView = (SwView*) pViewFrame->GetViewShell();
pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird.
// Dokumenttitel setzen
@@ -255,7 +239,7 @@ static sal_uInt16 nBCTitleNo = 0;
}
xDocSh->SetTitle( aTmp );
- pFrame->GetFrame()->Appear();
+ pViewFrame->GetFrame().Appear();
// Shell ermitteln
SwWrtShell *pSh = pNewView->GetWrtShellPtr();
@@ -458,7 +442,7 @@ static sal_uInt16 nBCTitleNo = 0;
if( rItem.bSynchron )
{
- SfxDispatcher* pDisp = pFrame->GetDispatcher();
+ SfxDispatcher* pDisp = pViewFrame->GetDispatcher();
ASSERT(pDisp, "Heute kein Dispatcher am Frame?");
pDisp->Execute(FN_SYNC_LABELS, SFX_CALLMODE_ASYNCHRON);
}
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 3759f3a9cd89..1f932e6a93bd 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -763,6 +763,10 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
if ( pWrtShell )
{
SwWait aWait( *this, TRUE );
+ // --> OD 2009-12-31 #i106906#
+ const sal_Bool bFormerLockView = pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
+ // <--
pWrtShell->StartAllAction();
pWrtShell->Push();
SwWriter aWrt( rMedium, *pWrtShell, TRUE );
@@ -773,6 +777,9 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
{
pWrtShell->Pop(FALSE);
pWrtShell->EndAllAction();
+ // --> OD 2009-12-31 #i106906#
+ pWrtShell->LockView( bFormerLockView );
+ // <--
}
}
else
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index cb8931b0a055..9cb3caffa7cc 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -676,7 +676,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
bOnly = FALSE;
else if( IS_TYPE( SwPagePreView, pTmpFrm->GetViewShell()))
{
- pTmpFrm->GetFrame()->Appear();
+ pTmpFrm->GetFrame().Appear();
bFound = TRUE;
}
if( bFound && !bOnly )
@@ -1027,7 +1027,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
else
{
// Neues Dokument erzeugen.
- SfxViewFrame *pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0 );
+ SfxViewFrame *pFrame = SfxViewFrame::LoadDocument( *xDocSh, 0 );
SwView *pCurrView = (SwView*) pFrame->GetViewShell();
// Dokumenttitel setzen
@@ -1169,18 +1169,6 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
break;
- case SID_MAIL_PREPAREEXPORT:
- {
- //pWrtShell is not set in page preview
- if(pWrtShell)
- pWrtShell->StartAllAction();
- pDoc->UpdateFlds( NULL, false );
- pDoc->EmbedAllLinks();
- pDoc->RemoveInvisibleContent();
- if(pWrtShell)
- pWrtShell->EndAllAction();
- }
- break;
case SID_MAIL_EXPORT_FINISHED:
{
if(pWrtShell)
@@ -1766,15 +1754,15 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
// Currently there can be only one view (layout) if the document is viewed in Web layout
// So if there are more views we are in print layout and for toggling to Web layout all other views must be closed
- SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, 0, FALSE);
+ SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, FALSE);
do {
if( pTmpFrm != pTempView->GetViewFrame() )
{
pTmpFrm->DoClose();
- pTmpFrm = SfxViewFrame::GetFirst(this, 0, FALSE);
+ pTmpFrm = SfxViewFrame::GetFirst(this, FALSE);
}
else
- pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, 0, FALSE);
+ pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, FALSE);
} while ( pTmpFrm );
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx
index 8ed82a935a4d..c201109ca1cb 100644
--- a/sw/source/ui/app/docshini.cxx
+++ b/sw/source/ui/app/docshini.cxx
@@ -39,6 +39,7 @@
#include <svtools/ctrltool.hxx>
#include <unotools/lingucfg.hxx>
#include <sfx2/docfile.hxx>
+#include <sfx2/sfxmodelfactory.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/bindings.hxx>
#include <svl/asiancfg.hxx>
@@ -371,7 +372,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
--------------------------------------------------------------------*/
-SwDocShell::SwDocShell( SfxObjectCreateMode eMode, sal_Bool _bScriptingSupport ) :
+SwDocShell::SwDocShell( SfxObjectCreateMode eMode ) :
SfxObjectShell ( eMode ),
pDoc(0),
pFontList(0),
@@ -382,8 +383,25 @@ SwDocShell::SwDocShell( SfxObjectCreateMode eMode, sal_Bool _bScriptingSupport )
bInUpdateFontList(false)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SwDocShell" );
- if ( !_bScriptingSupport )
- SetHasNoBasic();
+ Init_Impl();
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Ctor / Dtor
+ --------------------------------------------------------------------*/
+
+
+SwDocShell::SwDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
+ SfxObjectShell ( i_nSfxCreationFlags ),
+ pDoc(0),
+ pFontList(0),
+ pView( 0 ),
+ pWrtShell( 0 ),
+ pOLEChildList( 0 ),
+ nUpdateDocMode(document::UpdateDocMode::ACCORDING_TO_CONFIG),
+ bInUpdateFontList(false)
+{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SwDocShell" );
Init_Impl();
}
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 0cf03f803ad3..d06ab31b7478 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -1017,18 +1017,10 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell*
pCurrWrtShell->StartAllAction();
pCurrWrtShell->GetFlyFrmAttr( aSet );
- // JP 10.06.98: nur automatische Orientierungen uebernehmen
-/* #61359# jetzt auch wieder alle Orientierungen
- * const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == aSet.GetItemState( RES_VERT_ORIENT,
- FALSE, &pItem ) &&
- text::VertOrientation::NONE == ((SwFmtVertOrient*)pItem)->GetVertOrient())
- aSet.ClearItem( RES_VERT_ORIENT );
-
- if( SFX_ITEM_SET == aSet.GetItemState( RES_HORI_ORIENT,
- FALSE, &pItem ) &&
- text::HoriOrientation::NONE == ((SwFmtHoriOrient*)pItem)->GetHoriOrient())
- aSet.ClearItem( RES_HORI_ORIENT );*/
+ // --> OD 2009-12-28 #i105535#
+ // no update of anchor attribute
+ aSet.ClearItem( RES_ANCHOR );
+ // <--
pFrm->SetFmtAttr( aSet );
diff --git a/sw/source/ui/app/makefile.mk b/sw/source/ui/app/makefile.mk
index 943f1004eb74..88f9ff9d6398 100644
--- a/sw/source/ui/app/makefile.mk
+++ b/sw/source/ui/app/makefile.mk
@@ -69,6 +69,7 @@ SLOFILES = \
EXCEPTIONSFILES= \
$(SLO)$/docsh.obj \
$(SLO)$/docst.obj \
+ $(SLO)$/docshini.obj \
$(SLO)$/swmodule.obj \
$(SLO)$/swmodul1.obj \
$(SLO)$/apphdl.obj \
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index 97c34c573756..2b3a5df1391b 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -355,7 +355,7 @@ SwChapterNumRules* SwModule::GetChapterNumRules()
void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, BOOL /*bOnlyIfAvailable*/)
{
- Reference<XFrame> xFrame = rView.GetViewFrame()->GetFrame()->GetFrameInterface();
+ Reference<XFrame> xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface();
Reference<XDispatchProvider> xDP(xFrame, uno::UNO_QUERY);
uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame(
diff --git a/sw/source/ui/app/swwait.cxx b/sw/source/ui/app/swwait.cxx
index 0345cd8a6806..4392bdea04ac 100644
--- a/sw/source/ui/app/swwait.cxx
+++ b/sw/source/ui/app/swwait.cxx
@@ -38,25 +38,25 @@
void SwDocShell::EnterWait( BOOL bLockDispatcher )
{
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, 0, FALSE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE );
while ( pFrame )
{
pFrame->GetWindow().EnterWait();
if ( bLockDispatcher )
pFrame->GetDispatcher()->Lock( TRUE );
- pFrame = SfxViewFrame::GetNext( *pFrame, this, 0, FALSE );
+ pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE );
}
}
void SwDocShell::LeaveWait( BOOL bLockDispatcher )
{
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, 0, FALSE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE );
while ( pFrame )
{
pFrame->GetWindow().LeaveWait();
if ( bLockDispatcher )
pFrame->GetDispatcher()->Lock( FALSE );
- pFrame = SfxViewFrame::GetNext( *pFrame, this, 0, FALSE );
+ pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE );
}
}