diff options
author | Michael Stahl <mst@openoffice.org> | 2010-04-28 17:52:28 +0200 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-04-28 17:52:28 +0200 |
commit | 27bf4a7f0b5b4b182ef40553189e040b0a852c38 (patch) | |
tree | 5794315c923f6d1bfcb5bddbe932dd245bca682c /sw/source/ui | |
parent | 5e4d820d2b55adc2f7e5a7e85b466cb77bdf88d6 (diff) | |
parent | 0cb776d2f4613762487a3d6f90e90d1cbd5ff389 (diff) |
merge DEV300_m77
Diffstat (limited to 'sw/source/ui')
69 files changed, 587 insertions, 635 deletions
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx index 4d7c8bf124..3896cbbe0d 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 f88e6dd0be..708d6ceed3 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 c160496ad4..e597547d89 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 560ac9a5af..b80b567ebf 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 f30b77df14..cea9d745d7 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 77e54863dc..4b0e3575a6 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 58d168426a..487d83b6f0 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -546,7 +546,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam } pDStyle->GetCollection()->SetDerivedFrom( pColl ); pDStyle->PresetParent( rParent ); - + //#outline level,add by zhaojianwei /*When a new paragraph style is created based on a "to outline style assigned" paragraph style, the outline level attribute and the list @@ -557,7 +557,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam SwNumRuleItem aItem(aEmptyStr); pDStyle->GetCollection()->SetFmtAttr( aItem ); pDStyle->GetCollection()->SetAttrOutlineLevel( 0 ); - } + } //<-end,zhaojianwei } @@ -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 943f1004eb..88f9ff9d63 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 bd2a42d022..cc3be1a93a 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 46ef17c400..2f484b8eb4 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 ); } } diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 67cd341e3c..907db6eacf 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -241,8 +241,8 @@ SwCharURLPage::SwCharURLPage( Window* pParent, ::FillCharStyleListBox(aNotVisitedLB, pView->GetDocShell()); TargetList* pList = new TargetList; - const SfxFrame* pFrame = pView->GetViewFrame()->GetTopFrame(); - pFrame->GetTargetList(*pList); + const SfxFrame& rFrame = pView->GetViewFrame()->GetTopFrame(); + rFrame.GetTargetList(*pList); USHORT nCount = (USHORT)pList->Count(); if( nCount ) { diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index 3d81942c92..a2573ed3c1 100644..100755 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -952,11 +952,11 @@ StringArray STR_PRINTOPTUI < "Contents"; >; < "Page ba~ckground"; >; < "Specifies whether to include colors and objects that are inserted to the background of the page (Format - Page - Background) in the printed document."; >; - < "~Pictures and objects"; >; + < "P~ictures and other graphic objects"; >; < "Specifies whether the graphics and drawing or OLE objects of your text document are printed"; >; < "Hidden te~xt"; >; < "Enable this option to print text that is marked as hidden."; >; - < "~Text placeholder"; >; + < "~Text placeholders"; >; < "Enable this option to print text placeholders. Disable this option to leave the text placeholders blank in the printout."; >; < "Form control~s"; >; < "Specifies whether the form control fields of the text document are printed"; >; @@ -985,7 +985,7 @@ StringArray STR_PRINTOPTUI < "Select the Brochure option to print the document in brochure format."; >; < "Left-to-right script"; >; < "Right-to-left script"; >; - < "Ranges and copies"; >; + < "Range and copies"; >; < "~All pages"; >; < "Print the whole document."; >; < "Pa~ges"; >; diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 0d79743eb1..c543cf702c 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -580,7 +580,7 @@ void SwAddressListDialog::DetectTablesAndQueries( uno::Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); uno::Reference< XInteractionHandler > xHandler( - xMgr->createInstance( C2U( "com.sun.star.sdb.InteractionHandler" )), UNO_QUERY); + xMgr->createInstance( C2U( "com.sun.star.task.InteractionHandler" )), UNO_QUERY); pUserData->xConnection = SharedConnection( xComplConnection->connectWithCompletion( xHandler ) ); } if(pUserData->xConnection.is()) diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index bd5ebfe8fb..3cdba36e57 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -935,7 +935,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, // create a target docshell to put the merged document into xTargetDocShell = new SwDocShell( SFX_CREATE_MODE_STANDARD ); xTargetDocShell->DoInitNew( 0 ); - SfxViewFrame* pTargetFrame = SfxViewFrame::CreateViewFrame( *xTargetDocShell, 0, TRUE ); + SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); pTargetView = static_cast<SwView*>( pTargetFrame->GetViewShell() ); @@ -1055,7 +1055,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, if (xWorkDocSh->DoLoad(pWorkMed)) { //create a view frame for the document - SfxViewFrame* pWorkFrame = SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, TRUE ); + SfxViewFrame* pWorkFrame = SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 ); //request the layout calculation SwWrtShell& rWorkShell = static_cast< SwView* >(pWorkFrame->GetViewShell())->GetWrtShell(); @@ -1255,6 +1255,9 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, nEndRow = pImpl->pMergeData ? pImpl->pMergeData->xResultSet->getRow() : 0; } while( !bCancel && (bSynchronizedDoc && (nStartRow != nEndRow)? ExistsNextRecord() : ToNextMergeRecord())); + + aPrtMonDlg.Show( FALSE ); + // save the single output document if(rMergeDescriptor.bCreateSingleFile || bAsSingleFile) { @@ -1613,7 +1616,7 @@ uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rData { rxSource.set(xComplConnection,UNO_QUERY); Reference< XInteractionHandler > xHandler( - xMgr->createInstance( C2U( "com.sun.star.sdb.InteractionHandler" )), UNO_QUERY); + xMgr->createInstance( C2U( "com.sun.star.task.InteractionHandler" )), UNO_QUERY); xConnection = xComplConnection->connectWithCompletion( xHandler ); } } @@ -2556,7 +2559,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, pWorkMed->SetFilter( pSfxFlt ); if( xWorkDocSh->DoLoad(pWorkMed) ) { - SfxViewFrame *pFrame = SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, TRUE ); + SfxViewFrame *pFrame = SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 ); SwView *pView = (SwView*) pFrame->GetViewShell(); pView->AttrChangedNotify( &pView->GetWrtShell() );//Damit SelectShell gerufen wird. //set the current DBMgr @@ -2765,7 +2768,7 @@ uno::Reference<XResultSet> SwNewDBMgr::createCursor(const ::rtl::OUString& _sDat if ( xRowSet.is() ) { - uno::Reference< XInteractionHandler > xHandler(xMgr->createInstance(C2U("com.sun.star.sdb.InteractionHandler")), UNO_QUERY); + uno::Reference< XInteractionHandler > xHandler(xMgr->createInstance(C2U("com.sun.star.task.InteractionHandler")), UNO_QUERY); xRowSet->executeWithCompletion(xHandler); } xResultSet = uno::Reference<XResultSet>(xRowSet, UNO_QUERY); @@ -2848,14 +2851,14 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, // create a target docshell to put the merged document into SfxObjectShellRef xTargetDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTargetDocShell->DoInitNew( 0 ); - SfxViewFrame* pTargetFrame = SfxViewFrame::CreateViewFrame( *xTargetDocShell, 0, TRUE ); + SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); //the created window has to be located at the same position as the source window - Window& rTargetWindow = pTargetFrame->GetFrame()->GetWindow(); - Window& rSourceWindow = rSourceView.GetViewFrame()->GetFrame()->GetWindow(); + Window& rTargetWindow = pTargetFrame->GetFrame().GetWindow(); + Window& rSourceWindow = rSourceView.GetViewFrame()->GetFrame().GetWindow(); rTargetWindow.SetPosPixel(rSourceWindow.GetPosPixel()); -// pTargetFrame->GetFrame()->Appear(); +// pTargetFrame->GetFrame().Appear(); SwView* pTargetView = static_cast<SwView*>( pTargetFrame->GetViewShell() ); rMMConfig.SetTargetView(pTargetView); //initiate SelectShell() to create sub shells @@ -2909,7 +2912,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, xWorkDocSh->DoInitNew(); } //create a ViewFrame - SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, sal_True )->GetViewShell() ); + SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 )->GetViewShell() ); SwWrtShell& rWorkShell = pWorkView->GetWrtShell(); pWorkView->AttrChangedNotify( &rWorkShell );//Damit SelectShell gerufen wird. diff --git a/sw/source/ui/dbui/dbui.src b/sw/source/ui/dbui/dbui.src index f85d02090c..8d073412ab 100644 --- a/sw/source/ui/dbui/dbui.src +++ b/sw/source/ui/dbui/dbui.src @@ -83,7 +83,7 @@ ModelessDialog DLG_PRINTMONITOR Pos = MAP_APPFONT ( 6, 17 ) ; Size = MAP_APPFONT ( 100, 8 ) ; CENTER = TRUE ; - Text [ en-US ] = "is being printed on" ; + Text [ en-US ] = "is being prepared for printing on" ; }; FixedText FT_SENDING { diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 33f024ef99..fd601bdfb1 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -307,7 +307,7 @@ void SwMailMergeWizard::CreateTargetDocument() MergeDocuments( m_rConfigItem, *GetSwView() ); m_rConfigItem.SetMergeDone(); if( m_rConfigItem.GetTargetView() ) - m_rConfigItem.GetTargetView()->GetViewFrame()->GetFrame()->Appear(); + m_rConfigItem.GetTargetView()->GetViewFrame()->GetFrame().Appear(); } /*-- 23.08.2004 08:51:36--------------------------------------------------- diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index f2c5cfb3f7..9ede2af8a0 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -692,7 +692,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton) { SfxViewFrame* pSourceViewFrm = pSourceView->GetViewFrame(); uno::Reference< frame::XFrame > xFrame = - pSourceViewFrm->GetFrame()->GetFrameInterface(); + pSourceViewFrm->GetFrame().GetFrameInterface(); xFrame->getContainerWindow()->setVisible(sal_True); pSourceViewFrm->GetDispatcher()->Execute(SID_SAVEDOC, SFX_CALLMODE_SYNCHRON); xFrame->getContainerWindow()->setVisible(sal_False); @@ -855,8 +855,8 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) //now extract a document from the target document SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); - SfxViewFrame* pTempFrame = SfxViewFrame::CreateViewFrame( *xTempDocShell, 0, TRUE ); -// pTempFrame->GetFrame()->Appear(); + SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); +// pTempFrame->GetFrame().Appear(); SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); SwgReaderOption aOpt; @@ -1254,8 +1254,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) //now extract a document from the target document SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); - SfxViewFrame* pTempFrame = SfxViewFrame::CreateViewFrame( *xTempDocShell, 0, TRUE ); -// pTempFrame->GetFrame()->Appear(); + SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); +// pTempFrame->GetFrame().Appear(); SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); SwgReaderOption aOpt; diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index c79e7874dd..ef83dba1a3 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -149,7 +149,7 @@ BOOL SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh, SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pMacroDlg = pFact->CreateSfxDialog( pParent, aSet, - rSh.GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), + rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), SID_EVENTCONFIG ); if ( pMacroDlg && pMacroDlg->Execute() == RET_OK ) { diff --git a/sw/source/ui/dialog/makefile.mk b/sw/source/ui/dialog/makefile.mk index 54b7784946..758ea00fcb 100644 --- a/sw/source/ui/dialog/makefile.mk +++ b/sw/source/ui/dialog/makefile.mk @@ -86,11 +86,7 @@ $(INCCOM)$/swuilib.hxx: makefile.mk $(RM) $@ echo \#define DLL_NAME \"libswui$(DLLPOSTFIX)$(DLLPOST)\" >$@ .ELSE -.IF "$(USE_SHELL)"!="4nt" echo \#define DLL_NAME \"swui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ELSE # "$(USE_SHELL)"!="4nt" - echo #define DLL_NAME "swui$(DLLPOSTFIX)$(DLLPOST)" >$@ -.ENDIF # "$(USE_SHELL)"!="4nt" .ENDIF $(SLO)$/swabstdlg.obj : $(INCCOM)$/swuilib.hxx diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index e96416401e..c2f668c6d5 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -2636,7 +2636,9 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData, if(pFmView) { const OXFormsDescriptor &rDesc = OXFormsTransferable::extractDescriptor(rData); if(0 != (pObj = pFmView->CreateXFormsControl(rDesc))) - rSh.SwFEShell::Insert( *pObj, 0, 0, pDragPt ); + { + rSh.SwFEShell::InsertDrawObj( *pObj, *pDragPt ); + } } } else if( nWh ) @@ -2697,7 +2699,7 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData, if (pFmView && bHaveColumnDescriptor) { if ( 0 != (pObj = pFmView->CreateFieldControl( OColumnTransferable::extractColumnDescriptor(rData) ) ) ) - rSh.SwFEShell::Insert( *pObj, 0, 0, pDragPt ); + rSh.SwFEShell::InsertDrawObj( *pObj, *pDragPt ); } } nRet = 1; @@ -3636,7 +3638,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh ) } else { - // creating a temp. bookmark without undo + // creating a temp. bookmark without undo BOOL bUndo = rSh.DoesUndo(); rSh.DoUndo( FALSE ); BOOL bIsModified = rSh.IsModified(); @@ -3646,7 +3648,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh ) ::rtl::OUString(), ::rtl::OUString(), IDocumentMarkAccess::DDE_BOOKMARK); - if(pMark) + if(pMark) { sName = pMark->GetName(); bDelBookmrk = TRUE; @@ -3754,8 +3756,8 @@ BOOL SwTrnsfrDdeLink::WriteData( SvStream& rStrm ) } ::rtl::OUString sMarkName = pMark->GetName(); - // remove mark - pServerObject->SetNoServer(); // this removes the connection between SwServerObject and mark + // remove mark + pServerObject->SetNoServer(); // this removes the connection between SwServerObject and mark // N.B. ppMark was not loaded from file and cannot have xml:id pMarkAccess->deleteMark(ppMark); diff --git a/sw/source/ui/docvw/docvw.hrc b/sw/source/ui/docvw/docvw.hrc index 998c71401e..ff6e6c4fe0 100644 --- a/sw/source/ui/docvw/docvw.hrc +++ b/sw/source/ui/docvw/docvw.hrc @@ -34,7 +34,7 @@ #define MN_READONLY_OPENURL (RC_DOCVW_BEGIN + 2) #define MN_READONLY_OPENURLNEW (RC_DOCVW_BEGIN + 3) #define MN_READONLY_EDITDOC (RC_DOCVW_BEGIN + 4) -#define MN_READONLY_BROWSE_STOP (RC_DOCVW_BEGIN + 5) + // FREE, formerly known as MN_READONLY_BROWSE_STOP #define MN_READONLY_BROWSE_BACKWARD (RC_DOCVW_BEGIN + 6) #define MN_READONLY_BROWSE_FORWARD (RC_DOCVW_BEGIN + 7) #define MN_READONLY_SELECTION_MODE (RC_DOCVW_BEGIN + 8) diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src index 741d8ea391..1ca8ebf6d8 100644 --- a/sw/source/ui/docvw/docvw.src +++ b/sw/source/ui/docvw/docvw.src @@ -78,12 +78,6 @@ Menu MN_READONLY_POPUP SEPARATOR MenuItem { - Identifier = MN_READONLY_BROWSE_STOP ; - HelpID = SID_BROWSE_STOP ; - Text [ en-US ] = "~Stop" ; - }; - MenuItem - { Identifier = MN_READONLY_BROWSE_BACKWARD ; HelpID = SID_BROWSE_BACKWARD ; Text [ en-US ] = "Backwards" ; diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx index dd406c1cba..8174d81b65 100644 --- a/sw/source/ui/docvw/edtdd.cxx +++ b/sw/source/ui/docvw/edtdd.cxx @@ -515,7 +515,7 @@ IMPL_LINK( SwEditWin, DDHandler, Timer *, EMPTYARG ) ReleaseMouse(); bFrmDrag = FALSE; - if ( rView.GetViewFrame() && rView.GetViewFrame()->GetFrame() ) + if ( rView.GetViewFrame() ) { bExecuteDrag = TRUE; StartExecuteDrag(); diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index b9f6f851df..f299146c02 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -137,6 +137,7 @@ #include <IMark.hxx> #include <doc.hxx> +#include <xmloff/odffields.hxx> #include "PostItMgr.hxx" #include "postit.hxx" @@ -146,14 +147,15 @@ //#define TEST_FOR_BUG91313 #endif +using namespace sw::mark; using namespace ::com::sun::star; /*-------------------------------------------------------------------- - Beschreibung: Globals + Beschreibung: Globals --------------------------------------------------------------------*/ static bool bInputLanguageSwitched = false; -extern BOOL bNoInterrupt; // in mainwn.cxx +extern BOOL bNoInterrupt; // in mainwn.cxx //Normalerweise wird im MouseButtonUp eine Selektion aufgehoben wenn die //Selektion nicht gerade aufgezogen wird. Leider wird im MouseButtonDown @@ -161,27 +163,27 @@ extern BOOL bNoInterrupt; // in mainwn.cxx //komplett abgeschlossen und kann deshalb im Up nicht mehr unterschieden //werden. Um dies Aufzuloese wird bHoldSelection im Down gesetzt und im //Up ausgewertet. -static BOOL bHoldSelection = FALSE; +static BOOL bHoldSelection = FALSE; -BOOL bFrmDrag = FALSE; -BOOL bValidCrsrPos = FALSE; -BOOL bModePushed = FALSE; -BOOL bDDTimerStarted = FALSE; -BOOL bFlushCharBuffer = FALSE; -BOOL SwEditWin::bReplaceQuote = FALSE; -BOOL bDDINetAttr = FALSE; -SdrHdlKind eSdrMoveHdl = HDL_USER; +BOOL bFrmDrag = FALSE; +BOOL bValidCrsrPos = FALSE; +BOOL bModePushed = FALSE; +BOOL bDDTimerStarted = FALSE; +BOOL bFlushCharBuffer = FALSE; +BOOL SwEditWin::bReplaceQuote = FALSE; +BOOL bDDINetAttr = FALSE; +SdrHdlKind eSdrMoveHdl = HDL_USER; -QuickHelpData* SwEditWin::pQuickHlpData = 0; +QuickHelpData* SwEditWin::pQuickHlpData = 0; -long SwEditWin::nDDStartPosY = 0; -long SwEditWin::nDDStartPosX = 0; -Color SwEditWin::aTextBackColor(COL_YELLOW); -Color SwEditWin::aTextColor(COL_RED); -BOOL SwEditWin::bTransparentBackColor = FALSE; // Hintergrund nicht transparent +long SwEditWin::nDDStartPosY = 0; +long SwEditWin::nDDStartPosX = 0; +Color SwEditWin::aTextBackColor(COL_YELLOW); +Color SwEditWin::aTextColor(COL_RED); +BOOL SwEditWin::bTransparentBackColor = FALSE; // Hintergrund nicht transparent -extern BOOL bExecuteDrag; +extern BOOL bExecuteDrag; SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType ); @@ -219,7 +221,7 @@ struct QuickHelpData void Start( SwWrtShell& rSh, USHORT nWrdLen ); void Stop( SwWrtShell& rSh ); - BOOL HasCntnt() const { return aArr.Count() && 0 != nLen; } + BOOL HasCntnt() const { return aArr.Count() && 0 != nLen; } void Inc( BOOL bEndLess ) { @@ -236,7 +238,7 @@ struct QuickHelpData /*-------------------------------------------------------------------- - Beschreibung: Minimale Bewegung Zittern vermeiden + Beschreibung: Minimale Bewegung Zittern vermeiden --------------------------------------------------------------------*/ #define HIT_PIX 2 /* Hit-Toleranz in Pixel */ @@ -272,7 +274,7 @@ inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt ) } /*-------------------------------------------------------------------- - Beschreibung: Pointer umschalten + Beschreibung: Pointer umschalten --------------------------------------------------------------------*/ @@ -289,7 +291,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier ) delete pUserMarker; pUserMarker = 0L; } -// rSh.SwCrsrShell::UnSetVisCrsr( rLPt ); +// rSh.SwCrsrShell::UnSetVisCrsr( rLPt ); eStyle = POINTER_NOTALLOWED; } else @@ -362,7 +364,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier ) // Removed ExecHyperlink option. //BOOL bExecHyperlinks = rSh.GetViewOptions()->IsExecHyperlinks() ^ - // (nModifier == KEY_MOD2 ? TRUE : FALSE); + // (nModifier == KEY_MOD2 ? TRUE : FALSE); BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly(); if ( !bExecHyperlinks ) { @@ -574,7 +576,7 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG ) if( aOldVis == rVisArea && !rSh.IsStartOfDoc() && !rSh.IsEndOfDoc() ) { //JP 11.10.2001 Bug 72294 - take the center point of VisArea to - // decide in which direction the user want. + // decide in which direction the user want. if( aModPt.Y() < ( rVisArea.Top() + rVisArea.Height() / 2 ) ) rSh.Up( TRUE, 1 ); else @@ -628,7 +630,7 @@ inline void SwEditWin::EnterArea() } /*------------------------------------------------------------------------ - Beschreibung: Modus fuer Rahmen einfuegen + Beschreibung: Modus fuer Rahmen einfuegen ------------------------------------------------------------------------*/ @@ -645,7 +647,7 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect ) { SetSdrDrawMode( eSdrObjectKind ); -/* if (GetDrawFuncPtr()) +/* if (GetDrawFuncPtr()) GetDrawFuncPtr()->Deactivate();*/ if (bObjSelect) @@ -658,7 +660,7 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect ) if (bObjSelect) rView.GetDrawFuncPtr()->Activate( SID_OBJECT_SELECT ); else - rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< USHORT >(eSdrObjectKind) ); // don't know if this is useful at all; but it keeps functionality as it was... + rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< USHORT >(eSdrObjectKind) ); // don't know if this is useful at all; but it keeps functionality as it was... bInsFrm = FALSE; nInsFrmColCount = 1; } @@ -672,7 +674,7 @@ void SwEditWin::StopInsFrm() rView.GetDrawFuncPtr()->Deactivate(); rView.SetDrawFuncPtr(NULL); } - rView.LeaveDrawCreate(); // Konstruktionsmode verlassen + rView.LeaveDrawCreate(); // Konstruktionsmode verlassen bInsFrm = FALSE; nInsFrmColCount = 1; } @@ -709,7 +711,7 @@ BOOL SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const SwPa /*-------------------------------------------------------------------- - Beschreibung: Der Character Buffer wird in das Dokument eingefuegt + Beschreibung: Der Character Buffer wird in das Dokument eingefuegt --------------------------------------------------------------------*/ @@ -798,7 +800,7 @@ void SwEditWin::FlushInBuffer() ++nTmpPos; } } - aInBuffer = aNewText.copy( aOldText.getLength() ); // copy new text to be inserted to buffer + aInBuffer = aNewText.copy( aOldText.getLength() ); // copy new text to be inserted to buffer } } @@ -1240,7 +1242,7 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) } /*-------------------------------------------------------------------- - Beschreibung: KeyEvents + Beschreibung: KeyEvents --------------------------------------------------------------------*/ @@ -1373,7 +1375,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) if( pMacro ) { String sRet; - SbxArrayRef xArgs = new SbxArray; + SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; xVar->PutString( pFlyFmt->GetName() ); xArgs->Put( &xVar, 1 ); @@ -1491,12 +1493,12 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) switch( eKeyState ) { case KS_CheckKey: - eKeyState = KS_KeyToView; // default weiter zur View + eKeyState = KS_KeyToView; // default weiter zur View #ifdef DBG_UTIL //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // JP 19.01.99: zum Umschalten des Cursor Verhaltens in ReadOnly - // Bereichen + // Bereichen if( 0x7210 == rKeyCode.GetFullCode() ) rSh.SetReadOnlyAvailable( !rSh.IsReadOnlyAvailable() ); else @@ -1509,7 +1511,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) !rSh.HasReadonlySel() ) { // in der Tabelle am Anfang der Zelle ein '=' -> - // EditZeile aufrufen (F2-Funktionalitaet) + // EditZeile aufrufen (F2-Funktionalitaet) rSh.Push(); if( !rSh.MoveSection( fnSectionCurr, fnSectionStart) && !rSh.IsTableBoxTextFormat() ) @@ -1582,12 +1584,12 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) eFlyState = KS_Fly_Change; nDir = MOVE_DOWN_SMALL; goto KEYINPUT_CHECKTABLE; -// case KEY_UP | KEY_MOD2 | KEY_SHIFT: -// eKeyState = KS_ColTopBig; -// goto KEYINPUT_CHECKTABLE; -// case KEY_DOWN | KEY_MOD2 | KEY_SHIFT: -// eKeyState = KS_ColTopSmall; -// goto KEYINPUT_CHECKTABLE; +// case KEY_UP | KEY_MOD2 | KEY_SHIFT: +// eKeyState = KS_ColTopBig; +// goto KEYINPUT_CHECKTABLE; +// case KEY_DOWN | KEY_MOD2 | KEY_SHIFT: +// eKeyState = KS_ColTopSmall; +// goto KEYINPUT_CHECKTABLE; case KEY_UP | KEY_MOD2 | KEY_MOD1: eKeyState = KS_CellBottomSmall; @@ -1733,7 +1735,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } break; - case KEY_RETURN: // Return + case KEY_RETURN: // Return if( !rSh.HasReadonlySel() ) { const int nSelectionType = rSh.GetSelectionType(); @@ -1769,7 +1771,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } break; - case KEY_RETURN | KEY_MOD2: // ALT-Return + case KEY_RETURN | KEY_MOD2: // ALT-Return if( !rSh.HasReadonlySel() && !rSh.IsSttPara() && rSh.GetCurNumRule() ) eKeyState = KS_NoNum; else if( rSh.CanSpecialInsert() ) @@ -1979,8 +1981,8 @@ KEYINPUT_CHECKTABLE_INSDEL: if( rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) { SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); - //if( pColl && 0 < pColl->GetOutlineLevel() && //#outline level,zhaojianwei - // MAXLEVEL - 1 >= pColl->GetOutlineLevel() ) + //if( pColl && 0 < pColl->GetOutlineLevel() && //#outline level,zhaojianwei + // MAXLEVEL - 1 >= pColl->GetOutlineLevel() ) if( pColl && pColl->IsAssignedToListLevelOfOutlineStyle() && 0 < pColl->GetAssignedOutlineStyleLevel()) @@ -2132,7 +2134,7 @@ KEYINPUT_CHECKTABLE_INSDEL: else { // OS 22.09.95: Da der Sfx Acceleratoren nur aufruft, wenn sie beim letzten -// Statusupdate enabled wurden, muss copy ggf. von uns +// Statusupdate enabled wurden, muss copy ggf. von uns // 'gewaltsam' gerufen werden. if( rKeyCode.GetFunction() == KEYFUNC_COPY ) GetView().GetViewFrame()->GetBindings().Execute(SID_COPY); @@ -2204,7 +2206,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } break; case KS_InsTab: - if( rView.ISA( SwWebView )) //Kein Tabulator fuer Web! + if( rView.ISA( SwWebView )) //Kein Tabulator fuer Web! { // Bug 56196 - dann sollte der weiter gereicht werden. Window::KeyInput( aKeyEvent ); @@ -2298,7 +2300,7 @@ KEYINPUT_CHECKTABLE_INSDEL: else { InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute(); - // ??? Window::KeyInput( aKeyEvent ); + // ??? Window::KeyInput( aKeyEvent ); eKeyState = KS_Ende; } break; @@ -2311,6 +2313,12 @@ KEYINPUT_CHECKTABLE_INSDEL: ChgToEnEmDash | SetINetAttr | Autocorrect ) && !rSh.HasReadonlySel() ) + /* { + pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | + ChgFractionSymbol | ChgOrdinalNumber | + ChgToEnEmDash | SetINetAttr | + Autocorrect ) && + !rSh.HasReadonlySel() ) */ { FlushInBuffer(); rSh.AutoCorrect( *pACorr, static_cast< sal_Unicode >('\0') ); @@ -2323,8 +2331,8 @@ KEYINPUT_CHECKTABLE_INSDEL: { USHORT nSlotId = 0; FlushInBuffer(); -//??? if( bFlushCharBuffer ) -//??? FlushInBuffer( &rSh ); +//??? if( bFlushCharBuffer ) +//??? FlushInBuffer( &rSh ); switch( eKeyState ) { case KS_SpecialInsert: @@ -2400,8 +2408,8 @@ KEYINPUT_CHECKTABLE_INSDEL: rSh.SplitNode( TRUE ); break; -// case KS_NumOrNoNum: -// break; +// case KS_NumOrNoNum: +// break; case KS_NextObject: case KS_PrevObject: if(rSh.GotoObj( KS_NextObject == eKeyState, GOTOOBJ_GOTO_ANY)) @@ -2467,40 +2475,40 @@ KEYINPUT_CHECKTABLE_INSDEL: } break; - case KS_ColLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; - case KS_ColRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; - case KS_ColLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTblHMove() ); break; - case KS_ColRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTblHMove() ); break; -// case KS_ColTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; - case KS_ColBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; -// case KS_ColTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP, pModOpt->GetTblVMove() ); break; - case KS_ColBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTblVMove() ); break; - case KS_CellLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; - case KS_CellRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; - case KS_CellLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_LEFT, pModOpt->GetTblHMove() ); break; - case KS_CellRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_RIGHT, pModOpt->GetTblHMove() ); break; - case KS_CellTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; - case KS_CellBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; - case KS_CellTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_TOP, pModOpt->GetTblVMove() ); break; - case KS_CellBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_BOTTOM, pModOpt->GetTblVMove() ); break; + case KS_ColLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; + case KS_ColRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; + case KS_ColLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTblHMove() ); break; + case KS_ColRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTblHMove() ); break; +// case KS_ColTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; + case KS_ColBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; +// case KS_ColTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP, pModOpt->GetTblVMove() ); break; + case KS_ColBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTblVMove() ); break; + case KS_CellLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; + case KS_CellRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; + case KS_CellLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_LEFT, pModOpt->GetTblHMove() ); break; + case KS_CellRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_RIGHT, pModOpt->GetTblHMove() ); break; + case KS_CellTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; + case KS_CellBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; + case KS_CellTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_TOP, pModOpt->GetTblVMove() ); break; + case KS_CellBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_BOTTOM, pModOpt->GetTblVMove() ); break; //--------------- - case KS_InsDel_ColLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_ColRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_ColLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_ColRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_ColTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_ColBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_ColTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_TOP, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_ColBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_CellLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_CellRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_CellLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_LEFT, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_CellRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_RIGHT, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_CellTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_CellBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_CellTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_TOP, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_CellBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_BOTTOM, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_ColLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_ColRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_ColLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_ColRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_ColTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_ColBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_ColTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_TOP, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_ColBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_CellLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_CellRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_CellLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_LEFT, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_CellRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_RIGHT, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_CellTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_CellBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_CellTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_TOP, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_CellBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_BOTTOM, pModOpt->GetTblVInsert() ); break; //--------------- case KS_TblColCellInsDel: rSh.SetColRowWidthHeight( eTblChgMode, nTblChgSize ); @@ -2558,7 +2566,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } /*-------------------------------------------------------------------- - Beschreibung: MouseEvents + Beschreibung: MouseEvents --------------------------------------------------------------------*/ @@ -2639,7 +2647,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) pQuickHlpData->bChkInsBlank = FALSE; if( rSh.FinishOLEObj() ) - return; //InPlace beenden und der Klick zaehlt nicht mehr + return; //InPlace beenden und der Klick zaehlt nicht mehr SET_CURR_SHELL( &rSh ); @@ -3240,7 +3248,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } } else - { if ( rSh.SelectObj( aDocPos ) ) + { if ( rSh.SelectObj( aDocPos ) ) { rSh.EnterSelFrmMode( &aDocPos ); SwEditWin::nDDStartPosY = aDocPos.Y(); @@ -3339,7 +3347,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) int nTmpSetCrsr = 0; - { // nur temp. Move-Kontext aufspannen, da sonst die + { // nur temp. Move-Kontext aufspannen, da sonst die // Abfrage auf die Inhaltsform nicht funktioniert!!! MV_KONTEXT( &rSh ); nTmpSetCrsr = (rSh.*rSh.fnSetCrsr)(&aDocPos,bOnlyText); @@ -3356,11 +3364,16 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bNoInterrupt = bTmpNoInterrupt; } - if( !bOverURLGrf && !bOnlyText ) + if ( !bOverURLGrf && !bOnlyText ) { const int nSelType = rSh.GetSelectionType(); - if( nSelType == nsSelectionType::SEL_OLE || - nSelType == nsSelectionType::SEL_GRF ) + // --> OD 2009-12-30 #i89920# + // Check in general, if an object is selectable at given position. + // Thus, also text fly frames in background become selectable via Ctrl-Click. + if ( nSelType & nsSelectionType::SEL_OLE || + nSelType & nsSelectionType::SEL_GRF || + rSh.IsObjSelectable( aDocPos ) ) + // <-- { MV_KONTEXT( &rSh ); if( !rSh.IsFrmSelected() ) @@ -3372,8 +3385,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // nicht mehr hier zuruecksetzen, damit -- falls durch MouseMove // bei gedrueckter Ctrl-Taste eine Mehrfachselektion erfolgen soll, // im Drag nicht die vorherige Selektion aufgehoben wird. -// if(bModePushed) -// rSh.PopMode(FALSE); +// if(bModePushed) +// rSh.PopMode(FALSE); break; } } @@ -3383,7 +3396,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } /*-------------------------------------------------------------------- - Beschreibung: MouseMove + Beschreibung: MouseMove --------------------------------------------------------------------*/ @@ -3471,7 +3484,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) Point aDD( SwEditWin::nDDStartPosX, SwEditWin::nDDStartPosY ); aDD = LogicToPixel( aDD ); Rectangle aRect( aDD.X()-3, aDD.Y()-3, aDD.X()+3, aDD.Y()+3 ); - if ( !aRect.IsInside( aPixPt ) ) // MA 23. May. 95: Tatterschutz. + if ( !aRect.IsInside( aPixPt ) ) // MA 23. May. 95: Tatterschutz. StopDDTimer( &rSh, aDocPt ); } @@ -3608,10 +3621,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) pAnchorMarker->ChgHdl( pHdl ); if( aNew.X() || aNew.Y() ) { - pAnchorMarker->SetPos( aNew ); - pAnchorMarker->SetLastPos( aDocPt ); - //OLMpSdrView->RefreshAllIAOManagers(); - } + pAnchorMarker->SetPos( aNew ); + pAnchorMarker->SetLastPos( aDocPt ); + //OLMpSdrView->RefreshAllIAOManagers(); + } } else { @@ -3661,7 +3674,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) // geht es los? if( HDL_USER == eSdrMoveHdl ) { - SdrHdl* pHdl = pSdrView->PickHandle( aSttPt ); + SdrHdl* pHdl = pSdrView->PickHandle( aSttPt ); eSdrMoveHdl = pHdl ? pHdl->GetKind() : HDL_MOVE; } @@ -3673,14 +3686,14 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) 0 != ( pMacro = pFlyFmt->GetMacro().GetMacroTable(). Get( nEvent )) && // oder nur z.B. alle 20 Twip bescheid sagen? -// ( 20 > Abs( aRszMvHdlPt.X() - aDocPt.X() ) || -// 20 > Abs( aRszMvHdlPt.Y() - aDocPt.Y() ) ) +// ( 20 > Abs( aRszMvHdlPt.X() - aDocPt.X() ) || +// 20 > Abs( aRszMvHdlPt.Y() - aDocPt.Y() ) ) aRszMvHdlPt != aDocPt ) { aRszMvHdlPt = aDocPt; USHORT nPos = 0; String sRet; - SbxArrayRef xArgs = new SbxArray; + SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; xVar->PutString( pFlyFmt->GetName() ); xArgs->Put( &xVar, ++nPos ); @@ -3893,7 +3906,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) } /*-------------------------------------------------------------------- - Beschreibung: Button Up + Beschreibung: Button Up --------------------------------------------------------------------*/ @@ -3910,7 +3923,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) DELETEZ( pRowColumnSelectionStart ); SdrHdlKind eOldSdrMoveHdl = eSdrMoveHdl; - eSdrMoveHdl = HDL_USER; // fuer die MoveEvents - wieder zuruecksetzen + eSdrMoveHdl = HDL_USER; // fuer die MoveEvents - wieder zuruecksetzen // sicherheitshalber zuruecksetzen Bug 27900 rView.SetTabColFromDoc( FALSE ); @@ -3933,9 +3946,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( !bMBPressed ) { // OS 25.02.97 Undo fuer die Giesskann ist bereits im CommandHdl -//JP 29.09.95: so sollte es sein!!! if(pApplyTempl->bUndo) -// if( pApplyTempl && MOUSE_RIGHT == rMEvt.GetModifier() + rMEvt.GetButtons() ) -// rSh.Do( SwWrtShell::UNDO ); +//JP 29.09.95: so sollte es sein!!! if(pApplyTempl->bUndo) +// if( pApplyTempl && MOUSE_RIGHT == rMEvt.GetModifier() + rMEvt.GetButtons() ) +// rSh.Do( SwWrtShell::UNDO ); return; } @@ -3967,7 +3980,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { if ( rView.GetDrawFuncPtr()->MouseButtonUp( rMEvt ) ) { - if (rView.GetDrawFuncPtr()) // Koennte im MouseButtonUp zerstoert worden sein + if (rView.GetDrawFuncPtr()) // Koennte im MouseButtonUp zerstoert worden sein { rView.GetDrawFuncPtr()->Deactivate(); @@ -4001,7 +4014,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rView.AttrChangedNotify( &rSh ); } else if (rMEvt.GetButtons() == MOUSE_RIGHT && rSh.IsDrawCreate()) - rView.GetDrawFuncPtr()->BreakCreate(); // Zeichnen abbrechen + rView.GetDrawFuncPtr()->BreakCreate(); // Zeichnen abbrechen bNoInterrupt = FALSE; ReleaseMouse(); @@ -4076,7 +4089,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) const Point aSttPt( PixelToLogic( aStartPos ) ); aRszMvHdlPt = aDocPt; USHORT nPos = 0; - SbxArrayRef xArgs = new SbxArray; + SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; xVar->PutString( pFlyFmt->GetName() ); xArgs->Put( &xVar, ++nPos ); @@ -4127,7 +4140,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if( bHoldSelection ) { //JP 27.04.99: Bug 65389 - das EndDrag sollte auf jedenfall - // gerufen werden. + // gerufen werden. bHoldSelection = FALSE; (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE ); } @@ -4137,7 +4150,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { const BOOL bTmpNoInterrupt = bNoInterrupt; bNoInterrupt = FALSE; - { // nur temp. Move-Kontext aufspannen, da sonst die + { // nur temp. Move-Kontext aufspannen, da sonst die // Abfrage auf die Inhaltsform nicht funktioniert!!! MV_KONTEXT( &rSh ); const Point aDocPos( PixelToLogic( aStartPos ) ); @@ -4153,7 +4166,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) // Internetfield? --> Link-Callen (DocLaden!!) //JP 18.10.96: Bug 32437 - -// if( !rSh.HasSelection() ) +// if( !rSh.HasSelection() ) if( !bInSel ) { USHORT nFilter = URLLOAD_NOFILTER; @@ -4177,7 +4190,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) SwContentAtPos aCntntAtPos( SwContentAtPos::SW_CLICKFIELD | SwContentAtPos::SW_INETATTR | - SwContentAtPos::SW_SMARTTAG ); + SwContentAtPos::SW_SMARTTAG | SwContentAtPos::SW_FORMCTRL); if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, TRUE ) ) { @@ -4198,6 +4211,29 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( bExecSmarttags && SwSmartTagMgr::Get().IsSmartTagsEnabled() ) rView.ExecSmartTagPopup( aDocPt ); } + else if ( SwContentAtPos::SW_FORMCTRL == aCntntAtPos.eCntntAtPos ) + { + ASSERT( aCntntAtPos.aFnd.pFldmark != NULL, "where is my field ptr???"); + if ( aCntntAtPos.aFnd.pFldmark != NULL) + { + IFieldmark *fieldBM = const_cast< IFieldmark* > ( aCntntAtPos.aFnd.pFldmark ); + //SwDocShell* pDocSh = rView.GetDocShell(); + //SwDoc *pDoc=pDocSh->GetDoc(); + if (fieldBM->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ) ) + { + ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(fieldBM); + pCheckboxFm->SetChecked(!pCheckboxFm->IsChecked()); + pCheckboxFm->Invalidate(); + rSh.InvalidateWindows( rView.GetVisArea() ); + } else if (fieldBM->GetFieldname().equalsAscii( ODF_FORMDROPDOWN) ) { + rView.ExecFieldPopup( aDocPt, fieldBM ); + fieldBM->Invalidate(); + rSh.InvalidateWindows( rView.GetVisArea() ); + } else { + // unknown type.. + } + } + } else // if ( SwContentAtPos::SW_INETATTR == aCntntAtPos.eCntntAtPos ) { if ( bExecHyperlinks ) @@ -4436,7 +4472,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) /*-------------------------------------------------------------------- - Beschreibung: Vorlage anwenden + Beschreibung: Vorlage anwenden --------------------------------------------------------------------*/ @@ -4491,7 +4527,7 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl) } /*-------------------------------------------------------------------- - Beschreibung: ctor + Beschreibung: ctor --------------------------------------------------------------------*/ @@ -4550,7 +4586,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView): aTemplateTimer.SetTimeoutHdl(LINK(this, SwEditWin, TemplateTimerHdl)); //JP 16.12.98: temporaere Loesung!!! Sollte bei jeder Cursorbewegung - // den Font von der akt. einfuege Position setzen! + // den Font von der akt. einfuege Position setzen! if( !rMyView.GetDocShell()->IsReadOnly() ) { Font aFont; @@ -4582,7 +4618,7 @@ SwEditWin::~SwEditWin() /****************************************************************************** - * Beschreibung: DrawTextEditMode einschalten + * Beschreibung: DrawTextEditMode einschalten ******************************************************************************/ @@ -4602,7 +4638,7 @@ void SwEditWin::EnterDrawTextMode( const Point& aDocPos ) } /****************************************************************************** - * Beschreibung: DrawMode einschalten + * Beschreibung: DrawMode einschalten ******************************************************************************/ @@ -4612,7 +4648,7 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos) SwWrtShell &rSh = rView.GetWrtShell(); SdrView *pSdrView = rSh.GetDrawView(); -// if ( GetDrawFuncPtr() && (aActHitType == SDRHIT_NONE || rSh.IsDrawCreate()) ) +// if ( GetDrawFuncPtr() && (aActHitType == SDRHIT_NONE || rSh.IsDrawCreate()) ) if ( rView.GetDrawFuncPtr() ) { if (rSh.IsDrawCreate()) @@ -4647,19 +4683,19 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos) } /****************************************************************************** - * Beschreibung: + * Beschreibung: ******************************************************************************/ BOOL SwEditWin::IsDrawSelMode() { -// return (IsFrmAction() == FALSE && GetSdrDrawMode() == OBJ_NONE); +// return (IsFrmAction() == FALSE && GetSdrDrawMode() == OBJ_NONE); return IsObjectSelect(); } /****************************************************************************** - * Beschreibung: + * Beschreibung: ******************************************************************************/ @@ -4676,7 +4712,7 @@ void SwEditWin::GetFocus() } /****************************************************************************** - * Beschreibung: + * Beschreibung: ******************************************************************************/ @@ -4691,7 +4727,7 @@ void SwEditWin::LoseFocus() } /****************************************************************************** - * Beschreibung: + * Beschreibung: ******************************************************************************/ @@ -4700,7 +4736,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) { SwWrtShell &rSh = rView.GetWrtShell(); - if ( !rView.GetViewFrame() || !rView.GetViewFrame()->GetFrame() ) + if ( !rView.GetViewFrame() ) { //Wenn der ViewFrame in Kuerze stirbt kein Popup mehr! Window::Command(rCEvt); @@ -4720,7 +4756,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) return; } - BOOL bCallBase = TRUE; + BOOL bCallBase = TRUE; switch ( rCEvt.GetCommand() ) { @@ -4818,32 +4854,32 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) switch ( pCData->GetCommand() ) { - case DICTATIONCOMMAND_NEWPARAGRAPH: nSlotId = FN_INSERT_BREAK; break; - case DICTATIONCOMMAND_NEWLINE: nSlotId = FN_INSERT_LINEBREAK; break; - case DICTATIONCOMMAND_LEFT: nSlotId = FN_PREV_WORD; break; - case DICTATIONCOMMAND_RIGHT: nSlotId = FN_NEXT_WORD; break; - case DICTATIONCOMMAND_UP: nSlotId = FN_LINE_UP; break; - case DICTATIONCOMMAND_DOWN: nSlotId = FN_LINE_DOWN; break; - case DICTATIONCOMMAND_UNDO: nSlotId = SID_UNDO; break; - case DICTATIONCOMMAND_REPEAT: nSlotId = SID_REPEAT; break; - case DICTATIONCOMMAND_DEL: nSlotId = FN_DELETE_BACK_WORD; break; - - case DICTATIONCOMMAND_BOLD_ON: nSlotId = SID_ATTR_CHAR_WEIGHT; + case DICTATIONCOMMAND_NEWPARAGRAPH: nSlotId = FN_INSERT_BREAK; break; + case DICTATIONCOMMAND_NEWLINE: nSlotId = FN_INSERT_LINEBREAK; break; + case DICTATIONCOMMAND_LEFT: nSlotId = FN_PREV_WORD; break; + case DICTATIONCOMMAND_RIGHT: nSlotId = FN_NEXT_WORD; break; + case DICTATIONCOMMAND_UP: nSlotId = FN_LINE_UP; break; + case DICTATIONCOMMAND_DOWN: nSlotId = FN_LINE_DOWN; break; + case DICTATIONCOMMAND_UNDO: nSlotId = SID_UNDO; break; + case DICTATIONCOMMAND_REPEAT: nSlotId = SID_REPEAT; break; + case DICTATIONCOMMAND_DEL: nSlotId = FN_DELETE_BACK_WORD; break; + + case DICTATIONCOMMAND_BOLD_ON: nSlotId = SID_ATTR_CHAR_WEIGHT; pItem = new SvxWeightItem( WEIGHT_BOLD, RES_CHRATR_WEIGHT ); break; - case DICTATIONCOMMAND_BOLD_OFF: nSlotId = SID_ATTR_CHAR_WEIGHT; + case DICTATIONCOMMAND_BOLD_OFF: nSlotId = SID_ATTR_CHAR_WEIGHT; pItem = new SvxWeightItem( WEIGHT_NORMAL, RES_CHRATR_WEIGHT ); break; - case DICTATIONCOMMAND_UNDERLINE_ON: nSlotId = SID_ATTR_CHAR_UNDERLINE; + case DICTATIONCOMMAND_UNDERLINE_ON: nSlotId = SID_ATTR_CHAR_UNDERLINE; pItem = new SvxUnderlineItem( UNDERLINE_SINGLE, RES_CHRATR_WEIGHT ); break; case DICTATIONCOMMAND_UNDERLINE_OFF:nSlotId = SID_ATTR_CHAR_UNDERLINE; pItem = new SvxUnderlineItem( UNDERLINE_NONE, RES_CHRATR_UNDERLINE ); break; - case DICTATIONCOMMAND_ITALIC_ON: nSlotId = SID_ATTR_CHAR_POSTURE; + case DICTATIONCOMMAND_ITALIC_ON: nSlotId = SID_ATTR_CHAR_POSTURE; pItem = new SvxPostureItem( ITALIC_NORMAL, RES_CHRATR_POSTURE ); break; - case DICTATIONCOMMAND_ITALIC_OFF: nSlotId = SID_ATTR_CHAR_POSTURE; + case DICTATIONCOMMAND_ITALIC_OFF: nSlotId = SID_ATTR_CHAR_POSTURE; pItem = new SvxPostureItem( ITALIC_NONE, RES_CHRATR_POSTURE ); break; case DICTATIONCOMMAND_NUMBERING_ON: @@ -5457,13 +5493,13 @@ void SwEditWin::SetChainMode( BOOL bOn ) uno::Reference< ::com::sun::star::accessibility::XAccessible > SwEditWin::CreateAccessible() { - vos::OGuard aGuard(Application::GetSolarMutex()); // this should have + vos::OGuard aGuard(Application::GetSolarMutex()); // this should have // happend already!!! SwWrtShell *pSh = rView.GetWrtShellPtr(); ASSERT( pSh, "no writer shell, no accessible object" ); uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc; - if( pSh ) + if( pSh ) xAcc = pSh->CreateAccessible(); return xAcc; @@ -5476,7 +5512,7 @@ void QuickHelpData::Move( QuickHelpData& rCpy ) // Pointer verschieben aArr.Insert( &rCpy.aArr ); rCpy.aArr.Remove( (USHORT)0, rCpy.aArr.Count() ); -// nTipId = rCpy.nTipId; +// nTipId = rCpy.nTipId; bClear = rCpy.bClear; nLen = rCpy.nLen; nCurArrPos = rCpy.nCurArrPos; @@ -5572,8 +5608,8 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord ) if( rWord.Len() + 1 < sStr.Len() && //!!! UNICODE: fehlendes interface -// pIntl->CompareEqual( rWord, sStr.Copy( 0, rWord.Len() ), -// INTN_COMPARE_IGNORECASE ) ) +// pIntl->CompareEqual( rWord, sStr.Copy( 0, rWord.Len() ), +// INTN_COMPARE_IGNORECASE ) ) COMPARE_EQUAL == rWord.CompareIgnoreCaseToAscii( sStr, rWord.Len() )) { @@ -5596,8 +5632,8 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord ) { const String& rS = rACLst[ nStt ]; //JP 16.06.99: Bug 66927 - only if the count of chars - // from the suggest greater as the - // actual word + // from the suggest greater as the + // actual word if( rS.Len() > rWord.Len() ) { String* pNew = new String( rS ); diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx index 44bf3263a9..363a653670 100644 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -117,7 +117,6 @@ #include <sw_primitivetypes2d.hxx> #include <drawinglayer/primitive2d/primitivetools2d.hxx> -#include <drawinglayer/attribute/fillattribute.hxx> #include <drawinglayer/primitive2d/fillgradientprimitive2d.hxx> #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx index afee05ee46..b412c7a88a 100644 --- a/sw/source/ui/docvw/romenu.cxx +++ b/sw/source/ui/docvw/romenu.cxx @@ -214,7 +214,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : else EnableItem( MN_READONLY_LOADGRAPHIC, FALSE ); - BOOL bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame()->GetParentFrame(); + BOOL bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame(); EnableItem( MN_READONLY_RELOAD_FRAME, bReloadFrame ); EnableItem( MN_READONLY_RELOAD, !bReloadFrame); @@ -222,7 +222,6 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : Check( MN_READONLY_EDITDOC, SID_EDITDOC, rDis ); Check( MN_READONLY_SELECTION_MODE, FN_READONLY_SELECTION_MODE, rDis ); Check( MN_READONLY_SOURCEVIEW, SID_SOURCEVIEW, rDis ); - Check( MN_READONLY_BROWSE_STOP, SID_BROWSE_STOP, rDis ); Check( MN_READONLY_BROWSE_BACKWARD, SID_BROWSE_BACKWARD,rDis ); Check( MN_READONLY_BROWSE_FORWARD, SID_BROWSE_FORWARD, rDis ); #ifdef WNT @@ -314,7 +313,6 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId ) rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(SID_RELOAD); break; - case MN_READONLY_BROWSE_STOP: nExecId = SID_BROWSE_STOP; break; case MN_READONLY_BROWSE_BACKWARD: nExecId = SID_BROWSE_BACKWARD;break; case MN_READONLY_BROWSE_FORWARD: nExecId = SID_BROWSE_FORWARD; break; case MN_READONLY_SOURCEVIEW: nExecId = SID_SOURCEVIEW; break; diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index d311d29c6c..a80438afe8 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -65,7 +65,7 @@ #include <com/sun/star/sdbc/XDataSource.hpp> #include <toolkit/unohlp.hxx> #include <comphelper/processfactory.hxx> -#include <com/sun/star/form/XFormController.hpp> +#include <com/sun/star/form/runtime/XFormController.hpp> #include <cppuhelper/implbase1.hxx> #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/container/XContainerQuery.hpp> @@ -96,7 +96,7 @@ using namespace ::com::sun::star::ui::dialogs; ---------------------------------------------------------------------------*/ struct SwMailMergeDlg_Impl { - uno::Reference<XFormController> xFController; + uno::Reference<runtime::XFormController> xFController; uno::Reference<XSelectionChangeListener> xChgLstnr; uno::Reference<XSelectionSupplier> xSelSupp; }; @@ -329,7 +329,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, pBeamerWin->Show(); } uno::Reference<XController> xController = xFrame->getController(); - pImpl->xFController = uno::Reference<XFormController>(xController, UNO_QUERY); + pImpl->xFController = uno::Reference<runtime::XFormController>(xController, UNO_QUERY); if(pImpl->xFController.is()) { uno::Reference< awt::XControl > xCtrl = pImpl->xFController->getCurrentControl( ); diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index a905de6b30..76f0fbcfc7 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -407,7 +407,7 @@ IMPL_LINK( SwFldEditDlg, AddressHdl, PushButton *, EMPTYARG ) DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aSet, - pSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), + pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RC_DLG_ADDR ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if(RET_OK == pDlg->Execute()) diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index e93686f707..644565b9bb 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -567,7 +567,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) SfxAllItemSet aNewSet(*aSet.GetPool()); aNewSet.Put( SwMacroAssignDlg::AddEvents(MACASSGN_ALLFRM) ); if ( pWrtShell ) - rPage.SetFrame( pWrtShell->GetView().GetViewFrame()->GetFrame()->GetFrameInterface() ); + rPage.SetFrame( pWrtShell->GetView().GetViewFrame()->GetFrame().GetFrameInterface() ); rPage.PageCreated(aNewSet); break; } diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index c69a2b5601..413845f1eb 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -193,7 +193,7 @@ void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) aNewSet.Put( SwMacroAssignDlg::AddEvents( DLG_FRM_GRF == m_nDlgType ? MACASSGN_GRAPHIC : DLG_FRM_OLE == m_nDlgType ? MACASSGN_OLE : MACASSGN_FRMURL ) ); if ( m_pWrtShell ) - rPage.SetFrame( m_pWrtShell->GetView().GetViewFrame()->GetFrame()->GetFrameInterface() ); + rPage.SetFrame( m_pWrtShell->GetView().GetViewFrame()->GetFrame().GetFrameInterface() ); rPage.PageCreated(aNewSet); break; } diff --git a/sw/source/ui/inc/tbxmgr.hxx b/sw/source/ui/inc/tbxmgr.hxx deleted file mode 100644 index 4a744f8e66..0000000000 --- a/sw/source/ui/inc/tbxmgr.hxx +++ /dev/null @@ -1,52 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _TBXMGR_HXX -#define _TBXMGR_HXX - -#include <svx/tbxdraw.hxx> -/* -class SwPopupWindowTbxMgr : public SvxPopupWindowTbxMgr -{ - BOOL bWeb:1; //gilt der WebMode? - ResId aRIdWinTemp; - ResId aRIdTbxTemp; - WindowAlign eAlignment; - SfxBindings& mrBindings; - -public: - SwPopupWindowTbxMgr( USHORT nId, - WindowAlign eAlign, - ResId aRIdWin, - ResId aRIdTbx, - SfxBindings& rBindings ); - - virtual void StateChanged(USHORT nSID, SfxItemState eState, const SfxPoolItem* pState); - virtual SfxPopupWindow* Clone() const; -}; -*/ - -#endif // _TBX_DRAW_HXX diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index a155a15f65..4712c76e24 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -40,6 +40,7 @@ #include <swtypes.hxx> #include <shellid.hxx> #include <layout/layout.hxx> +#include <IMark.hxx> class SwBaseShell; class Button; @@ -92,6 +93,7 @@ struct SwConversionArgs; class Graphic; class GraphicFilter; class SwPostItMgr; +class SwFieldBookmark; namespace com{ namespace sun { namespace star { namespace view{ class XSelectionSupplier; } @@ -463,7 +465,7 @@ public: DECL_LINK( SpellError, LanguageType * ); BOOL ExecSpellPopup( const Point& rPt ); - + BOOL ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM ); // SMARTTAGS BOOL ExecSmartTagPopup( const Point& rPt ); diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx index 9a95d3d3c6..14b26c0391 100644 --- a/sw/source/ui/inc/wrtsh.hxx +++ b/sw/source/ui/inc/wrtsh.hxx @@ -32,6 +32,7 @@ #include <fesh.hxx> #include <sortopt.hxx> #include <swurl.hxx> +#include <IMark.hxx> class Window; class OutputDevice; @@ -319,6 +320,9 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)(); void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0); BOOL UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0); + // new fields + BOOL UpdateField( sw::mark::IFieldmark &fieldBM); + // Numerierung und Bullets /** Turns on numbering or bullets. diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 7b96817fe8..02a342e02f 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -275,7 +275,7 @@ USHORT SwSpellPopup::fillLangPopupMenu( //6--all languages used in current document uno::Reference< com::sun::star::frame::XModel > xModel; - uno::Reference< com::sun::star::frame::XController > xController( pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface()->getController(), uno::UNO_QUERY ); + uno::Reference< com::sun::star::frame::XController > xController( pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface()->getController(), uno::UNO_QUERY ); if ( xController.is() ) xModel = xController->getModel(); @@ -576,7 +576,7 @@ bGrammarResults(false) nNumLanguageDocEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, 2 ); EnableItem( MN_LANGUAGE_ALL_TEXT, true ); */ - uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(); + uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); Image rImg = ::GetImage( xFrame, ::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); @@ -710,7 +710,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) nNumLanguageDocEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, 2 ); EnableItem( MN_LANGUAGE_ALL_TEXT, true ); */ - uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(); + uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); Image rImg = ::GetImage( xFrame, ::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index d11dc8e42a..faec81b639 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -638,7 +638,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn ) const SfxPoolItem* pItem; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pMacroDlg = pFact->CreateSfxDialog( this, aSet, - pSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), SID_EVENTCONFIG ); + pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(), SID_EVENTCONFIG ); if ( pMacroDlg && pMacroDlg->Execute() == RET_OK && SFX_ITEM_SET == pMacroDlg->GetOutputItemSet()->GetItemState( RES_FRMMACRO, sal_False, &pItem ) ) { diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx index a7f5224c84..d25c570ed0 100644 --- a/sw/source/ui/misc/glshell.cxx +++ b/sw/source/ui/misc/glshell.cxx @@ -306,7 +306,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS } // Dokumenttitel setzen - SfxViewFrame* pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, nViewId, !bShow ); + SfxViewFrame* pFrame = bShow ? SfxViewFrame::LoadDocument( *xDocSh, nViewId ) : SfxViewFrame::LoadHiddenDocument( *xDocSh, nViewId ); String aDocTitle(SW_RES( STR_GLOSSARY )); aDocTitle += ' '; aDocTitle += sLongName; @@ -343,7 +343,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS xDocSh->GetDoc()->DoUndo( bDoesUndo ); xDocSh->GetDoc()->ResetModified(); if ( bShow ) - pFrame->GetFrame()->Appear(); + pFrame->GetFrame().Appear(); delete pGroup; } diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index f7cbb9a88b..586de971fd 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -173,7 +173,7 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aAllSet, - rSh.GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if (RET_OK == pDlg->Execute()) { SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE ); diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index c121028ea3..fcac632511 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -393,7 +393,7 @@ IMPL_LINK( SwSortDlg, DelimCharHdl, PushButton*, EMPTYARG ) SfxAllItemSet aSet( rSh.GetAttrPool() ); aSet.Put( SfxInt32Item( SID_ATTR_CHAR, GetDelimChar() ) ); SfxAbstractDialog* pMap = pFact->CreateSfxDialog( &aDelimPB, aSet, - rSh.GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if( RET_OK == pMap->Execute() ) { SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, FALSE ); diff --git a/sw/source/ui/ribbar/tblctrl.cxx b/sw/source/ui/ribbar/tblctrl.cxx index 96a03fe357..dbbbfcb44a 100644 --- a/sw/source/ui/ribbar/tblctrl.cxx +++ b/sw/source/ui/ribbar/tblctrl.cxx @@ -36,7 +36,6 @@ #include "cmdid.h" #include "swtypes.hxx" -#include "tbxmgr.hxx" #include "tblctrl.hxx" #include "tblctrl.hrc" diff --git a/sw/source/ui/ribbar/tbxmgr.cxx b/sw/source/ui/ribbar/tbxmgr.cxx deleted file mode 100644 index c4f05a7b6e..0000000000 --- a/sw/source/ui/ribbar/tbxmgr.cxx +++ /dev/null @@ -1,180 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - - -#include "cmdid.h" -#include "swtypes.hxx" // nur wegen aEmptyString?? -#include "errhdl.hxx" -#include "wdocsh.hxx" -#include "tbxmgr.hxx" - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ -/* -SwPopupWindowTbxMgr::SwPopupWindowTbxMgr( USHORT nId, WindowAlign eAlign, - ResId aRIdWin, ResId aRIdTbx, - SfxBindings& rBindings ) : - SvxPopupWindowTbxMgr( nId, eAlign, aRIdWin, aRIdTbx ), - bWeb(FALSE), - aRIdWinTemp(aRIdWin), - aRIdTbxTemp(aRIdTbx), - eAlignment( eAlign ), - mrBindings( rBindings ) -{ - SfxObjectShell* pObjShell = SfxObjectShell::Current(); - if(PTR_CAST(SwWebDocShell, pObjShell)) - { - bWeb = TRUE; - ToolBox& rTbx = GetTbxMgr().GetToolBox(); - // jetzt muessen ein paar Items aus der Toolbox versteckt werden: - switch(nId) - { - case FN_INSERT_CTRL: - rTbx.ShowItem(FN_INSERT_FRAME_INTERACT_NOCOL); - rTbx.HideItem(FN_INSERT_FRAME_INTERACT); - rTbx.HideItem(FN_INSERT_FOOTNOTE); - rTbx.HideItem(FN_INSERT_ENDNOTE); - rTbx.HideItem(FN_PAGE_STYLE_SET_COLS); - rTbx.HideItem(FN_INSERT_IDX_ENTRY_DLG); - - break; - case FN_INSERT_FIELD_CTRL: - rTbx.HideItem(FN_INSERT_FLD_PGNUMBER); - rTbx.HideItem(FN_INSERT_FLD_PGCOUNT); - rTbx.HideItem(FN_INSERT_FLD_TOPIC); - rTbx.HideItem(FN_INSERT_FLD_TITLE); - break; - } - } - else if( FN_INSERT_CTRL == nId) - { - ToolBox& rTbx = GetTbxMgr().GetToolBox(); - rTbx.ShowItem(FN_INSERT_FRAME_INTERACT); - rTbx.HideItem(FN_INSERT_FRAME_INTERACT_NOCOL); - } - - Size aSize = GetTbxMgr().CalcWindowSizePixel(); - GetTbxMgr().SetPosSizePixel( Point(), aSize ); - SetOutputSizePixel( aSize ); -} -*/ -/************************************************************************* -|* -|* -|* -\************************************************************************/ -/* -void SwPopupWindowTbxMgr::StateChanged(USHORT nSID, SfxItemState eState, - const SfxPoolItem* pState) -{ - static USHORT __READONLY_DATA aInsertCtrl[] = - { - FN_INSERT_FRAME_INTERACT, - FN_INSERT_FOOTNOTE, - FN_INSERT_ENDNOTE, - FN_PAGE_STYLE_SET_COLS, - FN_INSERT_IDX_ENTRY_DLG, - 0 - }; - static USHORT __READONLY_DATA aInsertFld[] = - { - FN_INSERT_FLD_PGNUMBER, - FN_INSERT_FLD_PGCOUNT, - FN_INSERT_FLD_TOPIC, - FN_INSERT_FLD_TITLE, - 0 - }; - - SfxObjectShell* pObjShell = SfxObjectShell::Current(); - BOOL bNewWeb = 0 != PTR_CAST(SwWebDocShell, pObjShell); - - if(bWeb != bNewWeb) - { - bWeb = bNewWeb; - ToolBox& rTbx = GetTbxMgr().GetToolBox(); - // jetzt muessen ein paar Items aus der Toolbox versteckt werden: - const USHORT* pSid = 0; - - switch(nSID) - { - case FN_INSERT_CTRL: - pSid = &aInsertCtrl[0]; - if(bWeb) - rTbx.ShowItem(FN_INSERT_FRAME_INTERACT_NOCOL); - else - rTbx.HideItem(FN_INSERT_FRAME_INTERACT_NOCOL); - break; - case FN_INSERT_FIELD_CTRL: - pSid = & aInsertFld[0]; - break; - } - if(pSid) - { - if(bWeb) - while(*pSid) - { - rTbx.HideItem(*pSid); - pSid++; - } - else - while(*pSid) - { - rTbx.ShowItem(*pSid); - pSid++; - } - Size aSize = GetTbxMgr().CalcWindowSizePixel(); - GetTbxMgr().SetPosSizePixel( Point(), aSize ); - SetOutputSizePixel( aSize ); - } - } - - SfxPopupWindow::StateChanged(nSID, eState, pState); -} -*/ -/* -SfxPopupWindow* SwPopupWindowTbxMgr::Clone() const -{ - return new SwPopupWindowTbxMgr( - GetId(), - eAlignment, -// ((SwPopupWindowTbxMgr*)this)->GetTbxMgr().GetToolBox().GetAlign(), - aRIdWinTemp, - aRIdTbxTemp, - mrBindings -// (SfxBindings&)GetBindings() - ); -} -*/ - diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index fbf42ecc08..bb69819b8d 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -50,7 +50,6 @@ #include <gloshdl.hxx> #include <glosdoc.hxx> #include <gloslst.hxx> -#include <tbxmgr.hxx> #include <workctrl.hxx> #ifndef _WORKCTRL_HRC #include <workctrl.hrc> diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 930546880e..6d2f209148 100755 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -1554,7 +1554,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) // Wenn Zeichen selektiert ist kann es angezeigt werden SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); USHORT nResult = pDlg->Execute(); if( nResult == RET_OK ) diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 272a6bf7a5..19b149c20d 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -186,7 +186,7 @@ void lcl_UpdateIMapDlg( SwWrtShell& rSh ) void* pEditObj = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType ? rSh.GetIMapInventor() : 0; TargetList* pList = new TargetList; - rSh.GetView().GetViewFrame()->GetTopFrame()->GetTargetList(*pList); + rSh.GetView().GetViewFrame()->GetTopFrame().GetTargetList(*pList); SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); @@ -2555,7 +2555,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) SvxBrushItem aBrush(RES_BACKGROUND); rSh.GetBoxBackground( aBrush ); pDlg = pFact->CreateSfxDialog( pMDI, aSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RC_SWDLG_BACKGROUND ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); aSet.Put( aBrush ); @@ -2574,7 +2574,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) rSh.GetFlyFrmAttr( aSet ); pDlg = pFact->CreateSfxDialog( pMDI, aSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RC_SWDLG_BACKGROUND ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if ( pDlg->Execute() == RET_OK ) @@ -2589,7 +2589,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) rSh.GetCurAttr( aSet ); pDlg = pFact->CreateSfxDialog( pMDI, aSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RC_SWDLG_BACKGROUND ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if ( pDlg->Execute() == RET_OK ) diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index 80bf51193b..e780143cb8 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -809,7 +809,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) // Wenn Zeichen selektiert ist kann es angezeigt werden SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); USHORT nResult = pDlg->Execute(); if( nResult == RET_OK ) { diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index efa01b6652..b2dfee2fa4 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -450,7 +450,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, FALSE, &pItem) == SFX_ITEM_SET) nDefPage = ((SfxUInt16Item *)pItem)->GetValue(); - aSet.Put(SfxFrameItem( SID_DOCFRAME, GetView().GetViewFrame()->GetTopFrame())); + aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame())); FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView())); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric) )); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index 4f7332ebbb..1ba55d45dd 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -225,7 +225,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) aSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, aUsrPref.IsKeepRatio())); aSet.Put(SfxBoolItem( SID_ATTR_GRAF_KEEP_ZOOM, aUsrPref.IsGrfKeepZoom())); - aSet.Put(SfxFrameItem( SID_DOCFRAME, GetView().GetViewFrame()->GetTopFrame())); + aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame())); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); diff --git a/sw/source/ui/shells/grfshex.cxx b/sw/source/ui/shells/grfshex.cxx index eb5258f373..ec0cd2a6c2 100644 --- a/sw/source/ui/shells/grfshex.cxx +++ b/sw/source/ui/shells/grfshex.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -153,7 +153,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest& rReq ) pObj->setURL( aURL ); rSh.EnterStdMode(); - rSh.SwFEShell::Insert( *pObj, 0, 0, &aPos ); + rSh.SwFEShell::InsertDrawObj( *pObj, aPos ); bRet = true; if( pWindow ) diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk index 4123040225..e9a03a5a41 100644 --- a/sw/source/ui/shells/makefile.mk +++ b/sw/source/ui/shells/makefile.mk @@ -73,6 +73,7 @@ SLOFILES = \ $(SLO)$/txtnum.obj EXCEPTIONSFILES = \ + $(SLO)$/basesh.obj \ $(SLO)$/annotsh.obj \ $(SLO)$/drwtxtsh.obj \ $(SLO)$/textsh.obj \ diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index 9c2658c5fc..3e17c83893 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -729,7 +729,7 @@ void SwTableShell::Execute(SfxRequest &rReq) DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(),aCoreSet, - pView->GetViewFrame()->GetFrame()->GetFrameInterface(), + pView->GetViewFrame()->GetFrame().GetFrameInterface(), RC_DLG_SWNUMFMTDLG ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 1394552f46..60c02e5f0b 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -1140,7 +1140,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(), aAllSet, - GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if( RET_OK == pDlg->Execute() ) { SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE ); diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx index 0d74c930e5..10547000c5 100644 --- a/sw/source/ui/shells/txtattr.cxx +++ b/sw/source/ui/shells/txtattr.cxx @@ -561,7 +561,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq) DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(), aSet, - rSh.GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), DLG_SWDROPCAPS ); + rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), DLG_SWDROPCAPS ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if (pDlg->Execute() == RET_OK) { diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 0d7482f521..2d1ed91ef7 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -44,7 +44,6 @@ #include <sfx2/printer.hxx> #include <sfx2/progress.hxx> #include <sfx2/app.hxx> -#include <sfx2/topfrm.hxx> #include <sfx2/bindings.hxx> #include <sfx2/request.hxx> #include <sfx2/dispatch.hxx> @@ -128,8 +127,7 @@ SFX_IMPL_INTERFACE(SwPagePreView, SfxViewShell, SW_RES(RID_PVIEW_TOOLBOX)) TYPEINIT1(SwPagePreView,SfxViewShell) -#define SWVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST|SFX_VIEW_OPTIMIZE_EACH| \ - SFX_VIEW_CAN_PRINT|SFX_VIEW_HAS_PRINTOPTIONS ) +#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT|SFX_VIEW_HAS_PRINTOPTIONS ) #define MIN_PREVIEW_ZOOM 25 #define MAX_PREVIEW_ZOOM 600 @@ -1566,7 +1564,8 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) ASSERT(nWhich, leeres Set); SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout(); //#106746# zoom has to be disabled if Accessibility support is switched on - BOOL bZoomEnabled = !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport(); + // MT 2010/01, see #110498# + BOOL bZoomEnabled = TRUE; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport(); while(nWhich) { @@ -1816,7 +1815,7 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): pPageUpBtn(0), pPageDownBtn(0), pScrollFill(new ScrollBarBox( &pViewFrame->GetWindow(), - pViewFrame->GetFrame()->GetParentFrame() ? 0 : WB_SIZEABLE )), + pViewFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )), mnPageCount( 0 ), // OD 09.01.2003 #106334# mbResetFormDesignMode( false ), @@ -1901,15 +1900,13 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): delete pPageDownBtn; /* SfxObjectShell* pDocSh = GetDocShell(); - TypeId aType = TYPE( SfxTopViewFrame ); - - for( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocSh, aType ); - pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh, aType ) ) + for( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocSh ); + pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh ) ) if( pFrame != GetViewFrame() ) { // es gibt noch eine weitere Sicht auf unser Dokument, also // aktiviere dieses - pFrame->GetFrame()->Appear(); + pFrame->GetFrame().Appear(); break; } */} @@ -2086,8 +2083,11 @@ void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize ) //Aufruf der DocSzChgd-Methode der Scrollbars ist noetig, da vom maximalen //Scrollrange immer die halbe Hoehe der VisArea abgezogen wird. - if ( pVScrollbar ) - ScrollDocSzChg(); + if ( pVScrollbar && + aTmpSize.Width() > 0 && aTmpSize.Height() > 0 ) + { + ScrollDocSzChg(); + } } /*-------------------------------------------------------------------- diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 65cf77b41f..aaa1e80808 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -111,9 +111,7 @@ using ::rtl::OUString; using ::com::sun::star::util::SearchOptions; -#define SWSRCVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST| \ - SFX_VIEW_OBJECTSIZE_EMBEDDED| \ - SFX_VIEW_CAN_PRINT|\ +#define SWSRCVIEWFLAGS ( SFX_VIEW_CAN_PRINT|\ SFX_VIEW_NO_NEWWINDOW ) #define SRC_SEARCHOPTIONS (0xFFFF & ~(SEARCH_OPTIONS_FORMAT|SEARCH_OPTIONS_FAMILIES|SEARCH_OPTIONS_SEARCH_ALL)) diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 521f8755b7..76b2ed5f50 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -127,14 +127,9 @@ using ::rtl::OUStringBuffer; extern sal_Bool bNoInterrupt; // in mainwn.cxx -#define SWVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST| \ - SFX_VIEW_OBJECTSIZE_EMBEDDED| \ - SFX_VIEW_CAN_PRINT| \ +#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT| \ SFX_VIEW_HAS_PRINTOPTIONS) -//MA 06. Nov. 95: Each raus in Absprache mit MI wg. Bug 21523 -// SFX_VIEW_OPTIMIZE_EACH| - /*-------------------------------------------------------------------- Beschreibung: Statics --------------------------------------------------------------------*/ @@ -174,7 +169,7 @@ inline SfxDispatcher &SwView::GetDispatcher() void SwView::ImpSetVerb( int nSelType ) { sal_Bool bResetVerbs = bVerbsActive; - if ( !GetViewFrame()->GetFrame()->IsInPlace() && + if ( !GetViewFrame()->GetFrame().IsInPlace() && (nsSelectionType::SEL_OLE|nsSelectionType::SEL_GRF) & nSelType ) { if ( !pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT) ) @@ -756,7 +751,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) pFormShell(0), pHScrollbar(0), pVScrollbar(0), - pScrollFill(new ScrollBarBox( &_pFrame->GetWindow(), _pFrame->GetFrame()->GetParentFrame() ? 0 : WB_SIZEABLE )), + pScrollFill(new ScrollBarBox( &_pFrame->GetWindow(), _pFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )), pHRuler( new SvxRuler(&GetViewFrame()->GetWindow(), pEditWin, SVXRULER_SUPPORT_TABS | SVXRULER_SUPPORT_PARAGRAPH_MARGINS | @@ -928,10 +923,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) if( SFX_CREATE_MODE_EMBEDDED != pDocSh->GetCreateMode() ) aBrwsBorder = GetMargin(); - if( _pFrame->GetFrameType() & SFXFRAME_INTERNAL ) - pWrtShell->SetFrameView( aBrwsBorder ); - else - pWrtShell->SetBrowseBorder( aBrwsBorder ); + pWrtShell->SetBrowseBorder( aBrwsBorder ); // Im CTOR duerfen keine Shell wechsel erfolgen, die muessen ueber // den Timer "zwischen gespeichert" werden. Sonst raeumt der SFX @@ -943,7 +935,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) pVRuler->SetActive( sal_True ); SfxViewFrame* pViewFrame = GetViewFrame(); - if( pViewFrame->GetFrame()->GetParentFrame()) + if( pViewFrame->GetFrame().GetParentFrame()) { aUsrPref.SetViewHRuler(sal_False); aUsrPref.SetViewVRuler(sal_False); @@ -1002,13 +994,6 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) pWrtShell->SetReadOnlyAvailable( aUsrPref.IsCursorInProtectedArea() ); pWrtShell->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions()); - if( UseObjectSize() ) - { - //Damit der Sfx _rechtzeitig weiss_, wie gross die sheet::Border sind. - SvBorder aTmp; - CalcAndSetBorderPixel( aTmp, sal_True ); - } - if( pWrtShell->GetDoc()->IsUpdateExpFld() ) { SET_CURR_SHELL( pWrtShell ); @@ -1057,10 +1042,10 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) /*uno::Reference< awt::XWindow > aTmpRef; - _pFrame->GetFrame()->GetFrameInterface()->setComponent( aTmpRef, + _pFrame->GetFrame().GetFrameInterface()->setComponent( aTmpRef, pViewImpl->GetUNOObject_Impl());*/ - uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame()->GetFrameInterface(); + uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface(); uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame( OUString::createFromAscii("_beamer"), frame::FrameSearchFlag::CHILDREN); @@ -1622,7 +1607,7 @@ void SwView::ShowCursor( FASTBOOL bOn ) ErrCode SwView::DoVerb( long nVerb ) { - if ( !GetViewFrame()->GetFrame()->IsInPlace() ) + if ( !GetViewFrame()->GetFrame().IsInPlace() ) { SwWrtShell &rSh = GetWrtShell(); const int nSel = rSh.GetSelectionType(); diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 780086ac2c..2b0827ee47 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -72,7 +72,6 @@ #include <sfx2/fcontnr.hxx> #include <editeng/sizeitem.hxx> #include <sfx2/dispatch.hxx> -#include <sfx2/topfrm.hxx> #include <svl/whiter.hxx> #include <svl/ptitem.hxx> #include <sfx2/linkmgr.hxx> @@ -1028,7 +1027,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) if(bQuery) { SfxViewFrame* pTmpFrame = GetViewFrame(); - SfxHelp::OpenHelpAgent( pTmpFrame->GetFrame(), HID_MAIL_MERGE_SELECT ); + SfxHelp::OpenHelpAgent( &pTmpFrame->GetFrame(), HID_MAIL_MERGE_SELECT ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); AbstractMailMergeCreateFromDlg* pDlg = pFact->CreateMailMergeCreateFromDlg( DLG_MERGE_CREATE, diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx index 8d67a14603..f35e5570f1 100644 --- a/sw/source/ui/uiview/viewdraw.cxx +++ b/sw/source/ui/uiview/viewdraw.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -171,7 +171,7 @@ void SwView::ExecDraw(SfxRequest& rReq) // TODO: unmark all other pWrtShell->EnterStdMode(); - pWrtShell->SwFEShell::Insert( *pObj, 0, 0, &aStartPos ); + pWrtShell->SwFEShell::InsertDrawObj( *pObj, aStartPos ); } } } @@ -218,7 +218,7 @@ void SwView::ExecDraw(SfxRequest& rReq) aSize = Size( 2835, 2835 ); pWrtShell->EnterStdMode(); - pWrtShell->SwFEShell::Insert( *pObj, 0, 0, &aPos ); + pWrtShell->SwFEShell::InsertDrawObj( *pObj, aPos ); rReq.Ignore (); } } @@ -243,8 +243,8 @@ void SwView::ExecDraw(SfxRequest& rReq) } //deselect if same shape is selected again (but different custom shapes do have same slot id) - if ( bDeselect || (nSlotId == nDrawSfxId && - (!pStringItem || (pStringItem->GetValue() == sDrawCustom)) + if ( bDeselect || (nSlotId == nDrawSfxId && + (!pStringItem || (pStringItem->GetValue() == sDrawCustom)) && (nSlotId != SID_DRAW_CS_ID) ) ) { if (GetDrawFuncPtr()) @@ -418,7 +418,7 @@ void SwView::ExitDraw() NoRotate(); if(pShell) - { + { //#126062 # the shell may be invalid at close/reload/SwitchToViewShell SfxDispatcher* pDispatch = GetViewFrame()->GetDispatcher(); USHORT nIdx = 0; @@ -428,7 +428,7 @@ void SwView::ExitDraw() pTest = pDispatch->GetShell(nIdx++); } while( pTest && pTest != this && pTest != pShell); - if(pTest == pShell && + if(pTest == pShell && // don't call LeaveSelFrmMode() etc. for the below, // because objects may still be selected: !pShell->ISA(SwDrawBaseShell) && diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 16bfbdfd11..5ccb5f8093 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -70,7 +70,7 @@ #include <edtwin.hxx> #include <crsskip.hxx> #include <ndtxt.hxx> - +#include <vcl/lstbox.hxx> #include <cmdid.h> #include <globals.hrc> #include <comcore.hrc> // STR_MULT_INTERACT_SPELL_WARN @@ -97,10 +97,13 @@ #include <svx/dialogs.hrc> #include <svtools/langtab.hxx> #include <unomid.h> +#include <IMark.hxx> +#include <xmloff/odffields.hxx> #include <memory> #include <editeng/editerr.hxx> +using namespace sw::mark; using ::rtl::OUString; using namespace ::com::sun::star; using namespace ::com::sun::star::beans; @@ -827,10 +830,9 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt) else { SfxViewFrame *pSfxViewFrame = GetViewFrame(); - SfxFrame *pSfxFrame = pSfxViewFrame? pSfxViewFrame->GetFrame() : 0; uno::Reference< frame::XFrame > xFrame; - if (pSfxFrame) - xFrame = pSfxFrame->GetFrameInterface(); + if ( pSfxViewFrame ) + xFrame = pSfxViewFrame->GetFrame().GetFrameInterface(); com::sun::star::util::URL aURL; uno::Reference< frame::XDispatchProvider > xDispatchProvider( xFrame, UNO_QUERY ); uno::Reference< lang::XMultiServiceFactory > xMgr( utl::getProcessServiceFactory(), uno::UNO_QUERY ); @@ -916,3 +918,142 @@ sal_Bool SwView::ExecSmartTagPopup( const Point& rPt ) return bRet; } + + +class SwFieldPopup : public PopupMenu +{ +public: + SwFieldPopup() { + InsertItem(1, ::rtl::OUString::createFromAscii("Hello")); + } +}; + +class SwFieldListBox : public ListBox +{ +public: + SwFieldListBox(Window* pParent) : ListBox(pParent /*, WB_DROPDOWN*/) { + } + + void *GetImplWin() { + return NULL; //FIXME!!! +// return mpImplWin; + } + +protected: + virtual void LoseFocus() { +// printf("ListBox: lose focus!!\n"); + ListBox::LoseFocus(); + } + + virtual void Select() { +// printf("SELECT!!! IsTravelSelect=%i\n", IsTravelSelect()); + ListBox::Select(); + } +}; + +class SwFieldDialog : public Dialog +{ +private: + SwFieldListBox aListBox; + Edit aText; + int selection; + + DECL_LINK( MyListBoxHandler, ListBox * ); + +public: + SwFieldDialog(Window* parent, IFieldmark *fieldBM) : Dialog(parent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ), aListBox(this), aText(this, WB_RIGHT | WB_READONLY), selection(-1) { + + assert(fieldBM!=NULL); + if (fieldBM!=NULL) { + const IFieldmark::parameter_map_t* const pParameters = fieldBM->GetParameters(); + IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY)); + if(pListEntries != pParameters->end()) + { + Sequence< ::rtl::OUString> vListEntries; + pListEntries->second >>= vListEntries; + for( ::rtl::OUString* pCurrent = vListEntries.getArray(); + pCurrent != vListEntries.getArray() + vListEntries.getLength(); + ++pCurrent) + { + aListBox.InsertEntry(*pCurrent); + } + } + } + Size lbSize=aListBox.GetOptimalSize(WINDOWSIZE_PREFERRED); + lbSize.Width()+=50; + lbSize.Height()+=20; + aListBox.SetSizePixel(lbSize); + aListBox.SetSelectHdl( LINK( this, SwFieldDialog, MyListBoxHandler ) ); + aListBox.Show(); + aText.SetText(rtl::OUString::createFromAscii("Cancel")); + Size tSize=aText.GetOptimalSize(WINDOWSIZE_PREFERRED); + aText.SetSizePixel(Size(lbSize.Width(), tSize.Height())); + aText.SetPosPixel(Point(0, lbSize.Height())); + aText.Show(); + SetSizePixel(Size(lbSize.Width(), lbSize.Height()+tSize.Height())); +// SetSizePixel(Size(200, 200)); + } + + int getSelection() { + return selection; + } +protected: + /* + virtual void LoseFocus() { + printf("lose focus!!\n"); + Dialog::LoseFocus(); + printf("close:\n"); + EndDialog(8); + } + */ + + virtual long PreNotify( NotifyEvent& rNEvt ) { + if (rNEvt.GetType() == EVENT_LOSEFOCUS && aListBox.GetImplWin()==rNEvt.GetWindow()) { + EndDialog(8); + return 1; + } + if (rNEvt.GetType() == EVENT_KEYINPUT) { +// printf("PreNotify::KEYINPUT\n"); + } + return Dialog::PreNotify(rNEvt); + } +}; + +IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox ) +{ +// printf("### DROP DOWN SELECT... IsTravelSelect=%i\n", pBox->IsTravelSelect()); + if (pBox->IsTravelSelect()) { + return 0; + } else { + this->selection=pBox->GetSelectEntryPos(); + EndDialog(9); //@TODO have meaningfull returns... + return 1; + } +} + + +BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM ) +{ + sal_Bool bRet = sal_False; + const sal_Bool bOldViewLock = pWrtShell->IsViewLocked(); + pWrtShell->LockView( sal_True ); + pWrtShell->Push(); + + bRet=sal_True; + const Point aPixPos = GetEditWin().LogicToPixel( rPt ); + + SwFieldDialog aFldDlg(pEditWin, fieldBM); + aFldDlg.SetPosPixel(pEditWin->OutputToScreenPixel(aPixPos)); + + /*short ret=*/aFldDlg.Execute(); + sal_Int32 selection=aFldDlg.getSelection(); + if (selection>=0) { + (*fieldBM->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT)] = makeAny(selection); + } + + pWrtShell->Pop( sal_False ); + pWrtShell->LockView( bOldViewLock ); + + return bRet; +} + diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index b6b53a7197..5bc918e377 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -178,7 +178,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, nFac = Max( long( MINZOOM ), nFac ); SwViewOption aOpt( *pOpt ); - if ( !GetViewFrame()->GetFrame()->IsInPlace() ) + if ( !GetViewFrame()->GetFrame().IsInPlace() ) { //MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen //View updaten. @@ -261,7 +261,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly ) ACT_KONTEXT(pWrtShell); - if ( !GetViewFrame()->GetFrame()->IsInPlace() && !bViewOnly ) + if ( !GetViewFrame()->GetFrame().IsInPlace() && !bViewOnly ) { const BOOL bWeb = 0 != PTR_CAST(SwWebView, this); SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb); @@ -347,7 +347,7 @@ void SwView::CreatePageButtons(BOOL bShow) pPageUpBtn->SetHelpId(HID_SCRL_PAGEUP); pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), FALSE ); pPageDownBtn->SetHelpId(HID_SCRL_PAGEDOWN); - Reference< XFrame > xFrame = GetViewFrame()->GetFrame()->GetFrameInterface(); + Reference< XFrame > xFrame = GetViewFrame()->GetFrame().GetFrameInterface(); pNaviBtn = new SwNaviImageButton(pMDI, xFrame ); pNaviBtn->SetHelpId(HID_SCRL_NAVI); Link aLk( LINK( this, SwView, BtnPage ) ); diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index e5258659ab..d47436aae3 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -221,7 +221,7 @@ aDocSz = rSz; SetVisArea( aNewVisArea, FALSE ); if ( UpdateScrollbars() && !bInOuterResizePixel && !bInInnerResizePixel && - !GetViewFrame()->GetFrame()->IsInPlace()) + !GetViewFrame()->GetFrame().IsInPlace()) OuterResizePixel( Point(), GetViewFrame()->GetWindow().GetOutputSizePixel() ); } @@ -355,7 +355,7 @@ void SwView::SetVisArea( const Point &rPt, BOOL bUpdateScrollbar ) void SwView::CheckVisArea() { pHScrollbar->SetAuto( pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) && - !GetViewFrame()->GetFrame()->IsInPlace() ); + !GetViewFrame()->GetFrame().IsInPlace() ); if ( IsDocumentBorder() ) { if ( aVisArea.Left() != DOCUMENTBORDER || @@ -732,7 +732,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar ) { // JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE, // so we dont must do it agin. -// if(!GetViewFrame()->GetFrame()->IsInPlace()) +// if(!GetViewFrame()->GetFrame().IsInPlace()) // S F X_BINDINGS().Update(FN_STAT_PAGE); //QuickHelp: @@ -1053,7 +1053,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize ) Size aSz( rSize ); SvBorder aBorder; CalcAndSetBorderPixel( aBorder, TRUE ); - if ( GetViewFrame()->GetFrame()->IsInPlace() ) + if ( GetViewFrame()->GetFrame().IsInPlace() ) { Size aViewSize( aSz ); Point aViewPos( rOfst ); diff --git a/sw/source/ui/uno/unodispatch.cxx b/sw/source/ui/uno/unodispatch.cxx index a64f4582a7..24e386259e 100644 --- a/sw/source/ui/uno/unodispatch.cxx +++ b/sw/source/ui/uno/unodispatch.cxx @@ -57,8 +57,7 @@ const sal_Char* cInternalDBChangeNotification = ".uno::Writer/DataSourceChanged" SwXDispatchProviderInterceptor::SwXDispatchProviderInterceptor(SwView& rVw) : m_pView(&rVw) { - SfxFrame* pFrame = m_pView->GetViewFrame()->GetFrame(); - uno::Reference< frame::XFrame> xUnoFrame = pFrame->GetFrameInterface(); + uno::Reference< frame::XFrame> xUnoFrame = m_pView->GetViewFrame()->GetFrame().GetFrameInterface(); m_xIntercepted = uno::Reference< frame::XDispatchProviderInterception>(xUnoFrame, uno::UNO_QUERY); if(m_xIntercepted.is()) { diff --git a/sw/source/ui/uno/unodoc.cxx b/sw/source/ui/uno/unodoc.cxx index b2843ee5ae..fc0c440ff2 100644 --- a/sw/source/ui/uno/unodoc.cxx +++ b/sw/source/ui/uno/unodoc.cxx @@ -66,9 +66,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwTextDocument_createInstance( { ::vos::OGuard aGuard( Application::GetSolarMutex() ); SwDLL::Init(); - const SfxObjectCreateMode eCreateMode = ( _nCreationFlags & SFXMODEL_EMBEDDED_OBJECT ) ? SFX_CREATE_MODE_EMBEDDED : SFX_CREATE_MODE_STANDARD; - const bool bScriptSupport = ( _nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0; - SfxObjectShell* pShell = new SwDocShell( eCreateMode, bScriptSupport ); + SfxObjectShell* pShell = new SwDocShell( _nCreationFlags ); return uno::Reference< uno::XInterface >( pShell->GetModel() ); } diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index 3a8ee250b3..08c720d0b3 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -426,7 +426,7 @@ SwXMailMerge::SwXMailMerge() : SwDocShell *pDocShell = new SwDocShell( SFX_CREATE_MODE_STANDARD ); xDocSh = pDocShell; xDocSh->DoInitNew( 0 ); - SfxViewFrame *pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); + SfxViewFrame *pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); SwView *pView = (SwView*) pFrame->GetViewShell(); pView->AttrChangedNotify( &pView->GetWrtShell() );//Damit SelectShell gerufen wird. @@ -624,7 +624,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( aCurSelection = aTranslated; } - SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, 0, FALSE); + SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, FALSE); SwView *pView = PTR_CAST( SwView, pFrame->GetViewShell() ); if (!pView) throw RuntimeException(); diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index e0834ff457..afc7581f78 100644..100755 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -35,6 +35,7 @@ #include <vcl/print.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/sfxbasecontroller.hxx> +#include <sfx2/docfile.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <toolkit/awt/vclxdevice.hxx> #include <cmdid.h> @@ -220,7 +221,6 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell ) { // check if the view frame still exists SfxViewFrame* pFound = SfxViewFrame::GetFirst( pDocShell, - 0, FALSE ); while(pFound) { @@ -231,7 +231,6 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell ) } pFound = SfxViewFrame::GetNext( *pFound, pDocShell, - 0, FALSE ); } } @@ -1223,7 +1222,7 @@ void SwXTextDocument::printPages(const Sequence< beans::PropertyValue >& xOption ::vos::OGuard aGuard(Application::GetSolarMutex()); if(IsValid()) { - SfxViewFrame* pFrame = SfxViewFrame::CreateViewFrame( *pDocShell, 7, sal_True ); + SfxViewFrame* pFrame = SfxViewFrame::LoadHiddenDocument( *pDocShell, 7 ); SfxRequest aReq(FN_PRINT_PAGEPREVIEW, SFX_CALLMODE_SYNCHRON, pDocShell->GetDoc()->GetAttrPool()); aReq.AppendItem(SfxBoolItem(FN_PRINT_PAGEPREVIEW, sal_True)); @@ -2698,7 +2697,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( if (!pWrtShell) { //create a hidden view to be able to export as PDF also in print preview - m_pHiddenViewFrame = SfxViewFrame::CreateViewFrame( *pRenderDocShell, 2, TRUE ); + m_pHiddenViewFrame = SfxViewFrame::LoadHiddenDocument( *pRenderDocShell, 2 ); SwView* pSwView = (SwView*) m_pHiddenViewFrame->GetViewShell(); pWrtShell = pSwView->GetWrtShellPtr(); } @@ -2711,6 +2710,8 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( const TypeId aSwViewTypeId = TYPE(SwView); if (pView->IsA(aSwViewTypeId)) { + if (m_pRenderData && m_pRenderData->NeedNewViewOptionAdjust( *pWrtShell ) ) + m_pRenderData->ViewOptionAdjustStop(); if (m_pRenderData && !m_pRenderData->IsViewOptionAdjust()) m_pRenderData->ViewOptionAdjustStart( *pWrtShell, *pWrtShell->GetViewOptions() ); } @@ -2813,6 +2814,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( m_pPrintUIOptions->processProperties( rxOptions ); const bool bPrintProspect = m_pPrintUIOptions->getBoolValue( "PrintProspect", false ); const bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport ); + const bool bPrintPaperFromSetup = m_pPrintUIOptions->getBoolValue( "PrintPaperFromSetup", false ); SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport ); DBG_ASSERT( pDoc && pView, "doc or view shell missing!" ); @@ -2840,7 +2842,21 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( uno::Sequence< beans::PropertyValue > aRenderer; if (m_pRenderData) { + const USHORT nPage = nRenderer + 1; + + // get paper tray to use ... + sal_Int32 nPrinterPaperTray = -1; + if (! bPrintPaperFromSetup) + { + // ... from individual page style (see the page tab in Format/Page dialog) + const std::map< sal_Int32, sal_Int32 > &rPaperTrays = m_pRenderData->GetPrinterPaperTrays(); + std::map< sal_Int32, sal_Int32 >::const_iterator aIt( rPaperTrays.find( nPage ) ); + if (aIt != rPaperTrays.end()) + nPrinterPaperTray = aIt->second; + } + awt::Size aPageSize; + awt::Size aPreferredPageSize; Size aTmpSize; if (bIsSwSrcView || bPrintProspect) { @@ -2858,36 +2874,49 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( Printer *pPrinter = dynamic_cast< Printer * >(lcl_GetOutputDevice( *m_pPrintUIOptions )); if (pPrinter) { + // HTML source view and prospect adapt to the printer's paper size + aTmpSize = pPrinter->GetPaperSize(); + aTmpSize = pPrinter->LogicToLogic( aTmpSize, + pPrinter->GetMapMode(), MapMode( MAP_100TH_MM )); + aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() ); if (bPrintProspect) { - aTmpSize = pDoc->GetPageSize( USHORT(nRenderer + 1), bIsSkipEmptyPages ); // we just state what output size we would need - // the rest is nowadays up to vcl - aPageSize = awt::Size ( TWIP_TO_MM100( 2 * aTmpSize.Width() ), - TWIP_TO_MM100( aTmpSize.Height() )); - } - else - { - // printing HTML source view - aTmpSize = pPrinter->GetPaperSize(); - aTmpSize = pPrinter->LogicToLogic( aTmpSize, - pPrinter->GetMapMode(), MapMode( MAP_100TH_MM )); - aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() ); + // which may cause vcl to set that page size on the printer + // (if available and not overriden by the user) + aTmpSize = pDoc->GetPageSize( nPage, bIsSkipEmptyPages ); + aPreferredPageSize = awt::Size ( TWIP_TO_MM100( 2 * aTmpSize.Width() ), + TWIP_TO_MM100( aTmpSize.Height() )); } } } else { - aTmpSize = pDoc->GetPageSize( USHORT(nRenderer + 1), bIsSkipEmptyPages ); + aTmpSize = pDoc->GetPageSize( nPage, bIsSkipEmptyPages ); aPageSize = awt::Size ( TWIP_TO_MM100( aTmpSize.Width() ), TWIP_TO_MM100( aTmpSize.Height() )); } + sal_Int32 nLen = 2; aRenderer.realloc(2); aRenderer[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ); aRenderer[0].Value <<= aPageSize; aRenderer[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageIncludesNonprintableArea" ) ); aRenderer[1].Value <<= sal_True; + if (aPreferredPageSize.Width && aPreferredPageSize.Height) + { + ++nLen; + aRenderer.realloc( nLen ); + aRenderer[ nLen - 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PreferredPageSize" ) ); + aRenderer[ nLen - 1 ].Value <<= aPreferredPageSize; + } + if (nPrinterPaperTray >= 0) + { + ++nLen; + aRenderer.realloc( nLen ); + aRenderer[ nLen - 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PrinterPaperTray" ) ); + aRenderer[ nLen - 1 ].Value <<= nPrinterPaperTray; + } } m_pPrintUIOptions->appendPrintUIOptions( aRenderer ); @@ -2908,7 +2937,7 @@ SfxViewShell * SwXTextDocument::GuessViewShell( SwView *pSwView = 0; SwPagePreView *pSwPagePreView = 0; SwSrcView *pSwSrcView = 0; - SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, 0, sal_False ); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, sal_False ); // look for the view shell with the same controller in use, // otherwise look for a suitable view, preferably a SwView, @@ -2927,7 +2956,7 @@ SfxViewShell * SwXTextDocument::GuessViewShell( } else if (pSwView || pSwSrcView) break; - pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, 0, sal_False ); + pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, sal_False ); } DBG_ASSERT( pSwView || pSwPagePreView || pSwSrcView, "failed to get view shell" ); @@ -3075,6 +3104,12 @@ void SAL_CALL SwXTextDocument::render( { lcl_DisposeView( m_pHiddenViewFrame, pDocShell ); m_pHiddenViewFrame = 0; + + // prevent crash described in #i108805 + SwDocShell *pRenderDocShell = pDoc->GetDocShell(); + SfxItemSet *pSet = pRenderDocShell->GetMedium()->GetItemSet(); + pSet->Put( SfxBoolItem( SID_HIDDEN, sal_False ) ); + } } } diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index d4e4f039ec..ef73263663 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -911,7 +911,7 @@ SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); pOldSh->FillPrtDoc(pDocSh->GetDoc(), pPrt); - SfxViewFrame* pDocFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); + SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); SwView* pDocView = (SwView*) pDocFrame->GetViewShell(); pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird. SwWrtShell* pSh = pDocView->GetWrtShellPtr(); diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 576504f915..55276b7e33 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -500,7 +500,7 @@ void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus { // SfxBindings& rBind = GetCreateView()->GetViewFrame()->GetBindings(); // rBind.ENTERREGISTRATIONS(); - Reference< XFrame > xFrame = GetCreateView()->GetViewFrame()->GetFrame()->GetFrameInterface(); + Reference< XFrame > xFrame = GetCreateView()->GetViewFrame()->GetFrame().GetFrameInterface(); SwScrollNaviPopup* pPopup = new SwScrollNaviPopup(FN_SCROLL_NAVIGATION, xFrame ); diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx index c8d9bddc16..4bf6997cab 100644 --- a/sw/source/ui/utlui/numfmtlb.cxx +++ b/sw/source/ui/utlui/numfmtlb.cxx @@ -435,7 +435,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aCoreSet, - GetView()->GetViewFrame()->GetFrame()->GetFrameInterface(), + GetView()->GetViewFrame()->GetFrame().GetFrameInterface(), RC_DLG_SWNUMFMTDLG ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx index 12a5094dcb..c9e10d69c0 100644 --- a/sw/source/ui/utlui/uitool.cxx +++ b/sw/source/ui/utlui/uitool.cxx @@ -756,7 +756,7 @@ bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, USHORT nId } if(sCommand.Len()) { - uno::Reference< frame::XFrame > xFrame = rViewFrame.GetFrame()->GetFrameInterface(); + uno::Reference< frame::XFrame > xFrame = rViewFrame.GetFrame().GetFrameInterface(); uno::Reference < frame::XDispatchProvider > xProv( xFrame, uno::UNO_QUERY ); util::URL aURL; aURL.Complete = sCommand; diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 6ba4ff3c39..e86845f348 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -108,6 +108,8 @@ #include <paratr.hxx> #include <ndtxt.hxx> #include <editeng/acorrcfg.hxx> +//#include <svx/acorrcfg.hxx> +#include <IMark.hxx> // -> #111827# #include <SwRewriter.hxx> @@ -122,6 +124,7 @@ #include "PostItMgr.hxx" +using namespace sw::mark; using namespace com::sun::star; #define COMMON_INI_LIST \ @@ -641,7 +644,7 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm void SwWrtShell::LaunchOLEObj( long nVerb ) { if ( GetCntType() == CNT_OLE && - !GetView().GetViewFrame()->GetFrame()->IsInPlace() ) + !GetView().GetViewFrame()->GetFrame().IsInPlace() ) { svt::EmbeddedObjectRef& xRef = GetOLEObject(); ASSERT( xRef.is(), "OLE not found" ); @@ -1375,10 +1378,13 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) if ( pTxtNode && ePosAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT ) { - short nTxtNodeFirstLineOffset( 0 ); - pTxtNode->GetFirstLineOfsWithNum( nTxtNodeFirstLineOffset ); - const SwTwips nTxtNodeIndent = pTxtNode->GetLeftMarginForTabCalculation() + - nTxtNodeFirstLineOffset; + // --> OD 2010-01-05 #b6884103# +// short nTxtNodeFirstLineOffset( 0 ); +// pTxtNode->GetFirstLineOfsWithNum( nTxtNodeFirstLineOffset ); +// const SwTwips nTxtNodeIndent = pTxtNode->GetLeftMarginForTabCalculation() + +// nTxtNodeFirstLineOffset; + const SwTwips nTxtNodeIndent = pTxtNode->GetAdditionalIndentForStartingNewList(); + // <-- if ( ( nTxtNodeIndent + nWidthOfTabs ) != 0 ) { const SwTwips nIndentChange = nTxtNodeIndent + nWidthOfTabs; @@ -1750,6 +1756,12 @@ SwWrtShell::SwWrtShell( SwWrtShell& rSh, Window *_pWin, SwView &rShell ) SetSfxViewShell( (SfxViewShell *)&rShell ); SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) ); + + // place the cursor on the first field... + IFieldmark *pBM = NULL; + if ( IsFormProtected() && ( pBM = GetFieldmarkAfter( ) ) !=NULL ) { + GotoFieldmark(pBM); + } } diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx index 062f15826b..ac874a9791 100644 --- a/sw/source/ui/wrtsh/wrtsh2.cxx +++ b/sw/source/ui/wrtsh/wrtsh2.cxx @@ -239,6 +239,13 @@ BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) return bResult; } +BOOL SwWrtShell::UpdateField( sw::mark::IFieldmark &fieldBM ) +{ + return SwEditShell::UpdateField(fieldBM); +} + + + // ein Klick aus das angegebene Feld. Der Cursor steht auf diesem. // Fuehre die vor definierten Aktionen aus. |